Esempio n. 1
0
static int LoadRoms()
{
	int nRet=0;
	// Load program roms and byteswap
	nRet = BurnLoadRom(Rom + 0x00001, 0, 2); if (nRet != 0) return 1;
	nRet = BurnLoadRom(Rom + 0x00000, 1, 2); if (nRet != 0) return 1;
	nRet = BurnLoadRom(Rom + 0x40001, 2, 2); if (nRet != 0) return 1;
	nRet = BurnLoadRom(Rom + 0x40000, 3, 2); if (nRet != 0) return 1;

	nRet = BurnLoadRom(z80_rom, 4, 1); // load z80 code rom

	ttiles = (unsigned char *)malloc(0x400000);
	memset(ttiles, 0, 16384 * 256);

	SysxTempGfx = (unsigned char *)malloc(0x200000);

	nRet = BurnLoadRom(SysxTempGfx + 0x000000, 5, 1);
	nRet = BurnLoadRom(SysxTempGfx + 0x080000, 6, 1);
	nRet = BurnLoadRom(SysxTempGfx + 0x100000, 7, 1);
	nRet = BurnLoadRom(SysxTempGfx + 0x180000, 8, 1);

	nRet = BurnLoadRom(SupermanYM2610Rom, 9, 1);

	return nRet;
}
Esempio n. 2
0
// This function decodes the tile data for the GP9001 chip in place.
int ToaLoadTiles(unsigned char* pDest, int nStart, int nROMSize)
{
	unsigned char* pTile;
	int nSwap = 3;

	BurnLoadRom(pDest + 3, nStart + 0, 4);
	BurnLoadRom(pDest + 1, nStart + 1, 4);
	BurnLoadRom(pDest + 2, nStart + 2, 4);
	BurnLoadRom(pDest + 0, nStart + 3, 4);

	for (pTile = pDest; pTile < (pDest + nROMSize); pTile += 4) {
		unsigned char data[4];
		for (int n = 0; n < 4; n++) {
			int m = 7 - (n << 1);
			unsigned char nPixels = ((pTile[0 ^ nSwap] >> m) & 1) << 0;
			nPixels |= ((pTile[2 ^ nSwap] >> m) & 1) << 1;
			nPixels |= ((pTile[1 ^ nSwap] >> m) & 1) << 2;
			nPixels |= ((pTile[3 ^ nSwap] >> m) & 1) << 3;
			nPixels |= ((pTile[0 ^ nSwap] >> (m - 1)) & 1) << 4;
			nPixels |= ((pTile[2 ^ nSwap] >> (m - 1)) & 1) << 5;
			nPixels |= ((pTile[1 ^ nSwap] >> (m - 1)) & 1) << 6;
			nPixels |= ((pTile[3 ^ nSwap] >> (m - 1)) & 1) << 7;

			data[n] = nPixels;
		}

		for (int n = 0; n < 4; n++) {
			pTile[n] = data[n];
		}
	}
	return 0;
}
Esempio n. 3
0
void init_dec0_aud(int romNumPrg, int romNumSamples)
{
	Ram = (unsigned char*) malloc(0x0600);
	Rom = (unsigned char*) malloc(0x8000);
	
	memset(Ram,0x00, sizeof(Ram));

	MSM6295ROM = (unsigned char*) malloc(0x10000);

	BurnLoadRom(Rom, romNumPrg,1 );
	BurnLoadRom(MSM6295ROM,romNumSamples,1);

	m6502Init(1);
	m6502Open(0);

	m6502MapMemory(Ram, 0x0000, 0x05ff, M6502_RAM); // Ram

	m6502MapMemory(Rom, 0x8000, 0xffff, M6502_ROM); // Rom


	m6502SetReadHandler(dec0_aud_read_byte);
	m6502SetWriteHandler(dec0_aud_write_byte);
	m6502Close();

	BurnYM3812Init(3000000, &dec0YMxxxxIrqHandler, &dec0SynchroniseStream, 1);

	BurnYM2203Init(1, 1500000, &dec0YMxxxxIrqHandler, dec0SynchroniseStream, DrvGetTime, 0);

	// Setup the OKIM6295 emulation
	MSM6295Init(0, 1023924/132, 30.0, 1);
	BurnTimerAttachSek(10000000);
}
Esempio n. 4
0
static INT32 DrvInit()
{
	GenericTilesInit();

	AllMem = NULL;
	MemIndex();
	INT32 nLen = MemEnd - (UINT8 *)0;
	if ((AllMem = (UINT8 *)BurnMalloc(nLen)) == NULL) return 1;
	memset(AllMem, 0, nLen);
	MemIndex();

	{
		if (BurnLoadRom(Drv68KROM  + 0x000000,  0, 1)) return 1;
		if (BurnLoadRom(Drv68KROM  + 0x080000,  1, 1)) return 1;

		if (BurnLoadRom(DrvGfxROM  + 0x000000,  2, 2)) return 1;
		if (BurnLoadRom(DrvGfxROM  + 0x000001,  3, 2)) return 1;
		if (BurnLoadRom(DrvGfxROM  + 0x100000,  4, 2)) return 1;
		if (BurnLoadRom(DrvGfxROM  + 0x100001,  5, 2)) return 1;

		if (BurnLoadRom(YMZ280BROM + 0x000000,  6, 1)) return 1;
		if (BurnLoadRom(YMZ280BROM + 0x080000,  7, 1)) return 1;
		if (BurnLoadRom(YMZ280BROM + 0x100000,  8, 1)) return 1;
		if (BurnLoadRom(YMZ280BROM + 0x180000,  9, 1)) return 1;

		DrvGfxDecode();
	}

	SekInit(0, 0x68000);
	SekOpen(0);
	SekMapMemory(Drv68KROM,		0x000000, 0x0fffff, MAP_ROM);
	SekMapMemory(Drv68KRAM,		0x400000, 0x407fff, MAP_RAM);
	SekMapMemory(DrvPalRAM,		0xb00000, 0xb03fff, MAP_RAM);
	SekMapMemory(DrvPalRAM,		0xb04000, 0xb047ff, MAP_ROM);
	SekSetWriteWordHandler(0,	bishi_write_word);
	SekSetWriteByteHandler(0,	bishi_write_byte);
	SekSetReadWordHandler(0,	bishi_read_word);
	SekSetReadByteHandler(0,	bishi_read_byte);
	SekClose();

	K055555Init();
	K054338Init();

	K056832Init(DrvGfxROM, DrvGfxROMExp, 0x200000, bishi_tile_callback);
	K056832SetGlobalOffsets(29, 16);
	K056832SetLayerOffsets(0, -2, 0);
	K056832SetLayerOffsets(1,  2, 0);
	K056832SetLayerOffsets(2,  4, 0);
	K056832SetLayerOffsets(3,  6, 0);
	K056832SetLayerAssociation(0);

	YMZ280BInit(16934400, bishi_sound_irq);
	YMZ280BSetRoute(BURN_SND_YMZ280B_YMZ280B_ROUTE_1, 1.00, BURN_SND_ROUTE_LEFT);
	YMZ280BSetRoute(BURN_SND_YMZ280B_YMZ280B_ROUTE_2, 1.00, BURN_SND_ROUTE_RIGHT);

	DrvDoReset();

	return 0;
}
Esempio n. 5
0
static int DrvInit()
{
	int nRet=0;
	int i=0;
	unsigned char *pqs=NULL;

	Cps=2;
	nCpsRomLen=  4*0x080000;
	nCpsCodeLen= 2*0x080000;
	nCpsGfxLen=   0x1000000;
	nCpsZRomLen= 1*0x020000;
	nCpsQSamLen= 2*0x200000;
	nRet=CpsInit();
	if (nRet!=0)
	{
		return 1;
	}

	for (i=0; i<4; i++)
	{
		nRet=BurnLoadRom(CpsRom+0x080000*i,2+i,1);
		if (nRet!=0)
		{
			return 1;
		}
	}

	memcpy(CpsCode,CpsRom,nCpsCodeLen);
	for (i=0; i<2; i++)
	{
		nRet=BurnXorRom(CpsCode+0x080000*i,0+i,1);
		if (nRet!=0)
		{
			return 1;
		}
	}

	nRet=Cps2LoadTiles(CpsGfx          ,6);
	nRet=Cps2LoadTiles(CpsGfx+0x0800000,10);

	nRet=BurnLoadRom(CpsZRom,14,1);

	pqs=(unsigned char *)CpsQSam;
	nRet=BurnLoadRom(pqs         ,15,1);
	nRet=BurnLoadRom(pqs+0x200000,16,1);
	BurnByteswap(pqs,nCpsQSamLen);
	





	nRet=CpsRunInit();
	if (nRet!=0)
	{
		return 1;
	}
	return 0;
}
Esempio n. 6
0
static int DrvInit()
{
	int nLen;

//	bToaRotateScreen = true;

	BurnSetRefreshRate(REFRESHRATE);

	nBCU2ROMSize = 0x080000;
	nFCU2ROMSize = 0x080000;

	// Find out how much memory is needed
	AllMem = NULL;
	MemIndex();
	nLen = MemEnd - (unsigned char *)0;
	if ((AllMem = (unsigned char *)malloc(nLen)) == NULL) {
		return 1;
	}
	memset(AllMem, 0, nLen);
	MemIndex();

	if (BurnLoadRom(Drv68KROM + 0x000001, 0, 2)) return 1;
	if (BurnLoadRom(Drv68KROM + 0x000000, 1, 2)) return 1;
	if (BurnLoadRom(Drv68KROM + 0x040001, 2, 2)) return 1;
	if (BurnLoadRom(Drv68KROM + 0x040000, 3, 2)) return 1;

	ToaLoadTiles(BCU2ROM, 4, nBCU2ROMSize);
	ToaLoadTiles(FCU2ROM, 8, nFCU2ROMSize);

	{
		SekInit(0, 0x68000);
		SekOpen(0);
		SekMapMemory(Drv68KROM,			0x000000, 0x07FFFF, SM_ROM);
		SekMapMemory(Drv68KRAM,			0x0c0000, 0x0c3FFF, SM_RAM);
		SekMapMemory(DrvPalRAM,			0x104000, 0x1047FF, SM_RAM);
		SekMapMemory(DrvPalRAM2,		0x106000, 0x1067FF, SM_RAM);
		SekSetReadWordHandler(0, 		samesameReadWord);
		SekSetReadByteHandler(0, 		samesameReadByte);
		SekSetWriteWordHandler(0, 		samesameWriteWord);
		SekSetWriteByteHandler(0, 		samesameWriteByte);
		SekClose();
	}

	ToaInitBCU2();

	nToaPalLen = nColCount;
	ToaPalSrc = DrvPalRAM;
	ToaPalSrc2 = DrvPalRAM2;
	ToaPalInit();

//	BurnYM3812Init(28000000 / 8, &toaplan1FMIRQHandler, &toaplan1SynchroniseStream, 0);

	bDrawScreen = true;

	DrvDoReset();
	return 0;
}
Esempio n. 7
0
static int DinohInit()
{
  int nRet=0; unsigned char *pqs=NULL;
  Cps=1; Cps1Qs=1; Cps1QsHack=1;
  nCpsRomLen= 4*0x080000;
  nCpsCodeLen=0; // not encrypted
  nCpsGfxLen= 8*0x080000;
  nCpsZRomLen= 2*0x020000;
  nCpsQSamLen= 4*0x080000;
  nRet=CpsInit(); if (nRet!=0) return 1;

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

  // Patch Q-Sound Test
  CpsRom[0xaacf5]=0x4e;
  CpsRom[0xaacf4]=0x71;

  // Load graphics roms
  CpsLoadTiles(CpsGfx         , 4);
  CpsLoadTiles(CpsGfx+0x200000, 8);

  nCpsLcReg=0x66;
  CpsLayEn[1]=0x02;
  CpsLayEn[2]=0x04;
  CpsLayEn[3]=0x08;

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

  // Board ID improvments by KEV. 0x00,0x0000
  CpsBID[0]=0x00;
  CpsBID[1]=0x00;
  CpsBID[2]=0x00;

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

  nRet=BurnLoadRom(CpsZRom,12,1);
  dino_decode();

  pqs=(unsigned char *)CpsQSam;
  nRet=BurnLoadRom(pqs         ,13,1);
  nRet=BurnLoadRom(pqs+0x080000,14,1);
  nRet=BurnLoadRom(pqs+0x100000,15,1);
  nRet=BurnLoadRom(pqs+0x180000,16,1);


  nRet=CpsRunInit(); if (nRet!=0) return 1;
  // Ready to go
  return 0;
}
Esempio n. 8
0
static INT32 LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01, 0, 1);

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 2, nGP9001ROMSize[0]);

	if (BurnLoadRom(RomSnd + 0x040000, 3, 1)) return 1;
	if (BurnLoadRom(RomSnd + 0x100000, 4, 1)) return 1;

	return 0;
}
Esempio n. 9
0
static int LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01, 0, 1);

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 4, nGP9001ROMSize[0]);

	// Load MSM6295 ADPCM data
	BurnLoadRom(MSM6295ROM, 5, 1);

	return 0;
}
Esempio n. 10
0
static INT32 LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01, 0, 1);

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 4, nGP9001ROMSize[0]);

	BurnLoadRom(Rom02, 5, 1);
	BurnLoadRom(MSM6295ROM, 6, 1);

	return 0;
}
Esempio n. 11
0
static int LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01, 0, 1);

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 2, nGP9001ROMSize[0], true);
	ToaLoadGP9001Tiles(GP9001ROM[1], 3, 2, nGP9001ROMSize[1], true);

	BurnLoadRom(MSM6295ROM, 5, 1);

	return 0;
}
Esempio n. 12
0
static int DrvInit()
{
	Mem = (unsigned char*)malloc(0x10000 + 0x10000 + 0x400 + 0x20);
	if (Mem == NULL) {
		return 1;
	}

	pFMBuffer = (short *)malloc (nBurnSoundLen * 3 * sizeof(short));
	if (pFMBuffer == NULL) {
		return 1;
	}

	memset (Mem, 0, 0x20420);

	Rom = Mem + 0x00000;
	Gfx = Mem + 0x10000;
	BankRam = Mem + 0x20000;
	Palette = (int *)(Mem + 0x20400);

	{
		BurnLoadRom(Rom + 0x5000, 0, 1);
		BurnLoadRom(Rom + 0x6000, 1, 1);
		BurnLoadRom(Rom + 0x7000, 2, 1);

		BurnLoadRom(Gfx + 0x0000, 3, 1);
		BurnLoadRom(Gfx + 0x1000, 4, 1);
		BurnLoadRom(Gfx + 0x2000, 5, 1);
		BurnLoadRom(Gfx + 0x3000, 6, 1);
		BurnLoadRom(Gfx + 0x4000, 7, 1);
		BurnLoadRom(Gfx + 0x5000, 8, 1);
	}

	mole_gfx_convert();
	mole_palette_init();

	m6502Init(1);
	m6502Open(0);
	m6502MapMemory(Rom + 0x0000, 0x0000, 0x03ff, M6502_RAM); // Ram

	m6502MapMemory(Rom + 0x5000, 0x5000, 0x7fff, M6502_ROM); // Rom
	m6502MapMemory(Rom + 0x5000, 0xd000, 0xffff, M6502_ROM); // Rom Mirror

	m6502SetReadHandler(mole_read_byte);
	m6502SetWriteHandler(mole_write_byte);
	m6502Close();

	pAY8910Buffer[0] = pFMBuffer + nBurnSoundLen * 0;
	pAY8910Buffer[1] = pFMBuffer + nBurnSoundLen * 1;
	pAY8910Buffer[2] = pFMBuffer + nBurnSoundLen * 2;

	AY8910Init(0, 2000000, nBurnSoundRate, NULL, NULL, NULL, NULL);

	DrvDoReset();

	return 0;
}
Esempio n. 13
0
static int s1945iiInit()
{
	int nRet;
	
	Mem = NULL;
	MemIndex();
	int nLen = MemEnd - (unsigned char *)0;
	if ((Mem = (unsigned char *)malloc(nLen)) == NULL) return 1;
	memset(Mem, 0, nLen);										// blank all memory
	MemIndex();	
	
	nRet = BurnLoadRom(RomSH2 + 0x000000, 0, 2); if (nRet != 0) return 1;
	nRet = BurnLoadRom(RomSH2 + 0x000001, 1, 2); if (nRet != 0) return 1;
	be_to_le( RomSH2, 0x100000 );

#if 0
FILE * f = fopen("d.bin", "wb+");	
fwrite(RomSH2, 1, 0x100000, f);
fclose(f);
#endif
	

	{
		Sh2Init(1);
	    Sh2Open(0);

		// Map 68000 memory:
		Sh2MapMemory(RomSH2,		0x00000000, 0x000fffff, SM_ROM);
		Sh2MapMemory(RamSpr,		0x03000000, 0x0300ffff, SM_RAM);
		Sh2MapMemory((unsigned char *) RamPal,		
									0x03040000, 0x03044fff, SM_RAM);
		Sh2MapMemory(RamVReg,		0x03050000, 0x0305ffff, SM_WRITE);
		Sh2MapMemory(RamSH2,		0x06000000, 0x060fffff, SM_RAM);
	

		Sh2SetReadByteHandler (0, ps3v1ReadByte);
		Sh2SetReadWordHandler (0, ps3v1ReadWord);
		Sh2SetReadLongHandler (0, ps3v1ReadLong);
		Sh2SetWriteByteHandler(0, ps3v1WriteByte);
		Sh2SetWriteWordHandler(0, ps3v1WriteWord);
		Sh2SetWriteLongHandler(0, ps3v1WriteLong);

	}


	DrvDoReset();
	
	return 0;
}
Esempio n. 14
0
// Allocate space and load up a rom
static int LoadUp(unsigned char** pRom, int* pnRomLen, int nNum)
{
	unsigned char *Rom;
	struct BurnRomInfo ri;

	ri.nLen = 0;
	BurnDrvGetRomInfo(&ri, nNum);	// Find out how big the rom is
	if (ri.nLen <= 0) {
		return 1;
	}

	// Load the rom
	Rom = (unsigned char*)malloc(ri.nLen);
	if (Rom == NULL) {
		return 1;
	}

	if (BurnLoadRom(Rom,nNum,1)) {
		free(Rom);
		return 1;
	}

	// Success
	*pRom = Rom; *pnRomLen = ri.nLen;
	return 0;
}
Esempio n. 15
0
// Allocate space and load up a rom
static INT32 LoadUp(UINT8** pRom, INT32* pnRomLen, INT32 nNum)
{
	UINT8 *Rom;
	struct BurnRomInfo ri;

	ri.nLen = 0;
	BurnDrvGetRomInfo(&ri, nNum);	// Find out how big the rom is
	if (ri.nLen <= 0) {
		return 1;
	}

	// Load the rom
	Rom = (UINT8*)BurnMalloc(ri.nLen);
	if (Rom == NULL) {
		return 1;
	}

	if (BurnLoadRom(Rom,nNum,1)) {
		BurnFree(Rom);
		return 1;
	}

	// Success
	*pRom = Rom; *pnRomLen = ri.nLen;
	return 0;
}
Esempio n. 16
0
static int LoadUpSplit(unsigned char** pRom, int* pnRomLen, int nNum)
{
	unsigned char *Rom;
	struct BurnRomInfo ri;
	unsigned int nRomSize[4], nTotalRomSize;
	int i;

	ri.nLen = 0;
	for (i = 0; i < 4; i++) {
		BurnDrvGetRomInfo(&ri, nNum + i);
		nRomSize[i] = ri.nLen;
	}
	
	nTotalRomSize = nRomSize[0] + nRomSize[1] + nRomSize[2] + nRomSize[3];
	if (!nTotalRomSize) return 1;

	Rom = (unsigned char*)malloc(nTotalRomSize);
	if (Rom == NULL) return 1;
	
	int Offset = 0;
	for (i = 0; i < 4; i++) {
		if (i > 0) Offset += nRomSize[i - 1];
		if (BurnLoadRom(Rom + Offset, nNum + i, 1)) {
			free(Rom);
			return 1;
		}
	}

	*pRom = Rom;
	*pnRomLen = nTotalRomSize;
	
	return 0;
}
Esempio n. 17
0
static INT32 LoadUpSplit(UINT8** pRom, INT32* pnRomLen, INT32 nNum, INT32 nNumRomsGroup)
{
	UINT8 *Rom;
	struct BurnRomInfo ri;
	UINT32 nRomSize[8], nTotalRomSize = 0;
	INT32 i;

	ri.nLen = 0;
	for (i = 0; i < nNumRomsGroup; i++) {
		BurnDrvGetRomInfo(&ri, nNum + i);
		nRomSize[i] = ri.nLen;
	}
	
	for (i = 0; i < nNumRomsGroup; i++) {
		nTotalRomSize += nRomSize[i];
	}
	if (!nTotalRomSize) return 1;

	Rom = (UINT8*)BurnMalloc(nTotalRomSize);
	if (Rom == NULL) return 1;
	
	INT32 Offset = 0;
	for (i = 0; i < nNumRomsGroup; i++) {
		if (i > 0) Offset += nRomSize[i - 1];
		if (BurnLoadRom(Rom + Offset, nNum + i, 1)) {
			BurnFree(Rom);
			return 1;
		}
	}

	*pRom = Rom;
	*pnRomLen = nTotalRomSize;
	
	return 0;
}
Esempio n. 18
0
static INT32 LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01 + 0, 0, 1);

	BurnLoadRom(CaveSpriteROM + 0x0000000, 1, 1);
	BurnLoadRom(CaveSpriteROM + 0x0100000, 2, 1);
	NibbleSwap1(CaveSpriteROM + 0x0000000, 0x180000);

	BurnLoadRom(CaveTileROM[0] + 0x000000, 3, 1);
	NibbleSwap2(CaveTileROM[0], 0x100000);

	// Load YMZ280B data
	BurnLoadRom(YMZ280BROM, 4, 1);

	return 0;
}
Esempio n. 19
0
static int DrvInit()
{
  int nRet=0; unsigned char *pqs=NULL;
  Cps=1; Cps1Qs=1;
  nCpsRomLen= 3*0x080000;
  nCpsCodeLen=0; // not encrypted
  nCpsGfxLen= 8*0x080000;
  nCpsZRomLen= 2*0x020000;
  nCpsQSamLen= 4*0x080000;
  nRet=CpsInit(); if (nRet!=0) return 1;

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

  // Load graphics roms
  CpsLoadTiles(CpsGfx         , 3);
  CpsLoadTiles(CpsGfx+0x200000, 7);

  nCpsLcReg=0x4a; // Layer control register is at 0x4a
  CpsLayEn[1]=0x16;
  CpsLayEn[2]=0x16;
  CpsLayEn[3]=0x16;

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

  // Board ID improvments by KEV. 0x00,0x0000
  CpsBID[0]=0x00;
  CpsBID[1]=0x00;
  CpsBID[2]=0x00;

  MaskAddr[0]=0x4c;
  MaskAddr[1]=0x4e;
  MaskAddr[2]=0x40;
  MaskAddr[3]=0x42;

  nRet=BurnLoadRom(CpsZRom,11,1);
  dino_decode();

  pqs=(unsigned char *)CpsQSam;
  nRet=BurnLoadRom(pqs         ,12,1);
  nRet=BurnLoadRom(pqs+0x080000,13,1);
  nRet=BurnLoadRom(pqs+0x100000,14,1);
  nRet=BurnLoadRom(pqs+0x180000,15,1);


  nRet=CpsRunInit(); if (nRet!=0) return 1;
  // Ready to go
  return 0;
}
Esempio n. 20
0
static INT32 LoadRoms()
{
    // Load 68000 ROM
    ToaLoadCode(Rom01, 0, 2);
    BurnLoadRom(Rom01 + 0x40001, 2, 2);
    BurnLoadRom(Rom01 + 0x40000, 3, 2);

    // Load BCU-2 tile data
    ToaLoadTiles(BCU2ROM, 4, nBCU2ROMSize);

    // Load FCU-2 tile data
    ToaLoadTiles(FCU2ROM, 8, nFCU2ROMSize);

    // Load the Z80 ROM
    BurnLoadRom(RomZ80, 12, 1);

    return 0;
}
Esempio n. 21
0
static int DrvInit()
{
    int nRet=0;
    int i=0;
    Cps=3;
    nCpsRomLen= 4*0x080000;
    nCpsCodeLen=0; // not encrypted
    nCpsGfxLen=16*0x080000;
    nCpsZRomLen=  0x010000;
    nCpsAdLen  =2*0x020000;
    nRet=CpsInit();
    if (nRet!=0) return 1;

    // Load program roms (they are already byteswapped)
    for (i=0; i<4; i++)
    {
        nRet=BurnLoadRom(CpsRom+0x080000*i,0+i,1);
        if (nRet!=0) return 1;
    }

    // Load graphics roms
    for (i=0; i<4; i++)
    {
        // Load up and interleve each set of 4 roms to make the 16x16 tiles
        CpsLoadTiles(CpsGfx+0x200000*i,4+i*4);
    }

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

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

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

    nRet=CpsRunInit();
    if (nRet!=0) return 1;
    // Ready to go
    return 0;
}
Esempio n. 22
0
static INT32 LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01, 0, 1);

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 2, nGP9001ROMSize[0]);

	// Load Extra text layer tile data
	BurnLoadRom(ExtraTROM, 3, 1);

	// Load the Z80 ROM
	BurnLoadRom(RomZ80, 4, 1);

	// Load MSM6295 ADPCM data
	BurnLoadRom(MSM6295ROM, 5, 1);

	return 0;
}
Esempio n. 23
0
static INT32 LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01, 0, 1);

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 2, nGP9001ROMSize[0]);

	return 0;
}
Esempio n. 24
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+0x080000,4,1); if (nRet!=0) return 1; // Already byteswapped

   // Load graphics roms
   CpsLoadTiles(CpsGfx,5);

   //-----------------------------------------------------
   nCpsLcReg =0x52;
   CpsLayEn[1]=0x08;
   CpsLayEn[2]=0x30;
   CpsLayEn[3]=0x30;

   //-----------------------------------------------------
   CpsBID[0]=0x5e;
   CpsBID[1]=0x04;
   CpsBID[2]=0x04;
   //-----------------------------------------------------

   MaskAddr[0]=0x54;
   MaskAddr[1]=0x56;
   MaskAddr[2]=0x58;
   MaskAddr[3]=0x5a;

   EndScroll[SCROLL_2]=0x3fff;
   StartScroll[SCROLL_3]=0x0e00;

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

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


   nRet=CpsRunInit(); if (nRet!=0) return 1;
   // Ready to go
   return 0;
}
Esempio n. 25
0
static int SoldividLoadCallback()
{
	if (BurnLoadRom(DrvSh2ROM  + 0x0000001,  0, 2)) return 1;
	if (BurnLoadRom(DrvSh2ROM  + 0x0000000,  1, 2)) return 1;

	if (BurnLoadRom(pPsikyoshTiles + 0x2000000 - 0x2000000,  2, 2)) return 1;
	if (BurnLoadRom(pPsikyoshTiles + 0x2000001 - 0x2000000,  3, 2)) return 1;
	if (BurnLoadRom(pPsikyoshTiles + 0x2800000 - 0x2000000,  4, 2)) return 1;
	if (BurnLoadRom(pPsikyoshTiles + 0x2800001 - 0x2000000,  5, 2)) return 1;
	if (BurnLoadRom(pPsikyoshTiles + 0x3000000 - 0x2000000,  6, 2)) return 1;
	if (BurnLoadRom(pPsikyoshTiles + 0x3000001 - 0x2000000,  7, 2)) return 1;

	if (BurnLoadRom(DrvSndROM  + 0x0000000,  8, 1)) return 1;

	return 0;
}
Esempio n. 26
0
static int LoadRoms()
{
	// Load 68000 ROM
	BurnLoadRom(Rom01, 0, 1);

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 4, nGP9001ROMSize[0]);
	ToaLoadGP9001Tiles(GP9001ROM[1], 5, 2, nGP9001ROMSize[1]);

	return 0;
}
Esempio n. 27
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;
}
Esempio n. 28
0
static INT32 LoadRoms()
{
	// Load 68000 ROMs
	if (ToaLoadCode(Rom01, 0, 4)) {
		return 1;
	}
    
	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 4, 4, nGP9001ROMSize[0]);
    
	// Load the Z80 ROM
	if (BurnLoadRom(RomZ80, 8, 1)) {
		return 1;
	}
    
	// Load MSM6295 ADPCM data
	BurnLoadRom(MSM6295ROM + 0x000000, 9, 1);
	BurnLoadRom(MSM6295ROM + 0x100000, 10, 1);
    
	return 0;
}
Esempio n. 29
0
static INT32 LoadRomsBla()
{
	// Load 68000 ROM
	if (BurnLoadRom(Rom01, 0, 1)) {
		return 1;
	}

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 1, 4, nGP9001ROMSize[0]);

	// Load Extra text layer tile data
	BurnLoadRom(ExtraTROM, 5, 1);

	// Load the Z80 ROM
	BurnLoadRom(RomZ80, 6, 1);

	// Load ADPCM data
	BurnLoadRom(MSM6295ROM, 7, 1);

	return 0;
}
Esempio n. 30
0
static INT32 LoadRoms()
{
	// Load 68000 ROM
	if (ToaLoadCode(Rom01, 0, 2)) {
		return 1;
	}

	// Load GP9001 tile data
	ToaLoadGP9001Tiles(GP9001ROM[0], 2, 2, nGP9001ROMSize[0]);

	// Load Extra text layer tile data
	BurnLoadRom(ExtraTROM, 4, 1);

	// Load Z80 ROM
	BurnLoadRom(RomZ80, 5, 1);

	// Load MSM6295 ADPCM data
	BurnLoadRom(MSM6295ROM, 6, 1);

	return 0;
}