Nintendo DSX86 v0.22



This version has the refactored internals, so it most likely runs some (if not all) games slower than the previous versions. It does however now support practically all real-mode 286 CPU opcodes (not including JPE and JPO which require game-specific hacks), and also unsupported graphics opcodes should now be quite rare. The graphics opcodes are now reported as Unsupported EGA opcode or Unsupported Mode-X opcode, and unlike in previous versions, you can continue after such an opcode using the B button. However, it is likely that you will get the same error again and again, so please send me the log file if you encounter unsupported graphics opcodes. If you get a plain Unsupported opcode error, it most likely means that the program is executing data instead of code, so something has gone wrong in the code before this happened, and thus it is not possible to continue running the program. Again, I am interested in the log files produced in these situations.

Besides the refactored internals, this version has various other fixes, based on many games and other programs I have been testing. Here is a list of the programs I tested, and the changes made into DSx86 or other information about why the program fails to run properly.

Alcatraz, Terminator 2 - Judgment Day, Prehistorik and SimFarm all had various palette problems. I debugged each of these, and noticed that they each failed for different reasons, so in the end I decided to rewrite the 16-color palette handling in DSx86 completely. Now at least those games have correct palettes, so hopefully this change fixes the other games with palette problems as well. The palette handling is still not completely correct, as only the first 64 palette registers are supported in 16-color modes. This is OK for EGA emulation, but some VGA games might use special palette tricks that might still fail.
B.A.T. 2 was freezing. This was caused by the game trying to detect AdLib using Timer 2, while I have only emulated Timer 1 behaviour (and even that one pretty badly). I improved the AdLib timer behaviour, but they still don't work properly. I have run out of Nintendo DS hardware timers, so I need to figure out a way to combine some of the existing timers or use the ARM7 timers from the ARM9 side for some less critical timing operations. In any case B.A.T. 2 now does not freeze, but it seems to run some parts of the intro far too fast. I also found and fixed a problem in the 640x480 mode blitting code when testing B.A.T. 2.
Battle Chess 4000 is reported on the compatibility list as crashing after moving a cursor, however moving the cursor seems to work fine for me, both in D-Pad and touchpad mouse mode. So, I can not debug the possible problem.
The Clue! has been on the compatibility list for a long time, so I finally decided to look into it. I found out that the crash is caused by a bug in the game. The game checks whether the system has an XMS memory driver, and stores the call address of the driver if it has. However, if a driver is not found, it still tries to call the driver, which then causes a null pointer call. I verified this behaviour in DOSBox by making it report no XMS driver, and the game crashed in DOSBox as well. So, this game won't work until I implement XMS memory handling.
Curse of Enchantia hang in 0.21. This was caused by a bug in my refactored CMPSW opcode. I fixed that opcode and Curse of Enchantia began to work properly again.
Darkseed uses an internal flag in it's timer INT8 handler to prohibit re-entrance of the interrupt routine. However, it calls the BIOS INT8 routine with interrupts enabled, so it is possible that the next timer interrupt will happen at this phase, and if it does, the game does not perform an End-Of-Interrupt handling properly. This caused DSx86 to stop sending new timer interrupts, causing the game to hang. I fixed this by turning interrupts off in the BIOS INT8 handler before reporting the End-Of-Interrupt, so a new timer interrupt can not happen until the code has returned from the interrupt handler completely. This seemed to fix the Darkseed hanging problem.
Jazz JackRabbit and Tyrian 2000 began failing with a "At least a 286 processor needed" error in 0.21. I found out that Windows 3.00a only uses one protected mode opcode to differentiate between a 286 and 386 processors, so I implemented that opcode and reverted back to the original 286 CPU behaviour, so these games should now detect a 286 processor again.
Maupiti Island behaves somewhat strangely. Running the maupiti.bat it first runs maupan1.exe, which basically just reserves all memory and then returns with a Terminate-and-Stay-Resident call. However, since it has reserved all memory, there is no room for 4DOS to load itself back from the EMS swap, and thus 4DOS crashes with a memory error. Not running the maupiti.bat but running the start.com directly performs an INT F2 call (which probably would be handled by the TSR program), so it crashes when the TSR program does not exist. This I need to debug further to see if it really is incompatible with 4DOS or if DSx86 does something wrong.
Nomad I quickly debugged and saw the graphical glitches, but did not have time to work on it any further. It is on my TODO list now, though.
Princess Maker 2 seems to work fine, even though it is reported as crashing with an unsupported opcode. I could not get it to crash in version 0.21 either.
Raiden had a couple of problems, it uses the VGA Mode-X VRAM as a continuous wrap-around screen area (same as what Commander Keen does in EGA mode), which was not properly supported. I fixed this, so there should be no flashing scanlines any more (this same problem was probably in Alien Breed as well, but I haven't tested that). Another problem in Raiden is that it wants to use the horizontal smooth scroll (like Supaplex etc do in EGA mode), which again is not yet supported in Mode-X. This problem I will try to fix in the next version.
Return of the Phantom crashes after the intro. It also shows garbage on the screen when it crashes. I did not have time to debug this further, but it is now on my TODO list.
Return to Zork is reported to fail in the VGA detection, but I could not even get it to run that far before it ran into a 386 opcode. Perhaps I have a wrong version of the game.
Robocop gives an unsupported INT call. It attempts to use the BIOS - SET EVENT WAIT INTERVAL (AT,PS50+) call, which is not yet supported in DSx86. I would like to add support for that, but this again would need another hardware timer, so I need to do some hardware timer combining to support all these additional PC timers.
Shadows Over Mordor uses a JPE opcode, and in such a way that it is impossible to code a hack for it into DSx86. So, this game will sadly go to a list of games that will not run in DSx86, most likely not ever.
SimFarm is reported to give a "Sound hardware not found" error. I could not get this error to happen, when using "SoundBlaster 2.0" setting for music and digital effects. DSx86 emulates SoundBlaster 2.0 (not Pro), so if the game offers several SoundBlaster options, use that setting.
Sleepwalker is reported to give an unsupported opcode at startup, but I could not get that to happen. I played it for a little bit, and noticed that it attempts to set a tweaked screen mode with less than 200 rows, the bottom rows of which show as garbage in DSx86. This does not affect gameplay, but I'll see if I can get rid of this problem in the upcoming versions.
Superhero League of Hoboken performs a null-pointer call, which results in an unsupported opcode. This I did not have time to debug further, but it is now on my TODO list.
Tanx crashed with unsupported port I/O error. The game wanted to setup the programmable interrupt contoller into Auto-EOI mode, which was not supported. I added support for this mode, so the game should not crash any more.
Windows 3.00a. I checked what it requires from the EMS driver, and added the required features, and got it to use EMS memory. However, I had to comment out these changes in the end, as it looks like Win 3.00a wants to execute the programs directly in the EMS memory block, and this is not supported in DSx86. Adding support for running code in EMS memory window would slow down all real-mode code execution, so I don't want to do that. Instead, I am looking into the possibility of adding proper protected mode support at some point. So, no change in the Windows 3.00a behaviour in this version.
Wizardry 6 is supposed to crash with an unsupported opcode on the title screen, but I could not reproduce this. It seems to run fine, also in the 0.21 version.
This was the last week of my summer vacation, so after today it is back to the normal slow progress with DSx86. I won't have much time to work on DSx86 during weekdays, so I can not get all that much done during each two-week period. I am glad I got the internal refactoring done during my summer vacation, though, as that was quite an extensive change. I had to change pretty much every single opcode that I have been spending the last year coding.

Subscribe for Latest News