EverDrive Forum

General => EverDrive 64 => Topic started by: ozidual on October 19, 2017, 01:57 AM

Title: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 19, 2017, 01:57 AM
This thread started in the "Top 10 Japan N64 Titles requesting to be translated" thread (replies 160 - 188).  To make this patch easier to find and to keep the translation thread from filling up with discussing one game, I'm moving the discussion over to this thread.

Skip to the bottom of this message for the patches/GameShark codes
I tend to write a lot.  So if you want a lot of details, they're just below this.  If you just want the patches or Gameshark codes, skip down until you see blue links.

Fat Bear Mountain Trophy Fix (FBM Fix): 100%

Fat Bear Mountain, level 1-6, has a trophy that cannot be picked up.  The hit box is set to 0.  Setting the hit box size to 15 (matching the baubles in game) allows the trophy to be collected.  All of the rest of the programming is correct.

The Expansion Pak Fix (Exp Fix) (NTSC 1.0 Only)

The PAL version does not have this problem because it has a check to avoid it.  Playing the official NTSC cart on an N64 with the Expansion Pak sometimes causes crashes during videos.  In PJ64, it is the opposite.  Playing the NTSC version set to 4MB RAM (no expansion pak) causes the game to freeze every time it plays the DMA logo video in the beginning.  The problem is a variable check that was removed for the NTSC version.  The variable is pulled from a table where it is usually 0x00?? (where ?? is the value expected).  Sometimes this value is 0X7FFF though.  This causes a problem because that variable is multiplied and added to a variable that is 0x803E0000.  This variable in turn is used to load a value, so it was attempting to load a value above 0x80400000.  Without an Expansion Pak, the N64 returns 00000000 which is actually the correct response.  With the Expansion Pak, the N64 returns the value at that location.  Now SSSV does not check for an Expansion Pak and so never clears the old data on the Expansion Pak.  The value returned is usually left over from previous games and most of the time is not an acceptable value.  This causes crashes until either the user finds a way around that video, lucks out in clearing that spot some other way, or removes the Expansion Pak.  My patch checks for the Expansion Pak, makes sure to clear the extra RAM, AND adds back the original check from the PAL version that looks specifically for the 0x7FFF to avoid the issue altogether.

Language Select Patch (patched NTSC-U 1.0/1.1 only)

Let me start off by saying that this patch must be applied to a ROM already patched with my NTSC-U FBM/Expansion Pak patch.  By default, NTSC-U will only allow you to play in English.  This patch ports the language select screen over from the PAL version.  If you start a game with no save file, it will boot to a language select screen which will allow you to choose from Dutch, English, French, German, Italian, Portuguese, or Spanish.  Once you choose the language and start the game, that language will be set in the save file and will properly load every time you play the game.  The language select screen will only appear the one time, so if you need to change the language afterwards, you must use the gameshark codes listed below.


