Sega megadrive/genesis core

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

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

lips2k15
Atari maniac
Atari maniac
Posts: 80
Joined: Tue Mar 29, 2016 10:19 am

Sega megadrive/genesis core

Postby lips2k15 » Fri Jun 10, 2016 11:11 am

Does any body have a working sega megadrive core for the mist in any state? Id love to use the mist as a megadrive!!!

ericgus
Captain Atari
Captain Atari
Posts: 429
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: Sega megadrive/genesis core

Postby ericgus » Fri Jun 10, 2016 2:03 pm

Well it looks like an FPGA core exists https://github.com/Torlus/fpgagen but i dont know if its been ported ..

lips2k15
Atari maniac
Atari maniac
Posts: 80
Joined: Tue Mar 29, 2016 10:19 am

Re: Sega megadrive/genesis core

Postby lips2k15 » Fri Jun 10, 2016 8:36 pm

No it dosnt seem like it is any body currently working on one?

ericgus
Captain Atari
Captain Atari
Posts: 429
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: Sega megadrive/genesis core

Postby ericgus » Fri Jun 10, 2016 8:52 pm

lips2k15 wrote:No it dosnt seem like it is any body currently working on one?



Seems like your golden opportunity for you to start with FPGA verilog code and learn how to make a core!

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Sega megadrive/genesis core

Postby Sorgelig » Sat Jun 11, 2016 6:15 am

There is no good FPGA code of main sound chip YM2612.
That fpgagen is totally soundless. I found some experiments on improved fpgagen with part of YM2612 emulation. But that requires very large FPGA. I believe the model of YM2612 is incorrectly written and thus every array made of LE instead of FPGA RAM - thus requires large FPGA.
And again this is written in ugly language - VHDL. Why ppl are using this inconvenient non-intuitive language??

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Sega megadrive/genesis core

Postby Sorgelig » Tue Jun 28, 2016 6:22 am


Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Sega megadrive/genesis core

Postby Sorgelig » Tue Jun 28, 2016 7:06 am

Quick look in YM2612 code revealed very frustrating implementation. Something like 1:1 rewrite of c/pascal code from some PC emulator. Full of blocking assignments - that's why synthesizer cannot move tables into FPGA RAM and uses 5400 of logic cells per channel! And full YM2612 implementation requires 6 channels which of course won't fit. So, YM2612 code needs total rewrite from the ground to make a code using FPGA RAM...

User avatar
Newsdee
Atari God
Atari God
Posts: 1399
Joined: Fri Sep 19, 2014 8:40 am

Re: Sega megadrive/genesis core

Postby Newsdee » Tue Jun 28, 2016 9:19 am

I'd be happy without sound to start with. :) but it would bring a flood of requests to add it... of course.

User avatar
mambrino
Atari freak
Atari freak
Posts: 56
Joined: Mon May 09, 2016 4:59 pm

Re: Sega megadrive/genesis core

Postby mambrino » Tue Jun 28, 2016 9:30 am

Sorgelig wrote:Quick look in YM2612 code revealed very frustrating implementation. Something like 1:1 rewrite of c/pascal code from some PC emulator. Full of blocking assignments - that's why synthesizer cannot move tables into FPGA RAM and uses 5400 of logic cells per channel! And full YM2612 implementation requires 6 channels which of course won't fit. So, YM2612 code needs total rewrite from the ground to make a code using FPGA RAM...

Is this the same implementation as fpgagen?

https://github.com/sauraen/YM2612

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Sega megadrive/genesis core

Postby Sorgelig » Tue Jun 28, 2016 10:04 am

mambrino wrote:Is this the same implementation as fpgagen?
https://github.com/sauraen/YM2612

I've saw this YM2612 implementation as well, but i'm not sure if it is complete or not. From comments in header, it's not tested.
But again, it uses the same bad technique of FPGA programming and most likely will use LC for tables instead of RAM. I think it's mostly for simulation than synthesis.

All these sega implementations are based on fpgagen. fpgagen is just soundless.

lips2k15
Atari maniac
Atari maniac
Posts: 80
Joined: Tue Mar 29, 2016 10:19 am

