Welcome!

Final Burn Neo => FBN Development => Topic started by: FerchogtX on November 29, 2004, 08:05:37 PM

Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: FerchogtX on November 29, 2004, 08:05:37 PM
Hi guys, if yiou noticed that mame code, this will not be surprising XD, i hope this works...
neogeo.h
look for this:
Code: [Select]
// neo_run.cpp
add this after:
Code: [Select]
extern int nNeoPCM2PLAYMOREByteswap;
neo_run.cpp
look for this:
Code: [Select]
int nNeoSRAMProtection = -1;
add this after (or after pcm2 code by IQ_132)
Code: [Select]
int nNeoPCM2PLAYMOREByteswap = 0; // PCM2 PLAYMORE chip
Look for this:
Code: [Select]
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPV) {
for (int i = 0; i < 0x00200000; i++) {
unsigned char n = YM2610ADPCMAROM[i];
YM2610ADPCMAROM[i] = YM2610ADPCMAROM[0x00200000 + i];
YM2610ADPCMAROM[0x00200000 + i] = n;
}
}
}
add this after (or after the IQ_132 PCM2 SNK 1999 code)
Code: [Select]
/* Neo-PCM2 PLAYMORE(c) 2002 Sound Chip Emulation */
/* Original code by the vconv (from 2ch), converted to FBA code by FerchogtX */
if (nNeoPCM2PLAYMOREByteswap != 0) {
const unsigned char *PCM2_xor;
const unsigned char kof2002_xor[0x08] = {0xf9,0xe0,0x5d,0xf3,0xea,0x92,0xbe,0xef};
const unsigned char matrim_xor[0x08] = {0xc4,0x83,0xa8,0x5f,0x21,0x27,0x64,0xaf};
const unsigned char ms5_svc_xor[0x08] = {0xc3,0xfd,0x81,0xac,0x6d,0xe7,0xbf,0x9e};
const unsigned char ss5_xor[0x08] = {0xcb,0x29,0x7d,0x43,0xd2,0x3a,0xc2,0xb4};
const unsigned char ss5sp_xor[0x08] = {0x4b,0xa4,0x63,0x46,0xf0,0x91,0xea,0x62};

int v_size = nYM2610ADPCMASize;
unsigned char *rom = YM2610ADPCMAROM;
unsigned char *buf = (unsigned char*)malloc( v_size );
int ofst;

memcpy( buf, rom, v_size );

for( int i = 0; i < v_size; i++ ){
ofst = (i & 0xfefffe) |
  ((i & 0x010000) >> 16) |
  ((i & 0x000001) << 16);

// for kof2002
if (nNeoPCM2PLAYMOREByteswap == 1) {
PCM2_xor = kof2002_xor;
ofst ^= 0xa5000;
rom[ ofst ] = buf[ (i & 0xffffff) ] ^ PCM2_xor[ (ofst & 0x07) ];
}
// for matrim
if (nNeoPCM2PLAYMOREByteswap == 2) {
PCM2_xor = matrim_xor;
ofst ^= 0x01000;
rom[ ofst ] = buf[ ((i + 0xffce20) & 0xffffff) ] ^ PCM2_xor[ (ofst & 0x07) ];
}
// for mslug5
if (nNeoPCM2PLAYMOREByteswap == 3) {
PCM2_xor = ms5_svc_xor;
ofst ^= 0x4e001;
rom[ ofst ] = buf[ ((i + 0xfe2cf6) & 0xffffff) ] ^ PCM2_xor[ (ofst & 0x07) ];
}
// for svcchaos
if (nNeoPCM2PLAYMOREByteswap == 4) {
PCM2_xor = ms5_svc_xor;
ofst ^= 0x4e001;
rom[ ofst ] = buf[ ((i + 0xffac28) & 0xffffff) ] ^ PCM2_xor[ (ofst & 0x07) ];
}
// for samsho5
if (nNeoPCM2PLAYMOREByteswap == 5) {
PCM2_xor = ss5_xor;
ofst ^= 0x0a000;
rom[ ofst ] = buf[ ((i + 0xfeb2c0) & 0xffffff) ] ^ PCM2_xor[ (ofst & 0x07) ];
}
// for samsh5sp
if (nNeoPCM2PLAYMOREByteswap == 6) {
PCM2_xor = ss5sp_xor;
ofst ^= 0x02000;
rom[ ofst ] = buf[ ((i + 0xffb440) & 0xffffff) ] ^ PCM2_xor[ (ofst & 0x07) ];
}
}
free( buf );
}
look for NeoExit() int add after:
Code: [Select]
nNeoSramProtection = 0;
this:
Code: [Select]
nNeoPCM2PLAYMOREByteswap = 0; // exit PCM2 PLAYMORE chip
d_neogeo.cpp
according with the driver give the correct value for each ga,me that uses this chip, for example:
Code: [Select]
static int kof2002Init()
{
nNeoProtectionxor = 0xec
pNeoInitCallback = kof2002Decrypt;
[B]nNeoPCM2PLAYMOREByteswap = 1;[/B]
return NeoInit();
}
see ya!!!!!! :D
P.D. Edit, svcchaos and ss5 cases were swaped XD, deleted all amp references... that wasn't declared :confused: fixed ss5sp case, used ms5 one XD deleted svc chat table (svc and ms5 uses the same table, thanks to IQ_132 :P) now svcchaos ans ms5 uses the same case.
Edit2: readded case for svcchaos, mem offset is different from ms5 one XD
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: DsNo on November 29, 2004, 09:07:55 PM
Thanks very march.. FerchogtX!!
Perfectly work!!

