Ejemplo n.º 1
0
static void MMC5CHRA(void)
{
	int x;
	switch(mmc5vsize&3)
	{
	 case 0:setchr8(CHRBanksA[7]);
		MMC5SPRVROM_BANK8(CHRBanksA[7]);
        	break;
	 case 1:setchr4(0x0000,CHRBanksA[3]);
	        setchr4(0x1000,CHRBanksA[7]);
		MMC5SPRVROM_BANK4(0x0000,CHRBanksA[3]);
                MMC5SPRVROM_BANK4(0x1000,CHRBanksA[7]);
        	break;
 	 case 2:setchr2(0x0000,CHRBanksA[1]);
        	setchr2(0x0800,CHRBanksA[3]);
	        setchr2(0x1000,CHRBanksA[5]);
	        setchr2(0x1800,CHRBanksA[7]);
		MMC5SPRVROM_BANK2(0x0000,CHRBanksA[1]);
                MMC5SPRVROM_BANK2(0x0800,CHRBanksA[3]);
                MMC5SPRVROM_BANK2(0x1000,CHRBanksA[5]);
                MMC5SPRVROM_BANK2(0x1800,CHRBanksA[7]);
        	break;
	 case 3:
	 	for(x=0;x<8;x++)
	        {
	         setchr1(x<<10,CHRBanksA[x]);
	         MMC5SPRVROM_BANK1(x<<10,CHRBanksA[x]);
		}
	        break;
 }
}
Ejemplo n.º 2
0
static DECLFW(Mapper95_write)
{
        switch(A&0xF001)
	{

         case 0x8000:
         cmd = V;
         break;

         case 0x8001:
                switch(cmd&0x07)
		{
                 case 0: DRegs[0]=(V&0x3F)>>1;toot();V>>=1;setchr2(0x0000,V&0x1F);break;
                 case 1: DRegs[1]=(V&0x3F)>>1;toot();V>>=1;setchr2(0x0800,V&0x1F);break;
                 case 2: DRegs[2]=V&0x3F;toot();setchr1(0x1000,V&0x1F); break;
                 case 3: DRegs[3]=V&0x3F;toot();setchr1(0x1400,V&0x1F); break;
                 case 4: DRegs[4]=V&0x3F;toot();setchr1(0x1800,V&0x1F); break;
                 case 5: DRegs[5]=V&0x3F;toot();setchr1(0x1C00,V&0x1F); break;
                 case 6: DRegs[6]=V&0x3F;
                         setprg8(0x8000,V);
                         break;
                 case 7: DRegs[7]=V&0x3F;
                         setprg8(0xA000,V);
                         break;
                }
                break;
	}
}
Ejemplo n.º 3
0
static void UNLYOKOSync(void)
{
  setmirror((mode & 1)^1);
  setchr2(0x0000,reg[3]);
  setchr2(0x0800,reg[4]);
  setchr2(0x1000,reg[5]);
  setchr2(0x1800,reg[6]);
  if(mode & 0x10)
  {
    uint32 base = (bank & 8) << 1;
    setprg8(0x8000,(reg[0]&0x0f)|base);
    setprg8(0xA000,(reg[1]&0x0f)|base);
    setprg8(0xC000,(reg[2]&0x0f)|base);
    setprg8(0xE000,0x0f|base);
  }
  else
  {
    if(mode & 8)
      setprg32(0x8000,bank >> 1);
    else
    {
      setprg16(0x8000,bank);
      setprg16(0xC000,~0);
    }
  }
Ejemplo n.º 4
0
static void Sync(void) {
	setchr2(0x0000, chr_reg[0]);
	setchr2(0x0800, chr_reg[1]);
	setchr2(0x1000, chr_reg[2]);
	setchr2(0x1800, chr_reg[3]);
	setprg8r(0x10, 0x6000, 0);
	setprg16r((PRGptr[1]) ? kogame : 0, 0x8000, prg_reg);
	setprg16(0xC000, ~0);
}
Ejemplo n.º 5
0
static void UNLRT01Power(void) {
	setprg16(0x8000, 0);
	setprg16(0xC000, 0);
	setchr2(0x0000,0);
	setchr2(0x0800,0);
	setchr2(0x1000,0);
	setchr2(0x1800,0);
	SetReadHandler(0x8000, 0xFFFF, UNLRT01Read);
}
Ejemplo n.º 6
0
static void Sync(void)
{
  setprg8(0x8000,pregs[0]);
  setprg8(0xa000,pregs[1]);
  setprg8(0xc000,~1);
  setprg8(0xe000,~0);
  setchr2(0x0000,cregs[0]);
  setchr2(0x0800,cregs[1]);
  setchr2(0x1000,cregs[2]);
  setchr2(0x1800,cregs[3]);
}
Ejemplo n.º 7
0
static void Sync(void)
{
	  int x;
	setchr2(0x0000,DRegs[0]);
  setchr2(0x0800,DRegs[1]);

  for(x=0;x<4;x++)
     setchr1(0x1000+(x<<10),DRegs[2+x]);
  setprg8(0x8000,DRegs[6]);
  setprg8(0xa000,DRegs[7]);
}
Ejemplo n.º 8
0
Archivo: 246.cpp Proyecto: TijmenW/tom7
static void Sync(void) {
	setprg2r(0x10, 0x6800, 0);
	setprg8(0x8000, regs[0]);
	setprg8(0xA000, regs[1]);
	setprg8(0xC000, regs[2]);
	setprg8(0xE000, regs[3]);
	setchr2(0x0000, regs[4]);
	setchr2(0x0800, regs[5]);
	setchr2(0x1000, regs[6]);
	setchr2(0x1800, regs[7]);
}
Ejemplo n.º 9
0
static void Sync(void) {
	setprg8(0x8000, reg_prg[0]);
	setprg8(0xa000, reg_prg[1]);
	setprg8(0xc000, reg_prg[2]);
	setprg8(0xe000, reg_prg[3]);
	setchr2(0x0000, reg_chr[0]);
	setchr2(0x0800, reg_chr[1]);
	setchr2(0x1000, reg_chr[2]);
	setchr2(0x1800, reg_chr[3]);
	setmirror(MI_V);
}
Ejemplo n.º 10
0
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();
}
Ejemplo n.º 11
0
static void Sync(void)
{
//  FCEU_printf("(%02x, %02x)\n",reg[3],reg[4]);
  setprg8(0x8000,reg[0]);
  setprg8(0xA000,reg[1]);
  setprg8(0xC000,reg[2]);
  setprg8(0xE000,~0);
//  setchr2(0x0000,reg[3]);
//  setchr2(0x0800,reg[4]);
//  setchr2(0x1000,reg[5]);
//  setchr2(0x1800,reg[6]);
  setchr2(0x0000,reg[3]);
  setchr2(0x0800,reg[4]);
  setchr2(0x1000,reg[5]);
  setchr2(0x1800,reg[6]);
}
Ejemplo n.º 12
0
static void Sync(void)
{
 int x;
 for(x = 0; x < 4; x++)
 {
  setprg8(0x8000 + x * 8192, PRGBanks[x]);
  setchr2(0x0000 + x * 2048, CHRBanks[x]);
 }
}
Ejemplo n.º 13
0
static void tekvrom(void)
{
 int x;

 switch(tkcom[0]&0x18)
  {
   case 0x00:      // 8KB
           setchr8(chrlow[0]|(chrhigh[0]<<8));
	   break;
   case 0x08:      // 4KB
          for(x=0;x<8;x+=4)
           setchr4(x<<10,chrlow[x]|(chrhigh[x]<<8));
	  break;
   case 0x10:      // 2KB
	  for(x=0;x<8;x+=2)
           setchr2(x<<10,chrlow[x]|(chrhigh[x]<<8));
	  break;
   case 0x18:      // 1KB
	   for(x=0;x<8;x++)
	    setchr1(x<<10,(chrlow[x]|(chrhigh[x]<<8)));
	   break;
 }
}
Ejemplo n.º 14
0
static void DoCHR(void)
{
    int x;
    for(x = 0; x < 4; x++)
        setchr2(x * 2048, CHRBanks[x]);
}