finalburnneo / FBNeo

FinalBurn Neo - We are Team FBNeo.
http://neo-source.com
Other
881 stars 355 forks source link

Missing rom dinohb #1676

Closed drtanzil closed 4 months ago

drtanzil commented 4 months ago

Cadillacs & Dinosaur 97 Turbo (Bootleg 3) which is dinohb.zip is missing on FBANeo. I got the mapping from NeoSource 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
};

There is a similar ROM exists on Fbaneo named dinotpic. Here is the issue for dinotpic-

  1. Player change not working while pressing start button.
  2. Sound not working.
  3. GFX problem like Sky is black (For PS3 RetroArch).

Could you please Or add support for dinohb ROM Or fix the audio, player change & GFX issue on dinotpic rom?

barbudreadmon commented 4 months ago

There is a similar ROM exists on Fbaneo named dinotpic.

It's not "a similar rom", it's the exact same rom.

Sound not working.

I can't reproduce this.

GFX problem like Sky is black (For PS3 RetroArch).

Probably a big-endian issue, FBNeo is written for little-endian platforms, i'll see if i can add big-endian compatibility on this game.

drtanzil commented 4 months ago

Thanks! @barbudreadmon.

Here is the screenshot dinotpic on PS3- (Sky Black) IMG_20240216_152555

Here is PC Screenshot- PC

On PC- Sound OK Graphics Ok Player Change Hack - Missing

On PS3- Sound- Missing Graphics- Black SKY Player change - Missing

FBAneo on PC - donh (Cadillacs and Dinosaurs (bootleg set 3, 930223 Asia TW)) ROM can change player. If i press start button player change hack work well. Somehow its not working on dinotpic rom.

I have download FBneo source from Git. trying to fix this. No success so far. Could you please look into that part? Start button player change hack should work on dinotpic . It works on dinoh and also dinohb rom on EKMAME.

barbudreadmon commented 4 months ago

Big-endian (ps3) compatibility should be fixed with https://github.com/finalburnneo/FBNeo/commit/728246d20cefd9ea3264b16a98fae91983e51c1b

I don't know about that "change player hack", someone more knowledgeable might be able to figure out the problem.

It works on dinoh and also dinohb rom on EKMAME.

That's not gonna help if we don't have access to EKMAME's source code.

drtanzil commented 4 months ago

@barbudreadmon : Current FBNeo can chnage player for dinoh rom. But it cannot do that for dinotpic. Im looking the source code. There must be something used here which makes dinoh can change player. need to copy same thing on dinotpic. No need to see EKMAME

drtanzil commented 4 months ago

Big-endian (ps3) compatibility should be fixed with https://github.com/finalburnneo/FBNeo/commit/728246d20cefd9ea3264b16a98fae91983e51c1b

Great thanks for the fix!

barbudreadmon commented 4 months ago

There must be something used here which makes dinoh can change player.

I don't know, i didn't find anything worth of notice.

This romset is apparently known as dinot01 in HBMAME, i'm wondering if that "change player hack" is working there (i can't test myself since i've been unable to build hbmame on linux for quite a long time)

dinkc64 commented 4 months ago

I have a feeling there's more to https://github.com/finalburnneo/FBNeo/commit/728246d20cefd9ea3264b16a98fae91983e51c1b but I could be wrong. Does it work?

dinkc64 commented 4 months ago

I think it needs something like this: for (INT32 i = 0; i < (sizeof(patch_fix_a) / sizeof(UINT32)) >> 1; i++) { CpsRom[patch_fix_a[(i << 1) + 0] ^ 1] = (UINT8)patch_fix_a[(i << 1) + 1]; }

"^ 1" for big endian, since CpsRom is a byte index and it's casted to UINT16 for the 68k. We don't want to change the index of the patch_fix array, but the index to the byte-indexed rom.

best regards,

barbudreadmon commented 4 months ago

I don't have a big-endian machine to test :/

dinkc64 commented 4 months ago

Neither do I, just going off what I know

drtanzil commented 4 months ago

@barbudreadmon

This romset is apparently known as dinot01 in HBMAME, i'm wondering if that "change player hack" is working there (i can't test myself since i've been unable to build hbmame on linux for quite a long time)

Great info! I tried "dinot01", and it also does not support player change. Additionally, I found "dinot02" to "dinot10," all 10 ROMs. All nine ROMs support player change except for "dinot01"! Interesting!

I've never heard of HBMAME before, but I enjoyed playing all 10 hack ROMs! Thanks!

However, why isn't the player changer working in "dinot01" when it works in all the other nine ROMs? :-/ Still need to original game to work.

barbudreadmon commented 4 months ago

However, why isn't the player changer working in "dinot01" when it works in all the other nine ROMs? :-/

The logical conclusion would be that this romset simply doesn't support that feature ? Are you sure you are not confusing this romset with another ? Either that or your ekmame emulator is doing something special in its emulation code to make this "change player hack" work on this romset.

drtanzil commented 4 months ago

@barbudreadmon No its not the rom file. I'm sure it's the code.

If same rom file given on EKMAME emulator & FB4droid emulator, All works! Already tested. Im renaming 4 files from same zip.

for dinohb its-

cd_q.rom
cd_q1.rom
cd_q2.rom
cd_q3.rom
cd_q4.rom

for dinotpic its-

cd_q.5k
cd-q1.1k
cd-q2.2k
cd-q3.3k
cd-q4.4k

Without name, nothing is different. CRC is same also.

Another fact, in Fbneo, dinoh rom supports player change. it has rom name like dinohb-

cd_q.rom
cd_q1.rom
cd_q2.rom
cd_q3.rom
cd_q4.rom
dinkc64 commented 4 months ago

how does this player change feature even work? can you explain how to enable / use it to someone who has never played the game before?

barbudreadmon commented 4 months ago

Apparently it's supposed to happen in-game when pressing start, as it does in dinoh

drtanzil commented 4 months ago

@dinkc64 For Joystick, Start button will change the player. For Keyboard, any key that used to start the game will change the player.

It works okay on dinoh rom and dinotfor FBNeo. dinotis hackset 1 for **Turbo 97 bootleg**. dinotpic` is hackset 2 for Turbo 97 bootleg.

all Turbo 97 hackset can do 03 things-

  1. Change the player on start button.
  2. It has 20 Gun (Random gun will come with unlimited ammo). This bootleg widely known as "Mustopha 20 Gun" in Asian countries
  3. Invincible mode for certain food.

2+3 already works on FBneo. Player cahnge not working for dinotpic. But its working well for earlier hackset- dinoh and dinot.

barbudreadmon commented 4 months ago

I found the source code for some fork called "EKMAMEGui" (i don't know if that's the same as "EKMAME", this one is not that old and is based on MAME 0.222), but the driver seems based on HBMAME's so i don't expect that "player change hack" to work either ?

https://github.com/WOOSEOK99/EKMAMEGui/blob/master/src/mame/drivers/cps1_hack.cpp

drtanzil commented 4 months ago

@barbudreadmon : wow! Great! the EKMAME I have v. 0.101, attaching screenshot-

Screenshot_6

I am also shareing my Google drive link with EKMAME v 0.101. Its portable. If anyone want to test it-

  1. extract the zip
  2. click EKMAMElite32en.exe
  3. click on dinohb rom, game will start
  4. Press 9 to take coin, 3 to start the game. pressing 3 will also change player (hack part)
barbudreadmon commented 4 months ago

Could you test that 0.222 version and tell us if the player change works there ? I think there is a website link to download the binary

dinkc64 commented 4 months ago

dinot01 on hbmame is the same as dinotpic on fbneo Can't change player with start on hbmame, or fbneo, maybe dinot01 / dinotpic doesn't have this feature?

best regards,

drtanzil commented 4 months ago

@dinkc64 : Thanks dink. But the ROM fileas are same.

dinot01 on hbmame Player change not works dinotpic on FbNeo Player change not works dinohb on EKMAME = Works!

I have shared My Google Drive with EKMAME. dinohb.zip rom is there. If you copy same file & rename for hbmame, or FbNeo, still player change not works. Its something related to patch/coding. Something missing on hbmame & FbNeo.

drtanzil commented 4 months ago

@barbudreadmon : There is no binary on that git. However from his blog url i got a binary. It was 0.221. I tried it. It needed so many new rom files like HBMAME. But same issue there. it can't change player. Game play is okay like FBNeo & HBMame

drtanzil commented 4 months ago

I comment on a 18 years old thread on neo-source forum here: https://neo-source.com/index.php?topic=564.0 It seems the alias iq_132 first releaved the map for dinohb. He might know something about this. Already inboxed him and given url for this post.

barbudreadmon commented 4 months ago

But same issue there. it can't change player.

Then the sources i found won't help.

Except maybe if you can provide the source code of that ekmame version you have been using, i don't think we'll be able to implement this stuff.

dinkc64 commented 4 months ago

The patch in the ekmame source barbudreadmon posted is the same as what we have, so maybe it was different before?

barbudreadmon commented 4 months ago

so maybe it was different before?

There is a section of the patch that wasn't there back in 2006 (it can be seen in https://neo-source.com/index.php?topic=564.0), but removing it only cause gfx issues, player remains unchangeable

dinkc64 commented 4 months ago

download new fbn exe's and try dinotpic

barbudreadmon commented 4 months ago

Ok, meaning it's actually not a feature native to that bootleg ? It might explain why they entirely removed it in recent'ish versions of that ekmame fork. Nice job finding the address !

drtanzil commented 4 months ago

@dinkc64 : wow! superb! outstanding! I downloaded the updated codes, compiled it and boom! player change works! Played the game with original nostalgia!

I can't thank enough @barbudreadmon & @dinkc64 for you time & effort to look deep into the issue and come with a fix! I feel so happy to have the fix at last!

Now I have to keep bothering crystalct, to update RetroArch_PSX_CE or any other FBNeo PS3 git, so that I can play this marvelous bootleg on PS3 also.

Screenshot_8

barbudreadmon commented 4 months ago

Played the game with original nostalgia!

Just to clarify, it seems it's not a feature native to that bootleg. The cabinet you played in the 90s was most likely a different bootleg.

drtanzil commented 4 months ago

@barbudreadmon : Thanks again!

I've been chasing after this game since I was 10 years old!

Back then, this game was everywhere. I'd save up 2 TK from my school tiffin money just to play it at the arcade! I guess all kids did that back in those days!

As a 10-year-old, I even tried to find a ROM cassette for this game. I had a Chinese TV game that played "Super Mario"! I spent a whole year going to different shops, and I even called Arcade Suppliers (which was a big move for a 10-year-old) to see if they could give me a cassette for my TV console. But back then, no one was technically sound enough to tell me that you can't run a CPS1 game on an NES emulator!

When I finally got a PC, I managed to get the game, but not the bootleg. The original dino.zip just didn't feel right. I spent another 6 months, spending hours trying to understand what an emulator was. I even emailed Capcom to send me the 20-gun version. Looking back, that was the stupidest thing to do. I didn't even know what a bootleg was, and of course, they never replied.

I downloaded almost every emulator out there and kept trying every Dino ROM I could find. Finally, in 2010, I found EKMAME 0.101, which could play the game just like it was in the arcade.

This game was a big part of our childhood, especially in South Asia. We still play it a lot to cheer up the mood!

barbudreadmon commented 4 months ago

That's some dedication :) None of the other bootlegs you tried in HBMAME looked like an exact match of the one you played as a kid ?

drtanzil commented 4 months ago

Before posting here, I had never heard of HBMAME. Perhaps I stopped searching when I discovered EKMAME back in 2010. Was HBMAME available back then?

As far as I can recall, I spent a lot of time with MAME, Final Burn Alpha, and their variants. I was a complete boob back then (which I still am). With an 8-10 Kbps dial-up modem and Windows XP, it took a long time to find what I was looking for.

But I feel envious of you guys. You're like magicians,. The way you understand machines and C++ is outstanding. I'm a professional PHP developer. I've spent hours trying to understand the code, but I've failed. The depth of knowledge you possess is extraordinary!

barbudreadmon commented 4 months ago

You're like magicians,.

dink is a magician, i don't think i'd ever be able to find that address

drtanzil commented 4 months ago

Indeed! @dinkc64 is a magician. So are you. It's out of my league to understand how you coded these things in the first place!

Additionally, there seems to be an issue with the controls. Player 1's button 2, which corresponds to the C button on the gamepad, is missing. This button is required during gameplay for certain actions. However, in the source code I compiled, there's no option available to set this button. Only the attack and jump buttons are configurable."

barbudreadmon commented 4 months ago

it should be ok with https://github.com/finalburnneo/FBNeo/commit/3ce5ee4ce7edb4d9e16ba4d7564b72683e808093

drtanzil commented 4 months ago

@barbudreadmon : Superb! 100% okay now! Thanks a lot! Thanks a lot!

If I want to play this on Android using RetroArch, how will they get the update of FB Neo? Do I need to post on their Git?

barbudreadmon commented 4 months ago

I'm in charge of our libretro port. I'll sync it asap, i don't know when it'll be available from their online updater though.

drtanzil commented 4 months ago

@barbudreadmon: That's great news! I have already tried the donotpic ROM on Android. Right now, it has missing sound on Android. Hopefully, everything will be working after you sync them.

barbudreadmon commented 4 months ago

Right now, it has missing sound on Android.

I don't think that should be the case though ? Maybe you are using the versions available from google's "play store" ? All the libretro stuff on that store is extremely outdated, so you shouldn't use it if you are expecting up-to-date apps.

ghost commented 4 months ago

install this pl0x : https://buildbot.libretro.com/stable/1.17.0/android/RetroArch_aarch64.apk

drtanzil commented 4 months ago

install this pl0x : https://buildbot.libretro.com/stable/1.17.0/android/RetroArch_aarch64.apk

Great! Yes, i was using playstore version. With the updated link, sound works! Thanks!

dinkc64 commented 4 months ago

Hi drtanzil, Glad everything is working now. Thanks for sharing your nostalgic story, love to read them!

best regards,

barbudreadmon commented 4 months ago

Was HBMAME available back then?

It used to be named "MisfitMAME", and maybe it was still going by that name back in 2010.

drtanzil commented 4 months ago

'MisfitMAME' is completely new to me! And I had no idea about HBMame and its 10 variants of hacks for the Dino ROM before. This is fascinating, I learned so much new info from this post.

drtanzil commented 4 months ago

@barbudreadmon Thank you very much for the libretro core update! I can now play "dinotpic" on mobile with all hacks functioning!

On the RetroArch_PSX_CE git for PS3 here @crystalct mentioned you regarding an issue here. Could you kindly take a look?

dinkc64 commented 4 months ago

I got the layer patch in, thanks!