Final patches:
PAL (http://www.mediafire.com/file/fzfvabbv0u67928/SpaceStation_Silicon_Valley_%28Europe%29_%28En%2CFr%2CDe%2CEs%2CIt%2CNl%2CPt%29_%5BFBM_Fix_v1.2%5D%5Boz%5D.bps.zip)
NTSC-U 1.0 (http://www.mediafire.com/file/1311u7x5a5kk7td/SpaceStation_Silicon_Valley_%28USA%29_%5BExpFBMLSelect_Fix_v1.2%5D%5Boz%5D.bps.zip) (Includes Language Select)
NTSC-U 1.1 (http://www.mediafire.com/file/jhsk1bgpzx96a9f/SpaceStation_Silicon_Valley_%2528USA%2529_%2528Rev_A%2529_%255BFBMLSelect_Fix_v1.2%255D%255Boz%255D.bps.zip) (Includes Language Select)
NTSC-J (http://www.mediafire.com/file/k3oa47ij155p3kq/SpaceStation_Silicon_Valley_%28Japan%29_%28Proto%29_%5BExpFBM_Fix_v1.2%5D%5Boz%5D.bps.zip)
All 4 (http://www.mediafire.com/file/5zsa32qih6q0opt/SpaceStation_Silicon_Valley_%28USA%2C_Europe%2C_Japan%29_%5Boz%5D.zip)

PAL to NTSC v1.1 patch (converts PAL ROM to create an NTSC v1.1 ROM)
PALtoNTSCv1.1 (http://www.mediafire.com/file/a34cbde4e6fe648/SpaceStation_Silicon_Valley_%255BPAL_to_USA_Rev_A%255D.zip/file)

Language Select Patch (Merged with NTSC-U patch)

Gameshark Bug Fix codes (Note - NEVER plug an ED64 into a Gameshark, it will destroy the Gameshark):
PAL/NTSC-U 1.1:
  803AD423 0015 (FBM Fix)

NTSC-U 1.0/NTSC-J:
  803AD3F3 0015 (FBM Fix)
  80125907 006A (Expansion Pak Fix - ONLY use with the Expansion Pak, NOT the Jumper Pak)
  8112590E 1E30 (Expansion Pak Fix - ONLY use with the Expansion Pak, NOT the Jumper Pak)

Gameshark Language Select codes (Note - NEVER plug an ED64 into a Gameshark, it will destroy the Gameshark):
  (PAL) - Language Change
    8023F2CE 00xx*

  (NTSC-U 1.0) - Language Change (tested as safe for save games)**
    80130917 0002
    8013096B 0001
    80130973 0001
    8023F2AE 00xx*

  (NTSC-U 1.1) - Language Change **
    80130937 0002
    8013098B 0001
    80130993 0001
    8023F2CE 00xx*

      *01 - Dutch, 02 - English, 03 - French, 04 - German,
        05 - Italian, 06 - Japanese***, 07 - Portuguese, 08 - Spanish

      ** Note: NTSC-U only - you will need to keep these codes active or the game will revert to English.  Your save game should be safe either way.  You can always play in English for a time and then re-activate the gameshark codes above to switch back to another language.

     *** Japanese is not an option in the Language Select Menu, so this is the only way to enable it (except for the NTSC-J ROM).  If for some reason you want to play the PAL version in Japanese, this GameShark code is your only option.
     
 
Special Thanks to:
skaman
ppltoast
fabio_rosendo
Kerr Avon
nuu
butfluffy
oji
johnson
Shellshocker18
Aroenai


Versions:
v1.0 - Fat Bear Mountain fix for PAL, NTSC-J, and NTSC-U
v1.1 - Added Expansion Pak fix to NTSC-J and NTSC-U
v1.2 - Merged the Language Select patch into NTSC-U
        - Added NTSC-U 1.1 (aka rev A) [10/16/2018]


Previous Hacks (not mine):

N64 Space Station Silicon Valley (U) [f2] (PAL)
   NTSC-U version converted to PAL version with a 1-byte change.  Not particularly useful since there are no fixes.

N64 Space Station Silicon Valley (U) [f1] (PAL)
   NTSC-U version - I'm not completely sure what it does.  It sets 0xA0000300 to 0x00000001 and that's it.  No fixes at all really.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 19, 2017, 01:57 AM
@Shellshocker18: That's really helpful - thanks!  I'll use the unicycle bear as another testing point.  The Fat Bear Mountain Trophy's hit box was just set to 0.  Looking at the code, I don't think it allows hit boxes to originate anywhere else.  The game has two tables devoted to displaying objects and creatures along with all of their attributes.  That part of the game at least is pretty neat. 

I'm hoping the Expansion Pak issue can be sorted out by clearing the RAM properly.  Unlike the neatness of the objects, the RAM clearing seems to happen sporadically and not always in the correct places.  The NTSC roms seem to run past 0x80400000 (RAM without an Expansion Pak), though I can't pinpoint where yet.  I'm guessing expanding from PAL timing to NTSC timing increased the RAM usage.

@johnson: Thanks for testing it!
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 20, 2017, 06:58 AM
Part 1: I finally got my system hooked up again and played some SSSV with the original cart and an Expansion Pak.  When I first booted it without the Gameshark, the game got stuck at the DMA logo.  I added in the Gameshark with the codes mentioned above, and it no longer stopped at the DMA logo screen.  I then removed the Gameshark and I could no longer get the game to freeze.  I started to play through SSSV without the Gameshark, and finished 1-1 and 1-2 completely (teleporter + trophy + all baubles).

Part 2: Then I decided to track down the error down, and I lucked out.  The problem is an LW that tries to load from 0x8043FFF4.  If it pulls a 0x00000000, then all is good.  If it pulls the wrong thing, it gets stuck in a permanent loop.  The PAL version has completely different code here that doesn't allow an LW to look beyond 0x803FFFFF, but it would not work based on the values loaded to the variables at the time of freezing.

My NTSC patch should fix the problem since it zeros out 0x80400000 - 0x807FFFFF.  I'm still going to do some research to see where the original NTSC code went wrong, but not tonight.

EDIT: The PAL version includes a check for this very issue which they removed from the NTSC version for some reason.  Now I need to make room for 4 extra commands.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: butfluffy on October 20, 2017, 07:59 PM
so the ntsc patch is almost final?
 i was hoping someone who has played the game and knows where the freezes occur when expansion pak is inserted would playtest it. unfortunately i just have not had the time this week to play any games at all :(
 i'm excited to be able to finally play this game through properly when i get the time though. i can't thank you enough for your efforts so far :)
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 21, 2017, 02:53 AM
Nope.  I believe it is final now :)

OK, this should be the final patch of Space Station Silicon Valley.  It would be good to have someone play through the NTSC-U or NTSC-J patch to verify that the Expansion Pak fix is perfect.  I've tested as much as I can.  Unfortunately, the camera zooming around in most N64 games makes me motion sick.

I tracked down the bug, compared the broken function to PAL, and imported the PAL fix to both NTSC versions.  I then tested on PJ64 with the games set to no Expansion Pak.  Previously, the NTSC version would freeze in PJ64 after the DMA logo was knocked down and before the chip could appear to bring it back to life.  I tracked this down to a variable that should have been double digit (hexit? :) ), but was occasionally 0x7FFF.  When this variable is multiplied and added to 0x803E0000, it tried to load a non-existant value stored above 0x803FFFFF.  I ported the check from the PAL version to the NTSC versions, and now the video plays 100% of the time in PJ64.

EDIT: I'll throw this up on Romhacking in a week if we can't find any obvious issues with it.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: butfluffy on October 21, 2017, 05:19 AM
great stuff. i just downloaded the final patch and i'm looking forward to trying it.
 throwing the fix up on romhacking is a good idea, i know in the past there were a number of people wanting a fix for this. maybe because it's an old game there will not be as much interest as in the past but that being said the retro gaming scene is big and the n64 is much loved. i'm sure others like myself will be very happy with your work.
 thanks again :)
Title: Re: Space Station Silicon Valley Fix Patch
Post by: fabio_rosendo on October 21, 2017, 06:28 AM
Oh Gosh........... this is EPIC.  :o
.
Thanks isn't enough to say.
Kudos for you Ozidual  ;)
Title: Re: Space Station Silicon Valley Fix Patch
Post by: Kerr Avon on October 21, 2017, 08:03 PM
This is really great! Thanks for the hard work, mate.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 23, 2017, 07:46 PM
These patches are now released on romhacking (http://www.romhacking.net/hacks/3719/).  The 19 year anniversary for the Space Station Silicon Valley's release was Saturday (21 October 1998), so I decided to release the patch early.  If anyone finds any issues with the patches I'll update both places.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 25, 2017, 05:07 AM
And it just got more interesting, check out the Gameshark codes above: 

The PAL version of Space Station Silicon Valley can also be played in Japanese.

The NTSC version of SSSV can be played in Dutch, French, German, Italian, Japanese, Portuguese, and Spanish.

Basically any version of the game can natively be played in any of these 8 languages:

Dutch
English
French
German
Italian
Japanese
Portuguese
Spanish

WARNING: May erase existing save games

Note: I haven't played through the whole game with any of these extra languages, but they have been tested on the Start screen and the level select screen.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: johnson on October 25, 2017, 05:33 AM
that's amazing ! finally I will play the game in spanish  thanks again Ozidual
Title: Re: Space Station Silicon Valley Fix Patch
Post by: butfluffy on October 27, 2017, 03:55 PM
i just read the info on the romhacking site and i got a little confused and i'm worried that maybe i have not patched the rom properly.
 the issue is that the info states the target rom needs to be byteswapped but the rom iso information states that the target rom should be z64 format.
 according to tool64 byteswapped is v64 format and big endian is z64 format.
 i'm not sure which format the rom should be to be properly patched, is it  big endian z64 or byteswapped v64? the info seems to suggest both.
 without playing the game through i wont know if the patching went well.
 any help would be great :)
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 27, 2017, 04:57 PM
i'm not sure which format the rom should be to be properly patched, is it  big endian z64 or byteswapped v64? the info seems to suggest both.
 without playing the game through i wont know if the patching went well.
 any help would be great :)

That is confusing.  I didn't realize that v64 was also called byteswapped.  Byteswapping in most instances just means changing between n64, v64, and z64.  For SSSV, you want to have it in Big Endian (z64) format before you apply the patch.  I think it is listed as Byteswapped on the RomHacking site because most rom packages out there use the Little Endian (n64) format, and hackers all use Big Endian (z64) format.  Big Endian is a lot easier to read.

By the way,  last night I was testing the language Gameshark codes on my n64, and it erased my save games.  I updated my notes above and would recommend not using the language Gameshark Codes for the time being until I find a more stable set of codes.  The other Gameshark codes for FBM and Expansion Pak are completely safe still.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: Kerr Avon on October 27, 2017, 05:08 PM
i just read the info on the romhacking site and i got a little confused and i'm worried that maybe i have not patched the rom properly.
 the issue is that the info states the target rom needs to be byteswapped but the rom iso information states that the target rom should be z64 format.
 according to tool64 byteswapped is v64 format and big endian is z64 format.
 i'm not sure which format the rom should be to be properly patched, is it  big endian z64 or byteswapped v64? the info seems to suggest both.
 without playing the game through i wont know if the patching went well.
 any help would be great :)

