mist-devel / mist-binaries

Firmware and core binaries for the MIST board
206 stars 50 forks source link

Hellfire musics sounds slow. #118

Closed PepAlacant closed 2 years ago

PepAlacant commented 2 years ago

Music in Hellfire sounds at slowest speed than the real hardware.

Julitium commented 2 years ago

Hi. You should be a bit more specific on core, conf, etc. All the best.

PepAlacant commented 2 years ago

Sorry, The last core released. The config I use is NTSC-J, but I tried all regions and PAL mode too. I tried different roms too.

gyurco commented 2 years ago

But what core?

PepAlacant commented 2 years ago

Ah !!! Yes... Megadrive/Genesis. So sorry ! I thought this was the issues for Genesis Core. Sorry.

gyurco commented 2 years ago

Somebody already debugged it: https://www.youtube.com/watch?v=0t0ni2OtiRw

You made the right choice in going for the Genesis model 1 (clearly not a VA7 board revision) not just for the low-pass filter, but also because this game has a major bug in the sound driver that causes the music to slow down massively on consoles that allow the FM BUSY flag to be read back from an address other than 0x4000 in the Z80's address space (this is commonly used as the sound CPU on the Genesis). For some reason, Hellfire makes multiple reads to addresses 0x4001 and 0x4003, which should typically return nothing, but on the VA7 Genesis model 1 and later (except the VA2 and VA2.3 Genesis model 2 as those seem to essentially be condensed Genesis model 1s right down to being the only revisions since the VA7 Genesis model 1 to use a discrete YM2612 rather than the ASIC-integrated YM3438 that I can't stand seeing in the Genesis), those addresses return the FM BUSY flag, causing the music to slow down to an insane degree. Soundtrack-wise, I find this game to be hit-or-miss. Egypt, in particular, is wholly unpleasant to listen to with that abrasive instrument set and is incredibly bland overall to the original rendition on the YM3812 used by the arcade PCB. Captain Lancer, though, is awesome no matter what version it is.

gyurco commented 2 years ago

Maybe @jotego has an idea about a correct fix. As I see, jt12 returns the busy flag in all addresses, however the YM2612 datasheet only specifies valid read on A=0. Others seems to be undefined. Maybe they're only relevant for newer chip variants? (the game is fixed if 1'b0 is returned instead of busy at 2'b1? case at https://github.com/jotego/jt12/blob/master/hdl/jt12_dout.v#L41)

PepAlacant commented 2 years ago

wow ! a bug of Megadrive 2 models... incredible ! I'm testing the core in MiSTer and all seems Ok.

gyurco commented 2 years ago

Yes, MiSTer activates a hack for Hellfire: https://github.com/MiSTer-devel/Genesis_MiSTer/blob/26ad5d2fa75e04146bfdb69b41871381d76f518d/Genesis.sv#L940

gyurco commented 2 years ago

It was fixed in fpgagen_220420.