Draco-DS - A Dragon / Tandy CoCo Emulator

  • Thread starter Thread starter wavemotion
  • Start date Start date
  • Views Views 5,286
  • Replies Replies 87
  • Likes Likes 18
This was a LONG 'effing day. But I got it :)

1751232909462.png
 
Okay... so here's the 'State of the Dragon' Address.

Many things are working now... it's been a bit of a struggle to get to a level of accuracy I'm happy with and there is a long way to go.

I started with the Dragon 32 Emulation (released under the generous MIT license) here:

https://sites.google.com/site/eyalabraham/dragon-32-computer

This is a Raspberry Pi Zero 'bare metal' emulator that handles the basics of a Dragon 32.

First off, I'm indebted to eyalabraham for the codebase - the code was as clean and as readable as anything I've encountered in my retro-travels over the past 5 years. A true joy to integrate.

Having said that... there were problems with the code. The CPU emulation was too slow for the venerable DS - but more importantly, the HALT emulation of the CWAI instruction was not correct and this caused problems in games like Dungeons of Daggorath that relied on it.

The PIA emulation is also very 'down the middle of the plate' - meaning that if someone is using it 'textbook', it will work... but it's not accurate enough for some games. For example, the VSYNC bit in the status register is set no matter whether VSYNC interrupts are enabled or not (that is, the VSYNC will toggle and stay active for the entire VSYNC flyback period whether or not the SW enables or disables interrupts... and some games like Time Bandit will poll it in a fast-loop). Secondly, it is possible for a game/program to reverse the use of columns/rows for keyboard scanning - and, once again, Time Bandits plays the role of spoiler by doing just that.

So the PIA emulation needed to be more generic - tracking which ports are configured as inputs and outputs and handling things more universally. I'm not done with that (right now I have a hack in place to let Time Bandits work).

Many IO Ports are also mirrored... though I haven't run into anything specifically that relies on it... but I'll probably make that work just in case.

Tandy CoCo and Dragon 32 both have non-centering Analog Joysticks (yuck!)... But I've managed to cobble together a reasonable analog joystick driver for the DS and it works pretty well. Most games will be playable.

Right now the emulation hits the DS pretty hard... the DSi can handle it but the DS can't... at least not yet.

I should have some kind of beta available by next weekend if all goes well.

Oh... and I did start a repository for the emulator... just a few graphics up there. But feel free to STAR it :)
 
Things are starting to shape up nicely! I figured out one mystery on keyboard scanning and another mystery on why some games effectively use 256x192 but at only half the memory (VDG vs SAM).

You can now choose between Dragon 32 vs Tandy CoCo mode on a per-game basis... but you can also set it globally so if you are partial to the Tandy vs the Dragon, you can swap in a set of screens that make it seem more like one machine than the other.

When running a Tandy CoCo game, it runs at 60Hz NTSC and for the Dragon 32 it runs at 50Hz Pal.

1751371173252.png



Runs great on a DSi. Still haven't tried it on the DS-Lite/Phat yet... but I'm guessing some of the artificing modes won't run at full speed. I'll work on that eventually.
 
Hi Dave! :)

What a breakthrough! That's awesome!

I compiled the latest alpha version from your GitHub page to test it on my DS Lite.

But I'm stuck on the BIOS. I tried to install the ones used for Xroar, but without success. So I tried searching for the dragon32.rom and coco.rom files on the "color computer archive" website, but without success. Have you renamed the BIOS for use with DracoDS?
 
  • Like
Reactions: wavemotion
I compiled the latest alpha version from your GitHub page to test it on my DS Lite.
You are so impatient :D :)

I don't think it will work on the DS-Lite ... I'm doing byte-writes to LCD and that has to be converted to 16-bit word writes. The DSi allows byte-writes but the DS-Lite does not. I haven't even tried the DS-Lite yet. It's on my list to do.

In any event, you need 2 BIOS files.

dragon.rom - 16K
coco.rom - 16K

But most coco roms are in two 8K chunks... basic and extended basic. You have to glue these together with "copy" (windows) or "cat" (linux) to make a 16K... I think the extended basic is first and the normal basic is second.

I'll make it more flexible to load the 8K roms individually... but I didn't actually expect anyone to compile this yet!!
 
I admit I rushed this a bit! :lol:

