Author Topic: Adding game support for dinohb  (Read 15608 times)

Offline tanzil73

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
Adding game support for dinohb
« on: February 12, 2024, 03:21:28 AM »
Im trying to add support for dinohb rom Cadillacs & Dinosaur 98 Turbo (Hack set 3).
I have downloaded the source code from Git tried to do the modification on d_cps1.css and recompilled it.
the dinohb.zip is now detecting by the FB Neo, but i am not able to run the game.
Im sharing the MAME to FBA conversion code got from:
https://neo-source.com/index.php?topic=564.msg4835#msg4835

Code: [Select]
// Turbo (Bootleg + Hack) World

static struct BurnRomInfo dinohbRomDesc[] = {
{ "cd-d.800",     0x100000, 0x2A7B2915, BRF_ESS | BRF_PRG }, // 0
{ "cd-e.800",     0x100000, 0xE8370226, BRF_ESS | BRF_PRG }, // 1

{ "cd-a.160",     0x200000, 0x7e4F9FB3, BRF_GRA }, // 2
{ "cd-b.160",     0x200000, 0x89532d85, BRF_GRA }, // 3

{ "cd_q.rom",     0x020000, 0x605fdb0b, BRF_SND }, // 4

{ "cd_q1.rom",    0x080000, 0x60927775, BRF_SND }, // 5
{ "cd_q2.rom",    0x080000, 0x770f4c47, BRF_SND }, // 6
{ "cd_q3.rom",    0x080000, 0x2f273ffc, BRF_SND }, // 7
{ "cd_q4.rom",    0x080000, 0x2c67821d, BRF_SND }, // 8
};

STD_ROM_PICK(dinohb); STD_ROM_FN(dinohb);

static int dinohbInit()
{
  int nRet=0; unsigned char *pqs=NULL;
  Cps=1; Cps1Qs=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+0x100000,1,1); if (nRet!=0) return 1;

// Hack Fixes
  // Fix draw scroll
  *((unsigned short*)(CpsRom + 0x006C2)) = 0xFFC0;

  // Fix gfx
  *((unsigned short*)(CpsRom + 0x006CC)) = 0x0080;
  *((unsigned short*)(CpsRom + 0x006CE)) = 0x010C;
  *((unsigned short*)(CpsRom + 0x006DE)) = 0x0080;
  *((unsigned short*)(CpsRom + 0x006E0)) = 0x0110;
  *((unsigned short*)(CpsRom + 0x006F0)) = 0x0080;
  *((unsigned short*)(CpsRom + 0x006F2)) = 0x0114;
  *((unsigned short*)(CpsRom + 0x00704)) = 0x0080;
  *((unsigned short*)(CpsRom + 0x00706)) = 0x010E;
  *((unsigned short*)(CpsRom + 0x00718)) = 0x0080;
  *((unsigned short*)(CpsRom + 0x0071A)) = 0x0112;
  *((unsigned short*)(CpsRom + 0x0072C)) = 0x0080;
  *((unsigned short*)(CpsRom + 0x0072E)) = 0x0116;

  // Fix screen transitions
  *((unsigned short*)(CpsRom + 0x00B28)) = 0x7000;
  *((unsigned short*)(CpsRom + 0x00B2A)) = 0x7200;
  *((unsigned short*)(CpsRom + 0x00B2C)) = 0x343C;
  *((unsigned short*)(CpsRom + 0x00B32)) = 0x20C1;

  // Fix sound
  *((unsigned short*)(CpsRom + 0x00666)) = 0x00F1;
  *((unsigned short*)(CpsRom + 0x00668)) = 0x8002;
  *((unsigned short*)(CpsRom + 0xAAA6C)) = 0x00D8;
//

  // Load graphics roms
  CpsLoadTilesHack160(CpsGfx, 2);

  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,4,1);
  dino_decode();

  pqs=(unsigned char *)CpsQSam;
  nRet=BurnLoadRom(pqs         ,5,1);
  nRet=BurnLoadRom(pqs+0x080000,6,1);
  nRet=BurnLoadRom(pqs+0x100000,7,1);
  nRet=BurnLoadRom(pqs+0x180000,8,1);


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

struct BurnDriver BurnDrvCpsdinohb = {
"dinohb", "dino", NULL, "1993",
"Cadillacs and Dinosaurs - Turbo - 97 the second generation of dino\0", "", "Capcom", "CPS1",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE | BDF_BOOTLEG,3,HARDWARE_CAPCOM_CPS1_QSOUND,
NULL,dinohbRomInfo,dinohbRomName,DrvInputInfo, dinoDIPInfo,
dinohbInit,DrvExit,Cps1Frame,CpsRedraw,CpsAreaScan,
&CpsRecalcPal,384,224,4,3
};


im also attaching dinohb.zip rom files here, so that anyone with higher skills can add this rom support on FB Neo.

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1155
  • Karma: +60/-2
  • Helper
Re: Adding game support for dinohb
« Reply #1 on: February 12, 2024, 04:58:37 AM »
From the rom definition, this romset seems to match the dinotpic romset.

Offline tanzil73

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Adding game support for dinohb
« Reply #2 on: February 12, 2024, 10:32:12 AM »
Thanks. Yes gameplay looks same `dinohb` & `dinotpic`.

`dinotpic` on FbNeo has graphics & sound issue. Tested on android and issue exits.
All hacks not working also on `dinotpic`
like- Play button player change not working.

`dinohb` rom runs okay on EKMAME emulator v 0.101, and fb4roid on android apk.
Both of these emulators have long gone and has no support now.

fixing audio, graphics & hacks will also work for `dinotpic` for FB Neo.
« Last Edit: February 12, 2024, 10:34:42 AM by tanzil73 »

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 1155
  • Karma: +60/-2
  • Helper
Re: Adding game support for dinohb
« Reply #3 on: February 12, 2024, 11:52:06 AM »
`dinotpic` on FbNeo has graphics & sound issue. Tested on android and issue exits.
All hacks not working also on `dinotpic`
like- Play button player change not working.

Please better explain what you mean, both graphics & sound seems ok to me on dinotpic.
I don't understand the thing about "button player change" either.