[NES] restore battery functionality
This commit is contained in:
parent
288c99b519
commit
5b6a34d8f0
|
@ -91,7 +91,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
case "wram":
|
case "wram":
|
||||||
currCart.wram_size += (short)ParseSize(xmlreader.GetAttribute("size"));
|
currCart.wram_size += (short)ParseSize(xmlreader.GetAttribute("size"));
|
||||||
if (xmlreader.GetAttribute("battery") != null)
|
if (xmlreader.GetAttribute("battery") != null)
|
||||||
currCart.wram_battery = 1;
|
currCart.wram_battery = true;
|
||||||
break;
|
break;
|
||||||
case "pad":
|
case "pad":
|
||||||
currCart.pad_h = byte.Parse(xmlreader.GetAttribute("h"));
|
currCart.pad_h = byte.Parse(xmlreader.GetAttribute("h"));
|
||||||
|
@ -145,7 +145,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
public short chr_size;
|
public short chr_size;
|
||||||
public short prg_size;
|
public short prg_size;
|
||||||
public short wram_size, vram_size;
|
public short wram_size, vram_size;
|
||||||
public byte pad_h, pad_v, wram_battery, mapper;
|
public byte pad_h, pad_v, mapper;
|
||||||
|
public bool wram_battery;
|
||||||
|
|
||||||
public string board_type;
|
public string board_type;
|
||||||
|
|
||||||
|
|
|
@ -441,6 +441,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.Boards
|
||||||
mmc1 = new MMC1();
|
mmc1 = new MMC1();
|
||||||
prg_mask = (BoardInfo.PRG_Size / 16) - 1;
|
prg_mask = (BoardInfo.PRG_Size / 16) - 1;
|
||||||
chr_mask = (BoardInfo.CHR_Size / 8) - 1;
|
chr_mask = (BoardInfo.CHR_Size / 8) - 1;
|
||||||
|
BoardInfo.Battery = cart.wram_battery;
|
||||||
|
|
||||||
//boards that don't contain CHR rom will contain CRAM. only one size is supported; set it up if it is there.
|
//boards that don't contain CHR rom will contain CRAM. only one size is supported; set it up if it is there.
|
||||||
Debug.Assert(BoardInfo.CRAM_Size == 0 || BoardInfo.CRAM_Size == 8);
|
Debug.Assert(BoardInfo.CRAM_Size == 0 || BoardInfo.CRAM_Size == 8);
|
||||||
|
|
Loading…
Reference in New Issue