Author Topic: Neo-PCM2 PLAYMORE 2002 code for FBA  (Read 15768 times)

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #15 on: December 02, 2004, 06:01:27 PM »
Look at the driver acosta, the cases are given by the order of the xors:
1 = kof2002
2 = matrim
3 = mslug5
4 = samsho5
5 = svcchaos
6 = kof2003 (disabled)
7 = samsh5sp
See ya!!!!!! :D
P.D. Better to use the IQ_132 code, is shorter than mine XD

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #16 on: December 02, 2004, 06:03:34 PM »
here my drivers, working at 100%
Code: [Select]
// Samurai Shodown V / Samurai Spirits Zero

static struct BurnRomInfo samsho5RomDesc[] = {
{"270-p1.bin", 0x400000, 0x4a2a09e6, 0x10}, //  0 68K code
{"270-p2.bin", 0x400000, 0xe0c74c85, 0x10}, //  1

{"270-c1.bin", 0x800000, 0x14ffffac,    1}, //  2 Sprite data
{"270-c2.bin", 0x800000, 0x401f7299,    1}, //  3
{"270-c3.bin", 0x800000, 0x838f0260,    1}, //  4
{"270-c4.bin", 0x800000, 0x041560a5,    1}, //  5
{"270-c5.bin", 0x800000, 0xbd30b52d,    1}, //  6
{"270-c6.bin", 0x800000, 0x86a69c70,    1}, //  7
{"270-c7.bin", 0x800000, 0xd28fbc3c,    1}, //  8
{"270-c8.bin", 0x800000, 0x02c530a6,    1}, //  9

{"270-m1d.bin",0x020000, 0x18114FB1, 0x10}, // 10 Z80 code (decrypted)
{"270-m1.bin" ,0x080000, 0x49c9901a, 0x10}, // 11 (encrypted)

/* This uses Neo-PCM2 PLAYMORE(c) 2002 Chip */
{"270-v1.bin", 0x800000, 0x62e434eb,    2}, // 12
{"270-v2.bin", 0x800000, 0x180f3c9a,    2}, // 13
};

STDROMPICKEXT(samsho5, samsho5, neogeo);
STD_ROM_FN(samsho5);

/* thanks to BisonSAS for the function */
static void samsho5Decrypt()
{
// menu AES color text fix
*((unsigned short*)(Neo68KROM01 + 0xE7EC2)) = 0x7CCC;
*((unsigned short*)(Neo68KROM01 + 0xE7EC4)) = 0x1DC7;
*((unsigned short*)(Neo68KROM01 + 0xE7ECA)) = 0x2DB0;
*((unsigned short*)(Neo68KROM01 + 0xE7ECE)) = 0x4C90;
*((unsigned short*)(Neo68KROM01 + 0xE7ED2)) = 0x4C60;
*((unsigned short*)(Neo68KROM01 + 0xE7ED6)) = 0x6B30;
*((unsigned short*)(Neo68KROM01 + 0xE7EE2)) = 0x7CCC;
*((unsigned short*)(Neo68KROM01 + 0xE7EE4)) = 0x1BCE;
*((unsigned short*)(Neo68KROM01 + 0xE7EEA)) = 0x549D;
*((unsigned short*)(Neo68KROM01 + 0xE7EEE)) = 0x117D;
*((unsigned short*)(Neo68KROM01 + 0xE7EF2)) = 0x204C;
*((unsigned short*)(Neo68KROM01 + 0xE7EF6)) = 0x302C;
*((unsigned short*)(Neo68KROM01 + 0xE7F02)) = 0x7CCC;
*((unsigned short*)(Neo68KROM01 + 0xE7F04)) = 0x45B1;
*((unsigned short*)(Neo68KROM01 + 0xE7F06)) = 0x14A0;
*((unsigned short*)(Neo68KROM01 + 0xE7F08)) = 0x2290;
*((unsigned short*)(Neo68KROM01 + 0xE7F0A)) = 0x4390;
*((unsigned short*)(Neo68KROM01 + 0xE7F0C)) = 0x2280;
*((unsigned short*)(Neo68KROM01 + 0xE7F0E)) = 0x2170;
*((unsigned short*)(Neo68KROM01 + 0xE7F12)) = 0x0060;
*((unsigned short*)(Neo68KROM01 + 0xE7F16)) = 0x0050;
*((unsigned short*)(Neo68KROM01 + 0xE7F18)) = 0x0040;
*((unsigned short*)(Neo68KROM01 + 0xE7F1C)) = 0x0020;

unsigned char* src = Neo68KROM01;
unsigned char* dst = (unsigned char*)malloc(0x800000);

int sec[] = {0x000000,0x080000,0x700000,0x680000,0x500000,0x180000,0x200000,0x480000,
    0x300000,0x780000,0x600000,0x280000,0x100000,0x580000,0x400000,0x380000};
if (dst)
{
memcpy(dst,src,0x800000);
for(int i = 0; i < 16; ++i)
{
memcpy(src+i*0x80000,dst+sec[i],0x80000);
}
free(dst);
}
}

