本文整理汇总了C++中ROMPAGE函数的典型用法代码示例。如果您正苦于以下问题:C++ ROMPAGE函数的具体用法?C++ ROMPAGE怎么用?C++ ROMPAGE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ROMPAGE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Map109_Init
/*-------------------------------------------------------------------*/
void Map109_Init()
{
/* Initialize Mapper */
MapperInit = Map109_Init;
/* Write to Mapper */
MapperWrite = Map0_Write;
/* Write to SRAM */
MapperSram = Map0_Sram;
/* Write to APU */
MapperApu = Map109_Apu;
/* Read from APU */
MapperReadApu = Map0_ReadApu;
/* Callback at VSync */
MapperVSync = Map0_VSync;
/* Callback at HSync */
MapperHSync = Map0_HSync;
/* Callback at PPU */
MapperPPU = Map0_PPU;
/* Callback at Rendering Screen ( 1:BG, 0:Sprite ) */
MapperRenderScreen = Map0_RenderScreen;
/* Set SRAM Banks */
SRAMBANK = SRAM;
/* Set ROM Banks */
ROMBANK0 = ROMPAGE( 0 );
ROMBANK1 = ROMPAGE( 1 );
ROMBANK2 = ROMPAGE( 2 );
ROMBANK3 = ROMPAGE( 3 );
/* Initialize Registers */
Map109_Reg = 0;
Map109_Chr0 = 0;
Map109_Chr1 = 0;
Map109_Chr2 = 0;
Map109_Chr3 = 0;
Map109_Chrmode0 = 0;
Map109_Chrmode1 = 0;
/* Set PPU Banks */
Map109_Set_PPU_Banks();
/* Set up wiring of the interrupt pin */
K6502_Set_Int_Wiring( 1, 1 );
}
示例2: Map43_Init
/*-------------------------------------------------------------------*/
void Map43_Init()
{
/* Initialize Mapper */
MapperInit = Map43_Init;
/* Write to Mapper */
MapperWrite = Map43_Write;
/* Write to SRAM */
MapperSram = Map0_Sram;
/* Write to APU */
MapperApu = Map43_Apu;
/* Read from APU */
MapperReadApu = Map43_ReadApu;
/* Callback at VSync */
MapperVSync = Map0_VSync;
/* Callback at HSync */
MapperHSync = Map43_HSync;
/* Callback at PPU */
MapperPPU = Map0_PPU;
/* Callback at Rendering Screen ( 1:BG, 0:Sprite ) */
MapperRenderScreen = Map0_RenderScreen;
/* Set SRAM Banks */
SRAMBANK = ROMPAGE( 2 );
/* Set ROM Banks */
ROMBANK0 = ROMPAGE( 1 );
ROMBANK1 = ROMPAGE( 0 );
ROMBANK2 = ROMPAGE( 4 );
ROMBANK3 = ROMPAGE( 9 );
/* Initialize State Registers */
Map43_IRQ_Enable = 1;
Map43_IRQ_Cnt = 0;
/* Set PPU Banks */
if ( NesHeader.byVRomSize > 0 )
{
for ( int nPage = 0; nPage < 8; ++nPage )
PPUBANK[ nPage ] = VROMPAGE( nPage );
InfoNES_SetupChr();
}
/* Set up wiring of the interrupt pin */
K6502_Set_Int_Wiring( 1, 1 );
}
示例3: Map18_Init
/*-------------------------------------------------------------------*/
void Map18_Init()
{
/* Initialize Mapper */
MapperInit = Map18_Init;
/* Write to Mapper */
MapperWrite = Map18_Write;
/* Write to SRAM */
MapperSram = Map0_Sram;
/* Write to APU */
MapperApu = Map0_Apu;
/* Read from APU */
MapperReadApu = Map0_ReadApu;
/* Callback at VSync */
MapperVSync = Map0_VSync;
/* Callback at HSync */
MapperHSync = Map18_HSync;
/* Callback at PPU */
MapperPPU = Map0_PPU;
/* Callback at Rendering Screen ( 1:BG, 0:Sprite ) */
MapperRenderScreen = Map0_RenderScreen;
/* Set SRAM Banks */
SRAMBANK = SRAM;
/* Set ROM Banks */
ROMBANK0 = ROMPAGE( 0 );
ROMBANK1 = ROMPAGE( 1 );
ROMBANK2 = ROMLASTPAGE( 1 );
ROMBANK3 = ROMLASTPAGE( 0 );
/* Initialize Regs */
int i ;
for (i = 0; i < sizeof( Map18_Regs ); i++ )
{
Map18_Regs[ i ] = 0;
}
Map18_IRQ_Enable = 0;
Map18_IRQ_Latch = 0;
Map18_IRQ_Cnt = 0;
/* Set up wiring of the interrupt pin */
K6502_Set_Int_Wiring( 1, 1 );
}
示例4: Map135_Apu
/*-------------------------------------------------------------------*/
void Map135_Apu( word wAddr, byte byData )
{
switch( wAddr & 0x4101 ) {
case 0x4100:
Map135_Cmd = byData & 0x07;
break;
case 0x4101:
switch( Map135_Cmd ) {
case 0:
Map135_Chr0l = byData & 0x07;
Map135_Set_PPU_Banks();
break;
case 1:
Map135_Chr0h = byData & 0x07;
Map135_Set_PPU_Banks();
break;
case 2:
Map135_Chr1l = byData & 0x07;
Map135_Set_PPU_Banks();
break;
case 3:
Map135_Chr1h = byData & 0x07;
Map135_Set_PPU_Banks();
break;
case 4:
Map135_Chrch = byData & 0x07;
Map135_Set_PPU_Banks();
break;
case 5:
/* Set ROM Banks */
W.ROMBANK0 = ROMPAGE( (((byData%0x07)<<2) + 0 ) % (S.NesHeader.ROMSize << 1) );
W.ROMBANK1 = ROMPAGE( (((byData%0x07)<<2) + 1 ) % (S.NesHeader.ROMSize << 1) );
W.ROMBANK2 = ROMPAGE( (((byData%0x07)<<2) + 2 ) % (S.NesHeader.ROMSize << 1) );
W.ROMBANK3 = ROMPAGE( (((byData%0x07)<<2) + 3 ) % (S.NesHeader.ROMSize << 1) );
break;
case 6:
break;
case 7:
switch( (byData>>1)&0x03 ) {
case 0: NESCore_Mirroring( 2 ); break;
case 1: NESCore_Mirroring( 0 ); break;
case 2: NESCore_Mirroring( 1 ); break;
case 3: NESCore_Mirroring( 2 ); break;
}
break;
}
break;
}
//Map135_Wram[ wAddr & 0x1fff ] = byData;
}
示例5: Map243_Apu
/*-------------------------------------------------------------------*/
void Map243_Apu( word wAddr, byte byData )
{
if ( wAddr == 0x4100 )
{
Map243_Regs[0] = byData;
}
else if ( wAddr == 0x4101 )
{
switch ( Map243_Regs[0] & 0x07 )
{
case 0x02:
Map243_Regs[1] = byData & 0x01;
break;
case 0x00:
case 0x04:
case 0x07:
Map243_Regs[2] = ( byData & 0x01 ) << 1;
break;
/* Set ROM Banks */
case 0x05:
W.ROMBANK0 = ROMPAGE( ( byData * 4 + 0 ) % ( S.NesHeader.ROMSize << 1 ) );
W.ROMBANK1 = ROMPAGE( ( byData * 4 + 1 ) % ( S.NesHeader.ROMSize << 1 ) );
W.ROMBANK2 = ROMPAGE( ( byData * 4 + 2 ) % ( S.NesHeader.ROMSize << 1 ) );
W.ROMBANK3 = ROMPAGE( ( byData * 4 + 3 ) % ( S.NesHeader.ROMSize << 1 ) );
break;
case 0x06:
Map243_Regs[3] = ( byData & 0x03 ) << 2;
break;
}
/* Set PPU Banks */
if ( ( S.NesHeader.VROMSize << 3 ) <= 64 )
{
byte chr_bank = ( Map243_Regs[2] + Map243_Regs[3] ) >> 1;
W.PPUBANK[0] = VROMPAGE( ( chr_bank * 8 + 0 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[1] = VROMPAGE( ( chr_bank * 8 + 1 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[2] = VROMPAGE( ( chr_bank * 8 + 2 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[3] = VROMPAGE( ( chr_bank * 8 + 3 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[4] = VROMPAGE( ( chr_bank * 8 + 4 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[5] = VROMPAGE( ( chr_bank * 8 + 5 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[6] = VROMPAGE( ( chr_bank * 8 + 6 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[7] = VROMPAGE( ( chr_bank * 8 + 7 ) % ( S.NesHeader.VROMSize << 3 ) );
NESCore_Develop_Character_Data();
}
else
{
示例6: Map193_Init
/*-------------------------------------------------------------------*/
void Map193_Init()
{
int nPage;
/* Initialize Mapper */
MapperInit = Map193_Init;
/* Write to Mapper */
MapperWrite = Map0_Write;
/* Write to SRAM */
MapperSram = Map193_Sram;
/* Write to APU */
MapperApu = Map0_Apu;
/* Read from APU */
MapperReadApu = Map0_ReadApu;
/* Callback at VSync */
MapperVSync = Map0_VSync;
/* Callback at HSync */
MapperHSync = Map0_HSync;
/* Callback at PPU */
MapperPPU = Map0_PPU;
/* Callback at Rendering Screen ( 1:BG, 0:Sprite ) */
MapperRenderScreen = Map0_RenderScreen;
/* Set SRAM Banks */
SRAMBANK = SRAM;
/* Set ROM Banks */
ROMBANK0 = ROMPAGE( (NesHeader.byRomSize<<1) - 4 );
ROMBANK1 = ROMPAGE( (NesHeader.byRomSize<<1) - 3 );
ROMBANK2 = ROMPAGE( (NesHeader.byRomSize<<1) - 2 );
ROMBANK3 = ROMPAGE( (NesHeader.byRomSize<<1) - 1 );
/* Set PPU Banks */
if ( NesHeader.byVRomSize > 0 ) {
for ( nPage = 0; nPage < 8; ++nPage )
PPUBANK[ nPage ] = VROMPAGE( nPage );
InfoNES_SetupChr();
}
/* Set up wiring of the interrupt pin */
K6502_Set_Int_Wiring( 1, 1 );
}
示例7: Map134_Apu
/*-------------------------------------------------------------------*/
void Map134_Apu( word wAddr, byte byData )
{
switch( wAddr & 0x4101 ) {
case 0x4100:
Map134_Cmd = byData & 0x07;
break;
case 0x4101:
switch( Map134_Cmd ) {
case 0:
Map134_Prg = 0;
Map134_Chr = 3;
break;
case 4:
Map134_Chr &= 0x3;
Map134_Chr |= (byData & 0x07) << 2;
break;
case 5:
Map134_Prg = byData & 0x07;
break;
case 6:
Map134_Chr &= 0x1C;
Map134_Chr |= byData & 0x3;
break;
case 7:
if( byData & 0x01 ) NESCore_Mirroring( 0 );
else NESCore_Mirroring( 1 );
break;
}
break;
}
/* Set ROM Banks */
W.ROMBANK0 = ROMPAGE( ((Map134_Prg<<2) + 0 ) % (S.NesHeader.ROMSize << 1) );
W.ROMBANK1 = ROMPAGE( ((Map134_Prg<<2) + 1 ) % (S.NesHeader.ROMSize << 1) );
W.ROMBANK2 = ROMPAGE( ((Map134_Prg<<2) + 2 ) % (S.NesHeader.ROMSize << 1) );
W.ROMBANK3 = ROMPAGE( ((Map134_Prg<<2) + 3 ) % (S.NesHeader.ROMSize << 1) );
/* Set PPU Banks */
W.PPUBANK[0] = VROMPAGE( ((Map134_Chr<<3) + 0) % (S.NesHeader.VROMSize << 3) );
W.PPUBANK[1] = VROMPAGE( ((Map134_Chr<<3) + 1) % (S.NesHeader.VROMSize << 3) );
W.PPUBANK[2] = VROMPAGE( ((Map134_Chr<<3) + 2) % (S.NesHeader.VROMSize << 3) );
W.PPUBANK[3] = VROMPAGE( ((Map134_Chr<<3) + 3) % (S.NesHeader.VROMSize << 3) );
W.PPUBANK[4] = VROMPAGE( ((Map134_Chr<<3) + 4) % (S.NesHeader.VROMSize << 3) );
W.PPUBANK[5] = VROMPAGE( ((Map134_Chr<<3) + 5) % (S.NesHeader.VROMSize << 3) );
W.PPUBANK[6] = VROMPAGE( ((Map134_Chr<<3) + 6) % (S.NesHeader.VROMSize << 3) );
W.PPUBANK[7] = VROMPAGE( ((Map134_Chr<<3) + 7) % (S.NesHeader.VROMSize << 3) );
NESCore_Develop_Character_Data();
//Map134_Wram[wAddr & 0x1fff] = byData;
}
示例8: Map248_Set_CPU_Banks
/*-------------------------------------------------------------------*/
void Map248_Set_CPU_Banks()
{
if( Map248_Reg[0] & 0x40 ) {
ROMBANK0 = ROMLASTPAGE( 1 );
ROMBANK1 = ROMPAGE(Map248_Prg1 % (NesHeader.byRomSize<<1));
ROMBANK2 = ROMPAGE(Map248_Prg0 % (NesHeader.byRomSize<<1));
ROMBANK3 = ROMLASTPAGE( 0 );
} else {
ROMBANK0 = ROMPAGE(Map248_Prg0 % (NesHeader.byRomSize<<1));
ROMBANK1 = ROMPAGE(Map248_Prg1 % (NesHeader.byRomSize<<1));
ROMBANK2 = ROMLASTPAGE( 1 );
ROMBANK3 = ROMLASTPAGE( 0 );
}
}
示例9: Map248_Set_CPU_Banks
/*-------------------------------------------------------------------*/
void Map248_Set_CPU_Banks()
{
if( Map248_Reg[0] & 0x40 ) {
W.ROMBANK0 = ROMLASTPAGE( 1 );
W.ROMBANK1 = ROMPAGE(Map248_Prg1 % (S.NesHeader.ROMSize<<1));
W.ROMBANK2 = ROMPAGE(Map248_Prg0 % (S.NesHeader.ROMSize<<1));
W.ROMBANK3 = ROMLASTPAGE( 0 );
} else {
W.ROMBANK0 = ROMPAGE(Map248_Prg0 % (S.NesHeader.ROMSize<<1));
W.ROMBANK1 = ROMPAGE(Map248_Prg1 % (S.NesHeader.ROMSize<<1));
W.ROMBANK2 = ROMLASTPAGE( 1 );
W.ROMBANK3 = ROMLASTPAGE( 0 );
}
}
示例10: Map251_Init
/*-------------------------------------------------------------------*/
void Map251_Init()
{
/* Initialize Mapper */
MapperInit = Map251_Init;
/* Write to Mapper */
MapperWrite = Map251_Write;
/* Write to SRAM */
MapperSram = Map251_Sram;
/* Write to APU */
MapperApu = Map0_Apu;
/* Read from APU */
MapperReadApu = Map0_ReadApu;
/* Callback at VSync */
MapperVSync = Map0_VSync;
/* Callback at HSync */
MapperHSync = Map0_HSync;
/* Callback at PPU */
MapperPPU = Map0_PPU;
/* Callback at Rendering Screen ( 1:BG, 0:Sprite ) */
MapperRenderScreen = Map0_RenderScreen;
/* Set SRAM Banks */
SRAMBANK = SRAM;
/* Set ROM Banks */
ROMBANK0 = ROMPAGE( 0 );
ROMBANK1 = ROMPAGE( 1 );
ROMBANK2 = ROMLASTPAGE( 1 );
ROMBANK3 = ROMLASTPAGE( 0 );
/* Set Registers */
InfoNES_Mirroring( 1 );
int i;
for( i = 0; i < 11; i++ )
Map251_Reg[i] = 0;
for( i = 0; i < 4; i++ )
Map251_Breg[i] = 0;
/* Set up wiring of the interrupt pin */
K6502_Set_Int_Wiring( 1, 1 );
}
示例11: Map134_Apu
/*-------------------------------------------------------------------*/
void Map134_Apu( WORD wAddr, BYTE byData )
{
switch( wAddr & 0x4101 ) {
case 0x4100:
Map134_Cmd = byData & 0x07;
break;
case 0x4101:
switch( Map134_Cmd ) {
case 0:
Map134_Prg = 0;
Map134_Chr = 3;
break;
case 4:
Map134_Chr &= 0x3;
Map134_Chr |= (byData & 0x07) << 2;
break;
case 5:
Map134_Prg = byData & 0x07;
break;
case 6:
Map134_Chr &= 0x1C;
Map134_Chr |= byData & 0x3;
break;
case 7:
if( byData & 0x01 ) InfoNES_Mirroring( 0 );
else InfoNES_Mirroring( 1 );
break;
}
break;
}
/* Set ROM Banks */
ROMBANK0 = ROMPAGE( ((Map134_Prg<<2) + 0 ) % (NesHeader.byRomSize << 1) );
ROMBANK1 = ROMPAGE( ((Map134_Prg<<2) + 1 ) % (NesHeader.byRomSize << 1) );
ROMBANK2 = ROMPAGE( ((Map134_Prg<<2) + 2 ) % (NesHeader.byRomSize << 1) );
ROMBANK3 = ROMPAGE( ((Map134_Prg<<2) + 3 ) % (NesHeader.byRomSize << 1) );
/* Set PPU Banks */
PPUBANK[ 0 ] = VROMPAGE( ((Map134_Chr<<3) + 0) % (NesHeader.byVRomSize << 3) );
PPUBANK[ 1 ] = VROMPAGE( ((Map134_Chr<<3) + 1) % (NesHeader.byVRomSize << 3) );
PPUBANK[ 2 ] = VROMPAGE( ((Map134_Chr<<3) + 2) % (NesHeader.byVRomSize << 3) );
PPUBANK[ 3 ] = VROMPAGE( ((Map134_Chr<<3) + 3) % (NesHeader.byVRomSize << 3) );
PPUBANK[ 4 ] = VROMPAGE( ((Map134_Chr<<3) + 4) % (NesHeader.byVRomSize << 3) );
PPUBANK[ 5 ] = VROMPAGE( ((Map134_Chr<<3) + 5) % (NesHeader.byVRomSize << 3) );
PPUBANK[ 6 ] = VROMPAGE( ((Map134_Chr<<3) + 6) % (NesHeader.byVRomSize << 3) );
PPUBANK[ 7 ] = VROMPAGE( ((Map134_Chr<<3) + 7) % (NesHeader.byVRomSize << 3) );
InfoNES_SetupChr();
//Map134_Wram[ wAddr & 0x1fff ] = byData;
}
示例12: Map243_Apu
/*-------------------------------------------------------------------*/
void Map243_Apu( WORD wAddr, BYTE byData )
{
if ( wAddr == 0x4100 )
{
Map243_Regs[0] = byData;
}
else if ( wAddr == 0x4101 )
{
switch ( Map243_Regs[0] & 0x07 )
{
case 0x02:
Map243_Regs[1] = byData & 0x01;
break;
case 0x00:
case 0x04:
case 0x07:
Map243_Regs[2] = ( byData & 0x01 ) << 1;
break;
/* Set ROM Banks */
case 0x05:
ROMBANK0 = ROMPAGE( ( byData * 4 + 0 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK1 = ROMPAGE( ( byData * 4 + 1 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK2 = ROMPAGE( ( byData * 4 + 2 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK3 = ROMPAGE( ( byData * 4 + 3 ) % ( NesHeader.byRomSize << 1 ) );
break;
case 0x06:
Map243_Regs[3] = ( byData & 0x03 ) << 2;
break;
}
/* Set PPU Banks */
if ( ( NesHeader.byVRomSize << 3 ) <= 64 )
{
BYTE chr_bank = ( Map243_Regs[2] + Map243_Regs[3] ) >> 1;
PPUBANK[ 0 ] = VROMPAGE( ( chr_bank * 8 + 0 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 1 ] = VROMPAGE( ( chr_bank * 8 + 1 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 2 ] = VROMPAGE( ( chr_bank * 8 + 2 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 3 ] = VROMPAGE( ( chr_bank * 8 + 3 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 4 ] = VROMPAGE( ( chr_bank * 8 + 4 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 5 ] = VROMPAGE( ( chr_bank * 8 + 5 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 6 ] = VROMPAGE( ( chr_bank * 8 + 6 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 7 ] = VROMPAGE( ( chr_bank * 8 + 7 ) % ( NesHeader.byVRomSize << 3 ) );
InfoNES_SetupChr();
}
else
{
示例13: Map188_Write
/*-------------------------------------------------------------------*/
void Map188_Write( WORD wAddr, BYTE byData )
{
/* Set ROM Banks */
if ( byData )
{
if ( byData & 0x10 )
{
byData = ( byData & 0x07 ) << 1;
ROMBANK0 = ROMPAGE( ( byData + 0 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK1 = ROMPAGE( ( byData + 1 ) % ( NesHeader.byRomSize << 1 ) );
} else {
byData <<= 1;
ROMBANK0 = ROMPAGE( ( byData + 16 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK1 = ROMPAGE( ( byData + 17 ) % ( NesHeader.byRomSize << 1 ) );
}
}
else
{
if ( ( NesHeader.byRomSize << 1 ) == 0x10 )
{
ROMBANK0 = ROMPAGE( 14 );
ROMBANK1 = ROMPAGE( 15 );
} else {
ROMBANK0 = ROMPAGE( 16 );
ROMBANK1 = ROMPAGE( 17 );
}
}
}
示例14: Map185_Init
/*-------------------------------------------------------------------*/
void Map185_Init()
{
int nPage;
/* Initialize Mapper */
MapperInit = Map185_Init;
/* Write to Mapper */
MapperWrite = Map185_Write;
/* Write to SRAM */
MapperSram = Map0_Sram;
/* Write to APU */
MapperApu = Map0_Apu;
/* Read from APU */
MapperReadApu = Map0_ReadApu;
/* Callback at VSync */
MapperVSync = Map0_VSync;
/* Callback at HSync */
MapperHSync = Map0_HSync;
/* Callback at PPU */
MapperPPU = Map0_PPU;
/* Callback at Rendering Screen ( 1:BG, 0:Sprite ) */
MapperRenderScreen = Map0_RenderScreen;
/* Set SRAM Banks */
SRAMBANK = SRAM;
/* Set ROM Banks */
ROMBANK0 = ROMPAGE( 0 );
ROMBANK1 = ROMPAGE( 1 );
ROMBANK2 = ROMPAGE( 2 );
ROMBANK3 = ROMPAGE( 3 );
/* Initialize Dummy VROM */
for ( nPage = 0; nPage < 0x400; nPage++ )
{
Map185_Dummy_Chr_Rom[ nPage ] = 0xff;
}
/* Set up wiring of the interrupt pin */
K6502_Set_Int_Wiring( 1, 1 );
}
示例15: Map114_Set_CPU_Banks
/*-------------------------------------------------------------------*/
void Map114_Set_CPU_Banks()
{
if ( Map114_Prg_Swap() )
{
ROMBANK0 = ROMLASTPAGE( 1 );
ROMBANK1 = ROMPAGE( Map114_Prg1 % ( NesHeader.byRomSize << 1 ) );
ROMBANK2 = ROMPAGE( Map114_Prg0 % ( NesHeader.byRomSize << 1 ) );
ROMBANK3 = ROMLASTPAGE( 0 );
} else {
ROMBANK0 = ROMPAGE( Map114_Prg0 % ( NesHeader.byRomSize << 1 ) );
ROMBANK1 = ROMPAGE( Map114_Prg1 % ( NesHeader.byRomSize << 1 ) );
ROMBANK2 = ROMLASTPAGE( 1 );
ROMBANK3 = ROMLASTPAGE( 0 );
}
}