I would have thought that if you'd tried to patch the wrong rom (byteswapped instead of not-byteswapped, or vice versa) then the patcher program would have given you an error message, surely?
Title: Re: Space Station Silicon Valley Fix Patch
Post by: butfluffy on October 27, 2017, 06:15 PM
thnaks ozidual for clearing that up :)

yes Kerr Avon your right. i forgot that beat bps reports an error if the rom is not right. it just so happens that i patched the z64 rom and got the patched successful message.
 i was worried because if you patch the wrong rom with lunar ips it just patches it regardless and you find out the hard way when the game wont function properly at some point.
 i wonder if beat would give an error when trying to patch SSSV in v64 format, i guess it probably would.

 as for the formats i remember back in the old copier days that v64 was for bung doctor v64 copier which used byteswapped format and z64 was used for the mr backup z64 copier which used big endian format.
 in the old days when games were released to the scene they were either in v64 or z64 format, i owned and still own a doctor v64 and had to use rtool64 to convert roms released in the z64 format from z64 to v64  in order for them to work.
 i seem to remember that games which needed patching would need to be in z64 format in order to apply the patch and then after patching be converted to v64 for doctor v64 use.
 the more complex patches like cracks for big release titles were aps patch format and i gather the roms needed to be in z64 format because as ozidual states, big endian is a lot easier to read.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: johnson on October 27, 2017, 11:10 PM
