Question About Sonic 2

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
mickagame
Very interested
Posts: 256
Joined: Sat Jun 07, 2008 7:37 am

Question About Sonic 2

Post by mickagame » Fri Jul 10, 2015 4:38 pm

Does anyone knows if Sonic 2 Z80 access M68K memory via bank space mecanism? Or all datas are loaded in Z80 Memory?

I'm currently testing The Z80 part in my emulator.
Does exist some Z80 test rom?

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Fri Jul 10, 2015 10:33 pm

Sonic 2 reads sample data from the cartridge through the bank area. Song data is read from Z80 RAM, but I can't remember if it's the 68K that puts it there or if the Z80 populates it through the bank area.

The only Z80 exerciser I'm aware of is zexall/zexdoc, but it won't run in Genesis mode without some relatively major modifications (it's too big to fit in the 8KB of RAM). There are both SMS and CPM versions though.

I also wrote some code for generating small Z80 test programs and comparing results between two Z80 cores, but it's mostly made with my needs in mind. You can find it in the BlastEm repo if that sounds useful to you.

mickagame
Very interested
Posts: 256
Joined: Sat Jun 07, 2008 7:37 am

Post by mickagame » Sat Jul 11, 2015 6:11 am

Thanks for your answer. I would like to understand the utility of Z80 interrupt that is asserted every frame durng one line.
Perhaps this is noob question but i'm sjust starting adding audio part in my emulator.

Mask of Destiny
Very interested
Posts: 615
Joined: Thu Nov 30, 2006 6:30 am

Post by Mask of Destiny » Sat Jul 11, 2015 6:42 am

mickagame wrote:Thanks for your answer. I would like to understand the utility of Z80 interrupt that is asserted every frame durng one line.
Some drivers use it for timing music playback, but some don't use it at all.

mickagame
Very interested
Posts: 256
Joined: Sat Jun 07, 2008 7:37 am

Post by mickagame » Mon Jul 13, 2015 10:51 am

All works OK now thanks for your help ;-)

Post Reply