Author Topic: Kof 2002 Magic Plus is out !  (Read 8540 times)

Offline Ashura-X

  • Member
  • ***
  • Posts: 136
  • Karma: +0/-0
Kof 2002 Magic Plus is out !
« on: August 17, 2005, 07:29:30 AM »
So .. anyone of my friends here could put a mame driver for this game please  :biggrin:

Best regards...

Ash ( lazy and leecher always )  LOL

Offline Bear

  • Newbies
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Kof 2002 Magic Plus is out !
« Reply #1 on: August 17, 2005, 07:27:45 PM »
I´m sure iq_132 has a surprise for you  :smilie:

Offline iq_132

  • Administrator
  • *****
  • Posts: 3619
  • Karma: +385/-0
  • Bare Knuckle!
    • NeoSource
Re: Kof 2002 Magic Plus is out !
« Reply #2 on: August 17, 2005, 08:22:02 PM »
Code: [Select]
ROM_START( kf2k2mag )
ROM_REGION( 0x800000, REGION_CPU1, 0 ) /* Encrypted Program Data */
ROM_LOAD16_WORD_SWAP( "kf02m-p1.bin", 0x000000, 0x400000, CRC(ff7c6ec0) )
ROM_LOAD16_WORD_SWAP( "kf02m-p2.bin", 0x400000, 0x400000, CRC(91584716) )

NEO_SFIX_128K( "kf02m-s1.bin", CRC(348d6f2c) )

