Author Topic: King of Gladiator (bootleg) - clone of kof97.  (Read 34217 times)

Offline neo04

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #15 on: December 04, 2005, 12:13:15 PM »
try this one:
Code: [Select]
// Code by IQ_132 - http://neosource.1emu.net/
// Thanks to Razoola for the info
static void kog_px_decrypt( void )
{
UINT8 *src = memory_region(REGION_CPU1);
UINT8 *dst = malloc( 0x600000 );
UINT16 *rom = (UINT16 *)memory_region(REGION_CPU1);
int i;
unsigned int sec[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

for (i = 0; i < 8; i++){
memcpy (dst + i * 0x20000, src + sec[i] * 0x20000, 0x20000);
}

memcpy (dst + 0x0007A6, src + 0x0407A6, 0x000006);
memcpy (dst + 0x0007C6, src + 0x0407C6, 0x000006);
memcpy (dst + 0x0007E6, src + 0x0407E6, 0x000006);
memcpy (dst + 0x090000, src + 0x040000, 0x004000);
memcpy (dst + 0x100000, src + 0x200000, 0x400000);
memcpy (src, dst, 0x600000);
free (dst);

for (i = 0x90000/2; i < 0x94000/2; i++){
if (((rom[i]&0xFFBF) == 0x4EB9 || rom[i] == 0x43F9) && !rom[i + 1])
rom[i + 1] = 0x0009;

if (rom[i] == 0x4EB8)
rom[i] = 0x6100;
}

rom[0x007A8/2] = 0x0009;
rom[0x007C8/2] = 0x0009;
rom[0x007E8/2] = 0x0009;
rom[0x93408/2] = 0xF168;
rom[0x9340C/2] = 0xFB7A;
rom[0x924AC/2] = 0x0009;
rom[0x9251C/2] = 0x0009;
rom[0x93966/2] = 0xFFDA;
rom[0x93974/2] = 0xFFCC;
rom[0x93982/2] = 0xFFBE;
rom[0x93990/2] = 0xFFB0;
rom[0x9399E/2] = 0xFFA2;
rom[0x939AC/2] = 0xFF94;
rom[0x939BA/2] = 0xFF86;
rom[0x939C8/2] = 0xFF78;
rom[0x939D4/2] = 0xFA5C;
rom[0x939E0/2] = 0xFA50;
rom[0x939EC/2] = 0xFA44;
rom[0x939F8/2] = 0xFA38;
rom[0x93A04/2] = 0xFA2C;
rom[0x93A10/2] = 0xFA20;
rom[0x93A1C/2] = 0xFA14;
rom[0x93A28/2] = 0xFA08;
rom[0x93A34/2] = 0xF9FC;
rom[0x93A40/2] = 0xF9F0;
rom[0x93A4C/2] = 0xFD14;
rom[0x93A58/2] = 0xFD08;
rom[0x93A66/2] = 0xF9CA;
rom[0x93A72/2] = 0xF9BE;
rom[0xFFFFE/2] = 0x01FF; // Enable "King of Gladiator" on Title Screen
}
« Last Edit: December 04, 2005, 12:14:39 PM by neo04 »

Offline Ashura-X

  • Member
  • ***
  • Posts: 138
  • Karma: +0/-0
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #16 on: December 04, 2005, 12:20:40 PM »
Same thing ! No works :(((((((((((((((

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #17 on: December 04, 2005, 05:09:03 PM »
Went back onto the orange screen on here as well. I send the drivers to Razoola. He want to take a look on those new games drivers. He looking at the lan2004 right now. I told him there is some problems on the kog.

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #18 on: December 04, 2005, 07:42:22 PM »
Same thing ! No works :(((((((((((((((


I use Mame Plus 102u2 and this game seems to work the same as it does in kawaks .



Went back onto the orange screen on here as well. I send the drivers to Razoola. He want to take a look on those new games drivers. He looking at the lan2004 right now. I told him there is some problems on the kog.

I just hope you did not send him the ones you done . kog on my mame build seems to work the same way it does on kawaks 1.55 .
« Last Edit: December 04, 2005, 07:47:06 PM by James33 »
IQ Forum Member

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #19 on: December 04, 2005, 08:15:06 PM »
Doesn't work here. Orange screen is showing with the new p driver. Robert didn't say what we need to move in the neogeo.c.

Code: [Select]
ROM_START( kog )
        ROM_REGION( 0x600000, REGION_CPU1, 0 )
        ROM_LOAD16_WORD_SWAP( "kog_p1.rom", 0x000000, 0x200000, CRC(d2413ec6) SHA1(c0bf409d1e714cba5fdc6f79e4c2aec805316634) )
        ROM_LOAD16_WORD_SWAP( "232-p2.bin", 0x200000, 0x400000, CRC(158b23f6) SHA1(9744620a70513490aaf9c5eda33e5ec31222be19) )

        NEO_SFIX_128K( "kog_s1.rom", CRC(0bef69da) SHA1(80918586e694dce35c4dba796eb18abf6a070ebb) )

        NEO_BIOS_SOUND_128K( "232-m1.bin", CRC(45348747) SHA1(ed77cbae2b208d1177a9f5f6e8cd57070e90b65b) )

        ROM_REGION( 0xc00000, REGION_SOUND1, 0 )
        ROM_LOAD( "232-v1.bin", 0x000000, 0x400000, CRC(22a2b5b5) SHA1(ebdbc977332e6d93e266755000b43857e0082965) )
        ROM_LOAD( "232-v2.bin", 0x400000, 0x400000, CRC(2304e744) SHA1(98d283e2bcc9291a53f52afd35ef76dfb0828432) )
        ROM_LOAD( "232-v3.bin", 0x800000, 0x400000, CRC(759eb954) SHA1(54e77c4e9e6b89458e59824e478ddc33a9c72655) )

        ROM_REGION( 0x2800000, REGION_GFX3, 0 )
        ROM_LOAD16_BYTE( "kog_c1a.rom", 0x0000000, 0x800000, CRC(4eab9b0a) SHA1(a6f6b755215a3f41474e0a76b5463303a522c2d3) )
        ROM_LOAD16_BYTE( "kog_c1b.rom", 0x0000001, 0x800000, CRC(1143fdf3) SHA1(9dc5fe9a3b7599380db62095880e2d6f237a41bd) )
        ROM_LOAD16_BYTE( "kog_c2a.rom", 0x1000000, 0x800000, CRC(697f8fd0) SHA1(5784464c2357ccef8e6e79b6298843fc3d13b39c) )
        ROM_LOAD16_BYTE( "kog_c2b.rom", 0x1000001, 0x800000, CRC(ea82cf8f) SHA1(3d9ab64b69cecd6b3950839ac2c6d151ad66dcf8) )
        ROM_LOAD16_BYTE( "kog_c3.rom", 0x2000000, 0x400000, CRC(abd1be07) SHA1(857eb68bbee4538770bbfa77aaa540d61ab0abcd) )
        ROM_LOAD16_BYTE( "kog_c4.rom", 0x2000001, 0x400000, CRC(d2bd967b) SHA1(c494e0a98e127d37ca360a28accc167fa50fb626) )
ROM_END

static void kog_px_decrypt( void )
{
       int i;
       unsigned char *src = memory_region(REGION_CPU1);
       UINT16 *rom = (UINT16*)memory_region( REGION_CPU1 );
       unsigned char *dst = (unsigned char*)malloc(0x600000);
       unsigned int sec[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

       for (i = 0; i < 8; i++)
       memcpy (dst + i * 0x20000, src + sec[i] * 0x20000, 0x20000);

       memcpy (dst + 0x0007A6, src + 0x0407A6, 0x000006);
       memcpy (dst + 0x0007C6, src + 0x0407C6, 0x000006);
       memcpy (dst + 0x0007E6, src + 0x0407E6, 0x000006);
       memcpy (dst + 0x090000, src + 0x040000, 0x004000);
       memcpy (dst + 0x100000, src + 0x200000, 0x400000);
       memcpy (src, dst, 0x600000);
       free (dst);

       for (i = 0x90000/2; i < 0x94000/2; i++)
       {
       if (((rom[i]&0xFFBF) == 0x4EB9 || rom[i] == 0x43F9) && !rom[i + 1])
       rom[i + 1] = 0x0009;

       if (rom[i] == 0x4EB8)
       rom[i] = 0x6100;
       }

       rom[0x007A8/2] = 0x0009;
       rom[0x007C8/2] = 0x0009;
       rom[0x007E8/2] = 0x0009;
       rom[0x93408/2] = 0xF168;
       rom[0x9340C/2] = 0xFB7A;
       rom[0x924AC/2] = 0x0009;
       rom[0x9251C/2] = 0x0009;
       rom[0x93966/2] = 0xFFDA;
       rom[0x93974/2] = 0xFFCC;
       rom[0x93982/2] = 0xFFBE;
       rom[0x93990/2] = 0xFFB0;
       rom[0x9399E/2] = 0xFFA2;
       rom[0x939AC/2] = 0xFF94;
       rom[0x939BA/2] = 0xFF86;
       rom[0x939C8/2] = 0xFF78;
       rom[0x939D4/2] = 0xFA5C;
       rom[0x939E0/2] = 0xFA50;
       rom[0x939EC/2] = 0xFA44;
       rom[0x939F8/2] = 0xFA38;
       rom[0x93A04/2] = 0xFA2C;
       rom[0x93A10/2] = 0xFA20;
       rom[0x93A1C/2] = 0xFA14;
       rom[0x93A28/2] = 0xFA08;
       rom[0x93A34/2] = 0xF9FC;
       rom[0x93A40/2] = 0xF9F0;
       rom[0x93A4C/2] = 0xFD14;
       rom[0x93A58/2] = 0xFD08;
       rom[0x93A66/2] = 0xF9CA;
       rom[0x93A72/2] = 0xF9BE;

    src[0xFFFFE] = 0x01;
}

static void samsh5bl_cx_decrypt( void )
{
       int cx_size = memory_region_length( REGION_GFX3 );
       UINT8 *rom = memory_region( REGION_GFX3 );
       UINT8 *buf = malloc( cx_size );
       int i;

       memcpy( buf, rom, cx_size );

       for( i = 0; i < cx_size / 0x40; i++ )
       memcpy( &rom[ i * 0x40 ], &buf[ (i ^ 1) * 0x40 ], 0x40 );

    free( buf );
}

DRIVER_INIT( kog )
{
       UINT8 *rom = memory_region( REGION_CPU1 );
       UINT8 *buf = malloc( 0x100000 );
       int i;
       unsigned int nBank[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

       for (i = 0; i < 8; i++)
       memcpy (buf + i * 0x20000, rom + nBank[i] * 0x20000, 0x20000);

       memcpy( &rom[ 0x000000 ], &buf[ 0x000000 ], 0x100000);  //move unscrambled p1 back
       memcpy( &rom[ 0x100000 ], &rom[ 0x200000 ], 0x400000);  //move p2 rom to original location

       free(buf);

       kog_px_decrypt();
       sx_decrypt(1);
       samsh5bl_cx_decrypt();
    init_neogeo();
}

                       !strcmp(Machine->gamedrv->name,"kog") ||

Unless I need to removed the !strcmp(Machine->gamedrv->name,"kog") || ???

I already have this.

Code: [Select]
static void sx_decrypt( int value )
{
        int sx_size = memory_region_length( REGION_GFX1 );
        UINT8 *rom = memory_region( REGION_GFX1 );
        int i;

        if (value == 1)
        {
        UINT8 *buf = malloc( sx_size );
        memcpy( buf, rom, sx_size );

        for( i = 0; i < sx_size; i += 0x10 )
        {
        memcpy( &rom[ i ], &buf[ i + 8 ], 8 );
        memcpy( &rom[ i + 8 ], &buf[ i ], 8 );
        }
        free( buf );
        }
        else
        if (value == 2)
        {
        for( i = 0; i < sx_size; i++ )
        rom[ i ] = BITSWAP8( rom[ i ], 7, 6, 0, 4, 3, 2, 1, 5 );
    }
}

So what the problem then?
« Last Edit: December 04, 2005, 08:22:15 PM by KingHanco »

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #20 on: December 04, 2005, 08:22:11 PM »
Why are you useing two P rom decrypt codes ?
Looks like you have old code that should not be there now .


Just try this only

Code: [Select]
static void kog_cx_decrypt( void )
{
int i;
int cx_size = memory_region_length( REGION_GFX3 );
UINT8 *rom = memory_region( REGION_GFX3 );
UINT8 *buf = malloc( cx_size );

memcpy( buf, rom, cx_size );

for( i = 0; i < cx_size / 0x40; i++ ){
memcpy( &rom[ i * 0x40 ], &buf[ (i ^ 1) * 0x40 ], 0x40 );
}

free( buf );
}

static void kog_sx_decrypt( void )
{
int i;
int sx_size = memory_region_length( REGION_GFX1 );
UINT8 *rom = memory_region( REGION_GFX1 );
UINT8 *buf = malloc( sx_size );

memcpy( buf, rom, sx_size );

for( i = 0; i < sx_size; i += 0x10 ){
memcpy( &rom[ i        ], &buf[ i + 0x08 ], 0x08 );
memcpy( &rom[ i + 0x08 ], &buf[ i        ], 0x08 );
}

free( buf );
}

// Code by IQ_132 -- http://neosource.1emu.net/
// Thanks to JotaCE, Jimmy_page, and Robber804 for some info
DRIVER_INIT( kog )
{
int i;
UINT8 *src = memory_region( REGION_CPU1 );
UINT8 *pTemp = (UINT8 *)malloc( 0x600000 );
int sec[] = { 0x3, 0x8, 0x7, 0xC, 0x1, 0xA, 0x6, 0xD };

if (pTemp)
{
for (i = 0; i < 8; i++)
memcpy (pTemp + i * 0x20000, src + sec[i] * 0x20000, 0x20000);

memcpy (pTemp + 0x0007A6, src + 0x0407A6, 0x000006);
memcpy (pTemp + 0x0007C6, src + 0x0407C6, 0x000006);
memcpy (pTemp + 0x0007E6, src + 0x0407E6, 0x000006);
memcpy (pTemp + 0x090000, src + 0x040000, 0x004000);
memcpy (pTemp + 0x100000, src + 0x200000, 0x400000);
memcpy (src, pTemp, 0x600000);
free (pTemp);
}
for (i = 0x90000; i < 0x94000; i++)
{
if (((*((UINT16*)(src + i))&0xFFBF) == 0x4EB9 || *((UINT16*)(src + i)) == 0x43F9) && !*((UINT16*)(src + i + 2)))
*((UINT16*)(src + i + 2)) = 0x0009;

if (*((UINT16*)(src + i)) == 0x4EB8)
*((UINT16*)(src + i)) = 0x6100;
}

*((UINT16*)(src + 0x007A8)) = 0x0009;
*((UINT16*)(src + 0x007C8)) = 0x0009;
*((UINT16*)(src + 0x007E8)) = 0x0009;
*((UINT16*)(src + 0x93408)) = 0xF168;
*((UINT16*)(src + 0x9340C)) = 0xFB7A;
*((UINT16*)(src + 0x924AC)) = 0x0009;
*((UINT16*)(src + 0x9251C)) = 0x0009;
*((UINT16*)(src + 0x93966)) = 0xFFDA;
*((UINT16*)(src + 0x93974)) = 0xFFCC;
*((UINT16*)(src + 0x93982)) = 0xFFBE;
*((UINT16*)(src + 0x93990)) = 0xFFB0;
*((UINT16*)(src + 0x9399E)) = 0xFFA2;
*((UINT16*)(src + 0x939AC)) = 0xFF94;
*((UINT16*)(src + 0x939BA)) = 0xFF86;
*((UINT16*)(src + 0x939C8)) = 0xFF78;
*((UINT16*)(src + 0x939D4)) = 0xFA5C;
*((UINT16*)(src + 0x939E0)) = 0xFA50;
*((UINT16*)(src + 0x939EC)) = 0xFA44;
*((UINT16*)(src + 0x939F8)) = 0xFA38;
*((UINT16*)(src + 0x93A04)) = 0xFA2C;
*((UINT16*)(src + 0x93A10)) = 0xFA20;
*((UINT16*)(src + 0x93A1C)) = 0xFA14;
*((UINT16*)(src + 0x93A28)) = 0xFA08;
*((UINT16*)(src + 0x93A34)) = 0xF9FC;
*((UINT16*)(src + 0x93A40)) = 0xF9F0;
*((UINT16*)(src + 0x93A4C)) = 0xFD14;
*((UINT16*)(src + 0x93A58)) = 0xFD08;
*((UINT16*)(src + 0x93A66)) = 0xF9CA;
*((UINT16*)(src + 0x93A72)) = 0xF9BE;

src[0xFFFFE] = 0x01; // Enable "King of Gladiator" on Title Screen

kog_cx_decrypt();
kog_sx_decrypt();
init_neogeo();
}

This is based on the driver from here http://neo-source.com/index.php?topic=469.msg3818#msg3818
« Last Edit: December 04, 2005, 08:34:31 PM by James33 »
IQ Forum Member

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #21 on: December 04, 2005, 09:30:33 PM »
It scramble on the screen. Alots of graphics issues. Screwup on my screen.
« Last Edit: December 04, 2005, 09:31:44 PM by KingHanco »

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #22 on: December 04, 2005, 10:20:01 PM »
It scramble on the screen. Alots of graphics issues. Screwup on my screen.

Well its you thats doing something wrong , There is nothing wrong with the driver posted .
When I said use that driver it means you do not add things to the code that you think should be there
There is no doubt that you are doing things wrong .

« Last Edit: December 04, 2005, 10:32:40 PM by James33 »
IQ Forum Member

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #23 on: December 04, 2005, 10:27:14 PM »
Well its you thats doing something wrong , There is nothing wrong with the driver posted .
When I said use that driver it means you do not add things to the code that you think should be there
There is no doubt that you are doing things wrong .

Heh I forgotting to removed the !strcmp(Machine->gamedrv->name,"kog") ||

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #24 on: December 04, 2005, 10:34:56 PM »
Heh I forgotting to removed the !strcmp(Machine->gamedrv->name,"kog") ||

That stays in machine\neogeo.c
« Last Edit: December 04, 2005, 10:36:02 PM by James33 »
IQ Forum Member

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #25 on: December 04, 2005, 10:58:48 PM »
That stays in machine\neogeo.c

Can I send you the neogeo source? That way you can see what I'm doing wrong. There might be some other drivers that causes that to happen.

MSN or Yahoo?

I'm log on both.
« Last Edit: December 04, 2005, 11:10:33 PM by KingHanco »

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #26 on: December 04, 2005, 11:09:14 PM »
*@hotmail.com   .

Thanks IQ was just about to edit it .
« Last Edit: December 04, 2005, 11:50:02 PM by James33 »
IQ Forum Member

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #27 on: December 04, 2005, 11:14:47 PM »
It send.

Offline neo04

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #28 on: December 26, 2005, 06:41:47 AM »
Quote
1. Voice that talks through the intro is missing
2. On the continue screen, the numbers don't fade, they flash off, making the countdown mostly blank.
3. There is not enough time to enter your initials
4. After doing so, they don't show on the high score screen
5. The high score screen always has missing info.
kawaks have the same problems :)
« Last Edit: December 26, 2005, 06:43:08 AM by neo04 »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: King of Gladiator (bootleg) - clone of kof97.
« Reply #29 on: December 26, 2005, 03:48:47 PM »
Here's a mame port of that code I posted in the FBA section. ;)

Code: [Select]
// Switch kog title between kanji and English
// This is set by a jumper on the PCB (Razoola)
READ16_HANDLER( kog_title_lang_set )
{
return ((neogeo_ram16[0x0FD82/2]+1)>>1)|0xFF00;
}


Code: [Select]
memory_install_read16_handler(0,  ADDRESS_SPACE_PROGRAM, 0x0ffffe, 0x0fffff, 0, 0, kog_title_lang_set);