convert files to new best practices

This commit is contained in:
Jas Laferriere
2019-10-28 23:19:29 -07:00
parent 1c3a626cf6
commit af4fb33bc6
82 changed files with 311 additions and 151 deletions

View File

@@ -1,5 +1,7 @@
#To be inserted at 8016ebac
.include "../Common.s"
################################################################################
# Address: 8016ebac
################################################################################
.include "Common/Common.s"
#Check if VS Mode
load r3,0x80479D30

View File

@@ -55,7 +55,6 @@ mtlr r0
# Local functions (added by us)
.set FN_EXITransferBuffer,0x800055f0
.set FN_GetIsFollower,0x800055f8
.set FN_LoadPSTransformation,0x80005600
# Game functions (applies to NTSC v1.02)
.set HSD_Randi,0x80380580

View File

@@ -1,4 +1,7 @@
#To be inserted at 800055f0
################################################################################
# Address: FN_EXITransferBuffer # 0x800055f0 from Common.s
################################################################################
################################################################################
# Function: ExiTransferBuffer
# Inject @ 800055f0
@@ -9,7 +12,7 @@
# r4 = buffer length
# r5 = read (0x0) or write (0x1)
################################################################################
.include "./Common.s"
.include "Common/Common.s"
# Register names
.set REG_TransferBehavior, 31

View File

@@ -1,2 +1,4 @@
#To be inserted at 804dec1c
################################################################################
# Address: 804dec1c
################################################################################
.long 0x01000000

View File

@@ -1,5 +1,5 @@
# Insert at 8025a530
.include "../../Common.s"
.include "Common/Common.s"
.set OFST_COLOR_BASE, 0x6f208 - 0x20
.set OFST_RFILL_PRIMARY, 0x1

View File

@@ -1,5 +1,5 @@
# Insert at 8025b718
.include "../../Common.s"
.include "Common/Common.s"
stw r3, -0x472C (r13)

View File

@@ -1,4 +1,7 @@
#To be inserted at 800055f8
################################################################################
# Address: FN_GetIsFollower # 0x800055f8 from Common.s
################################################################################
################################################################################
# Function: GetREG_IsFollower
# Inject @ 800055f8
@@ -10,7 +13,7 @@
# out
# r3 = REG_IsFollower
################################################################################
.include "./Common.s"
.include "Common/Common.s"
.set REG_IsFollower, 31
.set REG_PlayerData, 30

View File

@@ -1,10 +1,13 @@
#To be inserted at 8016d294
################################################################################
# Address: 8016d294
################################################################################
################################################################################
# Inject at address 8016d294
# Function is SceneThink_VSMode and we're incrementing the frame index
# before anything "game-engine related" happens
################################################################################
.include "./Common.s"
.include "Common/Common.s"
# Original Codeline
stb r3, 0x0008 (r31)

View File

@@ -1,5 +1,7 @@
#To be inserted at 80068eec
.include "../../Common/Common.s"
################################################################################
# Address: 80068eec
################################################################################
.include "Common/Common.s"
#Backup Data Pointer After Creation
addi r30, r3, 0

View File

@@ -1,5 +1,7 @@
#To be inserted at 801c154c
.include "../../Common/Common.s"
################################################################################
# Address: 801c154c
################################################################################
.include "Common/Common.s"
#Initialize data
li r4,516

View File

@@ -1,5 +1,7 @@
#To be inserted at 80068f30
.include "../../Common.s"
################################################################################
# Address: 80068f30
################################################################################
.include "Common/Common.s"
#Check if PAL
lbz r3,PALToggle(rtoc)

View File

@@ -1,5 +1,7 @@
#To be inserted at 8010fc44
.include "../../../Common.s"
################################################################################
# Address: 8010fc44
################################################################################
.include "Common/Common.s"
#Check if PAL
lbz r4,PALToggle(rtoc)

View File

@@ -1,5 +1,7 @@
#To be inserted at 8010fb64
.include "../../../Common.s"
################################################################################
# Address: 8010fb64
################################################################################
.include "Common/Common.s"
#Check if PAL
lbz r4,PALToggle(rtoc)

View File

@@ -1,5 +1,7 @@
#To be inserted at 802f9a3c
.include "../../Common.s"
################################################################################
# Address: 802f9a3c
################################################################################
.include "Common/Common.s"
#Check if PAL
lbz r3,PALToggle(rtoc)

