ColecoDS - Improved

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Version 0.5 is up...
https://github.com/wavemotion-dave/ColecoDS

AY chip support is in for the Super Game Module! I cheated, however... I didn't have it in me to get a 2nd sound core running so instead I did something clever. Kinda.

The SN-76489 programmable sound chip is a 3-voice programmable sound chip from Texas Instruments and is used as the sound chip for the Colecovision.

The AY-3-8910 programmable sound chip is a 3-voice programmable sound generator (PSG) designed by General Instrument in 1978. It's used on MSX computer which has a very similar architecture to the Colecovision. The Super Game Module released by OpCode games contains extra memory and also this AY sound chip - mostly so that MSX games can be ported to the Colecovision.

The AY chip is slightly superior to the SN chip... it has a wider range of frequencies and an envelope generator which allows for a number of cool oscillating and/or tapering sound effects.

My cheat was to simply map the 3 channels of AY chip into the SN chip that I already have emulation for. This is fine for normal tones (with a slightly degradation due to frequency differences) ... but I also had to emulate the AY envelope. I did this very quick and dirty - it's not timing accurate and so the pitch of some sounds on AY ported games to the Colecovision Super Game module won't sound perfect... but it's close enough and I'm able to do so with very little CPU loss so everything runs full speed!

In theory on a real CV with Super Game Module you could use all 6 sound channels... the 3 from the SN chip and the 3 from the AY chip... my clever hack wouldn't allow that. But I have yet to find a game that actually does that. But I'm sure one exists... someday I'll properly emulate the AY chip but this is good enough for now. I'd like to spend time adding more features to the emulator rather than deal with more sound stuff :)

I also fixed the really buggy ROM selection code... sometimes you would pick game X and it would play game Y. That should all be okay now.

Getting ready for a full release... soon...
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Thanks for the kind words, Avery. Yeah, some of those SGM games are brilliant. And fortunately so many of them have been released for free by Team Pixelboy and a few others by Opcode Games.

It's not perfect, however... a few games still refuse to run. Most notable is Deep Dungeon Adventures which looks like my kind of game but it won't run... yet. I'll figure it out. Maybe it's one of the undocumented VDP screen modes - I don't think I have that stuff working yet.
 

Cris1997XX

Well-Known Member
Member
Joined
Oct 31, 2021
Messages
101
Trophies
0
Age
21
XP
205
Country
Italy
Version 0.5 is up...

AY chip support is in for the Super Game Module! I cheated, however... I didn't have it in me to get a 2nd sound core running so instead I did something clever. Kinda.

The SN-76489 programmable sound chip is a 3-voice programmable sound chip from Texas Instruments and is used as the sound chip for the Colecovision.

The AY-3-8910 programmable sound chip is a 3-voice programmable sound generator (PSG) designed by General Instrument in 1978. It's used on MSX computer which has a very similar architecture to the Colecovision. The Super Game Module released by OpCode games contains extra memory and also this AY sound chip - mostly so that MSX games can be ported to the Colecovision.

The AY chip is slightly superior to the SN chip... it has a wider range of frequencies and an envelope generator which allows for a number of cool oscillating and/or tapering sound effects.

My cheat was to simply map the 3 channels of AY chip into the SN chip that I already have emulation for. This is fine for normal tones (with a slightly degradation due to frequency differences) ... but I also had to emulate the AY envelope. I did this very quick and dirty - it's not timing accurate and so the pitch of some sounds on AY ported games to the Colecovision Super Game module won't sound perfect... but it's close enough and I'm able to do so with very little CPU loss so everything runs full speed!

In theory on a real CV with Super Game Module you could use all 6 sound channels... the 3 from the SN chip and the 3 from the AY chip... my clever hack wouldn't allow that. But I have yet to find a game that actually does that. But I'm sure one exists... someday I'll properly emulate the AY chip but this is good enough for now. I'd like to spend time adding more features to the emulator rather than deal with more sound stuff :)

I also fixed the really buggy ROM selection code... sometimes you would pick game X and it would play game Y. That should all be okay now.

Getting ready for a full release... soon...
I've tried 0.5 on my DSi, truly amazing! The only real problem is the sound, which is still not that great. P.S: The fan-made Mario Bros port doesn't work on the emulator. Can it be fixed?
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
P.S: The fan-made Mario Bros port doesn't work on the emulator. Can it be fixed?
It's on the list of things to fix... I just checked in a new build (didn't bump the rev yet... still got one more thing to add before 0.6) that fixes a lot of the graphical glitches (games like One-on-One and Stray Cat now look correct among others).

