Page 2 of 2

Re: SMSPlus for the Atari falcon

Posted: Wed Apr 18, 2018 12:55 pm
by christos
Unless you rework each game like Anima did with the x68k and the Neo Geo games there is no way you can emulate it on a standard Falcon. Megadrive should be unlikely on a CT60 without supervidel either way. Genecyst the oldest emulator needed a pentium with 8MB of RAM to work so it is within the CT60 capabilities but, converting the graphics format should be what would stop it. Still you could use the DSP for sound emulation so you'd gain some cycles there.
Either way, it should make for some good exercise for someone with lots of free time and willingness to convert the 68k emulator from x86 assembly to 68060.

Re: SMSPlus for the Atari falcon

Posted: Wed Apr 18, 2018 6:30 pm
by Foxie
christos wrote:Unless you rework each game like Anima did with the x68k and the Neo Geo games there is no way you can emulate it on a standard Falcon. Megadrive should be unlikely on a CT60 without supervidel either way. Genecyst the oldest emulator needed a pentium with 8MB of RAM to work so it is within the CT60 capabilities but, converting the graphics format should be what would stop it. Still you could use the DSP for sound emulation so you'd gain some cycles there.
Either way, it should make for some good exercise for someone with lots of free time and willingness to convert the 68k emulator from x86 assembly to 68060.


I looked up some information about the Mega Drive video. I'd say it's just within the capabilities of the 68030 if you had an insane programmer. The Mega Drive is actually chunky, but it's four bits per pixel with two pixels in a byte. You could do the conversion in two ways. You could have a lookup table of longwords, take a byte from Mega Drive and convert to 16 bit truecolour (two pixels). Fast conversion, but truecolour mode slows the Falcon down.

Second way is to run in 4 bit planar. There's a little trick you can do. The Mega Drive has a tiny separate VRAM, but it doesn't have a frame buffer. It builds its picture out of small tiles like the SNES and NES. The VRAM isn't memory mapped, I doubt a game will change the contents of VRAM very often. You do your chunky to planar conversion when the contents of VRAM is changed. You store a copy of the contents of VRAM already converted into planar mode. Then you can draw the screen from the pre-converted pixels very quickly with movem or blitter.

I don't know if you can get 50fps, you can probably make it fast enough to play. Of course you don't emulate the 68000, you just run the code directly. I doubt Mega Drive games do any sync tricks, no need to be cycle exact.

Re: SMSPlus for the Atari falcon

Posted: Thu Apr 19, 2018 7:44 am
by shoggoth
The Mega Drive contains a Z80 as well as a 68000. It could be within reach for a 060 class machine, but I can't see a generic emulator happening for a stock 68030 falcy. "just" running the 68k code natively is not necessarily an easy task either.

Re: SMSPlus for the Atari falcon

Posted: Thu Apr 19, 2018 4:28 pm
by BlankVector
shoggoth wrote:The PSG is emulated using the YM-chip, because they're fairly similar. Periodic noise is approximated when possible, and the noise channel is simulated by using free channels or by enabling noise on some other channel with roughly the same volume.

Exactly what I had imagined to do!
I would love to hear an SMS music player on ST, using that technique.

Re: SMSPlus for the Atari falcon

Posted: Fri Apr 20, 2018 4:40 pm
by Foxie
BlankVector wrote:I would love to hear an SMS music player on ST, using that technique.


If someone wants to make a player, here's the documentation of the VGM format: http://www.smspower.org/uploads/Music/vgmspec170.txt

It supports PSG and also YM2413 FM chip (found in FM melody maker cartridge for Atari).

Re: SMSPlus for the Atari falcon

Posted: Sat Jun 16, 2018 3:08 am
by leech
shoggoth wrote:The Mega Drive contains a Z80 as well as a 68000. It could be within reach for a 060 class machine, but I can't see a generic emulator happening for a stock 68030 falcy. "just" running the 68k code natively is not necessarily an easy task either.


I wonder if something like a Z80 in a cartridge would work? Afterall, we can't directly plug in Genesis controllers into a Falcon, we would either need an adapter to the extended ports, or a hardware addition, right? Or does the Falcon's keyboard lock up with the controllers like the ST does?

Re: SMSPlus for the Atari falcon

Posted: Sat Jun 16, 2018 9:07 am
by shoggoth
leech wrote:
shoggoth wrote:The Mega Drive contains a Z80 as well as a 68000. It could be within reach for a 060 class machine, but I can't see a generic emulator happening for a stock 68030 falcy. "just" running the 68k code natively is not necessarily an easy task either.


I wonder if something like a Z80 in a cartridge would work? Afterall, we can't directly plug in Genesis controllers into a Falcon, we would either need an adapter to the extended ports, or a hardware addition, right? Or does the Falcon's keyboard lock up with the controllers like the ST does?


Doubt it. That Z80 will need to interface to the virtual hardware in the emulator, and that's likely to be tricky and time consuming too..

Re: SMSPlus for the Atari falcon

Posted: Sat Jun 16, 2018 4:55 pm
by leech
I was thinking something along the lines of the Spectre GCR and how it works (though I guess that's mostly just mac roms.)

Re: SMSPlus for the Atari falcon

Posted: Sat Jun 16, 2018 5:00 pm
by shoggoth
leech wrote:I was thinking something along the lines of the Spectre GCR and how it works (though I guess that's mostly just mac roms.)


Yep. No Z80 in there. Also emulating a 68k mac is basically a case of patching the ROMs and virtualising supervisor mode. It's a lot trickier to re-use the 68k CPU in e.g. a Mega Drive, especially if you need scan/cycle accuracy. Anima has done some great things in this area though, but my guess it also depends quite a bit on the platform you wish to emulate.

Re: SMSPlus for the Atari falcon

Posted: Sat Jun 16, 2018 5:04 pm
by leech
shoggoth wrote:
leech wrote:I was thinking something along the lines of the Spectre GCR and how it works (though I guess that's mostly just mac roms.)


Yep. No Z80 in there. Also emulating a 68k mac is basically a case of patching the ROMs and virtualising supervisor mode. It's a lot trickier to re-use the 68k CPU in e.g. a Mega Drive, especially if you need scan/cycle accuracy. Anima has done some great things in this area though, but my guess it also depends quite a bit on the platform you wish to emulate.


Ha, yeah I wasn't thinking there was. Just that we could put extra chips in a cartridge if we needed to. I would think a stock Falcon would be able to handle most things from the Mega Drive, but I think it'd require a lot of DSP work, right?

My point about the controllers locking up the keyboard still stand though, SMS controllers at least don't do that.