VOGONS

Common searches


DOSBox-X branch

Topic actions

Reply 1420 of 2403, by AnnaWu

User metadata
Rank Newbie
Rank
Newbie
yksoft1 wrote:
I've found another one. Photo Genic by Sunsoft […]
Show full quote
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!

Anna's Playground for QMC2
Official MESS Forum

Reply 1421 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

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.

 
+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

Reply 1422 of 2403, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 1423 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

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?

Reply 1424 of 2403, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 1425 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

Something like this?

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");
Show last 17 lines
+#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;

Reply 1427 of 2403, by yksoft1

User metadata
Rank Newbie
Rank
Newbie
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.

Reply 1428 of 2403, by yksoft1

User metadata
Rank Newbie
Rank
Newbie
AnnaWu wrote:
yksoft1 wrote:
I've found another one. Photo Genic by Sunsoft […]
Show full quote
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.

Reply 1431 of 2403, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 1432 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

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.

Reply 1433 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

Misspelled word in bios_disk.h:

 	imageDiskMemory(diskGeo floppyGeometry);
- imageDiskMemory(imageDisk* underylingImage);
+ imageDiskMemory(imageDisk* underlyingImage);
virtual ~imageDiskMemory();

Reply 1435 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

For get_key() in bios_keyboard, the PC98 key counter function is written as available in regular PCs?

unsigned char b = real_readw(0,0x528);
if (b != 0) real_writew(0,0x528,b-1);

Reply 1436 of 2403, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 1437 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

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?

Reply 1438 of 2403, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

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.

Reply 1439 of 2403, by hail-to-the-ryzen

User metadata
Rank Member
Rank
Member

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. 😀