let's dev 6/6/17

freeroaming item text
swordless settings breakout
boss s&q for glitched
mantle updates
post-crystal s&q bug fixed
lw map locations fixed for map mode
This commit is contained in:
Karkat
2017-06-06 21:52:29 -04:00
parent 9e1ef274ce
commit 45aa5a3f33
11 changed files with 86 additions and 57 deletions

View File

@@ -26,7 +26,7 @@ org $3FFFFF ; <- 1FFFFF
db #$00 ; expand file to 2mb
org $1FFFF8 ; timestamp rom
dl #$20170527
dl #$20170606
;================================================================================

View File

@@ -44,43 +44,11 @@ RTL
; PLY : PLX : PLA
;endmacro
;--------------------------------------------------------------------------------
macro LoadDialogAddress(address)
PHA : PHX : PHY
PHP
PHB : PHK : PLB
SEP #$30 ; set 8-bit accumulator and index registers
LDA $00 : PHA
LDA $01 : PHA
LDA $02 : PHA
LDA.b #$01 : STA $7F5035 ; set flag
LDA.b #<address> : STA $00 ; write pointer to direct page
LDA.b #<address>>>8 : STA $01
LDA.b #<address>>>16 : STA $02
LDX.b #$00 : LDY.b #$00
-
LDA [$00], Y ; load the next character from the pointer
STA $7F5700, X ; write to the buffer
INX : INY
CMP.b #$7F : BNE -
PLA : STA $02
PLA : STA $01
PLA : STA $00
PLB
PLP
PLY : PLX : PLA
endmacro
;--------------------------------------------------------------------------------
!OFFSET_POINTER = "$7F5094"
!OFFSET_RETURN = "$7F5096"
!DIALOG_BUFFER = "$7F5700"
;macro LoadDialogAddress(address)
; PHA : PHX : PHY
; PHP
; PHB : PHK : PLB
; SEP #$20 ; set 8-bit accumulator
; REP #$10 ; set 16-bit index registers
; SEP #$30 ; set 8-bit accumulator and index registers
; LDA $00 : PHA
; LDA $01 : PHA
; LDA $02 : PHA
@@ -90,16 +58,12 @@ endmacro
; LDA.b #<address>>>8 : STA $01
; LDA.b #<address>>>16 : STA $02
;
; LDA !OFFSET_POINTER : TAX : LDY.w #$0000
; LDX.b #$00 : LDY.b #$00
; -
; LDA [$00], Y ; load the next character from the pointer
; STA !DIALOG_BUFFER, X ; write to the buffer
; STA $7F5700, X ; write to the buffer
; INX : INY
; CMP.b #$7F : BNE -
; REP #$20 ; set 16-bit accumulator
; TXA : STA !OFFSET_RETURN ; copy out X into
; LDA.w #$0000 : STA !OFFSET_POINTER
; SEP #$20 ; set 8-bit accumulator
; PLA : STA $02
; PLA : STA $01
; PLA : STA $00
@@ -108,10 +72,47 @@ endmacro
; PLY : PLX : PLA
;endmacro
;--------------------------------------------------------------------------------
!OFFSET_POINTER = "$7F5094"
!OFFSET_RETURN = "$7F5096"
!DIALOG_BUFFER = "$7F5700"
macro LoadDialogAddress(address)
PHA : PHX : PHY
PHP
PHB : PHK : PLB
SEP #$20 ; set 8-bit accumulator
REP #$10 ; set 16-bit index registers
LDA $00 : PHA
LDA $01 : PHA
LDA $02 : PHA
LDA.b #$01 : STA $7F5035 ; set flag
LDA.b #<address> : STA $00 ; write pointer to direct page
LDA.b #<address>>>8 : STA $01
LDA.b #<address>>>16 : STA $02
REP #$20 : LDA !OFFSET_POINTER : TAX : LDY.w #$0000 : SEP #$20 ; copy 2-byte offset pointer to X and set Y to 0
?loop:
LDA [$00], Y ; load the next character from the pointer
STA !DIALOG_BUFFER, X ; write to the buffer
INX : INY
CMP.b #$7F : BNE ?loop
REP #$20 ; set 16-bit accumulator
TXA : INC : STA !OFFSET_RETURN ; copy out X into
LDA.w #$0000 : STA !OFFSET_POINTER
SEP #$20 ; set 8-bit accumulator
PLA : STA $02
PLA : STA $01
PLA : STA $00
PLB
PLP
PLY : PLX : PLA
endmacro
;--------------------------------------------------------------------------------
FreeDungeonItemNotice:
PHX : PHA
LDA.l FreeItemTest : BNE + : BRL .skip : +
LDA.l FreeItemText : BNE + : BRL .skip : +
PLA : PHA
AND.b #$F0 ; looking at high bits only
CMP.b #$70 : BNE + ; map of...
%LoadDialogAddress(Notice_MapOf)
@@ -128,7 +129,7 @@ FreeDungeonItemNotice:
+
.dungeon
LDA !OFFSET_RETURN : STA !OFFSET_POINTER
LDA !OFFSET_RETURN : DEC #2 : STA !OFFSET_POINTER
PLA : PHA
AND.b #$0F ; looking at high bits only
CMP.b #$00 : BNE + ; ...light world

View File

@@ -44,10 +44,11 @@ OnNewFile:
LDA.l StartingTime+2 : STA $7EF454+2
SEP #$20 ; set 8-bit accumulator
;LDA #$FF : STA !RNG_ITEM_LOCK_IN ; reset rng item lock-in
LDA.l SwordlessMode : BEQ +
LDA.l PreopenCurtains : BEQ +
LDA.b #$80 : STA $7EF061 ; open aga tower curtain
LDA.b #$80 : STA $7EF093 ; open skull woods curtain
+
LDA StartingSword : STA $7EF359 ; set starting sword type
RTL
;--------------------------------------------------------------------------------
OnLinkDamaged:

