From f6695ad87cbef022e5b7fb045944fa7ff5f2b7be Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Thu, 2 Jan 2020 19:28:28 -0500 Subject: [PATCH] Atari 2600: fix audio in commando raid --- .../Consoles/Atari/2600/Tia/Tia.Audio.cs | 35 +++++-------------- .../Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs | 18 +++------- 2 files changed, 12 insertions(+), 41 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs index 6b9080fb47..26a5582806 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/2600/Tia/Tia.Audio.cs @@ -120,18 +120,17 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 One5_L(); on_L = One4_L(); break; - case 0x01: // Both run, but the 5 bit is ignored on_L = Run4_L(); - //Run5(); + Run5_L(); break; case 0x02: - if ((sr5_L & 0x0f) == 0 || (sr5_L & 0x0f) == 0x0f) + if (((sr5_L & 0x0f) == 0) || ((sr5_L & 0x0f) == 0x0f)) { on_L = Run4_L(); + Run5_L(); } - Run5_L(); break; case 0x03: @@ -139,21 +138,17 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { on_L = Run4_L(); } - break; - case 0x04: Run5_L(); One4_L(); on_L = Run1_L(); break; - case 0x05: One5_L(); Run4_L(); on_L = Run1_L(); - break; - + break; case 0x06: case 0x0a: Run5_L(); @@ -165,14 +160,11 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { on_L = true; } - break; - case 0x07: case 0x09: on_L = Run5_L(); - break; - + break; case 0x08: on_L = Run9_L(); break; @@ -182,14 +174,12 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { on_L = Run1_L(); } - break; case 0x0e: if (Run3_L()) { goto case 0x06; } - break; case 0x0f: // poly5 output to div 6 @@ -280,18 +270,17 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 One5_R(); on_R = One4_R(); break; - case 0x01: // Both run, but the 5 bit is ignored on_R = Run4_R(); - //Run5(); + Run5_R(); break; case 0x02: - if ((sr5_R & 0x0f) == 0 || (sr5_R & 0x0f) == 0x0f) + if (((sr5_R & 0x0f) == 0) || ((sr5_R & 0x0f) == 0x0f)) { on_R = Run4_R(); + Run5_R(); } - Run5_R(); break; case 0x03: @@ -299,21 +288,17 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { on_R = Run4_R(); } - break; - case 0x04: Run5_R(); One4_R(); on_R = Run1_R(); break; - case 0x05: One5_R(); Run4_R(); on_R = Run1_R(); break; - case 0x06: case 0x0a: Run5_R(); @@ -327,12 +312,10 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 } break; - case 0x07: case 0x09: on_R = Run5_R(); break; - case 0x08: on_R = Run9_R(); break; @@ -342,14 +325,12 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600 { on_R = Run1_R(); } - break; case 0x0e: if (Run3_R()) { goto case 0x06; } - break; case 0x0f: // poly5 output to div 6 diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs index 0ee9b95f99..7f30740347 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/TIA_Sound/Tia.Audio.cs @@ -110,18 +110,17 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk One5(); on = One4(); break; - case 0x01: // Both run, but the 5 bit is ignored on = Run4(); - //Run5(); + Run5(); break; case 0x02: if ((sr5 & 0x0f) == 0 || (sr5 & 0x0f) == 0x0f) { on = Run4(); + Run5(); } - Run5(); break; case 0x03: @@ -129,21 +128,17 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { on = Run4(); } - break; - case 0x04: Run5(); One4(); on = Run1(); break; - case 0x05: One5(); Run4(); on = Run1(); - break; - + break; case 0x06: case 0x0a: Run5(); @@ -155,14 +150,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { on = true; } - break; - case 0x07: case 0x09: on = Run5(); - break; - + break; case 0x08: on = Run9(); break; @@ -172,14 +164,12 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { on = Run1(); } - break; case 0x0e: if (Run3()) { goto case 0x06; } - break; case 0x0f: // poly5 output to div 6