Jump to content
IGNORED

DS99/4a - Emulator for the DS/DSi


wavemotion

Recommended Posts

So to add to the growing list of Emulators under my care... I'm working on a TI99/4a emulator to run on the Nintendo DS/DSi.

 

Updates for this are always on Github:  https://github.com/wavemotion-dave/DS994a 

 

As with my Atari, Colecovision and Intellivision DS emulators, it requires a DS with R4 flashcart or a DSi (highly recommended) or (even more highly recommended) DSi XL/LL running something like Twilight Menu or Unlaunch. With the DSi and above you will have access to more memory and a 2X CPU that will run anything you throw at it (though 98% of the games run fine on an older DS/DS-Lite with flashcart).

Features :

  • Cart loads up to 512K Banked (+40K of GROM unbanked)
  • 32K RAM Expansion
  • SAMS 512K memory Expansion for the DS and 1MB for the DSi (and above)
  • Save and Load State
  • High score saving for up to 10 scores per game
  • Full mapping of any of the 12 DS keys to any combination of TI Joysticks/Keyboard
  • Disk Support of 90K and 180K using the standard TI Disk Controller (you need 994adisk.bin - see BIOS files below)
  • No Speech Synth yet (but games requiring the Speech Synth will run/play - just no voice)

 

 

image.png.977074f49a53d7b6a52c8343e8821f1a.png

image.png.c016b4e19da77715a1c80811865d0048.png

image.png.f8bcfb0fecf7f079c16836b88ef142d5.png

 

image.thumb.png.561dd3f7214085aa5d2de2a175b7d627.png

  • Like 26
Link to comment
Share on other sites

I use the Pokey DS Atari 800 emulator on my DS and always thought how nice it would be to have a TI-99/4a emulator with the same Keyboard/Screen/Joystick concept !

 

Mapping Joystick 1/2 to the D-Pad should be configurable.

 

I can't wait to test it!

 

 

  • Like 2
Link to comment
Share on other sites

3 hours ago, SteveB said:

I use the Pokey DS Atari 800 emulator on my DS and always thought how nice it would be to have a TI-99/4a emulator with the same Keyboard/Screen/Joystick concept !

 

Mapping Joystick 1/2 to the D-Pad should be configurable.

 

I can't wait to test it!

I'll have plenty of configuration options. Plus load/save state.

Be sure to check out my XEGS emulator on the DS - although it's named after a cart-based system, it's a full implementation of the Atari 800 with all the peripheral and memory expansions... 

 

3 hours ago, TheMole said:

Very cool! Is this a completely new emulator, or a port of an existing one?

It's based partially on ColecoDS as the TMS9918 and TMS9919 chips are basically implemented in that emulator... I got the TMS9900 CPU core from TI99Sim though I had to heavily modify it to run fast enough on the venerable DS handheld. TI99Sim also had a non-restrictive license and I didn't want to deal with restrictions (my programs will always be free to use, and source can be used/modified/tweaked by anyone at anytime for any purpose). 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, llabnip said:

I had to heavily modify it to run fast enough on the venerable DS handheld.

What techniques did you use to get it fast?  I'm working on my own 9900 CPU emulator and am also trying to make it very efficient.  Speccery also has an MIT-licensed emulator that he optimized for running on the 32Blit handheld dev console.

 

So to run your emulator on a DS Lite, I would need a R4 card?

Edited by PeteE
  • Like 3
Link to comment
Share on other sites

27 minutes ago, PeteE said:

 

So to run your emulator on a DS Lite, I would need a R4 card?

A R4 card is the easy/fast way on DS/DSLite to run homebrews. Not sure if now it's possible to install a CFW on DS/DSLite. The best source of information to check is the https://gbatemp.net/ site. Anyway if you can get a R4, it's surely the safe, fast and easy way to run homebrews on such platform.

 

Edited by tmop69
  • Like 1
Link to comment
Share on other sites

The R4 is the easiest way ... but it will only run at the stock 67MHz CPU of the original DS. This is true even if you run an R4 on a DSi or DSi XL/2DS/3DS. Those machines have a DSi compatible ARM9 running at 2X the speed... 134MHz. 

 

The 7 emulators I work on for the DS will all run on a stock DS but not every game will be full speed. For example, on the Atari 2600, the new ARM assisted games (DPC+ or CDF/J/+) will require running at 2X on the DSi or above. The only way I know of to unlock that speed is to run custom firmware - either Twilight Menu++ or Unlaunch via the SD card (no R4 card is needed for the DSi or above... just some crummy old SD card with the right custom firmware will do the trick).

 

My strongest recommendation is the DSi XL which has a slower LCD refresh and holds on to pixels a bit longer... almost simulating the phosphor fade of a TV. I have a blend mode that approximates it but it uses 15% CPU bandwidth to perform that magic... the DSi XL with a 2GB card will play more than 10,000 8-bit classic games for the Atari 2600, 5200, 7800, Intellivision, Colecovision, MSX, Spectravision ... and soon the TI99/4a :) 

  • Like 5
Link to comment
Share on other sites

1 hour ago, PeteE said:

What techniques did you use to get it fast?  I'm working on my own 9900 CPU emulator and am also trying to make it very efficient.  Speccery also has an MIT-licensed emulator that he optimized for running on the 32Blit handheld dev console.

One big change is that I pre-decode all 65535 possible opcode combinations into a fast array so I can just bullet-fast look up what op to perform. Saves me from having to do a binary look-up or switch statement.  I don't have to parse the opcode looking for the right set of instructions to call. It wastes 256K of memory but I've got more memory than CPU bandwidth at present.

 

The DSi at 134MHz is running everything full speed... the DS is still struggling a bit... 50 fps on simple games (think: TI Invaders) but more optimization will undoubtedly get most games running fast enough. 

 

Speech will be another matter... that will probably require the DSi.

 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

First public Alpha 0.1 is available: https://github.com/wavemotion-dave/DS994a 

