Author Topic: Space Station Silicon Valley Fix Patch  (Read 23989 times)

0 Members and 1 Guest are viewing this topic.

Offline ozidual

  • Hero Member
  • *****
  • Posts: 553
  • Karma: +52/-0
    • View Profile
Space Station Silicon Valley Fix Patch
« 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
NTSC-U 1.0 (Includes Language Select)
NTSC-U 1.1 (Includes Language Select)
NTSC-J
All 4

PAL to NTSC v1.1 patch (converts PAL ROM to create an NTSC v1.1 ROM)
PALtoNTSCv1.1

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.
« Last Edit: October 23, 2018, 06:55 PM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64, Getter Love, Shiren
Flash Carts: EverDrive64 2.5, EverDrive N8, SD2SNES

Offline ozidual

  • Hero Member
  • *****
  • Posts: 553
  • Karma: +52/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #1 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!
« Last Edit: October 19, 2017, 02:04 AM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64, Getter Love, Shiren
Flash Carts: EverDrive64 2.5, EverDrive N8, SD2SNES

Offline ozidual

  • Hero Member
  • *****
  • Posts: 553
  • Karma: +52/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #2 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.
« Last Edit: October 20, 2017, 07:40 PM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64, Getter Love, Shiren
Flash Carts: EverDrive64 2.5, EverDrive N8, SD2SNES

Offline butfluffy

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +46/-8
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #3 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 :)

Offline ozidual

  • Hero Member
  • *****
  • Posts: 553
  • Karma: +52/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #4 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.
« Last Edit: October 21, 2017, 04:45 AM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64, Getter Love, Shiren
Flash Carts: EverDrive64 2.5, EverDrive N8, SD2SNES

Offline butfluffy

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +46/-8
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #5 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 :)

Offline fabio_rosendo

  • Full Member
  • ***
  • Posts: 117
  • Karma: +13/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #6 on: October 21, 2017, 06:28 AM »
Oh Gosh........... this is EPIC.  :o
.
Thanks isn't enough to say.
Kudos for you Ozidual  ;)

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1529
  • Karma: +153/-3
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #7 on: October 21, 2017, 08:03 PM »
This is really great! Thanks for the hard work, mate.

Offline ozidual

  • Hero Member
  • *****
  • Posts: 553
  • Karma: +52/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #8 on: October 23, 2017, 07:46 PM »
These patches are now released on romhacking.  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.
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64, Getter Love, Shiren
Flash Carts: EverDrive64 2.5, EverDrive N8, SD2SNES

Offline ozidual

  • Hero Member
  • *****
  • Posts: 553
  • Karma: +52/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #9 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.
« Last Edit: October 27, 2017, 06:28 AM by ozidual »
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64, Getter Love, Shiren
Flash Carts: EverDrive64 2.5, EverDrive N8, SD2SNES

Offline johnson

  • Jr. Member
  • **
  • Posts: 66
  • Karma: +0/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #10 on: October 25, 2017, 05:33 AM »
that's amazing ! finally I will play the game in spanish  thanks again Ozidual
« Last Edit: October 25, 2017, 05:36 AM by johnson »

Offline butfluffy

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +46/-8
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #11 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 :)

Offline ozidual

  • Hero Member
  • *****
  • Posts: 553
  • Karma: +52/-0
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #12 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.
Projects: Zelda OoT GCtoN64, Doshin the Giant, SSSV, Sim City 64, Getter Love, Shiren
Flash Carts: EverDrive64 2.5, EverDrive N8, SD2SNES

Offline Kerr Avon

  • Hero Member
  • *****
  • Posts: 1529
  • Karma: +153/-3
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #13 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?

Offline butfluffy

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +46/-8
    • View Profile
Re: Space Station Silicon Valley Fix Patch
« Reply #14 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.
« Last Edit: October 27, 2017, 06:17 PM by butfluffy »