O2: Fix blobbers and Popeye

This commit is contained in:
alyosha-tas 2022-02-06 20:56:30 -05:00
parent 267f48eebd
commit ef9c1f7c24
2 changed files with 11 additions and 0 deletions

View File

@ -170,6 +170,7 @@ FF418E9819CBCD10F02225F7FA3B2362 Baseball (1980)(Philips)(EU-US) O2 EU-US
3F71651BDF999AD414B0F122F643078A Billard Electrique (1980)(Philips)(FR) O2 FR
7BF1A49928971514A73E674FF0356E02 Billiard Americain (1981)(Philips)(FR) O2 FR
3430691FB9C0367505634909BE0297BE Blackjack (1980)(Philips)(FR) O2 FR
108FA4CBDA888AB371340E316AA2C761 Blobbers, The (Europe) O2 EU
5F36EBA1EFE84CD06012C0B8BF4C05CB Blockout + Breakdown (1981)(Philips)(EU-US) O2 EU-US
B46E596A81E394246C45A0EA6DF1A1AD Bombardeio Submarino + Tiro ao Alvo (1980)(Philips)(BR) O2 BR
16652634E75560DC830A0C38D7FE1711 Bowling + Basketball (1980)(Philips)(EU-US) O2 EU-US

View File

@ -1359,6 +1359,8 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
public void AudioWriteReg(int addr, byte value)
{
bool on_c = aud_ctrl.Bit(7);
switch (addr)
{
case 0xA7: shift_0 = shift_reg_0 = value; break;
@ -1367,6 +1369,14 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk
case 0xAA: aud_ctrl = value; break;
}
// reload if turning the audio on (needed for Popeye)
if (!on_c && aud_ctrl.Bit(7))
{
shift_0 = shift_reg_0;
shift_1 = shift_reg_1;
shift_2 = shift_reg_2;
}
//Console.WriteLine("aud write: " + (addr - 0xA7) + " " + value + " " + Core.cpu.TotalExecutedCycles);
}