Mario Bros is a 64k game which means that it's one of the "Activision PCB" format games... and right now none of those are working correctly because I can't find any reliable information on how bank-switching works for those. At 128K and above the games use MegaCart which is fully documented (and ColecoDS implements and runs fine). I put out a post on AtariAge and hopefully someone over there has the secret-magic-decoder-ring so I can get games like Mario Bros. and GhostBusters to run right.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Version 0.6 is up...
https://github.com/wavemotion-dave/ColecoDS

I've updated to the latest ColEM Video Core which cleans up a lot of little screen glitches. Many more games are looking correct now. I've also worked around the original hardware limitation of 4 sprites visible on a line... if you ever played Donkey Kong on the original hardware you can see the barrels blinking in and out of existence as they bunch up. Emulators can work around this limitation - and so we do!

A huge change is the new "blend mode" which I borrowed from my scheme on StellaDS. In this mode, two frames are blended together - this is really useful when playing games like Space Fury or Galaxian where the bullets on screen are only 1 pixel wide and the DSi LCD just doesn't hold onto the pixels long enough to be visible. These games were designed to run on an old tube TV with phosphor which decays slowly so your eye will see slight traces as the image fades. This emulates that (crudely) - on the DSi using this new mode renders those games really bright and visible.

The DSi XL/LL has a slower refresh on the LCD and it more closely approximates the old tube TVs... so blend mode is not needed for the XL/LL models.

However! Using blend mode comes at at 25% CPU cost!! The DSi can handle it... the DS-LITE/PHAT cannot.

So my recommendation is as follows:
  • DSi non XL/LL - use Blend Mode for the games that benefit from it (Space Fury, Galaxian, etc).
  • DSi XL/LL - don't bother... the XL/LL screen decay is slower and games look great on it.
  • DS-LITE/PHAT - sorry, just not enough CPU to handle blending mode. Games will still play fine as-is.

To enable this new blend mode, when you pick your game use Y instead of A to select the game. I've added it to the game loading instructions to remind you.

Eventually this stuff will go into a configuration menu... but I'm not there yet.

Edit: I have made progress on loading 64K games... turns out not all of them are Activision PCB style - some are MegaCarts. I now have the right MegaCart detection in place so these games will load. However, GhostBusters has sound issues and Mario Bros. has graphical issues. Getting closer!

Edit2: Ghostbusters sound fixed. Probably fixed a few other sound issues too. Time for football!
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Version 0.7 is up...
https://github.com/wavemotion-dave/ColecoDS

More cleanup... more games running correctly. I upgraded to the 1.00 DrZ80 core (only one small change from the core we were running).

Still can't get Deep Dungeon Adventures (among a few others) to run. Bank switching looks correct but something strange is going on there. They work in the latest ColEM which is pretty close to what we now have in ColecoDS - though we are using a different Z80 core. The DrZ80 core has been stable at 1.00 since 2005 and a lot of projects use it due to how bullet-fast it is (almost completely written in hand-optimized assembly). I don't suspect it's a core Z80 problem... but who knows...

Here is where we stand with compatibility. Most of the original classic games play really well... Fathom is an exception.

