Welcome!
Final Burn Neo => FBN Development => Topic started by: iq_132 on November 08, 2004, 12:53:39 AM
-
This is the driver I'm using. ;)
// Samurai Shodown 5
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, 0x1BFF0D0E, 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}, // 10
// This uses the Neo-PCM2 2002 (Playmore) chip
// {"270-v1.bin" , 0x800000, 0x62e434eb, 2}, // 11 Sound data (encrypted)
// {"270-v2.bin" , 0x800000, 0x180f3c9a, 2}, // 12
{"270-v1d.bin", 0x800000, 0xe5c71699, 2}, // 11 Sound data
{"270-v2d.bin", 0x800000, 0x70b7083d, 2}, // 12
};
STDROMPICKEXT(samsho5, samsho5, neogeo);
STD_ROM_FN(samsho5);
static void samsho5Decrypt()
{
*((unsigned short*)(Neo68KROM01 + 0xE7EC2)) = 0x7CCC; // menu AES color text fix
*((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+0x100000;
unsigned char* dst = (unsigned char*)malloc(0x700000);
int sec[] = {0xC,0xB,0x8,0x1,0x2,0x7,0x4,0xD,0xA,0x3,0x0,0x9, 0x6,0x5};
if (dst)
{
memcpy(dst,src,0x700000);
for(int i = 0; i < 14; ++i)
{
memcpy(src+i*0x80000,dst+sec[i]*0x80000,0x80000);
}
free(dst);
}
}
static int samsho5Init()
{
nNeoProtectionXor = 0x0f;
pNeoInitCallback = samsho5Decrypt;
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, 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
};
-
you should change the information for the M1 and V roms since yours are nuked (those are baddumps)
the follow roms are the perfect ones (were redumped and confirmed by The_Dumper)
rom ( name 270-m1.bin size 524288 crc 49c9901a )
rom ( name 270-v1.bin size 8388608 crc 62e434eb )
rom ( name 270-v2.bin size 8388608 crc 180f3c9a )
-
Can you give any information on what the differences (like bytes and such) are between those and the ones that are available right now?
-
Also, your C´s are the watermarked ones,, these should be more accurrated:
{"270-c1.bin", 0x800000, 0x14FFFFAC, 1}, // 2 Sprite data
{"270-c2.bin", 0x800000, 0x401F7299, 1}, // 3
{"270-c3.bin", 0x800000, 0x1BFF0D0E, 1}, // 4
{"270-c4.bin", 0x800000, 0x41560A5, 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
-
Fixed ;)
-
IQ.....your games pages need to be updated for samsho5 (c's) and samsh5sp (m and v's)......just to let you know..... :D
-
you should change the information for the M1 and V roms since yours are nuked (those are baddumps)
the follow roms are the perfect ones (were redumped and confirmed by The_Dumper)
rom ( name 270-m1.bin size 524288 crc 49c9901a )
rom ( name 270-v1.bin size 8388608 crc 62e434eb )
rom ( name 270-v2.bin size 8388608 crc 180f3c9a )
I know you're right... but in JhonBoys dats this are marked as samsho5a (set 2 af samsho5)... so maybe the others aren't too bad at all, or meybe he divided the sets for reference? :confused:
Jesus Christ!!! What a mess again XD
See ya!!!! :D
-
I know you're right... but in JhonBoys dats this are marked as samsho5a (set 2 af samsho5)... so maybe the others aren't too bad at all, or meybe he divided the sets for reference? :confused:
Jesus Christ!!! What a mess again XD
See ya!!!! :D
dude, Jhonboy just have the CRCs, he doesnt know about the old V and M1 roms were bad, why i know they're bad? easy, 'cause The_Dumper bougth the game, dumped it and check the CRCs and compare them, so the old set is an incomplete dump.
-
So set 2 doesn't exist at all... thanks a lot man!!! :p
See ya!!!!!! :D
P.D. if this m1 is 512 KB, isn't supposed that the m1d is of the same size? it's weird isnt? :confused:
-
Are the new M and V roms public ?
-
dude, Jhonboy just have the CRCs, he doesnt know about the old V and M1 roms were bad, why i know they're bad? easy, 'cause The_Dumper bougth the game, dumped it and check the CRCs and compare them, so the old set is an incomplete dump.
EDIT: i did a compare now, too
i guess you´re right :p
the v´s from original release seem to be watermarked, see pic below.
the m1 is just a simple split of 256k parts <- this was known before.
will fix that.
EDIT2: removed lame pic
diff of v1-v1a: 6 bytes diff v2-v2a: 2 bytes
fataku´s dumper should be able to confirm this
jb
-
Are the new M and V roms public ?
it depends on what you mean with "public" :rolleyes:
-
When I say public I mean can it be found anywhere ?.
Any hints to where they might be Johnboy ?
And Welcome to the forum :D
-
Welcome to my forum Johnboy :) Nice to have someone with your particular area of expertise hanging around. :)
-
For ssvbl's C roms
neo_run.cpp
Find this:
NeoLoadSprites(pInfo->nSpriteOffset, pInfo->nSpriteNum, NeoSpriteROM, nSpriteSize);
Add this after:
// Descramble ssvbl's C roms (32 byte swap)
if (!strcmp(BurnDrvText(0), "ssvbl"))
{
int b=32,Size=nSpriteSize;
unsigned char* src = NeoSpriteROM;
unsigned char* cso = (unsigned char*)malloc(Size);
for (int i=0;i < Size;i+=b*4){
memcpy(cso+i, src+i+b*2, (b*2));
memcpy(cso+i+b*2, src+i, (b*2));
}
memcpy(NeoSpriteROM, cso, Size);
free(cso);
}
-
Just a sec......you got the CRC information, or driver for ssvbl......I think that might help some of us out.....thanks....
-
This was posted by Fataku in the Samsho5 thread at RS.
name ssvbl
cloneof samsho5
romof samsho5
description "Samurai Shodown V (Bootleg) [Bootleg, Dumped by EFMP]"
year 2003
manufacturer "SNK"
rom ( name 270-p1b.bin size 4194304 crc b6cbe386 )
rom ( name 270-p2b.bin size 4194304 crc 5023067f )
rom ( name 270-s1b.bin size 131072 crc 70f667d0 )
rom ( name 270-c1b.bin size 16777216 crc 9c564a01 )
rom ( name 270-c2b.bin size 16777216 crc 4b73b8da )
rom ( name 270-c3b.bin size 16777216 crc 029f9bb5 )
rom ( name 270-c4b.bin size 16777216 crc 75722430 )
rom ( name 270-m1d.bin merge 270-m1d.bin size 131072 crc 18114fb1 )
rom ( name 270-v1b.bin size 4194304 crc a3609761 )
rom ( name 270-v2b.bin size 4194304 crc cbd6ebd5 )
rom ( name 270-v3b.bin size 4194304 crc 6f1c2703 )
rom ( name 270-v4b.bin size 4194304 crc 5020c055 )
Btw, I know for a fact that all of these roms are public
-
Getting a Guru Meditation error when loading the C's......I added the C code in the neo run file, same thing, uploaded that file and the driver, can someone fix it please.... :confused:
-
I do not have the C roms sorry :( I think the rom load size is wrong though .
For ssvbl's C roms
neo_run.cpp
Find this:
NeoLoadSprites(pInfo->nSpriteOffset, pInfo->nSpriteNum, NeoSpriteROM, nSpriteSize);
Add this after:
// Descramble ssvbl's C roms (32 byte swap)
if (!strcmp(BurnDrvText(0), "ssvbl"))
{
int b=32,Size=nSpriteSize;
unsigned char* src = NeoSpriteROM;
unsigned char* cso = (unsigned char*)malloc(Size);
for (int i=0;i < Size;i+=b*4){
memcpy(cso+i, src+i+b*2, (b*2));
memcpy(cso+i+b*2, src+i, (b*2));
}
memcpy(NeoSpriteROM, cso, Size);
free(cso);
}
I am trying to convert this to Mame code not much luck so far .
-
Getting a Guru Meditation error when loading the C's......I added the C code in the neo run file, same thing, uploaded that file and the driver, can someone fix it please.... :confused:
Fixed
I've just removed the part with C' rom decryption (these c roms are not encrypted just byte swapped), and removed the init call back of samsho5, (these p roms dosent need to be reorded like samsho5 p roms, they need another descramble, maybe if we made a ram dump with fba sp we can get these p roms working :D )
But the game is stil not working :)
*thanks iq for this driver its will work very good when we get the code for p roms. Im i wrong, or its almost the same thing that lsvc.a ( that lib for svcboot), the only thing is different is that this C roms uses 32byte swap and svcboot uses 64, so we can covert this lib into a driver
Correct me if im wrong :D
Thanks again bro ur codes rocks :cool:
-
Fixed
I've just removed the part with C' rom decryption (these c roms are not encrypted just byte swapped), and removed the init call back of samsho5, (these p roms dosent need to be reorded like samsho5 p roms, they need another descramble, maybe if we made a ram dump with fba sp we can get these p roms working :D )
But the game is stil not working :)
*thanks iq for this driver its will work very good when we get the code for p roms. Im i wrong, or its almost the same thing that lsvc.a ( that lib for svcboot), the only thing is different is that this C roms uses 32byte swap and svcboot uses 64, so we can covert this lib into a driver
Correct me if im wrong :D
Thanks again bro ur codes rocks :cool:
Actually, the svcboot code uses a very very different code.
Also, you can do a 64 byte swap by simply changing int b=32 to int b=64
btw, I'm glad it works exactly as intended :) Though I do have some ideas on how to make it take less ram.
-
Here's a low-ram version. It should only use 128 bytes extra (the old one used 64mb extra!!!)
// Descramble samsho5b's C roms (32 byte swap)
if (!strcmp(BurnDrvText(0), "ssvbl"))
{
int b=32,Size=nSpriteSize;
unsigned char* src = NeoSpriteROM;
unsigned char* cso = (unsigned char*)malloc(b*4);
for (int i=0;i < Size;i+=b*4){
memcpy(cso, src+i+b*2, (b*2));
memcpy(cso+b*2, src+i, (b*2));
memcpy(NeoSpriteROM+i, cso, (b*4));
}
free(cso);
}
-
Here's a low-ram version. It should only use 128 bytes extra (the old one used 64mb extra!!!)
// Descramble samsho5b's C roms (32 byte swap)
if (!strcmp(BurnDrvText(0), "ssvbl"))
{
int b=32,Size=nSpriteSize;
unsigned char* src = NeoSpriteROM;
unsigned char* cso = (unsigned char*)malloc(b*4);
for (int i=0;i < Size;i+=b*4){
memcpy(cso, src+i+b*2, (b*2));
memcpy(cso+b*2, src+i, (b*2));
memcpy(NeoSpriteROM+i, cso, (b*4));
}
free(cso);
}
Thanks a lot iq ! :D
As I said before ur codes realy rocks :D
Do u think u can do a ram dump on that fba sp to get the reorded p rom for u o me make a driver for it? its because my winhex is not doing the ram dump, it always give me a error, maybe its because i use win xp sp2 :p
See ya bro :cool:
-
Ok, dumped the P rom ram of FBA Sp. It's the same as the original release.
Size: 8mb, CRC: 611a6687
btw, if you have the original bootleg (fixed) Cs, you can run them through the C decrypting code I posted above, merge the saved C1+C3, C2+C4, C5+C7,C6+C8 together and you'll get the bootleg Cs.
-
Thanks for this driver man, you're the best!! :D
See ya!!!!!! :D
-
For MAME:
src\machine\neogeo.c
Find this:
/* This function is only called once per game. */
DRIVER_INIT( neogeo )
{
Add this after:
if (!strcmp(Machine->gamedrv->name,"ssvbl"))
{
// By IQ_132 - http://neosource.1emu.net/
int b=32,Size=memory_region_length(REGION_GFX3);
unsigned char* src = memory_region(REGION_GFX3);
unsigned char* cso = (unsigned char*)malloc(b*4);
for (int i=0;i < Size;i+=b*4)
{
memcpy(cso, src+i+b*2, (b*2));
memcpy(cso+b*2, src+i, (b*2));
memcpy(memory_region(REGION_GFX3)+i, cso, (b*4));
}
free(cso);
}
-
Wow thanks IQ looks alot better then my attempts :)
-
No problem :) It's kind of nice to convert FBA code to MAME code (Much easier)
-
hi all
this is what i know
c roms : 32 bytes swap
S rom : use the same driver than kof2k3b (the kawaks dev version)
v roms : use the same driver than svcboot V roms
P roms : no idea what they use but you can compare them with the first ss5 release (in fact all those roms are just that release but with no modifications).
i hope this could help :D
enjoy
-
Yeah, I knew about the C, S, and (decrypted P).
The V roms don't seem to use the same driver as svcboot though. (I hope someone else can confirm this)
BTW, welcome to my forum Kanyero :)
-
Here is the descramble px code of samsh5bl made by Halrin for mame, i converted it to fba but the p roms stil need to be interleaved, and iq knows very much about it :D
//FBA Conversion by JiMMy_PaGe (www.neofighters.com.br) original code by Harin
static void samsh5bl_px_decrypt()
{
unsigned char *src = Neo68KROM01;
int i,ofst,rom_size = 0x800000;
unsigned char *dst = (unsigned char*)malloc(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, rom_size );
memcpy( &src[ 0x000000 ], &dst[ 0x700000 ], 0x100000 );
memcpy( &src[ 0x100000 ], &dst[ 0x000000 ], 0x700000 );
free(dst);
}
-
// FBA Conversion by JiMMy_PaGe (www.neofighters.com.br) original code by Harin
static void samsh5bl_px_decrypt( )
{
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 );
}
-
Well, here the conversion for HalRin´s ssvbl C-ROMs
//Original code by HalRin-http://www52.tok2.com/home/foge/
static void samsh5bl_cx_decrypt( void )
{
int cx_size =nSpriteSize;
unsigned char *rom = NeoSpriteROM;
unsigned char *buf = (unsigned char*)malloc( cx_size );
memcpy( buf, rom, cx_size );
for( int i = 0; i < cx_size / 0x40; i++ ){
memcpy( &rom[ i * 0x40 ], &buf[ (i ^ 1) * 0x40 ], 0x40 );
}
free( buf );
}
-
A little help to HalRIN:
src/burn/neogeo/neo_run.cpp
Find this:
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
// Descramble samsho5b's V roms (data lines are bitswaped)
if (!strcmp(BurnDrvText(0), "ssvbl"))
{
for(int i=0; i<0x1000000; i++)
YM2610ADPCMAROM[i] = BITSWAP08(YM2610ADPCMAROM[i],0,1,5,4,3,2,6,7);
}
and why not a mame code for this:
static void neogeo_V_fix(void)
{
UINT8 *rom = (memory_region(REGION_SOUND1));
int i;
if( rom != NULL )
{
/* bit swap data lines on the whole V ROMs, thanks to arnoldso */
for(i=0;i<0x1000000;i++)
rom[i] = BITSWAP8(rom[i],0,1,5,4,3,2,6,7);
}
}
-
Thanks fataku :)
-
Thanks a lot for this man!!!
See ya!!!! :D
-
Thanks fataku :) (It's always great when you share code with us :))