View File

@@ -1,2 +1,4 @@
#To be inserted at 804dec14
################################################################################
# Address: 804dec14
################################################################################
.long 0x01000000

View File

@@ -1,5 +1,7 @@
#To be inserted at 80266978
.include "../../Common.s"
################################################################################
# Address: 80266978
################################################################################
.include "Common/Common.s"
#Get Texture Data
mflr r12

View File

@@ -1,5 +1,7 @@
#To be inserted at 801d14c8
.include "../../Common.s"
################################################################################
# Address: 801d14c8
################################################################################
.include "Common/Common.s"
.include "../Transformation.s"
.set PSData,31

View File

@@ -1,5 +1,7 @@
#To be inserted at 801d45ec
.include "../../Common.s"
################################################################################
# Address: 801d45ec
################################################################################
.include "Common/Common.s"
.include "../Transformation.s"
.set PSData,31

View File

@@ -1,5 +1,7 @@
#To be inserted at 801d4f14
.include "../../Common.s"
################################################################################
# Address: 801d4f14
################################################################################
.include "Common/Common.s"
.include "../Transformation.s"
.set PSData,31

View File

@@ -1,2 +1,4 @@
#To be inserted at 804dec18
################################################################################
# Address: 804dec18
################################################################################
.long 0x01000000

View File

@@ -1,5 +1,7 @@
#To be inserted at 8016e750
.include "../Common.s"
################################################################################
# Address: 8016e750
################################################################################
.include "Common/Common.s"
.include "../Preload Stadium Transformations/Transformation.s"
# TODO: I don't really like this implementation too much. I think possibly

View File

@@ -1,5 +1,7 @@
#To be inserted at 80265220
.include "../Common.s"
################################################################################
# Address: 80265220
################################################################################
.include "Common/Common.s"
#Check If Player Won Last Game
mr r3,r29

View File

@@ -1,5 +1,7 @@
#To be inserted at 8016ea30
.include "../Common.s"
################################################################################
# Address: 8016ea30
################################################################################
.include "Common/Common.s"
#Original Codeline
stb r0, 0x0010 (r30)

View File

@@ -1,4 +1,6 @@
#To be inserted at 801bfa20
.include "../../Common/Common.s"
################################################################################
# Address: 801bfa20
################################################################################
.include "Common/Common.s"
li r3,2

View File

@@ -1,4 +1,6 @@
#To be inserted at 804dc47c
################################################################################
# Address: 804dc47c
################################################################################
#Credit Achilles1515
.float -2.5

View File

@@ -1,6 +1,8 @@
#To be inserted at 80261a6c
################################################################################
# Address: 80261a6c
################################################################################
#Credit Achilles1515
.include "../../Common/Common.s"
.include "Common/Common.s"
#Check
lbz r5, 0x0005 (r31)

View File

@@ -1,4 +1,6 @@
#To be inserted at 80261b1c
.include "../../../Common/Common.s"
################################################################################
# Address: 80261b1c
################################################################################
.include "Common/Common.s"
nop

View File

@@ -1,4 +1,6 @@
#To be inserted at 80261b30
.include "../../../Common/Common.s"
################################################################################
# Address: 80261b30
################################################################################
.include "Common/Common.s"
nop

View File

@@ -1,5 +1,7 @@
#To be inserted at 8026325c
.include "../../Common/Common.s"
################################################################################
# Address: 8026325c
################################################################################
.include "Common/Common.s"
#Get Random Stage Byte
load r4,0x8045BF17

View File

@@ -1,5 +1,7 @@
#To be inserted at 80266ce0
.include "../../Common/Common.s"
################################################################################
# Address: 80266ce0
################################################################################
.include "Common/Common.s"
#######################################
## Runs During CSS -> SSS Transition ##

View File

@@ -1,3 +1,5 @@
#To be inserted at 80030e44
################################################################################
# Address: 80030e44
################################################################################
blr

View File

@@ -1,2 +1,4 @@
#To be inserted at 8015fdbc
################################################################################
# Address: 8015fdbc
################################################################################
b 0xAC

View File

@@ -1,2 +1,4 @@
#To be inserted at 80089250
################################################################################
# Address: 80089250
################################################################################
b 0x8

View File

@@ -1,2 +1,4 @@
#To be inserted at 804dec08
################################################################################
# Address: 804dec08
################################################################################
.long 0x01010101

