GimliDS

  • Thread starter Thread starter wavemotion
  • Start date Start date
  • Views Views 13,332
  • Replies Replies 125
  • Likes Likes 31
Version 0.9d release 06-May-2025 by wavemotion-dave
  • Added ability to remap the British Pound (£) symbol to one of the other rare missing keys (left arrow, up arrow, C=)
  • Fix for CPU jump commands not handling the extra cycle it takes.
  • All carts insertions do a proper reset so that we don't lock up when switching carts.
  • Minor cartridge accuracy improvements - new LED added to cart icon for EasyFlash loading.
 
Great work! Love this. Can you add a feature where the key graphics animate when tapped on? I like that they have the sound when tapped but the visual feedback also helps with more precise typing.

Keep it up and thanks for revitalizing the DS scene!
 
Last edited by TheLateBillyMays,
As I get ready for the upcoming 1.0 release, it's time to talk about the CPU Settings.

Obviously the emulator is not perfect. It's doing what is known as 'line emulation' - meaning that it executes 1 line of CPU, 1 line of VIC graphics, 1 line of SID music, etc.

In the PAL world, there are 312 scanlines - of which 200+ are 'visible' on screen.

This is fairly typical for my emulators - and many emulators in general. But it's not perfectly accurate - as things can change mid-scanline. And for the C64, some cool effects can be done by careful timing of when certain peripherals (video, sound, etc) are accessed.

To that end - many games don't try to pull off these fancy tricks - and will play reasonably perfectly on the emulator.

But some games use these tricks to a lesser or greater extent. This can result in small graphical glitches (things like a flickering / unstable line near the top or bottom of the playfield) to more extensive 'garbage' on screen or poor audio/music output.

Until I can gain a better understanding and try to improve the emulation (without going FULL cycle-accurate which will cripple the emulation speed), there are some tricks we can pull to help. One of them is the 'CPU Adjustment' settings in the Configuration (set on a per game basis).

The one that is more interesting is the CPU CYCLES adjustment. This ranges from -9 cycles to +9 cycles with the default being +0 (no adjustment). This gives the C64 CPU extra cycles to play with on a per-scanline basis. As the beam races down the screen, the CPU and the VIC/SID can get slightly out of alignment... and making an adjustment can help. But be careful - too much adjustment and you're running "out of spec" and could crash the game.

How would this work... well, if you're not experiencing any weird graphical glitches, you should NOT touch the setting. But let's take Gauntlet which has a slight flicker/flash of the P2 'G' in the lower left of the screen. This kind of flicker is indicative of a timing issue. By pushing the CPU CYCLES adjustment to +2 or +3, the flickering lessens. If you push to +5 it goes away and the screen is nice and stable. You should adjust only as much as is needed to achieve the effect and NO more.

In general, if you have a scanline instability/flicker near the top of the screen, use slightly negative CPU adjustment values. If the glitch is towards the bottom of the screen... use a slightly positive adjustment value.
 
https://github.com/wavemotion-dave/GimliDS

Version 1.0 release 09-May-2025 by wavemotion-dave
  • Added TOGGLE ZOOM button map to scale screen 1:1 temporarily (to make text games readable)
  • Another proper fix for CPU jump commands not handling the extra cycle it takes.
  • Fixed CPU zero-page wrap so it's accurate.
  • Added 256K REU-1764 support. Still quite preliminary.
  • A bit of polish and cleanup for the big first release!
Finally!
1746794496331.png


Look... this is not great. There are still quite a few issues - this feels a lot like the first release I did for A7800DS. The screen resolution is not ideal (256x192 for the DS/DSi but 320x200+ for the C64) and the emulation is only reasonably good. What plays, plays pretty well. What doesn't play is mostly glitching and some games just won't load. I suspect most of that comes down to line-based emulation vs cycle-based. Later versions of Frodo did add cycle-based emulation but it comes at a heavy cost to emulation speed - I don't know if the DSi can handle it (the DS-Lite / R4 compatibility mode will not).

So I'm unsure where to take this from here. But hopefully some fun can be had with what we got!

Oh... and I threw in preliminary REU expanded C64 memory support. Just 256K for now... and the one game you would want to play (Sonic) has minor graphical glitching due (I think) to the aforementioned line-based vs cycle-based emulation but it is quite playable and really very impressive on the C64.

Save states from beta releases will not load ... but I will try not to touch the format in the near future.
 
Last edited by wavemotion,
As for the first statement of “Look... this is not great.”….

