Author Topic: Please teach and help me!  (Read 14979 times)

Offline XorXe

  • Newbies
  • *
  • Posts: 34
  • Karma: +0/-0
  • Learning 4 Masters ^^
Please teach and help me!
« Reply #15 on: March 27, 2005, 10:36:33 AM »
Yes this is my neogeo.c, i think i have same problems in encrypted sets, so this source only have fully decrypted and bootlegs sets.

Offline fataku

  • Newbies
  • *
  • Posts: 22
  • Karma: +0/-0
  • Junior Member
Please teach and help me!
« Reply #16 on: March 27, 2005, 09:46:46 PM »
your source never call the driver init, thats the reason cause the game doesnt work, check this:

Code: [Select]
/*     YEAR  NAME      PARENT    BIOS    MACHINE INPUT    INIT      MONITOR  */
GAMEB( 2002, matrim,   neogeo,neogeo, neogeo,neogeo, neogeo, ROT0, "Noise Factory / Playmore Corporation / Atlus Corporation", "Power Instinct Matrimelee (Decrypted)" )
GAMEB( 2002, matrimb,  matrim, neogeo, neogeo,neogeo, neogeo, ROT0, "Noise Factory / Playmore Corporation / Atlus Corporation", "Power Instinct Matrimelee (Hero)" )
you have the same INIT for all your sets, always neogeo, try this:

Code: [Select]
/*     YEAR  NAME      PARENT    BIOS    MACHINE INPUT    INIT      MONITOR  */
GAMEB( 2002, matrim,   neogeo,neogeo, neogeo,neogeo, matrim, ROT0, "Noise Factory / Playmore Corporation / Atlus Corporation", "Power Instinct Matrimelee (Decrypted)" )
GAMEB( 2002, matrimb,  matrim, neogeo, neogeo,neogeo, matrimb, ROT0, "Noise Factory / Playmore Corporation / Atlus Corporation", "Power Instinct Matrimelee (Hero)" )
but dont forget to add the right matrimb driver init before.
« Last Edit: May 08, 2005, 05:01:30 AM by iq_132 »

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
You changed more than the M1D you changed the P rom loading as well :(
« Reply #17 on: March 28, 2005, 02:35:08 AM »
Thats not the only problem The way the P roms were loaded for matrim was wrong .

I am not even sure that matrimb set needs a INIT .


Anyway try the driver now :D
IQ Forum Member

Offline fataku

  • Newbies
  • *
  • Posts: 22
  • Karma: +0/-0
  • Junior Member
Please teach and help me!
« Reply #18 on: March 28, 2005, 03:27:12 AM »
Quote from: James33
Thats not the only problem The way the P roms were loaded for matrim was wrong .

I am not even sure that matrimb set needs a INIT .


Anyway try the driver now :D

real matrimelee bootleg set have a scrambled M1 rom and Croms, so it needs a INIT

Offline XorXe

  • Newbies
  • *
  • Posts: 34
  • Karma: +0/-0
  • Learning 4 Masters ^^
Please teach and help me!
« Reply #19 on: March 28, 2005, 04:11:36 AM »
Thanx now the game work ok, so in when i prees F2 to configure level, Flash on, of dont have the option to languaje dont appear but is not important to me  :D

many thanx to all

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Rom names are not the same but CRC appears to be correct
« Reply #20 on: March 28, 2005, 04:58:21 AM »
Quote from: fataku
real matrimelee bootleg set have a scrambled M1 rom and Croms, so it needs a INIT
matrimb seems to be a hack As its title is Power Instinct Matrimelee (Hero) And the rom set does not match the known bootleg of matrimbl that is in kawaks 1.54 and the set I use thats why I said that .

This is the bootleg set of matrimbl I use
Code: [Select]

ROM_START( matrimbl ) /* Bootleg */
        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) )
       
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) )
       
NEO_BIOS_SOUND_128K( "266-m1b.bin", CRC(3ea96ab1) SHA1(e5053c4312f658faed2a34e38325a22ef792d384) )

