Exemplo n.º 1
0
static int CawingjInit()
{
  int nRet=0;
  Cps=1;
  nCpsRomLen =  0x100000;
  nCpsCodeLen=0; // not encrypted
  nCpsGfxLen =4*0x080000;
  nCpsZRomLen=  0x010000;
  nCpsAdLen  =2*0x020000;
  nRet=CpsInit(); if (nRet!=0) return 1;

  // Load program roms
  nRet=BurnLoadRom(CpsRom+0x000001,0,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x000000,1,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x040001,2,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x040000,3,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x080001,4,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x080000,5,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x0c0001,6,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x0c0000,7,2); if (nRet!=0) return 1;

  // Load graphics roms
  CpsLoadTilesByte(CpsGfx, 8);
  CpsLoadTilesByte(CpsGfx+(8*0x020000), 8+8);

  nCpsLcReg=0x4c; // Layer control register is at 0x4c
  CpsLayEn[1]=0x10;
  CpsLayEn[2]=0x0a;
  CpsLayEn[3]=0x0a;

  // Start of Board ID improvments by KEV. 0x40,0x0406
  CpsBID[0]=0x40;
  CpsBID[1]=0x04;
  CpsBID[2]=0x06;

  MaskAddr[0]=0x4a;
  MaskAddr[1]=0x48;
  MaskAddr[2]=0x46;
  MaskAddr[3]=0x44;

  // Load Z80 Rom
  nRet=BurnLoadRom(CpsZRom,24,1);

  // Load ADPCM data
  nRet=BurnLoadRom(CpsAd        ,25,1);
  nRet=BurnLoadRom(CpsAd+0x20000,26,1);


  nRet=CpsRunInit();

  if (nRet!=0) return 1;
  // Ready to go
  return 0;
}
Exemplo n.º 2
0
static int DrvInit()
{
  int nRet=0;
  Cps=1;
  nCpsRomLen=   0x100000;
  nCpsCodeLen=0; // not encrypted
  nCpsGfxLen= 4*0x080000;
  nCpsZRomLen=  0x010000;
  nCpsAdLen  =2*0x020000;
  nRet=CpsInit(); if (nRet!=0) return 1;

  // Load program roms
  nRet=BurnLoadRom(CpsRom+0x000001,0,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x000000,1,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x040001,2,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x040000,3,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x080001,4,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x080000,5,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x0c0001,6,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x0c0000,7,2); if (nRet!=0) return 1;

  // Load graphics roms
  CpsLoadTilesByte(CpsGfx, 8);
  CpsLoadTilesByte(CpsGfx+(8*0x020000), 8+8);

  nCpsLcReg=0x60; // Layer control register is at 0x60
  CpsLayEn[1]=0x20;
  CpsLayEn[2]=0x14;
  CpsLayEn[3]=0x14;

  // Protection enable code by KEV
  CpsMProt[0]=0x00;
  CpsMProt[1]=0x00;
  CpsMProt[2]=0x00;
  CpsMProt[3]=0x00;

  MaskAddr[0]=0x6e;
  MaskAddr[1]=0x6c;
  MaskAddr[2]=0x6a;
  MaskAddr[3]=0x68;

  // Load Z80 Rom
  nRet=BurnLoadRom(CpsZRom,24,1);

  // Load ADPCM data
  nRet=BurnLoadRom(CpsAd        ,25,1);
  nRet=BurnLoadRom(CpsAd+0x20000,26,1);


  nRet=CpsRunInit(); if (nRet!=0) return 1;
  // Ready to go
  return 0;
}
Exemplo n.º 3
0
static int Ffightj1Init()
{
  int nRet=0;
  Cps=1;
  nCpsRomLen=   0x100000;
  nCpsCodeLen=0; // not encrypted
  nCpsGfxLen= 16*0x020000;
  nCpsZRomLen=  0x010000;
  nCpsAdLen  =2*0x020000;
  nRet=CpsInit(); if (nRet!=0) return 1;

  // Load program roms
  nRet=BurnLoadRom(CpsRom+0x000001,0,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x000000,1,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x040001,2,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x040000,3,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x080000,4,1); if (nRet!=0) return 1; // Already byteswapped

  // Load graphics roms
  CpsLoadTilesByte(CpsGfx, 5);
  CpsLoadTilesByte(CpsGfx+(8*0x020000), 5+8);

  nCpsLcReg=0x6c; // Layer control register is at 0x6c
  CpsLayEn[1]=0x02;
  CpsLayEn[2]=0x04;
  CpsLayEn[3]=0x08;

  MaskAddr[0]=0x6a;
  MaskAddr[1]=0x68;
  MaskAddr[2]=0x66;
  MaskAddr[3]=0x64;

  CpsBID[0]=0x60;
  CpsBID[1]=0x00;
  CpsBID[2]=0x02;

  StartScroll[SCROLL_2]=1;
  StartScroll[SCROLL_3]=1;

  // Load Z80 Rom
  nRet=BurnLoadRom(CpsZRom,21,1);

  // Load ADPCM data
  nRet=BurnLoadRom(CpsAd        ,22,1);
  nRet=BurnLoadRom(CpsAd+0x20000,23,1);

  nRet=CpsRunInit(); if (nRet!=0) return 1;
  // Ready to go
  return 0;
}
Exemplo n.º 4
0
static int DrvInit()
{
  int nRet=0;
  Cps=1;
  nCpsRomLen=   0x100000;
  nCpsCodeLen=0; // not encrypted
  nCpsGfxLen= 4*0x080000;
  nCpsZRomLen=  0x010000;
  nCpsAdLen  =2*0x020000;
  nRet=CpsInit(); if (nRet!=0) return 1;

  // Load program roms
  nRet=BurnLoadRom(CpsRom+0x000001,0,2); if (nRet!=0) return 1;
  nRet=BurnLoadRom(CpsRom+0x000000,1,2); if (nRet!=0) return 1;

  // Load graphics roms
  CpsLoadTilesByte(CpsGfx, 2);
  CpsLoadTilesByte(CpsGfx+(8*0x020000), 2+8);

  nCpsLcReg=0x66; // Layer control register is at 0x66
  CpsLayEn[1]=0x02;
  CpsLayEn[2]=0x04;
  CpsLayEn[3]=0x08;

  MaskAddr[0]=0x68;
  MaskAddr[1]=0x6a;
  MaskAddr[2]=0x6c;
  MaskAddr[3]=0x6e;

  // Load Z80 Rom
  nRet=BurnLoadRom(CpsZRom,18,1);

  // Load ADPCM data
  nRet=BurnLoadRom(CpsAd        ,19,1);
  nRet=BurnLoadRom(CpsAd+0x20000,20,1);


  nRet=CpsRunInit(); if (nRet!=0) return 1;
  // Ready to go
  return 0;
}
Exemplo n.º 5
0
static int DrvInit()
{
	int nRet=0;
	Cps=1;
	Ghouls=1;
	nCpsRomLen=  0x100000;
	nCpsGfxLen=  0x300000;
	nCpsZRomLen= 0x010000;
	nRet=CpsInit();
	if (nRet!=0)
	{
		return 1;
	}

	// Load program roms
	nRet=BurnLoadRom(CpsRom+0x000001,0,2);
	if (nRet!=0)
	{
		return 1;
	}
	nRet=BurnLoadRom(CpsRom+0x000000,1,2);
	if (nRet!=0)
	{
		return 1;
	}
	nRet=BurnLoadRom(CpsRom+0x040001,2,2);
	if (nRet!=0)
	{
		return 1;
	}
	nRet=BurnLoadRom(CpsRom+0x040000,3,2);
	if (nRet!=0)
	{
		return 1;
	}
	nRet=BurnLoadRom(CpsRom+0x080000,4,1);
	if (nRet!=0)
	{
		return 1;
	}
	BurnByteswap(CpsRom+0x080000,0x080000);
	// Set dip switches
	SETUP_DIPSW_3(Cpi01A,Cpi01C,Cpi01E,0x00,0x03,0x60);
	// Load graphics roms
	CpsLoadTiles    (CpsGfx         ,  5);
	CpsLoadTilesByte(CpsGfx+0x200000,  9);
	CpsLoadTilesByte(CpsGfx+0x280000, 17);

	MaskAddr[0]=0x68;
	MaskAddr[1]=0x6a;
	MaskAddr[2]=0x6c;
	MaskAddr[3]=0x6e;

	// Load Z80 Rom
	nRet=BurnLoadRom(CpsZRom,25,1);
	


	ConstructDIPSWList();

	nRet=CpsRunInit();
	if (nRet!=0)
	{
		return 1;
	}
	// Ready to go
	return 0;
}
Exemplo n.º 6
0
INT32 CpsLoadTilesKodb(INT32 nStart)
{
	CpsLoadTilesByte(CpsGfx, nStart);

	return 0;
}
Exemplo n.º 7
0
static int QadInit()
{
	int nRet=0;
	Cps=1;
	Qad=1;
	nCpsRomLen=   0x100000;
	nCpsCodeLen=0; // not encrypted
	nCpsGfxLen= 4*0x080000;
	nCpsZRomLen=  0x010000;
	nCpsAdLen  =2*0x020000;
	nRet=CpsInit();
	if (nRet!=0)
	{
		return 1;
	}

	// Load program roms
	nRet=BurnLoadRom(CpsRom+0x000001,0,2);
	if (nRet!=0)
	{
		return 1;
	}
	nRet=BurnLoadRom(CpsRom+0x000000,1,2);
	if (nRet!=0)
	{
		return 1;
	}
	nRet=BurnLoadRom(CpsRom+0x040001,2,2);
	if (nRet!=0)
	{
		return 1;
	}
	nRet=BurnLoadRom(CpsRom+0x040000,3,2);
	if (nRet!=0)
	{
		return 1;
	}
	// Set dip switches
	SETUP_DIPSW_3(Cpi01A,Cpi01C,Cpi01E,0x00,0x03,0x60);
	// Load graphics roms
	CpsLoadTilesByte(CpsGfx, 4);

	nCpsLcReg=0x6c; // Layer control register is at 0x6c
	CpsLayEn[1]=0x14;
	CpsLayEn[2]=0x02;
	CpsLayEn[3]=0x14;

	// Protection enable code by KEV
	CpsMProt[0]=0x00;
	CpsMProt[1]=0x00;
	CpsMProt[2]=0x00;
	CpsMProt[3]=0x00;

	// Load Z80 Rom
	nRet=BurnLoadRom(CpsZRom,12,1);
	nPsndIrqPeriod=(60<<10)/250; //OLDTST
	

	// Load ADPCM data
	nRet=BurnLoadRom(CpsAd        ,13,1);
	nRet=BurnLoadRom(CpsAd+0x20000,14,1);


	ConstructDIPSWList();

	nRet=CpsRunInit();
	if (nRet!=0)
	{
		return 1;
	}
	// Ready to go
	return 0;
}