Welcome!
General Emulation => MAME => Topic started by: James33 on March 10, 2005, 07:21:34 AM
-
Has anyone worked out the code that extracts the S rom data from the C roms
I use this code But it does not work properly .
neogeo_fix_bank_type = 0;
/* the S data comes from the end of the C data */
{
int rom_size;
int i;
int tx_size = memory_region_length(REGION_GFX1);
rom_size = memory_region_length(REGION_GFX3);
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)];
}
-
i think s1 is from p1... info from iq.. i donno...
-
I was thinking it was in the P rom .Now I wonder How it can be emulated from the P rom .
-
Well, supposedly, the S data comes from the P.
The program loads the S data, which there is two copies of, apparently, as it needs it.
So if it needs the first bit of S data, it loads that, and if It needs the second bit, it loads that.
-
the unibios text layer & game text are in the same addy... so 128k will not fix both :(
we need 512k or hack the p rom..
-
Is there any S rom fixes yet ?
-
i tried to fix it but u cannot fix both unibios & game (i think.., unless u use 512k)
-
is there a way to fix the problem with "continue" screen ?
-
Does anyone know how to convert BlackDiamond's lastest FBA code to Mame ?
This what I have
ROM_START( kof10th ) /* this is a hack of kof2002 much like the various korean hacks / bootlegs of games */
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "275-p1.bin", 0x100000, 0x600000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_CONTINUE( 0x000000, 0x100000 )
ROM_CONTINUE( 0x700000, 0x100000 )
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( "275-m1d.bin", CRC(5198a41c) SHA1(7dbfd9e07a364758c0b97da03e5d38b29aba5ed4) )
// NEO_BIOS_SOUND_128K( "kf10-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "275-v1d.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
ROM_LOAD( "275-v2d.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )
NO_DELTAT_REGION
ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "275-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c1b.bin", 0x0800000, 0x400000, CRC(b5abfc28) SHA1(eabf60992bb3485c95330065294071ec155bfe7c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c2b.bin", 0x0800001, 0x400000, CRC(6cc4c6e1) SHA1(be824a944e745ee18efdc45c81fd496a4d624b9c) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c3a.bin", 0x1000000, 0x400000, CRC(5b3d4a16) SHA1(93ac1cd7739100f8c32732644f81f2a19837b131) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c4a.bin", 0x1000001, 0x400000, CRC(c6f3419b) SHA1(340c17a73aeb7bf8a6209f8459e6f00000075b50) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c3b.bin", 0x1800000, 0x400000, CRC(9d2bba19) SHA1(5ebbd0af3f83a60e33c8ccb743e3d5f5a96f1273) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c4b.bin", 0x1800001, 0x400000, CRC(5a4050cb) SHA1(8fd2291f349efa1ed5cd37ad4e273b60fe831a77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c5a.bin", 0x2000000, 0x400000, CRC(a289d1e1) SHA1(50c7d7ebde6e118a01036cc3e40827fcd9f0d3fd) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c6a.bin", 0x2000001, 0x400000, CRC(e6494b5d) SHA1(18e064b9867ae0b0794065f8dbefd486620419db) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c5b.bin", 0x2800000, 0x400000, CRC(404fff02) SHA1(56d1b32c87ea4885e49264e8b21846e465a20e1f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
ROM_END
/* kof10th Bankswitch */
static data16_t neogeo_sram16_2[0x2000];
READ16_HANDLER( neogeo_sram16_2_r )
{
return neogeo_sram16_2[offset];
}
WRITE16_HANDLER( neogeo_sram16_2_w )
{
COMBINE_DATA(&neogeo_sram16_2[offset]);
}
DRIVER_INIT( kof10th )
{
int i,j;
UINT16 *prom = (UINT16*)memory_region(REGION_CPU1);
UINT16 *buf = (UINT16*)malloc(0x800000);
UINT16 *srom = (UINT16*)memory_region(REGION_GFX1);
if (buf){
memcpy(buf,prom,0x800000);
for(i=0;i<0x800000/2;i++){
j=BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,1,8,7,6,0,4,3,2,9,5);
prom[j]=buf[i];
}
free(buf);
}
// get 8x8 tiles from P rom
// bank 1, game does this on the fly!
for (i=0;i<0x10000/2;i++){
srom[i+0x00000/2]=BITSWAP16(prom[i+0x600000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
srom[i+0x10000/2]=BITSWAP16(prom[i+0x6d0000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}
for (i=0;i<0x4000/2;i++){
srom[i+0x02000/2]=BITSWAP16(prom[i+0x6c2000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
srom[i+0x12000/2]=BITSWAP16(prom[i+0x612000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}
// bank 2, game does this on the fly!
for (i=0;i<0x20000/2;i++){
srom[i+0x40000/2]=BITSWAP16(prom[i+0x600000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
srom[i+0x60000/2]=srom[i+0x20000/2]; // copy bios again
}
// Altera protection chip patches these over P ROM
prom[0x00124/2] = 0x000d; // Run code that gives XOR for RAM moves and forces SoftDIPs
prom[0x00126/2] = 0xf7a8; // (how to play off and always teamplay). Also forces USA region.
prom[0x08bf4/2] = 0x4ef9; // Run code to change 8x8 tiles (needed for neogeo logo tiles)
prom[0x08bf6/2] = 0x000d;
prom[0x08bf8/2] = 0xf980;
// remove protection (game has ram mapped to 0xe0000 and 0xf0000 and moves code into it)
for(i=0;i<0x40;i++){
prom[0xe0000/2+i]=((prom[0x531680/2+i]^(0xc11d-0xc0c8))^prom[0x531600/2+i]);
}
for(i=0;i<0x270;i++){
prom[0xe1000/2+i]=((prom[0x531970/2+i]^(0xc11d-0xc0d9))^prom[0x531700/2+i]);
}
prom[0xe1154/2] = 0x125c; // fix a jmp offset (was in 0xe0000 range)
prom[0xdf986/2] = 0x168C; // fix a bsr offset (was in 0xe0000 range)
prom[0xdf998/2] = 0x1668; // fix a bsr offset (was in 0xe0000 range)
prom[0xdd880/2] = 0x4e75; // fix level drawing (from 0xf0000 range)
prom[0xdd89e/2] = 0x4e75; // fix level anim (from 0xf0000 range)
prom[0xdd8bc/2] = 0x4e75; // fix continue screen (from 0xf0000 range)
neogeo_fix_bank_type = 0;
/* kof10th Bankswitch handler */
memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000,0x2fffff, 0, 0, neogeo_sram16_2_r);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000,0x2fffff, 0, 0, neogeo_sram16_2_w);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2ffff0,0x2fffff, 0, 0, neo_bankswitch_w);
init_neogeo();
}
-
Look like I am the only one who wants to know .
-
well... im interested too.. but sadly, no one knows how to convert it to mame :(
-
Well I am going to keep trying .
One part of the code is easy. But the bankswitch is the problem .
-
yes, the bankswitch part... :(
-
Maybe I can do something for MAME... I'll be here later.
See ya!!!! :D
-
Here is a preliminar driver, the text layers will not work (until someone converts the proper FBA code into MAME one), I hope at least the game will run, but i think it won't... test and tell me I'll try to work more on it.
See ya!!!! :D
// Prototype MAME driver.
// src\includes:
// ------------- neogeo.h -----------------------
UINT8 *Cart10RAMA = NULL;
UINT8 *Cart10RAMB = NULL;
// src\drivers:
// ------------ neogeo.c ------------------------
ROM_START( kof10th )
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x100000, 0x600000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_CONTINUE( 0x000000, 0x100000 )
ROM_CONTINUE( 0x700000, 0x100000 )
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) )
NEO_BIOS_SOUND_128K( "kf10-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )
NO_DELTAT_REGION
ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c1b.bin", 0x0800000, 0x400000, CRC(b5abfc28) SHA1(eabf60992bb3485c95330065294071ec155bfe7c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2b.bin", 0x0800001, 0x400000, CRC(6cc4c6e1) SHA1(be824a944e745ee18efdc45c81fd496a4d624b9c) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3a.bin", 0x1000000, 0x400000, CRC(5b3d4a16) SHA1(93ac1cd7739100f8c32732644f81f2a19837b131) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4a.bin", 0x1000001, 0x400000, CRC(c6f3419b) SHA1(340c17a73aeb7bf8a6209f8459e6f00000075b50) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3b.bin", 0x1800000, 0x400000, CRC(9d2bba19) SHA1(5ebbd0af3f83a60e33c8ccb743e3d5f5a96f1273) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4b.bin", 0x1800001, 0x400000, CRC(5a4050cb) SHA1(8fd2291f349efa1ed5cd37ad4e273b60fe831a77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5a.bin", 0x2000000, 0x400000, CRC(a289d1e1) SHA1(50c7d7ebde6e118a01036cc3e40827fcd9f0d3fd) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6a.bin", 0x2000001, 0x400000, CRC(e6494b5d) SHA1(18e064b9867ae0b0794065f8dbefd486620419db) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5b.bin", 0x2800000, 0x400000, CRC(404fff02) SHA1(56d1b32c87ea4885e49264e8b21846e465a20e1f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
ROM_END
static WRITE16_HANDLER( kof10th_bankswitch_w )
{
int bankaddress;
if (offset >= 0x2FE000) {
*(UINT16*)(Cart10RAMB + (offset & 0x01FFE)) = (UINT16*)bankaddress;
if (offset == 0x2FFFF0) {
if (memory_region_length(REGION_CPU1) <= 0x100000) {
return;
}
data = data&0x7;
bankaddress = (data+1)*0x100000;
if (bankaddress >= 0x700000) {
bankaddress = 0x100000;
}
neogeo_set_cpu1_second_bank(bankaddress);
} else if (offset == 0x2FFFF8 && *(UINT16*)(Cart10RAMB + (offset & 0x1FFE)) != (UINT16*)bankaddress) {
*(UINT16*)(Cart10RAMB + (sekAddress & 0x01FFE)) = (UINT16*)bankaddress;
}
}
}
static WRITE16_HANDLER( kof10th_custom_w )
{
int bankaddress;
if (Cart10RAMB[0x1FFC]) {
// NeoUpdateTextOne(0x20000 + ((offset >> 1) & 0x1FFFF), BITSWAP08(bankaddress,7,6,0,4,3,2,1,5));
} else {
*(UINT16*)(Cart10RAMA + (offset & 0x01FFFF)) = (UINT16*)bankaddress;
}
}
DRIVER_INIT( kof10th )
{
UINT8 *src = memory_region( REGION_CPU1 );
UINT8 *dst = malloc(0x800000);
int i, j;
if (dst) {
memcpy(dst, src, 0x800000);
for (i = 0; i < 0x800000; i++) {
j = BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,2,9,8,7,1,5,4,3,10,6,0);
src[j] = dst[i];
}
free(dst);
}
Cart10RAMA = auto_malloc(memory_region(REGION_CPU1) + 0x7e0000);
Cart10RAMB = auto_malloc(memory_region(REGION_CPU1) + 0x1fe000);
UINT16 *mem16 = (UINT16*)memory_region( REGION_CPU1 );
/* Run code that gives XOR for RAM moves and forces SoftDIPs */
mem16[0x000124/2] = 0x000d;
mem16[0x000126/2] = 0xf7a8;
mem16[0x700124/2] = 0x000d;
mem16[0x700126/2] = 0xf7a8;
/* Run code to change 8x8 tiles (needed for neogeo logo tiles) */
mem16[0x008bf4/2] = 0x4ef9;
mem16[0x008bf6/2] = 0x000d;
mem16[0x008bf8/2] = 0xf980;
mem16[0x708bf4/2] = 0x4ef9;
mem16[0x708bf6/2] = 0x000d;
mem16[0x708bf8/2] = 0xf980;
/* special ROM banking handler */
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x240000, 0x2fffff, 0, 0, kof10th_bankswitch_w);
/* text extraction and protection */
/* game extracts text on the fly */
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x200000, 0x23ffff, 0, 0, kof10th_custom_w);
/* extra RAM handlers */
memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x0e0000, 0x0fffff, 0, 0, Cart10RAMA);
memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, Cart10RAMB);
}
GAMEB( 2004, kof10th, kof2002, neogeo, neogeo, neogeo, kof10th, ROT0, "hack", "The King of Fighters 10th Anniversary - All Team Battle (hack)" )
-
Thanks FerchogtX I will let you know .
-
Your code has issues it will not compile .
-
some issues:
'sekAddress' is not define
'NeoUpdateTextOne' = ?
'BITSWAP08' should be BITSWAP8
-
Ok I give up This is making me crazy . So I will stay with the current Mame driver.
-
Hello friends who have seen of kof10th unique this game it I have played in MVS system and is hack.
PD:sorry, my english no is good :confused:
-
Well, I managed to port most of BD's code to MAME. It still doesn't get the S data on the fly, but it no longer requires a bunch of patches to fix the P.
Please let me know of any bugs, etc.
*edit*
Known bugs:
The Uni-Bios CRC check is wrong (Thanks to Sabrinor for pointing this out)
* I have fixed this bug, it will be included in the next version of this code.
-
thx iq! will test it :)
-
Thanks IQ :)
-
I noticed a small bug in the emulation (patches being overwritten), so here's a fix:
Find this:
memcpy (src + 0x400, src + ((data & 1) ? 0x800400 : 0x700400), 0xdfbff);
Replace it with this:
memcpy (src + 0x10000, src + ((data & 1) ? 0x810000 : 0x710000), 0xcffff);
-
Hey what happen to my post that post here earlyer iq_132? It been removed!
Anyway. I can't get this to make on the Mame/Mame32 0.102 at all. It crashes on ether one. Here is what I did. I don't know what went wrong.
-
I noticed a small bug in the emulation (patches being overwritten), so here's a fix:
Find this:
memcpy (src + 0x400, src + ((data & 1) ? 0x800400 : 0x700400), 0xdfbff);
Replace it with this:
memcpy (src + 0x10000, src + ((data & 1) ? 0x810000 : 0x710000), 0xcffff);
Will this fix be ok to use on FBA as well ?
-
KingHanco please stay with the topic of this thread .
Will this fix be ok to use on FBA as well ?
You don't need it to. The code in FBA is just fine as it patches both copies of the p1 header.
I didn't want to use a second set of patches, so I simply changed this.
Hey what happen to my post that post here earlyer iq_132? It been removed!
Anyway. I can't get this to make on the Mame/Mame32 0.102 at all. It crashes on ether one. Here is what I did. I don't know what went wrong.
I removed it because you obviously made no attempt to read this thread and find what you're looking for.
-
You don't need it to. The code in FBA is just fine as it patches both copies of the p1 header.
I didn't want to use a second set of patches, so I simply changed this.
I removed it because you obviously made no attempt to read this thread and find what you're looking for.
What are you talking about? I read it before I post. You seem haven't read my post. You just keep on deleted those post that I make without reading those.
Now tell me what was I trying to get help on then? Seem you don't know because you keep deleted those. If you did then you wouldn't removed those post that I made. Beside you wouldv'e help me out which you haven't yet. lol
James33 where do I need to look to change this? Which you did not say where at.
I noticed a small bug in the emulation (patches being overwritten), so here's a fix:
Find this:
Code:
memcpy (src + 0x400, src + ((data & 1) ? 0x800400 : 0x700400), 0xdfbff);
Replace it with this:
Code:
memcpy (src + 0x10000, src + ((data & 1) ? 0x810000 : 0x710000), 0xcffff);
Hell you guys never help me out on Mame/Mame32!!! :mad:
I remmember correcty. You guys said Mame is the easyer to do. This is stupid for me even ask for help then. Mame/Mame32 is harder than fba. lol
Your a pro which I'm stupid I guest. :redface:
-
You should use this code:
http://neo-source.com/index.php?action=dlattach;topic=358.0;id=238
If it doesn't work, you've done something wrong.
-
You should use this code:
http://neo-source.com/index.php?action=dlattach;topic=358.0;id=238
If it doesn't work, you've done something wrong.
I added in the neogeo.c and removed the one that I had in there. (D:\MAMESRC\src\drivers)
I added the "Driver( kof10th ) /* Bootleg kof2002 hack */" in the driver.c (D:\MAMESRC\src)
I removed the UINT8 *Cart10RAMA = NULL; and the UINT8 *Cart10RAMB = NULL; from the neogeo.h (D:\MAMESRC\src\includes)
It went crazy when it got to the kof10th making and then quit.
I will put the UINT8 *Cart10RAMA = NULL; and the UINT8 *Cart10RAMB = NULL; back into the neogeo.h (D:\MAMESRC\src\includes) and see what happen.
There anything else that I don't know about that I need to add? Unless the 0.102 doesn't like it one bit.
Edit. It still running crazy.
-
I added in the neogeo.c and removed the one that I had in there. (D:\MAMESRC\src\drivers)
I added the "Driver( kof10th ) /* Bootleg kof2002 hack */" in the driver.c (D:\MAMESRC\src)
I removed the UINT8 *Cart10RAMA = NULL; and the UINT8 *Cart10RAMB = NULL; from the neogeo.h (D:\MAMESRC\src\includes)
It went crazy when it got to the kof10th making and then quit.
I will put the UINT8 *Cart10RAMA = NULL; and the UINT8 *Cart10RAMB = NULL; back into the neogeo.h (D:\MAMESRC\src\includes) and see what happen.
There anything else that I don't know about that I need to add? Unless the 0.102 doesn't like it one bit.
Edit. It still running crazy.
I do not know what hell your doing but that code works fine here .
-
Edit: Everymine I found a " . " in the neogeo.h (D:\MAMESRC\src\includes)
Everyone chill.
I going to try again.
-
That code only needed to be added to drivers\neogeo.c . There is no reason to mess with any other source .
-
That code only needed to be added to drivers\neogeo.c . There is no reason to mess with any other source .
Like this?
-
no
Like this
-
ROM_START( kof10th )
ROM_REGION( 0x900000, REGION_CPU1, 0 ) // Modified
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_REGION( 0x20000, REGION_GFX1, 0 ) // modified
ROM_FILL( 0x000000, 0x20000, 0 ) // modified
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )
into this.
ROM_START( kof10th )
ROM_REGION( 0x900000, REGION_CPU1, 0 ) // Modified
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_REGION( 0x20000, REGION_GFX1, 0 ) // modified
ROM_FILL( 0x000000, 0x20000, 0 ) // modified
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )
NEO_BIOS_SOUND_128K( "5008-m1.bin", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "265-v1d.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
ROM_LOAD( "265-v2d.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )
NO_DELTAT_REGION
ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "275-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c1b.bin", 0x0800000, 0x400000, CRC(b5abfc28) SHA1(eabf60992bb3485c95330065294071ec155bfe7c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c2b.bin", 0x0800001, 0x400000, CRC(6cc4c6e1) SHA1(be824a944e745ee18efdc45c81fd496a4d624b9c) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c3a.bin", 0x1000000, 0x400000, CRC(5b3d4a16) SHA1(93ac1cd7739100f8c32732644f81f2a19837b131) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c4a.bin", 0x1000001, 0x400000, CRC(c6f3419b) SHA1(340c17a73aeb7bf8a6209f8459e6f00000075b50) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c3b.bin", 0x1800000, 0x400000, CRC(9d2bba19) SHA1(5ebbd0af3f83a60e33c8ccb743e3d5f5a96f1273) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c4b.bin", 0x1800001, 0x400000, CRC(5a4050cb) SHA1(8fd2291f349efa1ed5cd37ad4e273b60fe831a77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c5a.bin", 0x2000000, 0x400000, CRC(a289d1e1) SHA1(50c7d7ebde6e118a01036cc3e40827fcd9f0d3fd) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c6a.bin", 0x2000001, 0x400000, CRC(e6494b5d) SHA1(18e064b9867ae0b0794065f8dbefd486620419db) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c5b.bin", 0x2800000, 0x400000, CRC(404fff02) SHA1(56d1b32c87ea4885e49264e8b21846e465a20e1f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
ROM_END
I didn't know that is the way it need to be. How did you do that anyway?
-
your problem isn't in neogeo.c, your problem is in driver.c
I think you have something improperly formatted, make sure your comments are inside /* .. */ or after //
-
your problem isn't in neogeo.c, your problem is in driver.c
I think you have something improperly formatted, make sure your comments are inside /* .. */ or after //
Part of his problem was because of how he added kof10th to neogeo.c ( well it was the main reason )
he only added what you posted here and nothing else
He added
ROM_START( kof10th )
ROM_REGION( 0x900000, REGION_CPU1, 0 ) // Modified
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_REGION( 0x20000, REGION_GFX1, 0 ) // modified
ROM_FILL( 0x000000, 0x20000, 0 ) // modified
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )
And the driver Init only Not the whole rom loading .
ROM_START( kof10th )
ROM_REGION( 0x900000, REGION_CPU1, 0 ) // Modified
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_REGION( 0x20000, REGION_GFX1, 0 ) // modified
ROM_FILL( 0x000000, 0x20000, 0 ) // modified
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )
into this.
ROM_START( kof10th )
ROM_REGION( 0x900000, REGION_CPU1, 0 ) // Modified
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
ROM_REGION( 0x20000, REGION_GFX1, 0 ) // modified
ROM_FILL( 0x000000, 0x20000, 0 ) // modified
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "sfix.sfx", 0x000000, 0x20000, CRC(354029fc) SHA1(4ae4bf23b4c2acff875775d4cbff5583893ce2a1) )
NEO_BIOS_SOUND_128K( "5008-m1.bin", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "265-v1d.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
ROM_LOAD( "265-v2d.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )
NO_DELTAT_REGION
ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "275-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c1b.bin", 0x0800000, 0x400000, CRC(b5abfc28) SHA1(eabf60992bb3485c95330065294071ec155bfe7c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c2b.bin", 0x0800001, 0x400000, CRC(6cc4c6e1) SHA1(be824a944e745ee18efdc45c81fd496a4d624b9c) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c3a.bin", 0x1000000, 0x400000, CRC(5b3d4a16) SHA1(93ac1cd7739100f8c32732644f81f2a19837b131) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c4a.bin", 0x1000001, 0x400000, CRC(c6f3419b) SHA1(340c17a73aeb7bf8a6209f8459e6f00000075b50) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c3b.bin", 0x1800000, 0x400000, CRC(9d2bba19) SHA1(5ebbd0af3f83a60e33c8ccb743e3d5f5a96f1273) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c4b.bin", 0x1800001, 0x400000, CRC(5a4050cb) SHA1(8fd2291f349efa1ed5cd37ad4e273b60fe831a77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c5a.bin", 0x2000000, 0x400000, CRC(a289d1e1) SHA1(50c7d7ebde6e118a01036cc3e40827fcd9f0d3fd) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c6a.bin", 0x2000001, 0x400000, CRC(e6494b5d) SHA1(18e064b9867ae0b0794065f8dbefd486620419db) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c5b.bin", 0x2800000, 0x400000, CRC(404fff02) SHA1(56d1b32c87ea4885e49264e8b21846e465a20e1f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "275-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "275-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
ROM_END
I didn't know that is the way it need to be. How did you do that anyway?
Thats how all neogeo roms are loaded . You can see that by looking at how the other games are . I should not need to tell you this since you have compiled FBA as well and its more or less the same thing .
-
This Mame32 0.102 making is weard. It crashes again and it show that obj is about the size of 94.9mb when it crashes. Something is missing there.
I think iq_132 is right. It must be the driver.c problem.
I added Driver( kof10th ) /* Bootleg kof2002 hack */ back onto the driver.c after that the first crashes. But still no go on full making.
I begging to think it the Mame locked a part source somewhere where I can't add a new game on it.
Something is locked or missing where it can't make on the making the addon games.
This is driving me crazy guys. :confused:
Are you guys using the 0.102 source? If not then that the problem because of the source changes on each release. Here is the 0.102 source that I'm using. http://www.savefile.com/projects.php?pid=875294
-
There is normally an error that tells you where the problem is
You need to make a bat file that way it will keep the dos window open and then you will be able to see the error and post it here .
My bat is like this
@echo off
set PATH=C:\MinGW\bin;%PATH%
echo Compile in progress Please wait !
make WINUI=1 I686=1 SUFFIX=32
echo Compile is complete .
pause
echo Enjoy :)
pause
Anyway can you post your driver.c here ?
-
There is normally an error that tells you where the problem is
You need to make a bat file that way it will keep the dos window open and then you will be able to see the error and post it here .
My bat is like this
@echo off
set PATH=C:\MinGW\bin;%PATH%
echo Compile in progress Please wait !
make WINUI=1 I686=1 SUFFIX=32
echo Compile is complete .
pause
echo Enjoy :)
pause
Anyway can you post your driver.c here ?
I use this in a batch for windows xp. It works fine for AMD and Intel by default that I and John IV uses bellow.
set path=c:\MinGW\bin
mingw32-make WINUI=1 SUFFIX=32
I686=1 is different than I use. It a optimized version which I, Mame Team and John IV don't use. Not a recommand.
Here the driver.c from the D:\MAMESRC\src. I took the Driver( kof10th ) /* Bootleg kof2002 hack */ out of there.
I will post the error here after I use new batch settings. I took the I686=1 out of there.
@echo off
set PATH=C:\MinGW\bin;%PATH%
echo Compile in progress Please wait !
make WINUI=1 SUFFIX=32
echo Compile is complete .
pause
echo Enjoy :)
pause
-
I gotting the error report.
Here it is. It seem that it doesn't like the driver at all.
-
Change this line:
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
To this:
ROM_REGION( 0x1000000, REGION_SOUND1, 0)
-
I gotting the error report.
Here it is. It seem that it doesn't like the driver at all.
I use the mame plus source for kof10th driver . I never had a problem useing I686 .
KingHanco can you please post your neogeo.c source again please .
Change this line:
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
To this:
ROM_REGION( 0x1000000, REGION_SOUND1, 0)
Why is it like that anyway ? Its not how the driver was written .
He has many errors
-
I use the mame plus source for kof10th driver . I never had a problem useing I686 .
KingHanco can you please post your neogeo.c source again please .
Why is it like that anyway ? Its not how the driver was written .
He has many errors
You mean that you uses the Mame Plus driver. It might not work on Mame32. Both are different and written different. That is problemy why it getting the errors that I show you. I will never uses the Mame Plus source on Mame32.
Anyway here the neogeo.c. I already replace the ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY ) with this ROM_REGION( 0x1000000, REGION_SOUND1, 0) to try out. Just to see it will bypass or not.
-
your neogeo.c is dated ahead of time... this is the problem with mameplus's v0.101 if i remembered it correctly...
to fix this, just correct the modiffied time for the file (edit it or something)
if u use 0.101 src, keep it like this:ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
if u use 0.102 src, change it to this:ROM_REGION( 0x1000000, REGION_SOUND1, 0)
also, u must add a new line at the end of the neogeo.c file... just press 'enter' after the end of src to make a new line
-
your neogeo.c is dated ahead of time... this is the problem with mameplus's v0.101 if i remembered it correctly...
to fix this, just correct the modiffied time for the file (edit it or something)
if u use 0.101 src, keep it like this:
if u use 0.102 src, change it to this:
also, u must add a new line at the end of the neogeo.c file... just press 'enter' after the end of src to make a new line
What newline?
I get an error. There no newline at the end of file.
I will push enter.
Edit...Heh...It didn't make.
-
Go to the very end of neogeo.c, at the very end, after all of the code, every bit of it.
Put your cursor there and then hit the "ENTER" button. Then try it.
-
I got the make done now.
But it not on the Mame32 list.
Now it need to be added to the Mame32 list.
I wonder what happen?
Look like it gotting skip on the making this time.
It weard...
This is confusing me now because it wasn't added on.
Edit: The link to the tempuary stuffs is removed.
-
Ok I will have a look
You did not add the needed code to driver.c
-
Ok I will have a look
You did not add the needed code to driver.c
This Driver( kof10th ) /* Bootleg kof2002 hack */ was in there. I think I removed it.
I talking to CrashTest. He think Aaron's Anti Crap (tm). He problemy joking.
-
When I checked your source that was missing .
-
When I checked your source that was missing .
There I added it back in there.
Do a make and you will get the crazy screen problem like I did by using my source.
It will not work. Trust me.
Have you try it yet by using my source? It broking.
-
There I added it back in there.
Do a make and you will get the crazy screen problem like I did by using my source.
It will not work. Trust me.
Have you try it yet by using my source? It broking.
See...
-
You didn't happen to notice that every other occurrance of "DRIVER(" in driver.c is upper case?
Change this:
Driver( kof10th ) /* Bootleg kof2002 hack */
to this:
DRIVER( kof10th ) /* Bootleg kof2002 hack */
-
Thanks that works.
It showing on the Mame32 list now.
I removed all the pictures and zips. I also removed the link to my tempuary stuffs.
-
I removed all the pictures and zips. I also removed the link to my tempuary stuffs.
I appreciate that :) I only have a limited amount of server space and tons of big attachments eat it up quickly.
-
I test the game out. There is some junks on the NEOGEO screen.
Everything else I think is fine.
Now I need to get the Mame32 name into Mame32-X in the source. I need to find the Mame32 in the source to change it. It should be very easy to do.
-
I test the game out. There is some junks on the NEOGEO screen.
It's like that on real hardware.
-
lmao! Why are you using that shitty code?
I trying out the bottom half.
The sounds won't work anymore after using the WinKawaks 1.55 roms version. Razoola put the older kof10th v1 and v2 roms on WinKawaks 1.55.
Do you know how to fixs it? The neo_pcm2_playmore_2002(0); will work in this bellow.
static UINT16 kof10thExtraRAMB[0x01000];
static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000)
nBank = 0x100000;
neogeo_set_cpu1_second_bank(nBank);
}
READ16_HANDLER( kof10th_RAMB_r )
{
return kof10thExtraRAMB[offset];
}
WRITE16_HANDLER( kof10th_custom_w )
{
if (!kof10thExtraRAMB[0xFFE]) { // Write to RAM bank A
UINT16 *prom = (UINT16*)memory_region( REGION_CPU1 );
COMBINE_DATA(&prom[(0xE0000/2) + (offset & 0xFFFF)]);
} else {
// S data should be written here...
}
}
static WRITE16_HANDLER( kof10th_bankswitch_w )
{
if (offset >= 0x5F000) {
if (offset == 0x5FFF8) { // Standard bankswitch
kof10thBankswitch(data);
} else if (offset == 0x5FFFC && kof10thExtraRAMB[0xFFC] != data) {
UINT8 *src = memory_region( REGION_CPU1 );
memcpy (src + 0x400, src + ((data & 1) ? 0x800400 : 0x700400), 0xdfbff);
}
COMBINE_DATA(&kof10thExtraRAMB[offset & 0xFFF]);
} else {
// Usually writes 0x8EF3 or 0x7DF3, sometimes writes 0x0003 to offset 0x25FFF0
}
}
DRIVER_INIT( kof10th )
{
int i, j;
UINT8 *dst = malloc(0x900000);
UINT8 *src = memory_region( REGION_CPU1 );
UINT8 *srm = memory_region( REGION_GFX1 );
if (dst) {
memcpy(dst + 0x000000, src + 0x600000, 0x100000); // Correct?
memcpy(dst + 0x100000, src + 0x000000, 0x800000);
for (i = 0; i < 0x900000; i++) {
j = (i&0xFFF000) + BITSWAP16(i&0xFFF,15,14,13,12,11,2,9,8,7,1,5,4,3,10,6,0);
src[j] = dst[i];
}
free(dst);
neo_pcm2_swap(0);
}
// Altera protection chip patches these over P ROM
((UINT16*)src)[0x0124/2] = 0x000d; // Enables XOR for RAM moves, forces SoftDIPs, and USA region
((UINT16*)src)[0x0126/2] = 0xf7a8;
((UINT16*)src)[0x8bf4/2] = 0x4ef9; // Run code to change "S" data
((UINT16*)src)[0x8bf6/2] = 0x000d;
((UINT16*)src)[0x8bf8/2] = 0xf980;
for (i = 0; i < 0x10000; i++) { // Get S data, should be done on the fly
srm[0x00000+(i^1)]=BITSWAP8(src[0x600000+i]^0xf3,7,6,0,4,3,2,1,5);
srm[0x10000+(i^1)]=BITSWAP8(src[0x6d0000+i]^0xf3,7,6,0,4,3,2,1,5);
}
for (i = 0; i < 0x04000; i++) {
srm[0x02000+(i^1)]=BITSWAP8(src[0x6c2000+i]^0xf3,7,6,0,4,3,2,1,5);
srm[0x12000+(i^1)]=BITSWAP8(src[0x612000+i]^0xf3,7,6,0,4,3,2,1,5);
}
init_neogeo();
memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, kof10th_RAMB_r);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x200000, 0x23ffff, 0, 0, kof10th_custom_w);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x240000, 0x2fffff, 0, 0, kof10th_bankswitch_w);
}
The sounds still cracky added in there anyway.
-
There is no way I would use your build you keep changeing the roms around That driver looks very old as well way too many patches in it ( The driver you posted on page 4 ) ,
-
That driver does not need neo_pcm2_swap
Anyway I think i will no longer reply to your posts you seem to be beyond help you keep makeing the same mistakes over and over .
-
It works before changing the roms names and infos with it.
So I need to removed the neo_pcm2_swap(0); then. If that what your saying James33.
Removed done.
-
So I need to removed the neo_pcm2_swap(0); then. If that what your saying iq_132.
Removed done.
Thats what I said :P
Hey IQ we need an attack system so we can frag other members :D
-
Trying this one out to see it fixs the sounds. I found this one.
ROM_START( kof10th )
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
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) )
NEO_BIOS_SOUND_128K( "kf10-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )
ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )
NO_DELTAT_REGION
ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c1b.bin", 0x0800000, 0x400000, CRC(b5abfc28) SHA1(eabf60992bb3485c95330065294071ec155bfe7c) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2b.bin", 0x0800001, 0x400000, CRC(6cc4c6e1) SHA1(be824a944e745ee18efdc45c81fd496a4d624b9c) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3a.bin", 0x1000000, 0x400000, CRC(5b3d4a16) SHA1(93ac1cd7739100f8c32732644f81f2a19837b131) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4a.bin", 0x1000001, 0x400000, CRC(c6f3419b) SHA1(340c17a73aeb7bf8a6209f8459e6f00000075b50) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3b.bin", 0x1800000, 0x400000, CRC(9d2bba19) SHA1(5ebbd0af3f83a60e33c8ccb743e3d5f5a96f1273) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4b.bin", 0x1800001, 0x400000, CRC(5a4050cb) SHA1(8fd2291f349efa1ed5cd37ad4e273b60fe831a77) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5a.bin", 0x2000000, 0x400000, CRC(a289d1e1) SHA1(50c7d7ebde6e118a01036cc3e40827fcd9f0d3fd) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6a.bin", 0x2000001, 0x400000, CRC(e6494b5d) SHA1(18e064b9867ae0b0794065f8dbefd486620419db) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5b.bin", 0x2800000, 0x400000, CRC(404fff02) SHA1(56d1b32c87ea4885e49264e8b21846e465a20e1f) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
ROM_END
DRIVER_INIT( kof10th )
{
int i,j;
UINT16 *prom = (UINT16*)memory_region(REGION_CPU1);
UINT16 *buf = (UINT16*)malloc(0x800000);
UINT16 *srom = (UINT16*)memory_region(REGION_GFX1);
if (buf)
{
memcpy(buf+0x000000/2, prom+0x700000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);
memcpy(prom+0x000000/2, buf+0x000000/2, 0x800000);
memcpy(buf,prom,0x800000);
for(i=0;i<0x800000/2;i++)
{
j=BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,10,1,8,7,6,0,4,3,2,9,5);
prom[j]=buf[i];
}
free(buf);
}
for(i=0;i<0x40;i++){
prom[0xe0000/2+i]=((prom[0x531680/2+i]^(0xc11d-0xc0c8))^prom[0x531600/2+i]);
}
for(i=0;i<0x270;i++){
prom[0xe1000/2+i]=((prom[0x531970/2+i]^(0xc11d-0xc0d9))^prom[0x531700/2+i]);
}
/* Extra patches */
prom[0x00124/2] = 0x000d; // Run code that gives XOR for RAM moves and forces SoftDIPs
prom[0x00126/2] = 0xf7a8; // (how to play off and always teamplay). Also forces USA region.
prom[0xdf986/2] = 0x168c; // fix a bsr offset (was in 0xe0000 range)
prom[0xdf998/2] = 0x1668; // fix a bsr offset (was in 0xe0000 range)
prom[0xe1154/2] = 0x125c; // fix a jmp offset (was in 0xe0000 range)
prom[0xdd880/2] = 0x4e75; // fix level drawing (from 0xf0000 range)
prom[0xdd89e/2] = 0x4e75; // fix level anim (from 0xf0000 range)
prom[0xdd8bc/2] = 0x4e75; // fix continue screen (from 0xf0000 range)
/* Extract S1 from P rom */
// get 8x8 tiles from P rom
// bank 1, game does this on the fly!
for (i=0;i<0x10000/2;i++){
srom[i+0x00000/2]=BITSWAP16(prom[i+0x600000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
srom[i+0x10000/2]=BITSWAP16(prom[i+0x6d0000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}
for (i=0;i<0x4000/2;i++){
srom[i+0x02000/2]=BITSWAP16(prom[i+0x6c2000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
srom[i+0x12000/2]=BITSWAP16(prom[i+0x612000/2]^0xf3f3,7,6,0,4,3,2,1,5,15,14,8,12,11,10,9,13);
}
memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000,0x2fffef, 0, 0, MRA16_RAM);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000,0x2fffef, 0, 0, MWA16_RAM);
init_neogeo();
}
-
New version of my code. There are few differences, but it does fix the CRC check on UNI-BIOS.
I still haven't figured out how to make it write the S on the fly though :(
-
Ok.
I going through checking on each game drivers at a time on a fresh neogeo.c and drivers.c.
I'm starting with the kog which I think that I broking it and this next. After that I do all the easy last that I already gotting working by using the drivers that you guys made. Hopey I get all strightning out. :biggrin:
-
Ok.
I going through checking on each game drivers at a time on a fresh neogeo.c and drivers.c.
I'm starting with the kog which I think that I broking it and this next. After that I do all the easy last that I already gotting working by using the drivers that you guys made. Hopey I get all strightning out. :biggrin:
I fixed that for you . Why do you ignore this .
-
I fixed that for you . Why do you ignore this .
Just to make sure that there isn't anything attach to it that causes the errors and even though it doesn't seem to be anything that I did wrong. But still I want to make sure there nothing trying to attach it by other drivers.
But the fixs made it working great now. I use the one that you send me the link though email.Thanks.
I not trying to get the credits at all. Your credits like everyone else did the drivers. I did nothing to get the credits. I just put the drivers in my build. :biggrin:
Btw: I just now gotting the other email.
-
Here's an update, some glitches should be fixed (resets, etc).
Enjoy.
-
Here's an update, some glitches should be fixed (resets, etc).
Enjoy.
Since its now in the offical mame would this fix still be needed ?
-
Since the code in MAME is using an old version of my code (http://neo-source.com/index.php?topic=358.msg3642#msg3642) (a port of Bdiamond's FBA code :)), yes, I would say that this is better.
It has a fixed crc in unibios, the p1 swapping is fixed, it won't cause resets, it should be pretty much bug-free.
Also, with the Neo-geo logo, it will always be corrupt if it is shown.
-
Since the code in MAME is using an old version of my code (http://neo-source.com/index.php?topic=358.msg3642#msg3642) (a port of Bdiamond's FBA code :)), yes, I would say that this is better.
It has a fixed crc in unibios, the p1 swapping is fixed, it won't cause resets, it should be pretty much bug-free.
Also, with the Neo-geo logo, it will always be corrupt if it is shown.
Yes I will use it .. So far it looks like haze has no idea how these bootlegs work
-
Yes, the code was taken from the various builds I could find and here.
Most of it isn't even tested because I don't have the sets, interest, nor time to test it, nor do we have the slightest clue which are genuine bootleg sets with the amount of hacking that goes on... I assumed being posted here the code was already tested.
-
heh.. haze is here :) thx for all ur hard work
-
Whoa! Welcome Haze :) If you want/care (lol, I know your P.O.V. of neogeo games, so you probably don't), I think we can try to help you sort some of the neogeo boot stuff out.
I assumed being posted here the code was already tested.
I posted that code here to be tested. I don't have much interest in actually playing these bootlegs...
-
Well if you have improvements / fixes there is the standard MAME submission procedure. Please don't submit anything yet as (assuming Aaron includes the changes) the NeoGeo drivers have been reorganised a bit for 103.
Submitting the additional official games is pointless, somebody already did this, Aaron sees no point in including them yet.
-
I am shocked to see you here Haze . I thought you hated NEOGEO ?
But anyway I bid you welocme :)
-
I won't be staying around, I just wanted to confirm that this is where the code used came from. It was only fair to let you know.
-
I won't be staying around, I just wanted to confirm that this is where the code used came from. It was only fair to let you know.
Well thats a shame :( , But thanks for being honest .
-
Yes, the code was taken from the various builds I could find and here.
Most of it isn't even tested because I don't have the sets, interest, nor time to test it, nor do we have the slightest clue which are genuine bootleg sets with the amount of hacking that goes on... I assumed being posted here the code was already tested.
Then, why have you added this stuff?
Why haven´t you asked the one person who knows it?
That particular person also has proper drivers (no offense guys, but some of this stuff here is incomplete).
If you "do not care" about that system, simply stop updating.
We have enough emulators which do this, so M.a.m.e can take care of all other systems.
-
Then, why have you added this stuff?
Why haven´t you asked the one person who knows it?
That particular person also has proper drivers (no offense guys, but some of this stuff here is incomplete).
If you "do not care" about that system, simply stop updating.
We have enough emulators which do this, so M.a.m.e can take care of all other systems.
Some drivers have not even been posted here so your comments are not valid .
-
That one person keeps some stuff to himself (his choice)
We know some of our stuff is incomplete, that's why we have a forum so that we can discuss the matter.
At least we are trying. Are you?
I have done enough for the Neo comunity, exactly 15 times enough.
-
Some drivers have not even been posted here so your comments are not valid .
O.k., BUT the drivers used from here are partly incomplete and they have NOT been tested by them.
-
Hello there!
I have worked on a kof10th driver in my free time to learn a bit how MAME works.
My driver is not complete yet but I can at least tell you how to modify the current MAME driver to decode the 8x8 tiles on the fly.
In machine\neoboot.c, remove this because it is not needed any more :
for (i = 0; i < 0x10000; i++) { // Get S data, should be done on the fly
srm[0x00000+(i^1)]=BITSWAP8(src[0x600000+i]^0xf3,7,6,0,4,3,2,1,5);
srm[0x10000+(i^1)]=BITSWAP8(src[0x6d0000+i]^0xf3,7,6,0,4,3,2,1,5);
}
for (i = 0; i < 0x04000; i++) {
srm[0x02000+(i^1)]=BITSWAP8(src[0x6c2000+i]^0xf3,7,6,0,4,3,2,1,5);
srm[0x12000+(i^1)]=BITSWAP8(src[0x612000+i]^0xf3,7,6,0,4,3,2,1,5);
}
Replace this :
// S data should be written here... ?? scrambled??
// UINT16 *prom = (UINT16*)memory_region( REGION_GFX1 );
// UINT8 datalow = BITSWAP8((data&0xff)^0xf3,7,6,0,4,3,2,1,5);
// UINT8 datahigh = BITSWAP8(((data>>8)&0xff)^0xf3,7,6,0,4,3,2,1,5);
// data = datalow | datahigh<<8;
// COMBINE_DATA(&prom[offset & 0xFFFF]);
// decodechar(Machine->gfx[0], (offset&0xffff)/16, (UINT8 *)prom, &kof10th_layout);
With this :
// S data decoded on the fly
UINT8 *prom = (UINT8*)memory_region( REGION_GFX1 );
UINT8 datalow = BITSWAP8(data, 7, 6, 0, 4, 3, 2, 1, 5);
prom[offset] = datalow;
decodechar(Machine->gfx[0], offset>>5, prom, &kof10th_layout);
Et voila!
I haven't tested it very much though (the driver I have done is a little bit different).
But at least it seems to work.
Bye.
-
Sweet :)
-
Thanks for that :)
My head hurts right now . So I will test it later
Happy New Year
-
Very impressive. I will include this in my next MAME32FX release.
BTW, this line must be removed too or you'll get a compilation error:
in "decrypt_kof10th()" function:
UINT8 *srm = memory_region( REGION_GFX1 );
This line is no longer needed... :wink:
-
This code is correct?
static const gfx_layout kof10th_layout =
{
8,8, /* 8 x 8 chars */
8192,
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 }, /* planes are packed in a nibble */
{ 33*4, 32*4, 49*4, 48*4, 1*4, 0*4, 17*4, 16*4 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
32*8 /* 32 bytes per char */
};
I do not obtain to compile using it....
Somebody could place this to driver complete?
Thanks!
-
The perils of using a language translator (http://www.arcadeathome.com:8080/forums/images/smilies/lol.gif)
That code is fine because it works. I'm unable to understand the rest of what you're saying, :confused: sorry about that.
If you he is so smart thus.... It speaks with me in Portuguese! Pretty!
-
static const gfx_layout kof10th_layout =
{
8,8, /* 8 x 8 chars */
8192,
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 }, /* planes are packed in a nibble */
{ 33*4, 32*4, 49*4, 48*4, 1*4, 0*4, 17*4, 16*4 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
32*8 /* 32 bytes per char */
};
static UINT16 kof10thExtraRAMB[0x01000];
static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000)
nBank = 0x100000;
neogeo_set_cpu1_second_bank(nBank);
}
READ16_HANDLER( kof10th_RAMB_r )
{
return kof10thExtraRAMB[offset];
}
WRITE16_HANDLER( kof10th_custom_w )
{
if (!kof10thExtraRAMB[0xFFE]) {
UINT16 *prom = (UINT16*)memory_region( REGION_CPU1 );
COMBINE_DATA(&prom[(0xE0000/2) + (offset & 0xFFFF)]);
} else {
// S data decoded on the fly
UINT8 *prom = (UINT8*)memory_region( REGION_GFX1 );
UINT8 datalow = BITSWAP8(data, 7, 6, 0, 4, 3, 2, 1, 5);
prom[offset] = datalow;
decodechar(Machine->gfx[0], offset>>5, prom, &kof10th_layout);
}
}
static WRITE16_HANDLER( kof10th_bankswitch_w )
{
if (offset >= 0x5F000) {
if (offset == 0x5FFF8) { // Standard bankswitch
kof10thBankswitch(data);
} else if (offset == 0x5FFFC && kof10thExtraRAMB[0xFFC] != data) {
UINT8 *src = memory_region( REGION_CPU1 );
memcpy (src + 0x400, src + ((data & 1) ? 0x700400 : 0x800400), 0xdfbff);
}
COMBINE_DATA(&kof10thExtraRAMB[offset & 0xFFF]);
}
}
DRIVER_INIT( kof10th )
{
int i, j;
UINT8 *dst = malloc(0x900000);
UINT8 *src = memory_region( REGION_CPU1 );
UINT8 *srm = memory_region( REGION_GFX1 );
if (dst) {
memcpy(dst + 0x000000, src + 0x700000, 0x100000);
memcpy(dst + 0x100000, src + 0x000000, 0x800000);
for (i = 0; i < 0x900000; i++) {
j = (i&0xFFF000) + BITSWAP16(i&0xFFF,15,14,13,12,11,2,9,8,7,1,5,4,3,10,6,0);
src[j] = dst;
}
free(dst);
}
// Altera protection chip patches these over P ROM
((UINT16*)src)[0x0124/2] = 0x000d; // Enables XOR for RAM moves, forces SoftDIPs, and USA region
((UINT16*)src)[0x0126/2] = 0xf7a8;
((UINT16*)src)[0x8bf4/2] = 0x4ef9; // Run code to change "S" data
((UINT16*)src)[0x8bf6/2] = 0x000d;
((UINT16*)src)[0x8bf8/2] = 0xf980;
}
init_neogeo();
memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, kof10th_RAMB_r);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x200000, 0x23ffff, 0, 0, kof10th_custom_w);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x240000, 0x2fffff, 0, 0, kof10th_bankswitch_w);
}
This code is certain? Lack something more?
-
my source code is of it ek-mame 0.99....
The compilation is giving error...
Some tip?
-
Post a screenshot of the error.
-
(http://www.geocities.com/neomame32/error.JPG)
This is the error... :redface:
:idiot:
-
He's using an old source... and in 0.99u4 a lot of structures were renamed in the core.
In particular:
struct GfxLayout ----> gfx_layout
So he must use this:
static struct GfxLayout kof10th_layout =
The rest of the code you posted looks ok to me...but in the case he will encounter other errors, he should keep in mind that in 0.99u6 another change was made:
data8_t ----> UINT8
data16_t ----> UINT16
BTW I don't think it's needed.
-
INIT for MAME 0.99 or previous.....
static struct GfxLayout kof10th_layout =
{
8,8, /* 8 x 8 chars */
8192,
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 }, /* planes are packed in a nibble */
{ 33*4, 32*4, 49*4, 48*4, 1*4, 0*4, 17*4, 16*4 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
32*8 /* 32 bytes per char */
};
static UINT16 kof10thExtraRAMB[0x01000];
static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000)
nBank = 0x100000;
neogeo_set_cpu1_second_bank(nBank);
}
READ16_HANDLER( kof10th_RAMB_r )
{
return kof10thExtraRAMB[offset];
}
WRITE16_HANDLER( kof10th_custom_w )
{
if (!kof10thExtraRAMB[0xFFE]) {
UINT16 *prom = (UINT16*)memory_region( REGION_CPU1 );
COMBINE_DATA(&prom[(0xE0000/2) + (offset & 0xFFFF)]);
} else {
UINT8 *prom=(UINT8*)memory_region( REGION_GFX1 );
UINT8 datalow= BITSWAP8(data,7,6,0,4,3,2,1,5);
prom[offset]=datalow;
decodechar(Machine->gfx[0], offset>>5, prom, &kof10th_layout);
}
}
static WRITE16_HANDLER( kof10th_bankswitch_w )
{
if (offset >= 0x5F000) {
if (offset == 0x5FFF8) { // Standard bankswitch
kof10thBankswitch(data);
} else if (offset == 0x5FFFC && kof10thExtraRAMB[0xFFC] != data) {
UINT8 *src = memory_region( REGION_CPU1 );
memcpy (src + 0x400, src + ((data & 1) ? 0x700400 : 0x800400), 0xdfbff);
}
COMBINE_DATA(&kof10thExtraRAMB[offset & 0xFFF]);
}
}
DRIVER_INIT( kof10th )
{
int i, j;
UINT8 *dst = malloc(0x900000);
UINT8 *src = memory_region( REGION_CPU1 );
if (dst) {
memcpy(dst + 0x000000, src + 0x700000, 0x100000);
memcpy(dst + 0x100000, src + 0x000000, 0x800000);
for (i = 0; i < 0x900000; i++) {
j = (i&0xFFF000) + BITSWAP16(i&0xFFF,15,14,13,12,11,2,9,8,7,1,5,4,3,10,6,0);
src[j] = dst;
}
free(dst);
}
// Altera protection chip patches these over P ROM
((UINT16*)src)[0x0124/2] = 0x000d; // Enables XOR for RAM moves, forces SoftDIPs, and USA region
((UINT16*)src)[0x0126/2] = 0xf7a8;
((UINT16*)src)[0x8bf4/2] = 0x4ef9; // Run code to change "S" data
((UINT16*)src)[0x8bf6/2] = 0x000d;
((UINT16*)src)[0x8bf8/2] = 0xf980;
memory_install_read16_handler (0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, kof10th_RAMB_r);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x200000, 0x23ffff, 0, 0, kof10th_custom_w);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x240000, 0x2fffff, 0, 0, kof10th_bankswitch_w);
init_neogeo();
}
For MAME 0.100 in ahead change only this...
static const gfx_layout kof10th_layout =
{
8,8, /* 8 x 8 chars */
8192,
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 }, /* planes are packed in a nibble */
{ 33*4, 32*4, 49*4, 48*4, 1*4, 0*4, 17*4, 16*4 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
32*8 /* 32 bytes per char */
};
Thanks for help "MAMESICK"
-
Ah ok... I'm rather new to this, I didn't start until 0.101 - plus I've never done anything with ekmame.
Yeah ekmame can be a pain to compile .
If you do not want online play then there is not much need for that build .
-
Hello,
You can get rid of the structure kof10th_layout by replacing &kof10th_layout with Machine->drv->gfxdecodeinfo[0].gfxlayout in the function decodechar():
//decodechar(Machine->gfx[0], offset>>5, prom, &kof10th_layout);
decodechar(Machine->gfx[0], offset>>5, prom, Machine->drv->gfxdecodeinfo[0].gfxlayout);
Don't forget to remove/comment the declaration of the structure or the compiler could complain about an unused variable :
//static const gfx_layout kof10th_layout =
//{
// 8,8, /* 8 x 8 chars */
// 8192,
// 4, /* 4 bits per pixel */
// { 0, 1, 2, 3 }, /* planes are packed in a nibble */
// { 33*4, 32*4, 49*4, 48*4, 1*4, 0*4, 17*4, 16*4 },
// { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
// 32*8 /* 32 bytes per char */
//};
Bye.
-
Thanks pinhead :)
Man that feels weird saying that lol .
-
Here's what I've got. :)
static UINT16 kof10thExtraRAMB[0x01000];
static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000)
nBank = 0x100000;
neogeo_set_cpu1_second_bank(nBank);
}
READ16_HANDLER( kof10th_RAMB_r )
{
return kof10thExtraRAMB[offset];
}
WRITE16_HANDLER( kof10th_custom_w )
{
if (!kof10thExtraRAMB[0xFFE]) { // Write to RAM bank A
UINT16 *prom = (UINT16*)memory_region( REGION_CPU1 );
COMBINE_DATA(&prom[(0xE0000/2) + (offset & 0xFFFF)]);
} else { // Write S data on-the-fly
UINT8 *srom = memory_region( REGION_GFX1 );
srom[offset] = BITSWAP8(data,7,6,0,4,3,2,1,5);
decodechar(Machine->gfx[0], offset>>5, srom, Machine->drv->gfxdecodeinfo[0].gfxlayout);
}
}
static WRITE16_HANDLER( kof10th_bankswitch_w )
{
if (offset >= 0x5F000) {
if (offset == 0x5FFF8) { // Standard bankswitch
kof10thBankswitch(data);
} else if (offset == 0x5FFFC && kof10thExtraRAMB[0xFFC] != data) { // Special bankswitch
UINT8 *src = memory_region( REGION_CPU1 );
memcpy (src + 0x10000, src + ((data & 1) ? 0x810000 : 0x710000), 0xcffff);
}
COMBINE_DATA(&kof10thExtraRAMB[offset & 0xFFF]);
}
}
void install_kof10th_protection ( void )
{
memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, kof10th_RAMB_r);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x200000, 0x23ffff, 0, 0, kof10th_custom_w);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x240000, 0x2fffff, 0, 0, kof10th_bankswitch_w);
}
void decrypt_kof10th( void )
{
int i, j;
UINT8 *dst = malloc(0x900000);
UINT8 *src = memory_region( REGION_CPU1 );
if (dst) {
memcpy(dst + 0x000000, src + 0x700000, 0x100000); // Correct (Verified in Uni-bios)
memcpy(dst + 0x100000, src + 0x000000, 0x800000);
for (i = 0; i < 0x900000; i++) {
j = BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,2,9,8,7,1,5,4,3,10,6,0);
src[j] = dst[i];
}
free(dst);
}
// Altera protection chip patches these over P ROM
((UINT16*)src)[0x0124/2] = 0x000d; // Enables XOR for RAM moves, forces SoftDIPs, and USA region
((UINT16*)src)[0x0126/2] = 0xf7a8;
((UINT16*)src)[0x8bf4/2] = 0x4ef9; // Run code to change "S" data
((UINT16*)src)[0x8bf6/2] = 0x000d;
((UINT16*)src)[0x8bf8/2] = 0xf980;
}
Please note a few changes:
UINT8 *srom = memory_region( REGION_GFX1 );
srom[offset] = BITSWAP8(data,7,6,0,4,3,2,1,5);
decodechar(Machine->gfx[0], offset>>5, srom, Machine->drv->gfxdecodeinfo[0].gfxlayout);
I just combined/renamed a few things to shorten this up a bit.
memcpy (src + 0x10000, src + ((data & 1) ? 0x810000 : 0x710000), 0xcffff);
This is modified so that it doesn't overwrite the "Run code to change 's' data" patches (which can cause problems).
memcpy(dst + 0x000000, src + 0x700000, 0x100000);
This is the correct order. Just check it in unibios. ;)
j = BITSWAP24(i,23,22,21,20,19,18,17,16,15,14,13,12,11,2,9,8,7,1,5,4,3,10,6,0);
this is just cosmetic (functionally the same as the current line in mame)
-
Nice once IQ :)
-
decodechar (machine->gfx[0], offset>>5, srom, Machine->drv->gfxdecodeinfo[0].gfxlayout);
New code for mame 0.128?
thanks!
-
Good Night!
Could someone help me pass the code below for the current version of MAME?
static struct GfxLayout kof10th_layout =
{
8,8, /* 8 x 8 chars */
8192,
4, /* 4 bits per pixel */
{ 0, 1, 2, 3 }, /* planes are packed in a nibble */
{ 33*4, 32*4, 49*4, 48*4, 1*4, 0*4, 17*4, 16*4 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
32*8 /* 32 bytes per char */
};
static WRITE16_HANDLER( kof10th_custom_w )
{
if (!kof10thExtraRAMB[0xFFE]) { // Write to RAM bank A
UINT16 *prom = (UINT16*)memory_region( space->machine, "maincpu" );
COMBINE_DATA(&prom[(0xE0000/2) + (offset & 0xFFFF)]);
} else { // Write S data on-the-fly
UINT8 *srom = memory_region( space->machine, "fixed" );
srom[offset] = BITSWAP8(data,7,6,0,4,3,2,1,5);
decodechar(Machine->gfx[0], offset>>5, prom, Machine->drv->gfxdecodeinfo[0].gfxlayout); <--- ERRO!!!
}
}
I need this code to enable special moves like in Kawaks, when I enable the blows leaves a bug in NEOGEO soon and with this code is 100%
HELP-ME!!!