ROM_REGION( 0X1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
        /* byte swapped */
        ROM_LOAD( "266-v1d.bin", 0x000000, 0x400000, CRC(352b0a07) SHA1(19f7cc12f3f6d0fda9c7449816c4c32367447897) )
ROM_LOAD16_WORD_SWAP( "266-v2d.bin", 0x400000, 0x400000, CRC(1e9bd59e) SHA1(0f754e780d0ebb815a92a45ad55f85f6d0181b70) )
        ROM_LOAD( "266-v3d.bin", 0x800000, 0x400000, CRC(e8362fcc) SHA1(42d558fd80cabe22a1c09a1fa75741afbcf46b7c) )
ROM_LOAD16_WORD_SWAP( "266-v4d.bin", 0xc00000, 0x400000, CRC(c8c79b19) SHA1(9c7a5e694d68f37a27209e1400b60b6241a04cc7) )

        NO_DELTAT_REGION

        ROM_REGION( 0x4000000, REGION_GFX3, 0 )
/* Scrambled GFX */
        ROM_LOAD16_BYTE( "266-c1b.bin", 0x0000000, 0x800000, CRC(a5595656) SHA1(d86281607f22e4f2001047eaeeda99cd673c508c) ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "266-c2b.bin", 0x0000001, 0x800000, CRC(c5f7c300) SHA1(9ff5ffb750bd2e925667d84389192f92183e8677) ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "266-c3b.bin", 0x1000000, 0x800000, CRC(574efd7d) SHA1(6cac303db705fe2800701ee51de9e9fca04e6e66) ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "266-c4b.bin", 0x1000001, 0x800000, CRC(109d54d9) SHA1(22cb748b3b14317b90d9d9951297ada2bfc3a3f1) ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "266-c5b.bin", 0x2000000, 0x800000, CRC(15c9e882) SHA1(1c9f1ccaed4fdd9d8f5cc9b6fcaca3c4e328e59e) ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "266-c6b.bin", 0x2000001, 0x800000, CRC(77497b97) SHA1(c6481bea5a36f8210971fdcb4bfbe7ed93c769de) ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "266-c7b.bin", 0x3000000, 0x800000, CRC(ab481bb6) SHA1(6b2d97c5505eeb28e300b075f37f0d69ef44463a) ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "266-c8b.bin", 0x3000001, 0x800000, CRC(906cf267) SHA1(b0f2cf8887794d715f208751ddd1ed26b2c3ffdf) ) /* Plane 2,3 */
ROM_END


/* cthd2003 matrimbl svcboot Descramble C  */
const unsigned int *_LinePerm;
const unsigned int _LinePermCthd2003[16] = {1,2,3,0,0,4,4,5,1,2,3,0,0,4,4,5};
const unsigned int _LinePermSvcboot[16] = {1,2,1,2,3,0,3,0,0,4,0,4,4,5,4,5};

void ApplyPerm(int Line,unsigned char *Enc,unsigned char *Dec,int GameShift)
{
unsigned int _TilePerm[6][16]=
{
{0,1,2,3,4,5,6,7,8,9,10,11, 12,13,14,15},
{0,2,4,6,8,10,12,14,1,3,5,7, 9,11,13,15},
{0,4,8,12,1,5,9,13,2,6,10,14, 3,7,11,15},
{0,8,1,9,2,10,3,11,4,12,5,13, 6,14,7,15},
{0,8,4,12,2,10,6,14,1,9,5,13, 3,11,7,15},
{0,2,8,10,4,6,12,14,1,3,9,11, 5,7,13,15},
};

const int TileSize=128;
int Perm=_LinePerm[(Line>>(GameShift))&0xF];
int i;
for(i=0;i<16;++i)
{
memcpy(Dec+(Line*2048+i*TileSize), Enc+(_TilePerm[Perm][i]*TileSize),TileSize);
}
}

static void DoPerm(int GameInit)
{
const int LineSize=128*16;
int GFXSIZE= memory_region_length(REGION_GFX3);
int nLines=GFXSIZE/LineSize;
unsigned char Enc[LineSize];
int i;int GameShift=4;
UINT8 *GFXDATA = memory_region(REGION_GFX3);
UINT8 *Dec = (UINT8*)malloc(0x4000000);
if (GameInit==0){
  _LinePerm=_LinePermCthd2003;
  GameShift=5;
        }
if (GameInit==1){
  _LinePerm=_LinePermSvcboot;
  GameShift=4;
        }
for(i=0;i {
memcpy(Enc,GFXDATA+(i*LineSize),LineSize);
ApplyPerm(i,Enc,Dec,GameShift);
}
memcpy(GFXDATA,Dec,0x4000000);
free(Dec);
}


#define MATRIMBLFIX(i) (i^(BITSWAP8(i&0x3,4,3,1,2,0,7,6,5)<<8))

DRIVER_INIT( matrimbl )
{
UINT8 *src = memory_region(REGION_CPU1)+0x100000;
UINT8 *dst = malloc(0x400000);
        int i; int j=0;
        int tx_size = memory_region_length(REGION_GFX1);
        int rom_size = memory_region_length(REGION_GFX3);

unsigned int sec[]={0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000};

if (dst){
memcpy(dst,src,0x400000);
for(i=0;i<8;++i){
memcpy(src+i*0x80000,dst+sec[i],0x80000);
}
free(dst);
}
        DoPerm(0);
src = memory_region(REGION_GFX3)+rom_size-tx_size;
        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)];

        neogeo_fix_bank_type = 2;
        src = memory_region(REGION_CPU2)+0x10000;
        dst = (UINT8*)malloc(0x20000);
        memcpy(dst,src,0x20000);
        for(i=0x00000;i<0x20000;i++){
           if (i&0x10000){
                 if (i&0x800){
                   j=MATRIMBLFIX(i);
                   j=j^0x10000;
                 }else{
                   j=MATRIMBLFIX((i^0x01));
                 }
           }else{
                 if (i&0x800){
                   j=MATRIMBLFIX((i^0x01));
                   j=j^0x10000;
                 }else{
                   j=MATRIMBLFIX(i);
                 }
           }
          src[j]=dst[i];
        }
  free(dst);
memcpy(src-0x10000,src,0x10000);

init_neogeo();
}