and Changed ( & ) to ( & )... :D
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: iq_132 on November 29, 2004, 10:40:58 PM
Here's my version :)
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: FerchogtX on November 30, 2004, 01:16:08 AM
Great man!!! :P BTW I fixed the src i posted in the first post, now it will work without probs, and cleaned a lil
See ya!!!! :D
P.D. Fixed again the driver XD
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: iq_132 on November 30, 2004, 03:43:49 AM
Try this code:

neogeo.h
look for this:
Code: [Select]
// neo_run.cpp
add this after:
Code: [Select]
extern int nNeoPCM2PLAYMOREByteswap;
neo_run.cpp
look for this:
Code: [Select]
int nNeoSRAMProtection = -1;
add this after (or after pcm2 code by IQ_132)
Code: [Select]
int nNeoPCM2PLAYMOREByteswap = 0; // PCM2 PLAYMORE chip
Look for this:
Code: [Select]
if (BurnDrvGetHardwareCode() & HARDWARE_SNK_SWAPV) {
for (int i = 0; i < 0x00200000; i++) {
unsigned char n = YM2610ADPCMAROM[i];
YM2610ADPCMAROM[i] = YM2610ADPCMAROM[0x00200000 + i];
YM2610ADPCMAROM[0x00200000 + i] = n;
}
}
}
add this after (or after the IQ_132 PCM2 SNK 1999 code)
Code: [Select]
/* Neo-PCM2 PLAYMORE(c) 2002 Sound Chip Emulation */
// some code by Fataku & some by the vconv (from 2ch) - FBA conversion by iq_132
if (nNeoPCM2PLAYMOREByteswap != 0)
{
unsigned int addrs[7][2]={
{0x000000,0xA5000}, //kof2002
{0xFFCE20,0x01000}, //matrimelee
{0xFE2CF6,0x4E001}, //mslug5
{0xFEB2C0,0x0A000}, //samsho5
{0xFFAC28,0xC2000}, //svcchaos
{0x000000,0x00000}, //kof2003
{0xFFB440,0x02000}, //samsh5sp
};
       unsigned int xordata[7][8]={
{0xF9,0xE0,0x5D,0xF3,0xEA,0x92,0xBE,0xEF}, //kof2002
{0xC4,0x83,0xA8,0x5F,0x21,0x27,0x64,0xAF}, //matrimelee
{0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E}, //mslug5
{0xCB,0x29,0x7D,0x43,0xD2,0x3A,0xC2,0xB4}, //samsho5
{0xC3,0xFD,0x81,0xAC,0x6D,0xE7,0xBF,0x9E}, //svcchaos
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, //kof2003
{0x4B,0xA4,0x63,0x46,0xF0,0x91,0xEA,0x62}, //samsh5sp
};

int value = (nNeoPCM2PLAYMOREByteswap-1);
UINT8 *rom = YM2610ADPCMAROM;
UINT8 *buf = (UINT8*)malloc(0x1000000);
int ofst;

memcpy(buf,rom,0x1000000);

for(int i=0; i<0x1000000; i++)
{
ofst = (i & 0xfefffe) | ((i & 0x010000) >> 16) | ((i & 0x000001) << 16);
ofst ^= addrs[value][1];
rom[ofst] = (buf[((i + addrs[value][0]) & 0xffffff)] ^ xordata[value][(ofst & 0x07)]);
}

free(buf);
}
look for NeoExit() int add after:
Code: [Select]
nNeoSramProtection = 0;
this:
Code: [Select]
nNeoPCM2PLAYMOREByteswap = 0; // exit PCM2 PLAYMORE chip
d_neogeo.cpp
According with the driver, give the correct value for each game that uses this chip; for example:
Code: [Select]
static int kof2002Init()
{
nNeoProtectionxor = 0xec
pNeoInitCallback = kof2002Decrypt;
[B]nNeoPCM2PLAYMOREByteswap = 1;[/B]
return NeoInit();
}



