Genesis / Megadrive core ported to MiST

https://github.com/mist-devel/mist-board/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

DanyPPC
Captain Atari
Captain Atari
Posts: 359
Joined: Tue Feb 21, 2017 7:02 am

Re: Genesis / Megadrive core ported to MiST

Postby DanyPPC » Sat Oct 20, 2018 1:38 pm

Now are OK: Turrican, Cliffanger, Chaos Engine, Hook, Lotus Turbo Challenge, Shinobi 3, Rolling Thunder 2, Power Drive, Toki, Wolfchild, Winter Olympic Games.

The following have graphic problems: Super Skidmarks (menu), Test Drive II


This is a big update, :cheers:

slingshot
Captain Atari
Captain Atari
Posts: 246
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis / Megadrive core ported to MiST

Postby slingshot » Sat Oct 20, 2018 2:59 pm

DanyPPC wrote:Now are OK: Turrican, Cliffanger, Chaos Engine, Hook, Lotus Turbo Challenge, Shinobi 3, Rolling Thunder 2, Power Drive, Toki, Wolfchild, Winter Olympic Games.

The following have graphic problems: Super Skidmarks (menu), Test Drive II


This is a big update, :cheers:

Thanks for testing! Test Drive II is the first game I met which uses a non-standard horizontal resolution mode. It confuses the scandoubler only, still OK on a TV.

DanyPPC
Captain Atari
Captain Atari
Posts: 359
Joined: Tue Feb 21, 2017 7:02 am

Re: Genesis / Megadrive core ported to MiST

Postby DanyPPC » Sat Oct 20, 2018 3:47 pm

Thanks for the advice. I will test it on MISTICA which is connected to a standard PAL monitor.

Edit: tested with success. It's a good game for the Genesis. :angel:

User avatar
Xtro
Atari User
Atari User
Posts: 42
Joined: Fri Jan 09, 2015 11:47 am
Location: Spain

Re: Genesis / Megadrive core ported to MiST

Postby Xtro » Sat Oct 20, 2018 4:23 pm

Thanks for the updated core, never thought MiST could be abble to reproduce Megadrive to this level, most games run OK. Could it be possible to implement scanlines?

desUBIKado
Atari freak
Atari freak
Posts: 66
Joined: Sat Jan 06, 2018 11:49 pm

Re: Genesis / Megadrive core ported to MiST

Postby desUBIKado » Sat Oct 20, 2018 5:49 pm

Thank you for last update. The sound is fantastic. A great job. Jotego, you are "el puto amo". I notice on this core, the keyboard is not mapping with any key. In older cores, ENTER key is mapping to START button and SHIFT key to SELECT / C button. Could be possible to implement this functionality again? It is useful for those people who only have DB9 gamepad or joysticks

User avatar
jotego
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 122
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby jotego » Sun Oct 21, 2018 7:28 am

Thank you for this update.

I have prepared a verilator simulation just for JT12 that outputs sound. I use .gym files as input. I have verified that Turrican sounds correctly on simulation. So the sound issue must be related to the interface or CPU. Maybe this game uses the M68000 to communicate with the YM2612 and that is failing in the current system.

User avatar
jotego
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 122
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby jotego » Sun Oct 21, 2018 7:29 am

DanyPPC wrote:Now are OK: Turrican, Cliffanger, Chaos Engine, Hook, Lotus Turbo Challenge, Shinobi 3, Rolling Thunder 2, Power Drive, Toki, Wolfchild, Winter Olympic Games.


Turrican? I still get wrong sound with this one. Did you mean Mega Turrican or Turrican?

slingshot
Captain Atari
Captain Atari
Posts: 246
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis / Megadrive core ported to MiST

Postby slingshot » Sun Oct 21, 2018 8:31 am

jotego wrote: Maybe this game uses the M68000 to communicate with the YM2612 and that is failing in the current system.