Known Issues :​

  • Fathom won't render screen properly. Unknown cause.
  • 64K Activision PCB carts have no EEPROM support (Black Onyx, Boxxle - both playable without saves).
  • Mario Bros. has graphical issues.
  • Deep Dungeon Adventures won't run.
  • Uridium won't run.
  • Sudoku has graphical issues (still playable).
  • Flappy Bird has graphical issues.
  • Super Space Acer crashes after a few seconds of play.
  • Pillars won't run.
  • Vexxed won't run.
  • Lord of the Dungeon doesn't play (need SRAM support).
  • The original 2011 release of StarForce will crash - this is a known bug. There is a patched version of StarForce on Atariage.
  • MegaCart games are limited to 512K (MegaCart supports up to 1MB but I've yet to see a game use that much)
This is out of 300+ games so I think the compatibility is probably in the 95% range. A week ago we were probably closer to 80%.

I'll keep digging. I need to get a good per-game config options handler going.
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Version 0.8 is up...
https://github.com/wavemotion-dave/ColecoDS

Finally found the problem with Mario Bros. (also affected Remember the Flag and probably another game or two). There are 4 documented video (VDP) modes for the TMS9918 chip that the Colecovision uses. Turns out there are several undocumented modes... one of which is actually used by a few games (especially later Homebrews). Support has been added for that which makes Mario Bros. render properly among other games.

Still can't find the source of the graphical glitches in Fathom nor can I figure out why Deep Dungeon Adventures won't run... it's something elusive! But we continue to march towards improved compatibility.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Version 0.9 is up...
https://github.com/wavemotion-dave/ColecoDS

Lords of the Dungeon now playable (SRAM support added).
More sprite handling cleanup - we should be really clean on all the classic games except Fathom.
Cleaned up the emulator graphics and menus across the board... better game loading handling.
All previous versions were mapping all buttons to BOTH emulated Colecovision controllers (Left and Right) which was a mistake. This is fixed.
I had a spare 128K of Video RAM left so I put up to 8 banks of large bankswitch games into that memory for a speedup.

We're down to about a dozen things that still need fixing - but I've noticed a pattern. Two of the games are 128K bankswitched games so I'm hopeful those will be "fixed together". I also noticed that 5 or 6 of the other problems are all from the same author who banged out a half dozen MSX ports in 2021... and from a google search, I think some of those games are having problems on real CV hardware. So I don't know how hard I'll work on those specific problems :)

We are barreling towards a formal release. Compatibility is good enough for a first release. I will probably make that 5.0 to avoid confusion with the previous release of ColecoDS more than 10 years ago which was 4.0 (though on screen it showed 3.0 and online I only see versions up to 2.1 ... but I'll avoid all that and just start with 5.0 - there's nothing magical about release versions: they're just numbers).
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Version 0.9A is up... with a new and improved sound thanks to @FluBBa and his ARM Assembly SN76489 core! Massive thanks to @FluBBa for explaining it to me with patience - he's far ahead of me on this stuff. It still needs tweaking and it does come at a cost of increased CPU bandwidth - but I think the smoother overall sound will be worth it!

I also fixed most of the pops as you go into and out of menus... except the very first time it enables the sound. I'll clean that up soon.

https://github.com/wavemotion-dave/ColecoDS
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Our first official release in 10 years! The last public release by Alekmaul was 2.1 (though he was working on 3.0).

Version 3.0: https://github.com/wavemotion-dave/ColecoDS

1637237707194.png


  • Resurrected from the ashes. First new release in 10 years.
  • Super Game Module support.
  • MegaCart Bankswitching support (up to 512k).
  • High Score support.
  • New sound core.
  • Full speed video rendering even on older DS.
  • Command-line support for TWL++ integration.
  • Major Cleanup across the board.
 

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
361
Trophies
0
Age
39
XP
1,487
Country
France
Hi Dave,

Is Turbo from SEGA working on your side ? (cannot select anything at the skill screen).

May I ask you just a cosmetic change : is that possible to highlight selection with a different colour or a darker grey in main menu ? Both light grey is a pain for our eyes IMHO.
 

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
361
Trophies
0
Age
39
XP
1,487
Country
France
No steering control is implemented yet. But you can easily find Turbo SCE which is the Standard Controller Edition which plays fine.

I’ll work on a better contrast for the highlight!

Thanks Dave, I was pretty sure that it did not work because of the missing dashboard + steering wheel but I thought it could go ingame. I did not know about the SCE version, I will try it right now :)

EDIT : found it, but this is not an official release, that is why I did not know about it. Only 25 copies were sold ?! Working at 60fps thanks to your emu on old HW.
 
Last edited by CrashMidnick,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
591
Trophies
1
XP
4,057
Country
United States
Cool @CrashMidnick! Yeah, there are SCE editions of like 4 or 5 games that had odd controllers... Turbo SCE and Frontline SCE are the two I play the most. With controller keypad mapping, Frontline is very playable on the handheld!

I just checked in a version with a darker grey highlight... it might be too dark but it's higher contrast for sure. I also slowed down the initial auto-scroll of game titles - so you have a chance to read it!
 

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
361
Trophies
0
Age
39
XP
1,487
Country
France
Cool @CrashMidnick! Yeah, there are SCE editions of like 4 or 5 games that had odd controllers... Turbo SCE and Frontline SCE are the two I play the most. With controller keypad mapping, Frontline is very playable on the handheld!

I just checked in a version with a darker grey highlight... it might be too dark but it's higher contrast for sure. I also slowed down the initial auto-scroll of game titles - so you have a chance to read it!

Thank you so much !!!
 
General chit-chat
Help Users
    KennieDaMeanie @ KennieDaMeanie: Nah that's just about my ex