Skip to content

Commit

Permalink
Merge pull request #5 from ShadowSpeedrun/RC1
Browse files Browse the repository at this point in the history
RC1
  • Loading branch information
BlazinZzetti committed May 14, 2023
2 parents 4a50d11 + 0315b69 commit 349c63e
Show file tree
Hide file tree
Showing 233 changed files with 1,267 additions and 129 deletions.
2 changes: 1 addition & 1 deletion ASM Changes/IGTMessageRender.asm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Start:
;r10 contains address to start of our message.
;Offset it to the start of the dynamic section.
lwz r21, 0(r10)
addi r21, r21, 0x24
addi r21, r21, 0x54

;Determine the Timer to Display
;First check for Expert flag(8057D7C5)
Expand Down
50 changes: 50 additions & 0 deletions ASM Changes/RestoreTimeOnDeathChecks.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#To be inserted at 80178BC4
;RestoreTimeOnDeathChecks.asm

;Normally we do not want to restore the timer to
;the last checkpoint / save, but for Bosses we need to
;reset the OG timer to keep functionality the same as OG.
;We also only want to reset the New IGT if we are in select mode.

;To check for if we are in a boss fight, we will do some bit math
;on the Stage ID. Boss IDs are set as: Level Column - Boss - #
;So 412 = Column 4 Third Boss = Black Bull 2.

Start:
;Load value of "Boss Selected"
;into r18. (8057D748)
lis r18, 0x8057
ori r17, r18, 0xD748
lwz r17, 0(r17)

li r19, 100
divw r16, r17, r19
mullw r16, r16, r19
sub r17, r17, r16

cmpwi r17, 10
bge RestoreTimerOG
blt End

RestoreTimerOG:
;Original Code
;r4+148 = 8057D734
stfs f0, 148(r4)

CheckSelectMode:
;Load value of "Select Mode Flag"
;into r18. (8057D8FE)
lis r18, 0x8057
ori r18, r18, 0xD8FE
lhz r18, 0(r18)
cmpwi r18, 0
beq End

ResetNewTimer:
stfs f0, 0x268(r4)

End:
li r16, 0
li r17, 0
li r18, 0
li r19, 0
121 changes: 104 additions & 17 deletions ASM Changes/SXIntroMessageRender.asm
Original file line number Diff line number Diff line change
Expand Up @@ -104,35 +104,57 @@ RenderSXOptions:
;Start by rendering a blank screen
mr r20, r21

li r16, 0x5e
;Sub Offset if JPN
;80576972 = 0

lis r16, 0x8057
addi r18, r16, 0x6972
lhz r16, 0(r18)
cmpwi r16, 0
beql JPNOffset1ToR16
bnel ENGOffset1ToR16

bl MoveCursorR16X

lis r16, 0x8057
addi r18, r16, 0x7B2C
lbz r17, 0(r18)
bl RenderOptionR17On

li r16, 0x9E
lis r16, 0x8057
addi r18, r16, 0x6972
lhz r16, 0(r18)
cmpwi r16, 0
beql JPNOffset2ToR16
bnel ENGOffset2ToR16

bl MoveCursorR16X

lis r16, 0x8057
addi r18, r16, 0x7B2D
lbz r17, 0(r18)
bl RenderOptionR17On

li r16, 0xDE
lis r16, 0x8057
addi r18, r16, 0x6972
lhz r16, 0(r18)
cmpwi r16, 0
beql JPNOffset3ToR16
bnel ENGOffset3ToR16

bl MoveCursorR16X

lis r16, 0x8057
addi r18, r16, 0x7B2E
lbz r17, 0(r18)
bl RenderOptionR17On
lis r18, 0x8057
ori r18, r18, 0xD8F4

lhz r16, 0(18)
bl SelectedOptionR16
lis r16, 0x8057
addi r18, r16, 0x6972
lhz r16, 0(r18)
cmpwi r16, 0
beql SelectedOptionJPN
bnel SelectedOption

bl GetNewButtonPressesToR16

Expand Down Expand Up @@ -277,15 +299,35 @@ DpadRightOptions:
li r14, 0
blr

JPNOffset1ToR16:
li r16, 0x54
blr

ENGOffset1ToR16:
li r16, 0x62
blr

JPNOffset2ToR16:
li r16, 0x8C
blr

ENGOffset2ToR16:
li r16, 0xA2
blr

JPNOffset3ToR16:
li r16, 0xBE
blr

ENGOffset3ToR16:
li r16, 0xE2
blr

RenderOptionR17On:
mflr r14

;- +On +Off
lis r16, 0x2d
addi r16, r16, 0x20
bl RenderR16R21
lis r16, 0x20
;addi r16, r16, 0x2b
; +On +Off
lis r16, 0x20 ;Space before

cmpwi r17, 1
beql SelectedCharacter
Expand All @@ -295,8 +337,8 @@ RenderOptionR17On:
lis r16, 0x4f
addi r16, r16, 0x6e
bl RenderR16R21
lis r16, 0x20
;addi r16, r16, 0x2b

lis r16, 0x20 ;Space between