Nope, Turrican uses the T80 core for music. I've prepared a SignalTap II dump, I don't see any problems with the T80->jt12 communications, when T80's wr_n goes to low (as T80 wants to write), jt12's wr_n goes to down (so it's aware of the write request), and either din_copy or selected_register gets the value from the CPU. I can send it to you, maybe it does some unusual writes, when jt12 doesn't expects them. It does writes during busy state however.
Upd: checked further busy state writes, usually it writes the same value as already written. E.g. writes 48h, then selected_register is already 48h, writes ffh, in_copy is already ffh.
Last edited by slingshot on Sun Oct 21, 2018 8:42 am, edited 2 times in total.

slingshot
Captain Atari
Captain Atari
Posts: 246
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis / Megadrive core ported to MiST

Postby slingshot » Sun Oct 21, 2018 8:32 am

desUBIKado wrote:Thank you for last update. The sound is fantastic. A great job. Jotego, you are "el puto amo". I notice on this core, the keyboard is not mapping with any key. In older cores, ENTER key is mapping to START button and SHIFT key to SELECT / C button. Could be possible to implement this functionality again? It is useful for those people who only have DB9 gamepad or joysticks


There's a joystick emulation function of the MiST firmware, you can use the ctrl-alt-win-shift keys as the 4 joystick buttons, the emulated controller can be selected with NUM lock.

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1200
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby MasterOfGizmo » Sun Oct 21, 2018 10:35 am

I've done some final minor clock adjustments to the tg68k. It's now running at the same rate it runs in the atari st and amiga cores. It's not cycle exact but as good as possible with the tg68k core.

I don't plan to touch this again unless you guys report a problem with it. So please check if the critical games still run.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

DanyPPC
Captain Atari
Captain Atari
Posts: 359
Joined: Tue Feb 21, 2017 7:02 am

Re: Genesis / Megadrive core ported to MiST

Postby DanyPPC » Sun Oct 21, 2018 11:59 am

jotego wrote:Turrican? I still get wrong sound with this one. Did you mean Mega Turrican or Turrican?


Turrican, the first.
Yes, you are right about sound, but other games have no correct sound too. For example Batman.

But with last update Turrican and most games work very nice.

At this state it is only necessary to adjust the sound emulation, if possible.
But even without perfect sound emulation a big step has been taken in the emulation of the Genesis/Megadrive.

Really great job, if we think that there were those who claimed that it was not possible to obtain these results on the MiST.

Long life to the MiST :angel:

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1200
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby MasterOfGizmo » Sun Oct 21, 2018 12:26 pm

So i see lots of MISTer fpgagen videos on youtube but not a single MIST one. We could now really use the cooperation of some of you users. Make a cool video or e.g. post about the MIST/fpgagen on sega16.com.

Making some sega nerds join the MIST crowd may help ironing out the last few problems. E.g. the last screen in the Titan Overdrive demo contains the message "your emulator suxx". I am sure it's some tricky feature involved and this message doesn't show up on the real hardware,
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

Gehstock
Captain Atari
Captain Atari
Posts: 321
Joined: Wed Dec 21, 2016 7:18 pm
Location: Germany

Re: Genesis / Megadrive core ported to MiST

Postby Gehstock » Sun Oct 21, 2018 2:03 pm

The scene does some intensive hardware timing abuse. The stuff we abuse is completely undocumented. The hardware manages to display a maximum of 30 8x8sprites in that scene. This limit is not emulated (or rather the consequences of our tight timing), so just for fun we made sprites 31 and up spell out "Your emulator suxx" =)

DanyPPC
Captain Atari
Captain Atari
Posts: 359
Joined: Tue Feb 21, 2017 7:02 am

Re: Genesis / Megadrive core ported to MiST

Postby DanyPPC » Sun Oct 21, 2018 2:15 pm

As a fan of retro-gaming i own a real MegaDrive II PAL, in order to various C64, Amiga, Amstrad, Sinclair systems.

