Handheld MTX Emulation via ColecoDS

Modern, Memotech inspired, hardware projects
Post Reply
User avatar
wavemotion
Posts: 5
Joined: 07 Aug 2023 20:10

Handheld MTX Emulation via ColecoDS

Post by wavemotion »

Greetings Programs!

I'm the developer of ColecoDS - an emulator for the Nintendo DS/DSi/XL/LL

This emulator supports a number of systems based around common 8-bit computer hardware: namely the Z80, TMS9918/9929 VDP chip and either the TMS9919/SN94624 or similar AY-3-8910 sound chips.

As such it supports the following:
  • Colecovision game support (.rom or .col files)
    Super Game Module support including AY sound chip
    Megacart Bankswitching support (up to 1024K)
    Coleco ADAM game support (.ddp or .dsk files)
    Sega SG-1000 game support (.sg roms)
    Sega SC-3000 game support (.sc roms)
    Sord M5 game support (.m5 roms)
    MSX1 game support (.msx or .rom or.cas) up to 1024K
    Spectravideo SVI support (.cas)
    Casio PV-2000 support (.pv roms)
    Hanimex Pencil II support (.pen roms)
    Tatung Einstein support (.com run-time files only)
    Memotech MTX game support (.mtx or .run or .com files)
    Creativision game support (.cv) - supports ROMs up to 32K
The Memotech MTX support got a huge boost this weekend with proper implementation of the Z80 CTC chip. Prior to this, I was hacking the CTC handling which caused a number of issues. With the proper CTC handling, virtually all games load, run and sound great. I think the only problems I'm still having are with Cosmic Raiders which crashes (apparently it's known to be a bit buggy on real hardware) and about 1 in 5 loads of the original SMG will run glitchy (the movement of the man stutters) - this might be related to randomizing Memotech RAM on startup but I'm still investigating. Oh! And the [a2] dump of Aggrovator does not load (but the [a1] loads and plays fine).

