DSx86 v0.22

granville

GBAtemp Goat
OP
Member
Joined
Aug 24, 2007
Messages
5,102
Trophies
1
Age
35
Location
Orlando, Florida
XP
3,058
Country
United States
<div align="center"><img src="http://gbatemp.net/news/02_news_image_dslite.png" border="0" class="linked-image" /></div>
<p align=" " class="none"> Yet another new version of the great x86 emulator, DSx86, has been released! Patrick Aalto is a very dedicated homebrew developer and this version contains numerous bugfixes, specifically for the graphical opcodes. The new version also supports almost all CPU opcodes as well. Version 0.22 is cited by the author as being a bit slower than previous versions, but it comes with better compatibility overall. See more lengthy changelog below. </p>
[title:DSx86 v0.22 beta Change Log]
• 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.
[title:DSx86 Future]
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.
So expect some slower progress in the months to come. A job well done to Mr Aalto! He is doing an exquisite job with DSx86!

<img src="http://gbatemp.net/images/download.gif" border="0" class="linked-image" /> <a href="http://filetrip.net/f12426-DSx86-0-22.html" target="_blank">Download</a>
<img src="http://gbatemp.net/style_images/1/folder_post_icons/icon11.gif" border="0" class="linked-image" /> <a href="http://dsx86.patrickaalto.com/" target="_blank">Homepage</a>
 

geoflcl

Permanent GBAtemp Newbie
Member
Joined
Jan 18, 2009
Messages
1,375
Trophies
0
Age
30
Website
loganderb.in
XP
522
Country
United States
I can't tell you how impressed I am with this!

Not that my opinion matters or anything, but it's nice to have a fan, right?
 

dnniwa485

Well-Known Member
Member
Joined
Oct 4, 2009
Messages
458
Trophies
0
XP
13
Country
i wish that DSx86 future update will utilize DSTWO 350mhz CPU and the RAM. (iPlayer doesnt have SDK so i'm not hoping too much on that cart)

DSTWO's SDK is available... so it might be possible to utilize it now.
 

gamefreak94

GBAtemps (Un)Official Illogical Poster
Member
Joined
Jun 1, 2009
Messages
674
Trophies
0
Location
At your window!
Website
Visit site
XP
88
Country
United States
could someone explain to me what this does. I see it is an emulator but for what? Sorry for being a noob.
dry.gif
 

granville

GBAtemp Goat
OP
Member
Joined
Aug 24, 2007
Messages
5,102
Trophies
1
Age
35
Location
Orlando, Florida
XP
3,058
Country
United States
gamefreak94 said:
could someone explain to me what this does. I see it is an emulator but for what? Sorry for being a noob.
dry.gif
It's an x86 CPU emulator, meaning it can play some old DOS games and run some versions of early Windows (like 3.0 and below). In that respect, it is similar to Dosbox on PC. It replicates enough of some early x86 processors to be able to play games and run apps from the 80's and (in some cases) very early 90's. It basically tries to replicate the PC experience back in the 80's and early 90's. On DS of course. Does that help any?
tongue.gif
 

dryganaye

Member
Newcomer
Joined
Jun 29, 2010
Messages
10
Trophies
0
XP
24
Country
United States
I think this guy is incredible and what he's doing is fantastic!
bow.gif


The DS needs more talented and dedicated homebrewers like him.

Props to Patrick Aalto (DSx86) & Frédéric Calendini (The guy who makes the Lone Wolf homebrew games) for keeping DS homebrew rocking!

Looking forward to the next versions.
 

Hyperlisk_

Well-Known Member
Member
Joined
Jan 30, 2008
Messages
187
Trophies
0
XP
102
Country
United States
9th_Sage said:
To think I thought that an emulator like this would never work on the DS.
That's kinda funny, since it's no different from, say, a SNES emulator
tongue.gif


Regardless, it's definitely some great work. I can imagine the fun he has coding it. I love making VMs and such, and I'm sure he loves it too.
 

Killermech

Cookie Monster
Member
Joined
Mar 5, 2004
Messages
1,809
Trophies
0
Website
Visit site
XP
274
Country
One of my favorite projects and I love Patrick for it. I really hope he considers giving the DSTWO SDK a try to see how powerful the emulator could actually get
biggrin.gif
 

EpicJungle

stop browbeating me can't you see i'm sexy
Member
Joined
Aug 28, 2009
Messages
1,002
Trophies
1
XP
366
Country
Canada
Yay!

It plays Hugo: House of Horrors.. Have great memories of it
tongue.gif


Since I've never used this before, what type of files does it run...? And if legal can you give me a link to that kind of file :|
Cause if I try to download a DOS game, it comes with a lot of files :|
Or... do I have to use the .exe file..?
 

Innkeeper

Member
Newcomer
Joined
Jul 13, 2010
Messages
8
Trophies
0
XP
2
Country
United States
Im not that smart in terms of emulation, but can this emulate the old elder scrolls games(arena and daggerfall)?
thanks
 

phoenixclaws

Well-Known Member
Member
Joined
Oct 10, 2007
Messages
497
Trophies
0
Age
40
Location
USA
XP
203
Country
United States
You should read his blog.

He has updated it weekly, every Sunday so far, without fail. And he is working on understanding/porting the code for DSx86 with the SDK for the SCDSTWO and hopefully will port it over without much problem.

He is considering to support at least the 386 instructions and possibly the 486 instructions. We'll see how that all pans out
biggrin.gif
. If all goes well we will see a DS2x86 for the SCDSTWO.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: "Impossible he memorized every book on the planet..." +1