i'm not sure which format the rom should be to be properly patched, is it  big endian z64 or byteswapped v64? the info seems to suggest both.
 without playing the game through i wont know if the patching went well.
 any help would be great :)

That is confusing.  I didn't realize that v64 was also called byteswapped.  Byteswapping in most instances just means changing between n64, v64, and z64.  For SSSV, you want to have it in Big Endian (z64) format before you apply the patch.  I think it is listed as Byteswapped on the RomHacking site because most rom packages out there use the Little Endian (n64) format, and hackers all use Big Endian (z64) format.  Big Endian is a lot easier to read.

By the way,  last night I was testing the language Gameshark codes on my n64, and it erased my save games.  I updated my notes above and would recommend not using the language Gameshark Codes for the time being until I find a more stable set of codes.  The other Gameshark codes for FBM and Expansion Pak are completely safe still.

in fact I could not play it in Spanish because always  get a black screen and tray several ways ): but now that I know this I will not try
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 27, 2017, 11:19 PM
I've made it my top priority to get the languages going.  There's no reason that they shouldn't work.

You get the black screen because it thinks you are trying to run a PAL game on an NTSC TV.  I guess part of the code switches it back to PAL.  They put a block in place so the extra language can only be accessed if you're running the PAL version (both versions are technically on all carts).  I'm going to dig deeper on ways to get around that.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: Freezypops on October 28, 2017, 02:55 AM
I don't have the means to patch. Would anyone be willing to send me a pre-patched ntsc rom?
Title: Re: Space Station Silicon Valley Fix Patch
Post by: Kerr Avon on October 28, 2017, 03:13 PM
I don't have the means to patch. Would anyone be willing to send me a pre-patched ntsc rom?

PM sent.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: mistamontiel on October 28, 2017, 04:31 PM
I was not even aware of xpack check bug ? And now Silicon Valley is finally 100%able !?

Thanx VERY much ozi !!!
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 29, 2017, 05:37 AM
OK, I'm about 99% sure that I've figured out the whole language thing for NTSC-U. 

There are now gameshark codes which will allow you to change the language on your original NTSC-U cart.  These will not work for the one person out there who owns the NTSC-J prototype - sorry :)  You will need to play with your gameshark attached because as soon as you play with just the cart, the language will revert to English.  You can just reattach the gameshark and re-enable the codes if you want to go back to your language of choice.  I have tested this with my own personal NTSC-U cart, and I was able to go back and forth without the loss of my save data - yay! *

I have also created a patch for NTSC-U which re-enables the language select screen.  This patch must be applied to a NTSC-U ROM that is already patched with my FBM/Expansion Pak fix.  The patch is only for NTSC-U since PAL already has this screen.  The language select screen appears if you start the game without a save game file.  Once you choose your language, a new save file is created with that language.  Afterwards, the language select screen will not appear again, and you will play through the game with that language.  If you need to change the language again, use the gameshark codes for language change, and that will permanently change the language. *

If anyone else can test it, that would be great.