Re: Sega megadrive/genesis core

Postby lips2k15 » Tue Jun 28, 2016 1:18 pm

with or without sound it would be amazing!!!

seastalker
Captain Atari
Captain Atari
Posts: 269
Joined: Sun May 15, 2016 3:44 pm

Re: Sega megadrive/genesis core

Postby seastalker » Thu Jun 30, 2016 3:43 pm

Agreed- Playing hockey with my own music in the background would still be sweet. Puyo Puyo... actually I think a lot of games are fun to mute and play your own music with. :)

ericgus
Captain Atari
Captain Atari
Posts: 429
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: Sega megadrive/genesis core

Postby ericgus » Fri Jul 01, 2016 12:39 am

OTO some games like sonic would just be weird without sound.

User avatar
jotego
Captain Atari
Captain Atari
Posts: 169
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: Sega megadrive/genesis core

Postby jotego » Tue Aug 09, 2016 1:29 pm

Sorgelig wrote:Quick look in YM2612 code revealed very frustrating implementation. Something like 1:1 rewrite of c/pascal code from some PC emulator. Full of blocking assignments - that's why synthesizer cannot move tables into FPGA RAM and uses 5400 of logic cells per channel! And full YM2612 implementation requires 6 channels which of course won't fit. So, YM2612 code needs total rewrite from the ground to make a code using FPGA RAM...


I also had a look and it is a port of a software emulator. As I said on a different thread, I am finishing off the YM2151 and I might do more Yamaha chips with proper verilog and proper measurements of the original chips. The YM2612 and YM2203 are on my to-do list but it depends on the acceptance of my work on the YM2151. It's been hundreds of hours spent on this so unless I see it makes people happy I won't keep working on this stuff.
--
Source code of all my cores here.
My Patreon page here.

ericgus
Captain Atari
Captain Atari
Posts: 429
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: Sega megadrive/genesis core

Postby ericgus » Tue Aug 09, 2016 3:46 pm

I think your contribution is fantastic.. and im sure people would be very happy to have some sort of working YM2612 even if its not perfect ..

Keep up the good work !

jotego wrote:
Sorgelig wrote:Quick look in YM2612 code revealed very frustrating implementation. Something like 1:1 rewrite of c/pascal code from some PC emulator. Full of blocking assignments - that's why synthesizer cannot move tables into FPGA RAM and uses 5400 of logic cells per channel! And full YM2612 implementation requires 6 channels which of course won't fit. So, YM2612 code needs total rewrite from the ground to make a code using FPGA RAM...


I also had a look and it is a port of a software emulator. As I said on a different thread, I am finishing off the YM2151 and I might do more Yamaha chips with proper verilog and proper measurements of the original chips. The YM2612 and YM2203 are on my to-do list but it depends on the acceptance of my work on the YM2151. It's been hundreds of hours spent on this so unless I see it makes people happy I won't keep working on this stuff.

User avatar
alexh
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2723
Joined: Wed Oct 20, 2004 1:52 pm
Location: UK - Oxford
Contact:

Re: Sega megadrive/genesis core

Postby alexh » Tue Aug 09, 2016 8:45 pm

I can convert any VHDL into verilog in minutes as long as not too many record types or multidimensional array ports. Point me in the direction to the files and I'll convert it. I'll also rewrite any table implementations so they will support block RAM inference. (Unless they are true dual port)

User avatar
DrOG
Atari Super Hero
Atari Super Hero
Posts: 606
Joined: Sun Jul 31, 2016 8:23 pm
Location: Gyula, Hungary

Re: Sega megadrive/genesis core

Postby DrOG » Wed Aug 10, 2016 9:31 am

@ jotego:
It would make me happy, I'm curious if I can complete the Dune II on Genesis/Megadrive after the PC and Amiga version...

seastalker
Captain Atari
Captain Atari
Posts: 269
Joined: Sun May 15, 2016 3:44 pm

Re: Sega megadrive/genesis core

Postby seastalker » Wed Aug 10, 2016 4:38 pm

Count me in too on being super happy on your work towards the sound on a Genesis core!!

