Welcome!

Final Burn Neo => FBN Development => Topic started by: iq_132 on February 28, 2005, 02:19:11 PM

Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on February 28, 2005, 02:19:11 PM
Neo-Geo ID# is 275
2 P roms @ 4mb/rom
Decrypted Kof2002 V roms

Encrypted P
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: JiMMy_PaGe on February 28, 2005, 03:41:27 PM
Quote from: iq_132
Neo-Geo ID# is 275
2 P roms @ 4mb/rom
Decrypted Kof2002 V roms

Encrypted P

Yeah, f***ing encrypted p roms... C roms scrambled too  :(
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 01, 2005, 02:31:42 AM
Here are the sizes and crcs I have:
Code: [Select]
kf10-p1.bin,   0x800000, 0xB1FD0C43

kf10-c1a.bin,  0x400000, 0x3BBC0364
kf10-c2a.bin,  0x400000, 0x91230075
kf10-c1b.bin,  0x400000, 0xb5abfc28
kf10-c2b.bin,  0x400000, 0x6CC4C6E1
kf10-c3a.bin,  0x400000, 0x5B3D4A16
kf10-c4a.bin,  0x400000, 0xC6F3419B
kf10-c3b.bin,  0x400000, 0x9D2BBA19
kf10-c4b.bin,  0x400000, 0x5A4050CB
kf10-c5a.bin,  0x400000, 0xA289D1E1
kf10-c6a.bin,  0x400000, 0xE6494B5D
kf10-c5b.bin,  0x400000, 0x404FFF02
kf10-c6b.bin,  0x400000, 0xF2CCFC9E
kf10-c7a.bin,  0x400000, 0xBE79C5A8
kf10-c8a.bin,  0x400000, 0xA5952CA4
kf10-c7b.bin,  0x400000, 0x3FDB3542
kf10-c8b.bin,  0x400000, 0x661B7A52

kf10-m1.bin,   0x020000, 0xF6FAB859

kf10-v1.bin,   0x800000, 0x0fc9a58d
kf10-v2.bin,   0x800000, 0xb8c475a4
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Vorador on March 01, 2005, 06:14:02 AM
The rom has been released somewhere in the net, enjoy :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 01, 2005, 07:07:17 PM
Time to hunt :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: robber804 on March 01, 2005, 10:53:40 PM
Quote from: James33
Time to hunt :)


You know where you can find it
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: netbug on March 02, 2005, 03:27:38 AM
some info from net :D  :D
Code: [Select]

How to Load the ROMs

ROM_START( kof10th ) /* this is a hack of kof2002 much like the various korean hacks / bootlegs of games */
        ROM_REGION( 0x4000000, REGION_GFX2, 0 )
        ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, 0x3bbc0364 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, 0x91230075 ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "kf10-c1b.bin", 0x0800000, 0x400000, 0xb5abfc28 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c2b.bin", 0x0800001, 0x400000, 0x6cc4c6e1 ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "kf10-c3a.bin", 0x1000000, 0x400000, 0x5b3d4a16 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c4a.bin", 0x1000001, 0x400000, 0xc6f3419b ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "kf10-c3b.bin", 0x1800000, 0x400000, 0x9d2bba19 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c4b.bin", 0x1800001, 0x400000, 0x5a4050cb ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "kf10-c5a.bin", 0x2000000, 0x400000, 0xa289d1e1 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c6a.bin", 0x2000001, 0x400000, 0xe6494b5d ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "kf10-c5b.bin", 0x2800000, 0x400000, 0x404fff02 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, 0xf2ccfc9e ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, 0xbe79c5a8 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, 0xa5952ca4 ) /* Plane 2,3 */
        ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, 0x3fdb3542 ) /* Plane 0,1 */
        ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, 0x661b7a52 ) /* Plane 2,3 */

        ROM_REGION( 0x800000, REGION_CPU1, 0 )
        ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x100000, 0x600000, 0xb1fd0c43 )
        ROM_CONTINUE(                        0x000000, 0x100000 ) // not sure what this is for
        ROM_CONTINUE(                        0x000000, 0x100000 ) // program code here

        NEO_SFIX_512K_BLANK

        NEO_BIOS_SOUND_128K( "kf10-m1.bin", 0xf6fab859 )

        ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
        ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, 0x0fc9a58d )
        ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, 0xb8c475a4 )
ROM_END

The program ROM (P1) need descrambling as follows;

        UINT8*src = (        );
        UINT8*dst = (UINT8*)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;
                }
                free(dst);
        }


The onboard Altera chip makes the following modifications when reading from the main
68000 ROM space;

        rom[0x00124/2] = 0x000d;        // Run code that gives XOR for RAM moves and forces SoftDIPs
        rom[0x00126/2] = 0xf7a8;

        rom[0x08bf4/2] = 0x4ef9;        // Run code to change 8x8 tiles (needed for neogeo logo tiles)
        rom[0x08bf6/2] = 0x000d;
        rom[0x08bf8/2] = 0xf980;


The program ROM PCB has 3 visable RAM chips on it.

        16bit RAM from 0x2fe000 to 0x2fffff (8k)

        This one is just like the RAM seen on the later SNK games. It does not contain the palette
        lookup protections of other SNK games as far as I know.

The other 2 are different / new.

        16bit RAM 128k ?

        To write to this RAM you must write from 0x200000 - 0x21ffff. Whats written can be read
        back from 0xe0000 - 0xfffff. If you read from 0x200000 - 0x21ffff you will simply have
        the ROM bank data in those locations returned.

        The actual size of this RAM isn't known but I guess its 128k. Basically only small sections
        are used and its possible to set 2 smaller regions for it instead as follows;

                Write 0x200000 - 0x202000, Read 0xe0000 - 0xe2000 (8k)
                Write 0x210000 - 0x212000, Read 0xf0000 - 0xf2000 (8k)

        8bit RAM 128k (8x8 tiles held here)

        To write to this RAM you must write from 0x200000 - 0x23ffff. Then writing words the low
        byte gets written only. If you read from 0x200000 - 0x23ffff you will simply get the ROM
        bank data in those locations returned. I don't know if this RAM is readable from other
        points in the NeoGeo memory map.

As both these RAMs are mapped to the same write space there is a port that controls which RAM is
being written to, this port is at 0x2ffffc (16bit). When 0x0001 is written here writing to the
8x8 tile RAM is allowed. 0x0000 is written once the write is completed thus allowing accesss
to the other RAM.

When the game is first powered on the 8x8 tile RAM contains junk. The game fills the 8x8 tiles with
good graphics before anything from it is displayed to screen. The 68k does this as the 8x8 graphic
data is stored in one of the P ROM banks.

There looks to be another possible port which is used but unknown, 0x2ffff8 (16bit). It looks like
this is nothing more than a stored game variable but I though I would mention it in case. This is
set to either 0x0001 or 0x0000 during gameplay and if the attract mode fight sequences.


BTW,maybe "some people" in this forum have already got its driver now!!! :D  :p  :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 02, 2005, 06:40:23 PM
Quote from: robber804
You know where you can find it
Cool thanks .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: netbug on March 02, 2005, 07:55:08 PM
Patience is a plaster for all sores,while you can't accomplish something successfully!
 :D  :D  :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 02, 2005, 08:03:11 PM
So far I cannot get it to work :(
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 03, 2005, 06:05:03 PM
There is a fully decrypted version that works in kawaks .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 03, 2005, 06:19:06 PM
This game is working in Kawaks 1.54  .


http://cps2shock.retrogames.com/

Quote

Kawaks v1.54 released
 
Here is a new Kawaks supporting the latest XOR and a couple of others that were released a little while ago. A few other things are cleaned up and fixed also.
New drivers:
Puzz Loop 2 (Japan 010205)
19XX: War Against Destiny (Asia 951207)
Alien vs. Predator (Asia 940520)
King of Fighters 10th Anniversary (hack)
Matrimelee (decrypted C)
Fixed slowdowns in Rage of The Dragons (how to play drawing for example).
Stopped both KOF2002 plus sets from loading the encrypted M ROM from the parent.
Fixed bug in KOF2002 how to play sequence (Kyo ended up off the left of screen).
Renamed some decrypted M ROMs in various NeoGeo Games to match MAME 092.
Renamed CPS2 graphics and sound sample ROMs to reflect names given to them on real CPS-2 hardware (added a 'm' to the name).
Renamed the CPS-2 simm ROMs (from xxx-sim-xxx to xxx-simm.xxx).
Renamed Jockey GP ROMs to match MAME
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Ebsy on March 06, 2005, 03:05:12 PM
Any news of a full working mame driver?


Would greatly appreciate it :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 06, 2005, 08:31:22 PM
There is no public driver at the moment  But be aware there are many people trying to make it work in Mame and FBA .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 07, 2005, 10:44:41 PM
Kof10th do not need any bankswitch code. ^_^
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 07, 2005, 11:07:26 PM
This is my useing romset: ^_^

Code: [Select]

ROM_START( kof10th ) // Hack of kof2002 much like the various korean hack / bootleg of games
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, 0xB1FD0C43 )

ROM_REGION( 0x80000, REGION_GFX1, 0 )
ROM_LOAD( "kf10-s1.bin", 0x000000, 0x80000, 0x49A6FCD9 )
ROM_REGION( 0x20000, REGION_GFX2, 0 )
ROM_LOAD( "ng-sfix.rom",  0x000000, 0x20000, 0x354029fc )

NEO_BIOS_SOUND_128K( "kf10-m1.bin",0xF6FAB859 )

ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, 0x0fc9a58d )
ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, 0xb8c475a4 )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, 0x3bbc0364 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, 0x91230075 ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c1b.bin", 0x0800000, 0x400000, 0xb5abfc28 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2b.bin", 0x0800001, 0x400000, 0x6cc4c6e1 ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3a.bin", 0x1000000, 0x400000, 0x5b3d4a16 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4a.bin", 0x1000001, 0x400000, 0xc6f3419b ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3b.bin", 0x1800000, 0x400000, 0x9d2bba19 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4b.bin", 0x1800001, 0x400000, 0x5a4050cb ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5a.bin", 0x2000000, 0x400000, 0xa289d1e1 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6a.bin", 0x2000001, 0x400000, 0xe6494b5d ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5b.bin", 0x2800000, 0x400000, 0x404fff02 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, 0xf2ccfc9e ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, 0xbe79c5a8 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, 0xa5952ca4 ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, 0x3fdb3542 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, 0x661b7a52 ) /* Plane 2,3 */

// ROM_LOAD16_BYTE( "265-c3d.bin", 0x1000000, 0x800000, 0x959fad0b ) /* Plane 0,1 */
// ROM_LOAD16_BYTE( "265-c4d.bin", 0x1000001, 0x800000, 0xefe6a468 ) /* Plane 2,3 */
// ROM_LOAD16_BYTE( "265-c5d.bin", 0x2000000, 0x800000, 0x74bba7c6 ) /* Plane 0,1 */
// ROM_LOAD16_BYTE( "265-c6d.bin", 0x2000001, 0x800000, 0xe20d2216 ) /* Plane 2,3 */
// ROM_LOAD16_BYTE( "265-c7d.bin", 0x3000000, 0x800000, 0x8a5b561c ) /* Plane 0,1 */
// ROM_LOAD16_BYTE( "265-c8d.bin", 0x3000001, 0x800000, 0xbef667a3 ) /* Plane 2,3 */
ROM_END

ROM_START( kof10tha )
ROM_REGION( 0x700000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf10-p1a.bin", 0x000000, 0x700000, 0xCBC97E22 )

NEO_SFIX_128K( "kf10-s1a.bin", 0xA849BD80 )

NEO_BIOS_SOUND_128K( "kf10-m1.bin",0xF6FAB859 )

ROM_REGION( 0x1000000, REGION_SOUND1, ROMREGION_SOUNDONLY )
ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, 0x0fc9a58d )
ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, 0xb8c475a4 )

NO_DELTAT_REGION

ROM_REGION( 0x4000000, REGION_GFX3, 0 )
ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, 0x3bbc0364 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, 0x91230075 ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c1b.bin", 0x0800000, 0x400000, 0xb5abfc28 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c2b.bin", 0x0800001, 0x400000, 0x6cc4c6e1 ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3a.bin", 0x1000000, 0x400000, 0x5b3d4a16 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4a.bin", 0x1000001, 0x400000, 0xc6f3419b ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c3b.bin", 0x1800000, 0x400000, 0x9d2bba19 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c4b.bin", 0x1800001, 0x400000, 0x5a4050cb ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5a.bin", 0x2000000, 0x400000, 0xa289d1e1 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6a.bin", 0x2000001, 0x400000, 0xe6494b5d ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c5b.bin", 0x2800000, 0x400000, 0x404fff02 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, 0xf2ccfc9e ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, 0xbe79c5a8 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, 0xa5952ca4 ) /* Plane 2,3 */
ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, 0x3fdb3542 ) /* Plane 0,1 */
ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, 0x661b7a52 ) /* Plane 2,3 */
ROM_END
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: netbug on March 07, 2005, 11:14:52 PM
This driver maybe exists in someone's hard disk for long time
and is not public,"not mine".At last as far as I know "some people"
have already got decrypted set P.
It really belongs to IQ_132's code,"not mine!"
So.... :D  :D  :D  :D

Code: [Select]

// The King of Fighters 10th Anniversary Edition (hack)
static struct BurnRomInfo kof10thRomDesc[] = {
{"kf10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

  {"kf10-s1.bin",  0x020000, 0xE2A6A999, 2 | BRF_GRA }, //  1

