libretro / FBNeo

FBNeo - We are Team FBNeo.
https://neo-source.com
Other
226 stars 136 forks source link

Rom Support Request for dinohb #1065

Closed drtanzil closed 9 months ago

drtanzil commented 9 months ago

Resuesting to add support for dinohb (Bootleg Hackset 3, Cadillacs & Dinosaur).

I'm pasting dat config-

game (
    name dinohb
    sourcefile cps1.c
    cloneof dino
    romof dino
    description "Cadillacs and Dinosaurs (hack set 3)"
    year 1997
    manufacturer "bootleg"
    history "\nCadillacs and Dinosaurs (c) 1993 Capcom. \n\nIn this 2-D side-scrolling beat'em up, 4 earth-minded heroes attempt to stop poachers from harming the dinosaur population. Each character has his or her special strengths and abilities. \n\n- TECHNICAL - \n\nCapcom Play System hardware (CPS) \n\nMain CPU : 68000 (@ 12 Mhz), Z80 (@ 8 Mhz) \nSound Chips : Q-Sound (@ 4 Mhz) \n\nScreen orientation : Horizontal \nVideo resolution : 384 x 224 pixels \nScreen refresh : 60.00 Hz \nPalette colors : 4096 \n\nPlayers : 3 \nControl : 8-way joystick \nButtons : 2 \n\n- TRIVIA - \n\nReleased in February 1993. \n\nThis game is known in Japan as \"Cadillacs Kyouryuu Shin Seiki\". \n\nThis game is much famous by the name \"Mustapha's game\" (the main character of the game) in Asia. \n\nCharacters based upon the comic 'Xenozoic Tales' created in the late eighties by Mark Schultz. \n\nThere is a modified version of this game (hack?), in which certain gun(s) have unlimited ammo. \n\nPony Canyon / Scitron released a limited-edition soundtrack album for this game (Tenchi Wo Kurau II : G.S.M. Capcom 7 - PCCB-00133) on 20/08/1993. \n\n- UPDATES - \n\nDuring the storyline, the Japanese version has a scrolling effect on the text. All other versions have no such effect. \n\nThe US version is slightly different, it has the \"Winners Don't Use Drugs\" screen. \n\n- TIPS AND TRICKS - \n\nOn the 2nd and 5th stages, there appears a large dinosaur called a Shivat that's sleeping when first encountered. Try to keep the human enemies from whacking them to wake them up. While the Shivats do attack the enemies, they can also cause trouble (and injuries) for the players. \n\nThere are also some pterodactyl-like flying creatures that need to be struck by jumping to reach them. Whenever you drain the energy from any menacing dinosaurs, they slightly change color, then become harmless. \n\nOn the 3rd stage, where you're driving Jack's Cadillac, try to dodge the grenades thrown by the stage's motorcycle-riding boss, Hogg, while crashing into him with the car. If you're good at this, you should be able to at least reduce his energy to the yellow level, the lowest for the enemies. \n\nOn the 6th stage, there's 2 points at where you need to be careful not to be stomped on by the legs of a brontosaurus. But, try to lure some of the other enemies underneath them instead! \n\n- STAFF - \n\nObject gfx : Kurisan, Jun Matsumura (JUN), Matano, Ss, Shisui, Kinmon, The Who \nScroll gfx : Nissui, Konomi, Ohnicchan, Bentobucho \nProgrammers : Yuki Saiko, Cky Gi-u, T.Uragoro, Some-P \nMusic : Isao Abe (Piro2 Oyaji), Syun Nishigaki (SYUN), Kiyo \nSound : Toshi Bull, Nobu \n0.35b3 [Russell Nash] \n\nWIP: \n- 0.94u1: Aaron Giles fixed '3 speaker problem' with Qsound. Removed 3rd sound channel. \n- 0.93u1: Replaced YM2151 sound with Q-Sound (4MHz). \n- 0.93: Replaced QSound with YM2151 (3579580 Hz) and added 3rd sound channel. \n- 0.63: Added clone Cadillacs and Dinosaurs (US 930201). \n- 13th December 2002: Tim added a USA version of Cadillacs and Dinosaurs. \n- 0.36b12: Changed Z80 CPU2 clock speed to 6MHz. \n- 0.36b11: Replaced Custom sound with QSound (4MHz). \n- 0.35: Added Custom sound. \n- 0.35RC1: Santeri Saarimaa added clone Cadillacs Kyouryuu-Shinseiki (Japan). Added 'Freeze' dipswitch. \n- 0.35b4: Added Z80 (4MHz) CPU2. \n- 0.35b3: Russell Nash added Cadillacs and Dinosaurs (World) (Capcom 1993). \n- 13th February 1999: More progress on the CPS1 driver. Some of the later CPS1 games utilizing the Q-sound system are now working (such as Cadillacs & Dinosaurs, Punisher and Warriors of Fate), and a few minor bugs have been fixed. No sound though, because the Q-sound roms are encrypted. Information about 'Kabuki' encryption system is very welcome. \n- 12th February 1999: Russell Nash has added these CPS1 games: Cadillacs & Dinosaurs, Warriors of Fate and Muscle Bomber Duo. \n\nSTORY: \n- Eastcoast 2513. The past and future have collided in a world gone mad...This is the world of Cadillacs and Dinosaurs. About 400 years ago...Science had progressed to the verge of creating new life. Perhaps they went too far by changing evolution. But nature takes care of itself...thus \"The Great Cataclysm\". \n\nLEVELS: 8 \n\nOther Emulators: \n* Calice \n* Callus \n* Nebula \n* Raine \n\nRecommended Games (Street Fighter): \nKnuckle Joe \nMy Hero \nRenegade \nTrojan \nTrojan (PlayChoice-10) \nAvengers \nDouble Dragon \nDouble Dragon II \nDouble Dragon 3 \nDouble Dragon (PlayChoice-10) \nDouble Dragon (Neo-Geo) \nGinga NinkyouDen \nKyros \nShinobi \nShinobi (Mega-Tech) \nThe Revenge of Shinobi (Mega-Tech) \nBad Dudes vs. Dragonninja \nShadow Warriors \nVigilante \nCrime Fighters \nDownTown \nFinal Fight \nGang Wars \nLast Battle (Mega-Tech) \nNinja Gaiden (PlayChoice-10) \nNinja Gaiden Episode II (PlayChoice-10) \nNinja Gaiden Episode III (PlayChoice-10) \nShadow Dancer \nTough Turf \nThe Combatribes \nCrude Buster \nGrowl \nMug Smashers \n64th. Street \nBrute Force \nCaptain Commando \nD. D. Crew \nKarate Blazers \nRiot City \nVendetta \nGuardians of the Hood \nSilent Dragon \nUndercover Cops \nCadillacs and Dinosaurs \nKnuckle Bash \nKnuckle Bash 2 \nNinja Baseball Batman \nThe Punisher \nStreets of Rage II (Mega Play) \nViolent Storm \nPretty Soldier Sailor Moon \nOsman \nVamp 1/2 \n\nRomset: 7808 kb / 16 files / 3.93 zip \n"
    rom ( name cd-d.800 size 1048576 crc 2a7b2915 sha1 817d24c5206a60c4d93affffc9bd5a72abccbb01 region cpu1 offs 0 )
    rom ( name cd-e.800 size 1048576 crc e8370226 sha1 9c6915ad9e48ccd2020fcad58ec56e6f7cd0c25c region cpu1 offs 100000 )
    rom ( name cd-a.160 size 2097152 crc 7e4f9fb3 sha1 b985d925e0fb799cdf0a671e4800961d9872cd8f region gfx1 offs 0 )
    rom ( name cd-b.160 size 2097152 crc 89532d85 sha1 6743c4d9b4407421416c13878b8a1fae097dd7a7 region gfx1 offs 2 )
    rom ( name cd_q.rom merge cd_q.rom size 131072 crc 605fdb0b sha1 9da90ddc6513aaaf2260f0c69719c6b0e585ba8c region cpu2 offs 0 )
    rom ( name cd_q1.rom merge cd_q1.rom size 524288 crc 60927775 sha1 f8599bc84c38573ebbe8685822c58b6a38b50462 region sound1 offs 0 )
    rom ( name cd_q2.rom merge cd_q2.rom size 524288 crc 770f4c47 sha1 fec8ef00a6669d4d5e37787ecc7b58ee46709326 region sound1 offs 80000 )
    rom ( name cd_q3.rom merge cd_q3.rom size 524288 crc 2f273ffc sha1 f0de462f6c4d251911258e0ebd886152c14d1586 region sound1 offs 100000 )
    rom ( name cd_q4.rom merge cd_q4.rom size 524288 crc 2c67821d sha1 6e2528d0b22508300a6a142a796dd3bf53a66946 region sound1 offs 180000 )
    chip ( type cpu name "68000" clock 12000000 )
    chip ( type cpu name "Z80" clock 8000000 )
    chip ( type audio name "Q-Sound" clock 4000000 )
    video ( screen raster orientation horizontal x 384 y 224 aspectx 4 aspecty 3 freq 59.610001 )
    sound ( channels 2 )
    input ( players 3 control joy8way buttons 3 coins 3 service yes )
    dipswitch ( name "Freeze" entry "\xb9\xc3\x98\xb1\xc3\x95" default "\xb9\xc3\x98\xb1\xc3\x95" entry "\xb4\xc3\xb2\xbf\xaa" )
    driver ( status good emulation good color good sound good graphic good palettesize 4096 )
)

