Genesis / Megadrive core ported to MiST
Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team
Re: Genesis / Megadrive core ported to MiST
The article is a bit confusing as it first says DMA enable flag just mask CD5 write retaining it from previous write, but later says CD5 gets cleared at the end of DMA operation. If CD5 is cleared after DMA, then there is no point to talk it's retained if DMA enable flag isn't set.
Effectively CD5 won't set if DMA enable flag is not set and always cleared after DMA operation. CD5 cannot be re-used for next DMA operation (well, if article is correct).
Effectively CD5 won't set if DMA enable flag is not set and always cleared after DMA operation. CD5 cannot be re-used for next DMA operation (well, if article is correct).
- MasterOfGizmo
- Atari God
- Posts: 1345
- Joined: Fri Feb 08, 2013 12:15 pm
- Contact:
Re: Genesis / Megadrive core ported to MiST
They also mention some tests. They may have test cartridges helping us to debug this stuff.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki
Re: Genesis / Megadrive core ported to MiST
Great work and good effort on all games tested: Super Hang-On, OutRun, Top Gear II, Lotus II, Fire Shark, Twin Hawk, Sonic, Ghouls'n'Ghosts, Streets of Rage II and others work properly.
I hear no sound in Batman (one of the first cartridge released for this great console).
But now Thunder Force III, Gynoug, Wonderboy III have sound !!!

I hear no sound in Batman (one of the first cartridge released for this great console).
But now Thunder Force III, Gynoug, Wonderboy III have sound !!!

Last edited by DanyPPC on Sun Oct 14, 2018 11:45 am, edited 1 time in total.
Re: Genesis / Megadrive core ported to MiST
http://nemesis.hacking-cult.org/MegaDri ... esting.zipMasterOfGizmo wrote:They also mention some tests. They may have test cartridges helping us to debug this stuff.
And it has source code, too.
Re: Genesis / Megadrive core ported to MiST
The example is about the case when the DMA Fill is in pending state, then even if you disable DMA, rewrite CODE with CD5=0, the DMA fill will still start after the next write to the data port. But IMHO this can be because the pending fill state, not because CD5 is still set.Sorgelig wrote:The article is a bit confusing as it first says DMA enable flag just mask CD5 write retaining it from previous write, but later says CD5 gets cleared at the end of DMA operation. If CD5 is cleared after DMA, then there is no point to talk it's retained if DMA enable flag isn't set.
Effectively CD5 won't set if DMA enable flag is not set and always cleared after DMA operation. CD5 cannot be re-used for next DMA operation (well, if article is correct).
But somehow it is necessary to clear CD5, in Lotus, it tries to upload to CRAM with CD=23h, which means DMA still set. In Exodus, it is 13h, so it cleared CD5, and set CD4, but that is another flag. Unfortunately just implementing clearing CD5 after DMA end caused bugs in other games for me, too.
Last edited by slingshot on Sun Oct 14, 2018 8:57 am, edited 1 time in total.
Re: Genesis / Megadrive core ported to MiST
Another game with a CPU "bug", Gargoyles:
http://gendev.spritesmind.net/forum/vie ... les#p30130
Must break the TAS instruction, which is broken in the Mega Drive.
http://gendev.spritesmind.net/forum/vie ... les#p30130
Must break the TAS instruction, which is broken in the Mega Drive.
Re: Genesis / Megadrive core ported to MiST
Just a curiosity. Now Outrunners is playable again, it doesn't hang anymore, but title screen flashes a lot
.
Anyway, this core is getting better and better, and it sounds also very well!
Thanks very much for your great work!
Regards,
Salva

Anyway, this core is getting better and better, and it sounds also very well!

Thanks very much for your great work!
Regards,
Salva
Just a computer and videogame lover
- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board
Re: Genesis / Megadrive core ported to MiST
and how it affects this game?slingshot wrote:Another game with a CPU "bug", Gargoyles:
http://gendev.spritesmind.net/forum/vie ... les#p30130
Must break the TAS instruction, which is broken in the Mega Drive.
Re: Genesis / Megadrive core ported to MiST
When I start the game, there's just a blank screen, with some grey sprite is flashing, then I die.Sorgelig wrote:and how it affects this game?slingshot wrote:Another game with a CPU "bug", Gargoyles:
http://gendev.spritesmind.net/forum/vie ... les#p30130
Must break the TAS instruction, which is broken in the Mega Drive.
Re: Genesis / Megadrive core ported to MiST
Seems if you switch to PAL mode after it started, everything is normal. Maybe just a bug with one timing value in NTSC mode.vebxenon wrote:Just a curiosity. Now Outrunners is playable again, it doesn't hang anymore, but title screen flashes a lot.
-
- Captain Atari
- Posts: 311
- Joined: Sun May 15, 2016 3:44 pm
Re: Genesis / Megadrive core ported to MiST
What is the latest revision number - fpgagen-beta_20181013.rbf ? Is it in the community the current best be it beta or not? Sega systems are perhaps my most desired FPGA cores, and if any are near perfect, a single little tear of joy forms in my eye.
Re: Genesis / Megadrive core ported to MiST
Does anyone know how Exodus identify SSF2 and enables the mapper? Or how to patch Titan Overdrive 2 to make it recognized in Exodus as SSF2 (and enable the mapper)?
I've studied Exodus sources but they are so much obfuscated - no any mention about mapper, SSF2 or Super Street Fighter 2 or anything sounding like this.
And more funny: exodus crash in Visual Studio 2017 when i try to run in debug mode and then load SSF2. It works with other ROMs under debugging but crash with SSF2...
I've studied Exodus sources but they are so much obfuscated - no any mention about mapper, SSF2 or Super Street Fighter 2 or anything sounding like this.
And more funny: exodus crash in Visual Studio 2017 when i try to run in debug mode and then load SSF2. It works with other ROMs under debugging but crash with SSF2...
Re: Genesis / Megadrive core ported to MiST
i've implemented TAS bug in the new release - Gargoyles work.
Also Lotus Turbo Challenge is fixed.
Also Lotus Turbo Challenge is fixed.
Re: Genesis / Megadrive core ported to MiST
It seems TAS bug affects Jim Power in opposite way - now this game looks like with old CPU - full of cherry stripes.
Re: Genesis / Megadrive core ported to MiST
GoodSorgelig wrote:i've implemented TAS bug in the new release - Gargoyles work.
Also Lotus Turbo Challenge is fixed.