  {"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  2 Sprite data
  {"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  3
  {"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  4
  {"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  5
  {"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  6
  {"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  7
  {"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  8
  {"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  9
  {"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  10
  {"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  11
  {"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  12
  {"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  13
  {"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  14
  {"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  15
  {"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  16
  {"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  17

  {"kf10-m1.bin",  0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  18 Z80 code

{"kf10-v1.bin",  0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  19 Sound data
{"kf10-v2.bin",  0x800000, 0xB8C475A4, 5 | BRF_SND }, //  20
};

STDROMPICKEXT(kof10th,kof10th,neogeo);
STD_ROM_FN(kof10th);

static void kof10th_patches()
{
 // starting at 0xE0000
 unsigned char data1[120] = {
  0xBC, 0x28, 0x00, 0x00, 0x6A, 0xD8, 0x7C, 0x1B, 0x3F, 0x00, 0x0C, 0x05, 0xFC, 0x33, 0x00, 0x01,
  0x3C, 0x00, 0x06, 0x00, 0x75, 0x4E, 0x2D, 0x42, 0x0C, 0x05, 0x7C, 0x1B, 0x3F, 0x00, 0x0C, 0x05,
  0x75, 0x4E, 0x00, 0x61, 0x42, 0x00, 0xF9, 0x47, 0x10, 0x00, 0x00, 0xFD, 0x7C, 0x17, 0x80, 0x00,
  0x82, 0x00, 0x2B, 0x0C, 0x80, 0x00, 0x82, 0x00, 0xF2, 0x66, 0x7C, 0x17, 0x01, 0x00, 0x83, 0x00,
  0x2B, 0x0C, 0x01, 0x00, 0x83, 0x00, 0xF2, 0x66, 0x7C, 0x17, 0x00, 0x00, 0x8C, 0x00, 0x2B, 0x0C,
  0x00, 0x00, 0x8C, 0x00, 0xF2, 0x66, 0x7C, 0x17, 0x03, 0x00, 0x8F, 0x00, 0x2B, 0x0C, 0x03, 0x00,
  0x8F, 0x00, 0xF2, 0x66, 0x75, 0x4E, 0xF9, 0x41, 0x2F, 0x00, 0x00, 0xE0, 0x3C, 0x30, 0xF7, 0x0F,
  0x58, 0x42, 0xC8, 0x51, 0xFC, 0xFF, 0x75, 0x4E
 };

 // starting at 0xE1000
 unsigned char data2[1248] = {
 0xFC, 0x33, 0x20, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x7C, 0x2B, 0x0A, 0x00, 0xBE, 0x67, 0x00, 0x05,
 0x75, 0x4E, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x39, 0x32, 0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33,
 0x07, 0x00, 0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33, 0x03, 0x00, 0x25, 0x00, 0xF0, 0xFF, 0x79, 0x0C,
 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0x06, 0x00, 0x00, 0x66, 0x0A, 0x00, 0xFC, 0x33,
 0x00, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x79, 0x0C, 0x20, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x00, 0x67,
 0x06, 0x01, 0x00, 0x66, 0x02, 0x00, 0x08, 0x2F, 0x09, 0x2F, 0x02, 0x2F, 0xFC, 0x33, 0x05, 0x00,
 0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33, 0x01, 0x00, 0x2F, 0x00, 0xFC, 0xFF, 0xF9, 0x41, 0x2C, 0x00,
 0x00, 0x00, 0xF9, 0x43, 0x20, 0x00, 0x00, 0x00, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x13,
 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00,
 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xE6, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x41,
 0x20, 0x00, 0x00, 0x80, 0xF9, 0x43, 0x21, 0x00, 0x00, 0x00, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00,
 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00,
 0x00, 0x80, 0xE6, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x41, 0x21, 0x00, 0x00, 0x00,
 0xF9, 0x43, 0x22, 0x00, 0x00, 0x00, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A,
 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x60, 0xE6, 0x66,
 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x41, 0x2D, 0x00, 0x00, 0x60, 0xF9, 0x43, 0x22, 0x00,
 0x00, 0xC0, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32,
 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xE6, 0x66, 0xF9, 0x41, 0x2D, 0x00,
 0x00, 0xE0, 0xF9, 0x43, 0x23, 0x00, 0x00, 0xC0, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14,
 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x20,
 0xE6, 0x66, 0xFC, 0x33, 0x00, 0x00, 0x2F, 0x00, 0xFC, 0xFF, 0x1F, 0x24, 0x5F, 0x22, 0x5F, 0x20,
 0xF9, 0x4E, 0x0E, 0x00, 0x5C, 0x12, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67,
 0xF6, 0xFE, 0xFC, 0x33, 0x00, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x08, 0x2F, 0x09, 0x2F, 0x02, 0x2F,
 0xFC, 0x33, 0x05, 0x00, 0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33, 0x01, 0x00, 0x2F, 0x00, 0xFC, 0xFF,
 0xF9, 0x41, 0x20, 0x00, 0x00, 0x00, 0xF9, 0x43, 0x20, 0x00, 0x00, 0x00, 0x3C, 0x20, 0x00, 0x00,
 0x00, 0x00, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0xBA, 0xFE, 0xC0, 0x13,
 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00,
 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xDA, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0x0C,
 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0x8E, 0xFE, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00,
 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00,
 0x00, 0x80, 0xDA, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00,
 0x8E, 0x00, 0x00, 0x67, 0x62, 0xFE, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A,
 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xDA, 0x66,
 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67,
 0x36, 0xFE, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32,
 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xDA, 0x66, 0x79, 0x0C, 0x01, 0x00,
 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0x10, 0xFE, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x33,
 0x00, 0x00, 0x2F, 0x00, 0xFC, 0xFF, 0x1F, 0x24, 0x5F, 0x22, 0x5F, 0x20, 0xC0, 0x13, 0x30, 0x00,
 0x01, 0x00, 0xC1, 0x33, 0x2F, 0x00, 0xF0, 0xFF, 0x00, 0x70, 0x75, 0x4E, 0xFF, 0xFF, 0xFF, 0xFF,
 0xB0, 0xC4, 0x73, 0x0E, 0x84, 0x17, 0x3E, 0x1F, 0x66, 0xA5, 0xAD, 0x74, 0x5F, 0x3B, 0x35, 0xF2,
 0xFE, 0x6D, 0xCE, 0x01, 0x8F, 0x23, 0x79, 0x5A, 0x5C, 0x85, 0xBD, 0x74, 0x2E, 0x05, 0x90, 0x30,
 0xE9, 0xEB, 0xF9, 0x08, 0xDE, 0xA6, 0x6D, 0xEA, 0x50, 0xCD, 0xA4, 0x81, 0x35, 0x88, 0x73, 0x89,
 0x26, 0xD3, 0xF1, 0x7C, 0x21, 0xD0, 0xDB, 0xB7, 0x7D, 0x1B, 0x0F, 0xDD, 0x36, 0xD6, 0x93, 0x17,
 0x74, 0xE1, 0x76, 0x7D, 0xF2, 0x6A, 0x89, 0xC4, 0xAA, 0xDC, 0xB4, 0xFC, 0xE9, 0xC5, 0x6D, 0xFC,
 0xAA, 0x47, 0x99, 0xC7, 0xE8, 0x2A, 0xD4, 0x03, 0x3F, 0x9C, 0xE3, 0x52, 0x07, 0x3D, 0xDE, 0x2D,
 0xC4, 0xFF, 0x4D, 0x7C, 0xA5, 0xFF, 0x3D, 0x21, 0x55, 0x56, 0x16, 0x26, 0x5E, 0x89, 0xB2, 0x43,
 0xFA, 0x19, 0xF6, 0xF8, 0xE8, 0x64, 0xFC, 0x58, 0xC2, 0xC4, 0x81, 0x5C, 0xE2, 0xA6, 0x31, 0x4D,
 0xC8, 0x0B, 0xFC, 0x9E, 0x99, 0xAD, 0x8E, 0x3F, 0x2D, 0xAE, 0xA1, 0x4B, 0xB7, 0x95, 0xB1, 0x9F,
 0x03, 0x05, 0x55, 0xAD, 0xE0, 0x5B, 0x46, 0x9A, 0x1F, 0x3B, 0xCD, 0x8B, 0x47, 0xAA, 0x26, 0xA1,
 0xE8, 0x39, 0x1E, 0x0A, 0x2C, 0x67, 0xDF, 0x2B, 0x0D, 0x40, 0xC6, 0xC5, 0x4F, 0xDA, 0xB3, 0xA0,
 0x2C, 0x33, 0x20, 0x13, 0x4C, 0x98, 0x05, 0x7D, 0x6E, 0x93, 0x46, 0x80, 0xF0, 0x0E, 0x36, 0x9D,
 0x0B, 0x25, 0x69, 0x70, 0x77, 0xCD, 0xEE, 0xBB, 0xC8, 0x55, 0x93, 0xF8, 0xBE, 0x72, 0xDC, 0x1F,
 0x5A, 0x38, 0xDA, 0xE1, 0x63, 0x51, 0xE3, 0x7C, 0xC2, 0x4B, 0x09, 0xE6, 0xD3, 0xC3, 0xB2, 0x00,
 0x94, 0xDB, 0xB2, 0x10, 0x4F, 0x2A, 0xD5, 0x93, 0x30, 0x23, 0xB1, 0x55, 0xDA, 0xA3, 0x30, 0x42,
 0xEC, 0x14, 0x24, 0x5C, 0x19, 0x68, 0xEA, 0xE1, 0x2A, 0xCF, 0xCD, 0x72, 0x23, 0xE5, 0xCC, 0xD8,
 0x5F, 0xD0, 0xE6, 0xB2, 0x47, 0x77, 0x0C, 0x23, 0x13, 0xCB, 0x67, 0x5A, 0xB3, 0xE0, 0x8A, 0x7D,
 0xBF, 0x33, 0xBC, 0x53, 0x1D, 0x6B, 0x7C, 0xC2, 0xB1, 0x76, 0xE6, 0xE9, 0x4F, 0xBD, 0x8D, 0x7D,
 0xC8, 0xE7, 0x10, 0xAD, 0xAB, 0x56, 0x63, 0xA5, 0x38, 0x5A, 0x97, 0x8E, 0x95, 0xC7, 0xA4, 0x8D,
 0x2B, 0x6D, 0x7A, 0x23, 0xDB, 0x93, 0x5C, 0x00, 0x5D, 0x82, 0x43, 0x19, 0x02, 0xBF, 0xDD, 0x93,
 0xA4, 0x6D, 0x57, 0xE2, 0x85, 0x18, 0x09, 0x22, 0x65, 0xC9, 0xBD, 0x88, 0x09, 0x24, 0x13, 0x7D,
 0x04, 0x06, 0x53, 0xB2, 0x7B, 0xC6, 0xA4, 0x49, 0x34, 0x24, 0x71, 0xDD, 0x21, 0x8C, 0x7F, 0x0B,
 0x45, 0x1D, 0xFE, 0xC1, 0x9B, 0xB8, 0x8A, 0x6D, 0x5C, 0xFD, 0xF4, 0xE8, 0xD3, 0xED, 0x49, 0xA4,
 0x99, 0xAE, 0x58, 0x76, 0xDF, 0x95, 0xCE, 0x15, 0x32, 0x77, 0x97, 0x1C, 0xCF, 0xF1, 0x13, 0x21,
 0x79, 0x1D, 0x63, 0x41, 0x6E, 0xDE, 0xCA, 0x24, 0xD8, 0xC7, 0xF2, 0x5B, 0xF5, 0x45, 0x92, 0xA3,
 0xB7, 0x82, 0xB4, 0x6D, 0xA8, 0x3E, 0xAD, 0xAB, 0x53, 0x80, 0x79, 0xC8, 0x6A, 0xE7, 0x15, 0x5E,
 0x8B, 0xFF, 0x02, 0xEB, 0x3C, 0xDD, 0x0C, 0xB4, 0x94, 0xE5, 0x08, 0x99, 0xA9, 0x79, 0x19, 0x6A,
 0xA6, 0x0A, 0xB3, 0x24, 0x31, 0xAC, 0x72, 0x1B, 0x8F, 0x35, 0x77, 0xE2, 0x8F, 0x91, 0xDA, 0x95,
 0x40, 0xC1, 0x71, 0xCE, 0xFE, 0xB6, 0xEF, 0x54, 0x44, 0xFF, 0x25, 0x68, 0x6A, 0x06, 0xE2, 0x32,
 0x29, 0x3A, 0xB7, 0xB4, 0x92, 0x72, 0xA9, 0x43, 0xD7, 0x73, 0x8C, 0x72, 0x11, 0x42, 0x97, 0xE8,
 0xDA, 0xCE, 0x62, 0x8A, 0x6A, 0x13, 0x6C, 0x08, 0x99, 0xAC, 0xD1, 0x98, 0xEC, 0x91, 0xCE, 0x82,
 0x82, 0x71, 0x42, 0xBE, 0x9D, 0xD4, 0x3A, 0xCD, 0x1C, 0x06, 0x51, 0x92, 0x06, 0x74, 0x5B, 0xC2,
 0x18, 0xFC, 0xA6, 0x48, 0xF1, 0x4D, 0xDA, 0x9E, 0x41, 0x6B, 0x33, 0x07, 0x1F, 0xEE, 0x9C, 0x2D,
 0x6B, 0x7D, 0xF0, 0x75, 0xE4, 0xBF, 0x6A, 0x2E, 0x48, 0xA5, 0xF9, 0x63, 0xBA, 0xD2, 0x10, 0xDD,
 0x33, 0x8C, 0x26, 0xBD, 0xC1, 0x67, 0xEC, 0xB2, 0xE3, 0xAB, 0x0D, 0x9E, 0x2F, 0x1A, 0xE4, 0x51,
 0x1D, 0x95, 0x7B, 0x92, 0xB0, 0xCC, 0xD9, 0xA7, 0x43, 0xF3, 0x54, 0x14, 0xB8, 0x30, 0x80, 0x3C,
 0xE1, 0x2D, 0xE9, 0x2D, 0xC3, 0x10, 0xAF, 0xAB, 0x27, 0xC3, 0xBC, 0x51, 0x85, 0x41, 0x1B, 0x57,
 0x4C, 0x5D, 0xB7, 0x60, 0x0A, 0x41, 0x83, 0x46, 0xEF, 0x80, 0xCD, 0xE0, 0xC8, 0x8E, 0x4B, 0x30,
 0x55, 0xF9, 0x12, 0x65, 0x9E, 0xA5, 0x8E, 0xBE, 0xAB, 0xFB, 0x3A, 0x20, 0xC6, 0xB9, 0x93, 0xF8
 };

 int i;
 UINT8 *mem8   = (UINT8 *)Neo68KROM;
 unsigned short *mem16 = (unsigned short *)Neo68KROM;

 mem8 [ 0x000124 ] = 0x0D;
 mem8 [ 0x000126 ] = 0xA8;
 mem8 [ 0x000127 ] = 0xF7;
 mem8 [ 0x008BF4 ] = 0xF9;
 mem8 [ 0x008BF5 ] = 0x4E;
 mem8 [ 0x008BF6 ] = 0x0D;
 mem8 [ 0x008BF8 ] = 0x80;
 mem8 [ 0x008BF9 ] = 0xF9;
 mem8 [ 0x0DD880 ] = 0x75;
 mem8 [ 0x0DD881 ] = 0x4E;
 mem8 [ 0x0DD89E ] = 0x75;
 mem8 [ 0x0DD89F ] = 0x4E;
 mem8 [ 0x0DD8BC ] = 0x75;
 mem8 [ 0x0DD8BD ] = 0x4E;
 mem8 [ 0x0DF987 ] = 0x16;
 mem8 [ 0x0DF999 ] = 0x16;


 for (i=0;i<120;i++)
  mem8[ i+0xE0000 ]=data1[i];
 mem16[ 0xE0078/2 ]=0xFFFF;
 
 for (i=0;i<1248;i++)
  mem8[ i+0xE1000 ]=data2[i];
 mem16[ 0xE14E0/2 ]=0xFFFF;
}

static void kof10th_px_decrypt()
{
int i,j,rom_size = 0x800000;
unsigned char* src = Neo68KROM;
unsigned char* dst =(unsigned char*)malloc(rom_size);

  if (dst) {
  // Copy of P1 at 200000 and 300000 (120b diff)
    memcpy(dst+0x000000, src+0x700000, 0x100000);
    memcpy(dst+0x100000, src+0x000000, 0x400000);
    memcpy(dst+0x500000, src+0x400000, 0x200000);
    //memcpy(src+0x000000, dst+0x000000, 0x800000);

    //memcpy(dst,src,rom_size);

  for( i = 0; 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);
  }

  kof10th_patches();
}

static void kof10th_px_decrypt()
{
int i,j,rom_size = 0x800000;
unsigned char* src = Neo68KROM;
unsigned char* dst =(unsigned char*)malloc(rom_size);

  if (dst) {
  // Copy of P1 at 200000 and 300000 (120b diff)
    memcpy(dst+0x000000, src+0x700000, 0x100000);
    memcpy(dst+0x100000, src+0x000000, 0x400000);
    memcpy(dst+0x500000, src+0x400000, 0x200000);
    //memcpy(src+0x000000, dst+0x000000, 0x800000);

    //memcpy(dst,src,rom_size);

  for( i = 0; i < rom_size; 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);
  }
 
  kof10th_patches();
}

static int kof10thInit()
{
pNeoInitCallback = kof10th_px_decrypt;
nNeoTextROMFixType= 10;
  return NeoInit();
}

struct BurnDriver BurnDrvkof10th= {
  "kof10th",NULL, "neogeo", "2004",
"The King of Fighters 10th Anniversary Edition (hack)\0",NULL,"SNK Playmore", "Neo Geo",
NULL, NULL, NULL, NULL,
  BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SRAM,
  NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
  kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
  nNeoScreenWidth, 224, 4, 3
};
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 07, 2005, 11:32:26 PM
lol, that's my code :P  Looks like someone is sharing a bit early :p
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 07, 2005, 11:43:35 PM
Quote from: iq_132
lol, that's my code :P  Looks like someone is sharing a bit early :p


BTW.IQ!

nNeoTextROMFixType= 10; ???

IQ.In fact.

kof10th kf10-c3a -- c8b same as kof2k2nd kf2k2_c3.rom -- kf2k2_c8.rom,

kof10th kf10-v1/2 same as kof2002 decrypted V.

why Raz & U useing the many same roms? ^_^

netbug. I'v tested your FBA code. the kof10th can't boot,just black screen. :mad:

by the way,what is nNeoTextROMFixType= 10; :cool:
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 08, 2005, 01:45:50 AM
BMS... I've tried that decrypted P rom and a decrypted S rom.
Also, I've tried the C roms as you suggest.  
They all result in the backgrounds still being scrambled.  
Is there something you haven't mentioned/posted?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 08, 2005, 03:57:32 AM
Quote from: iq_132
BMS... I've tried that decrypted P rom and a decrypted S rom.
Also, I've tried the C roms as you suggest.  
They all result in the backgrounds still being scrambled.  
Is there something you haven't mentioned/posted?


OK.you can get decrypted S and Emu( NMameX II) from here:

http://bbs.emu-zone.org/showthread.php?t=266007
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 08, 2005, 05:28:53 AM
None of those drivers work  I think rather get the set thats working in Kawaks 1.54 than all these weird sets  :cool:


netbug code boots up for me but its still not working properly and its the same as the driver I already have


netbug driver

(http://img94.exs.cx/img94/4238/capture9oj.jpg)


Quote from: bms888
Kof10th do not need any bankswitch code. ^_^



So what code does it need ??
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: KaNyErO on March 08, 2005, 08:49:30 AM
i´ve done a 100% standard 128kb s1 that should work even in nrx. It even fixes some bugs like the infinite symbol. If you want it just let me know.

btw... it seems that emulation in kawaks is not perfect, i was told different characters has different moves.  :confused:
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: neo04 on March 08, 2005, 09:09:23 AM
kanyero can u give patch for it? thx :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: JiMMy_PaGe on March 08, 2005, 12:25:14 PM
@BMS888
ur set dosent need bankswitch because its not protected, but the encrypted p roms has 3 bankswitchs, two of them are emulated (see iq's code), now theres only one left...
Btw, could u make a patch from kawaks dev p1 ram dump or the encrypted one to ur p1a ? it will be very useful for us, with ur p rom we will be able to finish the driver and finally run the encrypted set :D :D
@Kanyero:
Its good to know that u have the fully fixed and decrypted s1 :D :D, btw, could u give us some informations about it? like, if it uses bitswap or not, or something... any help will be very aprecciated :D
Thanks in advance
See ya bros
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 08, 2005, 01:20:14 PM
I have a slight correction for Jimmy.  There aren't bankswitches.  There are 3 ram locations that need to be emulated correctly, and also need to be switched between the two because of an overlap (at least according to Razoola's docs)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: JiMMy_PaGe on March 08, 2005, 01:22:41 PM
Quote from: iq_132
I have a slight correction for Jimmy.  There aren't bankswitches.  There are 3 ram locations that need to be emulated correctly, and also need to be switched between the two because of an overlap (at least according to Razoola's docs)

Yeah u are right, thanks for the correction, i always get confused with these bankswitch/rams things lol  :D   :D
See ya
 :cool:
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 08, 2005, 06:49:33 PM
Quote from: Jimmy_Page
@BMS888
ur set dosent need bankswitch because its not protected, but the encrypted p roms has 3 bankswitchs, two of them are emulated (see iq's code), now theres only one left...
Btw, could u make a patch from kawaks dev p1 ram dump or the encrypted one to ur p1a ? it will be very useful for us, with ur p rom we will be able to finish the driver and finally run the encrypted set :D :D
@Kanyero:
Its good to know that u have the fully fixed and decrypted s1 :D :D, btw, could u give us some informations about it? like, if it uses bitswap or not, or something... any help will be very aprecciated :D
Thanks in advance
See ya bros


@Jim
This p1a is a fixed P1 by HappyASR,not new P1 set,have some changes.^_^.

   ROM_LOAD16_WORD_SWAP( "kf10-p1a.bin", 0x000000, 0x700000, 0xCBC97E22 )
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 08, 2005, 06:52:33 PM
Quote from: iq_132
I have a slight correction for Jimmy.  There aren't bankswitches.  There are 3 ram locations that need to be emulated correctly, and also need to be switched between the two because of an overlap (at least according to Razoola's docs)


Yes.IQ.

Razoola's docs some info is importend for me about RAM locations and port address.^_^
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 08, 2005, 06:52:54 PM
Can you post a patch for that? :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 08, 2005, 06:55:05 PM
Quote from: iq_132
Can you post a patch for that? :D


do you means this p1a?

ROM_LOAD16_WORD_SWAP( "kf10-p1a.bin", 0x000000, 0x700000, 0xCBC97E22 )
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 08, 2005, 07:01:30 PM
Yes....
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 08, 2005, 07:16:14 PM
Yes a patch for the Decrypted P rom would be nice .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: KaNyErO on March 08, 2005, 07:30:24 PM
sorry the s1 i was talking is just an standard neogeo one and doesnt work fine with this game at least now... maybe it will be usefull for nrx :eek:  in a future who knows :S
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 09, 2005, 02:23:48 AM
OK.IQ & Jim & James.

I've uploaded that p1a in here:

ROM_LOAD16_WORD_SWAP( "kf10-p1a.bin", 0x000000, 0x700000, 0xCBC97E22 )

http://www.*.com/viewthread.php?tid=271982&highlight=&page=1
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 09, 2005, 04:14:51 AM
Quote from: bms888
OK.IQ & Jim & James.

I've uploaded that p1a in here:

ROM_LOAD16_WORD_SWAP( "kf10-p1a.bin", 0x000000, 0x700000, 0xCBC97E22 )

http://www.*.com/viewthread.php?tid=271982&highlight=&page=1
It wont let me register  So I am not able to download the files :(  
Thanks for all your help though .


Quote
对不起,目前论坛禁止新用户注册,请返回。
Quote

Sorry, at present the forum forbids the new user registration, please return.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: tcwlee on March 09, 2005, 05:11:58 AM
Quote from: James33
It wont let me register  So I am not able to download the files :(  
Thanks for all your help though .


琵琶行论坛         停止注册,下次开放时间请查看论坛通告
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 09, 2005, 05:17:57 AM
Quote

The pipa good forum stops registering, next time the opening hour please will examine the forum circular


??????????????????????????


So how can I join then  ? Please explain this in english please :)

如此怎么我可以然后加入? 请解释这用英语请 ?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: neo04 on March 09, 2005, 10:13:26 AM
@james: try go here first: http://www.*.net/
then, click the link to new user or bbs or something.. on the top right of the page
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 09, 2005, 11:54:39 AM
That did not work .

I have tried doing a ram dump and every time i have done it I get a differnt CRC and it runs the same way the original CRC B1FD0C43 does :(
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 09, 2005, 09:34:51 PM
I am sure the decrypted ( Ram Dumped ) rom still needs code . Just not sure what it is though

I found one strange thing when i did the ram dumps That every time I did one the CRC was different Why would it do that ?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Shoometsu on March 09, 2005, 09:58:24 PM
Quote from: James33
I am sure the decrypted ( Ram Dumped ) rom still needs code . Just not sure what it is though

I found one strange thing when i did the ram dumps That every time I did one the CRC was different Why would it do that ?


bankswitch :confused:
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 09, 2005, 11:34:51 PM
Yes its a Bankswitch :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 10, 2005, 07:35:43 PM
I hope some can tell me how to covert this code to FBA,thx.

Code: [Select]


static UINT16 mv0_bank_ram[ 0x10/2 ];

static READ16_HANDLER( kof2003b_prot_r )
{
return mv0_bank_ram[ 1 ];
}

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x??????, 0x??????, 0, 0, MRA16_RAM);
memory_install_write16_handler(0, ADDRESS_SPACE_PROGRAM, 0x??????, 0x??????, 0, 0, MWA16_RAM);

memory_install_read16_handler(0, ADDRESS_SPACE_PROGRAM, 0x??????, 0x??????, 0, 0, kof2003b_prot_r);


then kof10th can work on FBA,^_^.

0x?????? is based on Raz's some info.^_^
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on March 10, 2005, 07:42:49 PM
I just find this.maybe someone can point it.

MAME
Code: [Select]

static MEMORY_READ16_START( neogeo_readmem )
{ 0x6a0000, 0x6a1fff, MRA16_RAM },
MEMORY_END

static MEMORY_WRITE16_START( neogeo_writemem )
{ 0x6a0000, 0x6a1fff, MWA16_RAM },
MEMORY_END


FBA neo_run.cpp
Code: [Select]

SekMapMemory(NeoPalSrc[0], [COLOR=Blue]0x6A0000, 0x6A1FFF,[/COLOR] SM_RAM); // Palette RAM bank 0 always accessed here
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Death Metal on March 14, 2005, 01:15:58 AM
Just some dumb comment here: seeing as how easy it must be to hack KoF2002, I might introduce you guys to my own new, completely l33t KoF2002-based fighter very soon, which promises to pwn most of the other hacks out there big time!

...Nah, I don't have such skills. :p

On a serious note, I might be a little late here, but apparently this is close to being fully emulated on NeoMAME[something]. Once the code gets out, it will probably be possible to be entirely translated into FBA, anyway.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 14, 2005, 01:39:33 AM
It is fully emulated And not by neomame :P  It only has a few GFX glitches in the neogeo logo screen and does not use a S rom which is extracted from the P rom  :)  So far adding the code to FBA is not easy .As the Mame code has to be converted in a differnt way .
Title: Driver to MAME ;)
Post by: Macgaiver on March 14, 2005, 07:14:19 AM
Code: [Select]
ROM_START( kof10th )
ROM_REGION( 0x800000, REGION_CPU1, 0 )
ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )

NEO_SFIX_128K( "kf10-s1.bin", CRC(A849BD80) SHA1(0C97A5FD029F1B38B6A6EF83974F17AD33C4F18E) )

NEO_BIOS_SOUND_128K( "kf10-m1.bin", CRC(5198A41C) SHA1(7DBFD9E07A364758C0B97DA03E5D38B29ABA5ED4) )

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 void kof10th_patches( void )
{
/* starting at 0xE0000 */
unsigned char data1[120] = {
0xBC, 0x28, 0x00, 0x00, 0x6A, 0xD8, 0x7C, 0x1B, 0x3F, 0x00, 0x0C, 0x05, 0xFC, 0x33, 0x00, 0x01,
0x3C, 0x00, 0x06, 0x00, 0x75, 0x4E, 0x2D, 0x42, 0x0C, 0x05, 0x7C, 0x1B, 0x3F, 0x00, 0x0C, 0x05,
0x75, 0x4E, 0x00, 0x61, 0x42, 0x00, 0xF9, 0x47, 0x10, 0x00, 0x00, 0xFD, 0x7C, 0x17, 0x80, 0x00,
0x82, 0x00, 0x2B, 0x0C, 0x80, 0x00, 0x82, 0x00, 0xF2, 0x66, 0x7C, 0x17, 0x01, 0x00, 0x83, 0x00,
0x2B, 0x0C, 0x01, 0x00, 0x83, 0x00, 0xF2, 0x66, 0x7C, 0x17, 0x00, 0x00, 0x8C, 0x00, 0x2B, 0x0C,
0x00, 0x00, 0x8C, 0x00, 0xF2, 0x66, 0x7C, 0x17, 0x03, 0x00, 0x8F, 0x00, 0x2B, 0x0C, 0x03, 0x00,
0x8F, 0x00, 0xF2, 0x66, 0x75, 0x4E, 0xF9, 0x41, 0x2F, 0x00, 0x00, 0xE0, 0x3C, 0x30, 0xF7, 0x0F,
0x58, 0x42, 0xC8, 0x51, 0xFC, 0xFF, 0x75, 0x4E
};

/* starting at 0xE1000 */
unsigned char data2[1248] = {
0xFC, 0x33, 0x20, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x7C, 0x2B, 0x0A, 0x00, 0xBE, 0x67, 0x00, 0x05,
0x75, 0x4E, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x39, 0x32, 0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33,
0x07, 0x00, 0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33, 0x03, 0x00, 0x25, 0x00, 0xF0, 0xFF, 0x79, 0x0C,
0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0x06, 0x00, 0x00, 0x66, 0x0A, 0x00, 0xFC, 0x33,
0x00, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x79, 0x0C, 0x20, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x00, 0x67,
0x06, 0x01, 0x00, 0x66, 0x02, 0x00, 0x08, 0x2F, 0x09, 0x2F, 0x02, 0x2F, 0xFC, 0x33, 0x05, 0x00,
0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33, 0x01, 0x00, 0x2F, 0x00, 0xFC, 0xFF, 0xF9, 0x41, 0x2C, 0x00,
0x00, 0x00, 0xF9, 0x43, 0x20, 0x00, 0x00, 0x00, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x13,
0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00,
0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xE6, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x41,
0x20, 0x00, 0x00, 0x80, 0xF9, 0x43, 0x21, 0x00, 0x00, 0x00, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00,
0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00,
0x00, 0x80, 0xE6, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x41, 0x21, 0x00, 0x00, 0x00,
0xF9, 0x43, 0x22, 0x00, 0x00, 0x00, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A,
0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x60, 0xE6, 0x66,
0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xF9, 0x41, 0x2D, 0x00, 0x00, 0x60, 0xF9, 0x43, 0x22, 0x00,
0x00, 0xC0, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32,
0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xE6, 0x66, 0xF9, 0x41, 0x2D, 0x00,
0x00, 0xE0, 0xF9, 0x43, 0x23, 0x00, 0x00, 0xC0, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14,
0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x20,
0xE6, 0x66, 0xFC, 0x33, 0x00, 0x00, 0x2F, 0x00, 0xFC, 0xFF, 0x1F, 0x24, 0x5F, 0x22, 0x5F, 0x20,
0xF9, 0x4E, 0x0E, 0x00, 0x5C, 0x12, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67,
0xF6, 0xFE, 0xFC, 0x33, 0x00, 0x00, 0x10, 0x00, 0xF6, 0xFF, 0x08, 0x2F, 0x09, 0x2F, 0x02, 0x2F,
0xFC, 0x33, 0x05, 0x00, 0x2F, 0x00, 0xF0, 0xFF, 0xFC, 0x33, 0x01, 0x00, 0x2F, 0x00, 0xFC, 0xFF,
0xF9, 0x41, 0x20, 0x00, 0x00, 0x00, 0xF9, 0x43, 0x20, 0x00, 0x00, 0x00, 0x3C, 0x20, 0x00, 0x00,
0x00, 0x00, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0xBA, 0xFE, 0xC0, 0x13,
0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00,
0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xDA, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0x0C,
0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0x8E, 0xFE, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00,
0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00,
0x00, 0x80, 0xDA, 0x66, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00,
0x8E, 0x00, 0x00, 0x67, 0x62, 0xFE, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A,
0xF3, 0xF3, 0xC2, 0x32, 0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xDA, 0x66,
0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x79, 0x0C, 0x01, 0x00, 0x10, 0x00, 0x8E, 0x00, 0x00, 0x67,
0x36, 0xFE, 0xC0, 0x13, 0x30, 0x00, 0x01, 0x00, 0x18, 0x14, 0x42, 0x0A, 0xF3, 0xF3, 0xC2, 0x32,
0x40, 0x06, 0x01, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x00, 0x80, 0xDA, 0x66, 0x79, 0x0C, 0x01, 0x00,
0x10, 0x00, 0x8E, 0x00, 0x00, 0x67, 0x10, 0xFE, 0x3C, 0x20, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x33,
0x00, 0x00, 0x2F, 0x00, 0xFC, 0xFF, 0x1F, 0x24, 0x5F, 0x22, 0x5F, 0x20, 0xC0, 0x13, 0x30, 0x00,
0x01, 0x00, 0xC1, 0x33, 0x2F, 0x00, 0xF0, 0xFF, 0x00, 0x70, 0x75, 0x4E, 0xFF, 0xFF, 0xFF, 0xFF,
0xB0, 0xC4, 0x73, 0x0E, 0x84, 0x17, 0x3E, 0x1F, 0x66, 0xA5, 0xAD, 0x74, 0x5F, 0x3B, 0x35, 0xF2,
0xFE, 0x6D, 0xCE, 0x01, 0x8F, 0x23, 0x79, 0x5A, 0x5C, 0x85, 0xBD, 0x74, 0x2E, 0x05, 0x90, 0x30,
0xE9, 0xEB, 0xF9, 0x08, 0xDE, 0xA6, 0x6D, 0xEA, 0x50, 0xCD, 0xA4, 0x81, 0x35, 0x88, 0x73, 0x89,
0x26, 0xD3, 0xF1, 0x7C, 0x21, 0xD0, 0xDB, 0xB7, 0x7D, 0x1B, 0x0F, 0xDD, 0x36, 0xD6, 0x93, 0x17,
0x74, 0xE1, 0x76, 0x7D, 0xF2, 0x6A, 0x89, 0xC4, 0xAA, 0xDC, 0xB4, 0xFC, 0xE9, 0xC5, 0x6D, 0xFC,
0xAA, 0x47, 0x99, 0xC7, 0xE8, 0x2A, 0xD4, 0x03, 0x3F, 0x9C, 0xE3, 0x52, 0x07, 0x3D, 0xDE, 0x2D,
0xC4, 0xFF, 0x4D, 0x7C, 0xA5, 0xFF, 0x3D, 0x21, 0x55, 0x56, 0x16, 0x26, 0x5E, 0x89, 0xB2, 0x43,
0xFA, 0x19, 0xF6, 0xF8, 0xE8, 0x64, 0xFC, 0x58, 0xC2, 0xC4, 0x81, 0x5C, 0xE2, 0xA6, 0x31, 0x4D,
0xC8, 0x0B, 0xFC, 0x9E, 0x99, 0xAD, 0x8E, 0x3F, 0x2D, 0xAE, 0xA1, 0x4B, 0xB7, 0x95, 0xB1, 0x9F,
0x03, 0x05, 0x55, 0xAD, 0xE0, 0x5B, 0x46, 0x9A, 0x1F, 0x3B, 0xCD, 0x8B, 0x47, 0xAA, 0x26, 0xA1,
0xE8, 0x39, 0x1E, 0x0A, 0x2C, 0x67, 0xDF, 0x2B, 0x0D, 0x40, 0xC6, 0xC5, 0x4F, 0xDA, 0xB3, 0xA0,
0x2C, 0x33, 0x20, 0x13, 0x4C, 0x98, 0x05, 0x7D, 0x6E, 0x93, 0x46, 0x80, 0xF0, 0x0E, 0x36, 0x9D,
0x0B, 0x25, 0x69, 0x70, 0x77, 0xCD, 0xEE, 0xBB, 0xC8, 0x55, 0x93, 0xF8, 0xBE, 0x72, 0xDC, 0x1F,
0x5A, 0x38, 0xDA, 0xE1, 0x63, 0x51, 0xE3, 0x7C, 0xC2, 0x4B, 0x09, 0xE6, 0xD3, 0xC3, 0xB2, 0x00,
0x94, 0xDB, 0xB2, 0x10, 0x4F, 0x2A, 0xD5, 0x93, 0x30, 0x23, 0xB1, 0x55, 0xDA, 0xA3, 0x30, 0x42,
0xEC, 0x14, 0x24, 0x5C, 0x19, 0x68, 0xEA, 0xE1, 0x2A, 0xCF, 0xCD, 0x72, 0x23, 0xE5, 0xCC, 0xD8,
0x5F, 0xD0, 0xE6, 0xB2, 0x47, 0x77, 0x0C, 0x23, 0x13, 0xCB, 0x67, 0x5A, 0xB3, 0xE0, 0x8A, 0x7D,
0xBF, 0x33, 0xBC, 0x53, 0x1D, 0x6B, 0x7C, 0xC2, 0xB1, 0x76, 0xE6, 0xE9, 0x4F, 0xBD, 0x8D, 0x7D,
0xC8, 0xE7, 0x10, 0xAD, 0xAB, 0x56, 0x63, 0xA5, 0x38, 0x5A, 0x97, 0x8E, 0x95, 0xC7, 0xA4, 0x8D,
0x2B, 0x6D, 0x7A, 0x23, 0xDB, 0x93, 0x5C, 0x00, 0x5D, 0x82, 0x43, 0x19, 0x02, 0xBF, 0xDD, 0x93,
0xA4, 0x6D, 0x57, 0xE2, 0x85, 0x18, 0x09, 0x22, 0x65, 0xC9, 0xBD, 0x88, 0x09, 0x24, 0x13, 0x7D,
0x04, 0x06, 0x53, 0xB2, 0x7B, 0xC6, 0xA4, 0x49, 0x34, 0x24, 0x71, 0xDD, 0x21, 0x8C, 0x7F, 0x0B,
0x45, 0x1D, 0xFE, 0xC1, 0x9B, 0xB8, 0x8A, 0x6D, 0x5C, 0xFD, 0xF4, 0xE8, 0xD3, 0xED, 0x49, 0xA4,
0x99, 0xAE, 0x58, 0x76, 0xDF, 0x95, 0xCE, 0x15, 0x32, 0x77, 0x97, 0x1C, 0xCF, 0xF1, 0x13, 0x21,
0x79, 0x1D, 0x63, 0x41, 0x6E, 0xDE, 0xCA, 0x24, 0xD8, 0xC7, 0xF2, 0x5B, 0xF5, 0x45, 0x92, 0xA3,
0xB7, 0x82, 0xB4, 0x6D, 0xA8, 0x3E, 0xAD, 0xAB, 0x53, 0x80, 0x79, 0xC8, 0x6A, 0xE7, 0x15, 0x5E,
0x8B, 0xFF, 0x02, 0xEB, 0x3C, 0xDD, 0x0C, 0xB4, 0x94, 0xE5, 0x08, 0x99, 0xA9, 0x79, 0x19, 0x6A,
0xA6, 0x0A, 0xB3, 0x24, 0x31, 0xAC, 0x72, 0x1B, 0x8F, 0x35, 0x77, 0xE2, 0x8F, 0x91, 0xDA, 0x95,
0x40, 0xC1, 0x71, 0xCE, 0xFE, 0xB6, 0xEF, 0x54, 0x44, 0xFF, 0x25, 0x68, 0x6A, 0x06, 0xE2, 0x32,
0x29, 0x3A, 0xB7, 0xB4, 0x92, 0x72, 0xA9, 0x43, 0xD7, 0x73, 0x8C, 0x72, 0x11, 0x42, 0x97, 0xE8,
0xDA, 0xCE, 0x62, 0x8A, 0x6A, 0x13, 0x6C, 0x08, 0x99, 0xAC, 0xD1, 0x98, 0xEC, 0x91, 0xCE, 0x82,
0x82, 0x71, 0x42, 0xBE, 0x9D, 0xD4, 0x3A, 0xCD, 0x1C, 0x06, 0x51, 0x92, 0x06, 0x74, 0x5B, 0xC2,
0x18, 0xFC, 0xA6, 0x48, 0xF1, 0x4D, 0xDA, 0x9E, 0x41, 0x6B, 0x33, 0x07, 0x1F, 0xEE, 0x9C, 0x2D,
0x6B, 0x7D, 0xF0, 0x75, 0xE4, 0xBF, 0x6A, 0x2E, 0x48, 0xA5, 0xF9, 0x63, 0xBA, 0xD2, 0x10, 0xDD,
0x33, 0x8C, 0x26, 0xBD, 0xC1, 0x67, 0xEC, 0xB2, 0xE3, 0xAB, 0x0D, 0x9E, 0x2F, 0x1A, 0xE4, 0x51,
0x1D, 0x95, 0x7B, 0x92, 0xB0, 0xCC, 0xD9, 0xA7, 0x43, 0xF3, 0x54, 0x14, 0xB8, 0x30, 0x80, 0x3C,
0xE1, 0x2D, 0xE9, 0x2D, 0xC3, 0x10, 0xAF, 0xAB, 0x27, 0xC3, 0xBC, 0x51, 0x85, 0x41, 0x1B, 0x57,
0x4C, 0x5D, 0xB7, 0x60, 0x0A, 0x41, 0x83, 0x46, 0xEF, 0x80, 0xCD, 0xE0, 0xC8, 0x8E, 0x4B, 0x30,
0x55, 0xF9, 0x12, 0x65, 0x9E, 0xA5, 0x8E, 0xBE, 0xAB, 0xFB, 0x3A, 0x20, 0xC6, 0xB9, 0x93, 0xF8
};

int k;
UINT8 *rom = memory_region(REGION_CPU1);
//data16_t *mem16 = (data16_t *)memory_region(REGION_CPU1);

rom[ 0x000124 ] = 0x0D;
rom[ 0x000126 ] = 0xA8;
rom[ 0x000127 ] = 0xF7;
rom[ 0x008BF4 ] = 0xF9;
rom[ 0x008BF5 ] = 0x4E;
rom[ 0x008BF6 ] = 0x0D;
rom[ 0x008BF8 ] = 0x80;
rom[ 0x008BF9 ] = 0xF9;
rom[ 0x0DD880 ] = 0x75;
rom[ 0x0DD881 ] = 0x4E;
rom[ 0x0DD89E ] = 0x75;
rom[ 0x0DD89F ] = 0x4E;
rom[ 0x0DD8BC ] = 0x75;
rom[ 0x0DD8BD ] = 0x4E;
rom[ 0x0DF987 ] = 0x16;
rom[ 0x0DF999 ] = 0x16;

for (k=0;k<120;k++)
*((unsigned short*)(rom+k+0xE0000))=data1[k];
*((unsigned short*)(rom+0xE0078))=0xFFFF;

for (k=0;k<1248;k++)
*((unsigned short*)(rom+k+0xE1000))=data2[k];
*((unsigned short*)(rom+0xE14E0))=0xFFFF;
}

static unsigned short kof10_tbl[0x1000];
static READ16_HANDLER( kof10_16_r )
{
return kof10_tbl[offset];
}

static WRITE16_HANDLER( kof10_16_w )
{
UINT32 bankaddress;
kof10_tbl[offset]=(kof10_tbl[offset]&mem_mask)|((~mem_mask)&data);
if(offset>0xff9) return;
bankaddress=((kof10_tbl[0xff8]>>8)|(kof10_tbl[0xff9]<<8))+0x100000;
*(((UINT8 *)kof10_tbl)+0x1ff0)=0xa0;
*(((UINT8 *)kof10_tbl)+0x1ff1)&=0xfe;
*(((UINT8 *)kof10_tbl)+0x1ff3)&=0x7f;
neogeo_set_cpu1_second_bank(bankaddress);
*(((unsigned char *)memory_region(REGION_CPU1))+0x58196)=kof10_tbl [0xff9]&0xff;
}

DRIVER_INIT( kof10th )
{
/* Original FBA code & patches by iq_132, converted & updated to MAME by neo04 */
UINT8 *src = memory_region(REGION_CPU1);
UINT8 *dst = (UINT8*)malloc(0x800000);
int i, j;
if (dst)
{
//Copy of P1 at 200000 and 300000 (120b diff)
memcpy(dst+0x000000, src+0x700000, 0x100000);
memcpy(dst+0x100000, src+0x000000, 0x400000);
memcpy(dst+0x500000, src+0x400000, 0x200000);
memcpy(src+0x000000, dst+0x000000, 0x800000);

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

kof10th_patches();

/* same as kof2003 :P */
memory_install_read16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffef, 0, 0, kof10_16_r );
memory_install_write16_handler( 0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffef, 0, 0, kof10_16_w );

init_neogeo();
}


GAMEB( 2004, kof10th,  neogeo,   neogeo, neogeo, neogeo,   kof10th,   ROT0, "Playmore Corporation / Yuki Enterprise", "The King of Fighters 10th Anniversary - All Team Battle" )
(http://www.mame.com.br/kof10th.png)

driver is not fully correct As It crashes on the game continue screen .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Ebsy on March 14, 2005, 08:27:43 AM
Thanks for posting this, I realise it isn't 100% working at the moment, but it's getting there.

The driver works in a certain version of mame, but some people seem intent on hoarding the driver for kof10th, it's sad really.
Title: Multigames with VsynchMAME
Post by: Macgaiver on March 14, 2005, 01:04:00 PM
Quote from: Ebsy
Thanks for posting this, I realise it isn't 100% working at the moment, but it's getting there.

The driver works in a certain version of mame, but some people seem intent on hoarding the driver for kof10th, it's sad really.


A lot of people want to compile for VsynchMAME v0.61.  
Because they want to put in multijogos based on this system, that has a certain support for 15Khz with video on-board..  :(:(

Macgaiver
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 14, 2005, 05:35:20 PM
My driver does not crash on the continue screen But I cannot post it..

I cannot share what is not mine to share .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on March 14, 2005, 06:14:58 PM
Quote from: Ebsy
Thanks for posting this, I realise it isn't 100% working at the moment, but it's getting there.

The driver works in a certain version of mame, but some people seem intent on hoarding the driver for kof10th, it's sad really.



Its not a matter of hoarding Its a matter of not being right Its a bit silly posting the wrong info . I am sure once the driver is correct it will be posted .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 14, 2005, 07:28:34 PM
I agree with James.  I have a driver that I'm working on, but It's not worth posting if it isn't 100% correct.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: JiMMy_PaGe on March 14, 2005, 09:12:35 PM
I agree with James33 and Iq... Its unuseless to release a driver that isnt right, the real driver is alot different... that one there is just a cheap  provisory driver, thats why u get errors on the continue screen and u cant extract the s1 from the p1...
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Shoometsu on March 14, 2005, 09:22:16 PM
let me understand: the drivers above has a lot of patches, so teh emulation is not correct? to be a true emulation we need to emulate all the protections correctly, right?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: JiMMy_PaGe on March 14, 2005, 09:29:46 PM
Quote from: Shoometsu
let me understand: the drivers above has a lot of patches, so teh emulation is not correct? to be a true emulation we need to emulate all the protections correctly, right?

Yeah something like that, but in this case the patches are needed to emulate the ram, but they are much smaller that those one... two lines to be exact... the bankswitch on this driver is wrong too, the correct driver use only the standart neogeo bankswitch writing on two adresses and reading on one...
See ya  :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Death Metal on March 14, 2005, 10:29:06 PM
In English, it's not 100% working just yet. :p
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on March 15, 2005, 08:33:55 AM
lol, I guess I can elaborate a little more on what Jimmy said.
The bankswitch the game needs is the standard neogeo bankswitch (again?)
It also needs basically the same ram chip setup as vliner and jockeygp, but to a different address (2fe000-2fffff).
The sdata is encrypted and is in the 600000 - 700000 region - There is 512k of it
Also, at address e1000 and e0000, apparently kawaks extracts the info that should be in one of the ram chips from somewhere in the P and patches it back onto those addresses.
Also, if you dump the P rom, you'll see kawaks applies a few patches.  These are required for two reasons, one set of patches is to start the protection of the game (these patches are actually done by the protection chip) and the other is done to fix a few bugs with the emulation.
Neat-o, huh?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: KaNyErO on March 15, 2005, 05:06:17 PM
and there is another missing feature in kawaks, it seems there should be another patch to make different chars have different moves :S
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 05, 2005, 09:15:56 PM
IQ... have you figured something to get working kof10th in fba? there is some drivers on RomShare that makes this game run perfectly (and it isn't the one by neo04) it has the real bankswitches and whole stuff fro srom decryption... but by some reason i cannot get fba load the game correctly with this... at kleast i can help with this:
this:
Code: [Select]
install_mem_read16_handler  (0,0x2fe000,0x2fffff, neogeo_sram16_2_r);
install_mem_write16_handler (0,0x2fe000,0x2fffff, neogeo_sram16_2_w);
install_mem_write16_handler (0,0x2ffff0,0x2fffff, neo_bankswitch_w);

is equal to:
Code: [Select]
static int kof10thInit()
{
int nRet;
extern unsigned char* NeoNVRAM2;

//pNeoInitCallback = ?;

nRet = NeoInit();
if (nRet == 0) {
SekMapMemory(NeoNVRAM2, 0x2fe000, 0x2fffff, SM_RAM); // kof10th 68K RAM

SekMapHandler(5, 0x2FFFF0, 0x2FFFFF, SM_WRITE); // kof10th 68K bankswitch
SekSetWriteWordHandler(5, neogeoWriteWordBankswitch);
SekSetWriteByteHandler(5, neogeoWriteByteBankswitch);
}
return nRet;
}

to compile correctly add this to neogeo.h:
Code: [Select]
void __fastcall neogeoWriteByteBankswitch(unsigned int sekAddress, unsigned char byteValue);
void __fastcall neogeoWriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue);

The problem is that i cannot get the game fully working, the other stuff only gives me a gurur meditation XD... i hope you can fix this.
See ya!!!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Death Metal on April 06, 2005, 01:30:33 AM
Yay, finally some refreshing news about this driver. :p However, I have just tested this and unfortunately it doesn't seem to work with me either, although I get no Guru at no moment at all -- it just doesn't run the game; instead, it enters in that squared screen and stays there forever.

Well, this is the driver I'm using (already updated with Ferchogtx's code above), in case you guys might be wondering:

Code: [Select]
// The King of Fighters: 10th Anniversary (KOF2002 hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{ "kf10-p1.bin" , 0x800000, 0xb1fd0c43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

{ "kf10-c1a.bin", 0x400000, 0x3bbc0364, 3 | BRF_GRA }, //  1 Sprite data
{ "kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{ "kf10-c3a.bin", 0x400000, 0x5b3d4a16, 3 | BRF_GRA }, //  3
{ "kf10-c4a.bin", 0x400000, 0xc6f3419b, 3 | BRF_GRA }, //  4
{ "kf10-c5a.bin", 0x400000, 0xa289d1e1, 3 | BRF_GRA }, //  5
{ "kf10-c6a.bin", 0x400000, 0xe6494b5d, 3 | BRF_GRA }, //  6
{ "kf10-c7a.bin", 0x400000, 0xbe79c5a8, 3 | BRF_GRA }, //  7
{ "kf10-c8a.bin", 0x400000, 0xa5952ca4, 3 | BRF_GRA }, //  8
{ "kf10-c1b.bin", 0x400000, 0xb5abfc28, 3 | BRF_GRA }, //  9
{ "kf10-c2b.bin", 0x400000, 0x6cc4c6e1, 3 | BRF_GRA }, // 10
{ "kf10-c3b.bin", 0x400000, 0x9d2bba19, 3 | BRF_GRA }, // 11
{ "kf10-c4b.bin", 0x400000, 0x5a4050cb, 3 | BRF_GRA }, // 12
{ "kf10-c5b.bin", 0x400000, 0x404fff02, 3 | BRF_GRA }, // 13
{ "kf10-c6b.bin", 0x400000, 0xf2ccfc9e, 3 | BRF_GRA }, // 14
{ "kf10-c7b.bin", 0x400000, 0x3fdb3542, 3 | BRF_GRA }, // 15
{ "kf10-c8b.bin", 0x400000, 0x661b7a52, 3 | BRF_GRA }, // 16

{ "kf10-m1.bin" , 0x020000, 0xf6fab859, 4 | BRF_ESS | BRF_PRG }, // 17 Z80 code

{ "kf10-v1.bin" , 0x800000, 0x0fc9a58d, 5 | BRF_SND }, // 18 Sound data
{ "kf10-v2.bin" , 0x800000, 0xb8c475a4, 5 | BRF_SND }, // 19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

static int kof10thInit()
{
int nRet;
unsigned char* NeoNVRAM2;

nRet = NeoInit();

if (nRet == 0) {
SekMapMemory(NeoNVRAM2, 0x2fe000, 0x2fffff, SM_RAM); // kof10th 68K RAM

SekMapHandler(5, 0x2FFFF0, 0x2FFFFF, SM_WRITE); // kof10th 68K bankswitch
SekSetWriteWordHandler(5, neogeoWriteWordBankswitch);
SekSetWriteByteHandler(5, neogeoWriteByteBankswitch);
}

return nRet;
}

struct BurnDriver BurnDrvKof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters: 10th Anniversary (hack)\0", NULL, "Hack", "Neo-Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
304, 224, 19, 14
};


I'm not sure if I'm loading the C ROMs correctly, but I doubt it has anything to do with the current problem.

Anyway, thanks for posting that code, Ferch.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on April 06, 2005, 03:27:16 AM
PS: I use some pvc code and other code(likes ms5plus),not NeoNVRAM2.^_^

OK.I'm useing this Cx romset now, because I remove some c3a-c8b unusefull rom from my harddisk(in fact,same as kof2002 decrypted C3 - C8). We have to add this code to load correct in FBA.^_^

Code: [Select]

static void kof10th_cfix()
{
// Reload C-roms (fix FBA load problem)
BurnLoadRom(NeoSpriteROM+0x0000000, 1, 2);
BurnLoadRom(NeoSpriteROM+0x0000001, 2, 2);
BurnLoadRom(NeoSpriteROM+0x0800000, 3, 2);
BurnLoadRom(NeoSpriteROM+0x0800001, 4, 2);
BurnLoadRom(NeoSpriteROM+0x1000000, 5, 2);
BurnLoadRom(NeoSpriteROM+0x1000001, 6, 2);
BurnLoadRom(NeoSpriteROM+0x2000000, 7, 2);
BurnLoadRom(NeoSpriteROM+0x2000001, 8, 2);
BurnLoadRom(NeoSpriteROM+0x3000000, 9, 2);
BurnLoadRom(NeoSpriteROM+0x3000001, 10, 2);
}


Code: [Select]

{"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
/*
{"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16
*/
{"kf2k2_c3.rom", 0x800000, 0x959fad0B, 3 | BRF_GRA }, //  5
{"kf2k2_c4.rom", 0x800000, 0xefe6a468, 3 | BRF_GRA }, //  6
{"kf2k2_c5.rom", 0x800000, 0x74bba7c6, 3 | BRF_GRA }, //  7
{"kf2k2_c6.rom", 0x800000, 0xe20d2216, 3 | BRF_GRA }, //  8
{"kf2k2_c7.rom", 0x800000, 0x8a5b561c, 3 | BRF_GRA }, //  9
{"kf2k2_c8.rom", 0x800000, 0xbef667a3, 3 | BRF_GRA }, //  10
Title: Yes I am lazy
Post by: James33 on April 06, 2005, 09:45:48 AM
A full driver would be nice :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on April 06, 2005, 10:16:32 AM
HI,boys.If you useing encrypt P,you must be add some code. :D

Code: [Select]
{"kf10-p1.bin" , 0x800000, 0xb1fd0c43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

Code: [Select]
static void kof10th_pdec()
{
int i, j, size = 0x800000;
UINT16 *prom = (UINT16*)Neo68KROM;
UINT16 *buf = (UINT16*)malloc(size);

memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

for (i=0;i<size/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]);
}

prom[0x00124/2] = 0x000D;
prom[0x00126/2] = 0xF7A8;
prom[0x08bf4/2] = 0x4EF9;
prom[0x08bf6/2] = 0x000D;
prom[0x08bf8/2] = 0xF980;
prom[0xe1154/2] = 0x125C;
prom[0xdf986/2] = 0x168C;
prom[0xdf998/2] = 0x1668;
prom[0xdd880/2] = 0x4E75;
prom[0xdd89e/2] = 0x4E75;
prom[0xdd8bc/2] = 0x4E75;
}

Quote from: Death Metal
Yay, finally some refreshing news about this driver. :p However, I have just tested this and unfortunately it doesn't seem to work with me either, although I get no Guru at no moment at all -- it just doesn't run the game; instead, it enters in that squared screen and stays there forever.

Well, this is the driver I'm using (already updated with Ferchogtx's code above), in case you guys might be wondering:

Code: [Select]
// The King of Fighters: 10th Anniversary (KOF2002 hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{ "kf10-p1.bin" , 0x800000, 0xb1fd0c43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

struct BurnDriver BurnDrvKof10th = {
};

I'm not sure if I'm loading the C ROMs correctly, but I doubt it has anything to do with the current problem.

Anyway, thanks for posting that code, Ferch.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 06, 2005, 09:10:29 PM
Well, here the complete fully working driver, no pvc or weird things, just the real bankswitch and p decryption, also srom decryption and extraction.
BTW... it has only one bug... the neogeo logo screen looks a bit scrambled, but everithing else is right now
Thanks to IQ_132 for the info, drivers and help :)
Code: [Select]
// The King of Fighters 10th Anniversary (bootleg / hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{"kf10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code (Is supposed to have the text data)

{"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
{"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16

  {"kf10-m1.bin",  0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  17 Z80 code

{"kf10-v1.bin",  0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  18 Sound data (Decrypted data from kof2002)
{"kf10-v2.bin",  0x800000, 0xB8C475A4, 5 | BRF_SND }, //  19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

// Thanks to IQ_132 for the whole help and drivers
// Thanks to BDiamond for this code
// This is essentially the standard Neo-Geo bankswitch
static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000) {
nBank = 0x100000;
}
if (nBank != nNeo68KROMBank) {
nNeo68KROMBank = nBank;
SekMapMemory(Neo68KROM + nNeo68KROMBank, 0x200000, 0x2FDFFF, SM_ROM);
}
}

void __fastcall kof10thWriteByteBankswitch(unsigned int sekAddress, unsigned char byteValue)
{
if (sekAddress >= 0x2FFFF0) {
kof10thBankswitch(byteValue);
return;
}
}

void __fastcall kof10thWriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue)
{
if (sekAddress >= 0x2FFFF0) {
kof10thBankswitch(wordValue);
return;
}
}

static void kof10thDecrypt()
{
int i,j;
unsigned short *prom = (unsigned short*)Neo68KROM;
unsigned short *buf = (unsigned short*)malloc(0x800000);
unsigned short *srom = (unsigned short*)NeoTextROM + 0x20000;

// Re-order the P data
memcpy(buf+0x000000/2, prom+0x700000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x400000);
memcpy(buf+0x500000/2, prom+0x400000/2, 0x200000);

// decrypt all of the P data
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, game does this on the fly!
  // bank 1
  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
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);
}

memcpy(NeoTextROM+0x80000, NeoTextROM+0x40000, 0x20000);

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

// Blank P-ROM bank in the following address (similar to cthd2003)
void Neokof10thMapBank()
{
SekMapMemory(Neo68KROM + nNeo68KROMBank, 0x200000, 0x2FDFFF, SM_ROM);
}

static int kof10thInit()
{
int nRet;

pNeoInitCallback = kof10thDecrypt;
pNeoBankswitchCallback = Neokof10thMapBank;
nNeoTextROMSize = 0x080000; // minor glitches in Neo-Geo logo texts

nRet = NeoInit();
if (nRet == 0) {
SekOpen(0);
// Extra RAM
SekMapMemory(Neo68KROM+0x700000, 0x2fe000, 0x2fffff, SM_RAM);

// Bankswitch handler
SekMapHandler(4, 0x2ffff0, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(4, kof10thWriteWordBankswitch);
SekSetWriteByteHandler(4, kof10thWriteByteBankswitch);

kof10thBankswitch(0);

SekClose();
}
return nRet;
}

struct BurnDriver BurnDrvkof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters 10th Anniversary\0", "Hack of \"The King of Fighters 2002\"", "SNK Playmore", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

Enjoy ;)
See ya!!!!!! :D
P.D. The reset bug is fixed here XD... SURPRISE!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 06, 2005, 10:37:41 PM
Great work A job well done :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 07, 2005, 01:13:22 AM
Nice work Ferchogtx :)  I'm glad you fixed that reset bug.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on April 07, 2005, 01:35:55 AM
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 07, 2005, 08:14:32 AM
Quote from: bms888
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);



Where would you put that code ?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 07, 2005, 08:20:08 AM
Quote from: bms888
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);


Is that the same as the code that is used in Mame ?

Code: [Select]

        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 )
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 07, 2005, 08:38:52 PM
Quote from: bms888
Good,but I use this order,have some diff in game.same as HappyASR fixed wk154 now.

Code: [Select]

        // Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

What diff? game play?, hidden moves or what?  :eek:
See ya!!!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on April 07, 2005, 08:56:36 PM
Quote from: FerchogtX
What diff? game play?, hidden moves or what?  :eek:
See ya!!!!! :D


Yes. you can select IORI to play,then you known.^_^

maybe this order same as real ARC(someone tell me).
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on April 07, 2005, 09:04:40 PM
Your code is very long, I use pvc code for this game.maybe short.^_^

Code: [Select]

// The King of Fighters 10th Anniversary (bootleg / hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{"kf10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code (Is supposed to have the text data)

{"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
{"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16

  {"kf10-m1.bin",  0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  17 Z80 code

{"kf10-v1.bin",  0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  18 Sound data (Decrypted data from kof2002)
{"kf10-v2.bin",  0x800000, 0xB8C475A4, 5 | BRF_SND }, //  19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

static void kof10th_decode()
{
int i, j, size = 0x800000;
UINT16 *prom = (UINT16*)Neo68KROM;
UINT16 *buf = (UINT16*)malloc(size);
UINT16 *srom = (UINT16*)NeoTextROM+0x20000;

// HappyASR fixed order
memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

// Re-order the P data
// memcpy(buf+0x000000/2, prom+0x700000/2, 0x100000);
// memcpy(buf+0x100000/2, prom+0x000000/2, 0x400000);
// memcpy(buf+0x500000/2, prom+0x400000/2, 0x200000);

for (i=0;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<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);
}
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);
}

memcpy(NeoTextROM+0x80000, NeoTextROM+0x40000, 0x20000);

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[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;
prom[0xe1154/2] = 0x125C;
prom[0xdf986/2] = 0x168C;
prom[0xdf998/2] = 0x1668;
prom[0xdd880/2] = 0x4E75;
prom[0xdd89e/2] = 0x4E75;
prom[0xdd8bc/2] = 0x4E75;
}

// Thanks to HappyASR for the info
void __fastcall kf10thWriteByteBankSwitch(unsigned int sekAddress, unsigned char byteValue)
{
pvc_w8(sekAddress,byteValue);
}

void __fastcall kf10thWriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
CartRAM[(sekAddress-0x2fe000)/2]=wordValue;
if(sekAddress==0x2ffff0)
SekMapMemory(Neo68KROM+0x100000+wordValue*0x100000,0x200000,0x2fdfff,SM_ROM);
}

static void kof10thMapHandler()
{
// Install BankSwitch handler
SekMapHandler(5, 0x2fe000, 0x2fffff, SM_READ);
SekSetReadWordHandler(5,  pvcReadWordBankSwitch);
SekSetReadByteHandler(5,  pvcReadByteBankSwitch);

SekMapHandler(5, 0x2fe000, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(5, kf10thWriteWordBankSwitch);
SekSetWriteByteHandler(5, kf10thWriteByteBankSwitch);
}

static int kof10thInit()
{
int nRet;

memset(CartRAM,0,sizeof(CartRAM));

pNeoInitCallback = kof10th_decode;
nNeoTextROMSize = 0x080000; // minor glitches in Neo-Geo logo texts

nRet = NeoInit();
if (nRet == 0) {
kof10thMapHandler();
}
return nRet;
}

struct BurnDriver BurnDrvkof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters 10th Anniversary (hack)\0", "Hack of \"The King of Fighters 2002\"", "SNK Playmore", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_CUSTOM_BANKING,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on April 07, 2005, 09:07:16 PM
In fact,HappyASR fixed order same as tc_china MAME drv.^_^
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: bms888 on April 07, 2005, 10:15:58 PM
Two order can also working. but the second order maybe have small bug,sometimes we have to press F3 to continue coin(only in FBA,mame not have this problem).
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 08, 2005, 01:22:50 AM
Quote from: bms888
Your code is very long, I use pvc code for this game.maybe short.^_^

Code: [Select]

// The King of Fighters 10th Anniversary (bootleg / hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{"kf10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code (Is supposed to have the text data)

{"kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{"kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{"kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{"kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
{"kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{"kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{"kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{"kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{"kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{"kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{"kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{"kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{"kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{"kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{"kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{"kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16

  {"kf10-m1.bin",  0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  17 Z80 code

{"kf10-v1.bin",  0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  18 Sound data (Decrypted data from kof2002)
{"kf10-v2.bin",  0x800000, 0xB8C475A4, 5 | BRF_SND }, //  19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

static void kof10th_decode()
{
int i, j, size = 0x800000;
UINT16 *prom = (UINT16*)Neo68KROM;
UINT16 *buf = (UINT16*)malloc(size);
UINT16 *srom = (UINT16*)NeoTextROM+0x20000;

// HappyASR fixed order
memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

// Re-order the P data
// memcpy(buf+0x000000/2, prom+0x700000/2, 0x100000);
// memcpy(buf+0x100000/2, prom+0x000000/2, 0x400000);
// memcpy(buf+0x500000/2, prom+0x400000/2, 0x200000);

for (i=0;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<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);
}
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);
}

memcpy(NeoTextROM+0x80000, NeoTextROM+0x40000, 0x20000);

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[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;
prom[0xe1154/2] = 0x125C;
prom[0xdf986/2] = 0x168C;
prom[0xdf998/2] = 0x1668;
prom[0xdd880/2] = 0x4E75;
prom[0xdd89e/2] = 0x4E75;
prom[0xdd8bc/2] = 0x4E75;
}

// Thanks to HappyASR for the info
void __fastcall kf10thWriteByteBankSwitch(unsigned int sekAddress, unsigned char byteValue)
{
pvc_w8(sekAddress,byteValue);
}

void __fastcall kf10thWriteWordBankSwitch(unsigned int sekAddress, unsigned short wordValue)
{
CartRAM[(sekAddress-0x2fe000)/2]=wordValue;
if(sekAddress==0x2ffff0)
SekMapMemory(Neo68KROM+0x100000+wordValue*0x100000,0x200000,0x2fdfff,SM_ROM);
}

static void kof10thMapHandler()
{
// Install BankSwitch handler
SekMapHandler(5, 0x2fe000, 0x2fffff, SM_READ);
SekSetReadWordHandler(5,  pvcReadWordBankSwitch);
SekSetReadByteHandler(5,  pvcReadByteBankSwitch);

SekMapHandler(5, 0x2fe000, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(5, kf10thWriteWordBankSwitch);
SekSetWriteByteHandler(5, kf10thWriteByteBankSwitch);
}

static int kof10thInit()
{
int nRet;

memset(CartRAM,0,sizeof(CartRAM));

pNeoInitCallback = kof10th_decode;
nNeoTextROMSize = 0x080000; // minor glitches in Neo-Geo logo texts

nRet = NeoInit();
if (nRet == 0) {
kof10thMapHandler();
}
return nRet;
}

struct BurnDriver BurnDrvkof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters 10th Anniversary (hack)\0", "Hack of \"The King of Fighters 2002\"", "SNK Playmore", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_CUSTOM_BANKING,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};



I think what matters most is which is correct .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Xeon on April 08, 2005, 09:02:07 AM
Quote from: FerchogtX
What diff? game play?, hidden moves or what?  :eek:
See ya!!!!! :D

 heres some of the ingame differences i found using bms's P re-ordering code:

the second Kensou has a different fireball attack (along with a different "hit" animation)
the second Ralf, the HCF+K throw move ends differently (which seems weaker as well).
the second K' - has a punch follow-up to his QCF+P move (just press F+P)

probably more but seems mostly related on the moves of the "clone" characters. the code you posted probably brings us what Kawaks can do, and bms's code probably brings to what the real arcade probably did. either ways, thanks all :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 08, 2005, 09:48:25 AM
So whats the best code for mame on loading the P rom ?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 08, 2005, 08:47:16 PM
Well, the bms code does the same as the one I posted, in adittion to that I talked to some guy ho told me that the real bankswitch is the one I'm using (that was sorted and fixed by IQ_132), kof10th doesn't use PVC bankswitches, and it needs maybe an extra bitswap (like kof2k3up) to enable all that missing features, also Iori has diferent moves...
See ya!!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Death Metal on April 08, 2005, 11:26:40 PM
Do you know of the needed code, Ferch?

Anyway, thanks a lot both of you for what has been posted. ;)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 09, 2005, 12:52:29 AM
Quote from: Death Metal
Do you know of the needed code, Ferch?

Anyway, thanks a lot both of you for what has been posted. ;)

By know I just know that we are missing either patches or bitswap to enable the hidden features, unfortunately the exact code only Razoola Knows it (maybe...) surely the multiarcade bootleggers know the code.
See ya!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: neo04 on April 09, 2005, 02:25:40 AM
what are those hidden features anyway? :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 10, 2005, 06:19:37 AM
Tested:
Code: [Select]
// Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);
This enables the changed moves for most charas (at least the clones)
BTW... bms, have you found a way to fix that bug you mention in FBA?
See ya!!!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Death Metal on April 10, 2005, 02:13:00 PM
Quote from: FerchogtX
Tested:
Code: [Select]
// Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);
Asinine question, but where would you insert that? :p
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 10, 2005, 06:27:40 PM
Quote from: Death Metal
Asinine question, but where would you insert that? :p




Look at FerchogtX driver You will see where it goes .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 10, 2005, 07:00:11 PM
Complete new driver with all changed moves enabled, no bugs found
Code: [Select]
// The King of Fighters 10th Anniversary (bootleg / hack)

static struct BurnRomInfo kof10thRomDesc[] = {
{ "kf10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code (Is supposed to have the text data)

{ "kf10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{ "kf10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{ "kf10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{ "kf10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
{ "kf10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{ "kf10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{ "kf10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{ "kf10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{ "kf10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{ "kf10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{ "kf10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{ "kf10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{ "kf10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{ "kf10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{ "kf10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{ "kf10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16

   { "kf10-m1.bin",  0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  17 Z80 code

{ "kf10-v1.bin",  0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  18 Sound data (Decrypted data from kof2002)
{ "kf10-v2.bin",  0x800000, 0xB8C475A4, 5 | BRF_SND }, //  19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

// Thanks to IQ_132 for the whole help and drivers
// Thanks to BDiamond for this code
// This is essentially the standard Neo-Geo bankswitch
static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000) {
nBank = 0x100000;
}
if (nBank != nNeo68KROMBank) {
nNeo68KROMBank = nBank;
SekMapMemory(Neo68KROM + nNeo68KROMBank, 0x200000, 0x2FDFFF, SM_ROM);
}
}

void __fastcall kof10thWriteByteBankswitch(unsigned int sekAddress, unsigned char byteValue)
{
if (sekAddress >= 0x2FFFF0) {
kof10thBankswitch(byteValue);
return;
}
}

void __fastcall kof10thWriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue)
{
if (sekAddress >= 0x2FFFF0) {
kof10thBankswitch(wordValue);
return;
}
}

// Thanks to IQ_132 - http://neosource.1emu.net/
static void kof10thDecrypt()
{
int i,j;
unsigned short *prom = (unsigned short*)Neo68KROM;
unsigned short *buf = (unsigned short*)malloc(0x800000);
unsigned short *srom = (unsigned short*)NeoTextROM + 0x20000;

// Re-order the P data
        memcpy(buf+0x000000/2, prom+0x600000/2, 0x100000);
        memcpy(buf+0x100000/2, prom+0x000000/2, 0x600000);

// decrypt all of the P data
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, game does this on the fly!
  // bank 1
  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
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);
}

memcpy(NeoTextROM+0x80000, NeoTextROM+0x40000, 0x20000);

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

// Blank P-ROM bank in the following address (similar to cthd2003)
void Neokof10thMapBank()
{
SekMapMemory(Neo68KROM + nNeo68KROMBank, 0x200000, 0x2FDFFF, SM_ROM);
}

static int kof10thInit()
{
int nRet;

pNeoInitCallback = kof10thDecrypt;
pNeoBankswitchCallback = Neokof10thMapBank;
nNeoTextROMSize = 0x080000; // minor glitches in Neo-Geo logo texts

nRet = NeoInit();
if (nRet == 0) {
SekOpen(0);
// Extra RAM
SekMapMemory(Neo68KROM+0x700000, 0x2fe000, 0x2fffff, SM_RAM);

// Bankswitch handler
SekMapHandler(4, 0x2ffff0, 0x2fffff, SM_WRITE);
SekSetWriteWordHandler(4, kof10thWriteWordBankswitch);
SekSetWriteByteHandler(4, kof10thWriteByteBankswitch);

kof10thBankswitch(0);

SekClose();
}
return nRet;
}

struct BurnDriver BurnDrvkof10th = {
"kof10th", "kof2002", "neogeo", "2004",
"The King of Fighters 10th Anniversary - all team battle\0", "Hack of \"The King of Fighters 2002\"", "SNK Playmore / Winter", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG, 2, HARDWARE_SNK_NEOGEO,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
See ya!!!!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Death Metal on April 10, 2005, 07:53:05 PM
That's great Ferch! Thanks so much for one more update.

EDIT: The moves did change! :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 12, 2005, 04:53:27 PM
Here is BDiamond's driver :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Shoometsu on April 12, 2005, 09:07:46 PM
Quote from: iq_132
Here is BDiamond's driver :)


in this driver there are not extra moves to iori, kensou, terry, etc, all of them are "normal" like in kof2002.... T_T
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 13, 2005, 01:18:31 AM
IQ... where to call this?
Code: [Select]
void NeoUpdateTextOne(int nOffset, const unsigned char byteValue);This line goes also in neorun.cpp or we have to add the driver exactly as it is in the TXT? just this doubt here XD
See ya!!!!!! :D
P.D. Thanks BDiamond!!!!!!!!
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 13, 2005, 02:48:19 AM
Quote from: FerchogtX
IQ... where to call this?
Code: [Select]
void NeoUpdateTextOne(int nOffset, const unsigned char byteValue);This line goes also in neorun.cpp or we have to add the driver exactly as it is in the TXT? just this doubt here XD
See ya!!!!!! :D
P.D. Thanks BDiamond!!!!!!!!

I only put it in neogeo.h like it says and it works fine . it never said to put it in neorun.cpp .


But this driver the extra moves to iori, kensou, terry no longer work .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 13, 2005, 07:11:36 AM
Quote from: FerchogtX
IQ... where to call this?
Code: [Select]
void NeoUpdateTextOne(int nOffset, const unsigned char byteValue);This line goes also in neorun.cpp or we have to add the driver exactly as it is in the TXT? just this doubt here XD
See ya!!!!!! :D
P.D. Thanks BDiamond!!!!!!!!

Neogeo.h

You may have to change it to extern void NeoUpdateTextOne...
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 13, 2005, 12:58:10 PM
Thanks IQ! worked.
BTW you can change this:
Code: [Select]

memcpy(src, dst + 0x700000, 0x100000);
memcpy(src + 0x100000, dst, 0x600000);

into this:
Code: [Select]

memcpy(src + 0x000000, dst + 0x600000, 0x100000);
memcpy(src + 0x100000, dst + 0x000000, 0x600000);

That will enable the changed moves
See ya!!!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 13, 2005, 04:28:35 PM
Here's BDiamond's updated driver (from his RomShare post).
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 13, 2005, 11:27:10 PM
Quote from: FerchogtX
Thanks IQ! worked.
BTW you can change this:
Code: [Select]

memcpy(src, dst + 0x700000, 0x100000);
memcpy(src + 0x100000, dst, 0x600000);

into this:
Code: [Select]

memcpy(src + 0x000000, dst + 0x600000, 0x100000);
memcpy(src + 0x100000, dst + 0x000000, 0x600000);

That will enable the changed moves
See ya!!!!! :D


Cool thanks :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Xeon on April 14, 2005, 03:10:05 AM
just a little question, whats are the emulation differences between BDiamond's driver and Ferchogtx's+bms fixed code?

thanks in advance.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 14, 2005, 07:45:18 AM
Well, the major differences are:

BD is properly emulating most everything, the extra bits of ram, the bankswitch, the "on-the-fly" S Data of the game, etc
(the only problem is something minor causing the background to be "stuck"

Ferch and BMS's driver doesn't emulate a few of the ram areas, it kludges the S data, and the bankswitches aren't quite right.
(though this driver is gameplay-wise less buggy than BD's, it is emulation-wise a much crappier driver)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Xeon on April 14, 2005, 12:56:52 PM
Quote from: iq_132
Well, the major differences are:

BD is properly emulating most everything, the extra bits of ram, the bankswitch, the "on-the-fly" S Data of the game, etc
(the only problem is something minor causing the background to be "stuck"

Ferch and BMS's driver doesn't emulate a few of the ram areas, it kludges the S data, and the bankswitches aren't quite right.
(though this driver is gameplay-wise less buggy than BD's, it is emulation-wise a much crappier driver)

 i see thanks :). know anything about the ingame differences (like new moves and stuff)?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: FerchogtX on April 14, 2005, 09:47:22 PM
Quote from: iq_132
Well, the major differences are:

BD is properly emulating most everything, the extra bits of ram, the bankswitch, the "on-the-fly" S Data of the game, etc
(the only problem is something minor causing the background to be "stuck"

Ferch and BMS's driver doesn't emulate a few of the ram areas, it kludges the S data, and the bankswitches aren't quite right.
(though this driver is gameplay-wise less buggy than BD's, it is emulation-wise a much crappier driver)


With stuck you mean... static backgrounds? or GFX errors? or what exactly? just for know  :confused:
See ya!!!!! :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 15, 2005, 12:19:58 AM
The background is the same on every stage of the game .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: BlackDiamond on April 15, 2005, 08:48:37 PM
the only thing missing in my driver is the byte version of the bankswitch handler i removed because i assumed the game only using word access here (and actually, it do use byte access)
so, here is the driver as it should have remained (the fbaxxx one without commentaries)
Code: [Select]
// The King of Fighters 10th Anniversary (hack/bootleg)

static struct BurnRomInfo kof10thRomDesc[] = {
{ "kof10-p1.bin",  0x800000, 0xB1FD0C43, 1 | BRF_ESS | BRF_PRG }, //  0 68K code

{ "kof10-c1a.bin", 0x400000, 0x3BBC0364, 3 | BRF_GRA }, //  1 Sprite data
{ "kof10-c2a.bin", 0x400000, 0x91230075, 3 | BRF_GRA }, //  2
{ "kof10-c1b.bin", 0x400000, 0xB5ABFC28, 3 | BRF_GRA }, //  3
{ "kof10-c2b.bin", 0x400000, 0x6CC4C6E1, 3 | BRF_GRA }, //  4
{ "kof10-c3a.bin", 0x400000, 0x5B3D4A16, 3 | BRF_GRA }, //  5
{ "kof10-c4a.bin", 0x400000, 0xC6F3419B, 3 | BRF_GRA }, //  6
{ "kof10-c3b.bin", 0x400000, 0x9D2BBA19, 3 | BRF_GRA }, //  7
{ "kof10-c4b.bin", 0x400000, 0x5A4050CB, 3 | BRF_GRA }, //  8
{ "kof10-c5a.bin", 0x400000, 0xA289D1E1, 3 | BRF_GRA }, //  9
{ "kof10-c6a.bin", 0x400000, 0xE6494B5D, 3 | BRF_GRA }, //  10
{ "kof10-c5b.bin", 0x400000, 0x404FFF02, 3 | BRF_GRA }, //  11
{ "kof10-c6b.bin", 0x400000, 0xF2CCFC9E, 3 | BRF_GRA }, //  12
{ "kof10-c7a.bin", 0x400000, 0xBE79C5A8, 3 | BRF_GRA }, //  13
{ "kof10-c8a.bin", 0x400000, 0xA5952CA4, 3 | BRF_GRA }, //  14
{ "kof10-c7b.bin", 0x400000, 0x3FDB3542, 3 | BRF_GRA }, //  15
{ "kof10-c8b.bin", 0x400000, 0x661B7A52, 3 | BRF_GRA }, //  16

{ "kf10-m1.bin",   0x020000, 0xF6FAB859, 4 | BRF_ESS | BRF_PRG }, //  17 Z80 code

{ "kf10-v1.bin",   0x800000, 0x0FC9A58D, 5 | BRF_SND }, //  18 Sound data
{ "kf10-v2.bin",   0x800000, 0xB8C475A4, 5 | BRF_SND }, //  19
};

STDROMPICKEXT(kof10th, kof10th, neogeo);
STD_ROM_FN(kof10th);

static unsigned char *kof10thExtraRAMA = NULL;
static unsigned char *kof10thExtraRAMB = NULL;

static void kof10thCallback()
{
UINT8*src = Neo68KROM;
UINT8*dst = (UINT8*)malloc(0x800000);
int i, j;

if (dst) {
memcpy(dst, src, 0x800000);
memcpy(src, dst + 0x700000, 0x100000);
memcpy(src + 0x100000, dst, 0x600000);

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

((unsigned short*)Neo68KROM)[ 0x000124 / 2] = 0x000d; // Run code that gives XOR for RAM moves and forces SoftDIPs
((unsigned short*)Neo68KROM)[ 0x000126 / 2] = 0xf7a8;
((unsigned short*)Neo68KROM)[ 0x700124 / 2] = 0x000d;
((unsigned short*)Neo68KROM)[ 0x700126 / 2] = 0xf7a8;

((unsigned short*)Neo68KROM)[ 0x008bf4 / 2] = 0x4ef9; // Run code to change 8x8 tiles (needed for neogeo logo tiles)
((unsigned short*)Neo68KROM)[ 0x008bf6 / 2] = 0x000d;
((unsigned short*)Neo68KROM)[ 0x008bf8 / 2] = 0xf980;
((unsigned short*)Neo68KROM)[ 0x708bf4 / 2] = 0x4ef9;
((unsigned short*)Neo68KROM)[ 0x708bf6 / 2] = 0x000d;
((unsigned short*)Neo68KROM)[ 0x708bf8 / 2] = 0xf980;
}

static void kof10thMapBank()
{
SekMapMemory(Neo68KROM + nNeo68KROMBank, 0x200000, 0x2FDFFF, SM_ROM);
}

static void kof10thBankswitch(unsigned int nBank)
{
nBank = 0x100000 + ((nBank & 7) << 20);
if (nBank >= 0x700000) {
nBank = 0x100000;
}

if (nBank != nNeo68KROMBank) {
nNeo68KROMBank = nBank;
kof10thMapBank();
}
}

static void __fastcall kof10thWriteWordCustom(unsigned int sekAddress, unsigned short wordValue)
{
if (kof10thExtraRAMB[ 0x1FFC]) {
NeoUpdateTextOne(0x20000 + ((sekAddress >> 1) & 0x1FFFF), BITSWAP08(wordValue, 7, 6, 0, 4, 3, 2, 1, 5));
} else {
*(unsigned short*)(kof10thExtraRAMA + (sekAddress & 0x01FFFF)) = wordValue;
}
}

static void __fastcall kof10thWriteByteBankswitch(unsigned int sekAddress, unsigned char byteValue)
{
if (sekAddress >= 0x2FE000) {
sekAddress ^= 1;
kof10thExtraRAMB[ sekAddress & 0x1FFF] = byteValue;
if (sekAddress == 0x2FFFF0)
kof10thBankswitch(byteValue);
else if (sekAddress == 0x2FFFF8 && kof10thExtraRAMB[ sekAddress & 0x1FFE] != byteValue) {
SekMapMemory(Neo68KROM + ((byteValue & 1) ? 0x700400 : 0x000400) , 0x000400, 0x0DFFFF, SM_ROM);
}
}
}

static void __fastcall kof10thWriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue)
{
if (sekAddress >= 0x2FE000) {
*(unsigned short*)(kof10thExtraRAMB + (sekAddress & 0x01FFE)) = wordValue;
if (sekAddress == 0x2FFFF0)
kof10thBankswitch(wordValue);
else if (sekAddress == 0x2FFFF8 && *(unsigned short*)(kof10thExtraRAMB + (sekAddress & 0x1FFE)) != wordValue) {
SekMapMemory(Neo68KROM + ((wordValue & 1) ? 0x700400 : 0x000400) , 0x000400, 0x0DFFFF, SM_ROM);
}
}
}

int kof10thScan(int nAction, int* /*pnMin*/)
{
struct BurnArea ba;

if (nAction & ACB_MEMORY_RAM) {
ba.Data = kof10thExtraRAMA;
ba.nLen = 0x00020000;
ba.nAddress = 0;
ba.szName = "Extra RAM A";
BurnAcb(&ba);

ba.Data = kof10thExtraRAMB;
ba.nLen = 0x00002000;
ba.nAddress = 0;
ba.szName = "Extra RAM B";
BurnAcb(&ba);

ba.Data = NeoTextROM + 0x00020000;
ba.nLen = nNeoTextROMSize;
ba.nAddress = 0;
ba.szName = "8x8 Text Tile RAM";
BurnAcb(&ba);
}

return 0;
}

static int kof10thInit()
{
int nRet;

//nNeoTextRAMSize = 0x20000; // Extra RAM A

pNeoInitCallback = kof10thCallback;
pNeoBankswitchCallback = kof10thMapBank;
pNeoScanCallback = kof10thScan;

nRet = NeoInit();

if (nRet == 0) {
kof10thExtraRAMA = Neo68KROM + 0x7E0000;
kof10thExtraRAMB = Neo68KROM + 0x1FE000;
memset(kof10thExtraRAMA, 0, 0x20000);
memset(kof10thExtraRAMB, 0, 0x2000);

SekOpen(0);

kof10thMapBank();

SekMapMemory(kof10thExtraRAMB, 0x2FE000, 0x2FFFFF, SM_ROM);
SekMapHandler(4, 0x240000, 0x2FFFFF, SM_WRITE); // 68K bankswitch
SekSetWriteWordHandler(4, kof10thWriteWordBankswitch);
SekSetWriteByteHandler(4, kof10thWriteByteBankswitch);

SekMapHandler(5, 0x200000, 0x23FFFF, SM_WRITE);
SekSetWriteWordHandler(5, kof10thWriteWordCustom);

// Memory maps
SekMapMemory(kof10thExtraRAMA, 0x0E0000, 0x0FFFFF, SM_ROM);

nNeo68KROMBank = 1;
kof10thBankswitch(0);

SekClose();
}

return nRet;
}

struct BurnDriver BurnDrvKof10th = {
"kof10th", NULL, "neogeo", "2004",
"The King of Fighters 10th Anniversary\0", "Bootleg/Hack", "SNK / Playmore", "Neo Geo",
NULL, NULL, NULL, NULL,
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE, 2, HARDWARE_SNK_NEOGEO,
NULL, kof10thRomInfo, kof10thRomName, neogeoInputInfo, neogeoDIPInfo,
kof10thInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 16, 2005, 02:37:03 AM
Wow! It's perfect! Thanks again BD :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 16, 2005, 06:49:57 AM
Thanks BD :) Now I wonder how to convert that to Mame code .
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: BlackDiamond on April 16, 2005, 01:27:57 PM
you should change this:
Code: [Select]
static void __fastcall kof10thWriteByteBankswitch(unsigned int sekAddress, unsigned char byteValue)
{
if (sekAddress >= 0x2FE000) {
sekAddress ^= 1;
kof10thExtraRAMB[ sekAddress & 0x1FFF] = byteValue;
if (sekAddress == 0x2FFFF0)
kof10thBankswitch(byteValue);
else if (sekAddress == 0x2FFFF8 && kof10thExtraRAMB[ sekAddress & 0x1FFE] != byteValue) {
SekMapMemory(Neo68KROM + ((byteValue & 1) ? 0x700400 : 0x000400) , 0x000400, 0x0DFFFF, SM_ROM);
}
}
}

static void __fastcall kof10thWriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue)
{
if (sekAddress >= 0x2FE000) {
*(unsigned short*)(kof10thExtraRAMB + (sekAddress & 0x01FFE)) = wordValue;
if (sekAddress == 0x2FFFF0)
kof10thBankswitch(wordValue);
else if (sekAddress == 0x2FFFF8 && *(unsigned short*)(kof10thExtraRAMB + (sekAddress & 0x1FFE)) != wordValue) {
SekMapMemory(Neo68KROM + ((wordValue & 1) ? 0x700400 : 0x000400) , 0x000400, 0x0DFFFF, SM_ROM);
}
}
}
into this:
Code: [Select]
static void __fastcall kof10thWriteByteBankswitch(unsigned int sekAddress, unsigned char byteValue)
{
if (sekAddress >= 0x2FE000) {
sekAddress ^= 1;
if (sekAddress == 0x2FFFF0)
kof10thBankswitch(byteValue);
else if (sekAddress == 0x2FFFF8 && kof10thExtraRAMB[ sekAddress & 0x1FFE] != byteValue) {
SekMapMemory(Neo68KROM + ((byteValue & 1) ? 0x700400 : 0x000400) , 0x000400, 0x0DFFFF, SM_ROM);
}
kof10thExtraRAMB[ sekAddress & 0x1FFF] = byteValue;
}
}

static void __fastcall kof10thWriteWordBankswitch(unsigned int sekAddress, unsigned short wordValue)
{
if (sekAddress >= 0x2FE000) {
if (sekAddress == 0x2FFFF0)
kof10thBankswitch(wordValue);
else if (sekAddress == 0x2FFFF8 && *(unsigned short*)(kof10thExtraRAMB + (sekAddress & 0x1FFE)) != wordValue) {
SekMapMemory(Neo68KROM + ((wordValue & 1) ? 0x700400 : 0x000400) , 0x000400, 0x0DFFFF, SM_ROM);
}
*(unsigned short*)(kof10thExtraRAMB + (sekAddress & 0x01FFE)) = wordValue;
}
}
i just noticed this when working on fba for xbox. with the fisrt version of the code, the SekMapMemory functions are never reached.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 16, 2005, 01:42:27 PM
Great stuff thanks BD :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Shoometsu on April 16, 2005, 04:43:40 PM
are there extra moves to others characters? aren't enabled because the p data order is another?
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Death Metal on April 16, 2005, 08:32:36 PM
Shoometsu: apparently, everything that should be there really is.
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: Shoometsu on April 16, 2005, 09:52:57 PM
it's hard to have some parameters since I didn't see the arcade version, I can only ask for extra info :D
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: emu on April 17, 2005, 10:49:06 AM
Quote from: iq_132
Here's BDiamond's updated driver (from his RomShare post).



error  :confused:
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 17, 2005, 08:06:14 PM
Try this

Make sure you do a clean compile ( Delete the obj folder )
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: tcwlee on April 18, 2005, 12:37:11 AM
Quote from: James33
Try this

Make sure you do a clean compile ( Delete the obj folder )



谢谢了,请问有适用旧版本2.94.98的SRC吗,KOF10TH
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 18, 2005, 02:18:45 AM
Here ya go tcwlee ;)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: James33 on April 18, 2005, 09:32:11 AM
Thanks IQ going have to buy you a beer one day :)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: tcwlee on April 18, 2005, 10:12:33 AM
Quote from: iq_132
Here ya go tcwlee ;)



thx very much:)
Title: King of Fighters 10th Anniversary Edition Emulation Infos
Post by: iq_132 on April 18, 2005, 09:58:39 PM
No problem guys.  Happy to help spread BD's great driver. ;)