static int samsho5Init()
{
nNeoProtectionXor = 0x0f;
pNeoInitCallback = samsho5Decrypt;
nNeoPCM2PLAYMOREByteswap = 4;
return NeoInit();
}

struct BurnDriver BurnDrvSamSho5 = {
{"samsho5", "Samurai Shodown V", "Japanese title is Samurai Spirits Zero", "Yuki Enterprise / SNK Playmore", "Neo Geo", "2003", NULL, "neogeo"},
BDF_GAME_WORKING | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_ENCRYPTED_B | HARDWARE_SNK_SRAM,
NULL, samsho5RomInfo, samsho5RomName, neogeoInputInfo, neogeoDIPInfo,
samsho5Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// Samurai Shodown V / Samurai Spirits Zero (Decrypted C)

static struct BurnRomInfo samsh5ndRomDesc[] = {
{"270-p1.bin", 0x400000, 0x4a2a09e6, 0x10}, //  0 68K code
{"270-p2.bin", 0x400000, 0xe0c74c85, 0x10}, //  1

{"ss5_c1.rom", 0x800000, 0x9adec562,    1}, //  2 Sprite data
{"ss5_c2.rom", 0x800000, 0xac0309e5,    1}, //  3
{"ss5_c3.rom", 0x800000, 0x82db9dae,    1}, //  4
{"ss5_c4.rom", 0x800000, 0xf8041153,    1}, //  5
{"ss5_c5.rom", 0x800000, 0xe689d62d,    1}, //  6
{"ss5_c6.rom", 0x800000, 0xa993bdcf,    1}, //  7
{"ss5_c7.rom", 0x800000, 0x707d56a0,    1}, //  8
{"ss5_c8.rom", 0x800000, 0xf5903adc,    1}, //  9

{"270-m1d.bin",0x020000, 0x18114FB1, 0x10}, // 10 Z80 code

{"270-v1.bin", 0x800000, 0x62e434eb,    2}, // 11
{"270-v2.bin", 0x800000, 0x180f3c9a,    2}, // 12
};

STDROMPICKEXT(samsh5nd, samsh5nd, neogeo);
STD_ROM_FN(samsh5nd);

struct BurnDriver BurnDrvSamSh5nd = {
{"samsh5nd", "Samurai Shodown V (decrypted C)", "Decrypted C-ROMs", "Yuki Enterprise / SNK Playmore", "Neo Geo", "2003", "samsho5", "neogeo"},
BDF_GAME_WORKING  | BDF_CLONE | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO | HARDWARE_SNK_SRAM,
NULL, samsh5ndRomInfo, samsh5ndRomName, neogeoInputInfo, neogeoDIPInfo,
samsho5Init, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};

// Samurai Shodown V / Samurai Spirits Zero (bootleg)

static struct BurnRomInfo samsh5blRomDesc[] = {
{"ss5-p1.bin", 0x400000, 0xb6cbe386, 0x10}, //  0 68K code (protected)
{"ss5-p2.bin", 0x400000, 0x5023067f, 0x10}, //  1

{"ss5-s1.bin", 0x020000, 0x70f667d0, 1}, //  2 Text layer tiles (scrambled)

{"ss5-c1.bin", 0x1000000,0x9c564a01,    1}, //  3 Sprite data (has 32 bit byte-swap)
{"ss5-c2.bin", 0x1000000,0x4b73b8da,    1}, //  4
{"ss5-c3.bin", 0x1000000,0x029f9bb5,    1}, //  5
{"ss5-c4.bin", 0x1000000,0x75722430,    1}, //  6

{"ss5-m1.bin", 0x020000, 0x18114fb1, 0x10}, //  7 Z80 code (same as samsho5? not verifyed)

{"ss5-v1.bin", 0x400000, 0xa3609761,    2}, //  8 Sound data (bitswapped)
{"ss5-v2.bin", 0x400000, 0xcbd6ebd5,    2}, //  9
{"ss5-v3.bin", 0x400000, 0x6f1c2703,    2}, // 10
{"ss5-v4.bin", 0x400000, 0x5020c055,    2}, // 11
};

STDROMPICKEXT(samsh5bl, samsh5bl, neogeo);
STD_ROM_FN(samsh5bl);

// FBA Conversion by JiMMy_PaGe (www.neofighters.com.br) original code by Halrin
// Small modification by IQ_132 -- http://neosource.1emu.net/
static void samsh5blDecrypt()
{
int rom_size = 0x800000;
UINT8 *src = Neo68KROM01;
UINT8 *dst = (UINT8*)malloc( rom_size );
int i;
int ofst;

memcpy( dst, src, rom_size );

for( i = 0; i < rom_size / 2; i++ ){
ofst = BITSWAP08( (i & 0x000ff), 7, 6, 5, 4, 3, 0, 1, 2 );
ofst += (i & 0xfffff00);

ofst ^= 0x060005;

memcpy( &src[ i * 2 ], &dst[ ofst * 2 ], 0x02 );
}

memcpy(dst, src, 0x300000);
memcpy(src, src+0x300000, 0x500000);
memcpy(src+0x500000, dst, 0x300000);

free( dst );
}

static int samsh5blInit()
{
pNeoInitCallback = samsh5blDecrypt;
nNeoTextROMFixType = 3;
return NeoInit();
}

struct BurnDriver BurnDrvsamsh5bl = {
{"samsh5bl", "Samurai Shodown V (bootleg)", "Bootleg of samsho5", "Yuki Enterprise / SNK Playmore", "Neo Geo", "2003", "samsho5", "neogeo"},
BDF_GAME_WORKING | BDF_BOOTLEG | BDF_CLONE | BDF_LOCKED, 2, HARDWARE_SNK_NEOGEO,
NULL, samsh5blRomInfo, samsh5blRomName, neogeoInputInfo, neogeoDIPInfo,
samsh5blInit, NeoExit, NeoFrame, NeoRender, NeoScan, &NeoRecalcPalette,
nNeoScreenWidth, 224, 4, 3
};
See ya!!!!! :D
« Last Edit: May 10, 2005, 02:59:28 AM by iq_132 »

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline fataku