ROMS-

¬``` dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd-d.800¬2a7b2915¬1048576¬dino¬¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd-e.800¬e8370226¬1048576¬dino¬¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd-a.160¬7e4f9fb3¬2097152¬dino¬¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd-b.160¬89532d85¬2097152¬dino¬¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd_q.rom¬605fdb0b¬131072¬dino¬cd_q.rom¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd_q1.rom¬60927775¬524288¬dino¬cd_q1.rom¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd_q2.rom¬770f4c47¬524288¬dino¬cd_q2.rom¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd_q3.rom¬2f273ffc¬524288¬dino¬cd_q3.rom¬ ¬dino¬Cadillacs and Dinosaurs (World 930201)¬dinohb¬Cadillacs and Dinosaurs (hack set 3)¬cd_q4.rom¬2c67821d¬524288¬dino¬cd_q4.rom¬


also adding the dinohb.zip as attached file bellow-
barbudreadmon commented 9 months ago
drtanzil commented 9 months ago

@barbudreadmon : I'm sharing the code here. Im looking for a while to make it work with FB Neo.

the code collected from Here: https://neo-source.com/index.php?topic=564.msg4835#msg4835

// 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
};
barbudreadmon commented 9 months ago

From the rom definition, this romset seems to match the dinotpic romset

drtanzil commented 9 months ago

@barbudreadmon : Thanks! I run dinotpic and you are right! it seems dinohb and dinotpic are same. But got some issues. Player change hack not working on dinotpicrom on libretro-FBNeo. Pressing play button should change the player.

For dinotpic rom-

On PC-

On PS3 RetroArch-

@barbudreadmon : dinohb or dinotpic was very popular rom in south Asian countries. Arcade machines there run this bootleg. It has a great nostalgic value for a bigger audience of 90's kid. I don't have technical expertise to fix this rom and back to its original form. Requesting you to fix the issues if possible. Thanks in advance.

barbudreadmon commented 9 months ago

Again, this is the wrong place to write FBNeo reports, so i'll lock. Note that any issue happening on big-endian machines (PS3) probably won't get fixed.