mamedev / mame

MAME
https://www.mamedev.org/
Other
8.38k stars 2.04k forks source link

(a sega mega drive issue) ym2612 not stuttering music on earthworm jim #10511

Open KNameless9999 opened 2 years ago

KNameless9999 commented 2 years ago

that issue actually happens because of the ym2612/ym3438 inaccuracy of fm_busy calls and this video demonstrates how it should be emulated...

ghost commented 2 years ago

the ym/fm cores are developed independently of MAME Any issues relating to them should be reported at https://github.com/aaronsgiles/ymfm

ICEknigh7 commented 1 year ago

Just leaving here the answer that I found earlier, while we were chatting about Mega Drive sound stuff in the shoutbox: https://www.youtube.com/watch?v=bj88nAVwqcQ

@Ace9921 Since this never got an answer, I'll answer it now. It seems the origin of the problem is a bogus read of the FM BUSY flag from an inaccessible address on later hardware revisions excluding the VA2 and VA2.3 Model 2 revisions, which appears to be based on the Genesis Model 1 design in a more integrated package. As the FM BUSY flag can be read from four different addresses, those being $4000, $4001, $4002 and $4003 on Genesis Model 1s prior to the VA7 board revision and the aforementioned Model 2s, the game's music stutters like this because it's reading back FM BUSY when it's not supposed to from $4002 (every other Genesis only allows FM BUSY to be read from $4000). With some help on Sega-16, I hex-edited the ROM to remove this bogus FM BUSY read from the game's code. If I can make an IPS patch out of this, I'll post it online.

happppp commented 1 year ago

ref: https://github.com/aaronsgiles/ymfm/issues/45

happppp commented 1 year ago

Closing this one because it's a duplicate. -edit- nevermind that, the description sounds more like an issue with the Megadrive ...driver

rb6502 commented 1 year ago

It's a mirroring thing from what @ICEknigh7 says. The issue on Aaron's side can be closed though.

Ace9921 commented 1 year ago

Just leaving here the answer that I found earlier, while we were chatting about Mega Drive sound stuff in the shoutbox: https://www.youtube.com/watch?v=bj88nAVwqcQ

@Ace9921 Since this never got an answer, I'll answer it now. It seems the origin of the problem is a bogus read of the FM BUSY flag from an inaccessible address on later hardware revisions excluding the VA2 and VA2.3 Model 2 revisions, which appears to be based on the Genesis Model 1 design in a more integrated package. As the FM BUSY flag can be read from four different addresses, those being $4000, $4001, $4002 and $4003 on Genesis Model 1s prior to the VA7 board revision and the aforementioned Model 2s, the game's music stutters like this because it's reading back FM BUSY when it's not supposed to from $4002 (every other Genesis only allows FM BUSY to be read from $4000). With some help on Sega-16, I hex-edited the ROM to remove this bogus FM BUSY read from the game's code. If I can make an IPS patch out of this, I'll post it online.

I need to correct this comment. The addresses stated and which revisions they apply to are backwards. MegaDrives prior to the VA7 model 1 and the VA2/VA2.3 Genesis model 2 actually have FM BUSY accessible only from $4000. The other revisions have it accessible from the entire $4000-$4003 range.