Refactored normal doors to use a lookup table. Now the door table is <4k

Fixed graphics between HC/Sewers and cross dungeons.
Added base work for spiral staircases in HC/Eastern. (More data needed for other dungeons.)
Added new region to deal with push blocks in Sewers Secret Room
Refactored asm to be in multiple files.
This commit is contained in:
randall.rupper
2019-09-04 16:34:59 -06:00
parent 274634acfd
commit ac01262a31
12 changed files with 764 additions and 304 deletions

141
asm/asm_investigations.txt Normal file
View File

@@ -0,0 +1,141 @@
Dungeon_InterRoomTrans 7.2 -> (01) -> Dungeon_LoadRoom
Dungeon_InitStarTileCh
**Load and and Prep Here
Dungeon_ResetSprites
$028908 (PC: 10908) is the jump tample
hook points 7.2.1
22 32 f4 a0
$028961 (PC: 10961) 22 a4 fd 00
22 39 d7 00
e6 b0
9c 00 02
a5 a2
48
a5 a0
Modules 04 and 05 skip the PaletteFiltering right above it - moving the pointers slightly might help
60 a5 b0 c9 07 90 ?? ??
jsl ?? ?? ??
jsl ?? ?? ??
jsl 07 ?? ??
lda b0
jsl 00 ?? ??
pointers!!!
SpiralStaircase
(00) 290C6
(01) 28B7A
(02) 28FA3 -> Fixed Color see 110A1-$110C6 JUMP LOCATION in Bank02 e944 is PaletteFiltering (Fade out!) (.doFiltering)
(03) 28BE4 -> Dungeon_LoadRoom, Dungeon_InitStarTileChr, LoadTransAuxGfx, Dungeon_LoadCustomTileAttr
(04) 28D11 -> PrepTransAuxGfx
(05) 28D1F -> Sets $17 to #$0A
(06) 28C12 -> Dungeon_ResetSprites
- these guys called each other a ton
c9* b5 ca* b5* ca* b1* b5 c6* ca b1* b5 c6* ca 96---------
(07) 28FC9 -> 5 jumps in here, sets $a4 floor
112B1 -> may be related to straight staircase only
13B7B
135DC
10EC9
10AB3 - right before b5
(08) 289CA -> calls $113F (above .copyTilemap in Bank 00)
(09) 289B5 -> calls $11C4 (updates all tiles in a room)
(0a) 289CA -> go through the tilemap....
(0b) 289B1 -> runs a filter - new color?, then $11C4 (didn't see call to 289B5)
(0c) 289C6 -> runs a filter then $113F
(0d) 289B1 -> repeat last two steps
(0e) 289C6
(0f) 28F96 -> Fade in
(10) 2905D
(11) 2909D
(12) 290B7
(13) 290DF
SpiralStaircase -> (03) 10CE2 -> Dungeon_LoadRoom
Dungeon_InitStarTileChr
LoadTransAuxGfx
Dungeon_LoadCustomTileAttr
(04) 10E0F -> PrepTransAuxGfx
(06) 10D10 -> Dungeon_ResetSprites
; Upward floor transition
Dungeon -> x06 -> $10C14 -> 10CE2 -> Dungeon_LoadRoom
Dungeon_InitStarTileChr
LoadTransAuxGfx
Dungeon_LoadCustomTileAttr
10E0F -> PrepTransAuxGfx
10D10 -> Dungeon_ResetSprites
; Downward floor transition
Dungeon -> x07 -> $10E27 -> 10CE2 -> Dungeon_LoadRoom
Dungeon_InitStarTileChr
LoadTransAuxGfx
Dungeon_LoadCustomTileAttr
10E0F -> PrepTransAuxGfx
10D10 -> Dungeon_ResetSprites
StraightStairs_2 -> Dungeon_LoadRoom
-> LoadTransAuxGfx
StraightStairs_3 -> 10E0F -> PrepTransAuxGfx
StraightStairs_4 -> Dungeon_ResetSprites
Dungeon_Teleport -> 10CE2 -> Dungeon_LoadRoom
10CE2 -> LoadTransAuxGfx
10D10 -> Dungeon_ResetSprites
Hook points
org $00d6ae (PC: 56ae)
LoadTransAuxGfx
8b 4b ab 64 00
org $00df5a (PC: 5f5a)
PrepTransAuxGfx
a9 7e 85 02 85 05 c2 31
org $0ffd65 (PC: 07fd65)
Dungeon_LoadCustomTileAttr
8b 4b ab c2 30 ad A2 0A 29 FF 00
Palette_DungBgMain
c2 21 ae b6 0a bf 1b
; This is the palette index for a certain background
LDX $0AB6
LDA $1BEC4B, X : ADC.w #$D734 : STA $00 : PHA
REP #$10
LDA.w #$0042 ; Target BP-2 through BP-7 (full)
LDX.w #$000E ; (Length - 1) (in words) of the palettes.
LDY.w #$0005
Other transition stuff
Overworld_LoadTransGfx -> LoadTransAuxGfx
Overworld_LoadTransGfx -> PrepTransAuxGfx
Module_LoadFile -> Dungeon_ResetSprites
Module_HoleToDungeon -> 10D10 -> Dungeon_ResetSprites
Camera work:
Places where sta $e2 happens
02ba5d 13A31 -
028750 Module_Dungeon
0286ef Module_Dungeon

View File

@@ -1,3 +1,6 @@
!add = "clc : adc"
!sub = "sec : sbc"
; Hooks into various routines
org $02b5c4 ; -- moving right routine 135c4
@@ -12,16 +15,6 @@ org $02bd80
jsl AdjustTransition
nop
; Graphics fix - doesn't work yet
org $028961
jsl GfxFixer
org $00fda4
Dungeon_InitStarTileCh:
org $00d6ae ;(PC: 56ae)
LoadTransAuxGfx:
org $00df5a ;(PC: 5f5a)
PrepTransAuxGfx:
;turn off linking doors -- see .notRoomLinkDoor label in Bank02.asm
org $02b5a6
bra NotLinkDoor1
@@ -32,30 +25,65 @@ bra NotLinkDoor2
org $02b657
NotLinkDoor2:
; Staircase routine
;org $02a1e7 ;(PC: 121e7)
org $01c3d4 ;(PC: c3d4)
jsl SpiralWarp : nop
; Graphics fix
org $028961
Splicer:
jsl GfxFixer
lda $b1 : beq .done
rts
.done
nop
org $00fda4
Dungeon_InitStarTileCh:
org $00d6ae ;(PC: 56ae)
LoadTransAuxGfx:
org $00df5a ;(PC: 5f5a)
PrepTransAuxGfx:
;org $0ffd65 ;(PC: 07fd65)
;Dungeon_LoadCustomTileAttr:
;org $01fec1
;Dungeon_ApproachFixedColor_variable:
org $1bee74 ;(PC: 0dee74)
Palette_DungBgMain:
org $1bec77
Palette_SpriteAux3:
org $1becc5
Palette_SpriteAux2:
org $1bece4
Palette_SpriteAux1:
;Main Code
org $278000 ;138000
WarpLeft:
lda $040c : cmp.b $ff : beq .end
lda $040c : cmp.b #$ff : beq .end
lda $20 : ldx $aa
jsr CalcIndex
clc : adc #$06 : ldy #$01 ; offsets in A, Y
!add #$06 : ldy #$01 ; offsets in A, Y
jsr LoadRoomHorz
.end
jsr Cleanup
rtl
WarpRight:
lda $040c : cmp.b $ff : beq .end
lda $040c : cmp.b #$ff : beq .end
lda $20 : ldx $aa
jsr CalcIndex
clc : adc #$12 : ldy #$ff ; offsets in A, Y
!add #$12 : ldy #$ff ; offsets in A, Y
jsr LoadRoomHorz
.end
jsr Cleanup
rtl
WarpUp:
lda $040c : cmp.b $ff : beq .end
lda $040c : cmp.b #$ff : beq .end
lda $22 : ldx $a9
jsr CalcIndex
ldy #$02 ; offsets in A, Y
@@ -65,10 +93,10 @@ WarpUp:
rtl
WarpDown:
lda $040c : cmp.b $ff : beq .end
lda $040c : cmp.b #$ff : beq .end
lda $22 : ldx $a9
jsr CalcIndex
clc : adc #$0c : ldy #$ff ; offsets in A, Y
!add #$0c : ldy #$ff ; offsets in A, Y
jsr LoadRoomVert
.end
jsr Cleanup
@@ -104,10 +132,10 @@ LoadRoomHorz:
.gtg ;Good to Go!
pla ; Throw away normal room (don't fill up the stack)
lda $a0 : and.b #$0F : asl a : sec : sbc $23 : clc : adc $06 : sta $02
lda $a0 : and.b #$0F : asl a : !sub $23 : !add $06 : sta $02
ldy #$00 : jsr ShiftVariablesMainDir
lda $aa : lsr : sta $07
lda $a0 : and.b #$F0 : lsr #3 : clc : adc $07 : sec : sbc $21 : sta $02 : sta $03
lda $a0 : and.b #$F0 : lsr #3 : !add $07 : !sub $21 : sta $02 : sta $03
jsr ShiftLowCoord
jsr ShiftQuad
jsr ShiftCameraBounds
@@ -131,9 +159,9 @@ LoadRoomVert:
.gtg ;Good to Go!
pla ; Throw away normal room (don't fill up the stack)
lda $a0 : and.b #$F0 : lsr #3 : sec : sbc $21 : clc : adc $06 : sta $02
lda $a0 : and.b #$F0 : lsr #3 : !sub $21 : !add $06 : sta $02
ldy #$01 : jsr ShiftVariablesMainDir
lda $a0 : and.b #$0F : asl a : clc : adc $a9 : sec : sbc $23 : sta $02 : sta $03
lda $a0 : and.b #$0F : asl a : !add $a9 : !sub $23 : sta $02 : sta $03
jsr ShiftLowCoord
jsr ShiftQuad
jsr ShiftCameraBounds
@@ -147,11 +175,12 @@ LoadRoomVert:
LookupNewRoom: ; expects data offset to be in A
{
rep #$30
and #$00FF : sta $00 ; offset in 00
lda $a2 : and #$00FF
asl #3 : sta $02 : adc $02 : adc $02 ;multiply by 24 (data size)
adc $00 ; should now have the offset of the address I want to load
rep #$30 : and #$00FF ;sanitize A reg (who knows what is in the high byte)
sta $00 ; offset in 00
lda $a2 : tax ; probably okay loading $a3 in the high byte
lda DoorOffset,x : and #$00FF ;we only want the low byte
asl #3 : sta $02 : !add $02 : !add $02 ;multiply by 24 (data size)
!add $00 ; should now have the offset of the address I want to load
tax : lda DoorTable,x : sta $00
and #$00FF : sta $a0 ; assign new room
sep #$30
@@ -163,14 +192,14 @@ LookupNewRoom: ; expects data offset to be in A
ShiftVariablesMainDir:
{
lda CoordIndex,y : tax
lda $21,x : clc : adc $02 : sta $21,x ; coordinate update
lda $21,x : !add $02 : sta $21,x ; coordinate update
lda CameraIndex,y : tax
lda $e3,x : clc : adc $02 : sta $e3,x ; scroll register high byte
lda $e3,x : !add $02 : sta $e3,x ; scroll register high byte
lda CamQuadIndex,y : tax
lda $0605,x : clc : adc $02 : sta $0605,x ; high bytes of these guys
lda $0607,x : clc : adc $02 : sta $0607,x
lda $0601,x : clc : adc $02 : sta $0601,x
lda $0603,x : clc : adc $02 : sta $0603,x
lda $0605,x : !add $02 : sta $0605,x ; high bytes of these guys
lda $0607,x : !add $02 : sta $0607,x
lda $0601,x : !add $02 : sta $0601,x
lda $0603,x : !add $02 : sta $0603,x
rts
}
@@ -180,7 +209,7 @@ ShiftLowCoord:
jsr CalcOpposingShift
lda $0127 : and.b #$f0 : cmp.b #$20 : bne .lowDone
lda OppCoordIndex,y : tax
lda #$80 : clc : adc $20,x : sta $20,x
lda #$80 : !add $20,x : sta $20,x
.lowDone
rts
}
@@ -195,7 +224,7 @@ CalcOpposingShift:
stz $0127 ; set up (can you zero out 127 alone?)
cmp.b $04 : beq .noOffset ; (equal, no shifts to do)
phy : tay ; reserve these
lda $04 : tax : tya : sec : sbc $04 : sta $04 : cmp.b #$00 : bpl .shiftPos
lda $04 : tax : tya : !sub $04 : sta $04 : cmp.b #$00 : bpl .shiftPos
lda #$40
cpx.b #$01 : beq .skipNegQuad
ora #$08
@@ -235,14 +264,14 @@ ShiftQuad:
ShiftVariablesSubDir:
{
lda CoordIndex,y : tax
lda $21,x : clc : adc $02 : sta $21,x ; coordinate update
lda $21,x : !add $02 : sta $21,x ; coordinate update
lda CameraIndex,y : tax
lda $e3,x : clc : adc $03 : sta $e3,x ; scroll register high byte
lda $e3,x : !add $03 : sta $e3,x ; scroll register high byte
lda CamQuadIndex,y : tax
lda $0601,x : clc : adc $02 : sta $0601,x
lda $0605,x : clc : adc $02 : sta $0605,x ; high bytes of these guys
lda $0603,x : clc : adc $03 : sta $0603,x
lda $0607,x : clc : adc $03 : sta $0607,x
lda $0601,x : !add $02 : sta $0601,x
lda $0605,x : !add $02 : sta $0605,x ; high bytes of these guys
lda $0603,x : !add $03 : sta $0603,x
lda $0607,x : !add $03 : sta $0607,x
rts
}
@@ -252,13 +281,13 @@ ShiftCameraBounds:
rep #$30
lda $0127 : and #$00f0 : asl #2 : sta $06
lda $0127 : and #$0001 : cmp #$0000 : beq .subIt
lda $0618, x : clc : adc $06 : sta $0618, x
lda $061A, x : clc : adc $06 : sta $061A, x
lda $0618, x : !add $06 : sta $0618, x
lda $061A, x : !add $06 : sta $061A, x
sep #$30
rts
.subIt
lda $0618, x : sec : sbc $06 : sta $0618, x
lda $061A, x : sec : sbc $06 : sta $061A, x
lda $0618, x : !sub $06 : sta $0618, x
lda $061A, x : !sub $06 : sta $061A, x
sep #$30
rts
}
@@ -282,12 +311,10 @@ AdjustTransition:
rtl
}
GfxFixer:
jsl Dungeon_InitStarTileCh
jsl LoadTransAuxGfx
jsl PrepTransAuxGfx
rtl
incsrc spiral.asm
incsrc gfx.asm
; Data Section
org $279000
OffsetTable:
dw -8, 8
@@ -296,241 +323,15 @@ dw -8, 8
org $279010
CoordIndex: ; Horizontal 1st
db 2, 0 ; Coordinate Index $20-$23
OppCoordIndex: ; Horizontal 1st
OppCoordIndex:
db 0, 2 ; Swapped coordinate Index $20-$23 (minor optimization)
CameraIndex:
CameraIndex: ; Horizontal 1st
db 0, 6 ; Camera Index $e2-$ea
CamQuadIndex:
CamQuadIndex: ; Horizontal 1st
db 8, 0 ; Camera quadrants $600-$60f
ShiftQuadIndex:
db 2, 1 ; see ShiftQuad func (relates to $a9,$aa)
CamBoundIndex:
CamBoundIndex: ; Horizontal 1st
db 0, 4 ; Camera Bounds $0618-$61f
org $27A000
DoorTable:
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ganon
dw $8000, $8000, $8000, $0450, $8000, $8000, $8000, $8000, $8000, $0452, $8000, $8000 ; HC Back Hall (x01)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Sewer Switches (x02)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x10
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x20
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;PoD Arena (x2a)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;PoD Statue (x2b)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x30
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp Main (x36)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x40
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $0401, $8000, $8000 ;HC West Hall (x50)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;HC Throne Room (x51)
dw $8000, $8000, $8000, $0401, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;HC East Hall (x52)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;HC West Lobby (x60)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;HC Main Lobby (x61)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;HC East Lobby (x62)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;Desert Back (x63)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;TT Attic L (x64)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;TT Attic R (x65)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x66
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x67
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x68
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x69
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x6a
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x6b
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x6c
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x6d
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x6e
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x6f
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ;x70
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC Cellblock (x80)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Vitreous (x90)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Pre-Vitreous (xa0)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Trinexx (xa4)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Compass (xa8)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Courtyard (xa9)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Map (xaa)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; xb0
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; xc0
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; xd0
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; xe0
incsrc doortables.asm

276
asm/doortables.asm Normal file
View File

@@ -0,0 +1,276 @@
org $279E00
SpiralOffset:
; 0 1 2 3 4 5 6 7 8 9 a b c d e f --Offset Ruler
db $00,$01,$02,$00,$00,$03,$00,$04,$00,$05,$07,$00,$08,$00,$0b,$00
db $00,$0c,$00,$00,$00,$0d,$0e,$0f,$00,$00,$11,$00,$13,$14,$15,$00
db $00,$00,$00,$00,$00,$00,$16,$19,$1b,$00,$00,$00,$00,$00,$00,$00
db $00,$1c,$00,$00,$1f,$00,$00,$00,$20,$00,$21,$00,$00,$00,$00,$22
db $23,$24,$25,$00,$00,$26,$00,$00,$00,$00,$27,$00,$29,$2a,$2b,$00
db $00,$00,$00,$2c,$2d,$00,$00,$00,$00,$00,$00,$00,$2e,$2f,$00,$30
db $00,$00,$00,$35,$36,$00,$37,$00,$00,$00,$38,$3a,$3b,$00,$3c,$00
db $3d,$40,$41,$00,$00,$00,$42,$45,$00,$00,$00,$00,$00,$00,$00,$49
db $4a,$00,$00,$00,$00,$00,$00,$4b,$00,$00,$00,$00,$4f,$00,$53,$00
db $00,$54,$00,$55,$00,$00,$00,$56,$57,$58,$00,$00,$00,$00,$59,$00
db $5a,$00,$5b,$00,$00,$5c,$5d,$00,$00,$00,$00,$5e,$00,$00,$5f,$00
db $60,$00,$00,$00,$00,$63,$64,$00,$00,$00,$00,$00,$65,$00,$66,$00
db $67,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
db $6a,$6d,$6e,$00,$00,$00,$00,$00,$00,$00,$6f,$00,$00,$00,$00,$00
db $70
org $279F00
DoorOffset:
db $00,$01,$02,$00,$03,$00,$04,$00,$00,$00,$00,$00,$00,$05,$00,$00
db $00,$06,$07,$08,$09,$0A,$0B,$00,$00,$0C,$0D,$0E,$00,$0F,$10,$11
db $12,$13,$14,$15,$16,$00,$17,$00,$00,$00,$18,$19,$00,$00,$1A,$00
db $1B,$00,$1C,$1D,$1E,$1F,$20,$21,$22,$23,$24,$25,$00,$26,$27,$00
db $00,$28,$00,$29,$2A,$2B,$2C,$00,$00,$2D,$2E,$2F,$30,$31,$32,$00
db $33,$34,$35,$36,$00,$00,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$3F,$40
db $41,$42,$43,$00,$00,$00,$44,$45,$46,$00,$47,$48,$49,$4A,$4B,$00
db $00,$4C,$00,$00,$00,$4D,$4E,$00,$00,$00,$00,$4F,$50,$51,$52,$53
db $00,$54,$00,$00,$00,$55,$00,$00,$00,$00,$00,$56,$57,$58,$59,$00
db $5A,$5B,$5C,$5D,$00,$5E,$5F,$00,$00,$60,$00,$61,$62,$63,$64,$65
db $66,$67,$68,$69,$6A,$6B,$00,$00,$6C,$6D,$6E,$6F,$70,$00,$71,$72
db $00,$73,$74,$75,$76,$77,$78,$79,$7A,$7B,$7C,$7D,$7E,$00,$7F,$80
db $00,$81,$82,$83,$84,$85,$86,$87,$88,$89,$00,$8A,$8B,$00,$8C,$00
db $00,$8D,$8E,$00,$00,$8F,$90,$00,$91,$92,$93,$94,$95,$00,$00,$00
db $00
org $27A000
DoorTable:
;; NW 00 N 01 N 02 WN 00 W 01 WS 02 SW 00 S 01 SE 02 EN 00 E 01 ES 02 - Door ruler
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Default/Garbage row
dw $8000, $8000, $8000, $0450, $8000, $8000, $8000, $8000, $8000, $0452, $8000, $8000 ; HC Back Hall (x01)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Sewer Switches (x02)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Crystaroller
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Arghus
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Aga 2
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Sewer Secret Room
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Sanc
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Pokey
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Lava Pipe
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Pipes n Ledge
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swap Canal
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Pod dark Maze
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Pod Bridge
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Pod Eye Statue
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Pre Aga
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Cross
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice BK
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x20 Aga1
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Sewer Key Rat
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Sewer Waters
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Eye Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Chest Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp Statue
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; PoD Arena (x2a)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; PoD Statue (x2b)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Compass
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x30 Aga's Altar
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Dark Cross
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Lanmolas
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp West Wing
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Flooded Key
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp Main Hub (x36)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp Hammer Time
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp First Basement
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Drop to the Moth
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Pod 3 Catwalks
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Pod Conveyor
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Minihelma
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Conveyor
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Sewers
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Desert Torches
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT Big Chest
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT Cellblock
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp Compass Loop
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Skull3 Torches
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Pod Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Pod Mimics 1
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Conveyor Ice
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Moldorm
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; IPBJ
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $0401, $8000, $8000 ; HC West Hall (x50)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC Throne Room (x51)
dw $8000, $8000, $8000, $0401, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC East Hall (x52)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Desert Tiles 1
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Skull 2 Left Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Skull 2 Right Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Skull 1 Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Skull 3 Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Helmasaur
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Spike Switch
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Cannonball
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Gauntlet 1
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Choice Cross
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Iced U
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC West Lobby (x60)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC Main Lobby (x61)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC East Lobby (x62)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x66 Swamp Waterfall
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x67 Skull 1 Left Drop
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x68 Skull 1 Pinball
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x6a Pod Rupees
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x6b GT Mimics
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x6c GT Lanmolas
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x6d Gauntlet 2
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; x6e Ice Gators
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC Armory
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Desert BK Chest
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Swamp Flooded Chests
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT DM's Tile
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Randoroom
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Warp Maze
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Freezors
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Hookpit
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; HC Catawalk
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Desert Right Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Left
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Hopeful Torch
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Right
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Lonely Freezor
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Vitreous (x90)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Rain
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Dark Crystals
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Blockswitch
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Fallbridge
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Torch Cross
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Darkness
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Warp Maze 2
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Invis Bridge
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Compass Room
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Big Chests
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Icy Pots
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Pre-Vitreous (xa0)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Fishbone
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Bridges
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Corner
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Trinexx (xa4)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; GT Wizzrobes
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Compass (xa8)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Courtyard (xa9)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Map (xaa)
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT Switch
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Blind
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Iced T
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Slipway
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Warpzone
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire ????
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Spikes
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Refill
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Dark Maze
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Chainchomp
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Rollers
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Big Key
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Easter Cannonball
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Dark Circle
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT Hellway
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT Bossway
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Blockswitch
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Backtracker
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Tiles
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Main Hub
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire Big Chest
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Switch Maze
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Narrow
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Early Hub
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Floating Torches
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Armos
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT NW Quad
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT NE Quad
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Ice Boss Drop
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire BK
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Mire 2
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Laser Bridge
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TR Main Entrance
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Eyegores
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Attic Switches
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; Eastern Attic Start
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT Entrance Quad
dw $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000, $8000 ; TT SE Quad
; this should end at 27AE10 about
; some values you can hardcode
;dw $0070, $36a0 ; ->HC Stairwell
;dw $0072, $4ff8 ; ->HC Map Room
;dw $0080, $1f50 ; ->zelda's cellblock
org $27B000
SpiralTable:
dw $0203, $8080 ;HC Backhallway
dw $0203, $8080 ;Sewer Pull
dw $0203, $8080 ;Crystaroller
dw $0203, $8080 ;Moldorm
dw $0203, $8080, $0203, $8080 ;Pod Basement
dw $0203, $8080 ;Pod Stalfos
dw $0203, $8080, $0203, $8080, $0203, $8080 ;GT Entrance
dw $0203, $8080 ;Ice Entrance
dw $0203, $8080 ;Escape
dw $0203, $8080 ;TR Pipe Ledge
dw $0203, $8080 ;Swamp Way
dw $0203, $8080, $0203, $8080 ;Hera Fallplace
dw $0203, $8080, $0203, $8080 ;PoD Bridge
dw $0203, $8080 ;GT Ice
dw $0203, $8080 ;GT F8
dw $0203, $8080 ;Ice Cross
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Swamp Statue
dw $0203, $8080, $0203, $8080 ;Hera Big
dw $0203, $8080 ;Swamp Ent
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Hera Startiles (middle value unused)
dw $0203, $8080 ;West Swamp
dw $0203, $8080 ;Swamp Basement
dw $0203, $8080 ;Pod Drops
dw $0203, $8080 ;Ice Hammer
dw $0203, $8080 ;Aga Guards
dw $0203, $8080 ;Sewer Begin
dw $0203, $8080 ;Sewer Rope
dw $0203, $8080 ;TT Cellblock
dw $0203, $8080, $0203, $8080 ;Pod Entrance
dw $0203, $8080 ;GT Icespike
dw $0203, $8080 ;GT Moldorm
dw $0203, $8080 ;IPBJ
dw $0203, $8080 ;Desert Prep
dw $0203, $8080 ;Swamp Attic
dw $0203, $8080 ;GT Cannonball
dw $0203, $8080 ;GT Gauntlet1
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;Ice U (1st three values unused)
dw $0203, $8080 ;Desert Back
dw $0203, $8080 ;TT Attic L
dw $0203, $8080 ;Swamp Waterf
dw $0203, $8080 ;Pod Rupees
dw $0203, $8080 ;Pod Rupees
dw $0203, $8080 ;GT Mimics
dw $0203, $8080 ;GT Lanmo
dw $0203, $8080 ;Ice Gators
dw $0203, $8080, $0203, $8080, $0203, $8080 ;HC Tiny (first value placeholder)
dw $0203, $8080 ;HC Boomer
dw $0203, $8080 ;HC Pits1
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Swamp Sunken
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;Hera Entrance (first value unused)
dw $0203, $8080 ;Ice Hookshot
dw $0203, $8080 ;HC Cellblock
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;Hera Basement (first and third values unused)
dw $0203, $8080, $0203, $8080, $0203, $8080, $0203, $8080 ;GT Circle (third value unused)
dw $0203, $8080 ;Ice Last Freeze
dw $0203, $8080 ;Mire Drops
dw $0203, $8080 ;Mire Block
dw $0203, $8080 ;Mire Attic
dw $0203, $8080 ;Mire Entrance
dw $0203, $8080 ;East Dark
dw $0203, $8080 ;Ice Big
dw $0203, $8080 ;Mire Previtreous
dw $0203, $8080 ;Mire Bridges
dw $0203, $8080 ;GT Wizzrobes
dw $0203, $8080 ;GT Spikepit
dw $0203, $8080 ;TT Switch
dw $0203, $8080 ;Ice T
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Tower Usains (2nd value unused)
dw $0203, $8080 ;TR PlatMaze
dw $0203, $8080 ;TR Chainchomp
dw $0203, $8080 ;TT Bossway
dw $0203, $8080 ;Ice FallZone
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Tower Dark2 (2nd value unused)
dw $0203, $8080, $0203, $8080, $0203, $8080 ;Tower Dark1 (2nd value unused)
dw $0203, $8080 ;Mire BK Thang
dw $0203, $8080 ;Mire2
dw $0203, $8080 ;East Attic Start
dw $0203, $8080 ;Tower Entrance

47
asm/gfx.asm Normal file
View File

@@ -0,0 +1,47 @@
GfxFixer:
{
lda $b1 : bne .stage2
jsl Dungeon_InitStarTileCh
jsl LoadTransAuxGfx
;jsl Dungeon_LoadCustomTileAttr
jsl PrepTransAuxGfx
lda #$09 : sta $17 : sta $0710
inc $b1
rtl
.stage2
cmp #$01 : bne .stage3
lda #$0a : sta $17 : sta $0710
inc $b1
rtl
.stage3
jsl Palette_SpriteAux3
jsl Palette_SpriteAux2
jsl Palette_SpriteAux1
jsl Palette_DungBgMain
jsr CgramAuxToMain
stz $b1 : inc $b0
rtl
}
CgramAuxToMain: ; ripped this from bank02 because it ended with rts
{
rep #$20
ldx.b #$00
.loop
lda $7EC300, X : sta $7EC500, x
lda $7EC340, x : sta $7EC540, x
lda $7EC380, x : sta $7EC580, x
lda $7EC3C0, x : sta $7EC5C0, x
lda $7EC400, x : sta $7EC600, x
lda $7EC440, x : sta $7EC640, x
lda $7EC480, x : sta $7EC680, x
lda $7EC4C0, x : sta $7EC6C0, x
inx #2 : cpx.b #$40 : bne .loop
sep #$20
; tell NMI to upload new CGRAM data
inc $15
rts
}

126
asm/spiral.asm Normal file
View File

@@ -0,0 +1,126 @@
SpiralWarp:
{
pha : lda $040c : cmp.b #$ff : beq .abort ; abort if not in dungeon
cmp #$06 : bcs .abort ; abort if not supported yet -- todo: this needs to be altered/removed as more dungeons are implemented
lda $0e : cmp #$5e : beq .gtg ; abort if not spiral - intended room is in A!
cmp #$5f : beq .gtg
.abort pla : sta $a0 : bra .end
.gtg
pla
phb : phk : plb : phx : phy ; push stuff
jsr LookupSpiralOffset
rep #$30 : and #$00FF : asl #2 : tax
lda SpiralTable, x : sta $00
lda SpiralTable+2, x : sta $02
sep #$30
lda $00 : sta $a0
; shift quadrant if necessary
lda $01 : and #$01 : !sub $a9
beq .skipXQuad
sta $06 : !add $a9 : sta $a9
ldy #$00 : jsr ShiftQuadSimple
.skipXQuad
lda $01 : and #$02 : lsr : sta $06 : lda $aa : lsr : !sub $06
beq .skipYQuad
sta $06 : asl : !add $aa : sta $aa
ldy #$01 : jsr ShiftQuadSimple
.skipYQuad
; shift lower coordinates
lda $02 : sta $22
lda $03 : sta $20
ldy #$00 : jsr SetCamera ; todo: figure out camera jazz
ldy #$01 : jsr SetCamera
ply : plx : plb ; pull the stuff we pushed
.end
; this is the code we are hijacking
; lda $a0 - we overwrote this behavior
lda $063d, x
rtl
}
;Sets the offset in A
LookupSpiralOffset:
{
;where link currently is in $a2: quad in a8 & #$03
;count doors
stz $00 : ldx #$00 : stz $01
.loop
lda $047e, x : cmp $00 : bcc .continue
sta $00
.continue inx #2
cpx #$08 : bcc .loop
lda $00 : lsr
cmp #$01 : beq .done
; look up the quad
lda $a8 : and #$03 : beq .quad0
cmp #$01 : beq .quad1
cmp #$02 : beq .quad2
cmp #$03 : beq .quad3
.quad0
inc $01 : lda $22 : cmp #$98 : bcc .done ;gt ent and hc stairwell
inc $01 : bra .done
.quad1
lda $22 : cmp #$78 : bcc .done ;swamp/pod dual stairs
inc $01 : bra .done
.quad2 ;ice room
lda #$03 : sta $01
lda $22 : cmp #$78 : bcc .done
inc $01 : bra .done
.quad3 lda #$02 : sta $01 ; always 2
.done
lda $a2 : tax : lda SpiralOffset,x
!add $01 ;add a thing (0 in .easy)
rts
}
ShiftQuadSimple:
{
lda CoordIndex,y : tax
lda $21,x : !add $06 : sta $21,x ; coordinate update
lda CamQuadIndex,y : tax
lda $0601,x : !add $06 : sta $0601,x
lda $0605,x : !add $06 : sta $0605,x ; high bytes of these guys
rts
}
SetCamera:
{
stz $04 : sty $05
lda $01 : and #$10 : !add $05 : cmp #$10 : beq .done ; zeroHzCam check (10+0 = 10)
lda $01 : and #$20 : !add $05 : cmp #$21 : beq .done ; zeroVtCam check (20+1 = 21)
tyx : lda $a9,x : bne .nonZeroHalf
lda CamQuadIndex,y : tax : lda $607,x : pha
lda CameraIndex,y : tax : pla : cmp $e3, x : bne .noQuadAdj
dec $e3,x
.noQuadAdj
lda CoordIndex,y : tax
lda $20,x : cmp #$79 : bcc .adjust
!sub #$78 : sta $04 : bra .adjust
.nonZeroHalf ;meaning either right half or bottom half
lda CoordIndex,y : tax
lda $20,x : cmp #$78 : bcs .setQuad
!add #$78 : sta $04 : bra .adjust
.setQuad
lda CamQuadIndex,y : tax : lda $0607, x : pha
lda CameraIndex,y : tax : pla : sta $e3, x : bra .done
.adjust
lda CameraIndex,y : tax
.done lda $04 : sta $e2,x
rts
}