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

Offline NJ7

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-6
  • Member
Samurai Shodown 5 driver
« Reply #15 on: November 17, 2004, 02:00:49 AM »
Just a sec......you got the CRC information, or driver for ssvbl......I think that might help some of us out.....thanks....

Offline iq_132

  • Administrator
  • *****
  • Posts: 3729
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #16 on: November 17, 2004, 02:04:50 AM »
This was posted by Fataku in the Samsho5 thread at RS.

Quote from: fataku
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


Offline NJ7

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-6
  • Member
Samurai Shodown 5 driver
« Reply #17 on: November 17, 2004, 05:08:35 AM »
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:

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Samurai Shodown 5 driver
« Reply #18 on: November 17, 2004, 06:54:49 AM »
I do not have the C roms sorry :(  I think the rom load size is wrong though .



Quote from: iq_132
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);
}


I am trying to convert this to Mame code not much luck so far .
IQ Forum Member

Offline JiMMy_PaGe

  • Expert
  • *****
  • Posts: 60
  • Karma: +2/-0
    • SNK-NeoFighters
Samurai Shodown 5 driver
« Reply #19 on: November 17, 2004, 09:35:28 AM »
Quote from: NJ7
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:

Offline iq_132

  • Administrator
  • *****
  • Posts: 3729
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #20 on: November 17, 2004, 11:55:02 AM »
Quote from: santahempa
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.


Offline iq_132

  • Administrator
  • *****
  • Posts: 3729
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #21 on: November 17, 2004, 01:32:51 PM »
Here's a low-ram version. It should only use 128 bytes extra (the old one used 64mb extra!!!)

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


Offline JiMMy_PaGe

  • Expert
  • *****
  • Posts: 60
  • Karma: +2/-0
    • SNK-NeoFighters
Samurai Shodown 5 driver
« Reply #22 on: November 17, 2004, 02:26:39 PM »
Quote from: iq_132
Here's a low-ram version. It should only use 128 bytes extra (the old one used 64mb extra!!!)

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

Offline iq_132

  • Administrator
  • *****
  • Posts: 3729
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #23 on: November 17, 2004, 02:34:56 PM »
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.


Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Samurai Shodown 5 driver
« Reply #24 on: November 17, 2004, 05:10:29 PM »
Thanks for this driver man, you're the best!!  :D
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 iq_132

  • Administrator
  • *****
  • Posts: 3729
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #25 on: November 17, 2004, 07:57:34 PM »
For MAME:

src\machine\neogeo.c

Find this:

Code: [Select]
/* This function is only called once per game. */
DRIVER_INIT( neogeo )
{


Add this after:

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


Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Samurai Shodown 5 driver
« Reply #26 on: November 17, 2004, 08:12:49 PM »
Wow thanks IQ looks alot better then my attempts :)
IQ Forum Member

Offline iq_132

  • Administrator
  • *****
  • Posts: 3729
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #27 on: November 17, 2004, 11:10:33 PM »
No problem :) It's kind of nice to convert FBA code to MAME code (Much easier)


Offline KaNyErO

  • Member
  • ***
  • Posts: 142
  • Karma: +4/-0
Samurai Shodown 5 driver
« Reply #28 on: November 18, 2004, 08:07:58 AM »
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

Offline iq_132

  • Administrator
  • *****
  • Posts: 3729
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Samurai Shodown 5 driver
« Reply #29 on: November 18, 2004, 09:32:40 AM »
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 :)