S-DSP: Initialize a couple registers to fix Magical Drop.

This commit is contained in:
BearOso 2024-10-11 13:53:24 -05:00
parent 13824a6ef4
commit 8028d3b6ca
1 changed files with 2 additions and 0 deletions

View File

@ -1245,6 +1245,8 @@ void SPC_DSP::load( uint8_t const regs [register_count] )
{ {
memcpy( m.external_regs, regs, sizeof m.regs ); memcpy( m.external_regs, regs, sizeof m.regs );
memset( m.regs, 0, sizeof m.regs); memset( m.regs, 0, sizeof m.regs);
m.regs[66] = 0x01;
m.regs[82] = 0x01;
m.regs[r_flg] = 0xE0; m.regs[r_flg] = 0xE0;
memset( &m.regs [register_count], 0, offsetof (state_t,ram) - register_count ); memset( &m.regs [register_count], 0, offsetof (state_t,ram) - register_count );