-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
210afdf
commit 6037585
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
################################################################################ | ||
# Address: 801d4fd8 | ||
################################################################################ | ||
.include "Common/Common.s" | ||
.include "Recording/Recording.s" | ||
|
||
################################################################################ | ||
# Routine: SendStadiumInfo | ||
# ------------------------------------------------------------------------------ | ||
# Sends Pokemon Stadium transformation IDs | ||
################################################################################ | ||
|
||
.set REG_Buffer,11 | ||
.set REG_BufferOffset,12 | ||
|
||
b Start | ||
STATIC_PREVIOUS_VALUE: | ||
blrl | ||
.long 0x00000005 | ||
|
||
Start: | ||
bl STATIC_PREVIOUS_VALUE | ||
mflr r3 | ||
lwz r4, 0(r3) | ||
lwz r5,0xdc(r31) | ||
cmpw r4, r5 | ||
beq Skip | ||
stw r5, 0(r3) | ||
|
||
#------------- INITIALIZE ------------- | ||
# here we want to initalize some variables we plan on using throughout | ||
# get current offset in buffer | ||
lwz r3, primaryDataBuffer(r13) | ||
lwz REG_Buffer, RDB_TXB_ADDRESS(r3) | ||
lwz REG_BufferOffset,bufferOffset(r13) | ||
add REG_Buffer,REG_Buffer,REG_BufferOffset | ||
|
||
# send stage info event code | ||
li r3, CMD_PS_INFO | ||
stb r3,0x0(REG_Buffer) | ||
|
||
# send frame index | ||
lwz r3,frameIndex(r13) | ||
stw r3,0x1(REG_Buffer) | ||
|
||
# send transform IDs (two 16 bit IDs) | ||
stw r5,0x5(REG_Buffer) | ||
|
||
#------------- Increment Buffer Offset ------------ | ||
lwz REG_BufferOffset,bufferOffset(r13) | ||
addi REG_BufferOffset,REG_BufferOffset,PS_INFO_PAYLOAD_LENGTH+1 | ||
stw REG_BufferOffset,bufferOffset(r13) | ||
|
||
Skip: | ||
lmw r27, 0x84(r1) #execute replaced code line |