<b>Coding History</b>:
Q: What age did you get interested in computer programming?
A: It was in the early 80's, so I think I was around 15 years old. My first computer was a VIC-20 that my dad got me as a Christmas present.
Q: What was the first programming language you used?
A: Basic. After I had learned that, I actually started programming also in 6502 byte code, as I did not have an assembler for VIC-20.
Q: Are you a self taught computer programmer?
A: I am self-taught, but I also have a degree in Computer Science. The bulk of my knowledge I have certainly learned myself.
Q: What was the first application or game you programmed?
A: The absolute first game I programmed I just typed in from the VIC-20 manual, but the first game I was proud of was a sort of “Lunar Lander” game for VIC-20, which used a zone of high-resolution graphics on an otherwise text-mode screen and was coded mostly in 6502 byte code, with only a little Basic code to "poke" the byte code into the vast 3.5KB of RAM it had. :-)
Q: What currently is your favorite programming language?
A: I am most fond of Assembler, and have been that way ever since the VIC-20 times. I like to know exactly what the CPU does when it runs my code, and I am also a performance freak, shaving a few cycles off from a code that already works is very satisfying for me. Coding in Assembly is more time-consuming than coding in higher-level languages, so I usually fall back to C for less time-critical routines, though. However, I hate the C++ syntax. :-)
<b>DS Coding</b>:
Q: How long have you been coding for the Nintendo DS?
A: I started by porting my LineWars II game, I think it was in May 2009. So, almost a year and a half now.
Q: What got you interested in NDS Coding?
A: A friend of mine showed me his new Nintendo DSi, and said that there is a homebrew community for it, and suggested (half-jokingly) that I should port my old LineWars II game for it. I did not have any other hobby project going on at that time, so I got interested in the idea of coding for a handheld device, and having again to think about CPU and RAM constraints. I find it quite boring coding in these modern managed languages where you (supposedly) don't need to worry about performance or memory consumption at all. What fun is that?
Q: What Web sites would you recommend for up-and-coming NDS Homebrew developers?
A:<ul><li><a href="http://libnds.devkitpro.org" target="_blank">http://libnds.devkitpro.org</a></li><li><a href="http://nocash.emubase.de/gbatek.htm" target="_blank">http://nocash.emubase.de/gbatek.htm</a></li><li><a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0100i/index.html" target="_blank">http://infocenter.arm.com/help/index.jsp?t...100i/index.html</a></li></ul>Q: Do you find the NDS to be limited in anyways, if so what are they?
A: Screen resolution and CPU power. Those limit the possibilities quite severely, especially on the emulation front.
Q: What programming experience do you recommend to up-and-coming NDS Homebrew developers?
A: Without any experience in C language programming you will have a hard time getting started.
Q: What programming language(s) does the DS support?
A: At least C, C++ and ARM ASM. Probably others as well, but those have been enough for my needs.
Q: What tools are required for DS programming?
A: DevkitARM and libNDS, at least. I have been using Programmer's Notepad 2 which comes with the libNDS distribution, but any text editor will work.
Q: Do you find the small amount of RAM on the DS to be problematic and require a work-around?
A: What small amount of RAM?! :-) DS has 4MB of RAM, that is plenty of RAM! I still remember working on VIC-20 with 3.5KB of RAM, and later on PCs with 640KB of RAM, so 4MB is a lot!
Q: Do you find the CPU of the DS to be problematic and require a work-around?
A: No, I think the ARM processor that DS has is a very nice architecture to work with. It is simpler than x86, but still has sufficient features to do rather complex operations in a few ASM commands.
<b>DSx86/DOS</b>:
Q: Why did you decide to begin working on DSx86? How did DSx86 begin? What prompted your desire to code it?
A: After I had finished LineWarsDS (or actually even before it was completely finished) I decided I wanted to code something for NDS with the ARM assembly language. I had coded in x86 (which is a CISC processor) ASM, so I was interested in learning how the ASM of a RISC CPU differs from it. I also had never coded an emulator but have always been intrigued by emulators, so I began looking for emulators that nobody had yet coded for NDS. Somewhat to my surprise NDS still lacked an x86 emulator, and the general consensus seemed to be that an x86 emulator would not run fast enough to be useable on NDS. I thought this provided a sufficient challenge to keep me interested in it, and if all went well, to prove the general consensus wrong. :-)
Q: What are the ultimate goals of DSx86 as a project?
A: For me personally, the ultimate goal is to learn exactly how an x86 PC system works, and how to create an emulator for it on a different architecture. I also want to learn why some design decisions work and others don't when making an emulator.
Q: Will DSx86 ever be "complete"?
A: Probably not. :-)
Q: Does DSx86 surprise or disappoint you at times? If so will you provide an example?
A: It frustrates me quite often, when I think some things should work but they don't. The debugging tools, especially for the SCDS2, are also next to non-existing, so it sometimes takes days to find a simple bug in my code.
Q: How often do you take some time to enjoy your emulator?
A: I enjoy coding it, not so much actually using it. :-) I suck at games in general, I don't have the reflexes needed. I always feel I could spend my time more productively than playing games, so I don't spend a lot of time playing games on DSx86.
Q: What are your favorite DSx86 supported DOS games/applications?
A: I like how my AdLib emulation sounds on DSx86, so I guess my favorite applications are games that make the most out of the AdLib sounds. I sometimes just let the game play music while I daydream about new features to add or things like that. :-) For example GODS, Silpheed and many Sierra games have nice music.
<b>DSx86 Specific</b>:
Q: What exactly is DSx86 doing, what does it support, what does it emulate, etc?
A: Currently DSx86 emulates a 80186 processor (which is almost like a 286 processor, except that it does not have the protected mode features), VGA graphics card, SoundBlaster 2.0 sound card (with both digital audio and FM audio). Also keyboard and mouse input is supported.
Q: What are the OP codes we hear so much about in relation to DSx86?
A: As Wikipedia says <a href="http://en.wikipedia.org/wiki/Opcode" target="_blank">opcode</a> (short for "operation code") is part of the (possibly) multi-byte machine language instruction of a processor. The x86 architecture, being a CISC processor, has varied machine instruction lengths. The byte that actually determines the operation to be performed is the opcode, although in my blog posts I have sometimes used the word opcode to mean also some of the other bytes in the instructions. In any case when an opcode is not supported by DSx86, it means that I have not yet coded the handling for this specific machine instruction into DSx86.
Q: What type of sound cards are supported?
A: The main sound card that DSx86 supports is Sound Blaster 2.0. That means that only mono digital sounds are supported, and also the FM audio part is mono (although I fake it to sound stereo by panning the different audio channels somewhat off-center). The CPU power needed for the one digital audio and 9 FM audio channels is pretty close to what the secondary ARM7 processor in NDS is capable of, so I can not easily add support for more advanced sound cards. DSx86 has an experimental support for Covox/Disney Sound Source audio device, but it does not sound very good and should only be used if the game does not support Sound Blaster.
Q: What resolutions are supported?
A: The text modes 40x25 and 80x25, graphics modes 320x200, 640x200, 640x350 and 640x480, plus some tweaked modes like 320x240 and 320x480 are supported. Some rarely used graphics modes are still unsupported, but the supported modes cover all the normally encountered resolutions.
Q: How long do you spend tracing down bugs and working on DSx86 per week, in general?
A: Mostly I work on DSx86 on the weekends, and I sometimes spend up to 8 hours per day both on Saturday and Sunday. Usually only about 5 or 6 hours, though. On weekdays (when I am not on vacation) I can only spend about an hour or (rarely) up to 2 hours on it. So, perhaps around 20 hours per week.
Q: What are the limitations of DSx86 on the DS?
A: The emulation speed is equivalent to about 12MHz 80286, and no protected mode or 386 and higher processors are supported, so only the older DOS-based games will run. Windows 3.00a can be run, but as it runs only in real mode, it is not all that useful. Windows 3.11 and later will need protected mode, so they won't run in DSx86.
<b>DSx86 SCDS2/SCDS2 SDK</b>:
Q: What is the official name of this project?
A: I call it DS2x86.
Q: What is the future of DSx86 when ported to the SCDS2?
A: I plan to keep updating both DSx86 and DS2x86.
Q: What additions will be added to the emulator? (sound, video modes, CPU, etc)
A: DS2x86 will support at least a 386 processor, including protected mode. It could have access to up to 28MB of RAM. If I can get DS2x86 to support Windows 95, then I would like to add a 640x480 Hi-Color (16-bit colors) video mode. On the sound side it looks like I will need to re-code all the sound routines, so it would be more interesting to add some new sound cards instead of coding the same Sound Blaster support again. My test program uses Gravis Ultrasound, so I might add support to that first. Then of course it would be very cool to add Roland MT-32 support, but that might take more CPU power than I can afford. Also, the needed ROM sound banks are not publicly available so that would be problematic.
Q: What are the benefits of coding for the SCDS2's on-board CPU and RAM?
A: SCDS2 has a much more powerful CPU. The MIPS processor it has can run in various speeds between 120MHz and 396MHz. Based on my first speed tests, at the fastest speed DS2x86 would run at about the speed of a 386/33 machine. Also, 32MB of onboard RAM is sufficient for pretty much all software that can reasonably be assumed to run. Even Windows 98 only needs 16MB of RAM!
Q: How is the SCDS2 SDK? Is it easy to use, easy to understand, well organized, etc?
A: I think the SDK is somewhat limited, and it has had some annoying and frustrating bugs. It keeps getting better, though, and the bugs we testers find are getting fixed. It is not especially difficult to use, but I think it goes a bit too far in trying to abstract the underlying hardware away.
Q: What would you do to better the SCDS2 SDK?
A: I would like some lower level access and functions in addition to the current very high level functions for graphics and audio data sending to the NDS side. I also especially would like the possibility to code something for the ARM processors as well as the MIPS processor.
Q: What limits does the SCDS2's on-board CPU/RAM have in regards to DSx86?
A: I think the biggest drawback in the SCDS2 architecture is the limited graphics and audio support. You can only have 16-bit graphics, and 16-bit stereo audio (originally only 44.1kHz, but in the latest SDK beta you can use also 22kHz and 11kHz audio formats). I would prefer a 256-color palletized graphics and mono 8-bit audio, as those would be closer to the hardware I am trying to emulate.
Q: What benefits does the SCDS2's on-board CPU/RAM have in regards to DSx86?
A: The biggest benefit is the added CPU power, which allows me to support 386 processor, and the large amount of RAM it has.
Q: Is it possible to incorporate more DSx86 "zoomed" resolutions with the use of the SCDS2's onboard CPU? Thus allowing for graphics which fit the screen with fonts that can be more easily read?
A: Yes, this should be possible. The 16-bit color graphics should allow smoother scaling with proper linear interpolation of the pixels.
Q: When will DSx86 for SCDS2 be released?
A: Who knows? :-) I would like to get an alpha version released this year, but I think it should have some notable improvements over the current DSx86, else there is not much point in releasing it. I think the first version will still be in many ways more limited (probably no AdLib audio, for example) than the current DSx86, but if it could run some 386 or protected mode programs, that might be a good enough reason for releasing it.
<b>General Questions</b>:
A: What do you like to do in your down time?
Q: When I am not coding? Just the usual, I like to watch movies (I have a home theater system with Blu-Ray capability), read books (though I have rarely had time for this since starting DSx86), and I also play volleyball (which is my only physical activity).
A: What coding plans do you have after DSx86?
Q: Before I learned about SCDS2, I wanted to study the possibility of porting DSx86 to Symbian OS for mobile phones. I currently have no specific plans, but I would also like to be able to code something for Nintendo 3DS. I hope it will have a homebrew capability at some point.
A: What is the official homepage of your projects?
Q: <a href="http://dsx86.patrickaalto.com/" target="_blank">http://dsx86.patrickaalto.com</a>, see also <a href="http://linewars.patrickaalto.com/" target="_blank">http://linewars.patrickaalto.com</a>
A: Is there anyway users can get involved and help?
Q: I would appreciate if the DSx86 users would take a look at the <a href="http://dsx86compatibility.pbworks.com/Compatibility-List" target="_blank">Compatibility List</a> and update it with the games and other applications that they have tested on DSx86. There are quite a few games there that have only been tested in very old versions, so if you happen to test the games on the most recent versions, feel free to update the status! I have decided not to update that list myself, as I am busy with coding DS2x86 and I think the list will be more objective if I let you the users decide whether some game or application works well enough.
Q: Do you accept donations, how can users help?
A: Yes, there is a Donate button on my pages at <a href="http://dsx86.patrickaalto.com/" target="_blank">http://dsx86.patrickaalto.com/</a>. However, donating is not required or necessary, as this is just my hobby project and not a money-making project.
Thanks for your interest in DSx86!
Patrick "Pate" Aalto