* The problem with the previous language select gameshark codes is that they were changing the flag for NTSC-U/J/PAL from NTSC-U to PAL.  This means the game started as NTSC-U, but switched itself over to PAL when the save data was loaded.  Since the save data is offset by 2 lines between the two versions, it believed the save data to be corrupted, so erased it and rewrote it as a new save game.  The new codes ONLY affect the checks for this flag as they pertain to text, and leave the rest of the flags alone so the game does not attempt to become PAL.  Note: I have not played the whole game through this way, so there is the potential for save game loss.  Backup your save games just to be safe

Note: If I don't hear of any problems for a time, I'll post the Language Select Screen patch to Romhacking as well.  Unless I hear of other issues or requests for Space Station Silicon Valley, this will be my final patch for it.

I was not even aware of xpack check bug ? And now Silicon Valley is finally 100%able !?

Thanx VERY much ozi !!!

Yep - 100%able :)  You're welcome!
Title: Re: Space Station Silicon Valley Fix Patch
Post by: johnson on October 29, 2017, 06:23 PM
I test the game patched with the re- enables language select screen and works perfectly :)

The game now it's correct after 19 years with aditional features (lenguages)   and you fixed it VERY fast, thank you ozidual !
Title: Re: Space Station Silicon Valley Fix Patch
Post by: lee4 on November 05, 2017, 06:27 AM
has anyone try this?

official GameShark64 code

Disable Expansion Pack
EE000000 0000
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on November 06, 2017, 04:03 AM
has anyone try this?

official GameShark64 code

Disable Expansion Pack
EE000000 0000


I just tried that on my ED64 v2.5 with the Language Select codes and the Expansion Pak codes at the same time on the NTSC-U ROM.  No luck.  I know they work together with an official Gameshark and the official NTSC-U cart.  Thank you for the attempt - I appreciate any help!
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on November 10, 2017, 02:55 AM
It's almost 2 weeks since I posted the language select patch.  Has anyone found any bugs or issues with it?  I was planning on adding it to Romhacking this weekend if it's still a solid patch.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on November 18, 2017, 06:13 AM
I combined the two NTSC-U patches into one.  No need to muck around with double patching anymore.  It seems solid enough.  I also updated Romhacking: https://www.romhacking.net/hacks/3719/ which just went through.

No need to re-download the PAL or NTSC-J patch if you already had them.  I changed the version number in the name, but it's still the same patch as before.  PAL hasn't changed since v1.0 since it's just the FBM fix.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: johnson on December 24, 2017, 06:40 AM
 I finished the game, all levels , without some trophies and with this great lenguage select patch (in spanish :D )  that is full playable , however  I had  a little issue in two levels that are: "borassic park" and  "sting in the tail" here I made all  objetives and the teleporter never be active I had to restar this levels and everything was fine.

About the game it's unique  for me was challenging hard in some areas but fun,  I love 80% of the levels and hate the other 20% it's still a great game :)
sorry for my english
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on December 24, 2017, 06:24 PM
I finished the game, all levels , without some trophies and with this great lenguage select patch (in spanish :D )  that is full playable , however  I had  a little issue in two levels that are: "borassic park" and  "sting in the tail" here I made all  objetives and the teleporter never be active I had to restar this levels and everything was fine.

About the game it's unique  for me was challenging hard in some areas but fun,  I love 80% of the levels and hate the other 20% it's still a great game :)
sorry for my english

Awesome!  Thank you johnson!  It's good to know the patch is working all the way through.  If I get a chance, I'll take a look at Borassic Park and Sting in the Tail to see if I notice anything.  Oh, and your English is great - much better than my Spanish :)
Title: Re: Space Station Silicon Valley Fix Patch
Post by: estejor on February 05, 2018, 08:19 PM
Hi, sorry if this sounds kind of rude, I found this forum by mere chance and saw that someone managed to fix the souvenir glitch, so I downloaded the patch, but.. no matter which version of the patch, rom and patcher I use it never works, the patcher always says error, sometimes saying that it's for a different game, can I possbly get a prepatched rom? if this can't be done it's ok
Title: Re: Space Station Silicon Valley Fix Patch
Post by: Aroenai on February 06, 2018, 12:31 AM
You're a victim of No-Intro deciding that Byteswapped .V64 renamed .N64 (traditionally "Little Endian" format) is the "proper" format for roms despite Nintendo's official emulators and every cartridge dump tool using Big Endian (.Z64).

Byteswap your rom to Big Endian .Z64 and apply the patch to that.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: Kerr Avon on February 06, 2018, 05:00 PM
Hi, sorry if this sounds kind of rude, I found this forum by mere chance and saw that someone managed to fix the souvenir glitch, so I downloaded the patch, but.. no matter which version of the patch, rom and patcher I use it never works, the patcher always says error, sometimes saying that it's for a different game, can I possbly get a prepatched rom? if this can't be done it's ok