But just to see the interface on my DS Lite, it was worth it! Don't expect any photos from me, I won't spoil anything!... except this :

DracoDS on ds Lite :
dragonegg.png

:D

Afterwards, I can't launch games, but at the same time, I tinkered more than I followed the instructions (I'm really lazy sometimes! :blush:):

For the Dragon BIOS, I simply renamed the "dragrom.rom" file to "dragon32.rom", and for the Tandy Coco, I used the "disk21.rom" file (the Coco 2.1 BIOS for emulators), which I renamed to "coco.rom". Even though I couldn't launch any games, it allowed me to see the interface and how it works.

Regarding the game format, do you plan to integrate the .dsk and .rom formats in the future?
 
Last edited by Indy13,
but it's the last of the 8-bit machines that has the 256x192 resolution of the DS/DSi

I found another, but it’s a niche one 😁😁

The Jupiter Ace

Only 5000 or so were ever sold. Used Forth as a programming language.

Remember playing with one back in the day at one of the many computer fairs I went to
 
Yep you are right about the 200E including the 80 column card and enhanced VDP.

You are forgetting about the awesome SAM Coupé (Aka The Super Spectrum) It's 8bit and it's screen resolution is 256x192 in mode 1 and mode 2 and mode 4. Only problem would be for games/software that uses mode 3 that runs at 512x192.

Basically I would love a Sam Coupé emu for DS :D

Me too, at one point I was saving up money to buy one (when they were new). Never happened, absolutely nobody had one and I couldn't be alone with nobody to pirate games off of. Like everything about the machine and people are still making demos for it.

Regarding the Dragon 32/64 I had only heard about it, today was the first time I saw games running on it. I hope you (OP) is successful in creating this. I'll try the "best of"-games... Only with consoles* have I had the patience to playtest every game, library for this doesn't seem surmountable though.

*consoles with hardware sprites that is.
 
Okay... first code running on the DS-Lite!
1751410718520.png


I got the text driver optimized by 50% and it now writes 32-bits at a time so it works properly on the DS-Lite/Phat. This is running unthrottled at ~70fps (50 for the Dragon would be full speed). No frameskip.

I tried an optimized high-rez graphics artifacting game and it ran only at 30fps... so that one needs some serious work. But if I have any modicum of skill in such retro emulators... it's in optimization. So I'm quite hopeful.
 
Okay... things are really shaping up. Just checked in a version of code that should work on DSi and DS-Lite/Phat roughly equally well. Got enough speed even for the artificing modes on all handhelds... on the DSi it's blazingly fast (almost 3X overclocked).

I should have a public beta in a couple of days... still have to write the readme file for the github page so people know how to use it. At this point I'd almost pay someone to write it for me :)

Some recommended games: Dungeons of Daggorath, Canyon Climber, Galagon, Time Bandit, Downland, Androne, Temple of Rom, Polaris and more!!!
 
I have working .DSK disk support for the Tandy Coco! Turns out it uses a controller chip that is nearly identical to the one used in the MSX which I had already designed for ColecoDS. Had to adapt things a bit as the CoCo uses a combination of polling and interrupts ... but it seems to work!

I also got preliminary 64K support working. Many 64K games work - but some do not. I'm 99% sure it has to do with the special "map upper RAM to lower bank" which my emulator is not setup for. Sadly, this makes Sailor Man unplayable... for now.
 
.CAS dont run
Ex. 3D LUNATTACK 1984.cas

Seems fine here on my DSi XL.

1751736394122.png
Maybe this?

Dragon vs Tandy Mode :​

The default mode is Tandy CoCo. You can change the default in Global Settings. You can also override on a per-game basis. Be sure to run games intended for the Dragon in Dragon mode (you should see the Dragon logo on the keyboard) and be sure to run Tandy CoCo games in Tandy mode (the Tandy Color Computer logo should be shown on the main keyboard graphic).
 
  • Like
Reactions: Indy13
20250705_232426.jpg


:grog: Thanks Dave !

Just an advice for the readme : i.e loading a CAS with START ---> wait for the end of loading to see "OK" on screen then Type EXEC.

Many will not understand this is a two steps loading process. Those like us who used the computer in the past and/or emulated it know that but new users I do not think so.
 
Last edited by CrashMidnick,

Site & Scene News

Popular threads in this forum