From 81033c112065c697657084ef6b32305e45e90fbb Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Thu, 22 Dec 2016 18:10:39 -0500 Subject: [PATCH] Intellivision Update Cartridge Add Ms Pac Man (doesnt work yet) Fix Banking --- .../Consoles/Intellivision/Cartridge.cs | 69 +++++++++++-------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs index 24ab69b4bc..87f3f68079 100644 --- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs +++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Cartridge.cs @@ -64,134 +64,149 @@ namespace BizHawk.Emulation.Cores.Intellivision switch (mapper) { case 0: - if (addr>=0x5000 && addr<0x6FFF) + if (addr>=0x5000 && addr<=0x6FFF) { return Data[addr-0x5000]; } - else if (addr>=0xD000 && addr<0xDFFF) + else if (addr>=0xD000 && addr<=0xDFFF) { return Data[addr - 0xB000]; } - else if (addr>=0xF000 && addr<0xFFFF) + else if (addr>=0xF000 && addr<=0xFFFF) { return Data[addr - 0xC000]; } break; case 1: - if (addr >= 0x5000 && addr < 0x6FFF) + if (addr >= 0x5000 && addr <= 0x6FFF) { return Data[addr - 0x5000]; } - else if (addr >= 0xD000 && addr < 0xFFFF) + else if (addr >= 0xD000 && addr <= 0xFFFF) { return Data[addr - 0xB000]; } break; case 2: - if (addr >= 0x5000 && addr < 0x6FFF) + if (addr >= 0x5000 && addr <= 0x6FFF) { return Data[addr - 0x5000]; } - else if (addr >= 0x9000 && addr < 0xBFFF) + else if (addr >= 0x9000 && addr <= 0xBFFF) { return Data[addr - 0x7000]; } - else if (addr >= 0xD000 && addr < 0xDFFF) + else if (addr >= 0xD000 && addr <= 0xDFFF) { return Data[addr - 0x8000]; } break; case 3: - if (addr >= 0x5000 && addr < 0x6FFF) + if (addr >= 0x5000 && addr <= 0x6FFF) { return Data[addr - 0x5000]; } - else if (addr >= 0x9000 && addr < 0xAFFF) + else if (addr >= 0x9000 && addr <= 0xAFFF) { return Data[addr - 0x7000]; } - else if (addr >= 0xD000 && addr < 0xDFFF) + else if (addr >= 0xD000 && addr <= 0xDFFF) { return Data[addr - 0x9000]; } - else if (addr >= 0xF000 && addr < 0xFFFF) + else if (addr >= 0xF000 && addr <= 0xFFFF) { return Data[addr - 0xA000]; } break; case 4: - if (addr >= 0x5000 && addr < 0x6FFF) + if (addr >= 0x5000 && addr <= 0x6FFF) { return Data[addr - 0x5000]; } - else if (addr >= 0xD000 && addr < 0xD3FF) + else if (addr >= 0xD000 && addr <= 0xD3FF) { return Cart_Ram[addr - 0xD000]; } break; case 5: - if (addr >= 0x5000 && addr < 0x7FFF) + if (addr >= 0x5000 && addr <= 0x7FFF) { return Data[addr - 0x5000]; } - else if (addr >= 0x9000 && addr < 0xBFFF) + else if (addr >= 0x9000 && addr <= 0xBFFF) { return Data[addr - 0x6000]; } break; case 6: - if (addr >= 0x6000 && addr < 0x7FFF) + if (addr >= 0x6000 && addr <= 0x7FFF) { return Data[addr - 0x6000]; } break; case 7: - if (addr >= 0x4800 && addr < 0x67FF) + if (addr >= 0x4800 && addr <= 0x67FF) { return Data[addr - 0x4800]; } break; case 8: - if (addr >= 0x5000 && addr < 0x5FFF) + if (addr >= 0x5000 && addr <= 0x5FFF) { return Data[addr - 0x5000]; } - else if (addr >= 0x7000 && addr < 0x7FFF) + else if (addr >= 0x7000 && addr <= 0x7FFF) { return Data[addr - 0x6000]; } break; case 9: - if (addr >= 0x5000 && addr < 0x6FFF) + if (addr >= 0x5000 && addr <= 0x6FFF) { return Data[addr - 0x5000]; } - else if (addr >= 0x9000 && addr < 0xAFFF) + else if (addr >= 0x9000 && addr <= 0xAFFF) { return Data[addr - 0x7000]; } - else if (addr >= 0xD000 && addr < 0xDFFF) + else if (addr >= 0xD000 && addr <= 0xDFFF) { return Data[addr - 0x9000]; } - else if (addr >= 0xF000 && addr < 0xFFFF) + else if (addr >= 0xF000 && addr <= 0xFFFF) { return Data[addr - 0xA000]; } - else if (addr >= 0x8800 && addr < 0x8FFF) + else if (addr >= 0x8800 && addr <= 0x8FFF) { return Cart_Ram[addr - 0x8800]; } break; + + case 10: + if (addr >= 0x5000 && addr <= 0x6FFF) + { + return Data[addr - 0x5000]; + } + else if (addr >= 0x8800 && addr <= 0xB7FF) + { + return Data[addr - 0x6800]; + } + else if (addr >= 0xD000 && addr <= 0xFFFF) + { + return Data[addr - 0x8000]; + } + break; } @@ -203,14 +218,14 @@ namespace BizHawk.Emulation.Cores.Intellivision switch (mapper) { case 4: - if (addr >= 0xD000 && addr < 0xD3FF) + if (addr >= 0xD000 && addr <= 0xD3FF) { Cart_Ram[addr - 0xD000] = value; return true; } break; case 9: - if (addr >= 0x8800 && addr < 0x8FFF) + if (addr >= 0x8800 && addr <= 0x8FFF) { Cart_Ram[addr - 0x8800] = value; return true;