User avatar
jotego
Captain Atari
Captain Atari
Posts: 169
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: Sega megadrive/genesis core

Postby jotego » Thu Aug 11, 2016 10:14 am

ericgus wrote:I think your contribution is fantastic.. and im sure people would be very happy to have some sort of working YM2612 even if its not perfect ..

Keep up the good work !


DrOG wrote:@ jotego:
It would make me happy, I'm curious if I can complete the Dune II on Genesis/Megadrive after the PC and Amiga version...


seastalker wrote:Count me in too on being super happy on your work towards the sound on a Genesis core!!


Thank you guys, I really appreciate these comments. It's hard to work on these things alone so seeing that people care gives my morale a boost.
--
Source code of all my cores here.
My Patreon page here.

User avatar
vebxenon
Atari Super Hero
Atari Super Hero
Posts: 724
Joined: Fri Apr 24, 2015 12:10 pm

Re: Sega megadrive/genesis core

Postby vebxenon » Fri Aug 12, 2016 7:19 am

jotego wrote:
Thank you guys, I really appreciate these comments. It's hard to work on these things alone so seeing that people care gives my morale a boost.


Thanks to you :cheers:
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

User avatar
Newsdee
Atari God
Atari God
Posts: 1399
Joined: Fri Sep 19, 2014 8:40 am

Re: Sega megadrive/genesis core

Postby Newsdee » Fri Aug 12, 2016 12:17 pm

It's great to have you and others contributing to this project and open source hardware in general. I really feel it's the best way to preserve these machines... because there is software emulation but that preserves the games mostly.

The MiST (and similar devices) achieves the same experience.(e.g. instant on) and uses much less power than the original machines. Connectivity aside (e.g. no carts), it's objectively a massive improvement of the originals IMHO. But the MiST wouldn't be what it is without all the massive work that went into older and current projects for open source HDL.

So at least to this poster, your work (and that of the other contributors) is greatly appreciated. I only wish I could do a bit more on the HDL side to be more useful. :)

ericgus
Captain Atari
Captain Atari
Posts: 429
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: Sega megadrive/genesis core

Postby ericgus » Fri Aug 12, 2016 1:05 pm

Newsdee wrote: uses much less power than the original machines.


Also since its newer modern hardware in the MiST its also less likely to have problems like bad caps and other things associated with old and possibly failing hardware due to age.

User avatar
Newsdee
Atari God
Atari God
Posts: 1399
Joined: Fri Sep 19, 2014 8:40 am

Re: Sega megadrive/genesis core

Postby Newsdee » Fri Aug 12, 2016 1:51 pm

ericgus wrote:
Newsdee wrote: uses much less power than the original machines.

Also since its newer modern hardware in the MiST its also less likely to have problems like bad caps and other things associated with old and possibly failing hardware due to age.


Yes but more than that, as long as the HDL is open source whenever Altera/Intel releases the Cyclone XVI FPGA in 20 years it will still run. :D
Sure the same can be said of MAME for software, but my point is once you have a cycle accurate hardware clone, that's it - the original units could all disappear but we can still recapture the same experience with a new clone.

User avatar
alexh
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2723
Joined: Wed Oct 20, 2004 1:52 pm
Location: UK - Oxford
Contact:

Re: Sega megadrive/genesis core

Postby alexh » Fri Aug 12, 2016 2:15 pm

Newsdee wrote:my point is once you have a cycle accurate hardware clone, that's it - the original units could all disappear but we can still recapture the same experience with a new clone.

Is a cycle accurate HDL representation enough? Are there not analog features of the original chips which the digital recreation doesn't match?

User avatar
Newsdee
Atari God
Atari God
Posts: 1399
Joined: Fri Sep 19, 2014 8:40 am

Re: Sega megadrive/genesis core

Postby Newsdee » Fri Aug 12, 2016 2:38 pm

alexh wrote:Is a cycle accurate HDL representation enough? Are there not analog features of the original chips which the digital recreation doesn't match?
Possibly, but if they are documented, couldn't they be recreated, at least in principle?


Return to “MiST”

Who is online

Users browsing this forum: No registered users and 2 guests