Author Topic: DRIVER_INIT( pnyaa ) - Help!  (Read 3235 times)

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
DRIVER_INIT( pnyaa ) - Help!
« on: November 24, 2005, 04:12:25 AM »
I get this error bellow in drivers/neogeo.c.

In function 'init_pnyaa'
7049: warning: ISO C90 forbids mixed declarations and code make.

There is something that I don't know about in this bellow and I got the UINT16 right I think.

Code: [Select]
DRIVER_INIT( pnyaa )
{
neogeo_fix_bank_type = 1;
kof2000_neogeo_gfx_decrypt(0x2f);
init_neogeo();

UINT16 *rom;
int i,j;

/* thanks to Elsemi for the NEO-PCM2 info */
rom = (UINT16 *)(memory_region(REGION_SOUND1));
if( rom != NULL )
{
/* swap address lines on the whole ROMs */
for( i = 0; i < 0x400000 / 2; i += 4 / 2 )
{
UINT16 buffer[ 4 / 2 ];
memcpy( buffer, &rom[ i ], 4 );
for( j = 0; j < 4 / 2; j++ )
{
rom[ i + j ] = buffer[ j ^ 1 ];
}
}
}
}

I have no idea what is wrong. :confused:

Just incase you ask for this bellow.

Code: [Select]
ROM_START( pnyaa )
ROM_REGION( 0x100000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "267-p1.bin", 0x000000, 0x100000, CRC(112fe2c0) SHA1(01420e051f0bdbd4f68ce306a3738161b96f8ba8) )

        ROM_REGION( 0x20000, REGION_GFX1, 0 )
        ROM_FILL( 0x000000, 0x20000, 0 )
        ROM_REGION( 0x20000, REGION_GFX2, 0 )
        ROM_LOAD( "sfix.sfx",  0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )

ROM_REGION( 0x80000, REGION_USER4, 0 )
ROM_LOAD( "267-m1.bin", 0x00000, 0x80000, CRC(c7853ccd) SHA1(1b7a4c5093cf0fe3861ce44fd1d3b30c71ad0abe) )
NEO_BIOS_SOUND_512K( "267-m1d.bin", CRC(d58eaa8e) SHA1(4c4faf1da671a41b4d854790eb623a40cb35f256) )

ROM_REGION( 0x400000, REGION_SOUND1, 0)

ROM_LOAD( "267-v1.bin", 0x000000, 0x400000, CRC(e2e8e917) SHA1(7f412d55aebff3d38a225a88c632916295ab0584) )

NO_DELTAT_REGION

ROM_REGION( 0x1000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "267-c1.bin", 0x0000000, 0x800000, CRC(2e20617a) SHA1(ed73724377a321aa024a5886eb148c416d4451aa) )
ROM_LOAD16_BYTE( "267-c2.bin", 0x0000001, 0x800000, CRC(4edfa720) SHA1(1407a1d0d44f73c1a196c95d368d6451b17f6176) )
ROM_END
« Last Edit: November 24, 2005, 05:37:54 AM by KingHanco »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3619
  • Karma: +385/-0
  • Bare Knuckle!
    • NeoSource
Re: DRIVER_INIT( pnyaa ) - Help!
« Reply #1 on: November 24, 2005, 06:11:11 AM »
Quote
In function 'init_pnyaa'
7049: warning: ISO C90 forbids mixed declarations and code make.

Why not just use the code that's built into MAME for PCM2 V1 (1999)?

Code: [Select]
DRIVER_INIT( pnyaa )
{
neo_pcm2_snk_1999(4);
neogeo_fix_bank_type = 1;
kof2000_neogeo_gfx_decrypt(0x2E);
init_neogeo();
}


Believe it or not, that's it.

BTW, I think the gfx key is 2E ^^
« Last Edit: November 24, 2005, 06:18:10 AM by iq_132 »


Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: DRIVER_INIT( pnyaa ) - Help!
« Reply #2 on: November 24, 2005, 05:34:59 PM »
It works iq_132. Thanks. It play great without all that coding. :biggrin:

Btw: I'm hook on this game.

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: DRIVER_INIT( pnyaa ) - Help!
« Reply #3 on: November 25, 2005, 02:02:06 AM »
Quote from: Robert

Also, if you like, you can remove the line with REGION_USER4 in it and the line under it. It's a waste of a rom.

IQ, I never knew about that pcm thingy that is something I should investigate and learn.


EDIT: Just tried IQ's suggested driver, and as you would expect, it worked perfectly.  :)

I hope you back up those so called useless roms because one day they will be needed , . That is why that code is there. It makes sure it has the correct roms . You might want to play the game but many here like the idea of haveing the correct roms .
« Last Edit: November 25, 2005, 02:03:20 AM by James33 »
IQ Forum Member

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: DRIVER_INIT( pnyaa ) - Help!
« Reply #4 on: November 25, 2005, 11:00:45 PM »
I never throw out roms. And I don't delete the lines, just comment them out. One day someone will work out how to use them.

I leave the code alone since its not doing any harm by being there .
IQ Forum Member

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: DRIVER_INIT( pnyaa ) - Help!
« Reply #5 on: November 26, 2005, 01:31:32 PM »
Robert

If you takeout the REGION_USER4 code then somethings will be broking after that.