diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index bc99d6c..7f80e37 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -179,7 +179,7 @@ incsrc toast.asm incsrc fastcredits.asm incsrc msu.asm incsrc menu/overworldmap.asm ; Overwrites some code in bank $8A -incsrc dungeonmap.asm +incsrc bossicons.asm incsrc hextodec.asm incsrc multiworld.asm incsrc textrenderer.asm @@ -203,13 +203,22 @@ incsrc menu/hudalpha.asm warnpc $A38000 org $B98000 -incsrc crystalswitchbook.asm -incsrc mimicdash.asm -incsrc gloom.asm -incsrc special_weapons.asm -incsrc variable_ganon_vulnerability.asm -incsrc pseudoflute.asm -warnpc $BA8000 +incsrc gk/crystalswitchbook.asm +incsrc gk/mimicdash.asm +incsrc gk/gloom.asm +incsrc gk/special_weapons.asm +incsrc gk/variable_ganon_vulnerability.asm +incsrc gk/pseudoflute.asm +incsrc gk/fast_junk.asm +incsrc gk/dungeon_maps.asm +print "End of B9: ", pc + +warnpc $B9EE00 +org $B9EE00 +incsrc gk_meta.asm + +org $B9F000 +incsrc gk/settings.asm org $A38000 incsrc stats/credits.asm ; Statically mapped @@ -253,7 +262,7 @@ warnpc $B1A000 org $B1A000 GFX_HUD_Items: -incbin "menu/drsheetdc.2bppc" +incbin "menu/dr_sheet_dc.2bppc" warnpc $B1A800 org $B1A800 @@ -306,6 +315,24 @@ NewFontInverted: incbin "data/newfont_inverted.bin" SmallCharacters: incbin "data/smallchars.2bpp" + +DungeonMapIcons1: +incbin "menu/map_icons_1.3bppc" +DungeonMapIcons2: +incbin "menu/map_icons_2.3bppc" +DungeonMapIcons3: +incbin "menu/map_icons_3.3bppc" +DungeonMapIcons4: +incbin "menu/map_icons_4.3bppc" +DungeonMapIcons5: +incbin "menu/map_icons_5.3bppc" +DungeonMapIcons6: +incbin "menu/map_icons_6.3bppc" +DungeonMapDoorConnectors: +incbin "menu/door_connectors.3bppc" +MapSheetD4: +incbin "menu/map_sheet_d4.3bppc" + org $8CD7DF incsrc data/playernamecharmap.asm org $8CE73D diff --git a/dungeonmap.asm b/bossicons.asm similarity index 100% rename from dungeonmap.asm rename to bossicons.asm diff --git a/bugfixes.asm b/bugfixes.asm index 0ab5bbd..687351e 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -278,76 +278,3 @@ ParadoxCaveGfxFix: LDX.w #$00C0 : STX.w DAS0L BRA .uploadLine ;-------------------------------------------------------------------------------- -SetItemRiseTimer: - LDA.w ItemReceiptMethod : CMP.b #$01 : BNE .not_from_chest - LDA.b #$38 : STA.w AncillaTimer, X - RTL - - .not_from_chest - JSL.l ItemIsJunk - BEQ .default - - .junk - LDA.l JunkItemTimer : AND.b #$3F : STA.w AncillaTimer, X - RTL - - .default - TYA : STA.w AncillaTimer, X ; What we wrote over - RTL -;-------------------------------------------------------------------------------- -ItemIsJunk: - PHX - LDA.l JunkItemTimer : BIT.b #$3F : BEQ .not_junk - BIT.b #$80 : BNE .check - LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .check - LDA.l !MULTIWORLD_RECEIVING_ITEM : BNE .check - BRA .not_junk - -.check - LDA.l JunkItemTimer : AND.b #$40 - BEQ + - LDA.b #JunkItems_triforce_end-JunkItems_end - + - CLC : ADC.b #JunkItems_end-JunkItems-1 - LDA.w AncillaGet, X - TAX - - - CMP.l JunkItems, X : BEQ .junk - DEX : BPL - -.not_junk - PLX - LDA.b #$00 - RTL -.junk - PLX - LDA.b #$01 - RTL -RTL - -JunkItems: - db $27 ; Bomb - db $28 ; 3 bombs - db $31 ; 10 bombs - db $34 ; 1 rupee - db $35 ; 5 rupees - db $36 ; 20 rupees - db $40 ; 100 rupees - db $41 ; 50 rupees - db $42 ; Heart - db $43 ; Arrow - db $44 ; 10 arrows - db $45 ; Small magic - db $46 ; 300 rupees - db $47 ; 20 rupees green - db $59 ; Rupoor - db $D1 ; Apples - db $D2 ; Fairy - db $D3 ; Chicken - db $D4 ; Big Magic - db $D5 ; 5 Arrows - db $D6 ; Good Bee -.end - db $6B ; Power Star - db $6C ; Triforce Piece -.triforce_end -;-------------------------------------------------------------------------------- diff --git a/doorrando/hudadditions.asm b/doorrando/hudadditions.asm index 1c0bc1f..bc5638e 100644 --- a/doorrando/hudadditions.asm +++ b/doorrando/hudadditions.asm @@ -45,10 +45,10 @@ DRHUD_BossIndicator: LDA.w CompassField : AND.l DungeonMask, x SEP #$20 BEQ .draw_indicator - LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator - LDY.w #!RedSquare + LDA.l CompassBossIndicator, x : CMP.b RoomIndex : BNE .draw_indicator + LDY.w #!RedSquare .draw_indicator - STY.w HUDMultiIndicator + STY.w HUDMultiIndicator BRA DRHUD_DrawCurrentDungeonIndicator DRHUD_EnemyDropIndicator: @@ -59,12 +59,20 @@ DRHUD_EnemyDropIndicator: SEP #$10 : TAX : REP #$10 DRHUD_DrawCurrentDungeonIndicator: ; mX - LDA.l DRMode : BIT.b #$02 : BEQ DRHUD_Finished - LDY.w #!BlankTile - LDA.w CurrentHealth : BEQ .draw_indicator + LDA.l DRMode : BIT.b #$02 : BNE + : JMP DRHUD_Finished : + + LDY.w #!BlankTile + LDA.w CurrentHealth : BEQ .draw_indicator - REP #$20 : LDA.l DungeonReminderTable,X : TAY - SEP #$20 + LDA.b GameMode + CMP.b #$0E : BNE .get_indicator + LDA.b GameSubMode + CMP.b #$03 : BNE .get_indicator + LDA.w SubModuleInterface + CMP.b #$06 : BEQ .draw_indicator + +.get_indicator + REP #$20 : LDA.l DungeonReminderTable,X : TAY + SEP #$20 .draw_indicator STY.w HUDCurrentDungeonWorld @@ -117,101 +125,102 @@ dw $0000, $0000, $0000, $0000, $000a, $000a, $000a, $0014, $000a, $0014, $0000, DrHudDungeonItemsAdditions: { - jsl DrawHUDDungeonItems - lda.l DRMode : cmp.b #$02 : beq + : rtl : + + jsl DrawHUDDungeonItems + lda.l DRMode : cmp.b #$02 : beq + : rtl : + - phx : phy : php - rep #$30 + phx : phy : php + rep #$30 - lda.w #$24f5 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624 - sta.w $1644 : sta.w $164a : sta.w $1652 : sta.w $1662 : sta.w $1684 : sta.w $16c4 - ldx.w #$0000 - - sta.w $1704, x : sta.w $170e, x : sta.w $1718, x - inx #2 : cpx.w #$0008 : !BLT - + lda.w #$24f5 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624 + sta.w $1644 : sta.w $164a : sta.w $1652 : sta.w $1662 : sta.w $1684 : sta.w $16c4 + ldx.w #$0000 + - sta.w $1704, x : sta.w $170e, x : sta.w $1718, x + inx #2 : cpx.w #$0008 : !BLT - - lda.l HudFlag : and.w #$0020 : beq + : JMP ++ : + - lda.l HUDDungeonItems : and.w #$0007 : bne + : JMP ++ : + - ; bk symbols + lda.l HudFlag : and.w #$0020 : beq + : JMP ++ : + + lda.l HUDDungeonItems : and.w #$001F : bne + : JMP ++ : + + ; bk symbols lda.w #$2811 : sta.w $1606 : sta.w $1610 : sta.w $161a : sta.w $1624 ; sm symbols lda.w #$2810 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4 - ; blank out stuff - lda.w #$24f5 : sta.w $1724 + ; blank out stuff + lda.w #$24f5 : sta.w $1724 - ldx.w #$0002 - - lda.w #$0000 : !ADD.l RowOffsets,x : !ADD.l ColumnOffsets, x : tay - lda.l DungeonReminderTable, x : sta.w $1644, y : iny #2 - lda.w #$24f5 : sta.w $1644, y - lda.l MapField : and.l DungeonMask, x : beq + ; must have map - jsr BkStatus : sta.w $1644, y : bra .smallKey ; big key status - + lda.l BigKeyField : and.l DungeonMask, x : beq .smallKey - lda.w #$2826 : sta.w $1644, y - .smallKey - + iny #2 + ldx.w #$0002 + - lda.w #$0000 : !ADD.l RowOffsets,x : !ADD.l ColumnOffsets, x : tay + JSR BossStatus : STA.w $1644, Y + INY #2 + lda.w #$24f5 : sta.w $1644, y + lda.l MapField : and.l DungeonMask, x : beq + ; must have map + jsr BkStatus : sta.w $1644, y : bra .smallKey ; big key status + + lda.l BigKeyField : and.l DungeonMask, x : beq .smallKey + lda.w #$2826 : sta.w $1644, y + .smallKey + + iny #2 cpx.w #$001a : bne + tya : !ADD.w #$003c : tay - + stx.b Scrap00 - txa : lsr : tax - lda.w #$24f5 : sta.w $1644, y - lda.l GenericKeys : and.w #$00FF : bne + - lda.l DungeonKeys, x : and.w #$00FF : beq + - jsr ConvertToDisplay2 : sta.w $1644, y - + iny #2 : lda.w #$24f5 : sta.w $1644, y - phx : ldx.b Scrap00 + + stx.b Scrap00 + txa : lsr : tax + lda.w #$24f5 : sta.w $1644, y + lda.l GenericKeys : and.w #$00FF : bne + + lda.l DungeonKeys, x : and.w #$00FF : beq + + jsr ConvertToDisplay2 : sta.w $1644, y + + iny #2 : lda.w #$24f5 : sta.w $1644, y + phx : ldx.b Scrap00 LDA.l CompassMode : BIT.w #$0002 : BNE .skip_map_check LDA.l MapField : AND.l DungeonMask, x : BEQ .key_info_done ; must have map .skip_map_check plx : sep #$30 : lda.l ChestKeys, x : sta.b Scrap02 - lda.l GenericKeys : bne +++ - lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02 - +++ lda.b Scrap02 - rep #$30 - jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals - bra .skipStack + lda.l GenericKeys : bne +++ + lda.b Scrap02 : !SUB.l DungeonCollectedKeys, x : sta.b Scrap02 + +++ lda.b Scrap02 + rep #$30 + jsr ConvertToDisplay2 : sta.w $1644, y ; small key totals + bra .skipStack .key_info_done - plx - .skipStack iny #2 - cpx.w #$000d : beq + - lda.w #$24f5 : sta.w $1644, y - + - ldx.b Scrap00 - + inx #2 : cpx.w #$001b : bcs ++ : JMP - - ++ - lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : + - ; map symbols - lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a - ; compass symbols - lda.w #$2c20 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4 - ; blank out a couple thing from old hud - lda.w #$24f5 : sta.w $1624 : sta.w $1724 - ldx.w #$0002 - - lda.w #$0000 ; start of hud area - !ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay - lda.l DungeonReminderTable, x : sta.w $1644, y - iny #2 - lda.w #$24f5 : sta.w $1644, y ; blank out map spot - lda.l MapField : ora.l MapCountDisplay : ora.l MapOverlay - and.l DungeonMask, x : beq + ; must have map - JSR MapIndicatorShort : STA.w $1644, Y + plx + .skipStack iny #2 + cpx.w #$000d : beq + + lda.w #$24f5 : sta.w $1644, y + + + ldx.b Scrap00 + + inx #2 : cpx.w #$001b : bcs ++ : JMP - + ++ + lda.l HudFlag : and.w #$0020 : bne + : JMP ++ : + + ; map symbols + lda.w #$2821 : sta.w $1606 : sta.w $1610 : sta.w $161a + ; compass symbols + lda.w #$2c20 : sta.w $160a : sta.w $1614 : sta.w $161e : sta.w $16e4 + ; blank out a couple thing from old hud + lda.w #$24f5 : sta.w $1624 : sta.w $1724 + ldx.w #$0002 + - lda.w #$0000 ; start of hud area + !ADD.l RowOffsets, x : !ADD.l ColumnOffsets, x : tay + JSR BossStatus : STA.w $1644, Y + INY #2 + lda.w #$24f5 : sta.w $1644, y ; blank out map spot + lda.l MapField : ora.l MapCountDisplay : ora.l MapOverlay + and.l DungeonMask, x : beq + ; must have map + JSR MapIndicatorShort : STA.w $1644, Y + iny #2 - cpx.w #$001a : bne + + cpx.w #$001a : bne + tya : !ADD.w #$003c : tay + lda.l CompassField : ora.l CompassCountDisplay and.l DungeonMask, x : beq + ; must have compass - phx ; total chest counts - LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x - SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30 - lda.b Scrap06 : jsr ConvertToDisplay2 : sta.w $1644, y : iny #2 - lda.b Scrap07 : jsr ConvertToDisplay2 : sta.w $1644, y - plx - bra .skipBlanks + phx ; total chest counts + LDA.l CompassTotalsWRAM, x : !SUB.l DungeonLocationsChecked, x + SEP #$30 : JSR HudHexToDec2DigitCopy : REP #$30 + lda.b Scrap06 : jsr ConvertToDisplay2 : sta.w $1644, y : iny #2 + lda.b Scrap07 : jsr ConvertToDisplay2 : sta.w $1644, y + plx + bra .skipBlanks + lda.w #$24f5 : sta.w $1644, y : iny #2 : sta.w $1644, y - .skipBlanks iny #2 - cpx.w #$001a : beq + + .skipBlanks iny #2 + cpx.w #$001a : beq + lda.w #$24f5 : sta.w $1644, y ; blank out spot - + inx #2 : cpx.w #$001b : !BGE ++ : JMP - - ++ - plp : ply : plx : rtl + + inx #2 : cpx.w #$001b : !BGE ++ : JMP - + ++ + plp : ply : plx : rtl } MapIndicatorLong: @@ -251,6 +260,40 @@ BkStatus: + lda.w #$24f5 : rts ; black otherwise +++ lda.w #$2826 : rts ; check mark +BossStatus: + LDA.l HUDDungeonItems : BIT.w #$0010 : BEQ .normal + PHX + LDA.l DungeonMapBossRooms, X + CMP.w #$000F + BEQ .no_boss + ASL A + TAX + LDA.l SaveDataWRAM, X + PLX + BIT.w #$0800 + BEQ .boss_alive + +.boss_dead + LDA.l HudFlag : BIT.w #$0020 : BNE .skull + ; palette 3 - white + LDA.l DungeonReminderTable, X : AND.w #$E3FF : ORA.w #$0C00 : RTS + +.skull + LDA.w #$280F : RTS + +.no_boss + PLX + ; palette 0 - light gray + LDA.l DungeonReminderTable, X : AND.w #$E3FF : RTS + +.boss_alive + ; palette 4 - gray + LDA.l DungeonReminderTable, X : AND.w #$E3FF : ORA.w #$1000 : RTS + +.normal + ; default palette 3 - white + LDA.l DungeonReminderTable, X : RTS + ConvertToDisplay: and.w #$00ff : cmp.w #$000a : !BLT + !ADD.w #$2519 : rts diff --git a/enemizer/underworld_sprites.asm b/enemizer/underworld_sprites.asm index cb80068..87f0e6f 100644 --- a/enemizer/underworld_sprites.asm +++ b/enemizer/underworld_sprites.asm @@ -1,10 +1,6 @@ LoadUnderworldSprites: STA.b Scrap00 ; part one of what we replaced - if !FEATURE_FIX_BASEROM - LDA.w #$89 - else - LDA.w #UWSpritesData>>16 ; set the bank to 28 for now - endif + LDA.w #UWSpritesData>>16 ; set the bank to 28 for now STA.b Scrap02 LDA.w $048E RTL diff --git a/gk/blink_loot.asm b/gk/blink_loot.asm new file mode 100644 index 0000000..da4f8dd --- /dev/null +++ b/gk/blink_loot.asm @@ -0,0 +1,108 @@ +; we want the icons indicating what is left in a room to blink +; but we don't want to redraw to BG1 every few frames +; so we duplicate the left side of BG1 to a lower portion and just toggle vertical scroll + +BlinkLoot: + ; do not show icons if we're scrolling + LDA.w $0210 + BNE .hide + + LDA.b FrameCounter + AND.b #$20 + BEQ .show +.hide + LDA.b #$01 +.show + STZ.b $E6 + STA.w $E7 + JSL $8AE96B + RTL + +StartDoubleWrite: + ; what we wrote over + LDA.l DRMode + BEQ .draw + + INC.w $020D ; next subsubmode + PLA : PLA : PLA ; pull our jump to here off the stack + PLB + RTL + +.draw + REP #$30 + STZ.w GFXStripes + + STZ.w $021B + RTL + +CheckDoubleWrite: + LDA.w $021C + BNE .done + + LDA.b #$08 + STA.w $021C + REP #$30 + JML $8AE20B + +.done + ; what we wrote over + REP #$10 + LDY.w GFXStripes + LDA.b #$FF + JML $8AE2E7 + +DrawMountain: + LDX.w GFXStripes + PHX + LDY.w #$0000 +.next_word + LDA.w $8AEFEF, Y + STA.w GFXStripes+2, X + INX : INX + INY : INY + CPY.w #$002A + BCC .next_word + + PLY + LDA.w $021B + BEQ .done + + ; if second copy of mountain, adjust VRAM addresses + SEP #$20 + LDA.w GFXStripes+$02, Y + ORA.w $021C + STA.w GFXStripes+$02, Y + + LDA.w GFXStripes+$08, Y + ORA.w $021C + STA.w GFXStripes+$08, Y + + LDA.w GFXStripes+$10, Y + ORA.w $021C + STA.w GFXStripes+$10, Y + + LDA.w GFXStripes+$20, Y + ORA.w $021C + STA.w GFXStripes+$20, Y + + LDA.w GFXStripes+$26, Y + ORA.w $021C + STA.w GFXStripes+$26, Y + REP #$20 + +.done + RTL + +WriteBigEndianAddressX: + ORA.w $021B + XBA + STA.w GFXStripes+2, X + AND.w #$FFF7 + RTL + +WriteBigEndianAddressY: + ORA.w $021B + XBA + STA.w GFXStripes+2, Y + AND.w #$FFF7 + RTL diff --git a/gk/check_loot.asm b/gk/check_loot.asm new file mode 100644 index 0000000..9fd599b --- /dev/null +++ b/gk/check_loot.asm @@ -0,0 +1,645 @@ +; A = room_id +; out A = level of loot +CheckLoot: + PHP + REP #$30 + PHB : PHX : PHY + + STA.b $CA + + LDA.b $06 : PHA + LDA.b $0E : PHA + + STZ.b $02 ; best item class found + + LDA.l ShowItems_default + AND.w #$00FF + STA.b $0E + + LDA.b $CA + AND.w #$00FF + ASL A + TAX + + LDA.l SaveDataWRAM, X + AND.w #$000F + BEQ + + LDA.l ShowItems_visited_tile + AND.w #$00FF + CMP.b $0E + BCC + + STA.b $0E + ++ LDA.w DungeonID + TAX + + LDA.l MapField + AND.l DungeonMask, X + BEQ + + LDA.l ShowItems_have_map + AND.w #$00FF + CMP.b $0E + BCC + + STA.b $0E + ++ LDA.l CompassField + AND.l DungeonMask, X + BEQ + + LDA.l ShowItems_have_compass + AND.w #$00FF + CMP.b $0E + BCC + + STA.b $0E ++ + + LDA.l ItemSources : BIT.w #$0001 : BEQ + + JSR CheckChests ++ + + LDA.l ItemSources : BIT.w #$0002 : BEQ + + JSR CheckPots ++ + + LDA.l ItemSources : BIT.w #$0004 : BEQ + + JSR CheckEnemies ++ + + LDA.l ItemSources : BIT.w #$0008 : BEQ + + JSR CheckBoss ++ + + LDA.l ItemSources : BIT.w #$0010 : BEQ + + JSR CheckPrize ++ + +.done + PLA : STA.b $0E + PLA : STA.b $06 + PLY : PLX : PLB + PLP + LDA.b $02 + RTL + +CheckChests: + LDA.b $CA + AND.w #$00FF + STA.b $00 + ASL A + TAX + + LDA.w #($81<<8) + PHA + PLB : PLB + + LDA.w #$0008 + STA.b $04 + STZ.b $06 + + LDY.w #$FFFD +.increment_mask + LDA.b $04 + ASL A + STA.b $04 +.next_chest + INY #3 + CPY.w #$01F8 + BCS .done + + LDA.w RoomData_ChestItems, Y + AND.w #$7FFF + CMP.b $00 + BNE .next_chest + + LDA.b $06 + JSR CheckChestSection + INC.b $06 + BCC .increment_mask + + LDA.l SaveDataWRAM, X + AND.b $04 + BNE .increment_mask ; already got item + + LDA.w RoomData_ChestItems+2, Y + AND.w #$00FF + JSR GetLootClass + BRA .increment_mask + +.done + RTS + +CheckBoss: + ; we assume all bosses are in section 1 of split sections + ; mainly to simplify hera cage key and GT torch + ; which use the same flow + ; and bosses are always in their own section anyway + LDA.b $CA + AND.w #$F000 + XBA + CMP.w #$0020 + BCC + + RTS + ++ + LDA.b $CA + AND.w #$00FF + STA.b $04 + + LDX.w #$FFFA +.next_boss + INX #6 + LDA.l MiscLocations, X + BPL .check + RTS + +.check + CMP.b $04 + BNE .next_boss + + TXY + CMP.b RoomIndex + BEQ .current_room + + ASL A + TAX + LDA.l SaveDataWRAM, X + BRA .continue + +.current_room + LDA.w RoomItemsTaken ; if checking our current room, $0403 has fresher flags + ASL #4 + +.continue + STA.b $04 + + TYX + LDA.l MiscLocations+2, X ; get bit of room data to check + AND.w #$00FF + ASL A + TAX + LDA.l DungeonMask, X + + TYX + BIT.b $04 + BNE .next_boss ; continue checking if we already got the item + + LDA.l MiscLocations+4, X + STA.b $05 + + LDA.l MiscLocations+3, X + STA.b $04 + + LDA.b [$04] + AND.w #$00FF + JSR GetLootClass + + BRA .next_boss + +CheckPrize: + LDA.b $CA + AND.w #$00FF + STA.b $04 + + LDX.w #$FFFD +.next_prize + INX #3 + LDA.l PrizeLocations, X + BPL .check + RTS + +.check + CMP.b $04 + BNE .next_prize + + TXY + + ASL A + TAX + LDA.l SaveDataWRAM, X + TYX + BIT.w #$0800 + BNE .next_prize + + LDA.l PrizeLocations+2, X ; get which prize to look at + AND.w #$00FF + TAX + LDA.l DungeonPrizeReceiptID, X + TYX + + AND.w #$00FF + JSR GetLootClass + + BRA .next_prize + +CheckPots: + LDA.b $CA + AND.w #$00FF + ASL A + TAX + + LDA.l UWPotsPointers, X + STA.b $04 + LDA.w #bank(UWPotsData) + STA.b $06 + + LDY.w #$0000 + LDX.w #$FFFF +.next_pot + LDA.b [$04], Y + CMP.w #$FFFF : BEQ .done + INX : INY : INY + BIT.w #$4000 : BNE .multi_item ; marked as multi item + BIT.w #$8000 : BNE .major_item ; marked as major item + LDA.b [$04], Y + AND.w #$00FF + CMP.w #$0008 : BEQ .small_key + LDA.l PotCountMode + BEQ + + JSR CheckJunkPot + + + INY + BRA .next_pot + +.small_key + LDA.w #$8000 : STA.b $08 + LDA.w #$0024 + PHA + PHX + INY + BRA .mask_set + +.multi_item + LDA.b [$04], Y + PHX + AND.w #$00FF + ASL A + TAX + LDA.l PotMultiWorldTable, X + PLX + BRA .item_id_set + +.major_item + LDA.b [$04], Y +.item_id_set + PHA + PHX + INY + TXA : ASL A + TAX + LDA.l DungeonMask, X : STA.b $08 + TXA : LSR A : TAX + +.mask_set + TXA + JSR CheckPotSection + BCS + + PLX + PLA + BRA .next_pot ++ + + LDA.b $CA + AND.w #$00FF + ASL A + TAX +if !FEATURE_FIX_BASEROM + LDA.l SpriteDropData, X +else + LDA.l RoomPotData, X +endif + PLX + AND.b $08 + BEQ .not_obtained + PLA + BRA .next_pot + +.not_obtained + PLA + AND.w #$00FF + JSR GetLootClass + BRA .next_pot + +.done + RTS + +CheckJunkPot: + LDA.b [$04], Y + PHA + PHX + TXA : ASL A : TAX + LDA.l DungeonMask, X : STA.b $08 + TXA : LSR A + JSR CheckPotSection + BCS + + PLX + PLA + RTS + + + + LDA.b $CA + AND.w #$00FF + ASL A + TAX + LDA.l PotCollectionRateTable, X + AND.b $08 + BEQ .not_important + +if !FEATURE_FIX_BASEROM + LDA.l SpriteDropData, X +else + LDA.l RoomPotData, X +endif + AND.b $08 + BNE .not_important + + PLX + PLA + AND.w #$00FF + JSR GetPotJunkClass + RTS + +.not_important + PLX + PLA + RTS + +CheckEnemies: + LDA.b $CA + AND.w #$00FF + ASL A + TAX + + LDA.l UWSpritesPointers, X + INC A ; skip the layered/unlayered indicator + STA.b $04 + LDA.w #bank(UWSpritesData) + STA.b $06 + + LDY.w #$0000 + LDX.w #$FFFF +.next_enemy + LDA.b [$04], Y + AND.w #$00FF + CMP.w #$00FF + BNE + + JMP .done + + + LDA.b [$04], Y + AND.w #$E000 + CMP.w #$E000 + BEQ .overlord + INY : INY + LDA.b [$04], Y + AND.w #$00FF + CMP.w #$00F8 : BEQ .major ; major item + CMP.w #$00F9 : BEQ .major ; major item in other world + CMP.w #$00E4 : BEQ .vanilla_key + INY + INX + BRA .next_enemy + +.overlord + INY : INY : INY + BRA .next_enemy + +.vanilla_key + DEY : DEY + LDA.w #$8000 : STA.b $08 + LDA.b [$04], Y + INY #3 + AND.w #$00FF + CMP.w #$00FD ; big key + BEQ .big_key + CMP.w #$00FE ; small key + BEQ .small_key + ; false alarm -- probably hera basement key + INX ; since it's an actual sprite it advances the counter + BRA .next_enemy +.small_key + LDA.w #$0024 + PHA : PHX + BRA .mask_set +.big_key + LDA.w #$0032 + PHA : PHX + BRA .mask_set + +.major + DEY : DEY + LDA.b [$04], Y + AND.w #$00FF + +.proceed + INY : INY : INY + + PHA + PHX + TXA : ASL A + TAX + LDA.l DungeonMask, X : STA.b $08 + TXA : LSR A : TAX + +.mask_set + TXA + JSR CheckEnemySection + BCS + + PLX + PLA + JMP .next_enemy ++ + + LDA.b $CA + AND.w #$00FF + ASL A + TAX + + LDA.l SpriteDropData, X + PLX + AND.b $08 + BEQ .not_obtained + PLA + JMP .next_enemy + +.not_obtained + PLA + AND.w #$00FF + JSR GetLootClass + JMP .next_enemy + +.done + RTS + +; A = item id +; updates "best loot" value if better +GetLootClass: + PHX + TAX + CMP.w #$0025 : BEQ .compass + AND.w #$00F0 + CMP.w #$0080 : BNE .not_compass + +.compass + LDA.l AlwaysShowCompass : BNE .check_value + +.not_compass + LDA.b $0E + BEQ .done + CMP.w #$0001 + BEQ .value_set + +.check_value + LDA.l LootTypeMapping, X + AND.w #$00FF + +.value_set + CMP.b $02 + BCC .done + STA.b $02 + +.done + PLX + RTS + +; A = item id +; updates "best loot" value if better +GetPotJunkClass: + PHX + TAX + + LDA.b $0E + BEQ .done + CMP.w #$0001 + BEQ .value_set + + ; hardcode as junk for now + LDA.w #$0002 + +.value_set + CMP.b $02 + BCC .done + STA.b $02 + +.done + PLX + RTS + +macro DefineGetFooSection(type, offset) +GetSection: + PHX + LDA.b $CA + AND.w #$00FF + ASL A + TAX + LDA.l SplitRooms, X + TAX + + LDA.l SplitRooms, X + AND.w #$00FF + STA.b $CE + BEQ .found + + INX +.check_next_section + PHX + LDA.l SplitRooms+, X + TAX +- + LDA.l SplitRooms, X + AND.w #$00FF + CMP.w #$00FF + BEQ .not_this_section + CMP.b $CC + BEQ .plx_found + + INX + BRA - + +.not_this_section + PLX + TXA : CLC : ADC.w #$000D : TAX + DEC.b $CE + BNE .check_next_section + BRA .found + +.plx_found + PLX + +.found + PLX + LDA.b $CE + RTS +endmacro + +macro DefineCheckFooSection(type) +CheckSection: + STA.b $CC + + LDA.b $CB + AND.w #$00FF + BEQ .yes + + JSR GetSection + + LDA.b $CB + AND.w #$00FF + LSR A : LSR A : LSR A : LSR A + DEC A + CMP.b $CE + BEQ .yes + +.no + CLC + RTS + +.yes + SEC + RTS +endmacro + +%DefineGetFooSection(Door, 3) +%DefineGetFooSection(Stair, 5) +%DefineGetFooSection(Chest, 7) +%DefineGetFooSection(Pot, 9) +%DefineGetFooSection(Enemy, 11) + +%DefineCheckFooSection(Door) +%DefineCheckFooSection(Stair) +%DefineCheckFooSection(Chest) +%DefineCheckFooSection(Pot) +%DefineCheckFooSection(Enemy) + +GetIncomingStairSection: + PHX + AND.w #$0300 + XBA + ASL A + TAX + LDA.l $8098D8, X + STA.b $CC + + LDA.b $CA + AND.w #$00FF + ASL A + TAX + LDA.l SplitRooms, X + TAX + + LDA.l SplitRooms, X + AND.w #$00FF + STA.b $CE + BEQ .found + + INX +.check_next_section + LDA.l SplitRooms+0, X + AND.w #$00FF + AND.b $CC + BNE .found + TXA : CLC : ADC.w #$000D : TAX + DEC.b $CE + BNE .check_next_section + BRA .found + +.found + PLX + LDA.b $CE + RTS diff --git a/crystalswitchbook.asm b/gk/crystalswitchbook.asm similarity index 100% rename from crystalswitchbook.asm rename to gk/crystalswitchbook.asm diff --git a/gk/data/doors_connections.asm b/gk/data/doors_connections.asm new file mode 100644 index 0000000..95c0320 --- /dev/null +++ b/gk/data/doors_connections.asm @@ -0,0 +1,43 @@ +DoorConnectionTiles: +.vertical + dw $0000, $0000 ; $00 + dw $01C0, $0000 ; $01 left -> left + dw $01D0, $01D1 ; $02 left -> middle + dw $81C3, $41C3 ; $03 left -> right + dw $81D0, $81D1 ; $04 middle -> left + dw $01C1, $41C1 ; $05 middle -> middle + dw $C1D1, $C1D0 ; $06 middle -> right + dw $01C3, $C1C3 ; $07 right -> left + dw $41D1, $41D0 ; $08 right -> middle + dw $0000, $01C0 ; $09 right -> right + dw $41C2, $41C1 ; $0A left-middle -> left-middle + dw $81D2, $C1D0 ; $0B left-middle -> left-right + dw $41D3, $81D3 ; $0C left-middle -> middle-right + dw $01D2, $41D0 ; $0D left-right -> left-middle + dw $01C0, $01C0 ; $0E left-right -> left-right + dw $01D0, $41D2 ; $0F left-right -> middle-right + dw $C1D3, $01D3 ; $10 middle-right -> left-middle + dw $81D0, $C1D2 ; $11 middle-right -> left-right + dw $01C1, $01C2 ; $12 middle-right -> middle-right + dw $41C2, $01C2 ; $13 triple -> triple +.horizontal + dw $0300, $0300 ; $00 + dw $01C4, $0300 ; $01 top -> top + dw $C1D4, $C1D5 ; $02 top -> middle + dw $81C7, $41C7 ; $03 top -> bottom + dw $81D4, $81D5 ; $04 middle -> top + dw $01C5, $81C5 ; $05 middle -> middle + dw $01D5, $01D4 ; $06 middle -> bottom + dw $C1C7, $01C7 ; $07 bottom -> top + dw $41D5, $41D4 ; $08 bottom -> middle + dw $0300, $01C4 ; $09 bottom -> bottom + dw $41C6, $41C5 ; $0A top-middle -> top-middle + dw $41D6, $01D4 ; $0B top-middle -> top-bottom + dw $41D7, $81D7 ; $0C top-middle -> middle-bottom + dw $01D6, $41D4 ; $0D top-bottom -> top-middle + dw $01C4, $01C4 ; $0E top-bottom -> top-bottom + dw $C1D4, $81D6 ; $0F top-bottom -> middle-bottom + dw $C1D7, $01D7 ; $10 middle-bottom -> top-middle + dw $81D4, $C1D6 ; $11 middle-bottom -> top-bottom + dw $01C5, $01C6 ; $12 middle-bottom -> middle-bottom + dw $81C6, $01C6 ; $13 triple -> triple diff --git a/gk/data/doors_display.asm b/gk/data/doors_display.asm new file mode 100644 index 0000000..14e219b --- /dev/null +++ b/gk/data/doors_display.asm @@ -0,0 +1,309 @@ +DoorSlotsSprites: +; center + dw $48A8 +; north + dw $2090, $20A8, $20C0 + dw $2098, $20B8 +; west + dw $3080, $4880, $6080 + dw $3880, $5880 +; south + dw $7090, $70A8, $70C0 + dw $7098, $70B8 +; east + dw $30D0, $48D0, $60D0 + dw $38D0, $58D0 +; stairs + dw $B080, $B098, $B0B0 +; drop/warp + dw $B0D0 + +DoorSlotsBG1: +; center + dw $1135 +; north + dw $1092, $1095, $1098 + dw $1093, $1097 +; west + dw $10D0, $1130, $1190 + dw $10F0, $1170 +; south + dw $11D2, $11D5, $11D8 + dw $11D3, $11D7 +; east + dw $10DA, $113A, $119A + dw $10FA, $117A +; stairs + dw $12D0, $12D3, $12D6 +; drop/warp + dw $12DA + +DoorSlotsBG2: +; center + dw $0000 +; north + dw $FEBA, $FEC0, $FEC6 + dw $FEBC, $FEC4 +; west + dw $FF36, $FFF6, $00B6 + dw $FF76, $0076 +; south + dw $013A, $0140, $0146 + dw $013C, $0144 +; east + dw $FF4A, $000A, $00CA + dw $FF8A, $008A +; stairs + dw $0336, $033C, $0342 +; drop/warp + dw $034A + +DoorSlotSides: + db $02, $0C, $16, $20 + +DoorSlotOffsets: + db $02, $02, $06, $00 + +; up, left, down, right +NextCursorSlot: + db $80, $81, $82, $83 +; top + db $FF, $C1, $00, $04 + db $FF, $04, $00, $05 + db $FF, $05, $00, $C3 + db $FF, $01, $00, $02 + db $FF, $02, $00, $03 +; left + db $C0, $FF, $09, $00 + db $09, $FF, $0A, $00 + db $0A, $FF, $C2, $00 + db $06, $FF, $07, $00 + db $07, $FF, $08, $00 +; bottom + db $00, $E1, $85, $0E + db $00, $0E, $85, $0F + db $00, $0F, $85, $E3 + db $00, $0B, $85, $0C + db $00, $0C, $85, $0D +; right + db $E0, $00, $13, $FF + db $13, $00, $14, $FF + db $14, $00, $E2, $FF + db $10, $00, $11, $FF + db $11, $00, $12, $FF +; stairs + db $84, $18, $FF, $16 + db $84, $15, $FF, $17 + db $84, $16, $FF, $18 +; drop/warp + db $84, $17, $FF, $15 + +NextCursorSpecial: +.center + db $02, $04, $05, $01, $03, $FF + db $07, $09, $0A, $06, $08, $FF + db $0C, $0E, $0F, $0B, $0D, $15, $16, $17, $18, $FF + db $11, $13, $14, $10, $12, $FF + db $0C, $0E, $0F, $0B, $0D, $00, $FF + db $17, $16, $15, $18, $FF +.center_offset + db $00, $06, $0C, $16, $1C, $23 +.start_index + db $01, $06, $0B, $10, $15 +.start_direction + db $03, $02, $03, $02, $03 +.end_index + db $03, $08, $0D, $12, $18 +.end_direction + db $01, $00, $01, $00, $01 + +SingleEdgeCurrentRoomConnectors: +.north + dw $01C0, $0300, $01C0, $0300, $01C0, $0300 ; left -> left + dw $01C1, $41C1, $81D0, $81D1, $01C0, $0300 ; left -> middle + dw $41D1, $41D0, $01C1, $41C1, $81D0, $81D1 ; left -> right + dw $01C0, $0300, $01D0, $01D1, $01C1, $41C1 ; middle -> left + dw $01C1, $41C1, $01C1, $41C1, $01C1, $41C1 ; middle -> middle + dw $0300, $01C0, $41D1, $41D0, $01C1, $41C1 ; middle -> right + dw $01D0, $01D1, $01C1, $41C1, $C1D1, $C1D0 ; right -> left + dw $01C1, $41C1, $C1D1, $C1D0, $0300, $01C0 ; right -> middle + dw $0300, $01C0, $0300, $01C0, $0300, $01C0 ; right -> right +.west + dw $01C4, $01C4, $01C4, $0300, $0300, $0300 ; top -> top + dw $01C5, $81D4, $01C4, $C1C5, $81D5, $0300 ; top -> middle + dw $41D5, $01C5, $81D4, $41D4, $C1C5, $81D5 ; top -> bottom + dw $01C4, $C1D4, $01C5, $0300, $C1D5, $C1C5 ; middle -> top + dw $01C5, $01C5, $01C5, $C1C5, $C1C5, $C1C5 ; middle -> middle + dw $0300, $41D5, $01C5, $01C4, $41D4, $C1C5 ; middle -> bottom + dw $C1D4, $01C5, $01D5, $C1D5, $C1C5, $01D4 ; bottom -> top + dw $01C5, $01D5, $0300, $C1C5, $01D4, $01C4 ; bottom -> middle + dw $0300, $0300, $0300, $01C4, $01C4, $01C4 ; bottom -> bottom +.south + dw $01C0, $0300, $01C0, $0300, $01C0, $0300 ; left -> left + dw $01C0, $0300, $01D0, $01D1, $01C1, $41C1 ; left -> middle + dw $01D0, $01D1, $01C1, $41C1, $C1D1, $C1D0 ; left -> right + dw $01C1, $41C1, $81D0, $81D1, $01C0, $0300 ; middle -> left + dw $01C1, $41C1, $01C1, $41C1, $01C1, $41C1 ; middle -> middle + dw $01C1, $41C1, $C1D1, $C1D0, $0300, $01C0 ; middle -> right + dw $41D1, $41D0, $01C1, $41C1, $81D0, $81D1 ; right -> left + dw $0300, $01C0, $41D1, $41D0, $01C1, $41C1 ; right -> middle + dw $0300, $01C0, $0300, $01C0, $0300, $01C0 ; right -> right +.east + dw $01C4, $01C4, $01C4, $0300, $0300, $0300 ; top -> top + dw $01C4, $C1D4, $01C5, $0300, $C1D5, $81C5 ; top -> middle + dw $C1D4, $01C5, $01D5, $C1D5, $81C5, $01D4 ; top -> bottom + dw $01C5, $81D4, $01C4, $81C5, $81D5, $0300 ; middle -> top + dw $01C5, $01C5, $01C5, $81C5, $81C5, $81C5 ; middle -> middle + dw $01C5, $01D5, $0300, $81C5, $01D4, $01C4 ; middle -> bottom + dw $41D5, $01C5, $81D4, $41D4, $81C5, $81D5 ; bottom -> top + dw $0300, $41D5, $01C5, $01C4, $41D4, $81C5 ; bottom -> middle + dw $0300, $0300, $0300, $01C4, $01C4, $01C4 ; bottom -> bottom + +QuadrantMasks: +; north + dw $0008, $000C, $0004 +; west + dw $0008, $000A, $0002 +; south + dw $0002, $0003, $0001 +; east + dw $0004, $0005, $0001 + +EntranceQuadrantMasks: + dw $0002 + dw $0003 + dw $0001 + +DropdownQuadrantMasks: + dw $0008 + dw $000C + dw $0004 + +MultiConnectorMapping: +.two + db $02, $00 +.three + db $02, $01, $00 + +MultiConnectorTiles: +.north +..two + dw $41C7, $81C7, $C1C7, $01C7 +..three + dw $41C7, $01C4, $81F7, $C1F7, $01C4, $01C7 +.west +..two + dw $81C7, $41C7, $C1C7, $01C7 +..three + dw $81C7, $01C0, $41E7, $C1E7, $01C0, $01C7 +.south +..two + dw $C1C7, $01C7, $41C7, $81C7 +..three + dw $C1C7, $01C4, $01F7, $41F7, $01C4, $81C7 +.east +..two + dw $C1C7, $01C7, $81C7, $41C7 +..three + dw $C1C7, $01C0, $01E7, $81E7, $01C0, $41C7 +.direction_index + db $00, $14, $28, $3C +.start_offset +..two + dw $FF7E, $FFBC, $00BE, $FFC6 +..three + dw $FF7C, $FF7C, $00BC, $FF86 +.increment + db $02, $40 + +EdgePositions: +.north + db $01, $00 ; HC Basement + db $02 ; Desert West Wing + db $00, $01, $02 ; Desert Lobby + db $00 ; Desert East Wing + db $01, $02 ; TT + db $00, $01 ; different TT +.west + db $02 ; TT Attic + db $02, $02 ; Desert North Hall + db $00, $02 ; HC Basement + db $00 ; Desert East Wing + db $02, $00 ; TT Triple + db $02 ; TT Big Key Chest +.south + db $01, $00 ; HC Basement + db $02 ; Desert West Wing + db $00, $01, $02 ; Desert Lobby + db $00 ; Desert East Wing + db $01, $02 ; TT + db $00, $01 ; different TT +.east + db $02 ; TT Attic + db $02, $02 ; Desert North Hall + db $02, $00 ; HC Basement + db $00 ; Desert East Wing + db $02, $00 ; TT Triple + db $02 ; TT Big Key Chest + +EdgeConnectionIndices: +; North + dw $0182, $0000 + dw $0082, $0003 + dw $0283, $0006 + dw $0084, $0009 + dw $0184, $000C + dw $0284, $000F + dw $0085, $0012 + dw $01DB, $0015 + dw $02DB, $0018 + dw $00DC, $001B + dw $01DC, $001E + +; South + dw $0772, $0021 + dw $0672, $0024 + dw $0873, $0027 + dw $0674, $002A + dw $0774, $002D + dw $0874, $0030 + dw $0675, $0033 + dw $07CB, $0036 + dw $08CB, $0039 + dw $06CC, $003C + dw $07CC, $003F + +; West + dw $0565, $0042 + dw $0574, $0045 + dw $0575, $0048 + dw $0582, $004B + dw $0382, $004E + dw $0385, $0051 + dw $05CC, $0054 + dw $03CC, $0057 + dw $05DC, $005A + +; East + dw $0B64, $005D + dw $0B73, $0060 + dw $0B74, $0063 + dw $0981, $0066 + dw $0B81, $0069 + dw $0984, $006C + dw $0BCB, $006F + dw $09CB, $0072 + dw $0BDB, $0075 + + dw $FFFF + +InRoomConnectionIndices: + dw $020B, $0000 + dw $081B, $0002 + dw $023F, $0004 + dw $081F, $0006 + dw $007E, $0008 + dw $065E, $000A + dw $0296, $000C + dw $083D, $000E + dw $FFFF diff --git a/gk/data/entrance_tiles.asm b/gk/data/entrance_tiles.asm new file mode 100644 index 0000000..f7f01ed --- /dev/null +++ b/gk/data/entrance_tiles.asm @@ -0,0 +1,26 @@ +dw $200C +dw $100E +dw $2012 +dw $1023 +dw $1024 +dw $2028 +dw $204A +dw $4056 +dw $4057 +dw $4058 +dw $4059 +dw $1060 +dw $2061 +dw $4062 +dw $4063 +dw $2077 +dw $4083 +dw $2084 +dw $1085 +dw $4098 +dw $20C9 +dw $40D5 +dw $10D6 +dw $20DB +dw $40E0 +dw $FFFF diff --git a/gk/data/fall_warps.asm b/gk/data/fall_warps.asm new file mode 100644 index 0000000..db27d9e --- /dev/null +++ b/gk/data/fall_warps.asm @@ -0,0 +1,38 @@ +FallTable: +dw $1007, $1017 ; Moldorm Arena +dw $1017, $1027 ; Below Moldorm drop to Big Chest +dw $101E, $103E ; IP first drop +dw $1027, $1031 ; ToH Big Chest drop +dw $1031, $1077 ; Second Floor ToH +dw $1039, $1029 ; Mothula drop +dw $103A, $100A ; Pod front drop +dw $103D, $1096 ; GT Torches drop +dw $104D, $10A6 ; Moldorm 2 drop +dw $1054, $1034 ; Left side Swamp +dw $105E, $107E ; IP drop to tall icy room +dw $107E, $109E ; Freezors drop (to big chest) +dw $208C, $101C ; Ice Armos drop +dw $1097, $10D1 ; Mire Cutscene +dw $109E, $10BE ; IP Big Chest tile (push blocks) +dw $10CE, $10DE ; Kholdstare drop +; db $65, $AC ; TT Attic +; db $77, $A7 ; ToH drop to fairy room (Herapot) +; db $A9, $89 ; EP drop to fairy room +; db $BE, $4F ; IP drop to fairy room +dw $FFFF + +WarpTable: +dw $2009, $104B ; PoD Basement (start) +dw $100A, $1009 ; PoD Stalfos Basement +dw $100B, $206A ; PoD Turtle Room to Boss +dw $104B, $2009 ; PoD Basement (mimics) +dw $207B, $209D ; GT post-compass island hardhat +dw $207D, $109B ; GT warp maze +dw $109D, $307B ; GT compass room +dw $109B, $207D ; GT warp maze +dw $10B1, $20B2 ; South of Fishbone warp +dw $10D1, $10B1 ; Mire Big Key Chest warp +; db $89, $A9 ; EP Fairy Room +; db $A7, $17 ; ToH Fairy Room +; db $4F, $BE ; IP Fairy Room +dw $FFFF diff --git a/gk/data/item_mapping.asm b/gk/data/item_mapping.asm new file mode 100644 index 0000000..329c0d1 --- /dev/null +++ b/gk/data/item_mapping.asm @@ -0,0 +1,276 @@ +!TIER_UNKNOWN = $01 +!TIER_JUNK = $02 +!TIER_LOW_KEY = $03 +!TIER_HEALTH = $05 +!TIER_MINOR = $06 +!TIER_MAP = $07 +!TIER_COMPASS = $08 +!TIER_SM_KEY = $09 +!TIER_BIG_KEY = $0A +!TIER_MAJOR = $0B +!TIER_PENDANT = $0C +!TIER_CRYSTAL = $0D +!TIER_TFP = $0E +!TIER_TFORCE = $0F + +db !TIER_MAJOR ; 00 - Fighter Sword and Shield +db !TIER_MAJOR ; 01 - Master Sword +db !TIER_MAJOR ; 02 - Tempered Sword +db !TIER_MAJOR ; 03 - Butter Sword +db !TIER_JUNK ; 04 - Fighter Shield +db !TIER_MINOR ; 05 - Fire Shield +db !TIER_MINOR ; 06 - Mirror Shield +db !TIER_MAJOR ; 07 - Fire Rod +db !TIER_MAJOR ; 08 - Ice Rod +db !TIER_MAJOR ; 09 - Hammer +db !TIER_MAJOR ; 0A - Hookshot +db !TIER_MAJOR ; 0B - Bow +db !TIER_MINOR ; 0C - Boomerang +db !TIER_MINOR ; 0D - Powder +db !TIER_JUNK ; 0E - Bottle Refill (bee) +db !TIER_MAJOR ; 0F - Bombos +db !TIER_MAJOR ; 10 - Ether +db !TIER_MAJOR ; 11 - Quake +db !TIER_MAJOR ; 12 - Lamp +db !TIER_MINOR ; 13 - Shovel +db !TIER_MAJOR ; 14 - Flute +db !TIER_MAJOR ; 15 - Somaria +db !TIER_MINOR ; 16 - Bottle +db !TIER_HEALTH ; 17 - Heartpiece +db !TIER_MINOR ; 18 - Byrna +db !TIER_MINOR ; 19 - Cape +db !TIER_MAJOR ; 1A - Mirror +db !TIER_MAJOR ; 1B - Glove +db !TIER_MAJOR ; 1C - Mitts +db !TIER_MAJOR ; 1D - Book +db !TIER_MAJOR ; 1E - Flippers +db !TIER_MAJOR ; 1F - Pearl +db !TIER_CRYSTAL ; 20 - Crystal +db !TIER_MINOR ; 21 - Net +db !TIER_MINOR ; 22 - Blue Mail +db !TIER_MINOR ; 23 - Red Mail +db !TIER_LOW_KEY ; 24 - Small Key +db !TIER_COMPASS ; 25 - Compass +db !TIER_HEALTH ; 26 - Heart Container from 4/4 +db !TIER_JUNK ; 27 - Bomb +db !TIER_JUNK ; 28 - 3 bombs +db !TIER_MINOR ; 29 - Mushroom +db !TIER_MINOR ; 2A - Red boomerang +db !TIER_MINOR ; 2B - Full bottle (red) +db !TIER_MINOR ; 2C - Full bottle (green) +db !TIER_MINOR ; 2D - Full bottle (blue) +db !TIER_HEALTH ; 2E - Potion refill (red) +db !TIER_HEALTH ; 2F - Potion refill (green) +db !TIER_HEALTH ; 30 - Potion refill (blue) +db !TIER_JUNK ; 31 - 10 bombs +db !TIER_BIG_KEY ; 32 - Big key +db !TIER_MAP ; 33 - Map +db !TIER_JUNK ; 34 - 1 rupee +db !TIER_JUNK ; 35 - 5 rupees +db !TIER_JUNK ; 36 - 20 rupees +db !TIER_PENDANT ; 37 - Green pendant +db !TIER_PENDANT ; 38 - Blue pendant +db !TIER_PENDANT ; 39 - Red pendant +db !TIER_MAJOR ; 3A - Tossed bow +db !TIER_MAJOR ; 3B - Silvers +db !TIER_MINOR ; 3C - Full bottle (bee) +db !TIER_MINOR ; 3D - Full bottle (fairy) +db !TIER_HEALTH ; 3E - Boss heart +db !TIER_HEALTH ; 3F - Sanc heart +db !TIER_JUNK ; 40 - 100 rupees +db !TIER_JUNK ; 41 - 50 rupees +db !TIER_JUNK ; 42 - Heart +db !TIER_JUNK ; 43 - Arrow +db !TIER_JUNK ; 44 - 10 arrows +db !TIER_JUNK ; 45 - Small magic +db !TIER_JUNK ; 46 - 300 rupees +db !TIER_JUNK ; 47 - 20 rupees green +db !TIER_MINOR ; 48 - Full bottle (good bee) +db !TIER_MAJOR ; 49 - Tossed fighter sword +db !TIER_MAJOR ; 4A - Active Flute +db !TIER_MAJOR ; 4B - Boots + +db !TIER_MINOR ; 4C - Bomb capacity (50) +db !TIER_MINOR ; 4D - Arrow capacity (70) +db !TIER_MINOR ; 4E - 1/2 magic +db !TIER_MINOR ; 4F - 1/4 magic +db !TIER_MAJOR ; 50 - Safe master sword +db !TIER_MINOR ; 51 - Bomb capacity (+5) +db !TIER_MINOR ; 52 - Bomb capacity (+10) +db !TIER_MINOR ; 53 - Arrow capacity (+5) +db !TIER_MINOR ; 54 - Arrow capacity (+10) +db !TIER_JUNK ; 55 - Programmable item 1 +db !TIER_JUNK ; 56 - Programmable item 2 +db !TIER_JUNK ; 57 - Programmable item 3 +db !TIER_MAJOR ; 58 - Upgrade-only silver arrows +db !TIER_JUNK ; 59 - Rupoor +db !TIER_JUNK ; 5A - Nothing +db !TIER_JUNK ; 5B - Red clock +db !TIER_JUNK ; 5C - Blue clock +db !TIER_JUNK ; 5D - Green clock +db !TIER_MAJOR ; 5E - Progressive sword +db !TIER_MINOR ; 5F - Progressive shield +db !TIER_MINOR ; 60 - Progressive armor +db !TIER_MAJOR ; 61 - Progressive glove +db !TIER_JUNK ; 62 - RNG pool item (single) +db !TIER_JUNK ; 63 - RNG pool item (multi) +db !TIER_MAJOR ; 64 - Progressive bow +db !TIER_MAJOR ; 65 - Progressive bow +db !TIER_JUNK ; 66 - +db !TIER_JUNK ; 67 - +db !TIER_JUNK ; 68 - +db !TIER_JUNK ; 69 - +db !TIER_TFORCE ; 6A - Triforce +db !TIER_TFP ; 6B - Power star +db !TIER_TFP ; 6C - Triforce Piece +db !TIER_JUNK ; 6D - Server request item +db !TIER_JUNK ; 6E - Server request item (dungeon drop) +db !TIER_JUNK ; 6F - + +db !TIER_MAP ; 70 - Map of Light World +db !TIER_MAP ; 71 - Map of Dark World +db !TIER_MAP ; 72 - Map of Ganon's Tower +db !TIER_MAP ; 73 - Map of Turtle Rock +db !TIER_MAP ; 74 - Map of Thieves' Town +db !TIER_MAP ; 75 - Map of Tower of Hera +db !TIER_MAP ; 76 - Map of Ice Palace +db !TIER_MAP ; 77 - Map of Skull Woods +db !TIER_MAP ; 78 - Map of Misery Mire +db !TIER_MAP ; 79 - Map of Dark Palace +db !TIER_MAP ; 7A - Map of Swamp Palace +db !TIER_MAP ; 7B - Map of Agahnim's Tower +db !TIER_MAP ; 7C - Map of Desert Palace +db !TIER_MAP ; 7D - Map of Eastern Palace +db !TIER_MAP ; 7E - Map of Hyrule Castle +db !TIER_MAP ; 7F - Map of Sewers + +db !TIER_COMPASS ; 80 - Compass of Light World +db !TIER_COMPASS ; 81 - Compass of Dark World +db !TIER_COMPASS ; 82 - Compass of Ganon's Tower +db !TIER_COMPASS ; 83 - Compass of Turtle Rock +db !TIER_COMPASS ; 84 - Compass of Thieves' Town +db !TIER_COMPASS ; 85 - Compass of Tower of Hera +db !TIER_COMPASS ; 86 - Compass of Ice Palace +db !TIER_COMPASS ; 87 - Compass of Skull Woods +db !TIER_COMPASS ; 88 - Compass of Misery Mire +db !TIER_COMPASS ; 89 - Compass of Dark Palace +db !TIER_COMPASS ; 8A - Compass of Swamp Palace +db !TIER_COMPASS ; 8B - Compass of Agahnim's Tower +db !TIER_COMPASS ; 8C - Compass of Desert Palace +db !TIER_COMPASS ; 8D - Compass of Eastern Palace +db !TIER_COMPASS ; 8E - Compass of Hyrule Castle +db !TIER_COMPASS ; 8F - Compass of Sewers + +db !TIER_BIG_KEY ; 90 - Skull key +db !TIER_BIG_KEY ; 91 - Reserved +db !TIER_BIG_KEY ; 92 - Big key of Ganon's Tower +db !TIER_BIG_KEY ; 93 - Big key of Turtle Rock +db !TIER_BIG_KEY ; 94 - Big key of Thieves' Town +db !TIER_BIG_KEY ; 95 - Big key of Tower of Hera +db !TIER_BIG_KEY ; 96 - Big key of Ice Palace +db !TIER_BIG_KEY ; 97 - Big key of Skull Woods +db !TIER_BIG_KEY ; 98 - Big key of Misery Mire +db !TIER_BIG_KEY ; 99 - Big key of Dark Palace +db !TIER_BIG_KEY ; 9A - Big key of Swamp Palace +db !TIER_BIG_KEY ; 9B - Big key of Agahnim's Tower +db !TIER_BIG_KEY ; 9C - Big key of Desert Palace +db !TIER_BIG_KEY ; 9D - Big key of Eastern Palace +db !TIER_BIG_KEY ; 9E - Big key of Hyrule Castle +db !TIER_BIG_KEY ; 9F - Big key of Sewers + +db !TIER_SM_KEY ; A0 - Small key of Sewers +db !TIER_SM_KEY ; A1 - Small key of Hyrule Castle +db !TIER_SM_KEY ; A2 - Small key of Eastern Palace +db !TIER_SM_KEY ; A3 - Small key of Desert Palace +db !TIER_SM_KEY ; A4 - Small key of Agahnim's Tower +db !TIER_SM_KEY ; A5 - Small key of Swamp Palace +db !TIER_SM_KEY ; A6 - Small key of Dark Palace +db !TIER_SM_KEY ; A7 - Small key of Misery Mire +db !TIER_SM_KEY ; A8 - Small key of Skull Woods +db !TIER_SM_KEY ; A9 - Small key of Ice Palace +db !TIER_SM_KEY ; AA - Small key of Tower of Hera +db !TIER_SM_KEY ; AB - Small key of Thieves' Town +db !TIER_SM_KEY ; AC - Small key of Turtle Rock +db !TIER_SM_KEY ; AD - Small key of Ganon's Tower +db !TIER_JUNK ; AE - Reserved +db !TIER_LOW_KEY ; AF - Generic small key +db !TIER_CRYSTAL ; B0 - Crystal 6 +db !TIER_CRYSTAL ; B1 - Crystal 1 +db !TIER_CRYSTAL ; B2 - Crystal 5 +db !TIER_CRYSTAL ; B3 - Crystal 7 +db !TIER_CRYSTAL ; B4 - Crystal 2 +db !TIER_CRYSTAL ; B5 - Crystal 4 +db !TIER_CRYSTAL ; B6 - Crystal 3 +db !TIER_JUNK ; B7 - Reserved +db !TIER_JUNK ; B8 - +db !TIER_JUNK ; B9 - +db !TIER_JUNK ; BA - +db !TIER_JUNK ; BB - +db !TIER_JUNK ; BC - +db !TIER_JUNK ; BD - +db !TIER_JUNK ; BE - +db !TIER_JUNK ; BF - +db !TIER_JUNK ; C0 - +db !TIER_JUNK ; C1 - +db !TIER_JUNK ; C2 - +db !TIER_JUNK ; C3 - +db !TIER_JUNK ; C4 - +db !TIER_JUNK ; C5 - +db !TIER_JUNK ; C6 - +db !TIER_JUNK ; C7 - +db !TIER_JUNK ; C8 - +db !TIER_JUNK ; C9 - +db !TIER_JUNK ; CA - +db !TIER_JUNK ; CB - +db !TIER_JUNK ; CC - +db !TIER_JUNK ; CD - +db !TIER_JUNK ; CE - +db !TIER_JUNK ; CF - +db !TIER_JUNK ; D0 - Bee trap +db !TIER_JUNK ; D1 - Apples +db !TIER_JUNK ; D2 - Fairy +db !TIER_JUNK ; D3 - Chicken +db !TIER_JUNK ; D4 - Big Magic +db !TIER_JUNK ; D5 - 5 Arrows +db !TIER_JUNK ; D6 - Good Bee +db !TIER_JUNK ; D7 - +db !TIER_JUNK ; D8 - +db !TIER_JUNK ; D9 - +db !TIER_JUNK ; DA - +db !TIER_JUNK ; DB - +db !TIER_JUNK ; DC - +db !TIER_JUNK ; DD - +db !TIER_JUNK ; DE - +db !TIER_JUNK ; DF - +db !TIER_JUNK ; E0 - +db !TIER_JUNK ; E1 - +db !TIER_JUNK ; E2 - +db !TIER_JUNK ; E3 - +db !TIER_JUNK ; E4 - +db !TIER_JUNK ; E5 - +db !TIER_JUNK ; E6 - +db !TIER_JUNK ; E7 - +db !TIER_JUNK ; E8 - +db !TIER_JUNK ; E9 - +db !TIER_JUNK ; EA - +db !TIER_JUNK ; EB - +db !TIER_JUNK ; EC - +db !TIER_JUNK ; ED - +db !TIER_JUNK ; EE - +db !TIER_JUNK ; EF - +db !TIER_JUNK ; F0 - +db !TIER_JUNK ; F1 - +db !TIER_JUNK ; F2 - +db !TIER_JUNK ; F3 - +db !TIER_JUNK ; F4 - +db !TIER_JUNK ; F5 - +db !TIER_JUNK ; F6 - +db !TIER_JUNK ; F7 - +db !TIER_JUNK ; F8 - +db !TIER_JUNK ; F9 - +db !TIER_JUNK ; FA - +db !TIER_JUNK ; FB - +db !TIER_JUNK ; FC - +db !TIER_JUNK ; FD - +db !TIER_JUNK ; FE - Server request (async) +db !TIER_JUNK ; FF - diff --git a/gk/data/junk_items.asm b/gk/data/junk_items.asm new file mode 100644 index 0000000..87eb7df --- /dev/null +++ b/gk/data/junk_items.asm @@ -0,0 +1,261 @@ +db $00 ; 00 - Fighter Sword and Shield +db $00 ; 01 - Master Sword +db $00 ; 02 - Tempered Sword +db $00 ; 03 - Butter Sword +db $00 ; 04 - Fighter Shield +db $00 ; 05 - Fire Shield +db $00 ; 06 - Mirror Shield +db $00 ; 07 - Fire Rod +db $00 ; 08 - Ice Rod +db $00 ; 09 - Hammer +db $00 ; 0A - Hookshot +db $00 ; 0B - Bow +db $00 ; 0C - Boomerang +db $00 ; 0D - Powder +db $00 ; 0E - Bottle Refill (bee) +db $00 ; 0F - Bombos +db $00 ; 10 - Ether +db $00 ; 11 - Quake +db $00 ; 12 - Lamp +db $00 ; 13 - Shovel +db $00 ; 14 - Flute +db $00 ; 15 - Somaria +db $00 ; 16 - Bottle +db $00 ; 17 - Heartpiece +db $00 ; 18 - Byrna +db $00 ; 19 - Cape +db $00 ; 1A - Mirror +db $00 ; 1B - Glove +db $00 ; 1C - Mitts +db $00 ; 1D - Book +db $00 ; 1E - Flippers +db $00 ; 1F - Pearl +db $00 ; 20 - Crystal +db $00 ; 21 - Net +db $00 ; 22 - Blue Mail +db $00 ; 23 - Red Mail +db $00 ; 24 - Small Key +db $00 ; 25 - Compass +db $00 ; 26 - Heart Container from 4/4 +db $01 ; 27 - Bomb +db $01 ; 28 - 3 bombs +db $00 ; 29 - Mushroom +db $00 ; 2A - Red boomerang +db $00 ; 2B - Full bottle (red) +db $00 ; 2C - Full bottle (green) +db $00 ; 2D - Full bottle (blue) +db $00 ; 2E - Potion refill (red) +db $00 ; 2F - Potion refill (green) +db $00 ; 30 - Potion refill (blue) +db $01 ; 31 - 10 bombs +db $00 ; 32 - Big key +db $00 ; 33 - Map +db $01 ; 34 - 1 rupee +db $01 ; 35 - 5 rupees +db $01 ; 36 - 20 rupees +db $00 ; 37 - Green pendant +db $00 ; 38 - Blue pendant +db $00 ; 39 - Red pendant +db $00 ; 3A - Tossed bow +db $00 ; 3B - Silvers +db $00 ; 3C - Full bottle (bee) +db $00 ; 3D - Full bottle (fairy) +db $00 ; 3E - Boss heart +db $00 ; 3F - Sanc heart +db $01 ; 40 - 100 rupees +db $01 ; 41 - 50 rupees +db $01 ; 42 - Heart +db $01 ; 43 - Arrow +db $01 ; 44 - 10 arrows +db $01 ; 45 - Small magic +db $01 ; 46 - 300 rupees +db $01 ; 47 - 20 rupees green +db $00 ; 48 - Full bottle (good bee) +db $00 ; 49 - Tossed fighter sword +db $00 ; 4A - Active Flute +db $00 ; 4B - Boots + +db $00 ; 4C - Bomb capacity (50) +db $00 ; 4D - Arrow capacity (70) +db $00 ; 4E - 1/2 magic +db $00 ; 4F - 1/4 magic +db $00 ; 50 - Safe master sword +db $00 ; 51 - Bomb capacity (+5) +db $00 ; 52 - Bomb capacity (+10) +db $00 ; 53 - Arrow capacity (+5) +db $00 ; 54 - Arrow capacity (+10) +db $00 ; 55 - Programmable item 1 +db $00 ; 56 - Programmable item 2 +db $00 ; 57 - Programmable item 3 +db $00 ; 58 - Upgrade-only silver arrows +db $01 ; 59 - Rupoor +db $01 ; 5A - Nothing +db $00 ; 5B - Red clock +db $00 ; 5C - Blue clock +db $00 ; 5D - Green clock +db $00 ; 5E - Progressive sword +db $00 ; 5F - Progressive shield +db $00 ; 60 - Progressive armor +db $00 ; 61 - Progressive glove +db $00 ; 62 - RNG pool item (single) +db $00 ; 63 - RNG pool item (multi) +db $00 ; 64 - Progressive bow +db $00 ; 65 - Progressive bow +db $00 ; 66 - +db $00 ; 67 - +db $00 ; 68 - +db $00 ; 69 - +db $00 ; 6A - Triforce +db $01 ; 6B - Power star +db $01 ; 6C - Triforce Piece +db $00 ; 6D - Server request item +db $00 ; 6E - Server request item (dungeon drop) +db $00 ; 6F - + +db $00 ; 70 - Map of Light World +db $00 ; 71 - Map of Dark World +db $00 ; 72 - Map of Ganon's Tower +db $00 ; 73 - Map of Turtle Rock +db $00 ; 74 - Map of Thieves' Town +db $00 ; 75 - Map of Tower of Hera +db $00 ; 76 - Map of Ice Palace +db $00 ; 77 - Map of Skull Woods +db $00 ; 78 - Map of Misery Mire +db $00 ; 79 - Map of Dark Palace +db $00 ; 7A - Map of Swamp Palace +db $00 ; 7B - Map of Agahnim's Tower +db $00 ; 7C - Map of Desert Palace +db $00 ; 7D - Map of Eastern Palace +db $00 ; 7E - Map of Hyrule Castle +db $00 ; 7F - Map of Sewers + +db $00 ; 80 - Compass of Light World +db $00 ; 81 - Compass of Dark World +db $00 ; 82 - Compass of Ganon's Tower +db $00 ; 83 - Compass of Turtle Rock +db $00 ; 84 - Compass of Thieves' Town +db $00 ; 85 - Compass of Tower of Hera +db $00 ; 86 - Compass of Ice Palace +db $00 ; 87 - Compass of Skull Woods +db $00 ; 88 - Compass of Misery Mire +db $00 ; 89 - Compass of Dark Palace +db $00 ; 8A - Compass of Swamp Palace +db $00 ; 8B - Compass of Agahnim's Tower +db $00 ; 8C - Compass of Desert Palace +db $00 ; 8D - Compass of Eastern Palace +db $00 ; 8E - Compass of Hyrule Castle +db $00 ; 8F - Compass of Sewers + +db $00 ; 90 - Skull key +db $00 ; 91 - Reserved +db $00 ; 92 - Big key of Ganon's Tower +db $00 ; 93 - Big key of Turtle Rock +db $00 ; 94 - Big key of Thieves' Town +db $00 ; 95 - Big key of Tower of Hera +db $00 ; 96 - Big key of Ice Palace +db $00 ; 97 - Big key of Skull Woods +db $00 ; 98 - Big key of Misery Mire +db $00 ; 99 - Big key of Dark Palace +db $00 ; 9A - Big key of Swamp Palace +db $00 ; 9B - Big key of Agahnim's Tower +db $00 ; 9C - Big key of Desert Palace +db $00 ; 9D - Big key of Eastern Palace +db $00 ; 9E - Big key of Hyrule Castle +db $00 ; 9F - Big key of Sewers + +db $00 ; A0 - Small key of Sewers +db $00 ; A1 - Small key of Hyrule Castle +db $00 ; A2 - Small key of Eastern Palace +db $00 ; A3 - Small key of Desert Palace +db $00 ; A4 - Small key of Agahnim's Tower +db $00 ; A5 - Small key of Swamp Palace +db $00 ; A6 - Small key of Dark Palace +db $00 ; A7 - Small key of Misery Mire +db $00 ; A8 - Small key of Skull Woods +db $00 ; A9 - Small key of Ice Palace +db $00 ; AA - Small key of Tower of Hera +db $00 ; AB - Small key of Thieves' Town +db $00 ; AC - Small key of Turtle Rock +db $00 ; AD - Small key of Ganon's Tower +db $00 ; AE - Reserved +db $00 ; AF - Generic small key +db $00 ; B0 - Crystal 6 +db $00 ; B1 - Crystal 1 +db $00 ; B2 - Crystal 5 +db $00 ; B3 - Crystal 7 +db $00 ; B4 - Crystal 2 +db $00 ; B5 - Crystal 4 +db $00 ; B6 - Crystal 3 +db $00 ; B7 - Reserved +db $00 ; B8 - +db $00 ; B9 - +db $00 ; BA - +db $00 ; BB - +db $00 ; BC - +db $00 ; BD - +db $00 ; BE - +db $00 ; BF - +db $00 ; C0 - +db $00 ; C1 - +db $00 ; C2 - +db $00 ; C3 - +db $00 ; C4 - +db $00 ; C5 - +db $00 ; C6 - +db $00 ; C7 - +db $00 ; C8 - +db $00 ; C9 - +db $00 ; CA - +db $00 ; CB - +db $00 ; CC - +db $00 ; CD - +db $00 ; CE - +db $00 ; CF - +db $01 ; D0 - Bee trap +db $01 ; D1 - Apples +db $01 ; D2 - Fairy +db $01 ; D3 - Chicken +db $01 ; D4 - Big Magic +db $01 ; D5 - 5 Arrows +db $01 ; D6 - Good Bee +db $00 ; D7 - +db $00 ; D8 - +db $00 ; D9 - +db $00 ; DA - +db $00 ; DB - +db $00 ; DC - +db $00 ; DD - +db $00 ; DE - +db $00 ; DF - +db $00 ; E0 - +db $00 ; E1 - +db $00 ; E2 - +db $00 ; E3 - +db $00 ; E4 - +db $00 ; E5 - +db $00 ; E6 - +db $00 ; E7 - +db $00 ; E8 - +db $00 ; E9 - +db $00 ; EA - +db $00 ; EB - +db $00 ; EC - +db $00 ; ED - +db $00 ; EE - +db $00 ; EF - +db $00 ; F0 - +db $00 ; F1 - +db $00 ; F2 - +db $00 ; F3 - +db $00 ; F4 - +db $00 ; F5 - +db $00 ; F6 - +db $00 ; F7 - +db $00 ; F8 - +db $00 ; F9 - +db $00 ; FA - +db $00 ; FB - +db $00 ; FC - +db $00 ; FD - +db $00 ; FE - Server request (async) +db $00 ; FF - diff --git a/gk/data/spiral_stairs.asm b/gk/data/spiral_stairs.asm new file mode 100644 index 0000000..15511ae --- /dev/null +++ b/gk/data/spiral_stairs.asm @@ -0,0 +1,87 @@ +SpiralPropsIndex: +db $00, $04, $07, $00, $01, $00, $00, $0D, $00, $10, $04, $00, $15, $00, $0A, $00 +db $00, $07, $00, $00, $00, $01, $07, $1C, $00, $00, $21, $00, $26, $07, $0A, $00 +db $00, $00, $00, $00, $00, $00, $29, $30, $01, $00, $00, $00, $00, $00, $00, $00 +db $00, $35, $00, $00, $3A, $00, $00, $00, $01, $00, $04, $00, $00, $00, $00, $3D +db $40, $07, $07, $00, $00, $01, $00, $00, $00, $00, $43, $00, $07, $07, $07, $00 +db $00, $00, $00, $01, $48, $00, $00, $00, $00, $00, $00, $00, $07, $07, $00, $4B +db $00, $00, $00, $01, $50, $00, $07, $00, $00, $00, $53, $01, $01, $00, $58, $00 +; 0 1 2 3 4 5 6 7 8 9 a b c d e f +db $5B, $01, $04, $00, $00, $00, $60, $67, $00, $00, $00, $00, $00, $00, $00, $6E +db $01, $00, $00, $00, $00, $00, $00, $71, $00, $00, $00, $00, $76, $00, $04, $00 +db $00, $07, $00, $04, $00, $00, $00, $01, $7D, $0A, $00, $00, $00, $00, $04, $00 +db $01, $00, $04, $00, $00, $01, $07, $00, $00, $00, $00, $0A, $00, $00, $07, $00 +db $80, $00, $00, $00, $00, $01, $01, $00, $00, $00, $00, $00, $01, $00, $07, $00 +db $85, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 +db $8A, $92, $8F, $00, $00, $00, $00, $00, $00, $00, $0A, $00, $00, $00, $00, $00 +db $04 + +SpiralProps: +db $00 ;null row +db $01, $00, $00 ; ($01) Single Top-Left Staircase +db $01, $00, $01 ; ($04) Single Top-Middle Staircase +db $01, $00, $02 ; ($07) Single Top-Right Staircase +db $01, $00, $05 ; ($0A) Single Staircase at Top of Bottom Left Quadrant + +db $01, $00, $04 ; ($0D) Moldorm +db $02, $01, $00, $00, $02 ; ($10) Pod Basement +db $03, $01, $0A, $02, $01, $00, $0B ; ($15) GT Entrance +db $02, $01, $03, $00, $04 ; ($1C) Hera Below Moldorm +db $02, $00, $01, $01, $0B ; ($21) PoD Bridge +db $01, $00, $08 ; ($26) GT Ice Armos +db $03, $00, $01, $01, $0B, $02, $09 ; ($29) Swamp Statue +db $02, $01, $03, $00, $04 ; ($30) Hera Big Chest +db $02, $00, $04, $02, $09 ; ($35) Hera Startiles (middle value unused) +db $01, $00, $08 ; ($3A) West Swamp +db $01, $00, $05 ; ($3D) Ice Hamlift +db $01, $00, $07 ; ($40) Aga Guards +db $02, $01, $00, $00, $02 ; ($43) Pod Entrance +db $01, $00, $08 ; ($48) Swamp Attic +db $02, $03, $0C, $04, $06 ; ($4B) Ice U (1st three values unused) +db $01, $00, $05 ; ($50) TT Attic Left +db $02, $00, $01, $01, $0B ; ($53) Pod Rupees +db $01, $00, $04 ; ($58) Ice Gators +db $02, $01, $0A, $02, $01 ; ($5B) HC Tiny (first value placeholder) +db $03, $00, $01, $01, $0B, $02, $09 ; ($60) Swamp Sunken +db $03, $01, $00, $03, $08, $02, $09 ; ($67) Hera Entrance (first value unused) +db $01, $00, $08 ; ($6E) Ice Hookshot +db $02, $01, $00, $03, $08 ; ($71) Hera Basement (first and third values unused) +db $03, $01, $00, $00, $02, $03, $08 ; ($76) GT Circle (third value unused) +db $01, $00, $07 ; ($7D) Mire Entrance +db $02, $00, $02, $02, $09 ; ($80) Tower Usains (2nd value unused) +db $02, $00, $02, $02, $09 ; ($85) Tower Dark2 (2nd value unused) +db $02, $00, $02, $02, $09 ; ($8A) Tower Dark1 (2nd value unused) +db $01, $00, $09 ; ($8F) Mire2 +db $01, $00, $0A ; ($92) Mire south of Torch Room + +SpiralLabelOffsets: +db 1, -9 +db 5, -9 +db 9, -9 +db -6, -1 +db 15, -1 +db 1, -1 +db 5, -1 +db 9, -1 +db -6, 7 +db 15, 7 +db -3, -9 +db 13, -9 +db -3, -1 +db 13, -1 + +SpiralLabelQuadrantMasks: +dw $0008 +dw $000C +dw $0004 +dw $0008 +dw $0004 +dw $0002 +dw $0003 +dw $0001 +dw $0002 +dw $0001 +dw $0008 +dw $0004 +dw $0002 +dw $0001 diff --git a/gk/data/split_room.asm b/gk/data/split_room.asm new file mode 100644 index 0000000..06f5f7b --- /dev/null +++ b/gk/data/split_room.asm @@ -0,0 +1,571 @@ +IncomingDoorMap: +; north +db $06, $07, $08 +; west +db $09, $0A, $0B +; south +db $00, $01, $02 +; east +db $03, $04, $05 + +macro d(label) +dw