View File

@@ -1,5 +1,7 @@
#To be inserted at 802fccd8
.include "../../Common/Common.s"
################################################################################
# Address: 802fccd8
################################################################################
.include "Common/Common.s"
#Check if Doubles
load r3,0x8046b6a0

View File

@@ -1,4 +1,6 @@
#To be inserted at 8016ba80
.include "../../Common/Common.s"
################################################################################
# Address: 8016ba80
################################################################################
.include "Common/Common.s"
b 0x14

View File

@@ -1,4 +1,6 @@
#To be inserted at 8016e9b0
.include "../../Common/Common.s"
################################################################################
# Address: 8016e9b0
################################################################################
.include "Common/Common.s"
nop

View File

@@ -1,4 +1,6 @@
#To be inserted at 8016e9a4
.include "../../../Common/Common.s"
################################################################################
# Address: 8016e9a4
################################################################################
.include "Common/Common.s"
nop

View File

@@ -1,5 +1,7 @@
#To be inserted at 8025B8BC
.include "../../Common/Common.s"
################################################################################
# Address: 8025B8BC
################################################################################
.include "Common/Common.s"
#Load first minor of current major
load r3,0x80479d30

View File

@@ -1,5 +1,7 @@
#To be inserted at 8016e510
.include "../Common/Common.s"
################################################################################
# Address: 8016e510
################################################################################
.include "Common/Common.s"
.set MatchInfo,31
.set SpawnTable,30

View File

@@ -1,3 +1,5 @@
#To be inserted at 803d4a70
################################################################################
# Address: 803d4a70
################################################################################
.long 0x00000000

View File

@@ -1,5 +1,7 @@
#To be inserted at 801a5b14
.include "../../Common/Common.s"
################################################################################
# Address: 801a5b14
################################################################################
.include "Common/Common.s"
.set REG_LoopCount,29

View File

@@ -1,5 +1,7 @@
#To be inserted at 801af6f4
.include "../../Common/Common.s"
################################################################################
# Address: 801af6f4
################################################################################
.include "Common/Common.s"
.set MEMCARD_NONE,0xF
.set MEMCARD_NONE2,0xD

View File

@@ -1,5 +1,7 @@
#To be inserted at 802608D8
.include "../../Common/Common.s"
################################################################################
# Address: 802608D8
################################################################################
.include "Common/Common.s"
loc_0x0:
lbz r3, 7(r31)

View File

@@ -1,5 +1,7 @@
#To be inserted at 8006B028
.include "../../../Common/Common.s"
################################################################################
# Address: 8006B028
################################################################################
.include "Common/Common.s"
#Original Codeline
stw r0, 0x065C (r31)

View File

@@ -1,2 +1,4 @@
#To be inserted at 8025d22c
################################################################################
# Address: 8025d22c
################################################################################
li r29,0

View File

@@ -1,5 +1,7 @@
#To be inserted at 800C9A44
.include "../../../Common/Common.s"
################################################################################
# Address: 800C9A44
################################################################################
.include "Common/Common.s"
# Check for toggle bool
lwz r4, 44(r3)

View File

@@ -1,5 +1,7 @@
#To be inserted at 800998A4
.include "../../../Common/Common.s"
################################################################################
# Address: 800998A4
################################################################################
.include "Common/Common.s"
# Check for toggle bool
lwz r4, 44(r3)

View File

@@ -1,5 +1,7 @@
#To be inserted at 802652ec
.include "../../../Common/Common.s"
################################################################################
# Address: 802652ec
################################################################################
.include "Common/Common.s"
.set text,31
.set textProperties,30

View File

@@ -1,5 +1,7 @@
#To be inserted at 8025e0e8
.include "../../../Common/Common.s"
################################################################################
# Address: 8025e0e8
################################################################################
.include "Common/Common.s"
.set entity,31
.set player,31

View File

@@ -1,5 +1,7 @@
#To be inserted at 8025e070
.include "../../../Common/Common.s"
################################################################################
# Address: 8025e070
################################################################################
.include "Common/Common.s"
subi r3,r13,UCFTextPointers #get pointers
mulli r4,r31,0x4 #get offset

View File

@@ -1,5 +1,7 @@
#To be inserted at 802604e8
.include "../../../Common/Common.s"
################################################################################
# Address: 802604e8
################################################################################
.include "Common/Common.s"
#r5 = player number
#r6 = player number * 0x4