GAMEB( 2002, matrimbl, matrim,  neogeo, neogeo, neogeo, matrimbl, ROT0, "Playmore Corporation / Atlus", "Matrimelee (Bootleg)" )
IQ Forum Member

Offline XorXe

  • Newbies
  • *
  • Posts: 34
  • Karma: +0/-0
  • Learning 4 Masters ^^
Please teach and help me!
« Reply #21 on: March 28, 2005, 06:09:56 AM »
Quote from: James33

/* cthd2003 matrimbl svcboot Descramble C  */
const unsigned int *_LinePerm;
const unsigned int _LinePermCthd2003[16] = {1,2,3,0,0,4,4,5,1,2,3,0,0,4,4,5};
const unsigned int _LinePermSvcboot[16] = {1,2,1,2,3,0,3,0,0,4,0,4,4,5,4,5};

void ApplyPerm(int Line,unsigned char *Enc,unsigned char *Dec,int GameShift)
{
   unsigned int _TilePerm[6][16]=
   {
      {0,1,2,3,4,5,6,7,8,9,10,11, 12,13,14,15},
      {0,2,4,6,8,10,12,14,1,3,5,7, 9,11,13,15},
      {0,4,8,12,1,5,9,13,2,6,10,14, 3,7,11,15},
      {0,8,1,9,2,10,3,11,4,12,5,13, 6,14,7,15},
      {0,8,4,12,2,10,6,14,1,9,5,13, 3,11,7,15},
      {0,2,8,10,4,6,12,14,1,3,9,11, 5,7,13,15},
   };

   const int TileSize=128;
   int Perm=_LinePerm[(Line>>(GameShift))&0xF];
   int i;
   for(i=0;i<16;++i)
   {
      memcpy(Dec+(Line*2048+i*TileSize), Enc+(_TilePerm[Perm]*TileSize),TileSize);
   }
}

static void DoPerm(int GameInit)
{
   const int LineSize=128*16;
   int GFXSIZE= memory_region_length(REGION_GFX3);
   int nLines=GFXSIZE/LineSize;
   unsigned char Enc[LineSize];
   int i;int GameShift=4;
   UINT8 *GFXDATA = memory_region(REGION_GFX3);
   UINT8 *Dec = (UINT8*)malloc(0x4000000);
   if (GameInit==0){
      _LinePerm=_LinePermCthd2003;
      GameShift=5;
        }
   if (GameInit==1){
      _LinePerm=_LinePermSvcboot;
      GameShift=4;
        }
   for(i=0;i   {
      memcpy(Enc,GFXDATA+(i*LineSize),LineSize);
      ApplyPerm(i,Enc,Dec,GameShift);
   }
   memcpy(GFXDATA,Dec,0x4000000);
   free(Dec);
}


#define MATRIMBLFIX(i) (i^(BITSWAP8(i&0x3,4,3,1,2,0,7,6,5)<<8))

DRIVER_INIT( matrimbl )
{
   UINT8 *src = memory_region(REGION_CPU1)+0x100000;
   UINT8 *dst = malloc(0x400000);
        int i; int j=0;
        int tx_size = memory_region_length(REGION_GFX1);
        int rom_size = memory_region_length(REGION_GFX3);

   unsigned int sec[]={0x100000,0x280000,0x300000,0x180000,0x000000,0x380000,0x200000,0x080000};

   if (dst){
      memcpy(dst,src,0x400000);
      for(i=0;i<8;++i){
         memcpy(src+i*0x80000,dst+sec,0x80000);
      }
      free(dst);
   }
        DoPerm(0);
   src = memory_region(REGION_GFX3)+rom_size-tx_size;
        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)];

        neogeo_fix_bank_type = 2;
        src = memory_region(REGION_CPU2)+0x10000;
        dst = (UINT8*)malloc(0x20000);
        memcpy(dst,src,0x20000);
        for(i=0x00000;i<0x20000;i++){
           if (i&0x10000){
                 if (i&0x800){
                   j=MATRIMBLFIX(i);
                   j=j^0x10000;
                 }else{
                   j=MATRIMBLFIX((i^0x01));
                 }
           }else{
                 if (i&0x800){
                   j=MATRIMBLFIX((i^0x01));
                   j=j^0x10000;
                 }else{
                   j=MATRIMBLFIX(i);
                 }
           }
          src[j]=dst;
        }
    free(dst);
   memcpy(src-0x10000,src,0x10000);
   
   init_neogeo();
}


