Rewind -> warp
This commit is contained in:
Binary file not shown.
@@ -125,9 +125,9 @@ OnFileCreation:
|
|||||||
|
|
||||||
; initialize rewind table
|
; initialize rewind table
|
||||||
LDA.w #$0000
|
LDA.w #$0000
|
||||||
STA.l RewindTrigger
|
STA.l RewindTriggerSRAM
|
||||||
LDA.w #$FFFF
|
LDA.w #$FFFF
|
||||||
STA.l RewindRoomId
|
STA.l RewindRoomIdSRAM
|
||||||
|
|
||||||
; Resolve instant post-aga if standard
|
; Resolve instant post-aga if standard
|
||||||
SEP #$20
|
SEP #$20
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ endmacro
|
|||||||
%ReceiptProps($B5, -4, 0, $28, $F36A, $FF, free_crystal, skip) ; B5 - Crystal 4
|
%ReceiptProps($B5, -4, 0, $28, $F36A, $FF, free_crystal, skip) ; B5 - Crystal 4
|
||||||
%ReceiptProps($B6, -4, 0, $28, $F36A, $FF, free_crystal, skip) ; B6 - Crystal 3
|
%ReceiptProps($B6, -4, 0, $28, $F36A, $FF, free_crystal, skip) ; B6 - Crystal 3
|
||||||
%ReceiptProps($B7, -4, 0, $49, $F36A, $FF, skip, skip) ; B7 - Reserved
|
%ReceiptProps($B7, -4, 0, $49, $F36A, $FF, skip, skip) ; B7 - Reserved
|
||||||
%ReceiptProps($B8, -4, 0, $49, $F36A, $FF, skip, skip) ; B8 -
|
%ReceiptProps($B8, -4, 0, $52, $F36A, $FF, teleporter, skip) ; B8 - Teleporter
|
||||||
%ReceiptProps($B9, -4, 0, $49, $F36A, $FF, skip, skip) ; B9 -
|
%ReceiptProps($B9, -4, 0, $49, $F36A, $FF, skip, skip) ; B9 -
|
||||||
%ReceiptProps($BA, -4, 0, $49, $F36A, $FF, skip, skip) ; BA -
|
%ReceiptProps($BA, -4, 0, $49, $F36A, $FF, skip, skip) ; BA -
|
||||||
%ReceiptProps($BB, -4, 0, $49, $F36A, $FF, skip, skip) ; BB -
|
%ReceiptProps($BB, -4, 0, $49, $F36A, $FF, skip, skip) ; BB -
|
||||||
@@ -599,7 +599,7 @@ endmacro
|
|||||||
%SpriteProps($B5, 2, 2, $80, $80, PalettesCustom_crystal) ; B5 - Crystal 4
|
%SpriteProps($B5, 2, 2, $80, $80, PalettesCustom_crystal) ; B5 - Crystal 4
|
||||||
%SpriteProps($B6, 2, 2, $80, $80, PalettesCustom_crystal) ; B6 - Crystal 3
|
%SpriteProps($B6, 2, 2, $80, $80, PalettesCustom_crystal) ; B6 - Crystal 3
|
||||||
%SpriteProps($B7, 2, 2, $80, $80, $0000) ; B7 - Reserved
|
%SpriteProps($B7, 2, 2, $80, $80, $0000) ; B7 - Reserved
|
||||||
%SpriteProps($B8, 2, 2, $04, $04, $0000) ; B8 -
|
%SpriteProps($B8, 2, 2, $01, $01, PalettesVanilla_red_melon+$0E) ; B8 - Teleporter
|
||||||
%SpriteProps($B9, 2, 2, $04, $04, $0000) ; B9 -
|
%SpriteProps($B9, 2, 2, $04, $04, $0000) ; B9 -
|
||||||
%SpriteProps($BA, 2, 2, $04, $04, $0000) ; BA -
|
%SpriteProps($BA, 2, 2, $04, $04, $0000) ; BA -
|
||||||
%SpriteProps($BB, 2, 2, $04, $04, $0000) ; BB -
|
%SpriteProps($BB, 2, 2, $04, $04, $0000) ; BB -
|
||||||
@@ -875,7 +875,7 @@ endmacro
|
|||||||
%InventoryItem($B5, $0080, $0000, $0000) ; B5 - Crystal 4
|
%InventoryItem($B5, $0080, $0000, $0000) ; B5 - Crystal 4
|
||||||
%InventoryItem($B6, $0080, $0000, $0000) ; B6 - Crystal 3
|
%InventoryItem($B6, $0080, $0000, $0000) ; B6 - Crystal 3
|
||||||
%InventoryItem($B7, $0000, $0000, $0000) ; B7 - Reserved
|
%InventoryItem($B7, $0000, $0000, $0000) ; B7 - Reserved
|
||||||
%InventoryItem($B8, $0001, $0000, $0000) ; B8 -
|
%InventoryItem($B8, $0081, $0000, $0000) ; B8 - Teleporter
|
||||||
%InventoryItem($B9, $0001, $0000, $0000) ; B9 -
|
%InventoryItem($B9, $0001, $0000, $0000) ; B9 -
|
||||||
%InventoryItem($BA, $0001, $0000, $0000) ; BA -
|
%InventoryItem($BA, $0001, $0000, $0000) ; BA -
|
||||||
%InventoryItem($BB, $0001, $0000, $0000) ; BB -
|
%InventoryItem($BB, $0001, $0000, $0000) ; BB -
|
||||||
@@ -1139,7 +1139,7 @@ ItemReceiptGraphicsOffsets:
|
|||||||
dw BigDecompressionBuffer+$08A0 ; B5 - Crystal 4
|
dw BigDecompressionBuffer+$08A0 ; B5 - Crystal 4
|
||||||
dw BigDecompressionBuffer+$08A0 ; B6 - Crystal 3
|
dw BigDecompressionBuffer+$08A0 ; B6 - Crystal 3
|
||||||
dw $0 ; B7 - Reserved
|
dw $0 ; B7 - Reserved
|
||||||
dw $0 ; B8 -
|
dw $0CE0 ; B8 - Teleporter
|
||||||
dw $0 ; B9 -
|
dw $0 ; B9 -
|
||||||
dw $0 ; BA -
|
dw $0 ; BA -
|
||||||
dw $0 ; BB -
|
dw $0 ; BB -
|
||||||
@@ -1409,7 +1409,7 @@ StandingItemGraphicsOffsets:
|
|||||||
dw BigDecompressionBuffer+$08A0 ; B5 - Crystal 4
|
dw BigDecompressionBuffer+$08A0 ; B5 - Crystal 4
|
||||||
dw BigDecompressionBuffer+$08A0 ; B6 - Crystal 3
|
dw BigDecompressionBuffer+$08A0 ; B6 - Crystal 3
|
||||||
dw $0 ; B7 - Reserved
|
dw $0 ; B7 - Reserved
|
||||||
dw $0 ; B8 -
|
dw $0CE0 ; B8 - Teleporter
|
||||||
dw $0 ; B9 -
|
dw $0 ; B9 -
|
||||||
dw $0 ; BA -
|
dw $0 ; BA -
|
||||||
dw $0 ; BB -
|
dw $0 ; BB -
|
||||||
|
|||||||
34
newitems.asm
34
newitems.asm
@@ -442,22 +442,6 @@ ItemBehavior:
|
|||||||
|
|
||||||
.red_clock
|
.red_clock
|
||||||
REP #$20 ; set 16-bit accumulator
|
REP #$20 ; set 16-bit accumulator
|
||||||
LDA.l RewindRoomId
|
|
||||||
CMP.w #$FFFF
|
|
||||||
BEQ +
|
|
||||||
; restore
|
|
||||||
SEP #$20
|
|
||||||
LDA.b #$01
|
|
||||||
STA.l RewindTrigger
|
|
||||||
RTS
|
|
||||||
|
|
||||||
; save
|
|
||||||
+
|
|
||||||
JSL.l SaveRewind
|
|
||||||
SEP #$20
|
|
||||||
RTS
|
|
||||||
|
|
||||||
|
|
||||||
LDA.l ChallengeTimer : !ADD.l RedClockAmount : STA.l ChallengeTimer
|
LDA.l ChallengeTimer : !ADD.l RedClockAmount : STA.l ChallengeTimer
|
||||||
LDA.l ChallengeTimer+2 : ADC.l RedClockAmount+2 : STA.l ChallengeTimer+2
|
LDA.l ChallengeTimer+2 : ADC.l RedClockAmount+2 : STA.l ChallengeTimer+2
|
||||||
SEP #$20 ; set 8-bit accumulator
|
SEP #$20 ; set 8-bit accumulator
|
||||||
@@ -676,6 +660,23 @@ ItemBehavior:
|
|||||||
.done
|
.done
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
|
.teleporter
|
||||||
|
REP #$20 ; set 16-bit accumulator
|
||||||
|
LDA.l RewindRoomId
|
||||||
|
CMP.w #$FFFF
|
||||||
|
BEQ +
|
||||||
|
; restore
|
||||||
|
SEP #$20
|
||||||
|
LDA.b #$01
|
||||||
|
STA.l RewindTrigger
|
||||||
|
RTS
|
||||||
|
|
||||||
|
; save
|
||||||
|
+
|
||||||
|
JSL.l SaveRewind
|
||||||
|
SEP #$20
|
||||||
|
RTS
|
||||||
|
|
||||||
ResolveReceipt:
|
ResolveReceipt:
|
||||||
PHA : PHX
|
PHA : PHX
|
||||||
PHK : PLB
|
PHK : PLB
|
||||||
@@ -776,7 +777,6 @@ ResolveLootID:
|
|||||||
|
|
||||||
|
|
||||||
.gloves
|
.gloves
|
||||||
print ".gloves ", pc
|
|
||||||
SEP #$20
|
SEP #$20
|
||||||
LDA.l GloveEquipment : TAX
|
LDA.l GloveEquipment : TAX
|
||||||
LDA.w .gloves_ids,X
|
LDA.w .gloves_ids,X
|
||||||
|
|||||||
26
rewind.asm
26
rewind.asm
@@ -185,12 +185,12 @@ LoadRewind:
|
|||||||
LDA.w #$FFFF
|
LDA.w #$FFFF
|
||||||
STA.l RewindRoomId
|
STA.l RewindRoomId
|
||||||
|
|
||||||
PHB
|
; PHB
|
||||||
LDX.w #RewindSRAM
|
; LDX.w #RewindSRAM
|
||||||
LDY.w #SaveDataWRAM
|
; LDY.w #SaveDataWRAM
|
||||||
LDA.w #$4FF
|
; LDA.w #$4FF
|
||||||
MVN SaveDataWRAM>>16, RewindSRAM>>16
|
; MVN SaveDataWRAM>>16, RewindSRAM>>16
|
||||||
PLB
|
; PLB
|
||||||
PLP
|
PLP
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
@@ -287,12 +287,12 @@ SaveRewind:
|
|||||||
LDA.b $AA
|
LDA.b $AA
|
||||||
STA.l Rewind_AA
|
STA.l Rewind_AA
|
||||||
|
|
||||||
PHB
|
; PHB
|
||||||
REP #$30
|
; REP #$30
|
||||||
LDX #SaveDataWRAM
|
; LDX #SaveDataWRAM
|
||||||
LDY #RewindSRAM
|
; LDY #RewindSRAM
|
||||||
LDA #$4FF
|
; LDA #$4FF
|
||||||
MVN RewindSRAM>>16, SaveDataWRAM>>16
|
; MVN RewindSRAM>>16, SaveDataWRAM>>16
|
||||||
PLB
|
; PLB
|
||||||
PLP
|
PLP
|
||||||
RTL
|
RTL
|
||||||
|
|||||||
62
sram.asm
62
sram.asm
@@ -390,7 +390,32 @@ ExtendedFileNameWRAM: skip 24 ; File name, 12 word-length characters.
|
|||||||
RoomPotData: skip 592 ; Table for expanded pot shuffle. One word per room.
|
RoomPotData: skip 592 ; Table for expanded pot shuffle. One word per room.
|
||||||
SpritePotData: skip 592 ; Table for expanded pot shuffle. One word per room.
|
SpritePotData: skip 592 ; Table for expanded pot shuffle. One word per room.
|
||||||
PurchaseCounts: skip 96 ; Keeps track of shop purchases
|
PurchaseCounts: skip 96 ; Keeps track of shop purchases
|
||||||
PrivateBlockPersistent: skip 513 ; Reserved for 3rd party developers
|
|
||||||
|
PrivateBlockPersistent: ; Reserved for 3rd party developers
|
||||||
|
RewindTrigger: skip 1
|
||||||
|
RewindRoomId: skip 2
|
||||||
|
RewindDungeonEntrance: skip 2
|
||||||
|
RewindVerticalScroll: skip 2
|
||||||
|
RewindHorizontalScroll: skip 2
|
||||||
|
RewindYCoordinate: skip 2
|
||||||
|
RewindXCoordinate: skip 2
|
||||||
|
RewindCameraTriggerY: skip 2
|
||||||
|
RewindCameraTriggerX: skip 2
|
||||||
|
RewindOverworldDoorTilemap: skip 2
|
||||||
|
RewindCameraScrollBoundaries: skip 8
|
||||||
|
RewindLinkFacing: skip 1
|
||||||
|
RewindMainGFX: skip 1
|
||||||
|
RewindSong: skip 1
|
||||||
|
RewindFloor: skip 1
|
||||||
|
RewindDungeonId: skip 1
|
||||||
|
Rewind_6C: skip 1
|
||||||
|
Rewind_EE: skip 1
|
||||||
|
Rewind_0476: skip 1
|
||||||
|
Rewind_A6: skip 1
|
||||||
|
Rewind_A7: skip 1
|
||||||
|
Rewind_A9: skip 1
|
||||||
|
Rewind_AA: skip 1
|
||||||
|
skip 474
|
||||||
|
|
||||||
;================================================================================
|
;================================================================================
|
||||||
; Direct SRAM Assignments ($700000 - $7080000)
|
; Direct SRAM Assignments ($700000 - $7080000)
|
||||||
@@ -420,41 +445,16 @@ skip 283 ;
|
|||||||
InverseChecksumSRAM: skip 2 ;
|
InverseChecksumSRAM: skip 2 ;
|
||||||
ExtendedSaveDataSRAM: ;
|
ExtendedSaveDataSRAM: ;
|
||||||
ExtendedFileNameSRAM: skip 24 ; We read and write the file name directly from and to SRAM (24 bytes)
|
ExtendedFileNameSRAM: skip 24 ; We read and write the file name directly from and to SRAM (24 bytes)
|
||||||
skip $1AE4 ;
|
skip $500
|
||||||
|
RewindTriggerSRAM: skip 1
|
||||||
|
RewindRoomIdSRAM: skip 2
|
||||||
|
skip $15E1 ;
|
||||||
RomVersionSRAM: skip 4 ; ALTTPR ROM version. Low byte is the version, high byte writes
|
RomVersionSRAM: skip 4 ; ALTTPR ROM version. Low byte is the version, high byte writes
|
||||||
; $01 for now (32-bits total)
|
; $01 for now (32-bits total)
|
||||||
RomNameSRAM: skip 21 ; ROM name from $FFC0, burned in during init (21 bytes)
|
RomNameSRAM: skip 21 ; ROM name from $FFC0, burned in during init (21 bytes)
|
||||||
; If value in the ROM doesn't match SRAM, save is cleared.
|
; If value in the ROM doesn't match SRAM, save is cleared.
|
||||||
PasswordSRAM: skip 16 ; Password value (16 bytes)
|
PasswordSRAM: skip 16 ; Password value (16 bytes)
|
||||||
|
skip 8155 ;
|
||||||
|
|
||||||
RewindTrigger: skip 1
|
|
||||||
RewindDungeonEntrance: skip 2
|
|
||||||
RewindRoomId: skip 2
|
|
||||||
RewindVerticalScroll: skip 2
|
|
||||||
RewindHorizontalScroll: skip 2
|
|
||||||
RewindYCoordinate: skip 2
|
|
||||||
RewindXCoordinate: skip 2
|
|
||||||
RewindCameraTriggerY: skip 2
|
|
||||||
RewindCameraTriggerX: skip 2
|
|
||||||
RewindOverworldDoorTilemap: skip 2
|
|
||||||
RewindCameraScrollBoundaries: skip 8
|
|
||||||
RewindLinkFacing: skip 1
|
|
||||||
RewindMainGFX: skip 1
|
|
||||||
RewindSong: skip 1
|
|
||||||
RewindFloor: skip 1
|
|
||||||
RewindDungeonId: skip 1
|
|
||||||
Rewind_6C: skip 1
|
|
||||||
Rewind_EE: skip 1
|
|
||||||
Rewind_0476: skip 1
|
|
||||||
Rewind_A6: skip 1
|
|
||||||
Rewind_A7: skip 1
|
|
||||||
Rewind_A9: skip 1
|
|
||||||
Rewind_AA: skip 1
|
|
||||||
skip $B4
|
|
||||||
RewindSRAM: skip $1500
|
|
||||||
|
|
||||||
skip $A00 ;
|
|
||||||
SaveBackupSRAM: ; Backup copy of save ram. Game will attempt to use this if
|
SaveBackupSRAM: ; Backup copy of save ram. Game will attempt to use this if
|
||||||
; checksum on file select screen load fails.
|
; checksum on file select screen load fails.
|
||||||
base off
|
base off
|
||||||
|
|||||||
Reference in New Issue
Block a user