As Aroenai says, your rom is probably in the wrong Endian format. I've uploaded my folder of N64 patching tools. Download it from https://mega.nz/#!PFklgLxC!dnrfo3Y-jGq9f-OyqtAbsUqsIKbViN61_NFSWiv2jGU (https://mega.nz/#!PFklgLxC!dnrfo3Y-jGq9f-OyqtAbsUqsIKbViN61_NFSWiv2jGU) , unzip it, and run the program:


tool64.exe

which is in the folder

Tool64_v1.11 - Big and Small Endian Switcher

and open the game rom, then highlight the rom in the program window, and click the left to right arrow, which will make the rom 'Big endian', or the right to left arrow to make it 'Little Endian', whichever you need.

I've also sent you a pm with more information.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 16, 2018, 09:24 PM
I learned a week ago that there were two versions of Space Station: Silicon Valley released in the US.  One or two of you may have noticed I updated the main post then to avoid confusion.  Today I finally got ahold of that 2nd version.  It's still very hard to find online (don't worry about that, read further to find out why), but now I have some patches/gameshark codes for when it does.

The patch to add Language Select and the Fat Bear Mountain Fix for NTSC 1.1 is: Here (http://www.mediafire.com/file/jhsk1bgpzx96a9f/SpaceStation_Silicon_Valley_%2528USA%2529_%2528Rev_A%2529_%255BFBMLSelect_Fix_v1.2%255D%255Boz%255D.bps.zip/file)

Gameshark codes (NTSC-U 1.1):
803AD423 0015 (FBM Fix)
80130937 0002 (Language Select)
8013098B 0001 (Language Select)
80130993 0001 (Language Select)
8023F2CE 00xx* (Language Select)

      *01 - Dutch, 02 - English, 03 - French, 04 - German,
        05 - Italian, 06 - Japanese***, 07 - Portuguese, 08 - Spanish

I can confirm that the Expansion Pak fix is on this cart because this NTSC-U 1.1 cart is only 2-bytes different from the PAL cart.  I'd worry that this was a fake, but there's a picture of the cart and board in the zip file with the rom that shows the original cart and the stamp on the back showing it is revision A.  So it makes me think it's legit, but better safe than sorry.

Now's where I need your help.  If you have the ability to dump an N64 cart and you own a copy of Space Station: Silicon Valley, please check the back of that cart.  There should be a stamp that will either be two numbers or two numbers followed by the letter A.  If you have the letter A on there, could you please dump your cart?  Load that rom dump into a hex viewer like HxD (you can google that to find it).  Then compare the first 4 lines to what's below.  The bytes in blue are the checksum.  That will tell you that most of the cart is the same.  The bytes in red will confirm that you definitely have an NTSC-U 1.1 cart.  They're also the only 2 bytes that are different from the PAL cart.  So, if you can't find the 1.1 cart online, you can create one by slightly editing the PAL cart.

80371240 0000000F 80125900 00001449
FC70E272 08FFE7AA 00000000 00000000
53696C69 636F6E20 56616C6C 65792020
20202020 00000000 0000004E 53564501

If you really want to get fancy, check one of the following against your rom:

CRC32:  E32D9E7B
MD5:      F1F1C5E2B895DB63348BC738C0CDC645
SHA1:    C968BBA6A90DB9ECBD957E910684A80726B0497D

You can always PM me if you need help verifying.

EDIT: Fixed the checksum in the bytes above - I used the wrong one (had too many games open at once).
Title: Re: Space Station Silicon Valley Fix Patch
Post by: skaman on October 23, 2018, 08:52 AM
SSSV (U) (Rev A) confirmed. ;)
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on October 23, 2018, 06:57 PM
Thanks for checking that skaman!

Since the NTSC v1.1 is rare right now and it's basically the PAL rom, here's a patch that converts the PAL rom to the NTSC v1.1 rom.  It does not include any of my changes, it just creates a vanilla NTSC v1.1 rom.  Here's the patch (http://www.mediafire.com/file/a34cbde4e6fe648/SpaceStation_Silicon_Valley_%255BPAL_to_USA_Rev_A%255D.zip/file)

I'll update romhacking later today too.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: skaman on October 24, 2018, 09:03 AM
These patches are now released on romhacking (http://www.romhacking.net/hacks/3719/).  The 19 year anniversary for the Space Station Silicon Valley's release was Saturday (21 October 1998), so I decided to release the patch early.  If anyone finds any issues with the patches I'll update both places.

Almost exactly 20 years after the original release we find and dump the Rev A.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: JCreazy on June 10, 2019, 07:32 AM
Sorry to bring this post back up but I just found out about this patch and am getting an odd result and wondered if it were normal.

After I apply the patch (which says it was successful) I get the language select screen in the game in Project 64. When the actual game starts, there are graphics missing.  For example the ship during the cut scene is gone, and so is the earth.  The original ROM doesn't have this problem.  Was there an error when patching the ROM? Does this only happen on Project 64?  Thank you for any insight you may have.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on June 12, 2019, 07:07 AM
First off, thank you for testing it out and digging into it.  I cannot tell you how much I appreciate each and every person who tests out my patches and tells me about bugs they find.  Those are two separate things that I both really do appreciate.

That said, try it on hardware and see what happens.  I'd offer to do it, but I'm negative sleep tonight to make progress on something finally :)

