PDA

View Full Version : DSx86 News - Dos Emulator for DS - More DOS work & AlleyCat



wraggster
December 6th, 2009, 21:26
Pate has posted more WIP News of his work on a dos emulator for the Nintendo DS:


This weekend I finally had more time to work on DSx86. The biggest new feature I added this weekend was a proper FAT directory handling (DIR and CD commands on the DOS prompt). I also fixed the new process launching and returning to the parent process when the child process exits. There were also some missing features in the memory allocation routines, which now should be pretty much complete.

I got a bit bored working on the DOS internals for the last three weeks, so I took some time off from that work and looked into supporting AlleyCat. I had to add quite a few new modrm bytes for the opcodes that AlleyCat uses, and also the simple CGA support I added for Paratrooper was far from good enough for AlleyCat. The CGA support is still missing some important features and has some bugs, but I managed to get AlleyCat working for a little while, until it hits an unsupported CGA string instruction.


The DOS kernel now supports the most important features for launching games from the SD card, so a first alpha-version release of DSx86 is now much closer. I have a two-week Xmas vacation starting on the 21st, and my current plan is to get the first working version of DSx86 released during my Xmas vacation. That might still change if I run into some major problem in the code, but at least that is the plan. The biggest missing features that I still must add before I can release it are the following:

Screen scaling/scrolling support.
Support for Ctrl and Alt key combinations. Currently only Shift is supported.
Nintendo DS key mapping support (mapping a DS key to a PC key).
Support for the missing file I/O features (like writing to a file).
In addition, there are a lot of bugs and partially supported features that I would like to fix, but I think these are not absolutely mandatory for the first release:
DOS prompt uses the DOS stdin functions, which I have now hardcoded to use the keyboard. However, my keyboard emulation is not fully compatible with the way stdin is supposed to work. Some keys cause weird behaviour, but the most important keys seem to work.
The text mode hardware cursor is only partially supported, and leaves old cursor images around the screen when moving the cursor.
A vast number of modrm bytes for the partially supported opcodes are still missing. This basically means that only the specifically supported games are likely to work. I am completing these all the time, but it will take months and months to add them all.
The code for the screen handling (both MCGA and CGA) is very ugly, basically a collection of special cases with no internal logic to them. I eventually need to rethink and recode much of this code.
AdLib emulation code is still very buggy and sounds pretty bad.
The internal DOS emulation is still far from complete, but most of the missing features are not very likely to be used in games.
There are a lot of places that could use some more optimization. I have ideas for quite a few optimizations, I just haven't had time to work on them yet.

Btw, December 6th is the independence day of Finland. Happy Independence Day!

http://dsx86.patrickaalto.com/

Mr.Peanut
December 7th, 2009, 00:53
I can't believe the DS can emulate an x86! Another public domain dos game is Begin: http://hallert.net/misc/begin/begin.html I would love to be able to play this on my DS!

LDAsh
December 7th, 2009, 07:58
This runs pretty well actually, for the game it demonstrates there's even some 3D in there. The v-sync tearing is a little annoying (please let this be a configurable option for users!), but I think there's great hope for a lot of classic DOS games to run beautifully with this.

Can't wait for a release that can run EXEs/COMs from FAT. (assuming that's how it would work)

F2bnp
December 7th, 2009, 09:03
So the DS is close to emulating a 8086/8088 machine?

Wow that's...kinda useless sadly :(
But still impressive nonetheless.

Sonny_Jim
December 7th, 2009, 12:51
It's not really that useless, that's like saying that GB emulators are useless when we have GBA emulation.

There's plenty of old pre-386 games that people would love to see on the DS, just checkout the amount of requests on the gbadev.org thread.

wraggster
December 7th, 2009, 13:20
i personally cant wait to see how this progresses, theres a lot of old classics that would be awesome if fully playable on the DS

Flygon
December 8th, 2009, 08:37
Honestly, I'd probably explode with joy if 16-bit Windows applications were emulatable.

But a man can only dream of playing Civilization II on the move, I doubt the DS would have the power for Windows apps (That, and Microsoft would probably have a fit =p).

On the other hand, what is done here is just absolutely spiffing. I await progress.

crookedmouth
December 11th, 2009, 02:19
So the DS is close to emulating a 8086/8088 machine?

Wow that's...kinda useless sadly :(
But still impressive nonetheless.

Why do you say useless?