From fb10cc4bcd097012ea485b32aee75ffd5e89e310 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Mon, 24 Jul 2017 19:36:54 -0400 Subject: [PATCH] A7800Hawk: Add kangaroo mode and mappers --- .../Consoles/Atari/A7800Hawk/A7800Hawk.cs | 8 ++++++ .../Consoles/Atari/A7800Hawk/Maria.cs | 26 ++++++++++--------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs index dcf2f6c921..86747f5a04 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.cs @@ -284,6 +284,14 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { mapper = new MapperRampage(); } + if (m == "5") + { + mapper = new MapperFractulus(); + } + if (m == "6") + { + mapper = new MapperFractulus(); + } mapper.Core = this; } diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs index 21ab5da979..8069512c0c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs @@ -543,6 +543,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk line_ram[GFX_index, (temp_start + z) % 512] = temp_check; line_ram[GFX_index, (temp_start + z) % 512] += (byte)((GFX_Objects[header_counter].palette & 4) << 2); } + else if (Core.Maria_regs[0x1C].Bit(2)) + { + // kangaroo mode, override transparency with zero + line_ram[GFX_index, (temp_start + z) % 512] = 0; + } } } } @@ -576,6 +581,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk line_ram[GFX_index, (temp_start + z) % 512] = temp_check; line_ram[GFX_index, (temp_start + z) % 512] += (byte)(GFX_Objects[header_counter].palette << 2); } + else if (Core.Maria_regs[0x1C].Bit(2)) + { + // kangaroo mode, override transparency with zero + line_ram[GFX_index, (temp_start + z) % 512] = 0; + } } } } @@ -599,10 +609,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk if (disp_mode == 0) { - if ((color & 3) != 0) - { - scanline_buffer[pixel] = _palette[Core.Maria_regs[color]]; - } + scanline_buffer[pixel] = _palette[Core.Maria_regs[color]]; } else if (disp_mode == 2) // note: 1 is not used { @@ -628,10 +635,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk color = temp_palette + temp_bit_1 + temp_bit_0; - if ((color & 3) != 0) - { - scanline_buffer[pixel] = _palette[Core.Maria_regs[color]]; - } + scanline_buffer[pixel] = _palette[Core.Maria_regs[color]]; } else { @@ -645,10 +649,8 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk color = (color & 0x1C) + ((color & 1) << 1); } - if ((color & 3) != 0) - { - scanline_buffer[pixel] = _palette[Core.Maria_regs[color]]; - } + scanline_buffer[pixel] = _palette[Core.Maria_regs[color]]; + } // send buffer to the video buffer