No it’s not… it’s superb and way more than we have ever had or imagined on the DS and I am really grateful for the hard work you have put into this release.

Lots of fun to be had this weekend between this and the ZXS emu you also did

Thanks a million!
 
Thanks Chilli - needed the boost!

And, of course, no sooner did I push out build 1.0 and step in the shower did I realize the mistake with REU. I've corrected it and sure enough, Sonic now plays and looks much better! Still not perfect - a bit of graphical oddities but quite playable.

Since I put the build out less than an hour ago, I just decided to repush the 1.0 release. I you grabbed it immediately when I posted, just grab it again.
 
Last edited by wavemotion,
I noticed some games won't work in case of cracker group... in example Blues Brothers cracked by X-Ray, it loads intro (but there's a red flashing disk despite slow or fast true drive is selected), after set trainers it shows title screen, character select and then it freeze. Another version cracked by Brutal works just fine with green disk. So it's good try to check other alternatives first
or just watch and listen to intro, seems legit too. Speaking of x-ray version on pc emus, it also won't work on winVice (at midway it throws to Ready.) but works fine with ccs64. I guess because of some custom loading and disk timing routines, but idk.
 
  • Like
Reactions: wavemotion
I guess because of some custom loading and disk timing routines, but idk.
Yeah, the custom loaders are killer. Some cracks manage to move to a more standard loader for some games. And cart conversions are often more reliable loading some games. It’s a crap-shoot for sure. I’ll keep chipping away at improving things.
Post automatically merged:

Version 1.1 release 11-May-2025 by wavemotion-dave
  • Fix to CIA vars initialization so games like Chuckie Egg start properly.
  • Fix to TOD clock counters (previous versions would not clock at all... fixes some utilities mostly).
  • Improved REU handling for a bit more speed (gain of 1-2 frames on REU games)
  • Improved VIC handling for a bit more speed (gain of 1-2 frames across the board)
I've had a brief but pleasant chat with Christian Bauer who developed the original Frodo source and he tracked down a bug that was causing some games not to start properly (the game I first noticed this on was Chuckie Egg). He sent me the fix and I've got that sorted out now!

A few other cleanups - the Time of Day counters were not running... most games don't rely on this but a few utilities do and those are now sorted out and working.

And another frame or two of speed which never hurts to have in the bank.
 
Last edited by wavemotion,
Yeah this guy is a legend and I cannot thanks him enough for bringing ShapeShifter to AmigaOS. The Amiga became a better 68k mac than a... real 68k mac.
 
  • Like
Reactions: wavemotion
I just added a new section in the readme.md on my github page for specific game hacks.

Due to the line-based emulation, some games require small tweaks to the emulation to get them looking and playing right. I'll keep adding to this as I go through the games - unfortunately, I should have started this list when I was first testing as I forgot a lot of the tweaks I did!

Specific Game Hacks​

To get some of the more popular games running as good as possible on the venerable DS, here is a list of things you might try.

  • Gauntlet - set the CPU CYCLES to +5 to eliminate graphical glitches on 'G' font.
  • Bruce Lee - set the CPU CYCLES to +4 to minimize graphical line-based glitches.
  • Turrican I - set the BAD CYCLES to -6 (you will have some corruption on the title screen but the game will look and play fine - most importantly you can actually start the game!).
  • Turrican II - requires True Drive enabled (or load from Cart)
If you know of any other settings you've had to use... do let me know.
 
For running this on a 3DS (via TwilightMenu) does it matter where one puts the GimliDS 'NDS' file itself?. I tried plopping it in the relevant folder within the '_nds' folder (alongside the other TwilightMenu optimised emus) but the underscore in the stated folder's name seems to have prevented it from showing up in the GUI of TwilightMenu itself.

Anyway, immense thanks for this and SpeccySE (amongst your other hard works) :D
 
  • Like
Reactions: wavemotion
For running this on a 3DS (via TwilightMenu) does it matter where one puts the GimliDS 'NDS' file itself?. I tried plopping it in the relevant folder within the '_nds' folder (alongside the other TwilightMenu optimised emus) but the underscore in the stated folder's name seems to have prevented it from showing up in the GUI of TwilightMenu itself.
Aside from folders starting with "_", it does not matter where you put it.
TWiLight Menu++ itself would need to support the emulator in order for TWLMenu++ to support launching the game within it's own UIs.
 
  • Like
Reactions: wavemotion

Site & Scene News

Popular threads in this forum