DOSBox-X branch

Here you can discuss the development of patches.

Re: DOSBox-X branch

Postby AnnaWu » 2018-3-08 @ 19:28

yksoft1 wrote:
TheGreatCodeholio wrote:The PC-98 port of "Marble madness" appears to be one (and so far only that I've found) game on the PC-98 platform that uses INT 33h

I've found another one.
Photo Genic by Sunsoft
Clipboard01.jpg


Nice find, yksoft1!
AnnaWu
Newbie
 
Posts: 43
Joined: 2011-7-10 @ 15:15

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-09 @ 02:46

Interesting work on the adaptation for the extender. Would it be simpler to turn off opengl in configure instead of the batch script? If this is true, then these lines would be moved to below where C_OPENGL is detected in configure.ac.
Code: Select all
 
+dnl HX DOS build.
+case "$host" in
+    *-*-cygwin* | *-*-mingw32*)
+    if test x$enable_hx == xyes; then
+   CXXFLAGS="$CXXFLAGS -DHX_DOS"
+        AC_DEFINE(C_HX_DOS,1)
+   AC_DEFINE(C_OPENGL,0)
+    fi
+    ;;
+esac
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby TheGreatCodeholio » 2018-3-09 @ 05:17

Nah, I did it at the build script level instead, which works for me.
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.
User avatar
TheGreatCodeholio
Oldbie
 
Posts: 564
Joined: 2011-8-18 @ 20:15
Location: Seattle, WA

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-09 @ 05:52

My suggestion doesn't work anyways. :( The opengl library is linked to and the related code is still parsed.

I tried your hxdos build and it works great. Is it necessary in your testing to shorten the dosbox-x configuration filename to 8.3 format?
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby TheGreatCodeholio » 2018-3-09 @ 05:58

I will need to shorten the configuration filename, yes. Haven't done that yet.

"YKsoft" on twitter recommends dosbox.ini because the configuration file is very INI like.
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.
User avatar
TheGreatCodeholio
Oldbie
 
Posts: 564
Joined: 2011-8-18 @ 20:15
Location: Seattle, WA

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-09 @ 06:05

Something like this?
Code: Select all
diff -rupN dosbox-1//src/gui/sdl_gui.cpp dosbox-//src/gui/sdl_gui.cpp
@@ -494,7 +494,11 @@ public:
       ToplevelWindow(parent, x, y, 400, 150, title) {
       new GUI::Label(this, 5, 10, "Enter filename for configuration file:");
       name = new GUI::Input(this, 5, 30, 350);
+#ifndef HX_DOS
       name->setText("dosbox.conf");
+#else
+      name->setText("dosbox.cnf");      
+#endif
       (new GUI::Button(this, 120, 70, "Cancel", 70))->addActionHandler(this);
       (new GUI::Button(this, 210, 70, "OK", 70))->addActionHandler(this);
    }
diff -rupN dosbox-1//src/gui/sdlmain.cpp dosbox-2//src/gui/sdlmain.cpp
@@ -139,7 +139,11 @@ extern char** environ;
 
 #define STDOUT_FILE   TEXT("stdout.txt")
 #define STDERR_FILE   TEXT("stderr.txt")
-#define DEFAULT_CONFIG_FILE "/dosbox.conf"
+#ifndef HX_DOS
+# define DEFAULT_CONFIG_FILE "/dosbox.conf"
+#else
+# define DEFAULT_CONFIG_FILE "/dosbox.cnf"
+#endif
 #elif defined(MACOSX)
 #define DEFAULT_CONFIG_FILE "/Library/Preferences/DOSBox Preferences"
 #else /*linux freebsd*/