First i bought a Turbo Chameleon 64 which i use as a standalone machine.
I like the C64 part of TC64, but there are good Atari and MSX cores too.

But the MiST is a more open platform and already before it could take advantage of many more cores.
I believe in FPGA projects because they represent the ideal replacement for the original machines when they will no longer be repairable and functional.

I'm not registered on sega16 forum, but on CPCwiki for example I have always reported the release of new cores regarding the Amstrad CPC.
As Amiga fan i can report about MiniMig core, but this is not actually developed, even if it is good enough in the actual state.

I think you are right, FPGA platform needs to be advertised more.

User avatar
jotego
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 122
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby jotego » Sun Oct 21, 2018 2:58 pm

DanyPPC wrote:
jotego wrote:At this state it is only necessary to adjust the sound emulation, if possible.
But even without perfect sound emulation a big step has been taken in the emulation of the Genesis/Megadrive.


I'm sure you've heard it already but let me stress it once more. This is not emulation. We are making a hardware clone without using a CPU to simulate via software the original chip behaviour.

Indeed, many of the issues that we face occur because this is not an emulator. At least some of the sound issues pending are related to small time differences with real hardware. These time differences might be below 1 micro second and still create a problem. Emulators work using a long time chunk at a time and miss this kind of accuracy. That can be an advantage for the developer, but there are effects that can only be achieved with real hardware cloning like what we are doing.

DanyPPC
Captain Atari
Captain Atari
Posts: 359
Joined: Tue Feb 21, 2017 7:02 am

Re: Genesis / Megadrive core ported to MiST

Postby DanyPPC » Sun Oct 21, 2018 3:43 pm

Sure !
I talk about emulation, but i know this isn't emulation, like on a PC.

NegSol
Captain Atari
Captain Atari
Posts: 261
Joined: Sat Dec 05, 2015 9:22 pm

Re: Genesis / Megadrive core ported to MiST

Postby NegSol » Sun Oct 21, 2018 3:44 pm

MasterOfGizmo wrote:So i see lots of MISTer fpgagen videos on youtube but not a single MIST one. We could now really use the cooperation of some of you users. Make a cool video or e.g. post about the MIST/fpgagen on sega16.com.


I think you have a point. Some MiST videos would definitely be nice.

MiSTer is much simpler to record. Good VGA recording on the other hand can be tricky. :angel:

User avatar
jotego
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 122
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby jotego » Sun Oct 21, 2018 3:55 pm

slingshot wrote:
DanyPPC wrote:Now are OK: Turrican, Cliffanger, Chaos Engine, Hook, Lotus Turbo Challenge, Shinobi 3, Rolling Thunder 2, Power Drive, Toki, Wolfchild, Winter Olympic Games.

The following have graphic problems: Super Skidmarks (menu), Test Drive II


This is a big update, :cheers:

Thanks for testing! Test Drive II is the first game I met which uses a non-standard horizontal resolution mode. It confuses the scandoubler only, still OK on a TV.


Castlevania Bloodlines used to have broken graphics during the presentation screen. I have not found any glitches any current version (presentation + several leves)

desUBIKado
Atari freak
Atari freak
Posts: 66
Joined: Sat Jan 06, 2018 11:49 pm

Re: Genesis / Megadrive core ported to MiST

Postby desUBIKado » Sun Oct 21, 2018 3:56 pm

slingshot wrote:There's a joystick emulation function of the MiST firmware, you can use the ctrl-alt-win-shift keys as the 4 joystick buttons, the emulated controller can be selected with NUM lock.

Thanks for your answer. I didn't know that firmware functionality.

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1200
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby MasterOfGizmo » Sun Oct 21, 2018 4:05 pm

NegSol wrote:MiSTer is much simpler to record. Good VGA recording on the other hand can be tricky. :angel:


Like "Porting an emulator for the Rasp-Pi is much simpler. Hacking together FPGA hardware stuff on the other hand can be tricky." ?

We wouldn't be here if the "path of least resistance" was our way.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