Here's the deal with PJ64 - it has built-in settings for games to make sure they look good/work properly.  Those settings are tied to the checksum.  Unfortunately, the checksum changes as soon as you hack the game.  There are ways to copy those settings over to the hack and I'll try to post those sometime when I get a chance.  I'll try to test it out too, but I wouldn't hold my breath on that happening soon.

Still - thank you for looking into it, and I will add this to my list of things to check into.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: JCreazy on June 12, 2019, 07:18 AM
Thank you for the quick response.  I'm unable to test it on hardware because I have yet to buy an Everdrive.  I was just in the process of getting my files ready and wanted to patch SSSV so I can 100% it. I'm patching the dump that I created from the cartridge in my collection but it shouldn't make a difference because the CRC matched a verified rip from no-intro.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: JCreazy on June 19, 2019, 04:49 AM
Just wanted to follow up. I got my Everdrive in today and the patched ROM looks just fine. Thanks for the patch, now I'll be able to 100% it.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on June 20, 2019, 02:54 AM
Just wanted to follow up. I got my Everdrive in today and the patched ROM looks just fine. Thanks for the patch, now I'll be able to 100% it.

Awesome!  Thank you for confirming that!  Enjoy the ED64!
Title: Re: Space Station Silicon Valley Fix Patch
Post by: JCreazy on July 04, 2019, 09:59 PM
I have a kind of off topic but you seem to know how patching N64 games works. Do you know how someone could patch the black cartridge variant of Turok Rage wars to match the fixed gray variant? I looked to see but it doesn't look like anyone has ever made one.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: nuu on July 04, 2019, 11:53 PM
I'm not sure what you mean.

You can make an IPS patch with the differences of the two roms (google for an IPS patch maker) if you really need the differences to be in a patch. You of course needs both roms to make it. This has nothing to do with N64 games. You can make an IPS patch with any file.

You can't patch the rom in the cartridge and write back to the cartridge, it's read-only.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: JCreazy on July 05, 2019, 03:00 AM
I dump all my N64 cartridges and play them on my Everdrive.  Sure, I can download the fixed ROM off the internet but I like the idea of playing my exact dumps.  What I was wondering if I can dump a cart of Rage Wars and just patch it so it is still my dump if that makes sense.  Sounds like it is possible to create a patch using the fixed ROM.  I will look into it.  Thank you for the information.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on September 27, 2019, 09:20 PM
For my 500th post, I thought I'd do something different.  Here are some of my notes from working on Space Station Silicon Valley.  These notes are mostly for the NTSC 1.0 ROM since that's what I did a lot of work on.  Since the data is pretty much the same between all the ROMs, a quick search will find the same locations in the other ROMs.  As for RAM, the difference between PAL and NTSC is 0x30 bytes, so you can find these RAM addresses in the PAL ROM just by adding 0x20 - 0x30 to the number.

