- Adjusted SoundBias code to smoothly adjust bias based on delay
- Put SoundBias into ARM7 instead of ARM9 (Thank your father kids!)
This commit is contained in:
parent
ba7f1b6037
commit
f6f576f4fe
|
@ -948,11 +948,14 @@ u32 getCRC16(armcpu_t* cpu)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundBias(armcpu_t* cpu)
|
u32 SoundBias(armcpu_t* cpu)
|
||||||
{
|
{
|
||||||
SPU_WriteLong(0x4000504, cpu->R[0] & 0x3FF);
|
u32 current = SPU_ReadLong(0x4000504);
|
||||||
//Insert Delay Statement Here
|
if (cpu->R[0] > current)
|
||||||
return;
|
SPU_WriteLong(0x4000504, current + 0x1);
|
||||||
|
else
|
||||||
|
SPU_WriteLong(0x4000504, current - 0x1);
|
||||||
|
return cpu->R[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 (* ARM9_swi_tab[32])(armcpu_t* cpu)={
|
u32 (* ARM9_swi_tab[32])(armcpu_t* cpu)={
|
||||||
|
@ -964,7 +967,7 @@ u32 (* ARM9_swi_tab[32])(armcpu_t* cpu)={
|
||||||
waitVBlankARM, // 0x05
|
waitVBlankARM, // 0x05
|
||||||
wait4IRQ, // 0x06
|
wait4IRQ, // 0x06
|
||||||
bios_nop, // 0x07
|
bios_nop, // 0x07
|
||||||
bios_nop, // 0x08
|
SoundBias, // 0x08
|
||||||
devide, // 0x09
|
devide, // 0x09
|
||||||
bios_nop, // 0x0A
|
bios_nop, // 0x0A
|
||||||
copy, // 0x0B
|
copy, // 0x0B
|
||||||
|
@ -999,7 +1002,7 @@ u32 (* ARM7_swi_tab[32])(armcpu_t* cpu)={
|
||||||
waitVBlankARM, // 0x05
|
waitVBlankARM, // 0x05
|
||||||
wait4IRQ, // 0x06
|
wait4IRQ, // 0x06
|
||||||
wait4IRQ, // 0x07
|
wait4IRQ, // 0x07
|
||||||
SoundBias, // 0x08
|
bios_nop, // 0x08
|
||||||
devide, // 0x09
|
devide, // 0x09
|
||||||
bios_nop, // 0x0A
|
bios_nop, // 0x0A
|
||||||
copy, // 0x0B
|
copy, // 0x0B
|
||||||
|
|
Loading…
Reference in New Issue