cmpwi r17, 0
beql SelectedCharacter
Expand Down Expand Up @@ -328,8 +370,13 @@ UnselectedCharacter:
li r15, 0
blr

SelectedOptionR16:
SelectedOption:
mflr r14

lis r18, 0x8057
ori r18, r18, 0xD8F4

lhz r16, 0(18)
mr r17, r16
li r16, 0
Expand Down Expand Up @@ -357,6 +404,46 @@ SelectedOptionR16:
li r14, 0
blr

SelectedOptionJPN:
mflr r14

lis r18, 0x8057
ori r18, r18, 0xD8F4

lhz r16, 0(18)
mr r17, r16
li r16, 0
addi r21, r20, 0x38
cmpwi r17, 0
beql SelectedCharacter
bnel UnselectedCharacter
sth r16, 0(r21)

li r16, 0
addi r21, r20, 0x6A
cmpwi r17, 1
beql SelectedCharacter
bnel UnselectedCharacter
sth r16, 0(r21)

li r16, 0
addi r21, r20, 0xA2
cmpwi r17, 2
beql SelectedCharacter
bnel UnselectedCharacter
sth r16, 0(r21)

;Set r16 back to 0 and
;run compare again to
;prevent branch on leave.
li r16, 0
cmpwi r16, 0

mtlr r14
li r14, 0
blr

MoveCursorR16X:
;Use Saved start
add r21, r20, r16
Expand Down
File renamed without changes.
64 changes: 36 additions & 28 deletions FilesForReleases/README.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
///////////////////////////////////////////////////////
//// SHADOW THE HEDGEHOG - SPEEDRUNNER'S CUT ////
//// BETA 5 RELEASE ////
//// RELEASE CANDIDATE 1 ////
///////////////////////////////////////////////////////

A few updates and fixes this time. Had a few issues with the Race Timer feature, but everything is good now. The main notable change this time is the ability to enter Last Story and Expert Mode stages from select mode. Details on how are currently on the GitHub release notes.
The end is very close! Only a few external things left for this to be ready for launch!

I did quite a bit of refactoring of the custom code this time. While I have tested everything out, there's a chance something slipped by. If you notice anything weird, please reach out. Updates from here on out should be release candidate worthy and any 1.1 release should be to add improvements not possible at the moment.
There is one bug with how one of the boss intro cutscene works with the UV remapping that will have to stay broken for now, due to tool limitations, but maybe by time 1.1 comes around, things will be better. No ETA on when a 1.1 would ever release at the momment or what exactly would be included in it.

The largest change in this release compared to Beta 5 is the language support for the extra messages in the game that this ROM Hack adds. There's also an update to the way bosses handle the game timers to better match expected gameplay comapre to the original.

In addtition to that, the game will now have the Game ID of GUPX8P. This means you can keep a seperate save file compared to the original game. If you want to convert your existing save, this can be done with a hex editor by simply modifing the game id in the file data.

There will be a Release Candidate 2 soon. Release Candidate in this case is mainly regarding the ROM itself, not the supporting tools.

///////////////////////////////////////////////////////
//// SETUP INSTRUCTIONS ////
//// SETUP INSTRUCTIONS - PATCHING THE ROM ////
///////////////////////////////////////////////////////

1. Create a new folder for holding the downloaded files. The name doesn’t have to be exact, but I would recommended "Shadow-SX" for the name.

2. Download the latest Dolphin Development Build.

3. Extract the contents such that the Dolphin-x64 folder is in the Shadow-SX folder.

Your folder should now look like:

Shadow-SX
|_
Dolphin-x64

4. Drag the files inside of "Shadow-SX-Files" onto your "Shadow-SX" Folder. This will copy over the dolphin settings and game changes. This also will make this dolphin exe into a portable version which will keep settings and changes local to this version without messing with any existing dolphin settings on your computer.
2. Drag the files inside of "Shadow-SX-Files" onto your "Shadow-SX" Folder. For those planing to play with Dolphin, this will copy over the dolphin settings and game changes. More details on that further down.

Your folder should now look like this:

Expand All @@ -33,7 +29,7 @@ I did quite a bit of refactoring of the custom code this time. While I have test
ShadowSXResources
ShadowSXLauncher.exe

5. If you don’t already have a patched ROM, you should now create one using the ShadowSXLauncher. If you are on Mac or Linux, or would prefer not to use the Launcher to patch the ROM, you can use the manual patching tools provided on the download page.
3. If you don’t already have a patched ROM, you should now create one using the ShadowSXLauncher. If you are on Mac or Linux, or would prefer not to use the Launcher to patch the ROM, you can use the manual patching tools provided on the download page.

To patch the ROM using the ShadowSXLauncher:
1. Open the launcher, then press the "Create Shadow SX ROM" button.
Expand All @@ -44,19 +40,31 @@ I did quite a bit of refactoring of the custom code this time. While I have test

The remaining steps are for those that wish to play on PC with the Dolphin Emulator. If you are only planning on playing on Console, you do not need to follow the remaining steps, simply run the patched ROM on your console of choice.