First up, the in-game Cheat Codes (https://www.gamespot.com/space-station-silicon-valley/cheats/) are stored here:

ROM: 0x7D1170
RAM: 0x803BFAC0

57495A44   495A5745   00000000   5544495A
44555A44   00000000   55445A49   44455A44
00000000   5544495A   44575A44   00000000
5544495A   444C5A44   00000000   5544495A
44525A44   00000000   44555A49   444C5A44
00000000   55495A44   4C5A4455   00000000
49445A49   4455494C   00000000   5A445549
52494C52   00000000   4C525A49   4C5A524C
00000000   44414E49   53494C00   00000000

a new cheat code starts every 0xC bytes.  Here's the key to what each byte means:

DPad   
Down 44
Left     4C
Right  52
Up      55
   
C-Button
Down  53
Left     57
Right   45
Up      4E
   
L   49
R   54
A   41
B   42
Z   5A

I found all of this by watching 0x803F6410, where it keeps track of the last 20 button presses.


Next up, the EEPROM data:

ROM (*.eep save file)
RAM: stored oddly, but the line below is at 0x8023F2A0

The part I worked on is located at 0x100 in the EEPROM file.  Here's an example of what it looks like

00000219 0CF76F7E 00000000 10100300

Right now I can tell you that it is set for French.  The 0x03 located at 0xE (aka 0x10E) tells you that. 

00   gibberish/spanish
01   Dutch
02   English
03   French
04   German
05   Italian
06   Japanese
07   Portuguese
08   Spanish

If a PAL ROM loads up (or one of my patched NTSC ROMs) and 0x10E is 0x14, then the Language Select screen loads up at the beginning.  Make a copy of your save file before testing that since I can't remember if there is a checksum.


The broken Expansion Pak function:

NTSC 1.0 ROM: 0x802B75CC
PAL ROM: 0x802B75EC

The part of this function that is broken in NTSC is:

802B7604: LH V0, 0x0114 (A0)
..
802B7610: SLL T6, V0, 0x2
..
802B761C: ADDU S5, S5, T6
802B7620: LW S5 0xAA10 (S5)

The game loads V0, does some math with it that ends up becoming a pointer called S5 that points to a table of pointers.  This then loads a new pointer into S5.  V0 is usually a smaller number which points inside the table.  Occasionally v0 is 0x7FFF which points into the Expansion Pak instead.  This is OK if there is no Expansion Pak because then it returns 0x00 (and then the function exits).  If there is an Expansion Pak, S5 can load anything from there.  If S5 is not 0x00 or a pointer (e.g. 0x80hhhhhh, 0xA0hhhhhh), then when the game uses it to try to load data, the game will crash.

Here's what the PAL/NTSC 1.1 ROMs did to fix this:

LH V0 0x0114 A0
ADDIU AT, R0, 0x7FFF
..
BNE V0, AT, 0x(3 lines ahead)
SLL T6, V0, 0x2
B 0x(End of Function)
Or V0 R0 R0

The game loads V0, then sets AT=0x7FFF.  It compares V0 and AT, and if V0 does not equal AT (0x7FFF), then the function continues.  If V0 equals AT (0x7FFF), then v0 = 0x00 and the rest of the function is skipped.  I shifted some code around and was able to use this function in my patch.

Originally, I fixed this problem by writing 0x00 to the whole Expansion Pak (if it was installed).  I left this code in the final patch because it's better to initialize all the space available anyway.


Finally, the Fat Bear Mountain Fix:

I spiralled between three different tables before finding the answer.  Looking at my notes, I had stuff mostly in my head as I was trying to track this down, so my notes are very sparse.

The first table is objects that can be interacted with. I think this includes creatures and items.  The best way to find this table is to go to the table of pointers that point to each interactable object.  This is located at 0x80203D1C.  Since the table is rarely full, this is the best place to start.  Each object is 0x270 bytes long, so this is a huge table when you make it one object per line.

The second table is creatures, including the creature you inhabit and dead creatures.  It is located somewhere around 0x801DE80.  Its hard to pinpoint this table because data isn't fixed.  I have multiple dumps of the RAM in Fat Bear Mountain, but each one has the data in different places here, but all in that 0x801DE80 area.  I used this to manually kill off the creatures and boost my health as needed.

The third table has all of the objects in the game (not just in the area you are in).
ROM: 0x7BC970
RAM: 0x803A8520

Each item seems to take up 0xB0 bytes.  This is where the GameShark code points and where I manually edited the FBM trophy to have a hit box.  I did not explore any of these tables in depth.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: rlstine on August 16, 2020, 03:08 AM
Hey ozidual thanks so much for putting this information together, and for these patches! My ED64 arrived just yesterday and I can't get SSS Valley to work. It boots, but then freezes at the first logo animation (as described in your first post). I'm going to try and patch it with the NTSC 1.0 you linked, but where can I find the NTSC-U FBM/ExpansionPak patch you mentioned?
Title: Re: Space Station Silicon Valley Fix Patch
Post by: ozidual on August 16, 2020, 07:42 AM
Hey ozidual thanks so much for putting this information together, and for these patches! My ED64 arrived just yesterday and I can't get SSS Valley to work. It boots, but then freezes at the first logo animation (as described in your first post). I'm going to try and patch it with the NTSC 1.0 you linked, but where can I find the NTSC-U FBM/ExpansionPak patch you mentioned?

That NTSC 1.0 patch has all the fixes in it.  You should be good with just that. 

If for some reason you just want the Expansion Pak fix and nothing else, the PAL to NTSC 1.1 patch would be the way to go.  It does not have the FBM fix and has no language select.
Title: Re: Space Station Silicon Valley Fix Patch
Post by: rlstine on August 18, 2020, 03:56 AM
That NTSC 1.0 patch has all the fixes in it.  You should be good with just that. 

If for some reason you just want the Expansion Pak fix and nothing else, the PAL to NTSC 1.1 patch would be the way to go.  It does not have the FBM fix and has no language select.

Thank you, ozidual! I applied the patch and it's working perfectly now.