Author Topic: Final Fight (USA 900613) (ffightua) Driver  (Read 6585 times)

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Final Fight (USA 900613) (ffightua) Driver
« on: May 05, 2006, 03:20:23 AM »
Code: [Select]
//=========================
// Final Fight (USA 900613)
//=========================

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 0x68
  CpsLayEn[1]=0x02;
  CpsLayEn[2]=0x08;
  CpsLayEn[3]=0x20;

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

  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 struct BurnRomInfo FfightuaRomDesc[] = {
{ "30_2da0.010",   0x20000, 0xed988977, BRF_ESS | BRF_PRG }, // 0 even 68000 code
{ "35_46ff.010",   0x20000, 0x07bf1c21, BRF_ESS | BRF_PRG }, // 1 odd
{ "31_c933.010",   0x20000, 0xdba5a476, BRF_ESS | BRF_PRG }, // 2 even
{ "36_0ace.010",   0x20000, 0x4d89f542, BRF_ESS | BRF_PRG }, // 3 odd
{ "ff32-32m.bin",  0x80000, 0xc747696e, BRF_ESS | BRF_PRG }, // 4 both

  // graphics:
{ "ff05-05m.bin",  0x80000, 0x9c284108, BRF_GRA }, // 5
{ "ff07-07m.bin",  0x80000, 0xa7584dfb, BRF_GRA },
{ "ff01-01m.bin",  0x80000, 0x0b605e44, BRF_GRA },
{ "ff03-03m.bin",  0x80000, 0x52291cd2, BRF_GRA },

/* MAME 0.105u4
These roms (from the Japanese version) were on this PCB, but they don't
belong here, they cause a corrupt Winners Don't use Drugs logo, so I'm
using the proper USA roms instead.

{ "20_44ee.010",   0x20000, 0xa1ab607a, BRF_GRA }, // 7
{ "10_f4d8.010",   0x20000, 0x2dc18cf4, BRF_GRA }, // 8
{ "22_91be.010",   0x20000, 0x6535a57f, BRF_GRA }, // 9
{ "12_b59f.010",   0x20000, 0xc8bc4a57, BRF_GRA }, // 10
{ "21_cc37.010",   0x20000, 0x6e8181ea, BRF_GRA }, // 11
{ "11_2268.010",   0x20000, 0xb19ede59, BRF_GRA }, // 12
{ "23_0b85.010",   0x20000, 0x9416b477, BRF_GRA }, // 13
{ "13_3346.010",   0x20000, 0x7369fa07, BRF_GRA }, // 14
*/

{ "23_ceb1.512",   0x10000, 0xb8367eb5, BRF_GRA }, // 9 Z80

{ "18_ccb5.010",   0x20000, 0x375c66e7, BRF_GRA }, // 10 Sample
{ "19_476d.010",   0x20000, 0x1ef137f9, BRF_GRA }, // 11
};

STD_ROM_PICK(Ffightua) STD_ROM_FN(Ffightua)

struct BurnDriver BurnDrvCpsFfightua = {
"ffightua", "ffight",NULL,"1989",
"Final Fight (900613 USA)\0", NULL, "Capcom", "CPS1",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE,2,HARDWARE_CAPCOM_CPS1,
NULL,FfightuaRomInfo,FfightuaRomName,DrvInputInfo, ffightDIPInfo,
FfightuaInit,DrvExit,Cps1Frame,CpsRedraw,CpsAreaScan,
&CpsRecalcPal,384,224,4,3
};
« Last Edit: May 05, 2006, 04:51:30 AM by iq_132 »


Offline KOF2112

  • Expert
  • *****
  • Posts: 187
  • Karma: +14/-4
Re: Final Fight (USA 900613) (ffightua) Driver
« Reply #1 on: May 05, 2006, 01:16:48 PM »
 :biggrin:
Thanks You iq_132