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; }
static int Drvq1Init() { int nRet=0; unsigned char *pqs=NULL; Cps=1; Cps1Qs=1; nCpsRomLen= 2*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; // Load graphics roms CpsLoadTiles(CpsGfx , 2); CpsLoadTiles(CpsGfx+0x200000, 6); nCpsLcReg=0x62; // Layer control register is at 0x62 CpsLayEn[1]=0x10; CpsLayEn[2]=0x08; CpsLayEn[3]=0x04; // Protection enable code by KEV CpsMProt[0]=0x00; CpsMProt[1]=0x00; CpsMProt[2]=0x00; CpsMProt[3]=0x00; // Start of Board ID improvments by KEV. 0x00,0x0000 CpsBID[0]=0x00; CpsBID[1]=0x00; CpsBID[2]=0x00; //end MaskAddr[0]=0x64; MaskAddr[1]=0x66; MaskAddr[2]=0x68; MaskAddr[3]=0x6a; nRet=BurnLoadRom(CpsZRom,10,1); wof_decode(); pqs=(unsigned char *)CpsQSam; nRet=BurnLoadRom(pqs ,11,1); nRet=BurnLoadRom(pqs+0x080000,12,1); nRet=BurnLoadRom(pqs+0x100000,13,1); nRet=BurnLoadRom(pqs+0x180000,14,1); nRet=CpsRunInit(); if (nRet!=0) return 1; // Ready to go return 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; }
static int DrvInit() { int nRet=0; Cps=1; nCpsRomLen= 0x100000; nCpsCodeLen=0; // not encrypted nCpsGfxLen= 8*0x080000; nCpsZRomLen= 0x008000; 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 CpsLoadTiles(CpsGfx ,8); CpsLoadTiles(CpsGfx+0x200000,12); nCpsLcReg=0x66; // Layer control register is at 0x66 CpsLayEn[1]=0x02; CpsLayEn[2]=0x04; CpsLayEn[3]=0x08; // Protection enable code by KEV CpsMProt[0]=0x40; CpsMProt[1]=0x42; CpsMProt[2]=0x44; CpsMProt[3]=0x46; MaskAddr[0]=0x68; MaskAddr[1]=0x6a; MaskAddr[2]=0x6c; MaskAddr[3]=0x6e; // Load Z80 Rom nRet=BurnLoadRom(CpsZRom,16,1); // Load ADPCM data nRet=BurnLoadRom(CpsAd ,17,1); nRet=BurnLoadRom(CpsAd+0x20000,18,1); nRet=CpsRunInit(); if (nRet!=0) return 1; // Ready to go return 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; }
static int VarthjInit() { int nRet=0; Cps=1; Varth=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 CpsLoadTiles(CpsGfx,8); nCpsLcReg=0x60; // Layer control register is at 0x60 CpsLayEn[1]=0x20; CpsLayEn[2]=0x06; CpsLayEn[3]=0x06; // Protection enable code by KEV - Looks like only the JAP version uses this CpsMProt[0]=0x4e; CpsMProt[1]=0x4c; CpsMProt[2]=0x4a; CpsMProt[3]=0x48; MaskAddr[0]=0x6e; MaskAddr[1]=0x6c; MaskAddr[2]=0x6a; MaskAddr[3]=0x68; // Load Z80 Rom nRet=BurnLoadRom(CpsZRom,12,1); // Load ADPCM data nRet=BurnLoadRom(CpsAd ,13,1); nRet=BurnLoadRom(CpsAd+0x20000,14,1); nRet=CpsRunInit(); if (nRet!=0) return 1; // Ready to go return 0; }
static int FfightuaInit() { 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=0x68; // Layer control register is at 0x66 CpsLayEn[1]=0x02; CpsLayEn[2]=0x08; CpsLayEn[3]=0x20; MaskAddr[0]=0x6a; MaskAddr[1]=0x6c; MaskAddr[2]=0x6e; MaskAddr[3]=0x70; CpsBID[0]=0x60; CpsBID[1]=0x00; CpsBID[2]=0x05; StartScroll[SCROLL_2]=1; StartScroll[SCROLL_3]=1; // 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; }
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=0x68; // Layer control register is at 0x6e CpsLayEn[1]=0x02; //layer enable 1 is different CpsLayEn[2]=0x08; CpsLayEn[3]=0x20; // Layer enable is different // Board ID improvments by KEV. 0x60,0x0005 CpsBID[0]=0x60; CpsBID[1]=0x00; CpsBID[2]=0x05; MaskAddr[0]=0x6a; MaskAddr[1]=0x6c; MaskAddr[2]=0x6e; MaskAddr[3]=0x70; StartScroll[SCROLL_3]=0x0400; EndScroll[SCROLL_3]=0x07ff; // 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; }
static int CawingInit() { 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=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,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; }
static int VarthInit() { int nRet=0; Cps=1; Varth=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 CpsLoadTiles(CpsGfx,8); nCpsLcReg=0x6e; // Layer control register is at 0x6e CpsLayEn[1]=0x02; CpsLayEn[2]=0x0c; CpsLayEn[3]=0x0c; MaskAddr[0]=0x66; MaskAddr[1]=0x70; MaskAddr[2]=0x68; MaskAddr[3]=0x62; // Load Z80 Rom nRet=BurnLoadRom(CpsZRom,12,1); // Load ADPCM data nRet=BurnLoadRom(CpsAd ,13,1); nRet=BurnLoadRom(CpsAd+0x20000,14,1); nRet=CpsRunInit(); if (nRet!=0) return 1; // Ready to go return 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; }
static int DuoInit() { int nRet=0; unsigned char *pqs=NULL; Cps=1; Cps1Qs=1; slamPro=1; nCpsRomLen= 4*0x080000; nCpsCodeLen=0; // not encrypted nCpsGfxLen= 12*0x080000; nCpsZRomLen= 2*0x020000; nCpsQSamLen= 8*0x080000; 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; } nRet=BurnLoadRom(CpsRom+0x100000,8,1); if (nRet!=0) { return 1; // Already byteswapped } nRet=BurnLoadRom(CpsRom+0x180000,9,1); if (nRet!=0) { return 1; // Already byteswapped } // Set dip switches SETUP_DIPSW_3(Cpi01A,Cpi01C,Cpi01E,0x00,0x00,0x00); // Load graphics roms CpsLoadTiles(CpsGfx , 10); CpsLoadTiles(CpsGfx+0x200000, 14); CpsLoadTiles(CpsGfx+0x400000, 18); nCpsLcReg=0x6a; // Layer control register is at 0x6a CpsLayEn[1]=0x04; CpsLayEn[2]=0x08; CpsLayEn[3]=0x10; // Protection enable code by KEV CpsMProt[0]=0x00; CpsMProt[1]=0x00; CpsMProt[2]=0x00; CpsMProt[3]=0x00; // Start of Board ID improvments by KEV. 0x5e,0x0c02 CpsBID[0]=0x5e; CpsBID[1]=0x0c; CpsBID[2]=0x02; //end MaskAddr[0]=0x6c; MaskAddr[1]=0x6e; MaskAddr[2]=0x70; MaskAddr[3]=0x72; nRet=BurnLoadRom(CpsZRom,22,1); slammast_decode(); nRet=BurnLoadRom(CpsEncZRom,22,1); pqs=(unsigned char *)CpsQSam; nRet=BurnLoadRom(pqs ,23,1); nRet=BurnLoadRom(pqs+0x080000,24,1); nRet=BurnLoadRom(pqs+0x100000,25,1); nRet=BurnLoadRom(pqs+0x180000,26,1); nRet=BurnLoadRom(pqs+0x200000,27,1); nRet=BurnLoadRom(pqs+0x280000,28,1); nRet=BurnLoadRom(pqs+0x300000,29,1); nRet=BurnLoadRom(pqs+0x380000,30,1); ConstructDIPSWList(); nRet=CpsRunInit(); if (nRet!=0) { return 1; } // Ready to go return 0; }
static int Sf2rb2Init() { int nRet=0; int i=0; Cps=1; nCpsRomLen =8*0x20000+0x80000; nCpsGfxLen =3*0x200000; nCpsZRomLen= 0x010000; nCpsAdLen =2*0x020000; nRet=CpsInit(); if (nRet!=0) { return 1; } // Load program roms nRet=BurnLoadRom(CpsRom+0x000000,0,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x000001,1,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x040000,2,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x040001,3,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x080000,4,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x080001,5,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x0c0000,6,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x0c0001,7,2); if (nRet!=0) { return 1; //ROM_LOAD16_BYTE } nRet=BurnLoadRom(CpsRom+0x100000,8,1); if (nRet!=0) { return 1; //ROM_LOAD16_WORD_SWAP } // Stuff to patch the copy protection for sf2rb2 starts here BurnByteswap(CpsRom,0x080000*2); // must byteswap the 2 new code roms CpsRom[0xe5333]=0x60; CpsRom[0xe5332]=0x14; // Ends here // Load up and interleve each set of 4 roms to make the 16x16 tiles for (i=0; i<3; i++) { CpsLoadTiles(CpsGfx+i*0x200000,9+i*4); } nCpsGfxScroll[1]=nCpsGfxScroll[2]=nCpsGfxScroll[3]=0x400000; // Offset to Scroll tiles MaskAddr[0]=0x68; MaskAddr[1]=0x6a; MaskAddr[2]=0x6c; MaskAddr[3]=0x6e; // Load Z80 Rom nRet=BurnLoadRom(CpsZRom,21,1); // Load ADPCM data nRet=BurnLoadRom(CpsAd ,22,1); nRet=BurnLoadRom(CpsAd+0x20000,23,1); // Set dip switches SETUP_DIPSW_3(Cpi01A,Cpi01C,Cpi01E,0x00,0x03,0x60); // Start of Board ID improvments by KEV. 0x48,0x0407 CpsBID[0]=0x48; CpsBID[1]=0x04; CpsBID[2]=0x07; //end nPsndIrqPeriod=(60<<10)/250; //OLDTST ConstructDIPSWList(); nRet=CpsRunInit(); if (nRet!=0) { return 1; } // Ready to go return 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; }
static int DrvInit() { int nRet=0; nRet=RotInit(); if (nRet!=0) { return 1; } 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 } // Set dip switches SETUP_DIPSW_3(Cpi01A,Cpi01C,Cpi01E,0x00,0x03,0x60) // Load graphics roms CpsLoadTiles(CpsGfx,5); nCpsLcReg=0x68; // Layer control register is at 0x6e CpsLayEn[1]=0x02; //layer enable 1 is different CpsLayEn[2]=0x08; CpsLayEn[3]=0x20; // Layer enable is different // Board ID improvments by KEV. 0x60,0x0005 CpsBID[0]=0x60; CpsBID[1]=0x00; CpsBID[2]=0x05; MaskAddr[0]=0x6a; MaskAddr[1]=0x6c; MaskAddr[2]=0x6e; MaskAddr[3]=0x70; StartScroll[SCROLL_3]=0x0400; EndScroll[SCROLL_3]=0x07ff; // Load Z80 Rom nRet=BurnLoadRom(CpsZRom,9,1); nPsndIrqPeriod=(60<<10)/250; //OLDTST // Load ADPCM data nRet=BurnLoadRom(CpsAd ,10,1); nRet=BurnLoadRom(CpsAd+0x20000,11,1); ConstructDIPSWList(); nRet=CpsRunInit(); if (nRet!=0) { return 1; } // Ready to go return 0; }
static int QadjInit() { 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+0x000000,0,1); if (nRet!=0) { return 1; } nRet=BurnLoadRom(CpsRom+0x080000,1,1); if (nRet!=0) { return 1; } // Set dip switches SETUP_DIPSW_3(Cpi01A,Cpi01C,Cpi01E,0x00,0x03,0x60); // Load graphics roms CpsLoadTiles(CpsGfx ,2); nCpsLcReg=0x66; // Layer control register is at 0x66 CpsLayEn[1]=0x02; CpsLayEn[2]=0x04; CpsLayEn[3]=0x08; // Protection enable code by KEV CpsMProt[0]=0x40; CpsMProt[1]=0x42; CpsMProt[2]=0x44; CpsMProt[3]=0x46; // Load Z80 Rom nRet=BurnLoadRom(CpsZRom,6,1); nPsndIrqPeriod=(60<<10)/250; //OLDTST // Load ADPCM data nRet=BurnLoadRom(CpsAd ,7,1); nRet=BurnLoadRom(CpsAd+0x20000,8,1); ConstructDIPSWList(); nRet=CpsRunInit(); if (nRet!=0) { return 1; } // Ready to go return 0; }
static int DrvInit() { int nRet=0; unsigned char *pqs=NULL; Cps=1; Cps1Qs=1; nCpsRomLen= 4*0x080000; nCpsCodeLen=0; // not encrypted nCpsGfxLen= 12*0x080000; nCpsZRomLen= 2*0x020000; nCpsQSamLen= 8*0x080000; nRet=CpsInit(); if (nRet!=0) return 1; // Load program roms nRet=BurnLoadRom(CpsRom+0x000000,0,1); if (nRet!=0) return 1; // Already byteswapped nRet=BurnLoadRom(CpsRom+0x080001,1,2); if (nRet!=0) return 1; nRet=BurnLoadRom(CpsRom+0x080000,2,2); if (nRet!=0) return 1; nRet=BurnLoadRom(CpsRom+0x0c0001,3,2); if (nRet!=0) return 1; nRet=BurnLoadRom(CpsRom+0x0c0000,4,2); if (nRet!=0) return 1; nRet=BurnLoadRom(CpsRom+0x100000,5,1); if (nRet!=0) return 1; // Already byteswapped nRet=BurnLoadRom(CpsRom+0x180000,6,1); if (nRet!=0) return 1; // Already byteswapped // Load graphics roms CpsLoadTiles(CpsGfx , 7); CpsLoadTiles(CpsGfx+0x200000, 11); CpsLoadTiles(CpsGfx+0x400000, 15); nCpsLcReg=0x56; // Layer control register is at 0x56 CpsLayEn[1]=0x04; CpsLayEn[2]=0x08; CpsLayEn[3]=0x10; // Protection enable code by KEV CpsMProt[0]=0x00; CpsMProt[1]=0x00; CpsMProt[2]=0x00; CpsMProt[3]=0x00; // Start of Board ID improvments by KEV. 0x6e,0x0c01 CpsBID[0]=0x6e; CpsBID[1]=0x0c; CpsBID[2]=0x01; //end MaskAddr[0]=0x40; MaskAddr[1]=0x42; MaskAddr[2]=0x68; MaskAddr[3]=0x6a; nRet=BurnLoadRom(CpsZRom,19,1); slammast_decode(); nRet=BurnLoadRom(CpsEncZRom,19,1); pqs=(unsigned char *)CpsQSam; nRet=BurnLoadRom(pqs ,20,1); nRet=BurnLoadRom(pqs+0x080000,21,1); nRet=BurnLoadRom(pqs+0x100000,22,1); nRet=BurnLoadRom(pqs+0x180000,23,1); nRet=BurnLoadRom(pqs+0x200000,24,1); nRet=BurnLoadRom(pqs+0x280000,25,1); nRet=BurnLoadRom(pqs+0x300000,26,1); nRet=BurnLoadRom(pqs+0x380000,27,1); nRet=CpsRunInit(); if (nRet!=0) return 1; // Ready to go return 0; }
static int Sf2rbInit() { int nRet=0; int i=0; Cps=1; nCpsRomLen =3*0x080000; nCpsGfxLen =3*0x200000; nCpsZRomLen= 0x010000; nCpsAdLen =2*0x020000; nRet=CpsInit(); if (nRet!=0) { return 1; } // Load program roms (they are already byteswapped) for (i=0; i<3; i++) { nRet=BurnLoadRom(CpsRom+0x080000*i,0+i,1); if (nRet!=0) { return 1; } } // Stuff to patch the copy protection for sf2rb starts here BurnByteswap(CpsRom,0x080000*2); // must byteswap the 2 new code roms CpsRom[0xe5465]=0x60; CpsRom[0xe5464]=0x12; // Ends here // Load up and interleve each set of 4 roms to make the 16x16 tiles CpsLoadTiles(CpsGfx+0x000000,3+0*4); CpsLoadTiles(CpsGfx+0x200000,3+1*4); CpsLoadTiles(CpsGfx+0x400000,3+2*4); nCpsGfxScroll[1]=nCpsGfxScroll[2]=nCpsGfxScroll[3]=0x400000; // Offset to Scroll tiles MaskAddr[0]=0x68; MaskAddr[1]=0x6a; MaskAddr[2]=0x6c; MaskAddr[3]=0x6e; // Load Z80 Rom nRet=BurnLoadRom(CpsZRom,15,1); // Load ADPCM data nRet=BurnLoadRom(CpsAd ,16,1); nRet=BurnLoadRom(CpsAd+0x20000,17,1); // Set dip switches SETUP_DIPSW_3(Cpi01A,Cpi01C,Cpi01E,0x00,0x03,0x60); // Start of Board ID improvments by KEV. 0x48,0x0407 CpsBID[0]=0x48; CpsBID[1]=0x04; CpsBID[2]=0x07; //end nPsndIrqPeriod=(60<<10)/250; //OLDTST ConstructDIPSWList(); nRet=CpsRunInit(); if (nRet!=0) { return 1; } // Ready to go return 0; }