diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs index 9f56a8c3e3..c7e48ae9bf 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AVE-NINA.cs @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "AVE-NINA-02": // untested case "AVE-NINA-01": //Impossible Mission 2 (U) @@ -33,10 +33,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_4k = Cart.chr_size / 4 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_4k = Cart.ChrSize / 4 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } @@ -108,7 +108,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER079": // Puzzle (Unl) isMapper79 = true; @@ -122,7 +122,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "AVE-NINA-06": //Blackjack (U) case "AVE-NINA-03": //F-15 City War (U) case "AVE-MB-91": //Deathbots (U) - if (Cart.chips.Count == 0) // some boards had no mapper chips on them + if (Cart.Chips.Count == 0) // some boards had no mapper chips on them return false; AssertPrg(32, 64); AssertChr(32, 64); AssertWram(0); AssertVram(0); break; @@ -131,10 +131,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); prg_bank_32k = 0; return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs index 958350b856..af48f3d338 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/AxROM.cs @@ -17,11 +17,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER007": bus_conflict = false; - Cart.vram_size = 8; + Cart.VramSize = 8; break; case "NES-ANROM": //marble madness @@ -57,7 +57,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask_32k = Cart.prg_size / 32 - 1; + prg_mask_32k = Cart.PrgSize / 32 - 1; SetMirrorType(EMirrorType.OneScreenA); return true; @@ -65,7 +65,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override byte ReadPrg(int addr) { - if (Cart.prg_size == 16) + if (Cart.PrgSize == 16) { return Rom[(addr & 0x3FFF) | prg << 15]; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs index 86c1d2a6b4..05202fbcf0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI-FCG-1.cs @@ -68,7 +68,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { // see notes above that explain some of this in more detail @@ -92,7 +92,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES break; case "MAPPER159": // [3] AssertPrg(128, 256); AssertChr(128, 256); - Cart.wram_size = 0; + Cart.WramSize = 0; regs_prg_enable = true; regs_wram_enable = false; eprom = new SEEPROM(false); @@ -104,7 +104,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES regs_wram_enable = false; break; case "MAPPER016": // [7] - if (Cart.prg_size > 256) + if (Cart.PrgSize > 256) { // you have two options: // 1) assume prg > 256 => jump2 (aka mapper 153, type [5]) @@ -115,7 +115,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES goto case "MAPPER153"; } AssertPrg(128, 256); AssertChr(128, 256); - Cart.wram_size = 0; + Cart.WramSize = 0; regs_prg_enable = true; regs_wram_enable = true; eprom = new SEEPROM(true); @@ -123,8 +123,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "MAPPER153": // [5] AssertPrg(512); AssertChr(0); - Cart.vram_size = 8; - Cart.wram_size = 8; + Cart.VramSize = 8; + Cart.WramSize = 8; regs_prg_enable = true; regs_wram_enable = false; jump2 = true; @@ -145,8 +145,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // bootgod doesn't have any of these recorded AssertPrg(128, 256); AssertChr(0); - Cart.vram_size = 8; - Cart.wram_size = 0; + Cart.VramSize = 8; + Cart.WramSize = 0; regs_prg_enable = true; regs_wram_enable = false; // 24C02 is present on all boards @@ -160,13 +160,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; // for Jump2 boards, we only mask up to 256K, the outer bank is determined seperately if (jump2) prg_bank_mask_16k = 256 / 16 - 1; - chr_bank_mask_1k = Cart.chr_size - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs index 408a17756a..e87102a680 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_02_74.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER096": case "BANDAI-74*161/02/74": @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } chr_block = 0; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs index e69e736c98..2a9e4c12c1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BANDAI_74_161_161_32.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER070": break; @@ -28,8 +28,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; prg_banks_16k[1] = 0xFF; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Bonza.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Bonza.cs index bd027da40b..deaa1e5580 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Bonza.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Bonza.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER216": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs index 048634619d..90150320c3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/BxROM.cs @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "AVE-NINA-07": // wally bear and the gang // it's not the NINA_001 but something entirely different; actually a colordreams with VRAM @@ -39,10 +39,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs index d9768dbb28..6e6e797b0e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CNROM.cs @@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER185": case "HVC-CNROM+SECURITY": @@ -84,13 +84,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - if (Cart.pcb == "9011-N02") // othello + if (Cart.Pcb == "9011-N02") // othello copyprotection = true; - prg_byte_mask = Cart.prg_size * 1024 - 1; - chr_mask = (Cart.chr_size / 8) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_byte_mask = Cart.PrgSize * 1024 - 1; + chr_mask = (Cart.ChrSize / 8) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); - if (Cart.sha1 == "sha1:4C9C05FAD6F6F33A92A27C2EDC1E7DE12D7F216D") + if (Cart.Sha1 == "sha1:4C9C05FAD6F6F33A92A27C2EDC1E7DE12D7F216D") seicross = true; return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs index 1d1c348d5a..3248e011a6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CPROM.cs @@ -12,13 +12,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER013": AssertPrg(32); AssertChr(0); - Cart.vram_size = 16; - Cart.wram_size = 0; + Cart.VramSize = 16; + Cart.WramSize = 0; break; case "NES-CPROM": //videomation diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs index 549c1e15f5..3c8cded6a1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Camerica.cs @@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER071": break; @@ -45,12 +45,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; prg_banks_16k[0] = 0x00; prg_banks_16k[1] = 0xFF & prg_bank_mask_16k; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } @@ -107,7 +107,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER232": break; @@ -119,9 +119,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); SyncPRG(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CamericaGoldenFive.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CamericaGoldenFive.cs index 0d6e12f95a..1fb80d68bc 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CamericaGoldenFive.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CamericaGoldenFive.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER104": break; @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; regs[1] = 0xF; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs index 87fdc02160..2d1abb76c1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Cony.cs @@ -20,13 +20,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER083": - if (Cart.prg_size == 128) + if (Cart.PrgSize == 128) { - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; chr_bank_mask_2k = 127; //prg_regs[0] = 0xC; //prg_regs[1] = 0xB; @@ -210,14 +210,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER083": - if (Cart.prg_size == 256) + if (Cart.PrgSize == 256) { - prg_bank_mask_16k = Cart.prg_size / 16 - 1; - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_2k = Cart.prg_size / 2 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_2k = Cart.PrgSize / 2 - 1; //prg_regs[1] = (byte)prg_bank_mask_16k; //is_2k_bank = true; @@ -397,18 +397,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER083": // We need one of the Cony boards to throw an error on an unexpected cart size, so we picked this one - if (Cart.prg_size != 128 && Cart.prg_size != 256 && Cart.prg_size != 1024) + if (Cart.PrgSize != 128 && Cart.PrgSize != 256 && Cart.PrgSize != 1024) { - throw new InvalidOperationException("Unexpected prg size of " + Cart.prg_size + " for Mapper 83"); + throw new InvalidOperationException("Unexpected prg size of " + Cart.PrgSize + " for Mapper 83"); } - if (Cart.prg_size == 1024) + if (Cart.PrgSize == 1024) { - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; prg_regs[1] = (byte)prg_bank_mask_16k; return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs index 713ca652c2..4ff671a0bd 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/CoolBoy.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_COOLBOY": AssertChr(0); @@ -25,8 +25,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - Cart.vram_size = 128; - Cart.wram_size = 0; + Cart.VramSize = 128; + Cart.WramSize = 0; BaseSetup(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs index 5ab37c8253..c78d76a5f5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/ExROM.cs @@ -92,10 +92,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER005": - Cart.wram_size = 64; + Cart.WramSize = 64; break; case "NES-ELROM": //Castlevania 3 - Dracula's Curse (U) case "HVC-ELROM": @@ -116,12 +116,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; - if (Cart.chr_size > 0) - chr_bank_mask_1k = Cart.chr_size - 1; + if (Cart.ChrSize > 0) + chr_bank_mask_1k = Cart.ChrSize - 1; else - chr_bank_mask_1k = Cart.vram_size - 1; + chr_bank_mask_1k = Cart.VramSize - 1; PoweronState(); @@ -169,7 +169,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES int? MaskWRAM(int bank) { bank &= 7; - switch (Cart.wram_size) + switch (Cart.WramSize) { case 0: return null; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper006.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper006.cs index 2954e2fe20..085ef54ab5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper006.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper006.cs @@ -15,17 +15,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER006": - Cart.vram_size = 32; + Cart.VramSize = 32; break; default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - _prgMask16k = Cart.prg_size / 16 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + _prgMask16k = Cart.PrgSize / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs index 3f228a9d75..feb2cbfeb8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FFE/Mapper017.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER017": break; @@ -26,8 +26,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask_8k = Cart.prg_size / 8 - 1; - chr_mask_1k = Cart.chr_size / 1 - 1; + prg_mask_8k = Cart.PrgSize / 8 - 1; + chr_mask_1k = Cart.ChrSize / 1 - 1; //Initial State prg_regs_8k[0] = 0x00; @@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES prg_regs_8k[2] = 0xFE; prg_regs_8k[3] = 0xFF; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FS304.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FS304.cs index e93f913f41..6d01ebe56a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FS304.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/FS304.cs @@ -9,21 +9,21 @@ public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-FS304": AssertChr(0); AssertPrg(512, 1024, 2048, 4096); - Cart.vram_size = 8; - Cart.wram_size = 8; - Cart.wram_battery = true; + Cart.VramSize = 8; + Cart.WramSize = 8; + Cart.WramBattery = true; break; default: return false; } - prg_mask_32k = Cart.prg_size / 32 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_mask_32k = Cart.PrgSize / 32 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs index e9dbcc3b51..36245d847f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Farid-UNROM-8-in-1.cs @@ -12,7 +12,7 @@ public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_FARID_UNROM_8-IN-1": AssertPrg(1024); @@ -22,8 +22,8 @@ return false; } - Cart.vram_size = 8; - SetMirrorType(Cart.pad_h, Cart.pad_v); + Cart.VramSize = 8; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GameGenie.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GameGenie.cs index 72ea53c74f..5651b83a47 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GameGenie.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GameGenie.cs @@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "CAMERICA-GAMEGENIE": break; @@ -41,8 +41,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } AssertChr(0); AssertPrg(4); - Cart.wram_size = 0; - Cart.vram_size = 0; + Cart.WramSize = 0; + Cart.VramSize = 0; SetMirroring(0, 0, 0, 0); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs index 548b4295a8..7c32fd5adf 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/GxROM.cs @@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER066": AssertPrg(32, 64, 128); AssertChr(8, 16, 32, 64); AssertVram(0); AssertWram(0,8); @@ -38,16 +38,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "BANDAI-GNROM": case "HVC-GNROM": case "NES-MHROM": //Super Mario Bros. / Duck Hunt - AssertPrg(Cart.board_type == "NES-MHROM" ? 64 : 128); AssertChr(8, 16, 32); AssertVram(0); AssertWram(0); + AssertPrg(Cart.BoardType == "NES-MHROM" ? 64 : 128); AssertChr(8, 16, 32); AssertVram(0); AssertWram(0); break; default: return false; } - prg_mask = (Cart.prg_size / 32) - 1; - chr_mask = (Cart.chr_size / 8) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_mask = (Cart.PrgSize / 32) - 1; + chr_mask = (Cart.ChrSize / 8) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); if(origin == EDetectionOrigin.INES) Console.WriteLine("Caution! This board (inferred from iNES) might have wrong mirr.type"); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs index a3d3b91ac3..564b396ad1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IC_74x377.cs @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER011": break; @@ -46,10 +46,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertPrg(32, 64, 128); AssertChr(8, 16, 32, 64, 128); - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs index 5bb43e3780..6dca928c36 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM-74_161_161_21_138.cs @@ -13,10 +13,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER077": - Cart.vram_size = 8; + Cart.VramSize = 8; break; case "IREM-74*161/161/21/138": AssertVram(8); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs index 2a2d10b773..8c0640182a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/IREM_TAM_S1.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER097": break; @@ -22,8 +22,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; prg_banks_16k[0] = 0xFF; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs index 64ad5f4f8a..dc86fcee68 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_G101.cs @@ -31,12 +31,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER032": break; case "IREM-G101": - if (Cart.pcb == "UNK-IF-13") + if (Cart.Pcb == "UNK-IF-13") { //special case for major league oneScreenHack = true; @@ -47,8 +47,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask = Cart.prg_size / 8 - 1; - chr_bank_mask = Cart.chr_size - 1; + prg_bank_mask = Cart.PrgSize / 8 - 1; + chr_bank_mask = Cart.ChrSize - 1; prg_regs_8k[0] = 0x00; prg_regs_8k[1] = 0x01; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs index fe3438a073..753a155a90 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Irem_H3001.cs @@ -37,7 +37,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER065": break; @@ -48,8 +48,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask = Cart.prg_size / 8 - 1; - chr_bank_mask = Cart.chr_size - 1; + prg_bank_mask = Cart.PrgSize / 8 - 1; + chr_bank_mask = Cart.ChrSize - 1; prg_regs_8k[0] = 0x00; prg_regs_8k[1] = 0x01; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs index 1592d60782..c5017d65b2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_05_06_07.cs @@ -22,13 +22,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER087": AssertPrg(8, 16, 32); AssertChr(8, 16, 32); AssertVram(0); - Cart.wram_size = 0; + Cart.WramSize = 0; break; case "JALECO-JF-05": case "JALECO-JF-06": @@ -43,9 +43,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - prg_byte_mask = Cart.prg_size * 1024 - 1; - chr_mask_8k = Cart.chr_size / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_byte_mask = Cart.PrgSize * 1024 - 1; + chr_mask_8k = Cart.ChrSize / 8 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs index 93891cbd79..e43449f319 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_13.cs @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER086": break; @@ -31,10 +31,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs index 779b2dab63..c573f3fbf5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_17.cs @@ -28,7 +28,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER072": break; @@ -38,10 +38,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; - chr_bank_mask_8k = (Cart.chr_size / 8) - 1; + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; + chr_bank_mask_8k = (Cart.ChrSize / 8) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); prg_banks_16k[1] = 0xFF; chr_banks_8k[0] = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs index 22f167a9ef..3b076997cb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_JF_19.cs @@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER092": break; @@ -35,10 +35,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; - chr_bank_mask_8k = (Cart.chr_size / 8) - 1; + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; + chr_bank_mask_8k = (Cart.ChrSize / 8) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); prg_banks_16k[0] = 0; chr_banks_8k[0] = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs index 9806d4bc39..ca5206b9fb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/JALECO_SS8806.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER018": case "JALECO-JF-23": @@ -34,8 +34,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - chr_bank_mask_1k = Cart.chr_size / 1 - 1; - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize / 1 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; prg_banks_8k[3] = 0xFF; // i have no idea what power-on defaults are supposed to be used diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs index 4cbe90604e..53f791b2f7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Jaleco-JF_11_14.cs @@ -28,7 +28,7 @@ Other chips used: Sunsoft-1 public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER140": break; @@ -39,7 +39,7 @@ Other chips used: Sunsoft-1 default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs index f567d5081c..a2bd2ea57f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-ACTION52.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER228": case "MLT-ACTION52": @@ -29,11 +29,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertPrg(256, 1536); - chr_bank_mask_8k = Cart.chr_size / 8 - 1; - prg_bank_mask_16k = Cart.prg_size / 16 - 1; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; - if (Cart.prg_size == 256) + if (Cart.PrgSize == 256) { cheetahmen = true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs index 6cc01a78b4..69fac40aa6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MLT-MAX15.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES bool reg_0_locked = false; public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER234": case "MLT-MAXI15": @@ -27,8 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs index 59891e4d69..9b78a2df32 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/HKROM.cs @@ -17,16 +17,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "NES-HKROM": AssertPrg(256); AssertChr(256); AssertVram(0); AssertWram(0,1); - Cart.wram_size = 1; //1K of wram is in the mmc6 - Cart.wram_battery = true; //and its battery backed. + Cart.WramSize = 1; //1K of wram is in the mmc6 + Cart.WramBattery = true; //and its battery backed. break; case "MAPPER004_MMC6": - Cart.wram_size = 1; //1K of wram is in the mmc6 - Cart.wram_battery = true; //and its battery backed. + Cart.WramSize = 1; //1K of wram is in the mmc6 + Cart.WramBattery = true; //and its battery backed. break; default: return false; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs index 0db50267f2..f65fbd4763 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/MMC3.cs @@ -64,10 +64,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { MirrorMask = 1; this.board = board; - if (board.Cart.chips.Contains("MMC3A")) MMC3Type = EMMC3Type.MMC3A; - else if (board.Cart.chips.Contains("MMC3B")) MMC3Type = EMMC3Type.MMC3BSharp; - else if (board.Cart.chips.Contains("MMC3BNONSHARP")) MMC3Type = EMMC3Type.MMC3BNonSharp; - else if (board.Cart.chips.Contains("MMC3C")) MMC3Type = EMMC3Type.MMC3C; + if (board.Cart.Chips.Contains("MMC3A")) MMC3Type = EMMC3Type.MMC3A; + else if (board.Cart.Chips.Contains("MMC3B")) MMC3Type = EMMC3Type.MMC3BSharp; + else if (board.Cart.Chips.Contains("MMC3BNONSHARP")) MMC3Type = EMMC3Type.MMC3BNonSharp; + else if (board.Cart.Chips.Contains("MMC3C")) MMC3Type = EMMC3Type.MMC3C; else MMC3Type = EMMC3Type.MMC3C; //arbitrary choice. is it the best choice? //initial values seem necessary @@ -388,10 +388,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES protected virtual void BaseSetup() { - int num_prg_banks = Cart.prg_size / 8; + int num_prg_banks = Cart.PrgSize / 8; prg_mask = num_prg_banks - 1; - int num_chr_banks = (Cart.chr_size); + int num_chr_banks = (Cart.ChrSize); if (num_chr_banks == 0) // vram only board num_chr_banks = 8; chr_mask = num_chr_banks - 1; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs index 38e3bf0030..41a0bce1bc 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper012.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER012": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs index 004ef83464..fd08211014 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper037.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER037": case "PAL-ZZ": diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs index bb45b18b0c..e7a48e6a46 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper044.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public sealed override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER044": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs index 0f71568bc9..6b2f32f628 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper049.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER049": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs index 25d8b8945e..cb0331559f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper052.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER052": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs index e8e9efdad1..f28adc32af 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper074.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER074": break; @@ -24,7 +24,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES Vram = new byte[2048]; - if (Cart.chr_size == 0 && Cart.board_type == "MAPPER074") + if (Cart.ChrSize == 0 && Cart.BoardType == "MAPPER074") throw new Exception("Mapper074 carts MUST have chr rom!"); BaseSetup(); return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper114.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper114.cs index b703c9cd4b..ddef1ddd0b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper114.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper114.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER114": break; @@ -24,7 +24,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES BaseSetup(); SetMirrorType(EMirrorType.Horizontal); mmc3.MMC3Type = MMC3.EMMC3Type.MMC3A; - prg_mask_16 = Cart.prg_size / 16 - 1; + prg_mask_16 = Cart.PrgSize / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs index 058af25e28..333a0e810e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper115.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER115": case "MAPPER248": diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs index 1e9135b532..f9b6e4bcb3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper121.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER121": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper123.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper123.cs index 2f000d3982..f009804f69 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper123.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper123.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER123": // Nestopia suggests this board is mapper 123, I do not have any ROMs with this ines header info to confirm case "UNIF_UNL-H2288": diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs index fa0121749f..00f21102cb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper134.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER134": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs index 98282c354d..9190720d58 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper165.cs @@ -13,16 +13,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER165": break; default: return false; } - Cart.vram_size = 4; + Cart.VramSize = 4; - real_chr_mask = Cart.chr_size / 4 - 1; + real_chr_mask = Cart.ChrSize / 4 - 1; BaseSetup(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper182.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper182.cs index 3a7c08c418..1e4cc0e1f8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper182.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper182.cs @@ -5,7 +5,7 @@ public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER182": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper187.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper187.cs index e15f1f154f..57d0ba64e0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper187.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper187.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER187": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs index b520d5f515..0ac5e5f8d9 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper189.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER189": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper191.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper191.cs index a0197eab11..87f7a1aaac 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper191.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper191.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER191": break; @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } //this board has 2k of chr ram - Cart.vram_size = 2; + Cart.VramSize = 2; BaseSetup(); //theres a possibly bogus Q Boy rom using this mapper but I have no idea what emulator its supposed to boot in, for proof diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs index e16cc2e9ff..53463eac8a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper192.cs @@ -7,7 +7,7 @@ public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER192": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper194.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper194.cs index 4788c2ba6c..ecf869cb19 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper194.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper194.cs @@ -7,7 +7,7 @@ public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER194": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195.cs index 218f605778..f11c2caff0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195.cs @@ -6,7 +6,7 @@ public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER195": break; @@ -14,7 +14,7 @@ return false; } - vram_bank_mask_1k = Cart.vram_size / 1 - 1; + vram_bank_mask_1k = Cart.VramSize / 1 - 1; BaseSetup(); return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195_CW.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195_CW.cs index e914696ad7..e3231e9aa6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195_CW.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper195_CW.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER195_CW": break; @@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - vram_bank_mask_1k = Cart.vram_size / 1 - 1; + vram_bank_mask_1k = Cart.VramSize / 1 - 1; BaseSetup(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs index 54a285ad0d..a9435ebe1b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper196.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER196": break; @@ -27,8 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - Cart.wram_size = 0; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; + Cart.WramSize = 0; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; BaseSetup(); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs index 6f5de72518..d8a7f6210b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper197.cs @@ -7,17 +7,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER197": break; default: return false; } - int num_prg_banks = Cart.prg_size / 8; + int num_prg_banks = Cart.PrgSize / 8; prg_mask = num_prg_banks - 1; - int num_chr_banks = (Cart.chr_size); + int num_chr_banks = (Cart.ChrSize); chr_mask = num_chr_banks - 1; mmc3 = new Mapper197_MMC3(this, num_prg_banks); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper198.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper198.cs index e721f58971..a6031fdb23 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper198.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper198.cs @@ -4,7 +4,7 @@ { public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER198": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs index 6b186b0df1..7322c61100 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper199.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER199": break; @@ -16,8 +16,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - exRegs[0] = (byte)(Cart.prg_size / 8 - 2); - exRegs[1] = (byte)(Cart.prg_size / 8 - 1); + exRegs[0] = (byte)(Cart.PrgSize / 8 - 2); + exRegs[1] = (byte)(Cart.PrgSize / 8 - 1); exRegs[2] = 1; exRegs[3] = 3; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper205.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper205.cs index 6ecc67be5e..5c098d54df 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper205.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper205.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER205": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper208.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper208.cs index e4352391b5..c88421f272 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper208.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper208.cs @@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER208": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs index bbfedc44d3..22ff312e97 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper215.cs @@ -44,7 +44,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER215": break; @@ -61,8 +61,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES exRegs[2] = 4; exRegs[3] = 0; - prg_mask_8k = Cart.prg_size / 8 - 1; - chr_mask_1k = Cart.chr_size - 1; + prg_mask_8k = Cart.PrgSize / 8 - 1; + chr_mask_1k = Cart.ChrSize - 1; prg_regs_8k[0] = 0; prg_regs_8k[1] = 1; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs index cae54a2150..3127aece61 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper217.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER217": break; @@ -28,8 +28,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES exRegs[2] = 0x03; exRegs[3] = 0x00; - prg_mask_8k = Cart.prg_size / 8 - 1; - chr_mask_1k = Cart.chr_size - 1; + prg_mask_8k = Cart.PrgSize / 8 - 1; + chr_mask_1k = Cart.ChrSize - 1; prg_regs_8k[0] = 0; prg_regs_8k[1] = 1; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs index 02e0354c61..04690ba427 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper219.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER219": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper223.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper223.cs index cfa381dc8e..9e9745c4b6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper223.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper223.cs @@ -5,7 +5,7 @@ { public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER223": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs index ed8d91544f..7ffa4b660e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper238.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER238": case "UNIF_UNL-603-5052": diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs index 902d173dfb..8d2dcd7dd7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper245.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER245": AssertVram(8); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs index d946395ee4..c207ec60f1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper249.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // mmc3 with pirate crap bolt on public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER249": break; @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } AssertPrg(256, 512); AssertChr(256); - Cart.wram_size = 8; + Cart.WramSize = 8; BaseSetup(); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper250.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper250.cs index 36f489f465..2efbaac223 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper250.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper250.cs @@ -7,7 +7,7 @@ { public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER250": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs index b326dccd60..c676040e03 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Mapper254.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER254": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs index 8484b80e0d..5d98967d9f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/NES-QJ.cs @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER047": // Junk roms break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs index e9d6b7ab8e..f6a966d6f1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/Pocahontas.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "Pocahontas": break; @@ -27,8 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES exRegs[1] = 0; exRegs[2] = 0; - prg_mask_8k = Cart.prg_size / 8 - 1; - chr_mask_1k = Cart.chr_size - 1; + prg_mask_8k = Cart.PrgSize / 8 - 1; + chr_mask_1k = Cart.ChrSize - 1; prg_regs_8k[0] = 0; prg_regs_8k[1] = 1; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs index c55ed1dbf7..fa2be5c707 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/RexSoftSL1632.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-SL1632": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs index 52c82ce674..d0cf57e941 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TLSROM.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "NES-TLSROM": //pro sport hockey (U) AssertPrg(128); AssertChr(128); AssertVram(0); AssertWram(0); @@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES break; case "MAPPER158": // as above - AssertVram(0); Cart.wram_size = 0; + AssertVram(0); Cart.WramSize = 0; break; case "HVC-TLSROM": AssertPrg(256); AssertChr(128); AssertVram(0); AssertWram(0); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TQROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TQROM.cs index 1616b0660a..ce3c5a09be 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TQROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TQROM.cs @@ -7,10 +7,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER119": - Cart.vram_size = 8; Cart.wram_size = 0; // Junk ROMs get these wrong + Cart.VramSize = 8; Cart.WramSize = 0; // Junk ROMs get these wrong break; case "NES-TQROM": // High Speed and Pin Bot AssertPrg(128); AssertChr(64); AssertVram(8); AssertWram(0); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TVROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TVROM.cs index d792d223a2..5abeb7ce00 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TVROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TVROM.cs @@ -5,12 +5,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER004": - if (Cart.inesmirroring != 2) // send these to TxROM + if (Cart.InesMirroring != 2) // send these to TxROM return false; - Cart.vram_size = 8; + Cart.VramSize = 8; break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TxROM.cs index 8c806e1ff3..2fbfd70c52 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TxROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/MMC3_family/TxROM.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { get { - if (!Cart.wram_battery) return null; + if (!Cart.WramBattery) return null; return Wram; //some boards have a wram that is backed-up or not backed-up. need to handle that somehow //(nestopia splits it into NVWRAM and WRAM but i didnt like that at first.. but it may player better with this architecture) @@ -28,7 +28,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER116_HACKY": break; @@ -36,7 +36,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "TXROM-HOMEBREW": // should this even exist? break; case "MAPPER004": - if (Cart.inesmirroring == 2) // send these to TVROM + if (Cart.InesMirroring == 2) // send these to TVROM return false; break; case "NES-TBROM": //tecmo world cup soccer (DE) [untested] @@ -98,8 +98,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertBattery(false); break; case "UNIF_TSROM": - Cart.wram_size = 8; - Cart.wram_battery = false; + Cart.WramSize = 8; + Cart.WramBattery = false; break; case "ACCLAIM-MC-ACC": //alien 3 (U), bart simpson vs the world (U) AssertPrg(128, 256); AssertChr(128, 256); AssertVram(0); AssertWram(0); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs index 322a6136f7..ecfe91d186 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper015.cs @@ -14,18 +14,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER015": break; default: return false; } - prg_bank_mask_8k = (Cart.prg_size / 8) - 1; + prg_bank_mask_8k = (Cart.PrgSize / 8) - 1; // not a maskable size (BF=10111111) // so just set mask to FF and hope for the best - if (Cart.prg_size==192) + if (Cart.PrgSize==192) { prg_bank_mask_8k = 0xFF; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs index 317a590144..51d1dd4eb3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper028.cs @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER028": break; @@ -31,10 +31,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } AssertPrg(32, 64, 128, 256, 512, 1024, 2048); AssertChr(0); - chr_mask_8k = Cart.chr_size / 8 - 1; - prg_mask_16k = Cart.prg_size / 16 - 1; - Cart.wram_size = 0; - Cart.vram_size = 32; + chr_mask_8k = Cart.ChrSize / 8 - 1; + prg_mask_16k = Cart.PrgSize / 16 - 1; + Cart.WramSize = 0; + Cart.VramSize = 32; // the only part of initial state that is important is that // C000:FFFF contains the tail end of the rom outer = 63; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper029.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper029.cs index ef1e6e9562..0ff5699689 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper029.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper029.cs @@ -9,7 +9,7 @@ public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "Mapper029": case "UNIF_JERKFACE": @@ -21,9 +21,9 @@ SetMirrorType(EMirrorType.Vertical); AssertChr(0); AssertPrg(32, 64, 128, 256, 512, 1024); - Cart.wram_size = 8; - Cart.vram_size = 32; - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + Cart.WramSize = 8; + Cart.VramSize = 32; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs index 9a836e5f92..a1371cfa12 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper030.cs @@ -63,43 +63,43 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER030": - Cart.vram_size = 32; + Cart.VramSize = 32; break; case "MAPPER0030-00": AssertVram(8, 16, 32); break; case "UNIF_UNROM-512-8": - Cart.vram_size = 8; + Cart.VramSize = 8; break; case "UNIF_UNROM-512-16": - Cart.vram_size = 16; + Cart.VramSize = 16; break; case "UNIF_UNROM-512-32": - Cart.vram_size = 32; + Cart.VramSize = 32; break; default: return false; } - if (Cart.wram_battery) + if (Cart.WramBattery) { flash_state = 0; flash_mode = flashmode.fm_default; if (flash_rom == null) { // extra space is used to hold information about what sectors have been flashed - flash_rom = new byte[Cart.prg_size * 1024 + Cart.prg_size]; + flash_rom = new byte[Cart.PrgSize * 1024 + Cart.PrgSize]; } } - SetMirrorType(CalculateMirrorType(Cart.pad_h, Cart.pad_v)); + SetMirrorType(CalculateMirrorType(Cart.PadH, Cart.PadV)); AssertChr(0); AssertPrg(128, 256, 512); //Flash chip sizes that fits sealie unrom-512 are 39SF010, 39SF020, 39SF040. - Cart.wram_size = 0; - prg_bank_mask_16k = Cart.prg_size / 16 - 1; - vram_bank_mask_8k = Cart.vram_size / 8 - 1; + Cart.WramSize = 0; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; + vram_bank_mask_8k = Cart.VramSize / 8 - 1; return true; } @@ -109,15 +109,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override void WritePrg(int addr, byte value) { - if ((!Cart.wram_battery) || (addr >= 0x4000)) + if ((!Cart.WramBattery) || (addr >= 0x4000)) { byte value2 = value; - if (!Cart.wram_battery) + if (!Cart.WramBattery) value2 = HandleNormalPRGConflict(addr, value); chr = value2 >> 5 & 3 & vram_bank_mask_8k; prg = value2 & prg_bank_mask_16k; - if ((Cart.pad_h == 0) && (Cart.pad_v == 0)) + if ((Cart.PadH == 0) && (Cart.PadV == 0)) { int mirror = (value2 & 0x80) >> 7; SetMirrorType(CalculateMirrorType(mirror, mirror)); @@ -152,16 +152,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { if (value == 0x10) //You probably don't want to do this, as this is erase entire flash chip. :) { //Of course, we gotta emulate the behaviour. - for (int i = 0; i < (Cart.prg_size / 4); i++) + for (int i = 0; i < (Cart.PrgSize / 4); i++) increment_flash_write_count(i, true); for (int i = 0; i < flash_rom.Count(); i++) - flash_rom[Cart.prg_size + i] = 0xFF; + flash_rom[Cart.PrgSize + i] = 0xFF; } else if (value == 0x30) { increment_flash_write_count(addr); for (int i = 0; i < 0x1000; i++) - flash_rom[(prg << 14 | addr & 0x3000) + i + Cart.prg_size] = 0xFF; + flash_rom[(prg << 14 | addr & 0x3000) + i + Cart.PrgSize] = 0xFF; } flash_mode = 0; flash_state = 0; @@ -172,9 +172,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { increment_flash_write_count(addr); for (int i = 0; i < 0x1000; i++) - flash_rom[(prg << 14 | addr & 0x3000) + i + Cart.prg_size] = Rom[(prg << 14 | addr & 0x3000) + i]; + flash_rom[(prg << 14 | addr & 0x3000) + i + Cart.PrgSize] = Rom[(prg << 14 | addr & 0x3000) + i]; } - flash_rom[Cart.prg_size + (prg << 14 | addr & 0x3fff)] &= value; + flash_rom[Cart.PrgSize + (prg << 14 | addr & 0x3fff)] &= value; flash_state = 0; flash_mode = 0; } @@ -189,7 +189,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override byte ReadPrg(int addr) { int bank = addr >= 0x4000 ? prg_bank_mask_16k : prg; - if (Cart.wram_battery) + if (Cart.WramBattery) { if (flash_mode == flashmode.fm_id) { @@ -198,7 +198,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case 0: return 0xBF; case 1: - switch (Cart.prg_size) + switch (Cart.PrgSize) { case 128: return 0xB5; @@ -213,7 +213,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } } if (get_flash_write_count(addr) > 0) - return flash_rom[Cart.prg_size + (bank << 14 | addr & 0x3fff)]; + return flash_rom[Cart.PrgSize + (bank << 14 | addr & 0x3fff)]; } return Rom[bank << 14 | addr & 0x3fff]; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs index da5fdf81b1..76e4d326b1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper034.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER034": // 3-D Battles of World Runner, The (U) [b5].nes // TODO: No idea what to assert here @@ -25,11 +25,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - Cart.wram_size = 8; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_4k = Cart.chr_size / 4 - 1; + Cart.WramSize = 8; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_4k = Cart.ChrSize / 4 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); chr[1] = 1; return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs index c3fe23bc2a..ddbc71054f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper036.cs @@ -18,18 +18,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER036": AssertVram(0); - Cart.wram_size = 0; // AssertWram(0); // GoodNES good dump of Strike Wolf specifies 8kb of wram + Cart.WramSize = 0; // AssertWram(0); // GoodNES good dump of Strike Wolf specifies 8kb of wram break; default: return false; } - chr_mask = Cart.chr_size / 8 - 1; - prg_mask = Cart.prg_size / 32 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + chr_mask = Cart.ChrSize / 8 - 1; + prg_mask = Cart.PrgSize / 32 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs index 3208c17569..0e42bb1317 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper038.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES int prg, chr; public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER038": case "UNL-PCI556": @@ -23,9 +23,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertChr(32); AssertVram(0); AssertWram(0); - prg_mask = Cart.prg_size / 32 - 1; - chr_mask = Cart.chr_size / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_mask = Cart.PrgSize / 32 - 1; + chr_mask = Cart.ChrSize / 8 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs index e8e971dd0c..49b878d9ef 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper040.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER040": AssertChr(8); AssertPrg(64); AssertVram(0); AssertWram(0); @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs index f4b33421ac..fcde10157b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper041.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER041": case "MLT-CALTRON6IN1": @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } AssertPrg(256); AssertChr(128); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs index b116816ad2..bb22ccf402 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper042.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER042": break; @@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } AssertPrg(128); - if (Cart.vram_size == 0) + if (Cart.VramSize == 0) AssertChr(128); else { @@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertChr(0); } - Cart.wram_size = 0; + Cart.WramSize = 0; // not sure on initial mirroring SetMirrorType(EMirrorType.Vertical); return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs index 90e4381884..1a2dfc85c5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper043.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER043": break; @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - Cart.wram_size = 0; + Cart.WramSize = 0; // not sure on initial mirroring SetMirrorType(EMirrorType.Vertical); return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs index 2c2cb3762b..6985c571b8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper045.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER045": case "UNIF_BMC-SuperHIK8in1": @@ -24,8 +24,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - chr_bank_mask_2k = Cart.chr_size / 2 - 1; - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + chr_bank_mask_2k = Cart.ChrSize / 2 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; BaseSetup(); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs index 2d5d3af9d6..83ca03e0c1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper046.cs @@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER046": break; @@ -62,9 +62,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); prg_bank_32k_H = 0; prg_bank_32k_L = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper051.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper051.cs index 72648e221e..3a1fc6c0ab 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper051.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper051.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER051": break; @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper053.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper053.cs index 967e78ffd7..b32752eac0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper053.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper053.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER053": break; @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } @@ -92,7 +92,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-Supervision16in1": break; @@ -100,7 +100,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs index f104565962..9ca7521143 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper057.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER057": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs index 475f21381d..9e3a00f4cd 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper058.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER058": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs index aa1bc62746..7c7c9e829f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper063.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER063": break; @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - Cart.wram_size = 0; + Cart.WramSize = 0; // not sure on initial mirroring SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs index b8acb36024..6e303c2b6f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper069.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "SUNSOFT-5B": //Gimmick! (J) AssertPrg(256); AssertChr(128); AssertWram(0); AssertVram(0); AssertBattery(false); @@ -90,7 +90,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "NES-JLROM": // Mr Gimmick AssertPrg(256); AssertChr(128); AssertWram(0); AssertVram(0); AssertBattery(false); @@ -120,9 +120,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES protected void BaseConfigure() { - prg_bank_mask_8k = (Cart.prg_size / 8) - 1; - wram_bank_mask_8k = (Cart.wram_size / 8) - 1; - chr_bank_mask_1k = Cart.chr_size - 1; + prg_bank_mask_8k = (Cart.PrgSize / 8) - 1; + wram_bank_mask_8k = (Cart.WramSize / 8) - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; prg_banks_8k[3] = 0xFF; SetMirrorType(EMirrorType.Vertical); } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs index 74d8de0848..6a805b2895 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper078.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { holydiver = false; - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER078": break; @@ -28,8 +28,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; prg_banks_16k[1] = 0xFF; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs index 3de2b6fa3d..39b5b7fa5d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper090.cs @@ -65,7 +65,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER035": mapper_035 = true; @@ -86,11 +86,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; // Junk support - if (Cart.chr_size == 2040) + if (Cart.ChrSize == 2040) { chr_bank_mask_1k = 2047; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs index 25adc3d893..528701791e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper091.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER091": break; @@ -24,21 +24,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - int chrSize = Cart.chr_size; + int chrSize = Cart.ChrSize; if (chrSize > 256) // Hack to support some bad dumps { chrSize = 512; } chr_bank_mask_2k = chrSize / 2 - 1; - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; prg_regs_8k[3] = 0xFF; prg_regs_8k[2] = 0xFE; mmc3 = new MMC3(this, 0x7FFFFFFF); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs index 4bee16b8ae..8e86c952e9 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper101.cs @@ -24,21 +24,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER101": AssertPrg(16, 32); AssertVram(0); - Cart.wram_size = 0; - Cart.wram_battery = false; + Cart.WramSize = 0; + Cart.WramBattery = false; AssertChr(8, 16, 32, 64, 128, 256, 512, 1024, 2048); break; default: return false; } - chr_bank_mask_8k = (Cart.chr_size / 8) - 1; + chr_bank_mask_8k = (Cart.ChrSize / 8) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs index 50bbaa896b..8d28eb61bb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper103.cs @@ -11,11 +11,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER103": // ines identification - Cart.wram_size = 16; - Cart.vram_size = 8; + Cart.WramSize = 16; + Cart.VramSize = 8; AssertPrg(128); break; case "BTL-2708": // ?? diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs index 65f8dafd25..98b5cd4c41 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper106.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER106": break; @@ -28,8 +28,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES regs[0xA] = 0xFF; regs[0xB] = 0xFF; - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size / 1 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize / 1 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs index 8c7e5ca155..afcfceca4b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper107.cs @@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER107": AssertPrg(128); AssertChr(64); AssertWram(8); AssertVram(0); AssertBattery(false); @@ -29,10 +29,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = (Cart.prg_size / 32) - 1; - chr_bank_mask_8k = (Cart.chr_size / 8) - 1; + prg_bank_mask_32k = (Cart.PrgSize / 32) - 1; + chr_bank_mask_8k = (Cart.ChrSize / 8) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs index f0305f47f2..beeeec0660 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper108.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER108": break; @@ -18,9 +18,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } AssertPrg(128); AssertChr(0); - Cart.vram_size = 8; + Cart.VramSize = 8; AssertWram(0); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs index c94dbf0be2..7e0fd12741 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper116.cs @@ -63,10 +63,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - string oldBoardType = Cart.board_type; + string oldBoardType = Cart.BoardType; //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER116": break; @@ -74,9 +74,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); - Cart.board_type = "MAPPER116_HACKY"; + Cart.BoardType = "MAPPER116_HACKY"; vrc2 = new VRC2_4(); vrc2.Create(NES); @@ -104,7 +104,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES mmc1.Configure(origin); mmc1_reset(); - Cart.board_type = oldBoardType; + Cart.BoardType = oldBoardType; mode = 0; Sync(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs index f90b0665cc..30c4747f35 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper120.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER120": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs index 1a987b27e0..eb22671972 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper125.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER125": case "UNIF_UNL-LH32": @@ -20,9 +20,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs index 5e4f4a1173..def4ef5ee2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper132.cs @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER132": case "UNIF_UNL-22211": @@ -32,9 +32,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask = Cart.prg_size / 32 - 1; - chr_mask = Cart.chr_size / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_mask = Cart.PrgSize / 32 - 1; + chr_mask = Cart.ChrSize / 8 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); //SetMirrorType(EMirrorType.Vertical); return true; } @@ -88,7 +88,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override byte ReadPrg(int addr) { // Xiao Ma Li (Ch) has 16k prg (mapped to both 0x8000 and 0xC000) - if (Cart.prg_size == 16) + if (Cart.PrgSize == 16) { return Rom[addr & 0x3FFF]; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper136.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper136.cs index 7fc1f001b8..cdcbb5c752 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper136.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper136.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER136": break; @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - _chrBankMask_8k = Cart.chr_size / 8 - 1; + _chrBankMask_8k = Cart.ChrSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper142.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper142.cs index 4da7748523..f3f15ce374 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper142.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper142.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER142": case "UNIF_UNL-KS7032": @@ -24,7 +24,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } SetMirrorType(EMirrorType.Horizontal); - _lastBank = Cart.prg_size / 8 - 1; + _lastBank = Cart.PrgSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper143.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper143.cs index 9e6608a776..1f2fbf6e08 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper143.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper143.cs @@ -8,7 +8,7 @@ { public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER143": case "UNIF_UNL-SA-NROM": @@ -18,7 +18,7 @@ } AssertPrg(32); AssertChr(8); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper147.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper147.cs index 69442f4a34..4bfab41db1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper147.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper147.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER147": case "UNIF_UNL-TC-U01-1.5M": @@ -23,10 +23,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - _chrBankMask_8k = Cart.chr_size / 8 - 1; - _prgBankMask_32k = Cart.prg_size / 32 - 1; + _chrBankMask_8k = Cart.ChrSize / 8 - 1; + _prgBankMask_32k = Cart.PrgSize / 32 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs index 8e3e8cec06..85f19ef1c1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper150.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER150": break; @@ -20,8 +20,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - chr_mask = (Cart.chr_size / 8) - 1; - prg_mask = (Cart.prg_size / 32) - 1; + chr_mask = (Cart.ChrSize / 8) - 1; + prg_mask = (Cart.PrgSize / 32) - 1; latch[1] = 3; return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs index 068e0b2552..bc5eccc82b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper156.cs @@ -18,15 +18,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER156": break; default: return false; } - prg_mask = Cart.prg_size / 16 - 1; - chr_mask = Cart.chr_size / 1 - 1; + prg_mask = Cart.PrgSize / 16 - 1; + chr_mask = Cart.ChrSize / 1 - 1; SetMirrorType(EMirrorType.OneScreenA); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper162.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper162.cs index 871de9123f..a9a69adb20 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper162.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper162.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER162": case "UNIF_UNL-FS304": @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; reg[0] = 3; reg[3] = 7; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper164.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper164.cs index 58fd0217e9..edb795c64e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper164.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper164.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER164": break; @@ -22,8 +22,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } _prgLow = 0xFF; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs index 3d1744f3e3..fd0bfe99b8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper168.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER168": case "UNL-RACERMATE": @@ -25,11 +25,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } AssertPrg(64); - Cart.chr_size = 0; //AssertChr(0); //shitty dumps - Cart.vram_size = 64; //AssertVram(64); //shitty dumps - Cart.wram_size = 0; //AssertWram(0); // shitty dumps + Cart.ChrSize = 0; //AssertChr(0); //shitty dumps + Cart.VramSize = 64; //AssertVram(64); //shitty dumps + Cart.WramSize = 0; //AssertWram(0); // shitty dumps //AssertBattery(true); // battery is handled directly - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs index e9804ed985..87e21ee818 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper170.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER170": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs index 814bb74e72..9abd9a152b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper175.cs @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER175": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs index f4ec850397..ce9039a8f1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper176.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { // http://wiki.nesdev.com/w/index.php/INES_Mapper_176 // Mapper 176 was originally used for some Waixing boards, but goodNES 3.23 seems to go with CaH4e3's opinion that this mapper is FK23C @@ -27,8 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - prg_bank_mask_8k = (Cart.prg_size / 8) - 1; - chr_bank_mask_8k = (Cart.chr_size / 8) - 1; + prg_bank_mask_8k = (Cart.PrgSize / 8) - 1; + chr_bank_mask_8k = (Cart.ChrSize / 8) - 1; mirror = 0; SyncMirror(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs index 402b65871f..290a0813a5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper177.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER177": break; @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } AssertPrg(1024); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs index d17c6b96b8..a0a2f94814 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper178.cs @@ -15,14 +15,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER178": break; default: return false; } - prg_bank_mask_32k = (Cart.prg_size / 32) - 1; + prg_bank_mask_32k = (Cart.PrgSize / 32) - 1; prg_banks_32k[0] = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs index d94cd39b8e..682c08dd15 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper180.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER180": break; @@ -22,8 +22,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; prg_banks_16k[0] = 0; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs index 63af88ff9d..9d797ae38d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper183.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER183": break; @@ -27,8 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs index 73a8a293c0..b6bee77265 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper186.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER186": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs index bb6dac07f8..32ba9bd24b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper188.cs @@ -11,20 +11,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER188": AssertVram(8); AssertChr(0); AssertPrg(128, 256); - Cart.wram_size = 0; + Cart.WramSize = 0; break; default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_16k_mask = Cart.prg_size / 16 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_16k_mask = Cart.PrgSize / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs index c25452b429..a423f78f68 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper190.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER190": AssertPrg(256); AssertChr(128); AssertVram(0); AssertWram(8); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs index 279c9f2f73..6e318fb704 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper193.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER193": break; @@ -23,12 +23,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = (Cart.prg_size / 8) - 1; + prg_bank_mask_8k = (Cart.PrgSize / 8) - 1; prg_banks_8k[1] = 0xFD; prg_banks_8k[2] = 0xFE; prg_banks_8k[3] = 0xFF; - chr_bank_mask_2k = (Cart.chr_size / 2) - 1; + chr_bank_mask_2k = (Cart.ChrSize / 2) - 1; SetMirrorType(EMirrorType.Vertical); SyncMap(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs index 89300bc076..f6b6ed0e56 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper200.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER200": case "MAPPER229": @@ -21,8 +21,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs index e3fa67d6b1..3a6419e302 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper201.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public int chr_bank_mask_8k; public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER201": break; @@ -18,8 +18,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } SetMirrorType(EMirrorType.Vertical); - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper202.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper202.cs index 5e7370e617..20354d2696 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper202.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper202.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER202": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs index 9e7e274773..86fb58e962 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper203.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER203": break; @@ -19,8 +19,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper204.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper204.cs index e62f75b232..06977218b1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper204.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper204.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER204": break; @@ -21,8 +21,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask_16k = Cart.prg_size / 16 - 1; - chr_mask_8k = Cart.chr_size / 8 - 1; + prg_mask_16k = Cart.PrgSize / 16 - 1; + chr_mask_8k = Cart.ChrSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs index 7cd99732cb..057673694e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper212.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER212": break; @@ -22,11 +22,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); - chr_bank_mask_8k = Cart.chr_size / 8 - 1; - prg_bank_mask_16k = Cart.prg_size / 16 - 1; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; _reg = 65535; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs index 4d2ca3c8a0..eebe4bb08d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper213.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER213": break; @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); _reg = 65535; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper214.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper214.cs index 5d040d5b11..a5b12ad2b7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper214.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper214.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER214": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper218.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper218.cs index a1c63940d9..deb1236987 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper218.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper218.cs @@ -10,20 +10,20 @@ public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER218": // the cart actually has 0k vram, but due to massive abuse of the ines format, is labeled as 8k // supposed vram is (correctly) not used in our implementation AssertPrg(8, 16, 32); AssertChr(0); /*AssertVram(0);*/ AssertWram(0); - Cart.vram_size = 0; // force vram size 0 + Cart.VramSize = 0; // force vram size 0 break; default: return false; } // due to massive abuse of the ines format, the mirroring and 4 screen bits have slightly different meanings - switch (Cart.inesmirroring) + switch (Cart.InesMirroring) { case 1: // VA10 to PA10 // pattern: ABABABAB @@ -49,7 +49,7 @@ // we need an ines identification for correct mirroring return false; } - prg_byte_mask = (Cart.prg_size * 1024) - 1; + prg_byte_mask = (Cart.PrgSize * 1024) - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs index 5c2b497add..f83ad51d2e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper220.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-KS7057": case "MAPPER220": @@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask_2k = Cart.prg_size / 2 - 1; + prg_mask_2k = Cart.PrgSize / 2 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs index 667cf7c80a..e16d8a85af 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper221.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER221": case "UNIF_BMC-N625092": diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs index 7005525b08..5267727091 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper222.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER222": break; @@ -29,8 +29,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES SetMirrorType(EMirrorType.Vertical); - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; prg[3] = prg_bank_mask_8k; prg[2] = prg[3] - 1; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs index 38026b066a..c3de85240b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper225.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER225": case "MAPPER255": // Duplicate of 225 accoring to: http://problemkaputt.de/everynes.htm @@ -22,9 +22,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - chr_bank_mask_8k = Cart.chr_size / 8 - 1; - prg_bank_mask_16k = Cart.prg_size / 16 - 1; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs index f540d2f017..19f8c8bd20 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper226.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { int prg_mask_hack = 1; - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER226": break; @@ -32,8 +32,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES prg_page = 0; prg_mode = false; - prg_mask_32k = (Cart.prg_size / prg_mask_hack) / 32 - 1; - prg_mask_16k = (Cart.prg_size / prg_mask_hack) / 16 - 1; + prg_mask_32k = (Cart.PrgSize / prg_mask_hack) / 32 - 1; + prg_mask_16k = (Cart.PrgSize / prg_mask_hack) / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs index 3537e16984..f167e84583 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper227.cs @@ -15,16 +15,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER227": //AssertVram(16); - Cart.vram_size = 16; + Cart.VramSize = 16; break; default: return false; } - _prgBankMask16K = (Cart.prg_size / 16) - 1; + _prgBankMask16K = (Cart.PrgSize / 16) - 1; SetMirrorType(EMirrorType.Vertical); _vramProtected = false; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs index 23242a996a..c87c00cee1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper230.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER230": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs index f551966ce4..4993ee2388 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper231.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER231": break; @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs index 5a0b1e6b4b..e7993e79e0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper233.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER233": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper235.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper235.cs index 2e055411ab..b298ecd3b4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper235.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper235.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER235": break; @@ -19,10 +19,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - _prg16BankMask = Cart.prg_size / 16 - 1; - _prg32BankMask = Cart.prg_size / 32 - 1; + _prg16BankMask = Cart.PrgSize / 16 - 1; + _prg32BankMask = Cart.PrgSize / 32 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs index 4db2556d4b..b7d6b8755f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper236.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-70in1": diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs index 4d50a12a6d..765657f076 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper240.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER240": break; @@ -24,9 +24,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_8k = Cart.chr_size / 8 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); prg_bank_32k = 0; chr_bank_8k = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs index d7d2aefccd..f5ef98d9de 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper241.cs @@ -15,18 +15,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER241": break; default: return false; } - prg_bank_mask_32k = (Cart.prg_size / 32) - 1; + prg_bank_mask_32k = (Cart.PrgSize / 32) - 1; prg_banks_32k[0] = 0; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs index 72cca3461f..68f97a0acb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper242.cs @@ -24,7 +24,7 @@ mirroring - both public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER242": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs index 8a8237d38b..43bb87b8a3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper243.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER243": break; @@ -23,8 +23,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - chr_bank_mask_8k = Cart.chr_size / 8 - 1; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; + chr_bank_mask_8k = Cart.ChrSize / 8 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper244.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper244.cs index 5ef972a4b5..98659cb00a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper244.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper244.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER244": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs index bdf09c6fa5..5fb0d8d1ae 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper246.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER246": break; @@ -21,8 +21,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = (Cart.prg_size / 8) - 1; - chr_bank_mask_2k = (Cart.chr_size / 2) - 1; + prg_bank_mask_8k = (Cart.PrgSize / 8) - 1; + chr_bank_mask_2k = (Cart.ChrSize / 2) - 1; prg_banks_8k[3] = 0xFF; SetMirrorType(EMirrorType.Horizontal); SyncMap(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs index 46d133dd06..845fc9ae34 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper252.cs @@ -15,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER252": break; @@ -27,8 +27,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertChr(128); AssertVram(2); AssertWram(8); - _prgBankMask8K = Cart.prg_size / 8 - 1; - _chrBankMask1K = Cart.chr_size - 1; + _prgBankMask8K = Cart.PrgSize / 8 - 1; + _chrBankMask1K = Cart.ChrSize - 1; SetMirrorType(EMirrorType.Vertical); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs index 19b6afb87d..68d9af674f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper253.cs @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER253": break; @@ -25,8 +25,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - _prgBankMask8K = Cart.prg_size / 8 - 1; - _chrBankMask1k = Cart.chr_size - 1; + _prgBankMask8K = Cart.PrgSize / 8 - 1; + _chrBankMask1k = Cart.ChrSize - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs index fbad2a5585..220a8e1b3b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper50.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER050": break; @@ -24,7 +24,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } prg_bank = 0; - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; SetMirrorType(EMirrorType.Vertical); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs index df6c10f6f3..0e3438d675 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper60.cs @@ -17,11 +17,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER060": // Hack, Reset 4-in-1 is a different board but still assign to mapper 60 - if (Cart.prg_size != 64 || Cart.chr_size != 32) + if (Cart.PrgSize != 64 || Cart.ChrSize != 32) { break; } @@ -88,11 +88,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER060": // Hack, Reset 4-in-1 is a different board but still assign to mapper 60 - if (Cart.prg_size == 64 && Cart.chr_size == 32) + if (Cart.PrgSize == 64 && Cart.ChrSize == 32) { break; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs index 23605caf54..fd6a985da7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper61.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER061": break; @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES SetMirrorType(EMirrorType.Vertical); prg_page = 0; prg_mode = false; - prg_byte_mask = Cart.prg_size * 1024 - 1; + prg_byte_mask = Cart.PrgSize * 1024 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs index ef3997c317..f1afa9e33e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Mapper62.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER062": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs index 09eca798eb..cb699d299c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NES-EVENT.cs @@ -95,7 +95,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER105": break; @@ -106,7 +106,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; init_sequence = 0; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NROM.cs index 4944189a58..1f39148382 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NROM.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { //configure. //contrary to expectations, some NROM games may have WRAM if theyve been identified through iNES. lame. - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER000": break; @@ -64,7 +64,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "AVE-NINA-03": // at least one game on this board has none of the mapper chips present, // and emulates as simple NROM - if (Cart.chips.Count != 0) + if (Cart.Chips.Count != 0) return false; AssertPrg(8, 16, 32); AssertChr(8); AssertVram(0); AssertWram(0); @@ -79,8 +79,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_byte_mask = (Cart.prg_size*1024) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_byte_mask = (Cart.PrgSize*1024) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs index 380d66c48d..664352c94f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NSFBoard.cs @@ -70,7 +70,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - Cart.wram_size = 8; + Cart.WramSize = 8; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs index 3e6c436326..12a91dfa28 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot129_163.cs @@ -54,7 +54,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER019": AssertVram(0); @@ -78,8 +78,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES if (NES.apu != null) audio = new Namco163Audio(NES.apu.ExternalQueue); - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size / 1 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize / 1 - 1; prg_banks_8k[3] = (byte)(0xFF & prg_bank_mask_8k); prg_banks_8k[2] = (byte)(0xFF & prg_bank_mask_8k)-1; @@ -262,7 +262,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { get { - if (Cart.wram_battery) + if (Cart.WramBattery) { if (Wram != null) return Wram; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs index 4c862cb5f4..a3c5ae263d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot175_340.cs @@ -38,12 +38,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "NAMCOT-175": //wagyan land 2 //splatter house - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); break; case "NAMCOT-340": //family circuit '91 @@ -55,7 +55,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // not sure what to do here because the popular public collection // has nothing in mapper 210 except some mortal kombat pirate cart enablemirror = true; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); break; default: return false; @@ -64,8 +64,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertChr(64, 128, 256); AssertVram(0); - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size / 1 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize / 1 - 1; prg[3] = prg_bank_mask_8k; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/DRROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/DRROM.cs index 2758a6b886..df3a57672c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/DRROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/DRROM.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "NES-DRROM": //gauntlet (U) case "TENGEN-800004": // gauntlet (Unl) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs index 69871c5efd..04d44efc17 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper076.cs @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "NAMCOT-3446": // Megami Tensei: Digital Devil Story case "MAPPER076": @@ -27,13 +27,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } SetMirrorType(EMirrorType.Vertical); - chr_bank_mask_2k = Cart.chr_size / 2 - 1; - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + chr_bank_mask_2k = Cart.ChrSize / 2 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; prg[3] = prg_bank_mask_8k; prg[2] = prg_bank_mask_8k - 1; - Cart.wram_size = 0; + Cart.WramSize = 0; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper088.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper088.cs index f4022b04b7..71f5836687 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper088.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper088.cs @@ -21,7 +21,7 @@ public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "NAMCOT-3443": case "NAMCOT-3433": @@ -34,7 +34,7 @@ BaseSetup(); SetMirrorType(EMirrorType.Vertical); - chr_bank_mask_1k = Cart.chr_size - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper095.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper095.cs index 9c5115d3d7..e0ba2255ea 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper095.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper095.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "NAMCOT-3425": //dragon buster (J) AssertPrg(128); AssertChr(32); AssertVram(0); AssertWram(0); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs index 361b58891c..f76934d16a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper112.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER112": break; @@ -26,8 +26,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = (Cart.prg_size / 8) - 1; - int num_chr_banks = (Cart.chr_size); + prg_bank_mask_8k = (Cart.PrgSize / 8) - 1; + int num_chr_banks = (Cart.ChrSize); chr_bank_mask_1k = num_chr_banks - 1; SetMirrorType(EMirrorType.Vertical); Sync(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper154.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper154.cs index c23d3eaffb..5a17050880 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper154.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper154.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "NAMCOT-3453": case "MAPPER154": @@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES BaseSetup(); SetMirrorType(EMirrorType.OneScreenA); - chr_bank_mask_1k = Cart.chr_size - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper206.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper206.cs index 745cf9527c..465978f309 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper206.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Mapper206.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //analyze board type - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER206VS": NES.VS_dips[0] = (byte)(NES.SyncSettings.VSDipswitches.Dip_Switch_1 ? 1 : 0); @@ -73,7 +73,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } BaseSetup(); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs index 9d5eebe2ad..d2122fe458 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Namcot1xx/Namcot1xx.cs @@ -205,7 +205,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES if (!NES._isVS) return base.ReadExp(addr); - if (Cart.vs_security == 16) + if (Cart.VsSecurity == 16) { addr += 0x4000; if (addr == 0x54FF) @@ -236,7 +236,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES else return base.ReadExp(addr - 0x4000); } - else if (Cart.vs_security==32) + else if (Cart.VsSecurity==32) { if (addr==0x1E00) { @@ -250,7 +250,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } return NES.DB; } - else if (Cart.vs_security == 48) + else if (Cart.VsSecurity == 48) { if (addr == 0x1E00) { @@ -280,10 +280,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES protected virtual void BaseSetup() { - int num_prg_banks = Cart.prg_size / 8; + int num_prg_banks = Cart.PrgSize / 8; prg_mask = num_prg_banks - 1; - int num_chr_banks = (Cart.chr_size); + int num_chr_banks = (Cart.ChrSize); chr_byte_mask = (num_chr_banks*1024) - 1; mapper = new Namcot108Chip(this); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs index e9d9ccd598..8ef33e352b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NanJing.cs @@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER163": AssertChr(0); AssertVram(8); AssertWram(8); @@ -39,8 +39,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - prg_mask = (Cart.prg_size / 32) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_mask = (Cart.PrgSize / 32) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs index 1f403cb9b4..3452012671 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NesBoardBase.cs @@ -155,7 +155,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES private int _wramMask; public virtual void PostConfigure() { - _wramMask = (Cart.wram_size * 1024) - 1; + _wramMask = (Cart.WramSize * 1024) - 1; } public virtual byte ReadWram(int addr) @@ -245,7 +245,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return ret; } - public virtual byte[] SaveRam => Cart.wram_battery ? Wram : null; + public virtual byte[] SaveRam => Cart.WramBattery ? Wram : null; public byte[] Wram { @@ -272,10 +272,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES if (!test) throw new Exception("assertion failed in board setup!"); } - protected void AssertPrg(params int[] prg) => AssertMemType(Cart.prg_size, "prg", prg); - protected void AssertChr(params int[] chr) => AssertMemType(Cart.chr_size, "chr", chr); - protected void AssertWram(params int[] wram) => AssertMemType(Cart.wram_size, "wram", wram); - protected void AssertVram(params int[] vram) => AssertMemType(Cart.vram_size, "vram", vram); + protected void AssertPrg(params int[] prg) => AssertMemType(Cart.PrgSize, "prg", prg); + protected void AssertChr(params int[] chr) => AssertMemType(Cart.ChrSize, "chr", chr); + protected void AssertWram(params int[] wram) => AssertMemType(Cart.WramSize, "wram", wram); + protected void AssertVram(params int[] vram) => AssertMemType(Cart.VramSize, "vram", vram); protected void AssertMemType(int value, string name, int[] valid) { @@ -285,7 +285,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES Assert(false, "unhandled {0} size of {1}", name,value); } - protected void AssertBattery(bool hasBattery) => Assert(Cart.wram_battery == hasBattery); + protected void AssertBattery(bool hasBattery) => Assert(Cart.WramBattery == hasBattery); public virtual void ApplyCustomAudio(short[] samples) { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs index d44a775bec..57c948df28 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/NovelDiamond.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER054": // ?? case "UNIF_BMC-NovelDiamond9999999in1": // works @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } AssertPrg(128); AssertChr(64); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs index 4867b605ff..fcdf654ea8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/PxROM_FxROM.cs @@ -30,7 +30,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER009": break; @@ -58,8 +58,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_4k = Cart.chr_size / 4 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_4k = Cart.ChrSize / 4 - 1; SyncPRG(); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs index fd3dbd2ab0..77e8aa7fd9 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sachen8259.cs @@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { // quite a few crappy games on these boards, shouldn't be hard to find examples? case "MAPPER141": @@ -44,16 +44,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - Cart.wram_size = 0; // cart responds to regs in 6000:7fff + Cart.WramSize = 0; // cart responds to regs in 6000:7fff //zero 13-dec-2014 - Q-boy is example of game with vram, apparently. //lets only clear vram if theres a chr rom - if(Cart.chr_size != 0) - Cart.vram_size = 0; + if(Cart.ChrSize != 0) + Cart.VramSize = 0; shiftmask = (1 << shiftout) - 1; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_2k = Cart.chr_size / 2 - 1; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_2k = Cart.ChrSize / 2 - 1; SetMirrorType(EMirrorType.Vertical); @@ -186,7 +186,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { // only game i'm aware of is "The Great Wall" case "MAPPER137": @@ -196,10 +196,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - Cart.wram_size = 0; // cart responds to regs in 6000:7fff - Cart.vram_size = 0; - prg_bank_mask_32k = Cart.prg_size / 32 - 1; - chr_bank_mask_1k = Cart.chr_size / 1 - 1; + Cart.WramSize = 0; // cart responds to regs in 6000:7fff + Cart.VramSize = 0; + prg_bank_mask_32k = Cart.PrgSize / 32 - 1; + chr_bank_mask_1k = Cart.ChrSize / 1 - 1; // last 4k of chr is fixed chr[4] = 0x1c; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs index 1ddf9418f1..b58b79dc04 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SachenSimple.cs @@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER146": case "UNL-SA-016-1M": @@ -54,11 +54,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertPrg(16, 32, 64, 128); AssertChr(8, 16, 32, 64, 128); AssertVram(0); - Cart.wram_size = 0; - prg_mask = Cart.prg_size / 32 - 1; - chr_mask = Cart.chr_size / 8 - 1; - prg_addr_mask = Cart.prg_size * 1024 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + Cart.WramSize = 0; + prg_mask = Cart.PrgSize / 32 - 1; + chr_mask = Cart.ChrSize / 8 - 1; + prg_addr_mask = Cart.PrgSize * 1024 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs index 506941ac50..523cb8c670 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Subor.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER166": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs index a80e1e371f..729177daf0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1.cs @@ -14,21 +14,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER184": break; case "SUNSOFT-1": //this will catch fantasy zone, which isn't emulated the same as the other SUNSOFT-1 boards - if (Cart.pcb == "SUNSOFT-4") + if (Cart.Pcb == "SUNSOFT-4") return false; break; default: return false; } - chr_mask = (Cart.chr_size / 4) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + chr_mask = (Cart.ChrSize / 4) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs index 2cd3eaa0c6..428ef3a3be 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft1_Alt.cs @@ -17,11 +17,11 @@ public override bool Configure(EDetectionOrigin origin) { - if (Cart.board_type != "SUNSOFT-1" || Cart.pcb != "SUNSOFT-4") + if (Cart.BoardType != "SUNSOFT-1" || Cart.Pcb != "SUNSOFT-4") return false; AssertChr(0); AssertVram(8); AssertWram(0); AssertPrg(128); - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs index 562baa98c5..90f37d5b4c 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m89.cs @@ -15,19 +15,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER089": break; case "SUNSOFT-2": - if (Cart.pcb != "SUNSOFT-3") return false; + if (Cart.Pcb != "SUNSOFT-3") return false; break; default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; prg_banks_16k[1] = 0xFF; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs index 0d2e89e7fe..e57066700f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft2_m93.cs @@ -12,22 +12,22 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER093": break; case "SUNSOFT-2": - if (Cart.pcb != "SUNSOFT-3R") return false; + if (Cart.Pcb != "SUNSOFT-3R") return false; break; case "SUNSOFT-1": - if (Cart.pcb != "SUNSOFT-4") return false; + if (Cart.Pcb != "SUNSOFT-4") return false; return false; // this has been moved to Sunsoft1_Alt default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; prg_banks_16k[1] = 0xFF; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs index e605fdb73b..412af2e8e7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft3.cs @@ -45,7 +45,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER067VS": NES._isVS = true; @@ -69,8 +69,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; - chr_bank_mask_2k = (Cart.chr_size / 2) - 1; + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; + chr_bank_mask_2k = (Cart.ChrSize / 2) - 1; prg_banks_16k[0] = 0; prg_banks_16k[1] = 0xFF; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs index b5cfc19339..6f1d2d84e7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Sunsoft4.cs @@ -31,7 +31,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER068": break; @@ -42,7 +42,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES AssertPrg(128); AssertChr(128,256); AssertVram(0); AssertWram(0,8); break; case "UNIF_NES-NTBROM": - AssertPrg(128 + 16); AssertChr(128); Cart.wram_size = 8; Cart.vram_size = 0; + AssertPrg(128 + 16); AssertChr(128); Cart.WramSize = 8; Cart.VramSize = 0; /* The actual cart had 128k prg, with a small slot on the top that can load an optional daughterboard. * The UNIF dump has this as an extra 16k prg lump. I don't know how this lump is actually used, * though. @@ -54,11 +54,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES SetMirrorType(EMirrorType.Vertical); prg_regs_16k[1] = 0xFF; - prg_bank_mask = Cart.prg_size / 16 - 1; - if (Cart.prg_size == 128 + 16) + prg_bank_mask = Cart.PrgSize / 16 - 1; + if (Cart.PrgSize == 128 + 16) prg_bank_mask = 7; // ignore extra prg lump - chr_bank_mask = Cart.chr_size / 2 - 1; - nt_bank_mask = Cart.chr_size - 1; + chr_bank_mask = Cart.ChrSize / 2 - 1; + nt_bank_mask = Cart.ChrSize - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs index d2c84ee703..3f16ad114d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/SxROM.cs @@ -320,7 +320,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES addr = Gen_CHR_Address(addr); - if (Cart.vram_size != 0) + if (Cart.VramSize != 0) return Vram[addr & vram_mask]; else return Vrom[addr]; } @@ -377,7 +377,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES chr_wram_enable = true; } - if (Cart.vram_size != 0) + if (Cart.VramSize != 0) Vram[Gen_CHR_Address(addr) & vram_mask] = value; } else base.WritePpu(addr, value); @@ -395,7 +395,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER116_HACKY": break; @@ -417,13 +417,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "NES-SIEPROM": // there's no way to define PRG oversize for mapper001 due to how the MMC1 regs work // so 512KB must mean SUROM or SXROM. SUROM is more common, so we try that - if (Cart.prg_size > 256) + if (Cart.PrgSize > 256) return false; break; case "MAPPER171": // Tui Do Woo Ma Jeung - AssertPrg(32); AssertChr(32); Cart.wram_size = 0; + AssertPrg(32); AssertChr(32); Cart.WramSize = 0; disablemirror = true; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); break; case "NES-SAROM": //dragon warrior AssertPrg(64); AssertChr(16, 32, 64); AssertVram(0); AssertWram(8); @@ -521,12 +521,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES protected void BaseConfigure() { mmc1 = new MMC1(); - prg_mask = (Cart.prg_size / 16) - 1; - vram_mask = (Cart.vram_size*1024) - 1; - chr_mask = (Cart.chr_size / 8 * 2) - 1; + prg_mask = (Cart.PrgSize / 16) - 1; + vram_mask = (Cart.VramSize*1024) - 1; + chr_mask = (Cart.ChrSize / 8 * 2) - 1; //Chip n Dale (PC10) has a nonstandard chr size, which makes the mask nonsense // let's put in a special case to deal with it - if (Cart.chr_size==136) + if (Cart.ChrSize==136) { chr_mask = (128 / 8 * 2) - 1; } @@ -544,7 +544,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES //TODO - only the latter 8KB is supposed to be battery backed public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "NES-SOROM": //Nobunaga's Ambition case "HVC-SOROM": // KHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN @@ -586,7 +586,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES //it also has some WRAM select bits like SoROM public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "HVC-SXROM": //final fantasy 1& 2 AssertPrg(128, 256, 512); AssertChr(0); AssertVram(8); AssertWram(32); @@ -626,16 +626,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { //SUROM uses CHR A16 to control the upper address line (PRG A18) of its 512KB PRG ROM. - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER001": // we try to heuristic match to iNES 001 roms with big PRG only - if (Cart.prg_size <= 256) + if (Cart.PrgSize <= 256) return false; AssertPrg(512); AssertChr(0); - Cart.vram_size = 8; - Cart.wram_size = 8; - Cart.wram_battery = true; // all SUROM boards had batteries + Cart.VramSize = 8; + Cart.WramSize = 8; + Cart.WramBattery = true; // all SUROM boards had batteries Console.WriteLine("Guessing SUROM for 512KiB PRG ROM"); break; case "NES-SUROM": //dragon warrior 4 diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs index f5e21eb3ba..cd37b707c4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TAITO_74_161_161_32.cs @@ -16,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER152": break; @@ -25,8 +25,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - SetMirrorType(Cart.pad_h, Cart.pad_v); - prg_bank_mask_16k = (Cart.prg_size / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); + prg_bank_mask_16k = (Cart.PrgSize / 16) - 1; prg_banks_16k[1] = 0xFF; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs index a7f204c068..48780d420a 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN-800032.cs @@ -51,7 +51,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER064": break; @@ -62,8 +62,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size / 1 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize / 1 - 1; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs index 9a4890fc6f..e1d8835ce8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/TENGEN_800008.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "TENGEN-800008": AssertPrg(32, 64); @@ -26,8 +26,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask = (Cart.prg_size / 32) - 1; - chr_mask = (Cart.chr_size / 8) - 1; + prg_mask = (Cart.PrgSize / 32) - 1; + chr_mask = (Cart.ChrSize / 8) - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs index 7f456487f1..fa51c94c0b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_TC0190FMC.cs @@ -85,7 +85,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER033": break; @@ -108,8 +108,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask = Cart.prg_size / 8 - 1; - chr_bank_mask = Cart.chr_size - 1; + prg_bank_mask = Cart.PrgSize / 8 - 1; + chr_bank_mask = Cart.ChrSize - 1; prg_regs_8k[0] = 0x00; prg_regs_8k[1] = 0x00; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs index c9db455005..eaae8b7e66 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_005.cs @@ -60,7 +60,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER080": break; @@ -68,7 +68,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES tlsrewire = true; break; case "TAITO-X1-005": - if (Cart.pcb == "アシユラー") + if (Cart.Pcb == "アシユラー") tlsrewire = true; break; default: @@ -76,11 +76,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } SetMirrorType(EMirrorType.Vertical); - chr_bank_mask = Cart.chr_size / 1 - 1; - prg_bank_mask = Cart.prg_size / 8 - 1; + chr_bank_mask = Cart.ChrSize / 1 - 1; + prg_bank_mask = Cart.PrgSize / 8 - 1; // the chip has 128 bytes of WRAM built into it, which we have to instantiate ourselves - Cart.wram_size = 0; + Cart.WramSize = 0; prg_regs_8k[3] = 0xFF; return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs index d9c74aafea..7fb9159d82 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/Taito_X1_017.cs @@ -25,7 +25,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER082": break; @@ -36,11 +36,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } // actually internal to the mapper - Cart.wram_size = 5; + Cart.WramSize = 5; SetMirrorType(EMirrorType.Vertical); - chr_bank_mask = Cart.chr_size / 1 - 1; - prg_bank_mask = Cart.prg_size / 8 - 1; + chr_bank_mask = Cart.ChrSize / 1 - 1; + prg_bank_mask = Cart.PrgSize / 8 - 1; prg_regs_8k[3] = 0xFF; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs index e04920613f..0ccc0948ef 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF-DREAMTECH01.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_DREAMTECH01": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs index cb3a6b19cb..b23efb8e08 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-12-IN-1.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-12-IN-1": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-190in1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-190in1.cs index b7045dd651..5f21029b70 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-190in1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-190in1.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-190in1": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs index 476173f743..feba7a5152 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-64in1-NR.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-64in1NoRepeat": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs index 1236add094..e8d43aa9e2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-810544-C-A1.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-810544-C-A1": break; @@ -18,8 +18,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask_32k = Cart.prg_size / 32 - 1; - prg_mask_16k = Cart.prg_size / 16 - 1; + prg_mask_32k = Cart.PrgSize / 32 - 1; + prg_mask_16k = Cart.PrgSize / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-8157.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-8157.cs index 02e5b6db8e..54efd26b18 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-8157.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-8157.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-8157": break; @@ -22,7 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - _prgMask16k = Cart.prg_size / 16 - 1; + _prgMask16k = Cart.PrgSize / 16 - 1; AutoMapperProps.Apply(this); @@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { if (_4in1Mode) { - if (((_cmdreg & 0x100) > 0) && Cart.prg_size < 1024) + if (((_cmdreg & 0x100) > 0) && Cart.PrgSize < 1024) { addr = (addr & 0xFFF0) + (1); } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-A65AS.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-A65AS.cs index ef64f9f92e..e3faf71399 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-A65AS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-A65AS.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-A65AS": break; @@ -21,8 +21,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prgMask16k = Cart.prg_size / 16 - 1; - prgMask32k = Cart.prg_size / 32 - 1; + prgMask16k = Cart.PrgSize / 16 - 1; + prgMask32k = Cart.PrgSize / 32 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs index fc53c9ed03..abf2de9e3e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-BS-5.cs @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-BS-5": break; @@ -32,8 +32,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES SetMirrorType(EMirrorType.Vertical); - _prgMask8k = Cart.prg_size / 8 - 1; - _chrMask2k = Cart.prg_size / 2 - 1; + _prgMask8k = Cart.PrgSize / 8 - 1; + _chrMask2k = Cart.PrgSize / 2 - 1; AutoMapperProps.Apply(this); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs index ca3d4f0cdf..b29690a004 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-D1038.cs @@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-D1038": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2004.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2004.cs index b1a80b0896..561dabed23 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2004.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2004.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-GS-2004": break; @@ -21,10 +21,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } - _prgMask32k = (Cart.prg_size - 8) / 32 - 1; + _prgMask32k = (Cart.PrgSize - 8) / 32 - 1; // Last 8k of Prg goes into 6000-7FFF - _wramOffset = ((Cart.prg_size - 8) / 32) * 0x8000; + _wramOffset = ((Cart.PrgSize - 8) / 32) * 0x8000; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs index 7a4ea7269e..1e01c40e05 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-GS-2013.cs @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-GS-2013": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs index 837ddc8ee6..d5b3ab3f71 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-Ghostbusters63in1.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-Ghostbusters63in1": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs index cf48ddf691..eb4d9ed4b7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-NTD-03.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-NTD-03": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-T-262.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-T-262.cs index 3273b2bc23..c736a0e1f5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-T-262.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-T-262.cs @@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-T-262": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-WS.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-WS.cs index 0129a8bf5b..da2ed4569b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-WS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC-WS.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-WS": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs index d44e328ea7..6ae6ae5338 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMCFK23C.cs @@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-FK23C": case "MAPPER176": @@ -43,8 +43,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES BaseSetup(); - prg_mask_8k = Cart.prg_size / 8 - 1; - chr_mask_1k = Cart.chr_size - 1; + prg_mask_8k = Cart.PrgSize / 8 - 1; + chr_mask_1k = Cart.ChrSize - 1; prg_regs_8k[0] = 0; prg_regs_8k[1] = 1; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs index 7fb507ef65..038763d1d7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BMC_Super24in1SC03.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES private readonly int[] masko8 = { 63, 31, 15, 1, 3, 0, 0, 0 }; public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_BMC-Super24in1SC03": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BTL-Mario1-MALEE2.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BTL-Mario1-MALEE2.cs index 99614363e3..98c3eef151 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BTL-Mario1-MALEE2.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_BTL-Mario1-MALEE2.cs @@ -4,7 +4,7 @@ { public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER055": // Nestopia calls this mapper 55, I know of no dumps with the designation though case "UNIF_BTL-MARIO1-MALEE2": diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs index 2770ab0a8b..076c1989e0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-43272.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-43272": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs index ee4697a983..e91884eed1 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AC08.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-AC08": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs index 0abf101be4..5ca6e5f6a0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-AX5705.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-AX5705": break; @@ -22,8 +22,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - _prgMask8k = Cart.prg_size / 8 - 1; - _chrMask1k = Cart.chr_size / 1 - 1; + _prgMask8k = Cart.PrgSize / 8 - 1; + _chrMask1k = Cart.ChrSize / 1 - 1; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs index eff83bed03..32b048bdf4 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-BB.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-BB": break; @@ -18,8 +18,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } reg = 0xFF; - prg_mask_32k = Cart.prg_size / 32 - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + prg_mask_32k = Cart.PrgSize / 32 - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-CC-21.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-CC-21.cs index b4667d8990..458db597c2 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-CC-21.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-CC-21.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES int _reg; public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-CC-21": break; @@ -43,7 +43,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES { if (addr < 0x2000) { - if (Cart.chr_size == 8192) + if (Cart.ChrSize == 8192) { return Vrom[((_reg & 1) * 0xFFF) + (addr & 0xFFF)]; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-EDU2000.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-EDU2000.cs index de8dd318a4..a2e408a527 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-EDU2000.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-EDU2000.cs @@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-EDU2000": break; @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - _prgMask32 = Cart.prg_size / 32 - 1; + _prgMask32 = Cart.PrgSize / 32 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KOF97.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KOF97.cs index cd64834944..a259b83e08 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KOF97.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KOF97.cs @@ -5,7 +5,7 @@ { public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-KOF97": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs index 23ce61e3ca..3165f9a1f0 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7012.cs @@ -8,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-KS7012": break; @@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES Wram = new byte[8192]; reg = 0xFF; - SetMirrorType(Cart.pad_h, Cart.pad_v); + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs index 3168cb5041..5b2412cd52 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-KS7013B.cs @@ -10,7 +10,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-KS7013B": break; @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask_16k = Cart.prg_size / 16 - 1; + prg_mask_16k = Cart.PrgSize / 16 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs index db1d5e2314..ba43d4b394 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-LH10.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-LH10": //NES._isVS = true; @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8 = Cart.prg_size / 8 - 1; + prg_bank_mask_8 = Cart.PrgSize / 8 - 1; //SetMirrorType(Cart.pad_h, Cart.pad_v); SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs index ec63534f4c..7d909b8482 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-SHERO.cs @@ -11,7 +11,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-SHERO": break; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs index bf5a0977d1..10fe87bedf 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL-TF1201.cs @@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-TF1201": break; @@ -26,7 +26,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_mask_8k = Cart.prg_size / 8 - 1; + prg_mask_8k = Cart.PrgSize / 8 - 1; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs index abbddbf5a1..bde4fa18de 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_DripGame.cs @@ -78,22 +78,22 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-DRIPGAME": break; default: return false; } - Cart.wram_size = 8; - Cart.wram_battery = false; + Cart.WramSize = 8; + Cart.WramBattery = false; AssertPrg(16, 32, 64, 128, 256); // 4 bits x 16 AssertChr(8, 16, 32); // 4 bits x 2 AutoMapperProps.Apply(this); - prgmask = Cart.prg_size / 16 - 1; - chrmask = Cart.prg_size / 2 - 1; + prgmask = Cart.PrgSize / 16 - 1; + chrmask = Cart.PrgSize / 2 - 1; prg[1] = prgmask; SetMirror(0); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs index 2fdcb10b0d..66b9906da6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UNIF/UNIF_UNL_SMB2J.cs @@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "UNIF_UNL-SMB2J": break; @@ -20,9 +20,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_count = Cart.prg_size/4; + prg_count = Cart.PrgSize/4; - Cart.wram_size = 0; + Cart.WramSize = 0; // not sure on initial mirroring SetMirrorType(EMirrorType.Vertical); return true; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs index a743cca167..b470a10af7 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/UxROM.cs @@ -35,7 +35,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES adjust_prg = (x) => x; //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER0002-00": //probably a mistake. @@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES break; case "MAPPER002": - AssertChr(0); Cart.vram_size = 8; + AssertChr(0); Cart.VramSize = 8; break; case "NES-UNROM": //mega man @@ -88,9 +88,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } //these boards always have 8KB of VRAM - vram_byte_mask = (Cart.vram_size*1024) - 1; - prg_mask = (Cart.prg_size / 16) - 1; - SetMirrorType(Cart.pad_h, Cart.pad_v); + vram_byte_mask = (Cart.VramSize*1024) - 1; + prg_mask = (Cart.PrgSize / 16) - 1; + SetMirrorType(Cart.PadH, Cart.PadV); return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs index 61d2400ff9..7c35470b16 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC1.cs @@ -39,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER075": break; @@ -65,8 +65,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_4k = Cart.chr_size / 4 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_4k = Cart.ChrSize / 4 - 1; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs index e247a3933e..4f2af51890 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC2_4.cs @@ -155,29 +155,29 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { fix_chr = (b) => b; - switch (Cart.board_type) + switch (Cart.BoardType) { // for INES, we assume VRC4 in many cases where it might be VRC2 case "MAPPER021": type = 4; remap = AddrA1A2_A6A7; - Cart.wram_size = 8; + Cart.WramSize = 8; break; case "MAPPER022": type = 2; remap = AddrA1A0; - Cart.wram_size = 8; // should be latch_exists = true but forget that + Cart.WramSize = 8; // should be latch_exists = true but forget that fix_chr = (b) => (b >> 1); break; case "MAPPER023": type = 4; remap = AddrA0A1_A2A3; - Cart.wram_size = 8; + Cart.WramSize = 8; break; case "MAPPER023_BMC": type = 4; remap = AddrA0A1_A2A3; - Cart.wram_size = 8; + Cart.WramSize = 8; _isBMC = true; prg_banks_8k[0] = (byte)(prg_bank_reg_8k[0]); prg_banks_8k[1] = (byte)(prg_bank_reg_8k[1]); @@ -187,7 +187,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "MAPPER025": type = 4; remap = AddrA3A2_A1A0; - Cart.wram_size = 8; + Cart.WramSize = 8; break; case "UNIF_UNL-T-230": isPirate = true; @@ -207,7 +207,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "KONAMI-VRC-4": AssertPrg(128, 256); AssertChr(128, 256); AssertVram(0); AssertWram(0, 2, 8); type = 4; - switch (Cart.pcb) + switch (Cart.Pcb) { case "352398": // vrc4a A1 A2 remap = AddrA1A2; break; @@ -226,9 +226,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "KONAMI-VRC-2": AssertPrg(128, 256); AssertChr(128, 256); AssertVram(0); AssertWram(0, 8); type = 2; - if (Cart.wram_size == 0) + if (Cart.WramSize == 0) latch6k_exists = true; - switch (Cart.pcb) + switch (Cart.Pcb) { case "351618": // vrc2a A1 A0 remap = AddrA1A0; @@ -249,15 +249,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES remap = AddrA1A0; break; default: - throw new Exception($"Unknown PCB type for VRC2: \"{Cart.pcb}\""); + throw new Exception($"Unknown PCB type for VRC2: \"{Cart.Pcb}\""); } break; default: return false; } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; // prg regs are 5 bits wide in all VRC2 and VRC4, believe it or not // todo: we don't even need this, do we? removing it would diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs index 1163d81a03..e6382a24d3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC3.cs @@ -39,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER073": break; @@ -50,7 +50,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_16k = Cart.prg_size / 16 - 1; + prg_bank_mask_16k = Cart.PrgSize / 16 - 1; SetMirrorType(EMirrorType.Vertical); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs index 29fa0ff7a1..6db8ca2420 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC6.cs @@ -165,7 +165,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER024": newer_variant = false; @@ -174,9 +174,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES newer_variant = true; break; case "KONAMI-VRC-6": - if (Cart.pcb == "351951") + if (Cart.Pcb == "351951") newer_variant = false; - else if (Cart.pcb == "351949A") + else if (Cart.Pcb == "351949A") newer_variant = true; else throw new Exception("Unknown PCB type for VRC6"); AssertPrg(256); AssertChr(128, 256); @@ -186,9 +186,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } AssertVram(0); AssertWram(0, 8); - prg_bank_mask_8k = Cart.prg_size / 8 - 1; - chr_bank_mask_1k = Cart.chr_size - 1; - chr_byte_mask = Cart.chr_size * 1024 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; + chr_bank_mask_1k = Cart.ChrSize - 1; + chr_byte_mask = Cart.ChrSize * 1024 - 1; prg_bank_16k = 0; prg_bank_8k = 0; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs index f3033509b4..edabd083a3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VRC7.cs @@ -80,7 +80,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER085": // as in some VRC2/VRC4 cases, this is actually a "composite" mapping that catches @@ -90,7 +90,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES break; case "KONAMI-VRC-7": AssertPrg(128, 512); AssertChr(0, 128); AssertVram(0, 8); AssertWram(0, 8); - if (Cart.pcb == "353429") + if (Cart.Pcb == "353429") { //tiny toons 2 // for consistency, we map the addr line used for the FM chip even though @@ -98,7 +98,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES remap = (addr) => (addr & 0xF000) | ((addr & 0x8) >> 3) | (addr & 0x20) >> 4; fm = null; } - else if (Cart.pcb == "352402") + else if (Cart.Pcb == "352402") { //lagrange point remap = addr => ((addr & 0xF000) | ((addr & 0x30) >> 4)); @@ -110,8 +110,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case "MAPPER117": // not sure quite what this is // different address mapping, and somewhat different irq logic - Cart.vram_size = 0; - Cart.wram_size = 0; + Cart.VramSize = 0; + Cart.WramSize = 0; remap = RemapM117; fm = null; break; @@ -119,7 +119,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_bank_mask_8k = Cart.prg_size / 8 - 1; + prg_bank_mask_8k = Cart.PrgSize / 8 - 1; chr_bank_mask_1k = 0xff; // Cart.chr_size - 1; SetMirrorType(EMirrorType.Vertical); @@ -151,7 +151,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES if (addr < 0x2000) { addr = Map_PPU(addr); - if (Cart.vram_size != 0) + if (Cart.VramSize != 0) return base.ReadPpu(addr); return Vrom[addr]; diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs index 2652d0a7d5..b3f16c8596 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/VS_M99.cs @@ -20,7 +20,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { //configure - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER099": NES._isVS = true; @@ -29,8 +29,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return false; } - prg_byte_mask = Cart.prg_size * 1024 - 1; - chr_mask = (Cart.chr_size / 8) - 1; + prg_byte_mask = Cart.PrgSize * 1024 - 1; + chr_mask = (Cart.ChrSize / 8) - 1; //update the state of the dip switches //this is only done at power on @@ -109,7 +109,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override byte ReadPrg(int addr) { - if (Cart.prg_size==48) + if (Cart.PrgSize==48) { if (addr<0x2000) { diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs index 29e710458f..e7e304aeef 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Boards/inlnsf.cs @@ -19,12 +19,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES public override bool Configure(EDetectionOrigin origin) { - switch (Cart.board_type) + switch (Cart.BoardType) { case "MAPPER031": AssertChr(0, 8); - if(Cart.chr_size == 0) - Cart.vram_size = 8; + if(Cart.ChrSize == 0) + Cart.VramSize = 8; break; case "MAPPER0031-00": AssertVram(8); @@ -32,10 +32,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES default: return false; } - SetMirrorType(CalculateMirrorType(Cart.pad_h, Cart.pad_v)); + SetMirrorType(CalculateMirrorType(Cart.PadH, Cart.PadV)); AssertPrg(16, 32, 64, 128, 256, 512, 1024); - Cart.wram_size = 0; - prg_bank_mask_4k = Cart.prg_size / 4 - 1; + Cart.WramSize = 0; + prg_bank_mask_4k = Cart.PrgSize / 4 - 1; prg[7] = prg_bank_mask_4k; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/CartInfo.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/CartInfo.cs index 904aa58f00..e6279cc5bb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/CartInfo.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/CartInfo.cs @@ -8,37 +8,43 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES /// public class CartInfo { - public GameInfo DB_GameInfo; - public string name; + public GameInfo GameInfo { get; set; } + public string Name { get; set; } - public int trainer_size; - public int chr_size; - public int prg_size; - public int wram_size, vram_size; - public byte pad_h, pad_v; - public bool wram_battery; - public bool bad; - /// in [0,3]; combination of bits 0 and 3 of flags6. try not to use; will be null for bootgod-identified roms always - public int? inesmirroring; + public int TrainerSize { get; set; } + public int ChrSize { get; set; } + public int PrgSize { get; set; } + public int WramSize { get; set; } + public int VramSize { get; set; } + public byte PadH { get; set; } + public byte PadV { get; set; } + public bool WramBattery { get; set; } + public bool Bad { get; set; } - public string board_type; - public string pcb; + /// + /// in [0,3]; combination of bits 0 and 3 of flags6. + /// try not to use; will be null for BootGod-identified roms always + /// + public int? InesMirroring { get; set; } - public string sha1; - public string system; - public List chips = new List(); + public string BoardType { get; set; } + public string Pcb { get; set; } - public string palette; // Palette override for VS system - public byte vs_security; // for VS system games that do a ppu dheck + public string Sha1 { get; set; } + public string System { get; set; } + public List Chips { get; set; } = new List(); + + public string Palette { get; set; } // Palette override for VS system + public byte VsSecurity { get; set; } // for VS system games that do a ppu check public override string ToString() => string.Join(",", - $"pr={prg_size}", - $"ch={chr_size}", - $"wr={wram_size}", - $"vr={vram_size}", - $"ba={(wram_battery ? 1 : 0)}", - $"pa={pad_h}|{pad_v}", - $"brd={board_type}", - $"sys={system}"); + $"pr={PrgSize}", + $"ch={ChrSize}", + $"wr={WramSize}", + $"vr={VramSize}", + $"ba={(WramBattery ? 1 : 0)}", + $"pa={PadH}|{PadV}", + $"brd={BoardType}", + $"sys={System}"); } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs index 5accc28851..e5d32abbda 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/FDS/FDS.cs @@ -123,11 +123,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES if (biosrom == null || biosrom.Length != 8192) throw new MissingFirmwareException("FDS bios image needed!"); - Cart.vram_size = 8; - Cart.wram_size = 32; - Cart.wram_battery = false; - Cart.system = "Famicom"; - Cart.board_type = "FAMICOM_DISK_SYSTEM"; + Cart.VramSize = 8; + Cart.WramSize = 32; + Cart.WramBattery = false; + Cart.System = "Famicom"; + Cart.BoardType = "FAMICOM_DISK_SYSTEM"; diskdrive = new RamAdapter(); if (NES.apu != null) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs index c394361872..a205f6f79f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.BoardSystem.cs @@ -167,54 +167,54 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES //try generating a bootgod cart descriptor from the game database var dict = gi.GetOptionsDict(); - cart.DB_GameInfo = gi; + cart.GameInfo = gi; if (!dict.ContainsKey("board")) throw new Exception("NES gamedb entries must have a board identifier!"); - cart.board_type = dict["board"]; + cart.BoardType = dict["board"]; if (dict.ContainsKey("system")) - cart.system = dict["system"]; - cart.prg_size = -1; - cart.vram_size = -1; - cart.wram_size = -1; - cart.chr_size = -1; + cart.System = dict["system"]; + cart.PrgSize = -1; + cart.VramSize = -1; + cart.WramSize = -1; + cart.ChrSize = -1; if (dict.ContainsKey("PRG")) - cart.prg_size = short.Parse(dict["PRG"]); + cart.PrgSize = short.Parse(dict["PRG"]); if (dict.ContainsKey("CHR")) - cart.chr_size = short.Parse(dict["CHR"]); + cart.ChrSize = short.Parse(dict["CHR"]); if(dict.ContainsKey("VRAM")) - cart.vram_size = short.Parse(dict["VRAM"]); + cart.VramSize = short.Parse(dict["VRAM"]); if (dict.ContainsKey("WRAM")) - cart.wram_size = short.Parse(dict["WRAM"]); + cart.WramSize = short.Parse(dict["WRAM"]); if (dict.ContainsKey("PAD_H")) - cart.pad_h = byte.Parse(dict["PAD_H"]); + cart.PadH = byte.Parse(dict["PAD_H"]); if (dict.ContainsKey("PAD_V")) - cart.pad_v = byte.Parse(dict["PAD_V"]); + cart.PadV = byte.Parse(dict["PAD_V"]); if(dict.ContainsKey("MIR")) if (dict["MIR"] == "H") { - cart.pad_v = 1; cart.pad_h = 0; + cart.PadV = 1; cart.PadH = 0; } else if (dict["MIR"] == "V") { - cart.pad_h = 1; cart.pad_v = 0; + cart.PadH = 1; cart.PadV = 0; } if (dict.ContainsKey("BAD")) - cart.bad = true; + cart.Bad = true; if (dict.ContainsKey("MMC3")) - cart.chips.Add(dict["MMC3"]); + cart.Chips.Add(dict["MMC3"]); if (dict.ContainsKey("PCB")) - cart.pcb = dict["PCB"]; + cart.Pcb = dict["PCB"]; if (dict.ContainsKey("BATT")) - cart.wram_battery = bool.Parse(dict["BATT"]); + cart.WramBattery = bool.Parse(dict["BATT"]); if(dict.ContainsKey("palette")) { - cart.palette = dict["palette"]; + cart.Palette = dict["palette"]; } if (dict.ContainsKey("vs_security")) { - cart.vs_security = byte.Parse(dict["vs_security"]); + cart.VsSecurity = byte.Parse(dict["vs_security"]); } return cart; @@ -281,8 +281,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case 2: if (xmlreader.NodeType == XmlNodeType.Element && xmlreader.Name == "board") { - currCart.board_type = xmlreader.GetAttribute("type"); - currCart.pcb = xmlreader.GetAttribute("pcb"); + currCart.BoardType = xmlreader.GetAttribute("type"); + currCart.Pcb = xmlreader.GetAttribute("pcb"); int mapper = int.Parse(xmlreader.GetAttribute("mapper")); if (validate && mapper > 255) throw new Exception("didnt expect mapper>255!"); // we don't actually use this value at all; only the board name @@ -295,25 +295,25 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES switch(xmlreader.Name) { case "prg": - currCart.prg_size += (short)ParseSize(xmlreader.GetAttribute("size")); + currCart.PrgSize += (short)ParseSize(xmlreader.GetAttribute("size")); break; case "chr": - currCart.chr_size += (short)ParseSize(xmlreader.GetAttribute("size")); + currCart.ChrSize += (short)ParseSize(xmlreader.GetAttribute("size")); break; case "vram": - currCart.vram_size += (short)ParseSize(xmlreader.GetAttribute("size")); + currCart.VramSize += (short)ParseSize(xmlreader.GetAttribute("size")); break; case "wram": - currCart.wram_size += (short)ParseSize(xmlreader.GetAttribute("size")); + currCart.WramSize += (short)ParseSize(xmlreader.GetAttribute("size")); if (xmlreader.GetAttribute("battery") != null) - currCart.wram_battery = true; + currCart.WramBattery = true; break; case "pad": - currCart.pad_h = byte.Parse(xmlreader.GetAttribute("h")); - currCart.pad_v = byte.Parse(xmlreader.GetAttribute("v")); + currCart.PadH = byte.Parse(xmlreader.GetAttribute("h")); + currCart.PadV = byte.Parse(xmlreader.GetAttribute("v")); break; case "chip": - currCart.chips.Add(xmlreader.GetAttribute("type")); + currCart.Chips.Add(xmlreader.GetAttribute("type")); break; } } else @@ -325,7 +325,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES case 4: if (xmlreader.NodeType == XmlNodeType.EndElement && xmlreader.Name == "cartridge") { - sha1_table[currCart.sha1].Add(currCart); + sha1_table[currCart.Sha1].Add(currCart); currCart = null; state = 5; } @@ -335,9 +335,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES if (xmlreader.NodeType == XmlNodeType.Element && xmlreader.Name == "cartridge") { currCart = new CartInfo(); - currCart.system = xmlreader.GetAttribute("system"); - currCart.sha1 = "sha1:" + xmlreader.GetAttribute("sha1"); - currCart.name = currName; + currCart.System = xmlreader.GetAttribute("system"); + currCart.Sha1 = "sha1:" + xmlreader.GetAttribute("sha1"); + currCart.Name = currName; state = 2; } if (xmlreader.NodeType == XmlNodeType.EndElement && xmlreader.Name == "game") diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs index 79e99600f4..651f4632a3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs @@ -245,24 +245,24 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // Let's hard code those cases here // these will be defined through the gameDB exclusively for now. - if (cart.DB_GameInfo!=null) + if (cart.GameInfo!=null) { - if (cart.DB_GameInfo.Hash == "60FC5FA5B5ACCAF3AEFEBA73FC8BFFD3C4DAE558" // Camerica Golden 5 - || cart.DB_GameInfo.Hash == "BAD382331C30B22A908DA4BFF2759C25113CC26A" // Camerica Golden 5 - || cart.DB_GameInfo.Hash == "40409FEC8249EFDB772E6FFB2DCD41860C6CCA23" // Camerica Pegasus 4-in-1 + if (cart.GameInfo.Hash == "60FC5FA5B5ACCAF3AEFEBA73FC8BFFD3C4DAE558" // Camerica Golden 5 + || cart.GameInfo.Hash == "BAD382331C30B22A908DA4BFF2759C25113CC26A" // Camerica Golden 5 + || cart.GameInfo.Hash == "40409FEC8249EFDB772E6FFB2DCD41860C6CCA23" // Camerica Pegasus 4-in-1 ) { ram[0x701] = 0xFF; } - if (cart.DB_GameInfo.Hash == "68ABE1E49C9E9CCEA978A48232432C252E5912C0") // Dancing Blocks + if (cart.GameInfo.Hash == "68ABE1E49C9E9CCEA978A48232432C252E5912C0") // Dancing Blocks { ram[0xEC] = 0; ram[0xED] = 0; } - if (cart.DB_GameInfo.Hash == "00C50062A2DECE99580063777590F26A253AAB6B") // Silva Saga + if (cart.GameInfo.Hash == "00C50062A2DECE99580063777590F26A253AAB6B") // Silva Saga { for (int i = 0; i < Board.Wram.Length; i++) { @@ -995,7 +995,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // the palette for each VS game needs to be chosen explicitly since there are 6 different ones. public void PickVSPalette(CartInfo cart) { - switch (cart.palette) + switch (cart.Palette) { case "2C05": SetPalette(Palettes.palette_2c03_2c05); ppu.CurrentLuma = PPU.PaletteLuma2C03; break; case "2C04-1": SetPalette(Palettes.palette_2c04_001); ppu.CurrentLuma = PPU.PaletteLuma2C04_1; break; @@ -1007,7 +1007,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES //since this will run for every VS game, let's get security setting too //values below 16 are for the 2c05 PPU //values 16,32,48 are for Namco games and dealt with in mapper 206 - _isVS2c05 = (byte)(cart.vs_security & 15); + _isVS2c05 = (byte)(cart.VsSecurity & 15); } } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs index 1d1fb6856e..6f3cbacdd5 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.cs @@ -341,7 +341,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES LoadWriteLine("Found UNIF header:"); LoadWriteLine(unif.CartInfo); LoadWriteLine("Since this is UNIF we can confidently parse PRG/CHR banks to hash."); - hash_sha1 = unif.CartInfo.sha1; + hash_sha1 = unif.CartInfo.Sha1; hash_sha1_several.Add(hash_sha1); LoadWriteLine("headerless rom hash: {0}", hash_sha1); } @@ -359,7 +359,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES nsfboard.InitNSF( nsf); nsfboard.InitialRegisterValues = InitialMapperRegisterValues; nsfboard.Configure(origin); - nsfboard.Wram = new byte[cart.wram_size * 1024]; + nsfboard.Wram = new byte[cart.WramSize * 1024]; Board = nsfboard; Board.PostConfigure(); AutoMapperProps.Populate(Board, SyncSettings); @@ -394,10 +394,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES Board = fdsboard; //create the vram and wram if necessary - if (cart.wram_size != 0) - Board.Wram = new byte[cart.wram_size * 1024]; - if (cart.vram_size != 0) - Board.Vram = new byte[cart.vram_size * 1024]; + if (cart.WramSize != 0) + Board.Wram = new byte[cart.WramSize * 1024]; + if (cart.VramSize != 0) + Board.Vram = new byte[cart.VramSize * 1024]; Board.PostConfigure(); AutoMapperProps.Populate(Board, SyncSettings); @@ -463,23 +463,23 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES LoadWriteLine("headerless rom hash: {0}", hash_sha1); LoadWriteLine("headerless rom hash: {0}", hash_md5); - if (iNesHeaderInfo.prg_size == 16) + if (iNesHeaderInfo.PrgSize == 16) { //8KB prg can't be stored in iNES format, which counts 16KB prg banks. //so a correct hash will include only 8KB. LoadWriteLine("Since this rom has a 16 KB PRG, we'll hash it as 8KB too for bootgod's DB:"); var msTemp = new MemoryStream(); msTemp.Write(file, 16, 8 * 1024); //add prg - if (file.Length >= (16 * 1024 + iNesHeaderInfo.chr_size * 1024 + 16)) + if (file.Length >= (16 * 1024 + iNesHeaderInfo.ChrSize * 1024 + 16)) { // This assumes that even though the PRG is only 8k the CHR is still written // 16k into the file, which is not always the case (e.x. Galaxian RevA) - msTemp.Write(file, 16 + 16 * 1024, iNesHeaderInfo.chr_size * 1024); //add chr + msTemp.Write(file, 16 + 16 * 1024, iNesHeaderInfo.ChrSize * 1024); //add chr } - else if (file.Length >= (8 * 1024 + iNesHeaderInfo.chr_size * 1024 + 16)) + else if (file.Length >= (8 * 1024 + iNesHeaderInfo.ChrSize * 1024 + 16)) { // maybe the PRG is only 8k - msTemp.Write(file, 16 + 8 * 1024, iNesHeaderInfo.chr_size * 1024); //add chr + msTemp.Write(file, 16 + 8 * 1024, iNesHeaderInfo.ChrSize * 1024); //add chr } else { @@ -508,22 +508,22 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES else { origin = EDetectionOrigin.GameDB; - LoadWriteLine("Chose board from bizhawk gamedb: " + choice.board_type); + LoadWriteLine("Chose board from bizhawk gamedb: " + choice.BoardType); //gamedb entries that don't specify prg/chr sizes can infer it from the ines header if (iNesHeaderInfo != null) { - if (choice.prg_size == -1) choice.prg_size = iNesHeaderInfo.prg_size; - if (choice.chr_size == -1) choice.chr_size = iNesHeaderInfo.chr_size; - if (choice.vram_size == -1) choice.vram_size = iNesHeaderInfo.vram_size; - if (choice.wram_size == -1) choice.wram_size = iNesHeaderInfo.wram_size; + if (choice.PrgSize == -1) choice.PrgSize = iNesHeaderInfo.PrgSize; + if (choice.ChrSize == -1) choice.ChrSize = iNesHeaderInfo.ChrSize; + if (choice.VramSize == -1) choice.VramSize = iNesHeaderInfo.VramSize; + if (choice.WramSize == -1) choice.WramSize = iNesHeaderInfo.WramSize; } else if (unif != null) { - if (choice.prg_size == -1) choice.prg_size = unif.CartInfo.prg_size; - if (choice.chr_size == -1) choice.chr_size = unif.CartInfo.chr_size; + if (choice.PrgSize == -1) choice.PrgSize = unif.CartInfo.PrgSize; + if (choice.ChrSize == -1) choice.ChrSize = unif.CartInfo.ChrSize; // unif has no wram\vram sizes; hope the board impl can figure it out... - if (choice.vram_size == -1) choice.vram_size = 0; - if (choice.wram_size == -1) choice.wram_size = 0; + if (choice.VramSize == -1) choice.VramSize = 0; + if (choice.WramSize == -1) choice.WramSize = 0; } } @@ -556,8 +556,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES //well, we know we can't have much of a NES game if there's no VROM unless there's VRAM instead. //so if the VRAM isn't set, choose 8 for it. //TODO - unif loading code may need to use VROR flag to transform chr_size=8 to vram_size=8 (need example) - if (choice.chr_size == 0 && choice.vram_size == 0) - choice.vram_size = 8; + if (choice.ChrSize == 0 && choice.VramSize == 0) + choice.VramSize = 8; //(do we need to suppress this in case theres a CHR rom? probably not. nes board base will use ram if no rom is available) origin = EDetectionOrigin.UNIF; } @@ -597,7 +597,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } } - game_name = choice.name; + game_name = choice.Name; //find a INESBoard to handle this if (choice != null) @@ -605,16 +605,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES else throw new Exception("Unable to detect ROM"); if (boardType == null) - throw new Exception("No class implements the necessary board type: " + choice.board_type); + throw new Exception("No class implements the necessary board type: " + choice.BoardType); - if (choice.DB_GameInfo != null) - choice.bad = choice.DB_GameInfo.IsRomStatusBad(); + if (choice.GameInfo != null) + choice.Bad = choice.GameInfo.IsRomStatusBad(); LoadWriteLine("Final game detection results:"); LoadWriteLine(choice); LoadWriteLine("\"" + game_name + "\""); LoadWriteLine("Implemented by: class " + boardType.Name); - if (choice.bad) + if (choice.Bad) { LoadWriteLine("~~ ONE WAY OR ANOTHER, THIS DUMP IS KNOWN TO BE *BAD* ~~"); LoadWriteLine("~~ YOU SHOULD FIND A BETTER FILE ~~"); @@ -649,9 +649,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES if (origin == EDetectionOrigin.GameDB) { - RomStatus = choice.bad + RomStatus = choice.Bad ? RomStatus.BadDump - : choice.DB_GameInfo.Status; + : choice.GameInfo.Status; } byte[] trainer = null; @@ -662,24 +662,24 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES using var ms = new MemoryStream(file, false); ms.Seek(16, SeekOrigin.Begin); // ines header //pluck the necessary bytes out of the file - if (iNesHeaderInfo.trainer_size != 0) + if (iNesHeaderInfo.TrainerSize != 0) { trainer = new byte[512]; ms.Read(trainer, 0, 512); } - Board.Rom = new byte[choice.prg_size * 1024]; + Board.Rom = new byte[choice.PrgSize * 1024]; ms.Read(Board.Rom, 0, Board.Rom.Length); - if (choice.chr_size > 0) + if (choice.ChrSize > 0) { - Board.Vrom = new byte[choice.chr_size * 1024]; + Board.Vrom = new byte[choice.ChrSize * 1024]; int vrom_copy_size = ms.Read(Board.Vrom, 0, Board.Vrom.Length); if (vrom_copy_size < Board.Vrom.Length) LoadWriteLine("Less than the expected VROM was found in the file: {0} < {1}", vrom_copy_size, Board.Vrom.Length); } - if (choice.prg_size != iNesHeaderInfo.prg_size || choice.chr_size != iNesHeaderInfo.chr_size) + if (choice.PrgSize != iNesHeaderInfo.PrgSize || choice.ChrSize != iNesHeaderInfo.ChrSize) LoadWriteLine("Warning: Detected choice has different filesizes than the INES header!"); } else if (unif != null) @@ -693,12 +693,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES var ms = new MemoryStream(file, false); ms.Seek(0, SeekOrigin.Begin); - Board.Rom = new byte[choice.prg_size * 1024]; + Board.Rom = new byte[choice.PrgSize * 1024]; ms.Read(Board.Rom, 0, Board.Rom.Length); - if (choice.chr_size > 0) + if (choice.ChrSize > 0) { - Board.Vrom = new byte[choice.chr_size * 1024]; + Board.Vrom = new byte[choice.ChrSize * 1024]; int vrom_copy_size = ms.Read(Board.Vrom, 0, Board.Vrom.Length); if (vrom_copy_size < Board.Vrom.Length) @@ -712,17 +712,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // IF YOU DO ANYTHING AT ALL BELOW THIS LINE, MAKE SURE THE APPROPRIATE CHANGE IS MADE TO FDS (if applicable) //create the vram and wram if necessary - if (cart.wram_size != 0) - Board.Wram = new byte[cart.wram_size * 1024]; - if (cart.vram_size != 0) - Board.Vram = new byte[cart.vram_size * 1024]; + if (cart.WramSize != 0) + Board.Wram = new byte[cart.WramSize * 1024]; + if (cart.VramSize != 0) + Board.Vram = new byte[cart.VramSize * 1024]; Board.PostConfigure(); AutoMapperProps.Populate(Board, SyncSettings); // set up display type - NESSyncSettings.Region fromrom = DetectRegion(cart.system); + NESSyncSettings.Region fromrom = DetectRegion(cart.System); NESSyncSettings.Region fromsettings = SyncSettings.RegionOverride; if (fromsettings != NESSyncSettings.Region.Default) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs index 1525f39393..757646148b 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.iNES.cs @@ -31,49 +31,49 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // process as iNES v2 CartV2 = new CartInfo { - prg_size = data[4] | data[9] << 8 & 0xf00, - chr_size = data[5] | data[9] << 4 & 0xf00 + PrgSize = data[4] | data[9] << 8 & 0xf00, + ChrSize = data[5] | data[9] << 4 & 0xf00 }; - CartV2.prg_size *= 16; - CartV2.chr_size *= 8; + CartV2.PrgSize *= 16; + CartV2.ChrSize *= 8; - CartV2.wram_battery = (data[6] & 2) != 0; // should this be respected in v2 mode?? + CartV2.WramBattery = (data[6] & 2) != 0; // should this be respected in v2 mode?? int wrambat = iNES2Wram(data[10] >> 4); int wramnon = iNES2Wram(data[10] & 15); - CartV2.wram_battery |= wrambat > 0; + CartV2.WramBattery |= wrambat > 0; // fixme - doesn't handle sizes not divisible by 1024 - CartV2.wram_size = (short)((wrambat + wramnon) / 1024); + CartV2.WramSize = (short)((wrambat + wramnon) / 1024); int mapper = data[6] >> 4 | data[7] & 0xf0 | data[8] << 8 & 0xf00; int submapper = data[8] >> 4; - CartV2.board_type = $"MAPPER{mapper:d4}-{submapper:d2}"; + CartV2.BoardType = $"MAPPER{mapper:d4}-{submapper:d2}"; int vrambat = iNES2Wram(data[11] >> 4); int vramnon = iNES2Wram(data[11] & 15); // hopefully a game with battery backed vram understands what to do internally - CartV2.wram_battery |= vrambat > 0; - CartV2.vram_size = (vrambat + vramnon) / 1024; + CartV2.WramBattery |= vrambat > 0; + CartV2.VramSize = (vrambat + vramnon) / 1024; - CartV2.inesmirroring = data[6] & 1 | data[6] >> 2 & 2; - switch (CartV2.inesmirroring) + CartV2.InesMirroring = data[6] & 1 | data[6] >> 2 & 2; + switch (CartV2.InesMirroring) { - case 0: CartV2.pad_v = 1; break; - case 1: CartV2.pad_h = 1; break; + case 0: CartV2.PadV = 1; break; + case 1: CartV2.PadH = 1; break; } switch (data[12] & 1) { case 0: - CartV2.system = "NES-NTSC"; + CartV2.System = "NES-NTSC"; break; case 1: - CartV2.system = "NES-PAL"; + CartV2.System = "NES-PAL"; break; } if ((data[6] & 4) != 0) - CartV2.trainer_size = 512; + CartV2.TrainerSize = 512; } else { @@ -84,35 +84,35 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES // the DiskDude cleaning is no longer; get better roms Cart = new CartInfo { - prg_size = data[4], - chr_size = data[5] + PrgSize = data[4], + ChrSize = data[5] }; - if (Cart.prg_size == 0) - Cart.prg_size = 256; - Cart.prg_size *= 16; - Cart.chr_size *= 8; + if (Cart.PrgSize == 0) + Cart.PrgSize = 256; + Cart.PrgSize *= 16; + Cart.ChrSize *= 8; - Cart.wram_battery = (data[6] & 2) != 0; - Cart.wram_size = 8; // should be data[8], but that never worked + Cart.WramBattery = (data[6] & 2) != 0; + Cart.WramSize = 8; // should be data[8], but that never worked { int mapper = data[6] >> 4 | data[7] & 0xf0; - Cart.board_type = $"MAPPER{mapper:d3}"; + Cart.BoardType = $"MAPPER{mapper:d3}"; } - Cart.vram_size = Cart.chr_size > 0 ? 0 : 8; + Cart.VramSize = Cart.ChrSize > 0 ? 0 : 8; - Cart.inesmirroring = data[6] & 1 | data[6] >> 2 & 2; - switch (Cart.inesmirroring) + Cart.InesMirroring = data[6] & 1 | data[6] >> 2 & 2; + switch (Cart.InesMirroring) { - case 0: Cart.pad_v = 1; break; - case 1: Cart.pad_h = 1; break; + case 0: Cart.PadV = 1; break; + case 1: Cart.PadH = 1; break; } if (data[6].Bit(2)) - Cart.trainer_size = 512; + Cart.TrainerSize = 512; return true; } diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs index 02dede9fb1..f916a47097 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Unif.cs @@ -60,36 +60,36 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES prgrom = prgs.ToArray(); chrrom = chrs.ToArray(); - ci.prg_size = (short)(prgrom.Length / 1024); - ci.chr_size = (short)(chrrom.Length / 1024); + ci.PrgSize = (short)(prgrom.Length / 1024); + ci.ChrSize = (short)(chrrom.Length / 1024); if (chunks.TryGetValue("MIRR", out var tmp)) { switch (tmp[0]) { case 0: // hmirror - ci.pad_h = 0; - ci.pad_v = 1; + ci.PadH = 0; + ci.PadV = 1; break; case 1: // vmirror - ci.pad_h = 1; - ci.pad_v = 0; + ci.PadH = 1; + ci.PadV = 0; break; } } if (chunks.TryGetValue("MAPR", out tmp)) { - ci.board_type = new BinaryReader(new MemoryStream(tmp)).ReadStringUtf8NullTerminated(); + ci.BoardType = new BinaryReader(new MemoryStream(tmp)).ReadStringUtf8NullTerminated(); } - ci.board_type = ci.board_type.TrimEnd('\0'); - ci.board_type = "UNIF_" + ci.board_type; + ci.BoardType = ci.BoardType.TrimEnd('\0'); + ci.BoardType = "UNIF_" + ci.BoardType; if (chunks.TryGetValue("BATR", out tmp)) { // apparently, this chunk just existing means battery is yes - ci.wram_battery = true; + ci.WramBattery = true; } // is there any way using System.Security.Cryptography.SHA1 to compute the hash of @@ -100,7 +100,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES ms.Write(chrrom, 0, chrrom.Length); ms.Close(); byte[] all = ms.ToArray(); - ci.sha1 = "sha1:" + all.HashSHA1(0, all.Length); + ci.Sha1 = "sha1:" + all.HashSHA1(0, all.Length); } // other code will expect this diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs index 7a7249042a..bd1b765a3d 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/QuickNES/QuickNES.cs @@ -277,21 +277,21 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES if (carts.Count > 0) { - Console.WriteLine("BootGod entry found: {0}", carts[0].name); - switch (carts[0].system) + Console.WriteLine("BootGod entry found: {0}", carts[0].Name); + switch (carts[0].System) { case "NES-PAL": case "NES-PAL-A": case "NES-PAL-B": case "Dendy": - Console.WriteLine("Bad region {0}! Failing over...", carts[0].system); + Console.WriteLine("Bad region {0}! Failing over...", carts[0].System); throw new UnsupportedGameException("Unsupported region!"); default: break; } BootGodStatus = RomStatus.GoodDump; - BootGodName = carts[0].name; + BootGodName = carts[0].Name; } else {