Expose PALRAM domain from NesHawk (resolves #3854)

This commit is contained in:
James Groom 2024-01-31 09:31:22 +00:00 committed by GitHub
parent 572d989a94
commit f3aae71da6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -27,6 +27,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
domains.Add(SystemBus);
domains.Add(PPUBus);
domains.Add(CIRAMdomain);
domains.Add(new MemoryDomainByteArray("PALRAM", MemoryDomain.Endian.Little, ppu.PALRAM, writable: true, wordSize: 1));
domains.Add(OAMdoman);
if (Board is not FDS && Board.SaveRam != null)

View File

@ -199,16 +199,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
this.nes = nes;
OAM = new byte[0x100];
PALRAM = new byte[0x20];
//power-up palette verified by blargg's power_up_palette test.
//he speculates that these may differ depending on the system tested..
//and I don't see why the ppu would waste any effort setting these..
//but for the sake of uniformity, we'll do it.
Array.Copy(new byte[] {
PALRAM = new byte[] {
0x09,0x01,0x00,0x01,0x00,0x02,0x02,0x0D,0x08,0x10,0x08,0x24,0x00,0x00,0x04,0x2C,
0x09,0x01,0x34,0x03,0x00,0x04,0x00,0x14,0x08,0x3A,0x00,0x02,0x00,0x20,0x2C,0x08
}, PALRAM, 0x20);
};
Reset();
}