It supports the MAGROM images 1.05 and 1.05a as well as MAGROM V2 - though the individual games run just as well (and you can customize the individual games... for example, you might want to set the cardinal directions of the D-PAD to simulate the diagonals for games like Qogo). You can also map any keyboard key (even the few we couldn't squeeze onto the screen) to any of the 12 NDS physical buttons.

It's been a fun project to delve into all these similar-but-each-unique systems. I had a friend design an MTX-styled virtual keyboard for the lower touch-screen of the DS. We only have 256x192 pixels (same 1:1 resolution of the Memotech MTX VDP chip) and we had to take some creative liberties but I think we captured the look and feel well enough.

Anyway, mostly wanted to say thanks to all the great folks here - lots of the discussions on this forum were instrumental in helping work out what was needed to get the emulation better.

If you have an old DS (especially the DSi or XL/LL) you can find the emulator here: https://github.com/wavemotion-dave/ColecoDS
memotech-ds.png
memotech-ds.png (927.23 KiB) Viewed 8291 times
User avatar
Dave
Posts: 1285
Joined: 11 Aug 2012 18:16
Contact:

Re: Handheld MTX Emulation via ColecoDS

Post by Dave »

Looks like interesting development, but unfortunately, after it lying in a drawer for a few years, I sold my (or rather, my wife's) DS on eBay a couple of months ago :(

One question though, I've had a look on the github page and couldn't see any info on how to actually install the software? Is it as simple as just putting it on an SD card? (I never actually used the DS)

I currently have a 3DS, (again, it's actually my wife's,) take it that the emulator won't run on it?

regards
Dave
User avatar
wavemotion
Posts: 5
Joined: 07 Aug 2023 20:10

Re: Handheld MTX Emulation via ColecoDS

Post by wavemotion »

Hey Dave... it will run on a 2DS/3DS/XL though I don't have such a unit.

The key is to run custom firmware of some kind... which allows the use of the DSi/2DS/3DS SD card for homebrew.

Alternatively you can buy a (roughly US$20) flashcart (R4 or similar) which is a multi-cart for the DSi or 3DS.

The flashcart is simple but costs a wee bit of money and has one drawback: it will run in DS compatibility mode (67MHz CPU and 4MB RAM). That's okay - my emulator will operate well enough with a light bit of frameskip.

The DSi (and 3DS) has 4X the CPU and if you run custom firmware you get access to the 135MHz and 16MB of memory. The memory I don't really need... the CPU speed ensures that I can run even the most demanding emulation with no frameskip.

The best place to start looking at custom firmware for your unit is here: https://cfw.guide/
I've used the DSi custom firmware portion of that site with no problems at all. I also install Twilight Menu++ as a free open-source menu launcher for the games just because it's pretty.

If you go the R4 flashcart route, each card will come with a micro SD slot and you will setup some software onto a blank SD card to get the flashcart booting...

In all cases, you would then just put the ColecoDS.nds file (the Nintendo executable) onto the flash cart. Most people install into the root directory where it's seen by any loaders... Then just put your games (.mtx, .run or .com) somewhere on the card and you can load and run them. The MTX bios is built-in (other systems require other bios files you supply).

Dave
User avatar
gunrock
Posts: 248
Joined: 28 Oct 2020 21:17

Re: Handheld MTX Emulation via ColecoDS

Post by gunrock »

I have a few R4 type cards and a number of DS variations available and a hacked 3DS. I'll have a go with this sometime later this week and report back.

Thanks for the heads up.
Steve G
Danish Memotech MTX 512, MFX and loving it
User avatar
wavemotion
Posts: 5
Joined: 07 Aug 2023 20:10

Re: Handheld MTX Emulation via ColecoDS

Post by wavemotion »

Yeah, the R4 (and infinite clones) is fairly ubiquitous in the NDS world for running games and homebrews. Super easy but the only downside is that it will always run in older DS-compatibility mode (67MHz vs 134MHz). Again, that's generally okay - most memotech games won't push the boundaries and I've optimized things to the point of exhaustion. With custom firmware, you get the full power of a DSi or 2DS/3DS. This tends to show up more on my other emulators - especially running ARM-enhanced games for the Atari 2600 where every CPU cycle is precious (the older DS hardware just can't keep up).

In any event, I'm still working on version 8.3 (just tweaking some Tatung Einstein keyboard handling) so if you get things running before I release in a few days, just be sure to take the 'nightly build' of ColecoDS.nds from the main github page (vs the 'Release' area). The nightly builds are usually stable :)

And I do hope you enjoy the emulator. I've put a lot of work into it - and admit that it's not perfect. Emulation rarely is... but in this case the whole experience has been optimized for use on what is now, itself, a classic handheld console (I've seen someone emulating a DS to run the emulated Memotech... bizarre indeed). MEMU and MAME are both more robust and full featured - the goal for me was to make it possible to play Pothole Pete on the toilet.
User avatar
Dave
Posts: 1285
Joined: 11 Aug 2012 18:16
Contact:

Re: Handheld MTX Emulation via ColecoDS

Post by Dave »

Hi Dave,

thanks for the info. I had a look at the custom firmware page and it looks interesting.

The 3DS that I have is currently on eBay as I didn't have a use for it, plus it is a USA region code unit, so less useable in the UK. Reading the CFW page though, it seems that CFW will allow the region code to be unlocked, so that is interesting in itself. That, and your emulator has gotten me thinking . . . . .

I'll probably kill the eBay listing and have a go with this (when I get some spare time, which looks like being some time away :D )

regards
Dave
User avatar
wavemotion
Posts: 5
Joined: 07 Aug 2023 20:10

Re: Handheld MTX Emulation via ColecoDS

Post by wavemotion »

Yes, that's also my understanding with the custom firmware: you should be able to switch-hit well enough for regions.

I have a half-dozen DS/DSi/XL/LL systems that are a mix of USA and Japan (none from UK, however... so I can't confirm 100%). They all behave identically with custom firmware. In any event, I've seen screenshots from several people using a USA 3DS with my emulators. Here is one of my online friends running my StellaDS (Atari 2600) emulator on his US 3DS.
Capture.PNG
Capture.PNG (386.58 KiB) Viewed 8214 times

I guess, at worst you just delay putting the 3DS back up for sale. The only thing I'm not entirely sure of is whether you can go back from Custom Firmware to stock firmware and that might affect resale value (though unclear which way!). Something to think about. Or you can move on from the 3DS in which case I still appreciate the kind responses here!

-Dave
User avatar
wavemotion
Posts: 5
Joined: 07 Aug 2023 20:10

Re: Handheld MTX Emulation via ColecoDS

Post by wavemotion »

Version 8.3 is up at: https://github.com/wavemotion-dave/ColecoDS

V8.3: 10-Aug-2023 by wavemotion-dave
  • Fix for keyboard handler so that more than one key can be pressed at a time (otherwise you get stutter when moving/shooting in keyboard-mapped games).
  • Major overhaul of the Memotech MTX emulation to improve emulation, sound and general stability.
  • New Z80 CTC handler (mainly for Memotech) which provides more accurate sound in Sord M5 and some Einstein games.
  • New Tatung Einstein keyboard graphic and improved keyboard handling.
  • New keymap presets for common keyboard games (QAOP, WASD, ZC-Period, etc.) - use the X button to rotate through these when defining keys.
    Other tweaks, fixes and improvements as time permitted.
Post Reply