static void sync_34x3() { u8 *reg = namcot108_getregs(); mem_setchr2(0,(reg[0] & 0x3F) >> 1); mem_setchr2(2,(reg[1] & 0x3F) >> 1); mem_setchr1(4,reg[2] | 0x40); mem_setchr1(5,reg[3] | 0x40); mem_setchr1(6,reg[4] | 0x40); mem_setchr1(7,reg[5] | 0x40); mem_setprg8(0x8,reg[6]); mem_setprg8(0xA,reg[7]); mem_setprg16(0xC,0xFF); }
void fme7_sync() { int i; //special case prg page if(prg[0] & 0x40) if(prg[0] & 0x80) mem_setsram8(6,0); else mem_unsetcpu8(6); else mem_setprg8(6,prg[0] & 0x3F); //set prg pages mem_setprg8(0x8,prg[1]); mem_setprg8(0xA,prg[2]); mem_setprg8(0xC,prg[3]); mem_setprg8(0xE,-1); //set chr pages for(i=0;i<8;i++) mem_setchr1(i,chr[i]); switch(mirror) { case 0: ppu_setmirroring(MIRROR_V); break; case 1: ppu_setmirroring(MIRROR_H); break; case 2: ppu_setmirroring(MIRROR_1L); break; case 3: ppu_setmirroring(MIRROR_1H); break; } }
static void sync() { int i; for(i=0;i<4;i++) mem_setprg8(8 + (i * 2),prg[i]); for(i=0;i<8;i++) mem_setchr1(i,chr[i]); ppu_setmirroring(mirror); }
static void sync() { int i; mem_setchr2(0,chr[0]); mem_setchr2(2,chr[1]); for(i=4;i<8;i++) mem_setchr1(i,chr[i - 2]); mem_setprg8(0x8,prg[0]); mem_setprg8(0xA,prg[1]); mem_setprg16(0xC,0xFF); }
static void sync() { int i; mem_setwram8(6,0); mem_setprg8(0x8,prg[0]); mem_setprg8(0xA,prg[1]); mem_setprg8(0xC,prg[2]); mem_setprg8(0xE,0xFF); for(i=0;i<8;i++) mem_setchr1(i,chr[i]); }
static void syncnt() { if((bankmode & 0x20) && (revision == MAPPER90B)) { int i; for(i=0;i<4;i++) { if(bankmode & 0x40) { } else { mem_setchr1(0x8 + i,nt[i] & 1); mem_setchr1(0xC + i,nt[i] & 1); } } } else { switch(mirror & 3) { case 0: ppu_setmirroring(MIRROR_V); break; case 1: ppu_setmirroring(MIRROR_H); break; case 2: ppu_setmirroring(MIRROR_1L); break; case 3: ppu_setmirroring(MIRROR_1H); break; } } }
static void sync() { int i; mem_setprg8(0x8,prg[0]); mem_setprg8(0xA,prg[1]); mem_setprg8(0xC,prg[2]); mem_setprg8(0xE,-1); for(i=0;i<8;i++) mem_setchr1(i,chr[i]); if(mirror & 0x80) ppu_setmirroring(MIRROR_V); else ppu_setmirroring(MIRROR_H); }
static void sync() { int i; mem_setprg16(0x8,prg[0]); mem_setprg8(0xC,prg[1]); mem_setprg8(0xE,0xFF); for(i=0;i<8;i++) mem_setchr1(i,chr[i]); switch(mirror & 0xC) { case 0x0: mem_setmirroring(MIRROR_V); break; case 0x4: mem_setmirroring(MIRROR_H); break; case 0x8: mem_setmirroring(MIRROR_1L); break; case 0xC: mem_setmirroring(MIRROR_1H); break; } }
static void sync() { int i; u8 chrxor = (control & 0x80) >> 5; if((control & 0x40) == 0) { mem_setprg8(0x8,prg[0]); mem_setprg8(0xA,prg[1]); mem_setprg8(0xC,prg[2]); } else { mem_setprg8(0xA,prg[0]); mem_setprg8(0xC,prg[1]); mem_setprg8(0x8,prg[2]); } mem_setprg8(0xE,-1); for(i=0;i<8;i++) mem_setchr1(i ^ chrxor,chr[i]); if((control & 0x80) == 0) { mem_setchr2(0 ^ chrxor,chr[0] >> 1); mem_setchr2(2 ^ chrxor,chr[2] >> 1); }
static void syncchr() { u8 bank; if(chrcontrol & 0x20) { switch(bankmode & 0x18) { case 0x00: bank = chrlo[0] | (chrhi[0] << 8); mem_setchr1(0,bank + 0); mem_setchr1(1,bank + 1); mem_setchr1(2,bank + 2); mem_setchr1(3,bank + 3); mem_setchr1(4,bank + 4); mem_setchr1(5,bank + 5); mem_setchr1(6,bank + 6); mem_setchr1(7,bank + 7); break; case 0x08: bank = chrlo[0] | (chrhi[0] << 8); mem_setchr1(0,bank + 0); mem_setchr1(1,bank + 1); mem_setchr1(2,bank + 2); mem_setchr1(3,bank + 3); bank = chrlo[4] | (chrhi[4] << 8); mem_setchr1(4,bank + 0); mem_setchr1(5,bank + 1); mem_setchr1(6,bank + 2); mem_setchr1(7,bank + 3); break; case 0x10: bank = chrlo[0] | (chrhi[0] << 8); mem_setchr1(0,bank + 0); mem_setchr1(1,bank + 1); bank = chrlo[2] | (chrhi[2] << 8); mem_setchr1(2,bank + 0); mem_setchr1(3,bank + 1); bank = chrlo[4] | (chrhi[4] << 8); mem_setchr1(4,bank + 0); mem_setchr1(5,bank + 1); bank = chrlo[6] | (chrhi[6] << 8); mem_setchr1(6,bank + 0); mem_setchr1(7,bank + 1); break; case 0x18: mem_setchr1(0,chrlo[0] | (chrhi[0] << 8)); mem_setchr1(1,chrlo[1] | (chrhi[1] << 8)); mem_setchr1(2,chrlo[2] | (chrhi[2] << 8)); mem_setchr1(3,chrlo[3] | (chrhi[3] << 8)); mem_setchr1(4,chrlo[4] | (chrhi[4] << 8)); mem_setchr1(5,chrlo[5] | (chrhi[5] << 8)); mem_setchr1(6,chrlo[6] | (chrhi[6] << 8)); mem_setchr1(7,chrlo[7] | (chrhi[7] << 8)); break; } } else { switch(bankmode & 0x18) { case 0x00: bank = chrlo[0] | ((chrcontrol & 0x1F) << 8); mem_setchr1(0,bank + 0); mem_setchr1(1,bank + 1); mem_setchr1(2,bank + 2); mem_setchr1(3,bank + 3); mem_setchr1(4,bank + 4); mem_setchr1(5,bank + 5); mem_setchr1(6,bank + 6); mem_setchr1(7,bank + 7); break; case 0x08: bank = chrlo[0] | ((chrcontrol & 0x1F) << 8); mem_setchr1(0,bank + 0); mem_setchr1(1,bank + 1); mem_setchr1(2,bank + 2); mem_setchr1(3,bank + 3); bank = chrlo[4] | ((chrcontrol & 0x1F) << 8); mem_setchr1(4,bank + 0); mem_setchr1(5,bank + 1); mem_setchr1(6,bank + 2); mem_setchr1(7,bank + 3); break; case 0x10: bank = chrlo[0] | ((chrcontrol & 0x1F) << 8); mem_setchr1(0,bank + 0); mem_setchr1(1,bank + 1); if((chrcontrol & 0x80) == 0) bank = chrlo[2] | ((chrcontrol & 0x1F) << 8); mem_setchr1(2,bank + 0); mem_setchr1(3,bank + 1); bank = chrlo[4] | ((chrcontrol & 0x1F) << 8); mem_setchr1(4,bank + 0); mem_setchr1(5,bank + 1); bank = chrlo[6] | ((chrcontrol & 0x1F) << 8); mem_setchr1(6,bank + 0); mem_setchr1(7,bank + 1); break; case 0x18: mem_setchr1(0,chrlo[0] | ((chrcontrol & 0x1F) << 8)); mem_setchr1(1,chrlo[1] | ((chrcontrol & 0x1F) << 8)); if((chrcontrol & 0x80) == 0) { mem_setchr1(2,chrlo[2] | ((chrcontrol & 0x1F) << 8)); mem_setchr1(3,chrlo[3] | ((chrcontrol & 0x1F) << 8)); } else { mem_setchr1(2,chrlo[0] | ((chrcontrol & 0x1F) << 8)); mem_setchr1(3,chrlo[1] | ((chrcontrol & 0x1F) << 8)); } mem_setchr1(4,chrlo[4] | ((chrcontrol & 0x1F) << 8)); mem_setchr1(5,chrlo[5] | ((chrcontrol & 0x1F) << 8)); mem_setchr1(6,chrlo[6] | ((chrcontrol & 0x1F) << 8)); mem_setchr1(7,chrlo[7] | ((chrcontrol & 0x1F) << 8)); break; } } }