I wonder if this CPU bug can be triggered externally with TG68k, I bet SEGA didn't put broken CPUs in the Gensis, just there's a bug in some external part.
Meanwhile I fixed a ton of VDPFifoTest errors (mostly low-hanging fruits), but the most broken part seems to be DMA FILL. For example the fill value should go to FIFO, just don't understand how the DMA engine will know it.
Re: Genesis / Megadrive core ported to MiST
Sorry if it is not good enough. But trying harderseastalker wrote:What is the latest revision number - fpgagen-beta_20181013.rbf ? Is it in the community the current best be it beta or not? Sega systems are perhaps my most desired FPGA cores, and if any are near perfect, a single little tear of joy forms in my eye.

Re: Genesis / Megadrive core ported to MiST
Just bug'gin write_back <= '1' seems to work for both gamesSorgelig wrote:It seems TAS bug affects Jim Power in opposite way - now this game looks like with old CPU - full of cherry stripes.
Code: Select all
set_exec_tas <= '1';
IF TASbug = 0 THEN
write_back <= '1';
datatype <= "00"; --Byte
END IF;
IF opcode(5 downto 4)="00" THEN
set_exec(Regwrena) <= '1';
END IF;
Re: Genesis / Megadrive core ported to MiST
if i remember correct it produces the problem for both games for meslingshot wrote:Just bug'gin write_back <= '1' seems to work for both games

Re: Genesis / Megadrive core ported to MiST
It seems to be OK here, maybe try againSorgelig wrote:if i remember correct it produces the problem for both games for meslingshot wrote:Just bug'gin write_back <= '1' seems to work for both games

Re: Genesis / Megadrive core ported to MiST
actually the re-bug is not entirely correct as it should prevent to write to memory, but if target is not memory, then it should write.
Re: Genesis / Megadrive core ported to MiST
ok. Re-checked it - both works.
Re: Genesis / Megadrive core ported to MiST
I don't know how to differentiate. So write_back is not just for memory? Maybe Till can make a better fix.Sorgelig wrote:actually the re-bug is not entirely correct as it should prevent to write to memory, but if target is not memory, then it should write.
- MasterOfGizmo
- Atari God
- Posts: 1345
- Joined: Fri Feb 08, 2013 12:15 pm
- Contact:
Re: Genesis / Megadrive core ported to MiST
It's not a cup bug. The tas instruction forcefully does two uninterruptible subsequent bus cycles to make sure it's an atomic operation. Some versions of the vdp did not cope with that. E.g. the Amiga also didn't cope with it and you shouldn't use the tas instruction there.slingshot wrote: I wonder if this CPU bug can be triggered externally with TG68k, I bet SEGA didn't put broken CPUs in the Gensis, just there's a bug in some external part.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki
Re: Genesis / Megadrive core ported to MiST
Tested a lot of games in alphabetical order, if it can help you, the following ones have graphic and sprites problems:
- Aladdin
- Blades of Vengeance
- Chaos Engine
- Cliffhanger
- Golden Axe II
- Hook
- Lotus Turbo Challenge
- Power Drive
- Rolling Thunder 2
- Shinobi III
- Story of Thor (doesn't work)
The following have audio problems:
- Batman
- Battle Squadron
- various...
Continue with test. But now most games work.
- Aladdin
- Blades of Vengeance
- Chaos Engine
- Cliffhanger
- Golden Axe II
- Hook
- Lotus Turbo Challenge
- Power Drive
- Rolling Thunder 2
- Shinobi III
- Story of Thor (doesn't work)
The following have audio problems:
- Batman
- Battle Squadron
- various...
Continue with test. But now most games work.
Re: Genesis / Megadrive core ported to MiST
Golden Axe II? I almost played to the end, didn't notice any problems.DanyPPC wrote:Tested a lot of games in alphabetical order, if it can help you, the following ones have graphic and sprites problems:
- Golden Axe II
Tried some others, too, and besides a window plane problem in Rolling Thunder II, I didn't see problems (Lemmings 2 still OK, so must be another bug). I couldn't find Chaos Engine ROM.
Last edited by slingshot on Sun Oct 14, 2018 8:25 pm, edited 1 time in total.