View File

@@ -1,5 +1,7 @@
#To be inserted at 800C9A44
.include "../../Common/Common.s"
################################################################################
# Address: 800C9A44
################################################################################
.include "Common/Common.s"
.set REG_PlayerData,31
.set REG_Floats,30

View File

@@ -1,5 +1,7 @@
#To be inserted at 800998a4
.include "../../Common/Common.s"
################################################################################
# Address: 800998a4
################################################################################
.include "Common/Common.s"
.set REG_PlayerData,31
.set REG_PlayerGObj,30

View File

@@ -1,5 +1,5 @@
#To be inserted @ 802662D0
.include "../../Common/Common.s"
.include "Common/Common.s"
.set text,31
.set textProperties,30

View File

@@ -1,3 +1,5 @@
#To be inserted at 802605fc
.include "../../Common/Common.s"
################################################################################
# Address: 802605fc
################################################################################
.include "Common/Common.s"
li r6,3

View File

@@ -1,3 +1,5 @@
#To be inserted at 803BB05C
################################################################################
# Address: 803BB05C
################################################################################
.float 0.34375

View File

@@ -1,4 +1,6 @@
#To be inserted at 802fcfc4
################################################################################
# Address: 802fcfc4
################################################################################
#Override X Scale
bl Floats

View File

@@ -1,3 +1,5 @@
#To be inserted at 804ddb84
################################################################################
# Address: 804ddb84
################################################################################
.float 0.2695234375

View File