NEO_BIOS_SOUND_128K( "kf2k2_m1.rom", CRC(ab9d360e) )

ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "kf2k2_v1.rom", 0x000000, 0x400000, CRC(13d98607) )
ROM_LOAD( "kf2k2_v2.rom", 0x400000, 0x400000, CRC(9cf74677) )
ROM_LOAD( "kf2k2_v3.rom", 0x800000, 0x400000, CRC(8e9448b5) )
ROM_LOAD( "kf2k2_v4.rom", 0xc00000, 0x400000, CRC(067271b5) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
/* Encrypted */
ROM_LOAD16_BYTE( "kf2k2_c1.rom", 0x0000000, 0x800000, CRC(7efa6ef7) )
ROM_LOAD16_BYTE( "kf2k2_c2.rom", 0x0000001, 0x800000, CRC(aa82948b) )
ROM_LOAD16_BYTE( "kf2k2_c3.rom", 0x1000000, 0x800000, CRC(959fad0B) )
ROM_LOAD16_BYTE( "kf2k2_c4.rom", 0x1000001, 0x800000, CRC(efe6a468) )
ROM_LOAD16_BYTE( "kf2k2_c5.rom", 0x2000000, 0x800000, CRC(74bba7c6) )
ROM_LOAD16_BYTE( "kf2k2_c6.rom", 0x2000001, 0x800000, CRC(e20d2216) )
ROM_LOAD16_BYTE( "kf2k2_c7.rom", 0x3000000, 0x800000, CRC(8a5b561c) )
ROM_LOAD16_BYTE( "kf2k2_c8.rom", 0x3000001, 0x800000, CRC(bef667a3) )
ROM_END




static void kf2k2mag_decrypt( void )
{
int i,j;

unsigned char *src = memory_region(REGION_CPU1);
unsigned char *dst = (unsigned char*)malloc(0x80);

memcpy(src, src + 0x300000, 0x500000);

if (dst)
{
for (i = 0; i < 0x800000; i+=0x80)
{
for (j = 0; j < 0x80 / 2; j++)
{
int ofst = BITSWAP8( j, 6, 7, 2, 3, 4, 5, 0, 1 );
memcpy(dst + j * 2, src + i + ofst * 2, 2);
}
memcpy(src + i, dst, 0x80);
}
}
free(dst);
}

DRIVER_INIT( kf2k2mag )
{
kf2k2mag_decrypt();
svcsplus_sx_decrypt();
init_neogeo();
}


Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: Kof 2002 Magic Plus is out !
« Reply #3 on: August 18, 2005, 05:59:35 AM »
Yeah IQ posted over at Romshare .


This works as well

Code: [Select]
// code by IQ_132 - http://neosource.1emu.net
// Based on code by Halrin - http://www52.tok2.com/home/foge/
DRIVER_INIT( kof2k2mp )
{
int i,j;

unsigned char *src = memory_region(REGION_CPU1);
unsigned char *dst = (unsigned char*)malloc(0x80);

memcpy(src, src + 0x300000, 0x500000);

if (dst)
{
for (i = 0; i < 0x800000; i+=0x80)
{
for (j = 0; j < 0x80 / 2; j++)
{
int ofst = BITSWAP8( j, 6, 7, 2, 3, 4, 5, 0, 1 );
memcpy(dst + j * 2, src + i + ofst * 2, 2);
}
memcpy(src + i, dst, 0x80);
}
}
free(dst);
svcsplus_sx_decrypt();

init_neogeo();
}
« Last Edit: August 18, 2005, 06:02:08 AM by James33 »
IQ Forum Member

Offline Ashura-X

  • Member
  • ***
  • Posts: 136
  • Karma: +0/-0
Re: Kof 2002 Magic Plus is out !
« Reply #4 on: August 18, 2005, 08:37:09 AM »
Thanks a lot guys !!!!!!  :eek:

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: Kof 2002 Magic Plus is out !
« Reply #5 on: December 06, 2005, 06:57:56 AM »
Deleted. Better off remove it.
« Last Edit: December 07, 2005, 03:56:29 AM by KingHanco »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3619
  • Karma: +385/-0
  • Bare Knuckle!
    • NeoSource
Re: Kof 2002 Magic Plus is out !
« Reply #6 on: December 06, 2005, 07:24:08 AM »
I decident to try this game out. But what do I need to make a DRIVER_INIT for this one?

Code: [Select]
ROM_START( kf2k2mp )
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf02m-p1.bin", 0x000000, 0x400000, CRC(ff7c6ec0) )
ROM_LOAD16_WORD_SWAP( "kf02m-p2.bin", 0x400000, 0x400000, CRC(91584716) )

NEO_SFIX_128K( "kf02m-s1.bin", CRC(348d6f2c) )

ROM_REGION( 0x020000, REGION_USER4, 0 )
ROM_LOAD( "265-m1_decrypted.bin", 0x00000, 0x020000, CRC(1c661a4b) SHA1(4e5aa862a0a182a806d538996ddc68d9f2dffaf7) )

NEO_BIOS_SOUND_128K( "265-m1.bin", CRC(85aaa632) SHA1(744fba4ca3bc3a5873838af886efb97a8a316104) )

ROM_REGION( 0x1000000, REGION_SOUND1, 0 )
ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "kf2k2_c1.rom", 0x0000000, 0x800000, CRC(7efa6ef7) SHA1(71345a4202e7cc9239538fb978638141416c8893) )
ROM_LOAD16_BYTE( "kf2k2_c2.rom", 0x0000001, 0x800000, CRC(aa82948b) SHA1(b2a40797f68bdeb80bc54dccc5495be68934bf0e) )
ROM_LOAD16_BYTE( "kf2k2_c3.rom", 0x1000000, 0x800000, CRC(959fad0b) SHA1(63ab83ddc5f688dc8165a7ff8d262df3fcd942a2) )
ROM_LOAD16_BYTE( "kf2k2_c4.rom", 0x1000001, 0x800000, CRC(efe6a468) SHA1(2a414285e48aa948b5b0d4a9333bab083b5fb853) )
ROM_LOAD16_BYTE( "kf2k2_c5.rom", 0x2000000, 0x800000, CRC(74bba7c6) SHA1(e01adc7a4633bc0951b9b4f09abc07d728e9a2d9) )
ROM_LOAD16_BYTE( "kf2k2_c6.rom", 0x2000001, 0x800000, CRC(e20d2216) SHA1(5d28eea7b581e780b78f391a8179f1678ee0d9a5) )
ROM_LOAD16_BYTE( "kf2k2_c7.rom", 0x3000000, 0x800000, CRC(8a5b561c) SHA1(a19697d4c2cc8edebc669c95ae1db4c8c2a70b2c) )
ROM_LOAD16_BYTE( "kf2k2_c8.rom", 0x3000001, 0x800000, CRC(bef667a3) SHA1(d5e8bc185dcf63343d129c31d2ddab9f723f1a12) )
ROM_END



