mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
NES: Fixed CHR RAM behavior
This commit is contained in:
parent
ff331362be
commit
e74a132ac9
2 changed files with 4 additions and 1 deletions
|
@ -373,6 +373,9 @@ void BaseMapper::SelectCHRPage(uint16_t slot, uint16_t page, ChrMemoryType memor
|
|||
if(memoryType == ChrMemoryType::NametableRam) {
|
||||
pageSize = BaseMapper::NametableSize;
|
||||
} else {
|
||||
if(memoryType == ChrMemoryType::Default) {
|
||||
memoryType = _chrRomSize > 0 ? ChrMemoryType::ChrRom : ChrMemoryType::ChrRam;
|
||||
}
|
||||
pageSize = memoryType == ChrMemoryType::ChrRam ? InternalGetChrRamPageSize() : InternalGetChrPageSize();
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ protected:
|
|||
|
||||
bool IsNes20();
|
||||
|
||||
virtual uint16_t GetChrRamPageSize() { return 0x2000; }
|
||||
virtual uint16_t GetChrRamPageSize() { return GetCHRPageSize(); }
|
||||
|
||||
//Save ram is battery backed and saved to disk
|
||||
virtual uint32_t GetSaveRamSize() { return 0x2000; }
|
||||
|
|
Loading…
Add table
Reference in a new issue