  • Newbies
  • *
  • Posts: 22
  • Karma: +0/-0
  • Junior Member
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #17 on: December 02, 2004, 10:55:55 PM »
you are missing the code for samsh5bl's V roms made by *coff coff* someone else

Offline Xeon

  • Newbies
  • *
  • Posts: 45
  • Karma: +0/-0
  • Member
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #18 on: December 03, 2004, 01:38:49 AM »
Quote from: Accosta_m
With the code of IQC i have bad soun on Samsho5 or i have bad the V roms

What V roms is need for the IQC Code :confused:

 it worked for me, im using KDev SS5 encrypted V ROMs though (Ferchogtx seems to use another set of V ROMs).

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #19 on: December 03, 2004, 01:48:43 AM »
The ones ferchogtx is using are only a few bytes different from the kawaks dev ones.


Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #20 on: December 03, 2004, 12:32:11 PM »
Quote from: fataku
you are missing the code for samsh5bl's V roms made by *coff coff* someone else

You have already submitted that code man XD I'm too lazy to post it again XD
See ya!!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline KaNyErO

  • Member
  • ***
  • Posts: 142
  • Karma: +4/-0
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #21 on: December 12, 2004, 11:36:17 AM »
values for kof2k3 :D

{0xFF14EA 0xA7001}, //kof2003

{0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62}, //kof2003

and changes for the 16mb v1d to be de-watermarked

from v1d 2058EC5E to v1d 2964F36E
000A9B17: 00 E9
000B9B17: 00 17

Offline iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #22 on: December 12, 2004, 12:09:45 PM »
Quote from: KaNyErO
values for kof2k3 :D

{0xFF14EA 0xA7001}, //kof2003

{0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62}, //kof2003

and changes for the 16mb v1d to be de-watermarked

from v1d 2058EC5E to v1d 2964F36E
000A9B17: 00 E9
000B9B17: 00 17


Thanks for the info. ;)

Very interesting that these values are the same as samsh5sp:
{0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62}, //kof2003


Offline Shoometsu

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
  • I finally have an avatar XD
Neo-PCM2 PLAYMORE 2002 code for FBA
« Reply #23 on: December 12, 2004, 05:14:50 PM »
Quote from: KaNyErO
values for kof2k3 :D

{0xFF14EA 0xA7001}, //kof2003

{0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62}, //kof2003

and changes for the 16mb v1d to be de-watermarked

from v1d 2058EC5E to v1d 2964F36E
000A9B17: 00 E9
000B9B17: 00 17


type fix:
{0xFF14EA,0xA7001}, //kof2003

to avoid ctrl+c, ctrl+v problems XD
<- Who are you?