@@ -1,4 +1,6 @@
#To be inserted at 802fcce8
################################################################################
# Address: 802fcce8
################################################################################
/************************************************
* Automatically Scale Name Tag Shadow Box Size *
@@ -104,4 +106,4 @@ stfs f15,0x2c(r3)
END:
#default code line
lwz r3,0x10(r30)
lwz r3,0x10(r30)

View File

@@ -1,3 +1,5 @@
#To be inserted at 804ddb48
################################################################################
# Address: 804ddb48
################################################################################
.float 0.121667

View File

@@ -1,4 +1,6 @@
#To be inserted at 8036A4A8
################################################################################
# Address: 8036A4A8
################################################################################
lfs f1,0x34(r31) # default code line

View File

@@ -1,7 +1,7 @@
# Inject at 801a501c
# Injection is right before game engine loops
.include "../../Common/Common.s"
.include "../Playback.s"
.include "Common/Common.s"
.include "Playback/Playback.s"
# Info provided by tauKhan, relevant for fast forwarding
# 801a4db0: transfer input queue count to r27

View File

@@ -1,11 +1,14 @@
#To be inserted at 8016d298
################################################################################
# Address: 8016d298
################################################################################
################################################################################
# Inject at address 8016d298
# Function is SceneThink_VSMode and we're calling FetchGameFrame to update
# the frameDataBuffer.
################################################################################
.include "../Common/Common.s"
.include "./Playback.s"
.include "Common/Common.s"
.include "Playback/Playback.s"
# Register names
.set PlayerData,31

View File

@@ -1,6 +1,9 @@
#To be inserted at 8006b0dc
.include "../Common/Common.s"
.include "./Playback.s"
################################################################################
# Address: 8006b0dc
################################################################################
.include "Common/Common.s"
.include "Playback/Playback.s"
# Register names
.set PlayerData,31

View File

@@ -1,12 +1,15 @@
#To be inserted at 8016e74c
################################################################################
# Address: 8016e74c
################################################################################
################################################################################
# Inject at address 8016e74c
# Function is StartMelee and we are loading game information right before
# it gets read to initialize the match
################################################################################
.include "../Common/Common.s"
.include "./Playback.s"
.include "./RestoreInitialRNG.s"
.include "Common/Common.s"
.include "Playback/Playback.s"
.include "Playback/RestoreInitialRNG.s"
# Register names
.set BufferPointer,30

View File

@@ -1,4 +1,4 @@
.include "./Playback.s"
.include "Playback/Playback.s"
.macro Macro_RestoreInitialRNG

View File

@@ -1,11 +1,14 @@
#To be inserted at 8016d304
################################################################################
# Address: 8016d304
################################################################################
################################################################################
# Inject at address 8016d304
# Function is SceneThink_VSMode and we're ending the game when slippi detects
# an LRA-Start
################################################################################
.include "../Common/Common.s"
.include "./Playback.s"
.include "Common/Common.s"
.include "Playback/Playback.s"
# Check status of frame received. If a terminate result is received, that means
# we need to end the game immediately

View File

@@ -1,10 +1,13 @@
#To be inserted at 8016b9c0
################################################################################
# Address: 8016b9c0
################################################################################
################################################################################
# Inject at address 8016b9c0
# Function is StockStealCheck and we're replacing the start button check with
# a request to slippi. Runs when a player is in-game + has no stocks
################################################################################
.include "../Common/Common.s"
.include "Common/Common.s"
# Setup buffer
lwz r5,secondaryDmaBuffer(r13) #Get secondary DMA buffer alloc

View File

@@ -1,5 +1,7 @@
#To be inserted at 801a45a0
.include "../../Common/Common.s"
################################################################################
# Address: 801a45a0
################################################################################
.include "Common/Common.s"
.set ADDR_MajorStruct_DebugMelee,0x803dada8

View File

@@ -1,2 +1,4 @@
#To be inserted at 801b16a8
################################################################################
# Address: 801b16a8
################################################################################
.long 0x801b09c0

View File

@@ -1,2 +1,4 @@
#To be inserted at 803dda9c
################################################################################
# Address: 803dda9c
################################################################################
.long 0x07000000

View File

@@ -1,5 +1,7 @@
#To be inserted at 801a6348
.include "../../Common/Common.s"
################################################################################
# Address: 801a6348
################################################################################
.include "Common/Common.s"
.set REG_Floats, 30
.set REG_BufferPointer, 29

View File

@@ -1,3 +1,5 @@
#To be inserted at 800679bc
.include "./Recording.s"
################################################################################
# Address: 800679bc
################################################################################
.include "Recording/Recording.s"
li r4, PlayerBlockSize

View File

@@ -1,6 +1,8 @@
#To be inserted at 802fef88
.include "../Common/Common.s"
.include "./Recording.s"
################################################################################
# Address: 802fef88
################################################################################
.include "Common/Common.s"
.include "Recording/Recording.s"
################################################################################
# Routine: FlushFrameBuffer

View File

@@ -1,6 +1,8 @@
#To be inserted at 8008d698
.include "../../Common/Common.s"
.include "../Recording.s"
################################################################################
# Address: 8008d698
################################################################################
.include "Common/Common.s"
.include "Recording/Recording.s"
#Check if L-Cancelled
cmpw r5, r0

View File

@@ -1,6 +1,8 @@
#To be inserted at 8006c324
.include "../../Common/Common.s"
.include "../Recording.s"
################################################################################
# Address: 8006c324
################################################################################
.include "Common/Common.s"
.include "Recording/Recording.s"
#Reset Status
li r3,0

View File

@@ -1,4 +1,7 @@
#To be inserted at 80005604
################################################################################
# Address: FN_IsVSMode # 0x80005604 from Recording.s
################################################################################
.include "Recording/Recording.s"
#Check scenes
lis r4, 0x8048 # load address to offset from for scene controller

View File

@@ -1,6 +1,8 @@
#To be inserted at 8016d30c
.include "../Common/Common.s"
.include "./Recording.s"
################################################################################
# Address: 8016d30c
################################################################################
.include "Common/Common.s"
.include "Recording/Recording.s"
################################################################################
# Routine: SendGameEnd

View File

@@ -1,4 +1,6 @@
#To be inserted at 8016e74c
################################################################################
# Address: 8016e74c
################################################################################
.include "Common/Common.s"
.include "Recording/Recording.s"
.include "Recording/SendInitialRNG.s"

View File

@@ -1,6 +1,8 @@
#To be inserted at 8006c5d8
.include "../Common/Common.s"
.include "./Recording.s"
################################################################################
# Address: 8006c5d8
################################################################################
.include "Common/Common.s"
.include "Recording/Recording.s"
################################################################################
# Routine: SendGamePostFrame

View File

@@ -1,6 +1,8 @@
#To be inserted at 8006b0dc
.include "../Common/Common.s"
.include "./Recording.s"
################################################################################
# Address: 8006b0dc
################################################################################
.include "Common/Common.s"
.include "Recording/Recording.s"
################################################################################
# Routine: SendGamePreFrame