beanieaxolotl / shinen-gax-python

Reimplementation of the GAX Sound Engine in Python
MIT License
6 stars 0 forks source link

Wave parameter (un)packing for more than one wave has a very strange edge case #23

Open beanieaxolotl opened 1 week ago

beanieaxolotl commented 1 week ago

In Action Man: Robot Atak, Both wave parameters in instrument 7 have out-of-bounds loop points and other corrupted parameters. This is a debug output of the wave parameters of this instrument, slightly formatted for clarity:

{'finetune': 0, 'modulate': False, 'ping_pong': True, 'start_position': 0, 
'loop_start': 1940, 'loop_end': 4640, 'modulate_size': 0, 'modulate_step': 0, 'modulate_speed': 0}

{'finetune': -252, 'modulate': True, 'ping_pong': True, 'start_position': 0, 
'loop_start': 255, 'loop_end': 7, 'modulate_size': 255, 'modulate_step': 14, 'modulate_speed': 0}]

Obviously, multiple wave params were not tested thoroughly as most of my research hinged on instruments that have only one wave param (i.e most of Martin Schioeler's tracks).

beanieaxolotl commented 1 week ago

Okay this is pretty weird: In the actual ROM, instrument 7 calls for two waveforms in two wave slots, but only one wave parameter is saved.

I used Mesen for this screenshot:

image