Author Topic: Samurai Shodown 5 driver  (Read 26561 times)

Online iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« on: November 08, 2004, 12:53:39 AM »
This is the driver I'm using. ;)

Code: [Select]
// 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
};


Offline fataku

  • Newbies
  • *
  • Posts: 22
  • Karma: +0/-0
  • Junior Member
Samurai Shodown 5 driver
« Reply #1 on: November 08, 2004, 01:23:03 AM »
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 )

Online iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #2 on: November 08, 2004, 01:59:13 AM »
Can you give any information on what the differences (like bytes and such) are between those and the ones that are available right now?


Offline Vorador

  • Newbies
  • *
  • Posts: 18
  • Karma: +0/-0
  • Junior Member
Samurai Shodown 5 driver
« Reply #3 on: November 08, 2004, 05:14:21 AM »
Also, your C´s are the watermarked ones,, these should be more accurrated:

Quote
{"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

Online iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #4 on: November 08, 2004, 05:17:08 AM »
Fixed ;)


Offline NJ7

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-6
  • Member
Samurai Shodown 5 driver
« Reply #5 on: November 08, 2004, 07:29:51 PM »
IQ.....your games pages need to be updated for samsho5 (c's) and samsh5sp (m and v's)......just to let you know..... :D

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Samurai Shodown 5 driver
« Reply #6 on: November 08, 2004, 09:49:23 PM »
Quote from: fataku
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

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
Samurai Shodown 5 driver
« Reply #7 on: November 08, 2004, 09:56:42 PM »
Quote from: FerchogtX
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.

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Samurai Shodown 5 driver
« Reply #8 on: November 08, 2004, 09:58:18 PM »
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:

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 James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Samurai Shodown 5 driver
« Reply #9 on: November 09, 2004, 12:44:44 AM »
Are the new M and V roms public ?
IQ Forum Member

Offline Johnboy

  • Expert
  • *****
  • Posts: 23
  • Karma: +2/-2
  • Junior Member
    • http://johnboy.cjb.net
Samurai Shodown 5 driver
« Reply #10 on: November 13, 2004, 04:44:37 AM »
Quote from: fataku
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

Offline Johnboy

  • Expert
  • *****
  • Posts: 23
  • Karma: +2/-2
  • Junior Member
    • http://johnboy.cjb.net
Samurai Shodown 5 driver
« Reply #11 on: November 13, 2004, 04:58:33 AM »
Quote from: James33
Are the new M and V roms public ?


it depends on what you mean with "public"  :rolleyes:

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Samurai Shodown 5 driver
« Reply #12 on: November 13, 2004, 07:24:55 AM »
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
IQ Forum Member

Online iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #13 on: November 13, 2004, 01:20:23 PM »
Welcome to my forum Johnboy :)  Nice to have someone with your particular area of expertise hanging around.  :)


Online iq_132

  • Administrator
  • *****
  • Posts: 3728
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #14 on: November 17, 2004, 12:34:22 AM »
For ssvbl's C roms

neo_run.cpp

Find this:

Code: [Select]
NeoLoadSprites(pInfo->nSpriteOffset, pInfo->nSpriteNum, NeoSpriteROM, nSpriteSize);

Add this after:

Code: [Select]
// 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);
}