@@ -2032,7 +2036,11 @@ static void printconfiglocation() {
 }
 
 static void eraseconfigfile() {
+#ifndef HX_DOS
    FILE* f = fopen("dosbox.conf","r");
+#else
+   FILE* f = fopen("dosbox.cnf","r");
+#endif
    if(f) {
       fclose(f);
       show_warning("Warning: dosbox.conf exists in current working directory.\nThis will override the configuration file at runtime.\n");
@@ -2049,7 +2057,11 @@ static void eraseconfigfile() {
 }
 
 static void erasemapperfile() {
+#ifndef HX_DOS
    FILE* g = fopen("dosbox.conf","r");
+#else
+   FILE* g = fopen("dosbox.cnf","r");
+#endif
    if(g) {
       fclose(g);
       show_warning("Warning: dosbox.conf exists in current working directory.\nKeymapping might not be properly reset.\n"
@@ -2233,8 +2245,11 @@ int main(int argc, char* argv[]) {
       }
    }
    // if none found => parse localdir conf
+#ifndef HX_DOS
    if(!control->configfiles.size()) control->ParseConfigFile("dosbox.conf");
-
+#else
+   if(!control->configfiles.size()) control->ParseConfigFile("dosbox.cnf");
+#endif
    // if none found => parse userlevel conf
    if(!control->configfiles.size()) {
       config_file.clear();
diff -rupN dosbox-1//src/misc/programs.cpp dosbox-2//src/misc/programs.cpp
@@ -379,7 +379,11 @@ void CONFIG::Run(void) {
             writeconf(pvars[0], false);
          } else {
             // -wcp without parameter: write dosbox.conf to startup directory
+#ifndef HX_DOS
             if (control->configfiles.size()) writeconf(std::string("dosbox.conf"), false);
+#else
+            if (control->configfiles.size()) writeconf(std::string("dosbox.cnf"), false);
+#endif
             else WriteOut(MSG_Get("PROGRAM_CONFIG_NOCONFIGFILE"));
          }
          break;
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-09 @ 06:21

If the sdl_net static library is missing a getadaptersinfo function, then it may help to add a library to Makefile.am in /dosbox-x/src/: LIBS += -liphlpapi.
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby yksoft1 » 2018-3-09 @ 09:48

TheGreatCodeholio wrote:I will need to shorten the configuration filename, yes. Haven't done that yet.

"YKsoft" on twitter recommends dosbox.ini because the configuration file is very INI like.

My nickname is always in all lowercase letters.
In fact, according to my test even with the menu code and SDL subwindow code intact, Dosbox-X is still working in HX DOS extender only that the SDL window is not in the middle of screen.
User avatar
yksoft1
Newbie
 
Posts: 3
Joined: 2018-3-08 @ 08:59

Re: DOSBox-X branch

Postby yksoft1 » 2018-3-09 @ 09:51

AnnaWu wrote:
yksoft1 wrote:
TheGreatCodeholio wrote:The PC-98 port of "Marble madness" appears to be one (and so far only that I've found) game on the PC-98 platform that uses INT 33h

I've found another one.
Photo Genic by Sunsoft
Clipboard01.jpg


Nice find, yksoft1!

By the way this game requires 5MHz GDC clock.
User avatar
yksoft1
Newbie
 
Posts: 3
Joined: 2018-3-08 @ 08:59

Re: DOSBox-X branch

Postby AnnaWu » 2018-3-09 @ 11:14

yksoft1 wrote:By the way this game requires 5MHz GDC clock.


I sent you a private message.
AnnaWu
Newbie
 
Posts: 43
Joined: 2011-7-10 @ 15:15

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-10 @ 01:30

RE: Move DIB window parent shutdown to SQL_Quit.

I can't decide whether the above commit to fix window focus outweighs the loss of opengl context. :)
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby TheGreatCodeholio » 2018-3-10 @ 01:35

When I made that commit, there was code in DOSBox-X still that liked to shutdown and restart SDL's video subsystem (for reasons that may have something to do with historical SDL 1.x bugs, I guess). Waiting until SDL_Quit to shut down the parent window prevents the parent window from flickering on the screen for each time that is done.

On Windows, doing that would sometimes cause Windows to restore the window behind another application, whenever output=opengl, which is annoying.

I had a similar problem on Linux where if output=opengl, any change including bringing up the mapper would cause the X11 window manager to move the window to the upper left hand corner, no matter how many times I moved it back, which was also annoying.
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.
User avatar
TheGreatCodeholio
Oldbie
 
Posts: 564
Joined: 2011-8-18 @ 20:15
Location: Seattle, WA

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-10 @ 01:41

In my case, the sdl12 async code is leading to the lost window focus, too, but it occurs with other output modes (sdl_driver is windib). I confirmed that your no-async code patch fixes it.

I think the SDL_Quit commit also affects the opengl context, although I haven't tested it again.
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-10 @ 23:55

Misspelled word in bios_disk.h:
Code: Select all
    imageDiskMemory(diskGeo floppyGeometry);
-   imageDiskMemory(imageDisk* underylingImage);
+   imageDiskMemory(imageDisk* underlyingImage);
    virtual ~imageDiskMemory();
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-11 @ 01:05

I think that you once had a question about centering the window (example in Windows):
set SDL_VIDEO_WINDOW_POS=center
set SDL_VIDEO_CENTERED=1
start /B dosbox-x
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-11 @ 10:12

For get_key() in bios_keyboard, the PC98 key counter function is written as available in regular PCs?
Code: Select all
unsigned char b = real_readw(0,0x528);
if (b != 0) real_writew(0,0x528,b-1);
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby TheGreatCodeholio » 2018-3-11 @ 15:24

Not that I'm aware of...

If there is, it's not widely used on the IBM PC platform.

On PC-98 however, implementing the counter is vital because some games and even MS-DOS itself depends on the counter to sense keyboard input.
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.
User avatar
TheGreatCodeholio
Oldbie
 
Posts: 564
Joined: 2011-8-18 @ 20:15
Location: Seattle, WA

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-14 @ 07:53

The reintroduction of the dynamic core may have led to some of the reported errors in dos 32-bit games. The page handler is different, for example. At least they could reproduce any issue with core=normal.

Also, I've been testing your new debugging code and data views in the console. Is there a general guide for which a data view should be selected?
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

Re: DOSBox-X branch

Postby TheGreatCodeholio » 2018-3-14 @ 12:35

You generally want the default "segmented" view provided by the "D" command.

However "DV" (virtual view) and "DP" (physical view) permit alternate ways to view memory in the system.

To summarize:

D seg:off segmented view
DV offset virtual view (linear memory address subject to paging)
DP offset physical view (physical memory address on the bus, not subject to paging)
DOSBox-X project: more emulation better accuracy.
DOSLIB and DOSLIB2: Learn how to tinker and hack hardware and software from DOS.
User avatar
TheGreatCodeholio
Oldbie
 
Posts: 564
Joined: 2011-8-18 @ 20:15
Location: Seattle, WA

Re: DOSBox-X branch

Postby hail-to-the-ryzen » 2018-3-14 @ 14:43

Thanks for the help. I tried to set a breakpoint to the problematic segment:offset location, but the process of debugging with a breakpoint led the page fault error to another location. The original page fault type in kernel32 seems to be from running out of stack memory, possibly from an infinite looping in the game code.

I can't decide if it is simpler to reconstruct the program flow or instead to just invent a time machine and ask the developers to redo their sound code. :)
hail-to-the-ryzen
Member
 
Posts: 245
Joined: 2017-3-09 @ 01:34

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests