ColecoDS - Improved

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
Happy new year Dave ! Thanks for this last 2021 release :)
Hey! I’ve still got 9 more hours. Maybe I’ll start and release another emulator tonight!!

😁😆

I did check in 4.9c with a new 3/4 frame skip option (show 3 out of 4 frames) mainly for the DS-Lite users who only need a little speed up to make the new Z80 core run fast enough. 3/4 mode is visually indistinguishable from showing all frames on every game I’ve tried so far.
 

Cris1997XX

Well-Known Member
Member
Joined
Oct 31, 2021
Messages
140
Trophies
0
Age
21
XP
367
Country
Italy
Hey! I’ve still got 9 more hours. Maybe I’ll start and release another emulator tonight!!

😁😆

I did check in 4.9c with a new 3/4 frame skip option (show 3 out of 4 frames) mainly for the DS-Lite users who only need a little speed up to make the new Z80 core run fast enough. 3/4 mode is visually indistinguishable from showing all frames on every game I’ve tried so far.
Can't wait to see you update another emulator before the year ends! lol
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
Coming soon... very soon!

1641048909768.png
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
Awesome ! Some really good stuff on this computer :) thanks a lot :)
Don't get too excited... I'm only supporting basic carts up to 32K in size and an MSX computer with 16K of RAM. That's pretty bare-bones - but enough to run a few hundred game carts like Pippols or Castle Excellent. This is, after all, a Colecovision emulator and the bonus systems are only partially supported... but it should open up some additional great games to enjoy!

On the good news front: the MSX emulation will support the fast DrZ80 core so these games will run smoothly on the older DS-LITE hardware :)
 

Cris1997XX

Well-Known Member
Member
Joined
Oct 31, 2021
Messages
140
Trophies
0
Age
21
XP
367
Country
Italy
Don't get too excited... I'm only supporting basic carts up to 32K in size and an MSX computer with 16K of RAM. That's pretty bare-bones - but enough to run a few hundred game carts like Pippols or Castle Excellent. This is, after all, a Colecovision emulator and the bonus systems are only partially supported... but it should open up some additional great games to enjoy!

On the good news front: the MSX emulation will support the fast DrZ80 core so these games will run smoothly on the older DS-LITE hardware :)
Can we have MSX2 support, pretty please? *puppy eyes*
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
https://github.com/wavemotion-dave/ColecoDS

V5.0: 02-Jan-2022 by wavemotion-dave
  • MSX1 game support up to 32K Standard Loader (.msx format)
  • New 3/4 Frameskip (show 3 of 4 frames) to help DS-LITE

1641134300575.png


It's a big one... just happened to fall on the 5.0 release (I don't put much stock in version numbers - it's just a way to distinguish releases for me... but a happy coincidence that this fell on a nice boundary!)

The MSX1 computer standard was used by a large number of manufacturers to produce (mostly) compatible computers in the mid 1980s. This standard picked easy to use and off-the-shelf chips popular in the day - this included the Zilog Z80 CPU (at 3.58Mhz), the TMS9918/TMS9928 video chip and the AY-3-8910 sound chip. Do these chips sound familiar? If you're read through this lengthy semi-blog of a thread, you'll know that's pretty much the Colecovision hardware - the main difference is the sound chip which is already supported by ColecoDS as it's included in the "Super Game Module" (by design of the SGM creator - mainly to make MSX ports easier).

Now ColecoDS is not an MSX emulator. But I've put in enough handling to support up to 32K standard cartridges - this includes several hundred games. Not every game works - I picked 100 of the most popular games (or at least games I've heard of) and exactly 10 of them wouldn't load right... the other 90% seemed to run fine. I've mapped the Colecovision touch-screen controller to produce keyboard input 0-8, 9=F1, *=Space, #=Return which is good enough to start/run the games. Think of this as a kind of hypothetical "MSX Expander for your Colecovision" to allow you to enjoy more games.

A few of the games have exposed a bug in my AY sound chip handling that didn't show up with any of the games on the Colecovision Super Game Module. I'll fix that eventually - it manifests itself as a background noise on a few games only.