Don't expect much... but in general this is what I got working as of last night:

  • Basic TI 99/4a emulation - 95% of commercial games run.
  • Bank Switching up to 64K ROM (I'll work on expanding this soon)
  • 32K RAM Expansion is working
  • Save State and Load State is working so you can save your progress in games
  • Full mapping of any of the 12 DS keys to any combination of TI joysticks (P1 or P2) and keyboard keys... makes playing Tunnels of Doom easy when the d-pad is directed to the ESDX keys.
  • No Speech Synth yet
  • No Disk or Cassette yet


That means if you want to run Tunnels of Doom (and you should!), you would use the ToD Hacks found on AtariAge (and elsewhere) that are designated for SSS/FinalGrom99 use. These will load up without a cassette interface. You can use Save/Load state to save and restore progress of your game.

And a word of warning for DS users... this thing is a bit slow. On a DSi or above running Twilight Menu or Unlaunch to gain the full 2X CPU, it will generally operate at full frame rate. On the DS-Lite/Phat (or when running from an R4 card which doesn't unlock the faster CPU) you will be on the struggle bus. Optimization comes later... for now it's just getting the basics to work.

Please look at the readme file. You will need two (not supplied) TI Console ROMs. They should be easy to find... place them in /roms/bios on your SD card.

If anyone manages to get this to run... I'll be pleasantly surprised image.gif.4ab7d551ecba8f439e364e1a02055cef.gif

ROMS are weird for the TI-99... there are 'C', 'D' and 'G' plus some flat full-load binaries. When picking games - you generally pick the 'C' version of the ROM or the flat/full-load binary. The system should auto-find the related files.

This is a very early alpha... it will improve!


image.thumb.png.ff545dfb7924f891d6e6f87a32bcf1b9.png

Enjoy!

Edited by llabnip
  • Like 3
  • Thanks 4
Link to comment
Share on other sites

On 1/3/2023 at 5:03 PM, llabnip said:

So to add to the growing list of Emulators under my care... I'm working on a TI99/4a emulator to run on the Nintendo DS/DSi.

 

It's mostly working... no Speech Synth yet but otherwise it's functional. I have a lot of cleanup to do before releasing more formally but here is a game of ToD in progress. I've mapped ESDX to the left D-Pad so it's simple to navigate through the dungeon.

 

I'm hopeful to have a release of this out by end of January. As with my Atari, Colecovision and Intellivision DS emulators, it requires a DS with R4 flashcart or (highly recommended) a DSi or (even more highly recommended) DSi XL/LL running something like Twilight Menu or Unlaunch.

 

image.thumb.png.ff477e72e3a0db3a31d3a117db6f61ed.png

(my DS LCD pics tend to have those swirly lines but they are not visible when looking/playing ... some artifact of the picture taking)

 

Sorry for the impending dumb question, but I have a modded 3DS with Twilight Menu on it.  Will I be able to run this emulator on it?  Additionally, will your other emulators run on a 3DS?  Just wondering as I have recently rediscovered the TI and want to explore it a bit further.

  • Like 3
Link to comment
Share on other sites

1 hour ago, llabnip said:

First public Alpha 0.1 is available: https://github.com/wavemotion-dave/DS994a 

Don't expect much... but in general this is what I got working as of last night:

  • Basic TI 99/4a emulation - 95% of commercial games run.
  • Bank Switching up to 64K ROM (I'll work on expanding this soon)
  • 32K RAM Expansion is working
  • Save State and Load State is working so you can save your progress in games
  • Full mapping of any of the 12 DS keys to any combination of TI joysticks (P1 or P2) and keyboard keys... makes playing Tunnels of Doom easy when the d-pad is directed to the ESDX keys.
  • No Speech Synth yet
  • No Disk or Cassette yet


That means if you want to run Tunnels of Doom (and you should!), you would use the ToD Hacks found on AtariAge (and elsewhere) that are designated for SSS/FinalGrom99 use. These will load up without a cassette interface. You can use Save/Load state to save and restore progress of your game.

And a word of warning for DS users... this thing is a bit slow. On a DSi or above running Twilight Menu or Unlaunch to gain the full 2X CPU, it will generally operate at full frame rate. On the DS-Lite/Phat (or when running from an R4 card which doesn't unlock the faster CPU) you will be on the struggle bus. Optimization comes later... for now it's just getting the basics to work.

Please look at the readme file. You will need two (not supplied) TI Console ROMs. They should be easy to find... place them in /roms/bios on your SD card.

If anyone manages to get this to run... I'll be pleasantly surprised image.gif.4ab7d551ecba8f439e364e1a02055cef.gif

ROMS are weird for the TI-99... there are 'C', 'D' and 'G' plus some flat full-load binaries. When picking games - you generally pick the 'C' version of the ROM or the flat/full-load binary. The system should auto-find the related files.

This is a very early alpha... it will improve!


image.thumb.png.ff545dfb7924f891d6e6f87a32bcf1b9.png

Enjoy!


I'm not able to run any game with the emulator. I'm using a DS Lite, with original R4 with V1.22 kernel (it should be the Wood version). The CRC32 of TI99 ROM/GROM BIOS used have the same values indicated on github. The emulator boots, but when selecting a game (I've tried Ti Invaders, Donkey Kong, etc) I can just see some changing images on the upper screen, then blank screen. No audio. I noticed that games with <filename>.c, <filename>.d are ignored. Using <filename>_c.bin name, these are correctly selectable, but no success in loading.

 

Any advice?

 

Link to comment
Share on other sites

1 hour ago, Hwlngmad said:

Sorry for the impending dumb question, but I have a modded 3DS with Twilight Menu on it.  Will I be able to run this emulator on it?  Additionally, will your other emulators run on a 3DS?  Just wondering as I have recently rediscovered the TI and want to explore it a bit further.

Absolutely - all 7 of my emulators will run fine on the 3DS using Twilight Menu. You will get the full 2x CPU experience and everything will run full-speed.

 

53 minutes ago, tmop69 said:


I'm not able to run any game with the emulator. I'm using a DS Lite, with original R4 with V1.22 kernel (it should be the Wood version). The CRC32 of TI99 ROM/GROM BIOS used have the same values indicated on github. The emulator boots, but when selecting a game (I've tried Ti Invaders, Donkey Kong, etc) I can just see some changing images on the upper screen, then blank screen. No audio. I noticed that games with <filename>.c, <filename>.d are ignored. Using <filename>_c.bin name, these are correctly selectable, but no success in loading.

 

Any advice?

 

So interestingly enough, many of the games I'm playing came from you :)  

 

The one I play daily now is the ToD hack that doesn't require the cassette.   Right now I'm only supporting .bin extensions so it would be old-world naming. For that game (in my case) I'm using:

 

ToD-QuestForTheKing-NoCassetteC.bin

ToD-QuestForTheKing-NoCassetteG.bin

 

Pick either file and off it goes... 

 

Pretty much the rest of the games I've tried are the ones I had hanging around forever to use on Classic99... though I'm less sure where I got them from.

 

On my DS-Lite, I use an R4i clone card - cheapest that I could find some years ago...  I just tested the build I put up on my DS-Lite and it runs fine with the stock R4 Revolution menu (though the DS-Lite will run a bit slow until I can optimize more).  I'll definitely work with you to get it running - you've been more than helpful to the community and I'm happy to help on the DS emulation front!


image.png.6823c2f2244343784f8bda8c2aa16f7e.png

 

Also... the version I originally checked in a couple hours ago did not properly check for the installed console ROMs (reporting 'Success' whether they were there or not... so be sure to grab the latest upload for proper checking). I've asked my one beta tester to check on his DS-Lite using a couple of R4 cards he has... 

Edited by llabnip
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

2 hours ago, llabnip said:

ROMS are weird for the TI-99... there are 'C', 'D' and 'G' plus some flat full-load binaries. When picking games - you generally pick the 'C' version of the ROM or the flat/full-load binary. The system should auto-find the related files.

The C/D bank switching is the old system from the 90s, modern stuff is all generally in a single file (and there's no reason the old stuff can't be packed that way too). And of course you know that G is a completely different memory space. We never really got a comprehensive file format, except for Win994a's proprietary (and either encrypted or obfuscated) TICart, and MAME's deprecated-but-probably-still-the-best-path-forward RPK. :)

 

  • Like 3
Link to comment
Share on other sites

1 hour ago, llabnip said:

Absolutely - all 7 of my emulators will run fine on the 3DS using Twilight Menu. You will get the full 2x CPU experience and everything will run full-speed.

 

So interestingly enough, many of the games I'm playing came from you :)  

 

The one I play daily now is the ToD hack that doesn't require the cassette.   Right now I'm only supporting .bin extensions so it would be old-world naming. For that game (in my case) I'm using:

 

ToD-QuestForTheKing-NoCassetteC.bin

ToD-QuestForTheKing-NoCassetteG.bin

 

Pick either file and off it goes... 

 

Pretty much the rest of the games I've tried are the ones I had hanging around forever to use on Classic99... though I'm less sure where I got them from.

 

On my DS-Lite, I use an R4i clone card - cheapest that I could find some years ago...  I just tested the build I put up on my DS-Lite and it runs fine with the stock R4 Revolution menu (though the DS-Lite will run a bit slow until I can optimize more).  I'll definitely work with you to get it running - you've been more than helpful to the community and I'm happy to help on the DS emulation front!


image.png.6823c2f2244343784f8bda8c2aa16f7e.png

 

Also... the version I originally checked in a couple hours ago did not properly check for the installed console ROMs (reporting 'Success' whether they were there or not... so be sure to grab the latest upload for proper checking). I've asked my one beta tester to check on his DS-Lite using a couple of R4 cards he has... 

ok, grabbed the new version and it's working fine! The problem was that I've created a DS99 folder and placed there the BIOS files. The new version was correctly detecting/informing for the missing files. I've moved on the root of the SD card and is now working fine and great! 🙂 

 

I've started testing some games and it's really working really great for "just an alpha" version! ;-) 

 

On the DS Lite the speed is similar to a PAL machine, so 50fps. Donkey Kong has some minimal frame drops, but I've not perceived any difference if compared to a real PAL TI99. Munch Man Beta has solid 60fps. Popeye is working fine. My Super Astro Smash is working great. Spac Man is working great.

 

Now some problems/suggestions:

- Miner 2049er. You cannot start the game, you are blocked at title screen. Not sure if it needs joystick 2. I've checked in the menu, but it seems that you cannot select joystick 2, only joystick 1. Please, include also joystick 2, since there are few games that needs it (e.g. Frogger);

- Superfly. The cracked version needs Speech Synth, otherwise you'll not be able to see again the Fly sprite after the first death. But this is the same behaviour with a real TI99 with FinalGROM.

 

Could you please add in the options menu the PAL/NTSC selector? Forcing PAL will have benefits for the DS Lite.

 

Congratulations for this first release! It's really a great emulator for the DS!!! The experience is better if compared to the Retroflag GPI case with the Pi0 and Retropie (with Sim99). 😄

 

Now waiting for new updates... I'll continue the tests and report eventual problems. I think some 99ers here will start looking for a DS...

 

 

 

SpacMan.jpg

  • Like 7
Link to comment
Share on other sites

Yeah... I'll deal with a much more robust file naming handling in the future. For this 0.1 Alpha release it's just getting some basics working.  Next up is disk and/or/maybe cassette. Then I need to tackle speech. Audio emulation on the DS has been my nemesis.  It took forever to get the Colecovision SN sound chip (same as used in TI) sounding so good.

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

21 minutes ago, tmop69 said:

- Miner 2049er. You cannot start the game, you are blocked at title screen. Not sure if it needs joystick 2. I've checked in the menu, but it seems that you cannot select joystick 2, only joystick 1. Please, include also joystick 2, since there are few games that needs it (e.g. Frogger);

You should be able to change any DS button to any TI button - including Joystick 1 or 2 Up/Down/Left/Right/Fire and/or any of the keyboard keys (useful to map d-pad to ESDX for Tunnels of Doom... and X for MAP and B for 'Back' so you hardly have to touch the screen for 80% of the game).  

I even added a quick X button on this screen so you could swap P1 and P2. I tried it just now for Frogger which needs Joystick 2 and it seems fine:

image.thumb.png.898159fa93a3361d2f36535eb0eda31f.png

 

Options are always saved on a per-game basis... though my other emulators only ever have 1 main ROM file loaded and I haven't yet worked out how I'm going to do the CRC when there might be 2 or 3 files that need loading.  So any settings you change and save might get wiped out when I move from Alpha to Beta to Release in the coming weeks.

 

And thanks for the kind words! It will be much better before long - it's taken about 50 hours of hobby-time to get to this point and these emulators tend not to really shine until I get to the 100+ hour mark :)

Edited by llabnip
  • Like 5
Link to comment
Share on other sites

4 hours ago, llabnip said:

On my DS-Lite, I use an R4i clone card - cheapest that I could find some years ago...  I just tested the build I put up on my DS-Lite and it runs fine with the stock R4 Revolution menu (though the DS-Lite will run a bit slow until I can optimize more).  I'll definitely work with you to get it running - you've been more than helpful to the community and I'm happy to help on the DS emulation front!

 

Hi Dave,

 

I got the emulator running on my venerable NDS with a 14 years old DS ONE card .. 

 

Extended_Parsec_on_NDS.thumb.png.4cad8e84619daff88739c44504be76e7.png

 

I would never had thought I would play my own Extended Parsec on this nice little machine ... it is a little bit slower than the original, but still playable. I only tested homebrew modules so far, my own Scuttlebut and Rasmus' port of Jet Set Willy. No problems detected.

 

Is there already a way to change the cartridge without a reboot of the NDS? Or a pause key?

 

I know that this device will join me more often now, for sure!

 

 

 

  • Like 6
Link to comment
Share on other sites

18 minutes ago, SteveB said:

Is there already a way to change the cartridge without a reboot of the NDS? Or a pause key?

You can press the END on the bottom row... that will bring you back to the main screen where you can re-define keys or change configuration or change to a new game.

 

And very cool that you are able to play your own game on this venerable handheld! I've just checked in 0.1b with about 5% speed improvement so you'll get a few more frames of performance out of it. I will eventually get full speed on most games on the DS (the DSi with the 2X CPU is already running full speed across the board).

 

Enjoy - really gratifying to see a number of people who have already gotten this running in a very early stage of development!

  • Like 6
Link to comment
Share on other sites

Not sure about the Switch... don't own one :)

 

Fortunately, Nintendo has sold more than 150 million DS/DSi/2DS/3DS units worldwide and they are plentiful and probably the ultimate 8-bit classic gaming machine :)

 

In the meantime, based on some feedback here, in private and over on GBATemp (where the DS emulation scene lives), I've put out a 0.2 Alpha release:  https://github.com/wavemotion-dave/DS994a 

Given how many people are using R4 cards on older DS units (with the slower CPU), I decided to prioritize optimizations

 

The version 0.2 should be 10-15% faster across the board helping games that were running at ~50 fps be much closer to full-speed.

 

I also bumped up the cart banking memory to to 512K mostly because I wanted to play Flying Shark. I fixed Slymoids and other games using IDLE.  Other minor cleanups as time permitted before I fell asleep last night.

 

Enjoy!

  • Like 5
Link to comment
Share on other sites

21 minutes ago, llabnip said:

Fortunately, Nintendo has sold more than 150 million DS/DSi/2DS/3DS units worldwide and they are plentiful and probably the ultimate 8-bit classic gaming machine :)

The Nintendo DS uses two CPUs: One 32-bit ARM9 CPU and one 32-bit ARM7 CPU. So as far as processor instruction sets go, it's a 32-bit system😊

 
As far as ultimate 8-bit classic gaming machine emulation, I think PC with Windows wins in the billions. 😉
 
I not proud of it, as I only have one PC with Windows and one Nintendo Wii to play with, but I get to play most games etc. 🖖
 

Edited by sometimes99er
  • Like 1
Link to comment
Share on other sites

13 minutes ago, sometimes99er said:

The Nintendo DS uses two CPUs: One 32-bit ARM9 CPU and one 32-bit ARM7 CPU. So as far as processor instruction sets go, it's a 32-bit system. 😊

 

As a DS programmer, I'm well aware of the hardware!

 

I mean that the DS is the best 8-bit classic system emulator.  Just in emulators I support, we have high compatibility on Atari 2600 (including ARM-assisted support... convenient that I could latch onto the ARM of the DS to help here), Atari 5200, Atari 7800, Atari 8-bit computers, Intellivision, Colecovision, ADAM, MSX, Spectravision, Hanimex Pencil II (look it up! Only one game dumped but super fun), SVI, Tatung Einstein, Sega SG-1000, Memotech MTX512 and now the TI994/a.

Other emulators from other developers include SMS, Spectrum ZX and many more.

So while the DS is not the ultimate 32-bit gaming system, it sure take the cake on 8-bit system emulation. To be fair, it's one of the worst 32-bit CPUs as (much like the TI99/4a) Nintendo crippled it by only hooking a small set of fast memory to the 32-bit bus. We have 16K of fast data memory and 32K of fast instruction memory and 656K of 16-bit Video Memory and 4MB of slow RAM that is not only 16-bit access but the system imposes crazy wait states to ensure that it runs as slow as possible... I actually run most of the TMS9900 CPU emulation out of Video RAM since it's large enough to hold the entire emulated CPU memory space at 16-bits wide.  At times the crippled NDS CPU which should be 67MHz (or 134MHz for the DSi) is running about 10% capacity.

 

But the DS hardware (screen, button input and form-factor) is really nice... The touch-screen is particularly nice for overlays and such... here is a snap of my Nintellivision emulator with a custom overlay for AD&D Treasure of Tarmin:

Introducing Nintellivision - an Emulator for the DS/DSi | GBAtemp.net - The  Independent Video Game Community

Edited by llabnip
  • Like 7
Link to comment
Share on other sites

26 minutes ago, llabnip said:

...

The touch-screen is particularly nice for overlays and such... here is a snap of my Nintellivision emulator with a custom overlay for AD&D Treasure of Tarmin:

Introducing Nintellivision - an Emulator for the DS/DSi | GBAtemp.net - The  Independent Video Game Community

 

This is really spectacular! 😁 I surely need to try this emulator after the tests on the TI version.  

 

 

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...