View File

@@ -31,3 +31,11 @@ GetAgahnimLightning:
LDA.b #$00 ; Use Agahnim 1
RTL
;--------------------------------------------------------------------------------
AllowJoypadInput:
LDA PermitSQFromBosses : BEQ .fullCheck
LDA $0112 : ORA $02E4
RTL
.fullCheck
LDA $0112 : ORA $02E4 : ORA $0FFC
RTL
;--------------------------------------------------------------------------------

View File

@@ -818,6 +818,9 @@ org $1ED678 ; <- F5678 - sprite_agahnim.asm:587 (INC $0E30, X)
NOP #2
JSL.l GetAgahnimLightning
;--------------------------------------------------------------------------------
org $0287E0 ; <- 107E0 - Bnak02.asm:1507 (LDA $0112 : ORA $02E4 : ORA $0FFC : BEQ .allowJoypadInput)
JSL.l AllowJoypadInput : NOP #5
;--------------------------------------------------------------------------------
;================================================================================
; Half Magic Bat

View File

@@ -1,4 +1,4 @@
org $320000
org $328000
; You have found
; the map of
Notice_MapOf:

View File

@@ -23,8 +23,10 @@ RTL
; Output: 0 locked, 1 open
;--------------------------------------------------------------------------------
CheckForZelda:
LDA.l OpenMode : BEQ + ; Skip if not open mode
LDA.b #$01 ; open mode, pretend we have zelda anyway
;LDA.l OpenMode : BEQ + ; Skip if not open mode
;LDA $FFFFFF
LDA.l $7EF3C5 : CMP.b #$02 : !BLT + ; Skip if rain is falling
LDA.b #$01 ; pretend we have zelda anyway
RTL
+
LDA $7EF3CC

View File

@@ -6,6 +6,7 @@
; MaidenCrystalScript
;--------------------------------------------------------------------------------
MaidenCrystalScript:
LDA.b #$00 : STA $7F5091
STZ $02D8
STZ $02DA
STZ $2E

View File

@@ -31,6 +31,7 @@ RTL
!INVENTORY_MAP = "$7EF368"
OverworldMap_CheckObject:
PHX
;CPX.b #$01 : BNE + : BRL ++ : + : BRL .fail
LDA $7EF3CA : AND.b #$40 : BNE +
;LW Map
LDA.l MapMode : BEQ +++
@@ -83,11 +84,11 @@ db $02, $0A, $03, $FF
.dw_offsets
db $06, $08, $0C, $0B, $07, $09, $05
.lw_map_offsets
db $01, $01, $00
db $01, $00, $01
.dw_map_offsets
db $01, $01, $00, $00, $00, $01, $00
.lw_map_masks
db $20, $10, $20, $00
db $20, $20, $10, $00
.dw_map_masks
db $02, $04, $80, $10, $40, $01, $04
;================================================================================

View File

@@ -45,7 +45,7 @@ GetSmithSword:
CheckMedallionSword:
;LDA $FFFFFF
PHB : PHX : PHY
LDA.l SwordlessMode : BEQ +
LDA.l AllowSwordlessEntranceMedallion : BEQ +
LDA $8A : CMP.b #$70 : BNE ++
LDA.l MireRequiredMedallion : TAX : LDA.l .medallion_type, X : CMP $0303 : BNE +
LDA $7EF2F0 : AND.b #$20 : BNE +

View File

@@ -129,7 +129,7 @@ db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30803B ; PC 0x18003B
MapMode:
db #$00 ; #$00 = Always On (default) - #$01 = Require Map Item
db #$01 ; #$00 = Always On (default) - #$01 = Require Map Item
CompassMode:
db #$00 ; #$00 = Off (default) - #$01 = Display Dungeon Count
;--------------------------------------------------------------------------------
@@ -142,9 +142,25 @@ InvincibleGanon:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30803F ; PC 0x18003F
SwordlessMode:
HammerableGanon:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308040 ; PC 0x180040
PreopenCurtains:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308041 ; PC 0x180041
AllowSwordlessEntranceMedallion:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308041 ; PC 0x180041
PermitSQFromBosses:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308042 ; PC 0x180042
StartingSword:
db #$00 ; #$00 = No Sword (default) - #$FF = Non-Sword
;--------------------------------------------------------------------------------
org $308080 ; PC 0x180080
Upgrade5BombsRefill:
db #$00
@@ -165,10 +181,6 @@ org $308086 ; PC 0x180086
GanonAgahRNG:
db #$01 ; $00 = vanilla behavior, $01 = no extra blue balls/warps, $02 = use the random table
;--------------------------------------------------------------------------------
org $308040 ; PC 0x180040
UncleQuote:
db #$00 ; #$00 - #$1F
;--------------------------------------------------------------------------------
org $098B7C ; PC 0x48B7C
EtherTablet:
db #$10 ; #$10 = Ether
@@ -622,8 +634,8 @@ AgahnimDoorStyle:
db #$00 ; #00 = Never Locked - #$01 = Locked During Escape (default)
;================================================================================
org $30816A ; PC 0x18016A
FreeItemTest:
db #$00 ; #00 = Off - #$01 = On (default)
FreeItemText:
db #$01 ; #00 = Off - #$01 = On (default)
;================================================================================
org $308190 ; PC 0x180190
TimerStyle: