+
+static void DBSync()
+{
+ int x;
+
+ setchr2(0x0000,DRegs[0]);
+ setchr2(0x0800,DRegs[1]);
+
+ for(x=0;x<4;x++)
+ setchr1(0x1000+x*0x400,DRegs[2+x]);
+
+ setprg8(0x8000,DRegs[6]);
+ setprg8(0xa000,DRegs[7]);
+ toot();
+}
+
+static void DBPower(void)
+{
+ memset(DRegs,0x3F,8);
+ DRegs[0]=DRegs[1]=0x1F;
+
+ DBSync();
+
+ setprg8(0xc000,0x3E);
+ setprg8(0xe000,0x3F);
+
+ SetReadHandler(0x8000,0xffff,CartBR);
+ SetWriteHandler(0x8000,0xffff,Mapper95_write);
+}
+
+static void StateRestore(int version)
+{
+ DBSync();