Jump to content

NeoGeo games drivers - I need help.


Recommended Posts

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

How come the yellow word of "MAGIC PLUS" doesn't show on the Mame32 screen but it does on the Mame Plus screen? It weard it does that. It like it wasn't even on the Mame32 at all.

 

ROM_START( kof2k2mp )
ROM_REGION( 0x500000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "265-p1mp.bin", 0x000000, 0x300000, CRC(ff7c6ec0) SHA1(704c14d671dcb4cfed44d9f978a289cb7dd9d065) )
ROM_CONTINUE( 0x000000, 0x100000 )
ROM_LOAD16_WORD_SWAP( "265-p2mp.bin", 0x100000, 0x400000, CRC(91584716) SHA1(90da863037cf775957fa154cd42536e221df5740) )

NEO_SFIX_128K( "265-s1mp.bin", CRC(348d6f2c) SHA1(586da8a936ebbb71af324339a4b60ec91dfa0990) )

NEO_BIOS_SOUND_128K( "265-m1_decrypted.bin", CRC(1c661a4b) SHA1(4e5aa862a0a182a806d538996ddc68d9f2dffaf7) )

ROM_REGION( 0x1000000, REGION_SOUND1, 0 )
ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f
5) 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( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) )
ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) )
ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) )
ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) )
ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) )
ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) )
ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) )
ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) )
ROM_END

static void kof2k2mp_sx_decrypt( void )
{
UINT8 *rom = memory_region( REGION_GFX1 );
int rom_size = memory_region_length( REGION_GFX1 );
int i;

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

DRIVER_INIT( kof2k2mp )
{
unsigned char *src = memory_region(REGION_CPU1);
unsigned char *dst = (unsigned char*)malloc(0x80);
int i, j;

if (dst)
{
 for (i = 0; i < 0x500000; 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);
neogeo_fix_bank_type = 0;
kof2k2mp_sx_decrypt();
kof2000_neogeo_gfx_decrypt(0xec);
neo_pcm2_swap(0);
init_neogeo();
}

 

Ok here is what I try out. It very messy on the screen.

 

kof2k2mp0se.th.png

 

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 );
   }
}

DRIVER_INIT( kof2k2mp )
{
unsigned char *src = memory_region(REGION_CPU1);
unsigned char *dst = (unsigned char*)malloc(0x80);
int i, j;

if (dst)
{
 for (i = 0; i < 0x500000; 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);

       sx_decrypt(2);
init_neogeo();
}

Edited by KillerBee
Link to comment
Share on other sites

Because you are missing code. And Mame plus uses its own code.

 

Can the Mame32 use the code that Mame Plus uses?

 

Point me where to look at. I want to try the code out. Maybe I can get it to work if I coding it in.

 

 

Yes you can

src\machine\neocrypt.c

 

I need these.

 

/* the S data comes from the end of the C data */
void neogeo_sfix_decrypt(void)
{
int i;
int rom_size = memory_region_length(REGION_GFX3);
int tx_size = memory_region_length(REGION_GFX1);
UINT8 *src = memory_region(REGION_GFX3)+rom_size-tx_size;
UINT8 *dst = memory_region(REGION_GFX1);

for (i = 0;i < tx_size;i++)
 dst[i] = src[(i & ~0x1f) + ((i & 7) << 2) + ((~i & 8) >> 2) + ((i & 0x10) >> 4)];
}


/* CMC42 protection chip */
void kof99_neogeo_gfx_decrypt(int extra_xor)
{
type0_t03 =          kof99_type0_t03;
type0_t12 =          kof99_type0_t12;
type1_t03 =          kof99_type1_t03;
type1_t12 =          kof99_type1_t12;
address_8_15_xor1 =  kof99_address_8_15_xor1;
address_8_15_xor2 =  kof99_address_8_15_xor2;
address_16_23_xor1 = kof99_address_16_23_xor1;
address_16_23_xor2 = kof99_address_16_23_xor2;
address_0_7_xor =    kof99_address_0_7_xor;
neogeo_gfx_decrypt(extra_xor);
neogeo_sfix_decrypt();
}

/* CMC50 protection chip */
void kof2000_neogeo_gfx_decrypt(int extra_xor)
{
type0_t03 =          kof2000_type0_t03;
type0_t12 =          kof2000_type0_t12;
type1_t03 =          kof2000_type1_t03;
type1_t12 =          kof2000_type1_t12;
address_8_15_xor1 =  kof2000_address_8_15_xor1;
address_8_15_xor2 =  kof2000_address_8_15_xor2;
address_16_23_xor1 = kof2000_address_16_23_xor1;
address_16_23_xor2 = kof2000_address_16_23_xor2;
address_0_7_xor =    kof2000_address_0_7_xor;
neogeo_gfx_decrypt(extra_xor);
neogeo_sfix_decrypt();

/* here I should also decrypt the sound ROM */
}

/* CMC42 protection chip */
void cmc42_neogeo_gfx_decrypt(int extra_xor)
{
type0_t03 =          kof99_type0_t03;
type0_t12 =          kof99_type0_t12;
type1_t03 =          kof99_type1_t03;
type1_t12 =          kof99_type1_t12;
address_8_15_xor1 =  kof99_address_8_15_xor1;
address_8_15_xor2 =  kof99_address_8_15_xor2;
address_16_23_xor1 = kof99_address_16_23_xor1;
address_16_23_xor2 = kof99_address_16_23_xor2;
address_0_7_xor =    kof99_address_0_7_xor;
neogeo_gfx_decrypt(extra_xor);
}

/* CMC50 protection chip */
void cmc50_neogeo_gfx_decrypt(int extra_xor)
{
type0_t03 =          kof2000_type0_t03;
type0_t12 =          kof2000_type0_t12;
type1_t03 =          kof2000_type1_t03;
type1_t12 =          kof2000_type1_t12;
address_8_15_xor1 =  kof2000_address_8_15_xor1;
address_8_15_xor2 =  kof2000_address_8_15_xor2;
address_16_23_xor1 = kof2000_address_16_23_xor1;
address_16_23_xor2 = kof2000_address_16_23_xor2;
address_0_7_xor =    kof2000_address_0_7_xor;
neogeo_gfx_decrypt(extra_xor);

/* here I should also decrypt the sound ROM */
}

 

Also I need this. src\includes\neogeo

 

/*----------- defined in machine/neocrypt.c -----------*/

extern int neogeo_fix_bank_type;

void kof99_neogeo_gfx_decrypt(int extra_xor);
void kof2000_neogeo_gfx_decrypt(int extra_xor);
void cmc42_neogeo_gfx_decrypt(int extra_xor);
void cmc50_neogeo_gfx_decrypt(int extra_xor);
void neogeo_sfix_decrypt(void);

/*----------- defined in vidhrdw/neogeo.c -----------*/

Edited by KillerBee
Link to comment
Share on other sites

I am completely mystified as to what this is all about. I only added one line into neocrypt.c

If you look at the bottom of that file you will see ( For Mame Plus )

Rather silly to change it since code in drivers\neogeo.c uses it. So I just make use of it as well.

Since ita already there I need not add anything.

The normal mame32 I use somthing else that just add a line for the game that needs it.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...