DS994a - A Texas Instruments Emulator for the DS/DSi

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
919
Trophies
1
XP
7,393
Country
United States
https://github.com/wavemotion-dave/DS994a

Version 1.8 is released. I spent the last 4 days working on the last of the glitches. DS-Lite/Phat users rejoice for speed has been found!

V1.8: 19-Feb-2024 by Wavemotion Dave
  • Improvements to the TMS9918a emulation to fix 5th sprite handling and improve collision detection. Megademo, Eric in Monsterland and Interceptor all work correctly now.
  • Fix for Robots of Death II and NUTS so they start properly (was hanging on Speech detection).
  • DSi now supports up to 8192K (8MB) banked ROMs (the older DS still supports 512K). The Dragon's Lair demo will run but won't process speech/sound as the emulation is not fast enough.
  • Optimized VDP rendering and CPU memory read/writes to be a bit faster to help with older DS-Lite/Phat. This gives a 5-50% speedup in video rendering depending on the game. The megademo will sustain 60fps throughout.
  • Improved memory density so that we end up with more cache-hits than misses when dealing with CPU memory - this gives a nice speedup of several percent across the board.
  • Lots of code comments and refactoring improvements as time permitted.
The VDP emulation got a ton of attention to fix both the 5th sprite detection and properly handle inter-frame collision detection. I also found one game that was just ... odd to say the least. Miner 2049er seems to have a problem with collision detection. After an archaeological dig on the forums here, it appears that a real VDP will update the 5th Sprite Number when a 5th sprite is not detected - I think it will represent the last sprite scanned and put on a line which is what I implemented and the Miner 2049er collision detection seems to work (probably by accident).

DS994a has come a long way - the last two releases have been about improving the accuracy of emulation without sacrificing emulation speed. The design philosophy remains the same: have the ability to play Hunt the Wumpus on the toilet. As such, I'm okay sacrificing a bit of accuracy to make the games playable at full frame rate ... fortunately I found some significant speedups in the VDP rendering. Turns out a lot of what gets written is the background color which I've now optimized for. I also realized that much of the VDP scanline rendering is to even boundaries and instead of writing a byte, I can write 16-bits or 32-bits at a time which gained a ton of speed.

Most actively developed emulators asymptotically approach 100% accuracy - but never quite reach it. I'd now put DS994a about 95% in terms of accuracy - all your favorites should play smoothly even on older hardware. Enjoy!
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
919
Trophies
1
XP
7,393
Country
United States
Did you make V1.8a for me? :D:lol:
Absolutely!

On a side note: I'm just about wrapped up creating 'Wavemotions Highly Curated TI-99 Game Database'. The problem with TI-99 is that we're stuck with crappy 8.3 filenames and badly named often overdumped cart images due to legacy pioneers back in the early 1990s. As such, I've been slowly cleaning up the database of proper and correct cart dumps - with a huge bit of help from the MAME efforts which seek accuracy (but take it a bit too far for the TI99 breaking each component ROM chip down to individual files which gets messy). If any of you have spent any time on WHTECH (the premiere site that has hosted TI99 related material for three decades now), you know it's a bit of a mess organizationally - with duplicate files, alternate dumps and things strewn about haphazardly reminiscent of the clothing isle after a big sale at Target.

To that end, if anyone wants to test my highly curated pack of 50 game carts, please drop me a private message. I think these should be as close to the real cart images as possible - and all 50 should play flawlessly on the latest DS994a and be properly named to credit the company and copyright date.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
919
Trophies
1
XP
7,393
Country
United States
https://github.com/wavemotion-dave/DS994a

V1.9: 24-Feb-2024 by Wavemotion Dave
  • Improvements to the TMS9900 CPU core to improve accuracy and slight optmization for another frame of performance.
  • Added new global configuration default for frame skip (DSi, by default will disable frame skip and the DS-Lite/Phat will enable light frameskip).
  • Improved Disk menu handling to show free space and used space plus some instructions on how the paste buffer works.
  • Fix for Zero-Zap so it picks the right control scheme.
  • Lots of cleanup and code comments added across the board.
A nice polished release... up soon is the big 2.0 with a newly designed splash screen which I'm rather excited about! I'm working on a scheme to get RPK files (the ones used in MAME for TI-99) working which should allow the games to be launched by TWL++ - we'll see...

1708791846519.png
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
919
Trophies
1
XP
7,393
Country
United States
https://github.com/wavemotion-dave/DS994a

V2.0: 01-Mar-2024 by wavemotion-dave
  • Support for .rpk (Rom PacKs - same as used by MAME/MESS).
  • Fix for save/load state of games that use RAM (MBX carts, MiniMem, etc)
  • Improved SAMS handling so that the proper amount of RAM is detected
  • On DSi and above, DSK3 is now fully buffered and writable.
  • Lots of small tweaks and cleanups across the board as time permitted.
  • Refactored and reduced resources so we free up an additional 256K of valuable memory for the future!
The .rpk format is unique to TI-99 and provides a way for MAME/MESS to group rom files into a single game pack. This format should also allow (should @RocketRobz and team decide) to add DS994a game launching directly from TWL++ (the extension is ".rpk").

If you are using my emulator, don't be shy about telling me. Knowing that our work is being used is often the only form of compensation some developers get!
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
919
Trophies
1
XP
7,393
Country
United States
That's a good resource.

Let me also be clear - I'm not depricating the use of the old-school mixed-mode C/D/G/8/9 files. But .rpk is the MAME (formally MESS) way of putting several ROMs relating to the same game into an archive along with an XML file that describes where they go. So it's not as messy - and allows things like TWL++ to focus on the .rpk for launching a game (vs the sprawling mess that is the C/D/G/8/9 format).

I plan to support both formats going forward for maximum flexibility.

I usually don't launch my games via TWL++ so I'm fine with the old-school mixed-mode filenames but the .rpk is likely the future (MAME has supported it for many years, JS99er supports it and it's on the to-do list for Classic99 for the future).
 
  • Like
Reactions: Tarmfot

anotherthing

Well-Known Member
Member
Joined
Mar 30, 2023
Messages
252
Trophies
0
Age
52
XP
342
Country
United States
wavemotion, you the man, not just for having a great user name from the only anime that isn't Pokemon worth watching, but I've been having a blast playing the games I used to play when I was a kid with my first home computer. We had TI-99/4A computers at school in the math room, and we were allowed to play games when we finished our work. I got started playing The Attack in class, and missed lunch because apparently I was really good at the game. First time playing, and I just took to that game. Played right up until the next class came in without dying.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=a9w_UTPpHjg