本文整理汇总了C++中VROMPAGE函数的典型用法代码示例。如果您正苦于以下问题:C++ VROMPAGE函数的具体用法?C++ VROMPAGE怎么用?C++ VROMPAGE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VROMPAGE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Map249_Write
/*-------------------------------------------------------------------*/
void Map249_Write( WORD wAddr, BYTE byData )
{
BYTE byM0,byM1,byM2,byM3,byM4,byM5,byM6,byM7;
switch( wAddr&0xFF01 ) {
case 0x8000:
case 0x8800:
Map249_Reg[0] = byData;
break;
case 0x8001:
case 0x8801:
switch( Map249_Reg[0] & 0x07 ) {
case 0x00:
if( Map249_Spdata == 1 ) {
byM0=byData&0x1;
byM1=(byData&0x02)>>1;
byM2=(byData&0x04)>>2;
byM3=(byData&0x08)>>3;
byM4=(byData&0x10)>>4;
byM5=(byData&0x20)>>5;
byM6=(byData&0x40)>>6;
byM7=(byData&0x80)>>7;
byData=(byM5<<7)|(byM4<<6)|(byM2<<5)|(byM6<<4)|(byM7<<3)|(byM3<<2)|(byM1<<1)|byM0;
}
PPUBANK[ 0 ] = VROMPAGE((byData&0xFE) % (NesHeader.byVRomSize<<3));
PPUBANK[ 1 ] = VROMPAGE((byData|0x01) % (NesHeader.byVRomSize<<3));
InfoNES_SetupChr();
break;
case 0x01:
if( Map249_Spdata == 1 ) {
byM0=byData&0x1;
byM1=(byData&0x02)>>1;
byM2=(byData&0x04)>>2;
byM3=(byData&0x08)>>3;
byM4=(byData&0x10)>>4;
byM5=(byData&0x20)>>5;
byM6=(byData&0x40)>>6;
byM7=(byData&0x80)>>7;
byData=(byM5<<7)|(byM4<<6)|(byM2<<5)|(byM6<<4)|(byM7<<3)|(byM3<<2)|(byM1<<1)|byM0;
}
PPUBANK[ 2 ] = VROMPAGE((byData&0xFE) % (NesHeader.byVRomSize<<3));
PPUBANK[ 3 ] = VROMPAGE((byData|0x01) % (NesHeader.byVRomSize<<3));
InfoNES_SetupChr();
break;
case 0x02:
if( Map249_Spdata == 1 ) {
byM0=byData&0x1;
byM1=(byData&0x02)>>1;
byM2=(byData&0x04)>>2;
byM3=(byData&0x08)>>3;
byM4=(byData&0x10)>>4;
byM5=(byData&0x20)>>5;
byM6=(byData&0x40)>>6;
byM7=(byData&0x80)>>7;
byData=(byM5<<7)|(byM4<<6)|(byM2<<5)|(byM6<<4)|(byM7<<3)|(byM3<<2)|(byM1<<1)|byM0;
}
示例2: Map249_Write
/*-------------------------------------------------------------------*/
void Map249_Write( word wAddr, byte byData )
{
byte byM0,byM1,byM2,byM3,byM4,byM5,byM6,byM7;
switch( wAddr&0xFF01 ) {
case 0x8000:
case 0x8800:
Map249_Reg[0] = byData;
break;
case 0x8001:
case 0x8801:
switch( Map249_Reg[0] & 0x07 ) {
case 0x00:
if( Map249_Spdata == 1 ) {
byM0=byData&0x1;
byM1=(byData&0x02)>>1;
byM2=(byData&0x04)>>2;
byM3=(byData&0x08)>>3;
byM4=(byData&0x10)>>4;
byM5=(byData&0x20)>>5;
byM6=(byData&0x40)>>6;
byM7=(byData&0x80)>>7;
byData=(byM5<<7)|(byM4<<6)|(byM2<<5)|(byM6<<4)|(byM7<<3)|(byM3<<2)|(byM1<<1)|byM0;
}
W.PPUBANK[ 0 ] = VROMPAGE((byData&0xFE) % (S.NesHeader.VROMSize<<3));
W.PPUBANK[ 1 ] = VROMPAGE((byData|0x01) % (S.NesHeader.VROMSize<<3));
NESCore_Develop_Character_Data();
break;
case 0x01:
if( Map249_Spdata == 1 ) {
byM0=byData&0x1;
byM1=(byData&0x02)>>1;
byM2=(byData&0x04)>>2;
byM3=(byData&0x08)>>3;
byM4=(byData&0x10)>>4;
byM5=(byData&0x20)>>5;
byM6=(byData&0x40)>>6;
byM7=(byData&0x80)>>7;
byData=(byM5<<7)|(byM4<<6)|(byM2<<5)|(byM6<<4)|(byM7<<3)|(byM3<<2)|(byM1<<1)|byM0;
}
W.PPUBANK[ 2 ] = VROMPAGE((byData&0xFE) % (S.NesHeader.VROMSize<<3));
W.PPUBANK[ 3 ] = VROMPAGE((byData|0x01) % (S.NesHeader.VROMSize<<3));
NESCore_Develop_Character_Data();
break;
case 0x02:
if( Map249_Spdata == 1 ) {
byM0=byData&0x1;
byM1=(byData&0x02)>>1;
byM2=(byData&0x04)>>2;
byM3=(byData&0x08)>>3;
byM4=(byData&0x10)>>4;
byM5=(byData&0x20)>>5;
byM6=(byData&0x40)>>6;
byM7=(byData&0x80)>>7;
byData=(byM5<<7)|(byM4<<6)|(byM2<<5)|(byM6<<4)|(byM7<<3)|(byM3<<2)|(byM1<<1)|byM0;
}
示例3: Map72_Write
/*-------------------------------------------------------------------*/
void Map72_Write( WORD wAddr, BYTE byData )
{
BYTE byBank = byData & 0x0f;
if ( byData & 0x80 )
{
/* Set ROM Banks */
byBank <<= 1;
byBank %= ( NesHeader.byRomSize << 1 );
ROMBANK0 = ROMPAGE( byBank );
ROMBANK1 = ROMPAGE( byBank + 1 );
} else
if ( byData & 0x40 )
{
/* Set PPU Banks */
byBank <<= 3;
byBank %= ( NesHeader.byVRomSize << 3 );
PPUBANK[ 0 ] = VROMPAGE( byBank );
PPUBANK[ 1 ] = VROMPAGE( byBank + 1 );
PPUBANK[ 2 ] = VROMPAGE( byBank + 2 );
PPUBANK[ 3 ] = VROMPAGE( byBank + 3 );
PPUBANK[ 4 ] = VROMPAGE( byBank + 4 );
PPUBANK[ 5 ] = VROMPAGE( byBank + 5 );
PPUBANK[ 6 ] = VROMPAGE( byBank + 6 );
PPUBANK[ 7 ] = VROMPAGE( byBank + 7 );
InfoNES_SetupChr();
}
}
示例4: Map78_Write
/*-------------------------------------------------------------------*/
void Map78_Write( word wAddr, byte byData )
{
byte byPrgBank = byData & 0x0f;
byte byChrBank = ( byData & 0xf0 ) >> 4;
/* Set ROM Banks */
byPrgBank <<= 1;
byPrgBank %= ( S.NesHeader.ROMSize << 1 );
W.ROMBANK0 = ROMPAGE( byPrgBank );
W.ROMBANK1 = ROMPAGE( byPrgBank + 1);
/* Set PPU Banks */
byChrBank <<= 3;
byChrBank %= ( S.NesHeader.VROMSize << 3 );
W.PPUBANK[0] = VROMPAGE( byChrBank );
W.PPUBANK[1] = VROMPAGE( byChrBank + 1 );
W.PPUBANK[2] = VROMPAGE( byChrBank + 2 );
W.PPUBANK[3] = VROMPAGE( byChrBank + 3 );
W.PPUBANK[4] = VROMPAGE( byChrBank + 4 );
W.PPUBANK[5] = VROMPAGE( byChrBank + 5 );
W.PPUBANK[6] = VROMPAGE( byChrBank + 6 );
W.PPUBANK[7] = VROMPAGE( byChrBank + 7 );
NESCore_Develop_Character_Data();
/* Set Name Table Mirroring */
if ( ( wAddr & 0xfe00 ) != 0xfe00 )
{
if ( byData & 0x08 )
{
NESCore_Mirroring( 2 );
} else {
NESCore_Mirroring( 3 );
}
}
}
示例5: Map72_Write
void Map72_Write( word wAddr, byte byData )
{
byte byBank = byData & 0x0f;
if ( byData & 0x80 )
{
/* Set ROM Banks */
byBank <<= 1;
byBank %= ( S.NesHeader.ROMSize << 1 );
W.ROMBANK0 = ROMPAGE( byBank );
W.ROMBANK1 = ROMPAGE( byBank + 1 );
} else
if ( byData & 0x40 )
{
/* Set PPU Banks */
byBank <<= 3;
byBank %= ( S.NesHeader.VROMSize << 3 );
W.PPUBANK[ 0 ] = VROMPAGE( byBank );
W.PPUBANK[ 1 ] = VROMPAGE( byBank + 1 );
W.PPUBANK[ 2 ] = VROMPAGE( byBank + 2 );
W.PPUBANK[ 3 ] = VROMPAGE( byBank + 3 );
W.PPUBANK[ 4 ] = VROMPAGE( byBank + 4 );
W.PPUBANK[ 5 ] = VROMPAGE( byBank + 5 );
W.PPUBANK[ 6 ] = VROMPAGE( byBank + 6 );
W.PPUBANK[ 7 ] = VROMPAGE( byBank + 7 );
NESCore_Develop_Character_Data();
}
}
示例6: Map62_Write
/*-------------------------------------------------------------------*/
void Map62_Write( WORD wAddr, BYTE byData )
{
switch( wAddr & 0xFF00 ) {
case 0x8100:
ROMBANK0 = ROMPAGE((byData+0) % (NesHeader.byRomSize<<1));
ROMBANK1 = ROMPAGE((byData+1) % (NesHeader.byRomSize<<1));
break;
case 0x8500:
ROMBANK0 = ROMPAGE(byData % (NesHeader.byRomSize<<1));
break;
case 0x8700:
ROMBANK1 = ROMPAGE(byData % (NesHeader.byRomSize<<1));
break;
default:
PPUBANK[ 0 ] = VROMPAGE((byData+0) % (NesHeader.byVRomSize<<3));
PPUBANK[ 1 ] = VROMPAGE((byData+1) % (NesHeader.byVRomSize<<3));
PPUBANK[ 2 ] = VROMPAGE((byData+2) % (NesHeader.byVRomSize<<3));
PPUBANK[ 3 ] = VROMPAGE((byData+3) % (NesHeader.byVRomSize<<3));
PPUBANK[ 4 ] = VROMPAGE((byData+4) % (NesHeader.byVRomSize<<3));
PPUBANK[ 5 ] = VROMPAGE((byData+5) % (NesHeader.byVRomSize<<3));
PPUBANK[ 6 ] = VROMPAGE((byData+6) % (NesHeader.byVRomSize<<3));
PPUBANK[ 7 ] = VROMPAGE((byData+7) % (NesHeader.byVRomSize<<3));
InfoNES_SetupChr();
break;
}
}
示例7: Map202_WriteSub
/*-------------------------------------------------------------------*/
void Map202_WriteSub( WORD wAddr, BYTE byData )
{
int bank = (wAddr>>1) & 0x07;
/* Set ROM Banks */
ROMBANK0 = ROMPAGE(((bank<<1)+0) % (NesHeader.byRomSize<<1));
ROMBANK1 = ROMPAGE(((bank<<1)+1) % (NesHeader.byRomSize<<1));
if ((wAddr&0x0c) == 0x0c) {
ROMBANK2 = ROMPAGE((((bank+1)<<1)+0) % (NesHeader.byRomSize<<1));
ROMBANK3 = ROMPAGE((((bank+1)<<1)+1) % (NesHeader.byRomSize<<1));
} else {
ROMBANK2 = ROMPAGE((((bank+0)<<1)+0) % (NesHeader.byRomSize<<1));
ROMBANK3 = ROMPAGE((((bank+0)<<1)+1) % (NesHeader.byRomSize<<1));
}
/* Set PPU Banks */
PPUBANK[0] = VROMPAGE(((bank<<3)+0) % (NesHeader.byVRomSize<<3));
PPUBANK[1] = VROMPAGE(((bank<<3)+1) % (NesHeader.byVRomSize<<3));
PPUBANK[2] = VROMPAGE(((bank<<3)+2) % (NesHeader.byVRomSize<<3));
PPUBANK[3] = VROMPAGE(((bank<<3)+3) % (NesHeader.byVRomSize<<3));
PPUBANK[4] = VROMPAGE(((bank<<3)+4) % (NesHeader.byVRomSize<<3));
PPUBANK[5] = VROMPAGE(((bank<<3)+5) % (NesHeader.byVRomSize<<3));
PPUBANK[6] = VROMPAGE(((bank<<3)+6) % (NesHeader.byVRomSize<<3));
PPUBANK[7] = VROMPAGE(((bank<<3)+7) % (NesHeader.byVRomSize<<3));
InfoNES_SetupChr();
if ( wAddr & 0x01 ) {
InfoNES_Mirroring( 0 );
} else {
InfoNES_Mirroring( 1 );
}
}
示例8: Map151_Write
/*-------------------------------------------------------------------*/
void Map151_Write( word wAddr, byte byData )
{
/* Set ROM Banks */
switch( wAddr & 0xF000 )
{
case 0x8000:
W.ROMBANK0 = ROMPAGE( byData % ( S.NesHeader.ROMSize << 1 ) );
break;
case 0xA000:
W.ROMBANK1 = ROMPAGE( byData % ( S.NesHeader.ROMSize << 1 ) );
break;
case 0xC000:
W.ROMBANK2 = ROMPAGE( byData % ( S.NesHeader.ROMSize << 1 ) );
break;
case 0xE000:
W.PPUBANK[ 0 ] = VROMPAGE( ( byData*4+0 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 1 ] = VROMPAGE( ( byData*4+1 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 2 ] = VROMPAGE( ( byData*4+2 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 3 ] = VROMPAGE( ( byData*4+3 ) % ( S.NesHeader.VROMSize << 3 ) );
NESCore_Develop_Character_Data();
break;
case 0xF000:
W.PPUBANK[ 4 ] = VROMPAGE( ( byData*4+0 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 5 ] = VROMPAGE( ( byData*4+1 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 6 ] = VROMPAGE( ( byData*4+2 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 7 ] = VROMPAGE( ( byData*4+3 ) % ( S.NesHeader.VROMSize << 3 ) );
NESCore_Develop_Character_Data();
break;
}
}
示例9: Map185_Write
/*-------------------------------------------------------------------*/
void Map185_Write( WORD wAddr, BYTE byData )
{
/* Set PPU Banks */
if ( byData & 0x03 )
{
PPUBANK[ 0 ] = VROMPAGE( 0 );
PPUBANK[ 1 ] = VROMPAGE( 1 );
PPUBANK[ 2 ] = VROMPAGE( 2 );
PPUBANK[ 3 ] = VROMPAGE( 3 );
PPUBANK[ 4 ] = VROMPAGE( 4 );
PPUBANK[ 5 ] = VROMPAGE( 5 );
PPUBANK[ 6 ] = VROMPAGE( 6 );
PPUBANK[ 7 ] = VROMPAGE( 7 );
InfoNES_SetupChr();
} else {
PPUBANK[ 0 ] = Map185_Dummy_Chr_Rom;
PPUBANK[ 1 ] = Map185_Dummy_Chr_Rom;
PPUBANK[ 2 ] = Map185_Dummy_Chr_Rom;
PPUBANK[ 3 ] = Map185_Dummy_Chr_Rom;
PPUBANK[ 4 ] = Map185_Dummy_Chr_Rom;
PPUBANK[ 5 ] = Map185_Dummy_Chr_Rom;
PPUBANK[ 6 ] = Map185_Dummy_Chr_Rom;
PPUBANK[ 7 ] = Map185_Dummy_Chr_Rom;
InfoNES_SetupChr();
}
}
示例10: Map193_Sram
/*-------------------------------------------------------------------*/
void Map193_Sram( word wAddr, byte byData )
{
switch( wAddr ) {
case 0x6000:
W.PPUBANK[ 0 ] = VROMPAGE( ((byData&0xfc) + 0 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 1 ] = VROMPAGE( ((byData&0xfc) + 1 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 2 ] = VROMPAGE( ((byData&0xfc) + 2 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 3 ] = VROMPAGE( ((byData&0xfc) + 3 ) % ( S.NesHeader.VROMSize << 3 ) );
NESCore_Develop_Character_Data();
break;
case 0x6001:
W.PPUBANK[ 4 ] = VROMPAGE( ( byData + 0 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 5 ] = VROMPAGE( ( byData + 1 ) % ( S.NesHeader.VROMSize << 3 ) );
NESCore_Develop_Character_Data();
break;
case 0x6002:
W.PPUBANK[ 6 ] = VROMPAGE( ( byData + 0 ) % ( S.NesHeader.VROMSize << 3 ) );
W.PPUBANK[ 7 ] = VROMPAGE( ( byData + 1 ) % ( S.NesHeader.VROMSize << 3 ) );
NESCore_Develop_Character_Data();
break;
case 0x6003:
W.ROMBANK0 = ROMPAGE( ((byData<<2) + 0 ) % ( S.NesHeader.ROMSize << 1 ) );
W.ROMBANK1 = ROMPAGE( ((byData<<2) + 1 ) % ( S.NesHeader.ROMSize << 1 ) );
W.ROMBANK2 = ROMPAGE( ((byData<<2) + 2 ) % ( S.NesHeader.ROMSize << 1 ) );
W.ROMBANK3 = ROMPAGE( ((byData<<2) + 3 ) % ( S.NesHeader.ROMSize << 1 ) );
break;
}
}
示例11: Map193_Sram
/*-------------------------------------------------------------------*/
void Map193_Sram( WORD wAddr, BYTE byData )
{
switch( wAddr ) {
case 0x6000:
PPUBANK[ 0 ] = VROMPAGE( ((byData&0xfc) + 0 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 1 ] = VROMPAGE( ((byData&0xfc) + 1 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 2 ] = VROMPAGE( ((byData&0xfc) + 2 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 3 ] = VROMPAGE( ((byData&0xfc) + 3 ) % ( NesHeader.byVRomSize << 3 ) );
InfoNES_SetupChr();
break;
case 0x6001:
PPUBANK[ 4 ] = VROMPAGE( ( byData + 0 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 5 ] = VROMPAGE( ( byData + 1 ) % ( NesHeader.byVRomSize << 3 ) );
InfoNES_SetupChr();
break;
case 0x6002:
PPUBANK[ 6 ] = VROMPAGE( ( byData + 0 ) % ( NesHeader.byVRomSize << 3 ) );
PPUBANK[ 7 ] = VROMPAGE( ( byData + 1 ) % ( NesHeader.byVRomSize << 3 ) );
InfoNES_SetupChr();
break;
case 0x6003:
ROMBANK0 = ROMPAGE( ((byData<<2) + 0 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK1 = ROMPAGE( ((byData<<2) + 1 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK2 = ROMPAGE( ((byData<<2) + 2 ) % ( NesHeader.byRomSize << 1 ) );
ROMBANK3 = ROMPAGE( ((byData<<2) + 3 ) % ( NesHeader.byRomSize << 1 ) );
break;
}
}
示例12: Map70_Write
/*-------------------------------------------------------------------*/
void Map70_Write( WORD wAddr, BYTE byData )
{
BYTE byChrBank = byData & 0x0f;
BYTE byPrgBank = ( byData & 0x70 ) >> 4;
/* Set ROM Banks */
byPrgBank <<= 1;
byPrgBank %= ( NesHeader.byRomSize << 1 );
ROMBANK0 = ROMPAGE( byPrgBank );
ROMBANK1 = ROMPAGE( byPrgBank + 1 );
/* Set PPU Banks */
byChrBank <<= 3;
byChrBank %= ( NesHeader.byVRomSize << 3 );
PPUBANK[ 0 ] = VROMPAGE( byChrBank + 0 );
PPUBANK[ 1 ] = VROMPAGE( byChrBank + 1 );
PPUBANK[ 2 ] = VROMPAGE( byChrBank + 2 );
PPUBANK[ 3 ] = VROMPAGE( byChrBank + 3 );
PPUBANK[ 4 ] = VROMPAGE( byChrBank + 4 );
PPUBANK[ 5 ] = VROMPAGE( byChrBank + 5 );
PPUBANK[ 6 ] = VROMPAGE( byChrBank + 6 );
PPUBANK[ 7 ] = VROMPAGE( byChrBank + 7 );
InfoNES_SetupChr();
/* Name Table Mirroring */
if ( byData & 0x80 )
{
InfoNES_Mirroring( 2 );
} else {
InfoNES_Mirroring( 3 );
}
}
示例13: Map72_Init
void Map72_Init()
{
MapperInit = Map72_Init;
MapperWrite = Map72_Write;
MapperSram = Map0_Sram;
MapperApu = Map0_Apu;
MapperReadApu = Map0_ReadApu;
MapperVSync = Map0_VSync;
MapperHSync = Map0_HSync;
MapperPPU = Map0_PPU;
MapperRenderScreen = Map0_RenderScreen;
/* Set SRAM Banks */
W.SRAMBANK = S.SRAM;
/* Set ROM Banks */
W.ROMBANK0 = ROMPAGE( 0 );
W.ROMBANK1 = ROMPAGE( 1 );
W.ROMBANK2 = ROMLASTPAGE( 1 );
W.ROMBANK3 = ROMLASTPAGE( 0 );
if ( S.NesHeader.VROMSize > 0 )
{
int nPage ;
for (nPage = 0; nPage < 8; ++nPage )
W.PPUBANK[ nPage ] = VROMPAGE( nPage );
NESCore_Develop_Character_Data();
}
}
示例14: Map42_Init
void Map42_Init()
{
MapperInit = Map42_Init;
MapperWrite = Map42_Write;
MapperSram = Map0_Sram;
MapperApu = Map0_Apu;
MapperReadApu = Map0_ReadApu;
MapperVSync = Map0_VSync;
MapperHSync = Map42_HSync;
MapperPPU = Map0_PPU;
/* Callback at Rendering Screen ( 1:BG, 0:Sprite ) */
MapperRenderScreen = Map0_RenderScreen;
W.SRAMBANK = ROMPAGE( 0 );
W.ROMBANK0 = ROMLASTPAGE( 3 );
W.ROMBANK1 = ROMLASTPAGE( 2 );
W.ROMBANK2 = ROMLASTPAGE( 1 );
W.ROMBANK3 = ROMLASTPAGE( 0 );
/* Set PPU Banks */
if ( S.NesHeader.VROMSize > 0 )
{
int nPage ;
for (nPage = 0; nPage < 8; ++nPage )
W.PPUBANK[nPage] = VROMPAGE( nPage );
NESCore_Develop_Character_Data();
}
}
示例15: Map67_Init
/*-------------------------------------------------------------------*/
void Map67_Init()
{
/* Initialize Mapper */
MapperInit = Map67_Init;
/* Write to Mapper */
MapperWrite = Map67_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 = Map67_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 PPU Banks */
PPUBANK[ 0 ] = VROMPAGE( 0 );
PPUBANK[ 1 ] = VROMPAGE( 1 );
PPUBANK[ 2 ] = VROMPAGE( 2 );
PPUBANK[ 3 ] = VROMPAGE( 3 );
PPUBANK[ 4 ] = VROMPAGE( ( NesHeader.byVRomSize << 3 ) - 4 );
PPUBANK[ 5 ] = VROMPAGE( ( NesHeader.byVRomSize << 3 ) - 3 );
PPUBANK[ 6 ] = VROMPAGE( ( NesHeader.byVRomSize << 3 ) - 2 );
PPUBANK[ 7 ] = VROMPAGE( ( NesHeader.byVRomSize << 3 ) - 1 );
InfoNES_SetupChr();
/* Initialize IRQ Registers */
Map67_IRQ_Enable = 0;
Map67_IRQ_Cnt = 0;
Map67_IRQ_Latch = 0;
/* Set up wiring of the interrupt pin */
K6502_Set_Int_Wiring( 1, 1 );
}