slingshot
Captain Atari
Captain Atari
Posts: 246
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis / Megadrive core ported to MiST

Postby slingshot » Sun Oct 21, 2018 4:08 pm

MasterOfGizmo wrote:Making some sega nerds join the MIST crowd may help ironing out the last few problems. E.g. the last screen in the Titan Overdrive demo contains the message "your emulator suxx". I am sure it's some tricky feature involved and this message doesn't show up on the real hardware,

That's actually more tricky than you might think. When the display is disabled by the DE bit, the sprite generator also gets disabled, and you'll have missing sprites (presumably from the end of the link), so the text will not appear. But the current sprite engine while it provides the same functionality with very good results, does things differently than the original VDP.

Btw, if somebody knows what Super Skidmarks in the title screen do, would spare me a debugging of one or two days :)

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1200
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: Genesis / Megadrive core ported to MiST

Postby MasterOfGizmo » Sun Oct 21, 2018 4:44 pm

In fpgagen the sprite table is re-analysed on every scanline. I always suspected the real VDP would only do that once at the screens start. It wouldn't be too difficult to mimic that. I once read that you cannot increase the total number of sprites by altering the sprite table halfway down the screen. With our vdp that would actually be possible.

But then they are disabling de exactly during that phase of sprite table analysis? That probably requires exact cpu timing.
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

slingshot
Captain Atari
Captain Atari
Posts: 246
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis / Megadrive core ported to MiST

Postby slingshot » Sun Oct 21, 2018 4:53 pm

MasterOfGizmo wrote:I've done some final minor clock adjustments to the tg68k. It's now running at the same rate it runs in the atari st and amiga cores. It's not cycle exact but as good as possible with the tg68k core.

I don't plan to touch this again unless you guys report a problem with it. So please check if the critical games still run.


Dracula, Outrunners still OK, there was a small glitch in the road in Outrun, seems solved. Put out a new beta with the adjusted CPU and a new scandoubler, so should display games with buggy register sets for the pixel clock.

slingshot
Captain Atari
Captain Atari
Posts: 246
Joined: Mon Aug 06, 2018 3:05 pm

Re: Genesis / Megadrive core ported to MiST

Postby slingshot » Sun Oct 21, 2018 5:06 pm

MasterOfGizmo wrote:In fpgagen the sprite table is re-analysed on every scanline. I always suspected the real VDP would only do that once at the screens start. It wouldn't be too difficult to mimic that. I once read that you cannot increase the total number of sprites by altering the sprite table halfway down the screen. With our vdp that would actually be possible.

But then they are disabling de exactly during that phase of sprite table analysis? That probably requires exact cpu timing.


Well, the actual VDP uses a (partial) sprite cache table, which is updated by VRAM writes, then several rendering stages, some in the active display, some during HBLANK. There's a description in the Titan Overdrive 2 tech docs:

https://docs.google.com/document/d/1ST9 ... V8saY8/pub

Maybe it can be reproduced for some extent, so our emulator won't suck.
Upd: I didn't touch the sprite engine yet, seems stage 3 is our stage 2, and our stage 1 does everything which the cache-stage1-stage2 should do. Maybe would not hard to implement the cache (as in MiSTer), and make use of the DE flag.
(2 weeks ago I didn't think the FIFO timing can be implemented, but I was wrong).
Last edited by slingshot on Sun Oct 21, 2018 5:47 pm, edited 2 times in total.

hyperterminal
Atari maniac
Atari maniac
Posts: 78
Joined: Sun Jul 09, 2017 1:43 pm

Re: Genesis / Megadrive core ported to MiST

Postby hyperterminal » Sun Oct 21, 2018 5:35 pm

slingshot, with the new scandoubler of your latest fpgagen beta core I get an out of range message from my VGA monitor.

By the way: Why don't you name the core genesis.rbf like sorgelig did with the MiSTer core?


Return to “MiST”

Who is online

Users browsing this forum: No registered users and 10 guests