btw, I think "nNeoPCM2PLAYMOREBitswap" would be more appropriate.
btw2, All the code except the main body is a complete rip of Ferchogtx's (Just so everyone knows)
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Accosta_m on November 30, 2004, 05:00:14 PM
Quote from: iq_132
Code: [Select]
static int kof2002Init()
{
nNeoProtectionxor = 0xec
pNeoInitCallback = kof2002Decrypt;
[B]nNeoPCM2PLAYMOREByteswap = 1;[/B]
return NeoInit();
}
Who is the Correct Value for this  :confused:

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

if i use this value the emulation have some sounds error What can i do for fix it??
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Death Metal on November 30, 2004, 05:59:08 PM
Quote from: Accosta_m
Who is the Correct Value for this  :confused:

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

if i use this value the emulation have some sounds error What can i do for fix it??


Should be 5, according to FerchogtX's code above (if you're going for Samurai Shodown 5, that is).
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Accosta_m on November 30, 2004, 11:11:25 PM
Quote from: Death Metal
Should be 5, according to FerchogtX's code above (if you're going for Samurai Shodown 5, that is).


i'm compile with the code IQC code


then what is the value correct for this set  :confused:

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

if i put value 4 to according with the IQC code i have noise problems in the moment am emulating the set only in this set

in kof2002, svcchaos,samsho5sp the sound is perfect but i don' test in others setss
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: fataku on December 01, 2004, 12:31:26 AM
what samsho5 V roms are you using?
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Death Metal on December 01, 2004, 01:02:21 AM
Quote from: Accosta_m
if i put value 4 to according with the IQC code i have noise problems in the moment am emulating the set only in this set

That's what I said: use 5 instead of 4 for Samurai Shodown 5. But, as fataku implied, you should only use the nNeoPCM2PLAYMOREByteswap variable with encrypted V sets.
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Accosta_m on December 01, 2004, 02:26:58 AM
270-v1.bin 8.0Mb CRC 7541763a
270-v2.bin 8.0Mb CRC 4e6e7d98

I'm using this V roms and

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

But i have some Questions For the M1
270-m1d.bin 128 kb CRC 18114FB1

And I check the fercho Code and only the sounds of SVCCHAOS and Matrim have bad sound

But the IQC code Have sound perfect in svcchaos but matrim not  :confused:

Who Can i do for Fix It :confused:
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Death Metal on December 02, 2004, 11:04:16 AM
Accosta_m: please inform which V files you are using for both svcchaos and matrim. If you're using the original, encrypted V roms, then Ferchogtx's code might need some tweak (unlikely). From what I gather, you must be trying to load sets already decrypted...?

By the way, the samsho5 roms you're using are correct. Use this init for this driver:

Code: [Select]
static int samsho5Init()
{
nNeoProtectionXor = 0x0f;
pNeoInitCallback = samsho5Decrypt;
nNeoPCM2PLAYMOREByteswap = 5;
return NeoInit();
}
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Accosta_m on December 02, 2004, 02:29:06 PM
Quote from: Death Metal
Accosta_m: please inform which V files you are using for both svcchaos and matrim.


i'm use the V roms encripted for KOF2002, Samsh5sp, Samsho5, mslug5 and these no have bad sound on the emulation but i use the Fercho Code and these are the V and M roms

For matrim

{"266-m1d.bin",0x020000, 0xf692d84B, 0x10}, // 11 Z80 code (decrypted)

{"266-v1.bin", 0x800000, 0xa4f83690,    2}, // 17 Sound data /* kawaks dev dump */
{"266-v2.bin", 0x800000, 0xd0f69eda,    2}, // 18

nNeoPCM2PLAYMOREByteswap = 2;

For SVCCHAOS

{"269-m1d.bin", 0x020000, 0xFD4F0FF9, 0x10}, //  3 Z80 code
{"269-v1.bin",  0x800000, 0xc659b34c,    2}, //  4 Sound data (Encrypted)
{"269-v2.bin",  0x800000, 0xdd903835,    2}, //  5

  nNeoPCM2PLAYMOREByteswap = 4;
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Xeon on December 02, 2004, 02:56:44 PM
try using IQ's code, for some reason Ferchogtx's code didnt work for me either (with SVC) regardless of its case (3 or 4).
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Accosta_m on December 02, 2004, 03:06:14 PM
Quote from: Xeon
try using IQ's code, for some reason Ferchogtx's code didnt work for me either (with SVC) regardless of its case (3 or 4).


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:
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: FerchogtX 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
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: FerchogtX 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
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: fataku on December 02, 2004, 10:55:55 PM
you are missing the code for samsh5bl's V roms made by *coff coff* someone else
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Xeon 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).
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: iq_132 on December 03, 2004, 01:48:43 AM
The ones ferchogtx is using are only a few bytes different from the kawaks dev ones.
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: FerchogtX 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
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: KaNyErO 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
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: iq_132 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
Title: Neo-PCM2 PLAYMORE 2002 code for FBA
Post by: Shoometsu 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