Author Topic: Error inserting a neogeo game in MAME 0.153 (Updated source from 148)  (Read 21622 times)

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
I trying to add a neogeo game called "The King of Fighrers 2002 3rd Strike of Orochi" but i have a some compile errors

The romset as named as Kof2k2C2 (and is a clone of old set of kawaks named kof2002nd) but i reziped this inside a Kof2k2C2 and create a dat in Kawaks and runs fine...

Below the error(s)

Code: [Select]
obj/windows/mame/neogeo.a(neogeo.o):neogeo.c:(.text$_ZN13driver_device19driver_i
nit_wrapperI12neogeo_stateXadL_ZNS1_13init_kof2k2c2EvEEEEvR15running_machine[voi
d driver_device::driver_init_wrapper<neogeo_state, &(neogeo_state::init_kof2k2c2
())>(running_machine&)]+0x15): undefined reference to `neogeo_state::init_kof2k2
c2()'
collect2: ld returned 1 exit status
make: *** [mame.exe] Error 1

help please, and thank's
« Last Edit: June 27, 2014, 05:38:36 PM by SeiferAlmasy »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: Error inserting a neogeo game in MAME 0.148
« Reply #1 on: March 24, 2014, 10:27:39 PM »
Did you include init_kof2k2c2() in includes/neogeo.h ??
You should post the snippets you are adding.


Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #2 on: March 24, 2014, 10:34:15 PM »
i inserted this in neodrvr.c

Code: [Select]
ROM_START( kof2k2c2 )
ROM_REGION( 0x500000, "maincpu", 0 )
ROM_LOAD16_WORD_SWAP( "kof2k2c2_p1.rom", 0x000000, 0x020000, CRC(21a84084) SHA1(973e8a0bffa0e1f055803f663f81a8e03701802d) )
ROM_LOAD16_WORD_SWAP( "kof2k2c2_p2.rom", 0x040000, 0x040000, CRC(febb484e) SHA1(4b1838795b84f22d578ad043641df0a7bf7d9774) )

NEO_SFIX_128K( "kof2k2c2_s1.rom", CRC(a3c9b2d8) SHA1(1472d2cbd7bb73e84824ecf773924007e6117e77) )

NEO_BIOS_AUDIO_128K( "kof2k2c2_m1.rom", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )

ROM_REGION( 0x1000000, "ymsnd", 0 )
ROM_LOAD( "kof2k2c2_v1.rom", 0x000000, 0x800000, CRC(e4ddfb3f) SHA1(eb8220ab01c16cf9244b7f3f9912bec0db561b85) )
ROM_LOAD( "kof2k2c2_v2.rom", 0x800000, 0x800000, CRC(b887d287) SHA1(f593a5722df6f6fac023d189a739a117e976bb2f) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, "sprites", 0 )
ROM_LOAD16_BYTE( "kof2k2c2_c1.rom", 0x0000000, 0x800000, CRC(7a050288) SHA1(55a20c5b01e11a859f096af3f8e09986025d288f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c2.rom", 0x0000001, 0x800000, CRC(e924afcf) SHA1(651e974f7339d2cdcfa58c5398013197a0525b77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kof2k2c2_c3.rom", 0x1000000, 0x800000, CRC(959fad0b) SHA1(63ab83ddc5f688dc8165a7ff8d262df3fcd942a2) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c4.rom", 0x1000001, 0x800000, CRC(efe6a468) SHA1(2a414285e48aa948b5b0d4a9333bab083b5fb853) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kof2k2c2_c5.rom", 0x2000000, 0x800000, CRC(74bba7c6) SHA1(e01adc7a4633bc0951b9b4f09abc07d728e9a2d9) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c6.rom", 0x2000001, 0x800000, CRC(e20d2216) SHA1(5d28eea7b581e780b78f391a8179f1678ee0d9a5) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kof2k2c2_c7.rom", 0x3000000, 0x800000, CRC(fa705b2b) SHA1(f314c66876589601806352484dd8e45bc41be692) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c8.rom", 0x3000001, 0x800000, CRC(2c912ff9) SHA1(b624a625ea3e221808b7ea43fb0b1a51d8c1853e) ) /* Plane 2,3 */
ROM_END

Code: [Select]
GAME( 2002, kof2k2c2,   neogeo,   neogeo,   neogeo, neogeo_state,   kof2k2c2, ROT0, "bootleg", "The King of Fighters 2002 3rd Strike of Orochi (The King of Fighters 2002 bootleg)", GAME_SUPPORTS_SAVE ) /* Hack / Bootleg of kof2002 */

neogeo.h

Code: [Select]
DECLARE_DRIVER_INIT(kof2k2c2);
I am not sure if this rom need something more than the other bootlegs / hacks that already exist in MAME
« Last Edit: March 24, 2014, 11:10:14 PM by SeiferAlmasy »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: Error inserting a neogeo game in MAME 0.148
« Reply #3 on: March 24, 2014, 11:58:00 PM »
looks like you're missing DRIVER_INIT(kof2k2c2), it should be pasted somewhere in neodrvr.c


Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #4 on: March 25, 2014, 12:01:38 AM »
I added this...

Code: [Select]
DRIVER_INIT_MEMBER(neogeo_state,kof2k2c2)
{
DRIVER_INIT_CALL(neogeo);
//kof2002_decrypt_68k(machine());
neo_pcm2_swap(machine(), 0);
neogeo_cmc50_m1_decrypt(machine());
//kof2002b_gfx_decrypt(machine(), machine().root_device().memregion("sprites")->base(),0x4000000);
//kof2002b_gfx_decrypt(machine(), machine().root_device().memregion("fixed")->base(),0x20000);
}

but don't work, perhaps this set use a fully decrypted set... and mame don't have any kof fully decrypted anymore...
« Last Edit: March 25, 2014, 12:03:49 AM by SeiferAlmasy »

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #5 on: March 26, 2014, 01:20:33 AM »
i change some code in neodrvr.c, neogeo.c e neogeo.h i think at all is ok, but not work, have a same error again

undefined reference to `neogeo_state::init_kof2k2c2()