This part is in driver init section??
i have the same set of you whit diferent names and i make a driver but i have Z80 error.

this is my driver

Code: [Select]

ROM_START( matrimbl )
ROM_REGION( 0x500000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "266-p1.bin", 0x000000, 0x100000, CRC(5d4c2dc7) )
ROM_LOAD16_WORD_SWAP( "266-p2.bin", 0x100000, 0x400000, CRC(a14b1906) )

/* 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, 0x80000, 0 )
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )

NEO_BIOS_SOUND_128K( "mart_m1.rom", CRC(3EA96AB1) )

ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "mart_v1.rom", 0x000000, 0x400000, CRC(352B0A07) )
ROM_LOAD( "mart_v2.rom", 0x400000, 0x400000, CRC(1E9BD59E) )
ROM_LOAD( "mart_v3.rom", 0x800000, 0x400000, CRC(E8362FCC) )
ROM_LOAD( "mart_v4.rom", 0xc00000, 0x400000, CRC(C8C79B19) )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "MART_C1.ROM", 0x0000000, 0x800000, CRC(A5595656) )
ROM_LOAD16_BYTE( "MART_C2.ROM", 0x0000001, 0x800000, CRC(C5F7C300) )
ROM_LOAD16_BYTE( "MART_C3.ROM", 0x1000000, 0x800000, CRC(574EFD7D) )
ROM_LOAD16_BYTE( "MART_C4.ROM", 0x1000001, 0x800000, CRC(109D54D9) )
ROM_LOAD16_BYTE( "MART_C5.ROM", 0x2000000, 0x800000, CRC(15C9E882) )
ROM_LOAD16_BYTE( "MART_C6.ROM", 0x2000001, 0x800000, CRC(77497B97) )
ROM_LOAD16_BYTE( "MART_C7.ROM", 0x3000000, 0x800000, CRC(AB481BB6) )
ROM_LOAD16_BYTE( "MART_C8.ROM", 0x3000001, 0x800000, CRC(906CF267) )
ROM_END


Add this in the middle of NEOGEO.C (src/drivers/) in the init section.

DRIVER_INIT( matrimbl )
{
/* the S data comes from the end fo the C data */
int i;
UINT8 *src = memory_region(REGION_GFX3) + memory_region_length(REGION_GFX3) - 0x20000;
UINT8 *dst = memory_region(REGION_GFX1);

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

init_neogeo();
}


EDIT
James i try whit your driver but have same Z80 error

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Use all of the driver
« Reply #22 on: March 28, 2005, 07:40:57 AM »
Use the whole driver not part of it .

Looking at things you change things where they should not be changed .
If you are going to use a driver thats posted then use it Do not make changes then complain it does not work .

That matrimbl driver I posted works fine So without a doubt you doing things wrong .
IQ Forum Member

Offline XorXe

  • Newbies
  • *
  • Posts: 34
  • Karma: +0/-0
  • Learning 4 Masters ^^
Please teach and help me!
« Reply #23 on: March 28, 2005, 09:21:12 PM »
Thanx i rename my roms and work perfect  :)

James please post your kof2000 driver my dirver have bad gfx

this is my driver

EDIT: I fix problem :)

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Please teach and help me!
« Reply #24 on: March 29, 2005, 04:58:56 AM »
kof2000 is officaly supported  So no need to post the driver .
IQ Forum Member

Offline XorXe

  • Newbies
  • *
  • Posts: 34
  • Karma: +0/-0
  • Learning 4 Masters ^^
Please teach and help me!
« Reply #25 on: March 29, 2005, 08:00:43 AM »
And in kof2003 how to make to run in unibios??
text only in japanesse and run only in arcade mode.

and in mslug3 the game dont start, i have a black screen after unbios screen.