Are you kidding me? Scroll up a few posts... grrr. 
This is not going to keep going on for very long. :mad:


Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: Kof 2002 Magic Plus is out !
« Reply #7 on: December 06, 2005, 07:28:16 AM »
Ok I won't use the one above because it missing the svcsplus_sx_decrypt stuffs.

Romshare - I can't find the full driver there.

Will this neo_pcm2_playmore_2002(4); work?
« Last Edit: December 06, 2005, 07:50:42 AM by KingHanco »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3619
  • Karma: +385/-0
  • Bare Knuckle!
    • NeoSource
Re: Kof 2002 Magic Plus is out !
« Reply #8 on: December 06, 2005, 10:55:54 PM »
Ok I won't use the one above because it missing the svcsplus_sx_decrypt stuffs.

Romshare - I can't find the full driver there.

Will this neo_pcm2_playmore_2002(4); work?


Why not use the search function for svcsplus ?? I know it's hard to connect the dots, but try ;)

and as for the pcm2 value, maybe you should look back what pcm values games that use kof2002's V roms needs  :idiot: We already had a long topic about this...


Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: Kof 2002 Magic Plus is out !
« Reply #9 on: December 07, 2005, 03:50:43 AM »
The kof2002 v is the neo_pcm2_playmore_2002(0);

I get an error using this. svcsplus_sx_decrypt();

'svcsplus_sx_decrypt'

'for' loop initial declaration used outside C99 mode

Code: [Select]
static void svcsplus_sx_decrypt( void )
{
       UINT8 *rom = memory_region( REGION_GFX1 );
       int size = memory_region_length( REGION_GFX1 );

       for( int i = 0; i < size; i++ ){
       rom[ i ] = BITSWAP8( rom[ i ], 7, 6, 0, 4, 3, 2, 1, 5 );
    }
}

DRIVER_INIT( kof2k2mp )
{
       int i,j;

       unsigned char *src = memory_region(REGION_CPU1);
       unsigned char *dst = (unsigned char*)malloc(0x80);

       memcpy(src, src + 0x300000, 0x500000);

       if (dst)
       {
       for (i = 0; i < 0x800000; i+=0x80)
       {
       for (j = 0; j < 0x80 / 2; j++)
       {
       int ofst = BITSWAP8( j, 6, 7, 2, 3, 4, 5, 0, 1 );
       memcpy(dst + j * 2, src + i + ofst * 2, 2);
       }
       memcpy(src + i, dst, 0x80);
       }
       }
       free(dst);

       svcsplus_sx_decrypt();
    init_neogeo();
}
« Last Edit: December 07, 2005, 10:03:12 AM by KingHanco »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3619
  • Karma: +385/-0
  • Bare Knuckle!
    • NeoSource
Re: Kof 2002 Magic Plus is out !
« Reply #10 on: December 07, 2005, 10:59:38 AM »
or replace this:
Code: [Select]
static void svcsplus_sx_decrypt( void )
{
       UINT8 *rom = memory_region( REGION_GFX1 );
       int size = memory_region_length( REGION_GFX1 );

       for( int i = 0; i < size; i++ ){
       rom[ i ] = BITSWAP8( rom[ i ], 7, 6, 0, 4, 3, 2, 1, 5 );
    }
}
With this:
Code: [Select]
static void svcsplus_sx_decrypt( void )
{
int i;
UINT8 *rom = memory_region( REGION_GFX1 );
for( i = 0; i < 0x20000; i++)
rom[i] = BITSWAP8(rom[i], 7, 6, 0, 4, 3, 2, 1, 5);
}


Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: Kof 2002 Magic Plus is out !
« Reply #11 on: December 07, 2005, 12:32:20 PM »
I got it working now. It took me a while to find out what I did wrong because of tthe yellow screen.

I had the driver have to point on the  kof2k2nd not on the kof2002. If it was point on the kof2k2nd then the graphics will be broking and I will be getting a yellow screen.

The Mame Plus have the different roms settings. I couldn't get the yellow word "MAGIC" on the screen to showup on my build. Instead it not showing with that word. But it is playing without it which is odd. But I did try the Mame Plus 0.102u2 and it working on it fully with the yellow word "MAGIC" with extra coding which I found on the neocrypt.c (MAMESRC\src\machine) and on the neogeo.c (MAMESRC\src\drivers).
« Last Edit: December 08, 2005, 12:38:28 AM by KingHanco »