but, the DRIVER_INIT_MEMBER(neogeo_state,kof2k2c2) is ok in neogeo.h or i think it ok :P

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: Error inserting a neogeo game in MAME 0.148
« Reply #6 on: March 26, 2014, 07:20:03 AM »
Do you actually have init_kof2k2c2 somewhere? there should be code for that subroutine. I didn't see it in the code you pasted.


Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #7 on: March 26, 2014, 10:09:04 PM »
Sorry but, no have any references to init_<game here> in neogeo.h only this reference

DRIVER_INIT_MEMBER(neogeo_state,kof2k2c2)

in this case, add a line init_kof2k2c2() in neogeo.h and that's work?

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #8 on: April 11, 2014, 05:50:22 PM »
I try now, thanks Robert

EDIT:

Code: [Select]
D:\Source\MAME\mame0148s>make -j5
Linking mame.exe...
obj/windows/mame/neogeo.a(neogeo.o):neogeo.c:(.text$_ZN13driver_device19driver_i
nit_wrapperI12neogeo_stateXadL_ZNS1_13init_kof2k2c2EvEEEEvR15running_machine[voi
d driver_device::driver_init_wrapper<neogeo_state, &(neogeo_state::init_kof2k2c2
())>(running_machine&)]+0x15): undefined reference to `neogeo_state::init_kof2k2
c2()'
collect2: ld returned 1 exit status
make: *** [mame.exe] Error 1

neogeo.h

Code: [Select]
DECLARE_DRIVER_INIT(kof2k2c2);
neodrvr.c

Code: [Select]
ROM_START( kof2k2c2 )
ROM_REGION( 0x500000, "maincpu", 0 )
ROM_LOAD16_WORD_SWAP( "kof2k2c2_p1.rom", 0x000000, 0x020000, CRC(21a84084) SHA1(973e8a0bffa0e1f055803f663f81a8e03701802d) )
ROM_LOAD16_WORD_SWAP( "kof2k2c2_p2.rom", 0x040000, 0x040000, CRC(febb484e) SHA1(4b1838795b84f22d578ad043641df0a7bf7d9774) )

NEO_SFIX_128K( "kof2k2c2_s1.rom", CRC(a3c9b2d8) SHA1(1472d2cbd7bb73e84824ecf773924007e6117e77) )

NEO_BIOS_AUDIO_128K( "kof2k2c2_m1.rom", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )

ROM_REGION( 0x1000000, "ymsnd", 0 )
ROM_LOAD( "kof2k2c2_v1.rom", 0x000000, 0x800000, CRC(e4ddfb3f) SHA1(eb8220ab01c16cf9244b7f3f9912bec0db561b85) )
ROM_LOAD( "kof2k2c2_v2.rom", 0x800000, 0x800000, CRC(b887d287) SHA1(f593a5722df6f6fac023d189a739a117e976bb2f) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, "sprites", 0 )
ROM_LOAD16_BYTE( "kof2k2c2_c1.rom", 0x0000000, 0x800000, CRC(7a050288) SHA1(55a20c5b01e11a859f096af3f8e09986025d288f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c2.rom", 0x0000001, 0x800000, CRC(e924afcf) SHA1(651e974f7339d2cdcfa58c5398013197a0525b77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kof2k2c2_c3.rom", 0x1000000, 0x800000, CRC(959fad0b) SHA1(63ab83ddc5f688dc8165a7ff8d262df3fcd942a2) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c4.rom", 0x1000001, 0x800000, CRC(efe6a468) SHA1(2a414285e48aa948b5b0d4a9333bab083b5fb853) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kof2k2c2_c5.rom", 0x2000000, 0x800000, CRC(74bba7c6) SHA1(e01adc7a4633bc0951b9b4f09abc07d728e9a2d9) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c6.rom", 0x2000001, 0x800000, CRC(e20d2216) SHA1(5d28eea7b581e780b78f391a8179f1678ee0d9a5) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kof2k2c2_c7.rom", 0x3000000, 0x800000, CRC(fa705b2b) SHA1(f314c66876589601806352484dd8e45bc41be692) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kof2k2c2_c8.rom", 0x3000001, 0x800000, CRC(2c912ff9) SHA1(b624a625ea3e221808b7ea43fb0b1a51d8c1853e) ) /* Plane 2,3 */
ROM_END

Code: [Select]
DRIVER_INIT_MEMBER(neogeo_state,kof2k2c2)
{
DRIVER_INIT_CALL(neogeo);
kf2k2mp2_px_decrypt(machine());
neo_pcm2_swap(machine(), 0);
neogeo_cmc50_m1_decrypt(machine());
neogeo_bootleg_sx_decrypt(machine(), 1);
cmc50_neogeo_gfx_decrypt(machine(), 0xec);
}
~

Code: [Select]
GAME( 2002, kof2k2c2,   neogeo,  neogeo,   neogeo, neogeo_state,   kof2k2c2, ROT0, "bootleg", "The King of Fighters 2002 3rd Strike of Orochi (bootleg)", GAME_SUPPORTS_SAVE )
Okay, this is pissing me ...

After entering the DRIVER_INIT_MEMBER in neodrvr.c it's finally compiled, but when I run the game says that the driver does not exist ...

No more options here :(

EDIT 2:

In addition to adding the driver in neodrvr.ce neogeo.h there some other file to list the game or something? is not loading the game, says that the driver does not exist (unknown system "kof2k2c2") and shows the closest matches

« Last Edit: April 11, 2014, 11:05:29 PM by SeiferAlmasy »

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #9 on: April 12, 2014, 01:08:47 AM »
I had no idea we would have to add the file mame.lst too, is now working!

Thanks and excuse the nuisance

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #10 on: April 12, 2014, 03:54:36 AM »
new problem, now about a Kof 2002 Remix Ultra 3.5

the game boot's ok, but if perform a "new" DM or SDM, neogeo resets...

v1 and v2 are 5 and 7mb of size, how i correct this in driver? perhaps this has crashing emulator, i think

thanks...

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #11 on: June 24, 2014, 03:11:51 AM »
I am posting again to say that I was doing wrong when adding the rom ...

I suppose the MAME, when adding roms tagged "bootleg" assume the bootleg has protections or something ...

Code: [Select]
GAME (2002 kof2k2js, KOF2002, neogeo, neogeo, neogeo_state, neogeo, ROT0, "bootleg", "The King of Fighters 2002 Ultra Remix 3.5 (FCHT / EGHT)," GAME_SUPPORTS_SAVE)
So it was just me change the "bootleg" to "hack" that stopped giving compilation errors saying that was not recorded in neogeo.h and not necessary a DRIVER_INIT_MEMBER (neogeo_state, gamename) of neogeo.c

but this new game added (the first ever works perfectly) when performing the SDM Iori (hcf x 2 + a / c) just resetting the game, and do not know what else to do since the Kawaks and a compilation of MAME (Ash-Build) the same game works perfectly (even was there I took the example of the driver)

Any help would be very welcome in this issue

Thank you

(Sorry, my English is not very good)[/code]
« Last Edit: June 24, 2014, 03:13:14 AM by SeiferAlmasy »

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #12 on: June 24, 2014, 04:11:44 PM »
Code: [Select]
GAME( 2002, kof2k2js,   neogeo,  neogeo,   neogeo, neogeo_state,   neogeo,   ROT0, "hack", "The King of Fighters 2002 Remix Ultra 3.0 (FCHT/EGHT)", GAME_SUPPORTS_SAVE )
GAME( 2002, kf2k2js2,   neogeo,  neogeo,   neogeo, neogeo_state,   neogeo,   ROT0, "hack", "The King of Fighters 2002 Remix Ultra 3.5 (FCHT/EGHT)", GAME_SUPPORTS_SAVE )
GAME( 2002, kf2k2js3,   neogeo,  neogeo,   neogeo, neogeo_state,   neogeo,   ROT0, "hack", "The King of Fighters 2002 Remix Ultra 3.5 (JASON/FCHT)", GAME_SUPPORTS_SAVE )

games loading fine, but the problem continue... only in mame and this game is totally decrypted

Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Re: Error inserting a neogeo game in MAME 0.148
« Reply #13 on: June 24, 2014, 08:14:52 PM »
games loading fine, but the problem continue... only in mame and this game is totally decrypted

If the game boots and the graphics are ok but it crashes in game maybe it's related to encryption/decryption Machine commands??
im no expert but i noticed you have the driver init set like this........

Quote
DRIVER_INIT_MEMBER(neogeo_state,kof2k2c2)
{
   DRIVER_INIT_CALL(neogeo);
   kf2k2mp2_px_decrypt(machine());
   neo_pcm2_swap(machine(), 0);
   neogeo_cmc50_m1_decrypt(machine());
   neogeo_bootleg_sx_decrypt(machine(), 1);
   cmc50_neogeo_gfx_decrypt(machine(), 0xec);
}

kf2k2mp2_px_decrypt(machine()); did you add a encryption/decryption scheme for this define to the neocrypt.c machine file ??
something like this one for sv chaos......

Quote
       void svc_px_decrypt(running_machine &machine)
   {
       static const UINT8 xor1[ 0x20 ] = { 0x3b, 0x6a, 0xf7, 0xb7, 0xe8, 0xa9, 0x20, 0x99, 0x9f, 0x39, 0x34, 0x0c, 0xc3, 0x9a, 0xa5, 0xc8, 0xb8, 0x18, 0xce, 0x56, 0x94, 0x44, 0xe3, 0x7a, 0xf7, 0xdd, 0x42, 0xf0, 0x18, 0x60, 0x92, 0x9f };
       static const UINT8 xor2[ 0x20 ] = { 0x69, 0x0b, 0x60, 0xd6, 0x4f, 0x01, 0x40, 0x1a, 0x9f, 0x0b, 0xf0, 0x75, 0x58, 0x0e, 0x60, 0xb4, 0x14, 0x04, 0x20, 0xe4, 0xb9, 0x0d, 0x10, 0x89, 0xeb, 0x07, 0x30, 0x90, 0x50, 0x0e, 0x20, 0x26 };
       int i;
       int ofst;
       int rom_size = 0x800000;
       UINT8 *rom = machine.root_device().memregion( "maincpu" )->base();
       UINT8 *buf = auto_alloc_array(machine, UINT8,  rom_size );
   
             for( i = 0; i < 0x100000; i++ )
       {
             rom[ i ] ^= xor1[ (BYTE_XOR_LE(i) % 0x20) ];
       }
             for( i = 0x100000; i < 0x800000; i++ )
       {
             rom[ i ] ^= xor2[ (BYTE_XOR_LE(i) % 0x20) ];
       }
   
           for( i = 0x100000; i < 0x0800000; i += 4 )
       {
           UINT16 rom16;
           rom16 = rom[BYTE_XOR_LE(i+1)] | rom[BYTE_XOR_LE(i+2)]<<8;
           rom16 = BITSWAP16( rom16, 15, 14, 13, 12, 10, 11, 8, 9, 6, 7, 4, 5, 3, 2, 1, 0 );
           rom[BYTE_XOR_LE(i+1)] = rom16&0xff;
           rom[BYTE_XOR_LE(i+2)] = rom16>>8;
       }
           memcpy( buf, rom, rom_size );
           for( i = 0; i < 0x0100000 / 0x10000; i++ )
       {
          ofst = (i & 0xf0) + BITSWAP8( (i & 0x0f), 7, 6, 5, 4, 2, 3, 0, 1 );
          memcpy( &rom[ i * 0x10000 ], &buf[ ofst * 0x10000 ], 0x10000 );
       }
        for( i = 0x100000; i < 0x800000; i += 0x100 )
       {
       ofst = (i & 0xf000ff) + ((i & 0x000f00) ^ 0x00a00) + (BITSWAP8( ((i & 0x0ff000) >> 12), 4, 5, 6, 7, 1, 0, 3, 2 ) << 12);
       memcpy( &rom[ i ], &buf[ ofst ], 0x100 );
       }
      memcpy( buf, rom, rom_size );
      memcpy( &rom[ 0x100000 ], &buf[ 0x700000 ], 0x100000 );
      memcpy( &rom[ 0x200000 ], &buf[ 0x100000 ], 0x600000 );
      auto_free( machine, buf );
      }
 
« Last Edit: June 24, 2014, 08:19:45 PM by gamez fan »

Offline SeiferAlmasy

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +1/-0
  • MAME's FAN (Since 1997)
    • vgBR - Videogames Brasil
Re: Error inserting a neogeo game in MAME 0.148
« Reply #14 on: June 24, 2014, 10:04:40 PM »
kof2k2c2 is running perfectly, the problem now is with the set above, kof2k2js / kf2k2js2 / kf2k2js3

These games are giving problem while Iori's DM

Nor is it necessary even in kof2k2c2 this statement above, because my rom is decrypted, then it really becomes unnecessary (at least working 100% here)

I just took the topic ever created for not even having to open another.

Quote
kf2k2mp2_px_decrypt(machine()); did you add a encryption/decryption scheme for this define to the neocrypt.c machine file ??
something like this one for sv chaos......

Yes, but is not used by kof2k2c2 and the hacks that I'm trying to add, I thought I needed but did not, because all the roms are decrypted, the reason I say this is that in Kawaks, if not decrypted, does not work properly.
« Last Edit: June 24, 2014, 10:07:30 PM by SeiferAlmasy »