All optional settings as of now able to be enabled in the game itself without the need for extra files. The first blue message that appears on boot will explain how to enable one or more options.
All optional settings for gameplay purposes are able to be configured in the game itself without the need for extra files. The first blue message that appears on boot will explain how to enable one or more options.

///////////////////////////////////////////////////////
//// SETUP INSTRUCTIONS - DOLPHIN ////
///////////////////////////////////////////////////////

1. Download the latest Dolphin Development Build.

2. Extract the contents to the Dolphin-x64 folder that is in the Shadow-SX folder.

With the files from eariler this will make this dolphin setup into a portable version which will keep settings and changes local to this version without messing with any existing dolphin settings on your computer.

3. Within ShadowSXResources\CustomTextures, there is a folder named GUPX8P. Copy (not move) that folder and paste it in: Dolphin-x64\User\Load\Textures. This adds some custom textures that can be used to improve or customize the look of Shadow SX.

6. Within ShadowSXResources\CustomTextures, there is a folder named GUPE8P. Copy (not move) that folder and paste it in: Dolphin-x64\User\Load\Textures. This adds some custom textures that can be used to improve or customize the look of Shadow SX.
4. In the Dolphin-x64\User\Load\Textures\Buttons folder, delete all folders except for the one that lists your preferred button display, deleting all if you want to use the default GC button layout.

7. In the Dolphin-x64\User\Load\Textures\Buttons folder, delete all folders except for the one that lists your preferred button display, deleting all if you want to use the default GC button layout.
Note: Extra custom textures will be handled better with the RC2 Release.

8. Run "Dolphin.exe" in the Dolphin-x64 folder.
5. Run "Dolphin.exe" in the Dolphin-x64 folder.

9. Double click the main window, where instructed, to set the rom path to where your ShadowSX ROM will be.
6. Double click the main window, where instructed, to set the rom path to where your ShadowSX ROM will be.

10. If you plan to run your ROM from a HDD, you may need to reenable the Emulate Disk Speed setting in the game to improve performance.
7. If you plan to run your ROM from a HDD, you may need to re-enable the Emulate Disk Speed setting in the game to improve performance.

11. Click on the Controllers icon to set up your controller.
8. Click on the Controllers icon to set up your controller.

GC controllers should be mapped 1 to 1 or using an adapter.

Expand All @@ -69,17 +77,17 @@ Y = Top Face Button

Be sure to enable the Modern UI Control option in game if you want a similar UI navigation experience as those console versions.

Also, make sure to enable Background Input in the Controller Settings if you want to be able to play the game while having something else focused on your computer.

************************************************************************
Congratulations!
You can now run Shadow the Hedgehog with the Shadow-SX changes applied.
*************************************************************************

Notes:

If you want, you could run Shadow SX from Dolphin.exe, but it is recommended that you instead use the provided ShadowSXLauncher.exe which allows launching the game standalone without the dolphin interface and adjusting some settings in a more user friendly way. While I initially planned to have quick access to some of the more common dolphin settings, those will still need to be done with the dolphin interface, a shortcut to which is provided in the settings menu of the launcher. If you choose to do this, be sure to make sure all of the folders and files are named correctly under the "Shadow-SX" folder based on the above instructions. The main folder itself doesn’t need to be named "Shadow-SX".

The end goal is to have a set of settings that would allow everyone to play on the same "Console". The default settings should work for everyone, but if you need to adjust settings to get things working, let me know. From my tests so far, it appears that you can increase the visual quality of the game, but at the cost of reduced framerate or more frequent drops in framerate. The real time appears to be unaffected, so whether you want fast framerates of improved visual quality is currently up to you.
If you want, you could run Shadow SX from Dolphin.exe, but it is recommended that you instead use the provided ShadowSXLauncher.exe which allows launching the game standalone without the dolphin interface and adjusting some settings in a more user friendly way. While I initially planned to have quick access to some of the more common dolphin settings, those will still need to be done with the dolphin interface, a shortcut to which is provided in the settings menu of the launcher. If you choose to do this, be sure to make all of the folders and files are named correctly under the "Shadow-SX" folder based on the above instructions. The main folder itself doesn’t need to be named "Shadow-SX".

Regarding Aspect Ratio, Auto or Force 4:3 should be fine. If you have a decent 4:3 Monitor, set the option to Stretch to Window and run it full screen on that monitor for the best experience.
The default settings should work for everyone, adjusting the settings is allowed, though keep in mind this may have an effect on performance. From my tests so far, it appears that you can increase the visual quality of the game, but at the cost of reduced framerate or more frequent drops in framerate. The real time appears to be unaffected, so whether you want fast framerates of improved visual quality is currently up to you. For players expecting to have submittable runs, the framerate (VPS in Dolphin) should be consistent and pretty much always 60. Footage that does not meet this may not be accepted.

Make sure to enable Background Input in the Controller Settings if you want to be able to play the game while having something else focused on your computer.
Regarding Aspect Ratio, Auto or Force 4:3 should be fine. If you have a decent 4:3 Monitor, set the option to Stretch to Window and run it full screen on that monitor for the best experience.

0 comments on commit 349c63e

Please sign in to comment.