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 reset(int revision,int hard) { int i; for(i=8;i<16;i++) mem_setwritefunc(i,write); if(revision == B_KONAMI_VRC6B) { map = vrc6b_map; mem_setwramsize(8); mem_setwram8(0x6,0); } else map = vrc6a_map; prg[0] = 0; prg[1] = (u8)-2; for(i=0;i<8;i++) chr[i] = 0; mirror = 0; irqlatch = 0; irqcounter = 0; irqcontrol = 0; apu_setexternal(&vrc6); sync(); }