I'm emulating a MSX1 machine with 32K of main RAM - that's pretty "bare bones" but good enough to run a wide variety of classic games.

Some of the games will run with the faster DrZ80 core - but I've enabled the slower/accurate CZ80 core for the MSX emulation as a default - you can use the new 'Show 3/4' Frameskip option if you have a DS-LITE and that should get you running at full speed. DSi and above will enjoy full speed at the full framerate.

No user-supplied BIOS is needed as I'm using a built-in C-BIOS which is open-source. See the cbios.txt for license (required that I include this for use of the free BIOS replacement).

Now, go enjoy some Pippols!
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
You're quite welcome, Jibaru.

I spent the afternoon getting in some basic memory mapper support... but it's not pretty. The emulator is hand-tuned for a 64K dedicated memory space for the Colecovision - and to make larger games work, I move big chunks of memory around. This isn't the ideal way to do it - it should be just moving pointers around rather than large chunks of memory... but I'm not about to re-write the emulation core here to support MSX mega ROM games - this remains a Colecovision emulator. The MSX is a deep hole with all kinds of special carts, memory layouts, cart-mapped sound chips, etc - I'm trying not to get sucked in too deep!

Having said that... I did manage to get some of the more simple 128K games working... Gradius/Nemesis, Maze of Galious, Penguin Adventure, Valis, Fairly Land Story all seem to run fine on the DSi with the faster DrZ80 core (they slow down if you use the slower/accurate CZ80 core). The more complicated games like Salamander, Parodius, etc. are all just too slow even on the DSi with all the memory being moved around. Such is life! I will release the memory mapper support in the next version if only to play another half-dozen great games.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
https://github.com/wavemotion-dave/ColecoDS

V5.1: 03-Jan-2022 by wavemotion-dave
  • MSX1 emulation now supports some of the common "mega mappers" - some of the 128K games work but you'll probably have to turn off Vert Sync and turn on Frame Skip to get it to run full speed.
  • MSX1 emulation is now 64K Main RAM
I've released the new version with basic MSX mapper support... only a handful of games will really run with these new mappers but they are damn fine games. Try Gradius, Maze of Galious, Penguin Adventure, Valis, Fairly Land Story. You may have to turn on Frame Skip and turn off Vertical Sync to get them full speed on the DSi.

I also switched in 64K of main emulated RAM which helps more games run. Of the 10/100 that didn't run before, 7 of them are now running for a (rough) 97% compatibility on normal-mapper (32K or less) games. For the new mega-mapper games, the compatibility is way lower. Many of those carts have special sound chips or other features (SRAM, etc) that I'm not emulating.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
Not ready for a new build but did check in 5.1a with support for 256K and 512K MSX mega-ROMs as well as the ASCII 16K mapper. These are among the biggest games supported on the platform (in theory they can go bigger... but in practice nothing other than demo software has). There isn't too much playable at those extreme sizes due to the large memory management - but surprisingly a few great games work - try Dragon Slayer IV or Eggerland Mystery 2.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
https://github.com/wavemotion-dave/ColecoDS

V5.2: 04-Jan-2022 by wavemotion-dave
  • MSX1 now supports 256K and 512K mega ROMs.
  • AY Sound core re-written so noise and envelopes work (not perfectly accurate but good enough).
  • Optional you can use msx.rom BIOS if found in the usual places.

Another big one... re-wrote the AY sound handler which fixes noise and un-breaks envelopes. Noise was an easy fix - and now some of the little missing sounds like ship explosions and such are fully emulated. That has been a long-standing bug in the AY sound core ... in the past that only affected a few Colecovision Super Game Module games but now with MSX support there are hundreds of games that use the AY sound core - and those should be sounding much more accurate.

Also the volume envelope is finally "working". It's been completely broken since day 1... and now it works but is not accurate. Still, this solves all of the high-pitch noises that plagued some games (Boulder Dash, Sinbad, Driller Tanks, Joe Blade and others). I haven't got the timing right yet... so while the sounds are much better (not having a high-pitched background noise while you're playing is a huge step in the right direction!), it's also not as accurate as it can be. I'll work on this in the near future.

I gained a bit of speed on the larger megaroms... but lost a little speed with the new AY sound core. Call it a wash more or less.

I also discovered that a few games assume a real MSX bios - mostly due to bad programming they make direct calls and assume locations of some routines. So I've provided the ability to use the real msx.rom bios. To be honest, I really like the built-in C-BIOS for 99% of games but the choice is yours if you want to run with a real BIOS. There are about 100 different MSX machines - no idea if some BIOS is better than others... which is mostly why I like the open-source C-BIOS :)

For those that are curious... Sound Envelopes are supported by the AY sound chip (but not the Colecovision SN sound chip). This allows a programmer to set a pattern and the chip will automatically change the volume over time to produce sound effects. This can be a rising tone, falling tone, oscillating tone, etc. Here is the AY envelop shape chart direct from the datasheet for the chip. I'm emulating all this now - but I don't have the timing quite right so the sounds might end a little sooner or extend a bit longer due to the way I'm clocking the envelope counter. I think I can fix this.

1641350494120.png
 

Cris1997XX

Well-Known Member
Member
Joined
Oct 31, 2021
Messages
140
Trophies
0
Age
21
XP
367
Country
Italy
https://github.com/wavemotion-dave/ColecoDS

V5.2: 04-Jan-2022 by wavemotion-dave
  • MSX1 now supports 256K and 512K mega ROMs.
  • AY Sound core re-written so noise and envelopes work (not perfectly accurate but good enough).
  • Optional you can use msx.rom BIOS if found in the usual places.

Another big one... re-wrote the AY sound handler which fixes noise and un-breaks envelopes. Noise was an easy fix - and now some of the little missing sounds like ship explosions and such are fully emulated. That has been a long-standing bug in the AY sound core ... in the past that only affected a few Colecovision Super Game Module games but now with MSX support there are hundreds of games that use the AY sound core - and those should be sounding much more accurate.

Also the volume envelope is finally "working". It's been completely broken since day 1... and now it works but is not accurate. Still, this solves all of the high-pitch noises that plagued some games (Boulder Dash, Sinbad, Driller Tanks, Joe Blade and others). I haven't got the timing right yet... so while the sounds are much better (not having a high-pitched background noise while you're playing is a huge step in the right direction!), it's also not as accurate as it can be. I'll work on this in the near future.

I gained a bit of speed on the larger megaroms... but lost a little speed with the new AY sound core. Call it a wash more or less.

I also discovered that a few games assume a real MSX bios - mostly due to bad programming they make direct calls and assume locations of some routines. So I've provided the ability to use the real msx.rom bios. To be honest, I really like the built-in C-BIOS for 99% of games but the choice is yours if you want to run with a real BIOS. There are about 100 different MSX machines - no idea if some BIOS is better than others... which is mostly why I like the open-source C-BIOS :)

For those that are curious... Sound Envelopes are supported by the AY sound chip (but not the Colecovision SN sound chip). This allows a programmer to set a pattern and the chip will automatically change the volume over time to produce sound effects. This can be a rising tone, falling tone, oscillating tone, etc. Here is the AY envelop shape chart direct from the datasheet for the chip. I'm emulating all this now - but I don't have the timing quite right so the sounds might end a little sooner or extend a bit longer due to the way I'm clocking the envelope counter. I think I can fix this.

View attachment 292418
All the MXS games I have are .rom, it'd be great to see support for that format in ColecoDS
 
  • Like
Reactions: CrashMidnick

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
I am going to try an auto-detect since almost all game binaries for this emulator (Coleco, Sord M5 and MSX) tend to have the extension .rom. I had to rename mine to .msx to get them to load but hopefully there are some bytes in the rom header that I can use to try and auto-detect. It's also done this way so TWL++ can figure out what emulator to call. Really, all game ROMs should have unique extensions: .a26, .a52, .a78, .xex, .sg, .m5, .col, .int, .msx, etc.

I just checked in 5.2a with a sound speed improvement. Originally I supported SN sound (Coleco) and then AY (for Super Game Module) but when AY support is in, it mixes SN + AY as a real Super Game Module would. I never considered that there might be an AY only mode which is exactly what the MSX provides. So now I have the third mode of AY only - and that gives a 10% speedup on MSX1 games as I don't have to mix in the SN sound channel! Gradius is now playable full-speed with no speedup/frameskip needed. Many other megarom games are now playable at full speed (though on many you still have to disable Vertial Sync and/or enable frameskip). This should also significantly help MSX1 games on the older DS-LITE.


Edit: looks like there are some header bytes for MSX (first 2 bytes AB) vs Colecovision (first two bytes AA55 or 55AA). It's a little less clear on Sord M5 and SG-1000 which don't seem to have anything unique to trigger on.

Edit2: @Cris1997XX - just checked in 5.2b with support for auto-detecting MSX1 .ROM files.
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
Thanks Dave, it will be easier to share roms with msxDS :)
Just a little OT : do you think that the Z80 core can be adapted to AMEDS ?

I can already see the benefit of having these in .rom extension for the exact reason you mention... loadable by other MSX emulators (we have 3 now at least!)

Having said that, it makes it harder for TWL++ which can only base things off the .ext

I will try to figure out what is unique in .sg and .m5 games though there are far fewer of those.

Speaking of games... with MSX1 support nearing higher level of compatibility - there are now hundreds of new games to play on ColecoDS. My original allocation of 400 game configs and 400 game high scores might not be sufficient. Most people won't find 400 playable games... but some might. I think for the next release I'll auto-update the DB from 400 to 600 (I don't want it too big - I'd prefer it fit on a couple of flash sectors on the SD at most). This update should be seamless (no loss of configs or scores).

As for Amstrad CPC support... I've no idea. The Z80 is clocked at 4MHz which I'm sure we could handle and the sound chip is the aforementioned AY chip which is also no problem... but the video driver is radically different with resolutions that aren't exactly ideal. From wikipedia:

Underlying a CPC's video output is the unusual pairing of a CRTC (Motorola 6845 or compatible) with a custom-designed gate array to generate a pixel display output. CPC6128s later in production as well as the models from the plus range integrate both the CRTC and the gate array's functions with the system's ASIC.

Three built-in display resolutions are available: 160×200 pixels with 16 colours ("Mode 0", 20 text columns), 320×200 pixels with 4 colours ("Mode 1", 40 text columns), and 640×200 pixels with 2 colours ("Mode 2", 80 text columns).[25] Increased screen size can be achieved by reprogramming the CRTC.


So even if the CPU could be mostly reused and the sound chip is fine... the video stuff would be a big haul.
 

CrashMidnick

Well-Known Member
Member
Joined
Jul 22, 2015
Messages
443
Trophies
0
Age
39
XP
1,760
Country
France
Having said that, it makes it harder for TWL++ which can only base things off the .ext

I forgot about that, @RocketRobz will have some homework :rofl2:

So even if the CPU could be mostly reused and the sound chip is fine... the video stuff would be a big haul.

Sorry I am not a dev so even if I understand what you said, I do not know what it implies. To me what alekmaul did about this emu is really good except the sound and some roms that are playing too fast IIRC. So I do not know if you can mix your code and the one from Alekmaul to improve sound and accuracy. Well it was just a little OT, I will not ask this here anymore ;)
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
687
Trophies
1
XP
4,791
Country
United States
No worries at all, @CrashMidnick. As far as I'm concerned, we're all friends and there isn't anything OT in one of my threads!

The mods in this area seem pretty relaxed anyway... even my double (and triple) posts don't get merged/flagged... maybe I've bought myself a little bit of goodwill with my efforts :D

Anyway... I have no doubt that I could ask Alek from the sources to AMEDS and get it humming (fix speed / sound). But it's always a matter of time/effort for the payoff... and in my case the payoff is playing more classic games. Most of the Amstrad stuff I want to play, I can do on ZXDS so my motivation is not high. As an American, the ZX, CPC and BBC Micro weren't household names (as a kid, I had heard of exactly zero of them!). I tend to put most of my effort into the systems I had used as kid - if only for this 50 year old to recapture a bit of the simplicity of being 10 again.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    AliceCE @ AliceCE: