Welcome!

Final Burn Neo => FBN Development => Topic started by: FerchogtX on November 11, 2004, 06:19:08 PM

Title: JockeyGP booting fix... needing help XD
Post by: FerchogtX on November 11, 2004, 06:19:08 PM
Hi there!!!, well some time ago someone passed me this to fix the booting problem in Jockey Grand Prix in fba (you know, it auto-inserts a coin instead of showing the main screen)... this seems to work in MAME... wel it works, I asked fataku for a "traduction" for the macro ROM_FILL in MAME... here's the fix for mame:
Code: [Select]
ROM_START( jockeygp )
ROM_REGION( 0x200000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "008-p1.bin", 0x000000, 0x100000, CRC(2fb7f388) SHA1(e3c9b03944b4c10cf5081caaf9c8be1f08c06493) )
ROM_FILL( 0x100000, 0x100000, 0xFF )
Well, fataku sent to me this (when i asked him :P thanks man!!) this is the macro developed in a function:
Code: [Select]
for (int i = 0; i < memory_lenght(MEMORY_REGIONx); i++)
src[i] = 0xff;
is an example he gave me... the problem is that i couln't make that work in FBA XD... here my modification using variables and whole stuff to make it work...
Code: [Select]
unsigned char* dst = (unsigned char*)malloc(0x200000); // substitute for ROM_REGION macro in mame?
unsigned char* src = Neo68KROM01;
if (dst) {
           for (int i = 0x100000; i < nCodeSize+0x100000; i++)
                      src[i]=0xff;
}
free(dst);
You can set that either in neo_run or d_neogeo.cpp... if anyone wants to help i'll be glad XD (i need a lot of help lately XD)
Thanks in advance
See ya!!!!! :D
Title: JockeyGP booting fix... needing help XD
Post by: iq_132 on November 11, 2004, 09:10:13 PM
Well... here's what I did to add the padding.
(though it still doesn't make the game show the title screen)

Add this to your driver in d_neogeo.cpp

Code: [Select]
static void jgp_patch()
{
for (int i = 0x100000; i < 0x200000; i=i+2)
{
*((unsigned short*)(Neo68KROM01 + i)) = 0xffff;
}
}


in neo_run.cpp

Find:
Code: [Select]
Neo68KROM01 = Next; Next += nCodeSize;

Replace with:
Code: [Select]
if ((BurnDrvGetHardwareCode() & HARDWARE_SNK_CONTROLMASK) == HARDWARE_SNK_GAMBLING)
{
Neo68KROM01 = Next; Next += 0x200000;
nCodeSize = 0x200000;
} else {
Neo68KROM01 = Next; Next += nCodeSize;
}
Title: JockeyGP booting fix... needing help XD
Post by: FerchogtX on November 13, 2004, 05:34:26 PM
Do you think is possible to load the p1 twice in the 2 MB of space you assigned  for jockeygp? maybe that will fix the problem... maybe...
See ya!!!!!!! :D
Title: JockeyGP booting fix... needing help XD
Post by: iq_132 on November 13, 2004, 07:26:12 PM
I guess you could use this in your jgp init:
(I haven't tested it yet, so It may crash FBA.  I'll test it a little later)
*edit*
Tested both.  They do what they're suppose to, but still doesn't show the logo :|

Code: [Select]
static void jgp_patch()
{
memcpy(Neo68KROM01+0x100000, Neo68KROM01, 0x100000);
}


or this:

Code: [Select]
static void jgp_patch()
{
BurnLoadRom(Neo68KROM01+0x100000, 0, 0);
}
Title: JockeyGP booting fix... needing help XD
Post by: iq_132 on November 14, 2004, 08:16:14 AM
Hmm.. I noticed something interesting while poking aroun neo_run.cpp

NeoNVRAM2   = Next; Next += 0x010000;         // Extra SRAM for vliner/jockeygp

if you change that value to 0x002000 jockeygp will still boot, but vliner will make fba crash. (I assume that vliner tries to write to a piece of ram outside the 2000 boundary while jockeygp does not.)
This makes me wonder... does vliner work in mame with this in the driver?

static data16_t neogeo_sram16_2[0x2000];

or does it have to be this?

static data16_t neogeo_sram16_2[0x010000];
Title: JockeyGP booting fix... needing help XD
Post by: neo04 on November 14, 2004, 08:37:25 AM
i think vliner in mame needs an extra inputs like irrmaze or popbounc..
Title: JockeyGP booting fix... needing help XD
Post by: iq_132 on November 14, 2004, 01:36:16 PM
Same in FBA.
Title: JockeyGP booting fix... needing help XD
Post by: FerchogtX on November 14, 2004, 06:37:16 PM
Quote from: iq_132
Hmm.. I noticed something interesting while poking aroun neo_run.cpp

NeoNVRAM2   = Next; Next += 0x010000;         // Extra SRAM for vliner/jockeygp

if you change that value to 0x002000 jockeygp will still boot, but vliner will make fba crash. (I assume that vliner tries to write to a piece of ram outside the 2000 boundary while jockeygp does not.)
This makes me wonder... does vliner work in mame with this in the driver?

static data16_t neogeo_sram16_2[0x2000];

or does it have to be this?

static data16_t neogeo_sram16_2[0x010000];

Have you tested if with this value (0x2000) and filling with 0xff in fba the game boots correctly? (jockeygp) maybe thats the spot...
See ya!!!!!!!! :D
Title: JockeyGP booting fix... needing help XD
Post by: DethXec on February 26, 2005, 06:25:15 PM
*bump*

News about this? (yes, I'm asking).