2015-12-31 09:51:01 -05:00
# pragma once
# include "stdafx.h"
# include "BaseMapper.h"
class BnRom : public BaseMapper
{
protected :
2016-12-17 23:14:47 -05:00
virtual uint16_t GetPRGPageSize ( ) override { return 0x8000 ; }
virtual uint16_t GetCHRPageSize ( ) override { return 0x2000 ; }
2015-12-31 09:51:01 -05:00
2016-12-17 23:14:47 -05:00
void InitMapper ( ) override
2015-12-31 09:51:01 -05:00
{
2018-04-14 22:12:05 -04:00
SelectPRGPage ( 0 , GetPowerOnByte ( ) ) ;
2015-12-31 09:51:01 -05:00
SelectCHRPage ( 0 , 0 ) ;
}
2016-12-17 23:14:47 -05:00
void WriteRegister ( uint16_t addr , uint8_t value ) override
2015-12-31 09:51:01 -05:00
{
//"While the original BNROM board connects only 2 bits, it is recommended that emulators implement this as an 8-bit register allowing selection of up to 8 MB PRG ROM if present."
SelectPRGPage ( 0 , value ) ;
}
} ;