bazz1tv / XPMCK

fork/continuation of http://jiggawatt.org/muzak/xpmck/ Release 32 with bugfixes and new features
27 stars 5 forks source link

[SMS/VGM] OPLL M0 command not setting the proper vgm command to disable rhythm mode #21

Open bazz1tv opened 8 years ago

bazz1tv commented 8 years ago

(That whole write value at address 0x48 to become 0x00)

B00daW commented 8 years ago

@bazz / @Xyz39808

Have we determined an emulated source that has been deemed "mostly accurate" yet?

I still have yet to test these on hardware! :X So far I've tried VGMPlay, Kega Fusion and MAME. All of them wildly differ. Also VGM and ROM/SGC exports are wildly differing as well. Should we focus on ROM/SGC first and then work on VGM; due to hardware comparison capabilities?

bazz1tv commented 8 years ago

I love your work ethic but the Rhythm Mode Test is invalid. Only Channel K processes rhythm mode on release 32.. and any note during rhythm mode only triggers ALL rhythm instruments. Here are some relevant code lines:

https://github.com/bazzinotti/XPMCK/blob/7f56a09af17df5358c518addeb77aeb95826091f/src/vgm.e#L1420-L1437

I guess @mic- was experimenting with rhythm mode for VGM export and accidently released it like this. This is the kind of reason why we could use a test suite - to ensure everything is passing as we develop for different systems and may forget about certain things.

Also VGM and ROM/SGC exports are wildly differing as well

Hmmm... I notice that VGM FM channel seems to be at least an octave higher than ROM. and it would seem that rhythm mode isn't acting at all for ROM.

Should we focus on ROM/SGC first and then work on VGM; due to hardware comparison capabilities?

I like where you're going with this but I'd like to look at mic's logic with the VGM export to get an idea of how rhythm mode currently all functions, and maybe get to fix some things along the way. Some fixes will still exist in the new implementation ^^ (like this one). But we're going to be changing the implementation completely, so I'll try not to get too involved with the current implementation. Then we'll work on ROM mode.


Here is where OPLL M0 command needs to be patched in VGM export https://github.com/bazzinotti/XPMCK/blob/7f56a09af17df5358c518addeb77aeb95826091f/src/vgm.e#L709-L716

There needs to be logic to check if the mode is 0, and if so to write a 0 to 0x0E (I have already made a patch.. will go into a new feature branch "rhythm_mode")

bazz1tv commented 8 years ago

New discovery -- Both melody mode and rhythm mode use conflicting registers $36-$38, so in order to transition between modes properly, backups need to be made.

Here is where OPLL M0 command needs to be patched in VGM export https://github.com/bazzinotti/XPMCK/blob/7f56a09af17df5358c518addeb77aeb95826091f/src/vgm.e#L709-L716

if the mode is changing to 0 (melody):

If the mode is changing to 1 (rhythm):