General Emulation > MAME

Power Instinct Matrimelee [Driver]

(1/3) > >>

X-or:
final driver for the original encrypted set (100% verified)
2nd p-rom is slightly scrambled
sound roms use neo-pcm2
you can rename pwrinst4 to matrim if you feel like it
I recommand you to remove the bootleg from your build as it's adding nothing



--- Code: ---ROM_START( pwrinst4 ) /* Original Version - Encrypted */
/* Encrypted p2 */
ROM_REGION( 0x500000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "266-p1.bin", 0x000000, 0x100000, CRC(5d4c2dc7) SHA1(8d723b0d28ec344eef26009b361a2b97d300dd51) )
ROM_LOAD16_WORD_SWAP( "266-p2.bin", 0x100000, 0x400000, CRC(a14b1906) SHA1(1daa14d73512f760ef569b06f9facb279437d1db) )

/* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, REGION_GFX1, 0 )
ROM_FILL(                 0x000000, 0x20000, 0 )
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx",  0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )

/* The M1 ROM is encrypted, we load it here for reference and replace it with a decrypted version */
ROM_REGION( 0x20000, REGION_USER4, 0 )
ROM_LOAD_OPTIONAL( "266-m1.bin", 0x00000, 0x20000, CRC(456c3e6c) SHA1(5a07d0186198a18d2dda1331093cf29b0b9b2984) )
NEO_BIOS_SOUND_128K( "266-m1d.bin", CRC(f692d84b) SHA1(a3737c574e779e0330916a2eea6ad5b3839f9538) )

/* Encrypted */
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "266-v1.bin", 0x000000, 0x800000, CRC(a4f83690) SHA1(200d683d8c30ebc6d0ed331aa5bbba39b4e07160) )
ROM_LOAD( "266-v2.bin", 0x800000, 0x800000, CRC(d0f69eda) SHA1(9d7e98976ad433ed8a35d7afffa38130444ba7db) )

NO_DELTAT_REGION

/* Encrypted */
ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "266-c1.bin", 0x0000000, 0x800000, CRC(505f4e30) SHA1(f22b6f76fc0cad963555dc89d072967c8dc8b79a) )
ROM_LOAD16_BYTE( "266-c2.bin", 0x0000001, 0x800000, CRC(3cb57482) SHA1(dab15bc24391f9a5173de76af48b612fb9636ccf) )
ROM_LOAD16_BYTE( "266-c3.bin", 0x1000000, 0x800000, CRC(f1cc6ad0) SHA1(66c1cccc0332ffd2d3064f06330c41f95ca09ced) )
ROM_LOAD16_BYTE( "266-c4.bin", 0x1000001, 0x800000, CRC(45b806b7) SHA1(c2bb866fded53d62fad0fc88d89d5e7d4cb1894f) )
ROM_LOAD16_BYTE( "266-c5.bin", 0x2000000, 0x800000, CRC(9a15dd6b) SHA1(194a6973a7a9e3847efe1bdbaeaeb16e74aff2dd) )
ROM_LOAD16_BYTE( "266-c6.bin", 0x2000001, 0x800000, CRC(281cb939) SHA1(bdb7766cfde581ccfaee2be7fe48445f360a2301) )
ROM_LOAD16_BYTE( "266-c7.bin", 0x3000000, 0x800000, CRC(4b71f780) SHA1(d5611a6f6b730db58613b48f2b0174661ccfb7bb) )
ROM_LOAD16_BYTE( "266-c8.bin", 0x3000001, 0x800000, CRC(29873d33) SHA1(dc77f129ed49b8d40d0d4241feef3f6c2f19a987) )
ROM_END

static void matrim_vx_decrypt( void )
{
const unsigned char xor[ 0x08 ] = {
0xc4, 0x83, 0xa8, 0x5f, 0x21, 0x27, 0x64, 0xaf
};

int vx_size = memory_region_length( REGION_SOUND1 );
UINT8 *rom = memory_region( REGION_SOUND1 );
UINT8 *buf = malloc( vx_size );
int ofst;

memcpy( buf, rom, vx_size );

for( int i = 0; i < vx_size; i++ ){
ofst = (i & 0xfefffe) |
  ((i & 0x010000) >> 16) |
  ((i & 0x000001) << 16);

ofst ^= 0x01000;

rom[ ofst ] = buf[ ((i + 0xffce20) & 0xffffff) ] ^ xor[ (ofst & 0x07) ];
}

free( buf );
}

DRIVER_INIT( pwrinst4 )
{
int i;
unsigned int sec[]={0x100000,0x280000,0x300000,0x180000,
0x000000,0x380000,0x200000,0x080000};
UINT8 *src = memory_region(REGION_CPU1)+0x100000;
UINT8 *dst = malloc(0x400000);
if (dst)
{
memcpy(dst,src,0x400000);
for(i=0;i<8;++i)
{
memcpy(src+i*0x80000,dst+sec[i],0x80000);
}
free(dst);
}
matrim_vx_decrypt();
neogeo_fix_bank_type = 2;
kof2000_neogeo_gfx_decrypt(0x6a);
init_neogeo();
}

/* Noise Factory */
GAMEB( 2003, pwrinst4, neogeo,   neogeo, neogeo, neogeo,  pwrinst4, ROT0, "Noise Factory / Atlus Corporation", "Matrimelee - Shin Goketsuji Ichizoku" )
--- End code ---

James33:
Known as Matrimelee  I have the cart so I am sure .

I use this

This part of the code only needs to be used once because the code is for more than one game


--- Code: ---
/* Code by fataku */
// © PLAYMORE 2002 20-09-2004
static void neo_pcm2_playmore_2002(int value)
{
        //kof2002,matrimelee,mslug5 (pcb and mvs),samsho5,svcchaos (pcb and mvs),kof2003 (pcb and mvs),samsh5sp (mvs and aes)
        //offset,xor address
        unsigned int addrs[7][2]={
                 {0x000000,0xA5000}, //kof2002
                 {0xFFCE20,0x01000}, //matrimelee
                 {0xFE2CF6,0x4E001}, //mslug5
                 {0xFEB2C0,0x0A000}, //samsho5
                 {0xFFAC28,0xC2000}, //svcchaos
                 {0x000000,0x00000}, //kof2003
                 {0xFFB440,0x02000}, //samsh5sp
                 };
        unsigned int xordata[7][8]={
                 {0xF9,0xE0,0x5D,0xF3,0xEA,0x92,0xBE,0xEF}, //kof2002
                 {0xC4,0x83,0xA8,0x5F,0x21,0x27,0x64,0xAF}, //matrimelee
                 {0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E}, //mslug5
                 {0xCB,0x29,0x7D,0x43,0xD2,0x3A,0xC2,0xB4}, //samsho5
                 {0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E}, //svcchaos
                 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, //kof2003
                 {0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62}, //samsh5sp
                 };

UINT8 *src = memory_region(REGION_SOUND1);
UINT8 *buf = malloc(0x1000000);
int i, j, d;

        memcpy(buf,src,0x1000000);
        for (i=0;i

X-or:
:eek: this is looking damn good James

where have you found that code?

James33:
On this board (forum)
http://neo-source.com/index.php?topic=52.0

KingHanco:
I want to try to coding this in.

Where and what files do I added this in at?

Navigation

[0] Message Index

[#] Next page

Go to full version