1 Commits

206 changed files with 14341 additions and 56785 deletions

168
.gitignore vendored
View File

@@ -1,159 +1,9 @@
asar.exe
oos111.sfc
oos111x-1.bst
oos111x-2.bst
oos111x-3.bst
oos111x.bp
oos111x.cht
oos111x.cpu.sym
oos111x.sfc
oos111x.smp.sym
oos111x.srm
oos111x.sym
zcompress.exe
oos165.sfc
oos165x-1.bst
oos165x-2.bst
oos165x-3.bst
oos165x.bp
oos165x.cpu.sym
oos165x.sfc
oos165x.smp.sym
oos165x.srm
buildJ.bat
oos165x.cht
Roms
Dungeons/Assets
Items/gfx/jump_frames.xcf
Masks/etc
Menu/rings/
Overworld/project_files/DarkWorldMainSet.xcf
Sprites/Project Files/
Thumbs.db
.favorites.json
Dungeons/Assets/
Roms/oos111.bps
Roms/oos112.sfc
Sprites/Enemies/deku_scrub_enemy.zsm
Dungeons/Objects/object_files/kydreeok_body.zob
Sprites/Objects/Minecart/
Util/tools
Util/rom_map.txt
Sprites/NPCs/korok_hollo.asm
Sprites/NPCs/korok_makar.asm
Sprites/NPCs/korok_rown.asm
Overworld/world_map/test_dw.bmp
Overworld/world_map/zelda3.sfc
Overworld/world_map/maptest.bmp
Sprites/Objects/whirlpool_export.asm
Sprites/Objects/ice_block_export.asm
Masks/gfx/[108]tlp11
Masks/gfx/extra/
Overworld/project_files/OverworldCastleBridge.png
Overworld/project_files/OverworldCastleBridge.xcf
Overworld/gfx/boat2_1.bin
Overworld/gfx/boat2_3.bin
Overworld/gfx/boat2_4.bin
Overworld/gfx/boat2_2.bin
Sprites/NPCs/zora_princess_proj.zsm
Util/SpcToASM/SpcConverter.deps.json
Util/SpcToASM/SpcConverter.dll
Util/SpcToASM/SpcConverter.exe
Util/SpcToASM/SpcConverter.pdb
Util/SpcToASM/SpcConverter.runtimeconfig.json
Masks/gfx/deku_link.pal
Masks/gfx/deku_new.pal
Masks/gfx/dekulinkpal.pal
Masks/gfx/dekulinkpal.pal.bak
Masks/gfx/gbc-link.pal
Masks/gfx/image.bin
Masks/gfx/image.png
Overworld/project_files/zora_overlay_2.zsa
Overworld/project_files/zora_temple_overlay.zsa
Sprites/wolfos_export.asm
Sprites/wolf_boss.zsm
Sprites/NPCs/project_files/korok_hollo.asm
Sprites/NPCs/project_files/korok_makar.asm
Sprites/NPCs/project_files/korok_rown.asm
Sprites/NPCs/project_files/zora_princess_proj.zsm
Util/zelda3.sfc
Util/templatemusic.asm
Util/ZSCustomOverworld.asm
Sprites/Objects/Project Files/ice_block_export.asm
Sprites/Objects/Project Files/whirlpool_export.asm
Overworld/world_map/dw_gfx_new.bmp
Menu/tilemaps/dung_map.bin
Dungeons/intro_cutscene.asm
Dungeons/water_switch.asm
run.sh
Sprites/Bosses/left_kydreeok_head.asm
Sprites/Bosses/kydreeok_wings.asm
Sprites/Bosses/kydreeok_body.zsm
Sprites/Bosses/dark_link.pal
Sprites/NPCs/deku_scrub_npcs.asm
Sprites/Enemies/anti_kirby_v2.asm
Masks/gfx/gbc_dark_link.4bpp
Sprites/kydrog_intro.asm
Util/ZScreamNew/ZScream.exe
Util/ZScreamNew/ZSCustomOverworld.asm
Util/dark_link.bin
Sprites/NPCs/project_files/deku_scrub_npcs.asm
Util/ZScreamNew/asar.dll
Util/ZScreamNew/CustomCollision.asm
Util/ZScreamNew/debug.asm
Util/ZScreamNew/DefaultNames.txt
Util/ZScreamNew/DW.png
Util/ZScreamNew/Lidgren.Network.dll
Util/ZScreamNew/Lidgren.Network.pdb
Util/ZScreamNew/Logs.txt
Util/ZScreamNew/LW.png
Util/ZScreamNew/MapTest.png
Util/ZScreamNew/newgraves.asm
Util/ZScreamNew/ScratchPad.dat
Util/ZScreamNew/SP.png
Util/ZScreamNew/spritesmove.asm
Util/ZScreamNew/tempPatch.asm
Util/ZScreamNew/ZScream.application
Util/ZScreamNew/ZScream.exe.config
Util/ZScreamNew/ZScream.exe.manifest
Util/ZScreamNew/ZS_Patches/Version.txt
Util/ZScreamNew/ZS_Patches/Hex Edits/Misc Small Patches.asm
Util/ZScreamNew/ZS_Patches/Items/AST Boots.asm
Util/ZScreamNew/ZS_Patches/Misc/Big Bomb Requirements.asm
Util/ZScreamNew/ZS_Patches/Misc/IntroSkip.asm
Util/ZScreamNew/ZS_Patches/Misc/JP1.0 Glitches.asm
Util/ZScreamNew/ZS_Patches/Misc/Link Bed Start Position.asm
Util/ZScreamNew/ZS_Patches/Misc/NoRocks.asm
Util/ZScreamNew/ZS_Patches/Misc/Rainstate Skip.asm
Util/ZScreamNew/ZS_Patches/Misc/TorchTags.asm
Util/ZScreamNew/ZS_Patches/Misc/Weathervane.asm
Util/ZScreamNew/ZS_Patches/Music/LostWoodsExitMusic.asm
Util/ZScreamNew/ZS_Patches/Npcs/Bottle Vendor.asm
Util/ZScreamNew/ZS_Patches/Sprites/Crystalswitch Conveyor.asm
Util/ZScreamNew/ZS_Patches/Sprites/Elemental Trinexx.asm
Util/ZScreamNew/ZS_Patches/Sprites/Eye Lasers Active.asm
Util/ZScreamNew/ZS_Patches/Sprites/Khodstare Speeds.asm
Util/ZScreamNew/ZS_Patches/Sprites/Spike Damage.asm
Util/ZScreamNew/ZS_Patches/Sprites/Spikes_Subtype.asm
Sprites/Bosses/bigchuchu_grow.asm
Sprites/Bosses/manhandla_chuchu_blast.asm
Sprites/Bosses/manhandla_export_2.asm
Sprites/Bosses/manhandla_export.asm
Music/Z3_SongOfHealingThemeV1-00.asm
Dungeons/experimental/HitBoxProperties.asm
Dungeons/experimental/intro_cutscene.asm
Dungeons/experimental/KillSprites
Dungeons/experimental/warpswitch.asm
Dungeons/experimental/water_switch.asm
Overworld/weathervane.asm
Util/banana.asm
Menu/tilemaps/sheet.png
Sprites/NPCs/project_files/eon_owl.zsm
Music/wip/oot_title.asm
Music/wip/phantom_ganon.asm
Music/wip/template_song.asm
Music/wip/twinrova_battle.asm
Sprites/NPCs/piratian.zsm
Masks/gfx/moosh.png
Masks/gfx/moosh.pal
Dungeons/DungeonMaps.asm
*.exe
*.bst
*.bp
*.cht
*.cpu.sym
*.sfc
*.smp.sym
*.srm
*.sym

View File

@@ -1,274 +0,0 @@
; ==============================================================================
; SNES Hardware Registers
; ==============================================================================
; Shorthand legend:
; Addr = Address
; APU = Audio Processing Unit
; BG = BackGround
; CGRAM = Color Generator RAM
; Des = Designation
; H = Horizontal
; HDMA = Horizontal Direct Memory Access
; HV = H/V or Horizontal/Vertical
; Init = Initial
; IO = I/O or Input/Output
; IRQ = Interupt ReQuest
; NMI = Non-Maskable Interupt
; Num = Number
; MULT = Multiply/Multiplication
; OAM = Object Attribute Memory
; OBJ = Object
; Pos = Position
; PPU = Picture Processing Unit
; V = Vertical
; Val = Value
; VRAM = Video RAM
; Names taken from:
; https://en.wikibooks.org/wiki/Super_NES_Programming/SNES_Hardware_Registers
; Further details on each register can be found here:
; https://github.com/gilligan/snesdev/blob/master/docs/snes_registers.txt
; https://www.youtube.com/watch?v=-4OOuRvTXrM&t=167s
org $7E2100 ; Remove for asar 2.0.
struct SNES $7E2100
{
.ScreenDisplay: skip $01 ; $2100
.OAMSizeAndDataDes: skip $01 ; $2101
.OAMAccessAddr: skip $02 ; $2102
.OMADataWrite: skip $01 ; $2104
.BGModeAndTileSize: skip $01 ; $2105
.MosaicAndBGEnable: skip $01 ; $2106
.BG1AddrAndSize: skip $01 ; $2107
.BG2AddrAndSize: skip $01 ; $2108
.BG3AddrAndSize: skip $01 ; $2109
.BG4AddrAndSize: skip $01 ; $210A
.BG1And2TileDataDes: skip $01 ; $210B
.BG3And4TileDataDes: skip $01 ; $210C
.BG1HScrollOffset: skip $01 ; $210D
.BG1VScrollOffset: skip $01 ; $210E
.BG2HScrollOffset: skip $01 ; $210F
.BG2VScrollOffset: skip $01 ; $2110
.BG3HScrollOffset: skip $01 ; $2111
.BG3VScrollOffset: skip $01 ; $2112
.BG4HScrollOffset: skip $01 ; $2113
.BG4VScrollOffset: skip $01 ; $2114
.VRAMAddrIncrementVal: skip $01 ; $2115
.VRAMAddrReadWriteLow: skip $01 ; $2116
.VRAMAddrReadWriteHigh: skip $01 ; $2117
.VRAMDataWriteLow: skip $01 ; $2118
.VRAMDataWriteHigh: skip $01 ; $2119
.Mode7Init skip $01 ; $211A
.Mode7MatrixA skip $01 ; $211B
.Mode7MatrixB skip $01 ; $211C
.Mode7MatrixC skip $01 ; $211D
.Mode7MatrixD skip $01 ; $211E
.Mode7CenterPosX skip $01 ; $211F
.Mode7CenterPosY skip $01 ; $2120
.CGRAMWriteAddr skip $01 ; $2121
.CGRAMWriteData skip $01 ; $2122
.BG1And2WindowMask skip $01 ; $2123
.BG3And4WindowMask skip $01 ; $2124
.OBJAndColorWindow skip $01 ; $2125
.Window1LeftPosDes skip $01 ; $2126
.Window1RightPosDes skip $01 ; $2127
.Window2LeftPosDes skip $01 ; $2128
.Window2RightPosDes skip $01 ; $2129
.BG123And4WindowLogic skip $01 ; $212A
.ColorAndOBJWindowLogic skip $01 ; $212B
.BGAndOBJEnableMainScreen skip $01 ; $212C
.BGAndOBJEnableSubScreen skip $01 ; $212D
.WindowMaskDesMainScreen skip $01 ; $212E
.WindowMaskDesSubScreen skip $01 ; $212F
.InitColorAddition skip $01 ; $2130
.AddSubtractSelectAndEnable skip $01 ; $2131
.FixedColorData skip $01 ; $2132
.ScreenInit skip $01 ; $2133
.MultResultLow skip $01 ; $2134
.MultResultMid skip $01 ; $2135
.MultResultHigh skip $01 ; $2136
.HVCounterSoftwareLatch skip $01 ; $2137
.OAMReadDataLowHigh skip $01 ; $2138
.VRAMReadDataLow skip $01 ; $2139
.VRAMReadDataHigh skip $01 ; $213A
.CGRAMReadDataLowHigh skip $01 ; $213B
.HCounterData skip $01 ; $213C
.VCounterData skip $01 ; $213D
.PPUStatusFlag1 skip $01 ; $213E
.PPUStatusFlag2 skip $01 ; $213F
.APUIOPort0 skip $01 ; $2140
.APUIOPort1 skip $01 ; $2141
.APUIOPort2 skip $01 ; $2142
.APUIOPort3 skip $01 ; $2143
base $2180
.IndirectWorkRAMPort: skip $01 ; $2180
.IndirectWorkRAMAddrLow: skip $01 ; $2180
.IndirectWorkRAMAddrMid: skip $01 ; $2180
.IndirectWorkRAMAddrHigh: skip $01 ; $2180
base $4200
.NMIVHCountJoypadEnable: skip $01 ; $4200
.ProgrammableIOPortOut: skip $01 ; $4201
.MultiplicandA: skip $01 ; $4202
.MultiplierB: skip $01 ; $4203
.DividendLow: skip $01 ; $4204
.DividendHigh: skip $01 ; $4205
.DivisorB: skip $01 ; $4206
.HCountTimer: skip $01 ; $4207
.HCountTimerMSB: skip $01 ; $4208
.VCountTImer: skip $01 ; $4209
.VCountTimerMSB: skip $01 ; $420A
.DMAChannelEnable: skip $01 ; $420B
.HDMAChannelEnable: skip $01 ; $420C
.CycleSpeedDes: skip $01 ; $420D
base $4210
.NMIFlagAndCPUVersionNum: skip $01 ; $4210
.IRQFlagByHVCountTimer: skip $01 ; $4211
.HVBlankFlagsAndJoyStatus: skip $01 ; $4212
.ProgrammableIOPortIn: skip $01 ; $4213
.DivideResultQuotientLow: skip $01 ; $4214
.DivideResultQuotientHigh: skip $01 ; $4215
.RemainderResultLow: skip $01 ; $4216
.RemainderResultHigh: skip $01 ; $4217
.JoyPad1DataLow: skip $01 ; $4218
.JoyPad2DataLow: skip $01 ; $4219
.JoyPad3DataLow: skip $01 ; $421A
.JoyPad4DataLow: skip $01 ; $421B
.JoyPad1DataHigh: skip $01 ; $421C
.JoyPad2DataHigh: skip $01 ; $421D
.JoyPad3DataHigh: skip $01 ; $421E
.JoyPad4DataHigh: skip $01 ; $421F
}
endstruct
struct DMA $7E4300
{
; Channel 0
.0_TransferParameters: skip $01 ; $4300
.0_DestinationAddr: skip $01 ; $4301
.0_SourceAddrOffsetLow: skip $01 ; $4302
.0_SourceAddrOffsetHigh: skip $01 ; $4303
.0_SourceAddrBank: skip $01 ; $4304
.0_TransferSizeLow: skip $01 ; $4305
.0_TransferSizeHigh: skip $01 ; $4306
.0_DataBank: skip $01 ; $4307
.0_TableAddrLow: skip $01 ; $4308
.0_TableAddrHigh: skip $01 ; $4309
.0_TransferLineNum: skip $01 ; $430A
base $4310 ; Channel 1
.1_TransferParameters: skip $01 ; $4310
.1_DestinationAddr: skip $01 ; $4311
.1_SourceAddrOffsetLow: skip $01 ; $4312
.1_SourceAddrOffsetHigh: skip $01 ; $4313
.1_SourceAddrBank: skip $01 ; $4314
.1_TransferSizeLow: skip $01 ; $4315
.1_TransferSizeHigh: skip $01 ; $4316
.1_DataBank: skip $01 ; $4317
.1_TableAddrLow: skip $01 ; $4318
.1_TableAddrHigh: skip $01 ; $4319
.1_TransferLineNum: skip $01 ; $431A
base $4320 ; Channel 2
.2_TransferParameters: skip $01 ; $4320
.2_DestinationAddr: skip $01 ; $4321
.2_SourceAddrOffsetLow: skip $01 ; $4322
.2_SourceAddrOffsetHigh: skip $01 ; $4323
.2_SourceAddrBank: skip $01 ; $4324
.2_TransferSizeLow: skip $01 ; $4325
.2_TransferSizeHigh: skip $01 ; $4326
.2_DataBank: skip $01 ; $4327
.2_TableAddrLow: skip $01 ; $4328
.2_TableAddrHigh: skip $01 ; $4329
.2_TransferLineNum: skip $01 ; $432A
base $4330 ; Channel 3
.3_TransferParameters: skip $01 ; $4330
.3_DestinationAddr: skip $01 ; $4331
.3_SourceAddrOffsetLow: skip $01 ; $4332
.3_SourceAddrOffsetHigh: skip $01 ; $4333
.3_SourceAddrBank: skip $01 ; $4334
.3_TransferSizeLow: skip $01 ; $4335
.3_TransferSizeHigh: skip $01 ; $4336
.3_DataBank: skip $01 ; $4337
.3_TableAddrLow: skip $01 ; $4338
.3_TableAddrHigh: skip $01 ; $4339
.3_TransferLineNum: skip $01 ; $433A
base $4340 ; Channel 4
.4_TransferParameters: skip $01 ; $4340
.4_DestinationAddr: skip $01 ; $4341
.4_SourceAddrOffsetLow: skip $01 ; $4342
.4_SourceAddrOffsetHigh: skip $01 ; $4343
.4_SourceAddrBank: skip $01 ; $4344
.4_TransferSizeLow: skip $01 ; $4345
.4_TransferSizeHigh: skip $01 ; $4346
.4_DataBank: skip $01 ; $4347
.4_TableAddrLow: skip $01 ; $4348
.4_TableAddrHigh: skip $01 ; $4349
.4_TransferLineNum: skip $01 ; $434A
base $4350 ; Channel 5
.5_TransferParameters: skip $01 ; $4350
.5_DestinationAddr: skip $01 ; $4351
.5_SourceAddrOffsetLow: skip $01 ; $4352
.5_SourceAddrOffsetHigh: skip $01 ; $4353
.5_SourceAddrBank: skip $01 ; $4354
.5_TransferSizeLow: skip $01 ; $4355
.5_TransferSizeHigh: skip $01 ; $4356
.5_DataBank: skip $01 ; $4357
.5_TableAddrLow: skip $01 ; $4358
.5_TableAddrHigh: skip $01 ; $4359
.5_TransferLineNum: skip $01 ; $435A
base $4360 ; Channel 6
.6_TransferParameters: skip $01 ; $4360
.6_DestinationAddr: skip $01 ; $4361
.6_SourceAddrOffsetLow: skip $01 ; $4362
.6_SourceAddrOffsetHigh: skip $01 ; $4363
.6_SourceAddrBank: skip $01 ; $4364
.6_TransferSizeLow: skip $01 ; $4365
.6_TransferSizeHigh: skip $01 ; $4366
.6_DataBank: skip $01 ; $4367
.6_TableAddrLow: skip $01 ; $4368
.6_TableAddrHigh: skip $01 ; $4369
.6_TransferLineNum: skip $01 ; $436A
base $4370 ; Channel 7
.7_TransferParameters: skip $01 ; $4370
.7_DestinationAddr: skip $01 ; $4371
.7_SourceAddrOffsetLow: skip $01 ; $4372
.7_SourceAddrOffsetHigh: skip $01 ; $4373
.7_SourceAddrBank: skip $01 ; $4374
.7_TransferSizeLow: skip $01 ; $4375
.7_TransferSizeHigh: skip $01 ; $4376
.7_DataBank: skip $01 ; $4377
.7_TableAddrLow: skip $01 ; $4378
.7_TableAddrHigh: skip $01 ; $4379
.7_TransferLineNum: skip $01 ; $437A
}
endstruct
; ==============================================================================

View File

@@ -1,185 +0,0 @@
; =========================================================
; Link RAM and Functions
LinkY = $20 ; Position Y of link
LinkYH = $21 ; High position Y of link
LinkX = $22 ; Position X of link
LinkXH = $23 ; High position X of link
LinkZ = $24 ; Position Z of link
; ----UDLR
; [U Up][D Down][L Left][R Right]
; Direction link is pushing against
LinkPushDir = $26
; Link's recoiling speed
; By themselves, these do not do much
; They will be reset every frame Link is not in recoil state
LinkRecoilY = $27
LinkRecoilX = $28
LinkRecoilZ = $29
; Link's subpixel velocity
; when this value overflows, Link's main velocity gains an extra pixel
; reset on direction change, so not really a positional subpixel
LinkSubVelY = $2A
LinkSubVelX = $2B
; Direction link is facing
; 00:Up, 02:Down, 04:Left, 06:Right
LinkFaceDir = $2F
; Last direction link moved towards
; 00:Up, 01:Down, 02:Left, 03:Right
LinkLastDir = $66
; ----UDLR
; [U Up][D Down][L Left][R Right]
; direction link is "walking towards"
LinkMoveDir = $67
; 0: Not moving, 1: Moving cardinal, 2: Moving diagonally
LinkMoveInfo = $6A
LinkVisible = $4B ; if set to 0x0C link will be invisible
LinkBunnyGfx = $56 ; if set to 1 link will be bunny, otherwise link
; 0x00: normal speed, 0x01-0x0F: slow,<2C>> 0x10:fast
LinkSpeed = $57
; 0x00: normal speed, 0x02: walking on stair speed, 0x10: dashing speed
LinkSpeedTbl = $5E
; if is set to 0x02 or 0x03 link is falling
LinkFalling = $5B
FallTimer = $5C
; LinkState_Default : 0x00
; LinkState_Pits : 0x01
; LinkState_Recoil : 0x02
; LinkState_SpinAttack : 0x03
; LinkState_Swimming : 0x04 (ZoraDive)
; LinkState_OnIce : 0x05
; LinkState_Recoil : 0x06
; LinkState_Zapped : 0x07
; LinkState_UsingEther : 0x08
; LinkState_UsingBombos : 0x09
; LinkState_UsingQuake : 0x0A (DekuHover)
; LinkState_HoppingSouthOW : 0x0B
; LinkState_HoppingHorizontallyOW : 0x0C
; LinkState_HoppingDiagonallyUpOW : 0x0D
; LinkState_HoppingDiagonallyDownOW : 0x0E
; LinkState_0F : 0x0F
; LinkState_0F : 0x10
; LinkState_Dashing : 0x11
; LinkState_ExitingDash : 0x12
; LinkState_Hookshotting : 0x13
; LinkState_CrossingWorlds : 0x14
; LinkState_ShowingOffItem : 0x15
; LinkState_Sleeping : 0x16
; LinkState_Bunny : 0x17
; LinkState_HoldingBigRock : 0x18
; LinkState_ReceivingEther : 0x19
; LinkState_ReceivingBombos : 0x1A
; LinkState_ReadingDesertTablet : 0x1B
; LinkState_TemporaryBunny : 0x1C
; LinkState_TreePull : 0x1D
; LinkState_SpinAttack : 0x1E
LinkState = $5D
; 0: Link is not in a doorway
; 1: is in a vertical doorway
; 2: is in horizontal doorway
LinkDoorway = $6C
; 0: Nothing
; 1: a hand in the air
; 2: 2 hands in the air (like getting triforce)
LinkGrabGfx = $02DA
; if not 0 add a poof gfx on link
LinkPoofGfx = $02E1
; Bunny timer for link before transforming back
LinkBunTimer = $02E2
; if not 0 prevent link from moving and opening the menu
LinkMenuMove = $02E4
; if not 0 prevent link from getting any damages from sprites
LinkDamage = $037B
; ----CCCC
; [C Touching chest id]
LinkColChest = $02E5
; 0: Not on somaria platform, 2: On somaria platform
LinkSomaria = $02F5
; BP-AETHR
; [B Boomerang][P Powder]
; [A Bow&Arrows][E UnusedItem]
; [T UnusedItem][H Hammer][R Rods]
LinkItemUse = $0301
LinkItemY = $0303 ; Currently equipped item on the Y button
; 0: Nothing, 1:Picking up something, 2: Throwing something
LinkCarrying = $0308
; .... ..tl
; t - tossing object
; l - lifting object
LinkCarryOrToss = $0309
; 0: Normal
; 1: Shovel
; 2: Praying
; 4: Hookshot
; 8: Somaria
; 10: Bug net
; 20: Read book
; 40: Tree pull
LinkAnim = $037A
LinkWallCheat = $037F ; If non zero can walk through walls
; Animation step/graphics for spin attack animations; including medallions.
LinkSpinGfx = $031C
LinkSpinStep = $031D
; =========================================================
Link_ReceiveItem = $0799AD ; Y = item id
Link_CancelDash = $0791B9
Link_Initialize = $07F13C
Link_ResetProperties_A = $07F1A3
Link_ResetProperties_B = $07F1E6
Link_ResetProperties_C = $07F1FA
Link_ResetSwimmingState = $07983A
Link_ResetStateAfterDamagingPit = $07984B
Link_ItemReset_FromOverworldThings = $07B107
Link_CalculateSFXPan = $0DBB67
; Used by Agahnim2 fight
CallForDuckIndoors = $07A45F
ApplyLinksMovementToCamera = $07E9D3
HandleIndoorCameraAndDoors = $07F42F
Link_HandleVelocityAndSandDrag = $07E3DD
Link_HandleMovingAnimation_FullLongEntry = $07E6A6
Link_HandleMovingAnimation_General = $07E765
Link_HandleMovingAnimationSwimming = $07E7FA
LinkHop_FindArbitraryLandingSpot = $07E370
CheckIfLinkIsBusy = $07F4D0
Refund_Magic = $07B0E9
Hookshot_CheckTileCollision = $07D576

View File

@@ -1,142 +0,0 @@
; Expanded Message Bank
; Special thanks to Zarby89
!addr = $0EF3FF
!looprun = $00
while !looprun == $00
if read1(!addr) == $7F
!addr #= !addr+1
;print hex(!addr) ; DEBUG LINE
!looprun = $01
endif
!addr #= !addr-1
endwhile
; Temporary fix for the message bank
; ZS does not clear message data when bank is changed
; So the end of the data bank is not as easily searchable.
org $0EEE75 : db $80
org !addr+1 : db $80
org $0ED436
JML MessageExpand
NOP #$06
org $2F8000
MessageExpand:
{
; are we already in expanded bank?
LDA.b $02 : AND.w #$00FF : CMP.w #$000E : BNE +
LDA.w #MessageExpandedData : STA.b $00
LDA.w #MessageExpandedData>>16 : STA.b $02
JML $0ED3FC ; go back to original read message code pointers
+
; Restore vanilla code
LDA.w #$DF40 : STA.b $00
LDA.w #$000E : STA.b $02
JML $0ED3FC ; go back to original read message code pointers
}
MessageExpandedData:
Message_18D:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $00, $21, $42, $59, $E3, $59, $2D, $21, $A6, $1E, $3E, $76, $03, $28, $59, $E3, $59, $D0, $1E, $24, $59, $BD, $29, $2C, $42, $59, $26, $32, $59, $1F, $2B, $22, $A5, $1D, $3F, $7E, $73, $13, $B4, $20, $25, $1E, $59, $AE, $59, $DB, $1A, $2F, $1E, $25, $A4, $1F, $1A, $2B, $59, $90, $73, $E2, $1D, $1E, $59, $1A, $1C, $2B, $28, $2C, $2C, $59, $0A, $1A, $25, $32, $31, $28, $59, $DA, $59, $1C, $B1, $2B, $2D, $73, $D8, $59, $2E, $27, $B8, $27, $3E, $59, $05, $C8, $59, $1A, $59, $2C, $26, $8E, $1F, $1E, $1E, $42, $7E, $73, $C6, $59, $1C, $28, $2E, $2B, $D0, $43, $73, $88, $44, $59, $16, $21, $91, $9F, $59, $E3, $59, $AD, $3F, $73, $88, $89, $08, $51, $26, $59, $28, $24, $1A, $32, $41, $68, $7F
Message_18E:
db $00, $21, $42, $59, $1A, $59, $30, $B5, $1E, $59, $1C, $21, $28, $22, $1C, $1E, $3E, $75, $16, $B6, $21, $59, $2D, $B0, $2C, $59, $BD, $29, $42, $59, $27, $28, $59, $D0, $1C, $CE, $2D, $76, $E2, $25, $25, $59, $97, $59, $B0, $1D, $1D, $A0, $A9, $26, $59, $E3, $3E, $7E, $73, $09, $2E, $D3, $59, $21, $8C, $28, $2F, $A1, $D8, $59, $2B, $DC, $1E, $1E, $2C, $73, $8C, $25, $1E, $2D, $59, $D8, $59, $1A, $1D, $2F, $A3, $2E, $CD, $97, $20, $B4, $3E, $7F
Message_18F:
db $0E, $21, $59, $1D, $A2, $41, $41, $41, $75, $08, $2D, $59, $D0, $1E, $26, $2C, $59, $E3, $2B, $59, $29, $28, $9C, $1E, $2D, $2C, $59, $8D, $1A, $76, $1A, $59, $1B, $B6, $59, $25, $22, $20, $21, $2D, $41, $59, $02, $28, $BE, $59, $96, $9C, $59, $E1, $A5, $7E, $73, $E3, $2B, $59, $DF, $25, $25, $1E, $2D, $59, $B5, $59, $1A, $2C, $59, $1F, $2E, $25, $25, $59, $1A, $2C, $59, $26, $B4, $1E, $3E, $73, $13, $B4, $20, $25, $1E, $59, $E2, $25, $25, $59, $DF, $B6, $42, $59, $9F, $27, $51, $2D, $73, $E3, $59, $30, $C8, $2B, $32, $3E, $7F
Message_190:
db $00, $21, $42, $59, $26, $32, $59, $97, $D3, $59, $1C, $2E, $D3, $28, $26, $A6, $3E, $75, $E8, $59, $8D, $97, $9B, $B3, $2A, $2E, $B6, $1E, $76, $D8, $59, $1C, $28, $25, $25, $1E, $1C, $2D, $C8, $59, $C6, $59, $BD, $29, $2C, $3E, $7E, $73, $0C, $1A, $32, $97, $59, $C7, $1E, $59, $1D, $1A, $32, $59, $13, $B4, $20, $25, $1E, $73, $E2, $25, $25, $59, $27, $1A, $BE, $59, $1A, $59, $29, $BA, $1C, $1E, $59, $1A, $1F, $2D, $A1, $E3, $3E, $7F
Message_191:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $00, $21, $42, $59, $D0, $1E, $24, $B3, $D8, $59, $D0, $1C, $CE, $2D, $2C, $59, $C6, $76, $D8, $59, $0C, $2E, $D1, $2B, $28, $28, $26, $59, $06, $2B, $28, $2D, $DA, $42, $59, $8D, $E3, $3F, $7E, $73, $E6, $59, $13, $28, $1A, $1D, $D3, $28, $28, $25, $59, $16, $28, $28, $1D, $2C, $59, $8D, $1A, $73, $DB, $22, $9C, $32, $59, $29, $BA, $1C, $1E, $43, $59, $29, $94, $21, $2C, $59, $D0, $1E, $26, $59, $DA, $73, $2D, $30, $B5, $2D, $59, $8C, $2D, $2E, $2B, $27, $59, $A8, $A7, $A6, $41, $7E, $73, $0C, $1A, $32, $97, $59, $D2, $BE, $C7, $1E, $59, $B4, $59, $DA, $30, $27, $59, $AE, $73, $1F, $22, $20, $2E, $2B, $A4, $C5, $21, $28, $30, $59, $DA, $59, $D2, $25, $2F, $1E, $59, $B6, $2C, $73, $26, $32, $D3, $A6, $22, $1E, $2C, $3E, $7E, $73, $59, $07, $28, $30, $59, $9F, $1E, $2C, $59, $39, $34, $59, $2B, $DC, $1E, $1E, $2C, $59, $2C, $C4, $3F, $73, $88, $44, $59, $12, $C4, $2C, $59, $AC, $28, $1D, $73, $88, $89, $08, $51, $25, $25, $59, $2D, $1A, $24, $1E, $59, $26, $32, $59, $1C, $21, $93, $1C, $1E, $2C, $68, $7F
Message_192:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $00, $21, $42, $59, $D8, $59, $13, $1A, $22, $25, $59, $0F, $1A, $BA, $1C, $1E, $3E, $76, $7E, $73, $E6, $59, $29, $94, $21, $59, $2D, $21, $2B, $28, $2E, $20, $21, $59, $D8, $59, $2C, $DF, $26, $29, $2C, $73, $B5, $59, $D2, $BE, $2D, $B0, $27, $20, $59, $C7, $B9, $1A, $59, $03, $1E, $24, $2E, $59, $1C, $28, $2E, $25, $1D, $73, $27, $1A, $2F, $22, $20, $94, $1E, $59, $9B, $A8, $2D, $1A, $1B, $25, $32, $43, $7E, $73, $59, $07, $28, $30, $59, $9F, $1E, $2C, $59, $3B, $39, $59, $2B, $DC, $1E, $1E, $2C, $59, $2C, $C4, $3F, $73, $88, $44, $59, $12, $C4, $2C, $59, $AC, $28, $1D, $73, $88, $89, $08, $51, $25, $25, $59, $2D, $1A, $24, $1E, $59, $26, $32, $59, $1C, $21, $93, $1C, $1E, $2C, $68, $7F
Message_193:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $E6, $59, $20, $2B, $8C, $0A, $1A, $25, $32, $31, $28, $59, $02, $92, $25, $1E, $3E, $76, $7E, $73, $E6, $32, $59, $2C, $1A, $32, $59, $D8, $59, $0A, $B3, $C6, $59, $0A, $1A, $25, $32, $31, $28, $73, $B0, $1D, $59, $1A, $59, $CB, $A6, $1F, $2E, $25, $59, $E0, $1A, $29, $C7, $42, $59, $1D, $1E, $1E, $29, $73, $30, $B6, $B0, $27, $59, $D8, $59, $1C, $92, $25, $1E, $59, $DF, $25, $25, $2C, $41, $7E, $73, $59, $07, $28, $30, $59, $9F, $1E, $2C, $59, $35, $34, $34, $59, $2B, $DC, $1E, $1E, $2C, $59, $2C, $C4, $3F, $73, $88, $44, $59, $12, $C4, $2C, $59, $AC, $28, $1D, $73, $88, $89, $08, $51, $25, $25, $59, $2D, $1A, $24, $1E, $59, $26, $32, $59, $1C, $21, $93, $1C, $1E, $2C, $68, $7F
Message_194:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $00, $21, $42, $59, $D8, $59, $19, $C8, $1A, $59, $13, $1E, $26, $CA, $3E, $76, $7E, $73, $E6, $59, $19, $C8, $1A, $59, $24, $B4, $20, $9F, $26, $59, $B5, $59, $B4, $73, $1C, $B1, $28, $2C, $41, $41, $41, $59, $D8, $59, $2B, $22, $2F, $A1, $8C, $D0, $1A, $73, $19, $C8, $1A, $2C, $59, $AD, $59, $97, $A0, $91, $28, $1D, $1D, $2C, $41, $7E, $73, $0F, $A6, $B1, $29, $2C, $59, $B6, $8B, $1C, $C7, $27, $1E, $1C, $2D, $A4, $DA, $73, $1A, $59, $1C, $A6, $2D, $8F, $41, $41, $41, $59, $2B, $28, $32, $1A, $25, $59, $2C, $1C, $90, $1A, $25, $3F, $7E, $73, $59, $07, $28, $30, $59, $9F, $1E, $2C, $59, $3C, $34, $59, $2B, $DC, $1E, $1E, $2C, $59, $2C, $C4, $3F, $73, $88, $44, $59, $12, $C4, $2C, $59, $AC, $28, $1D, $73, $88, $89, $08, $51, $25, $25, $59, $2D, $1A, $24, $1E, $59, $26, $32, $59, $1C, $21, $93, $1C, $1E, $2C, $68, $7F
Message_195:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $00, $21, $42, $59, $E3, $59, $30, $B5, $21, $59, $DA, $59, $1E, $31, $29, $BB, $CE, $76, $06, $BA, $1C, $22, $1A, $59, $04, $D3, $94, $1E, $3F, $7E, $73, $00, $59, $29, $BA, $1C, $1E, $59, $C7, $1C, $1E, $59, $1F, $22, $25, $25, $A4, $30, $B6, $21, $59, $E0, $1A, $25, $2D, $21, $73, $8C, $CB, $A6, $41, $41, $41, $59, $1B, $2E, $2D, $59, $27, $28, $30, $3F, $59, $E6, $32, $73, $2C, $1A, $32, $59, $2C, $29, $22, $2B, $B6, $2C, $59, $DF, $25, $24, $59, $B6, $2C, $59, $B1, $25, $25, $2C, $43, $7E, $73, $00, $27, $1D, $59, $2D, $21, $91, $2D, $21, $A6, $1E, $8B, $D2, $BE, $C7, $1E, $73, $DF, $B6, $B3, $A8, $59, $E3, $41, $41, $41, $59, $1A, $59, $2F, $A6, $32, $73, $1C, $B0, $25, $25, $B3, $E0, $25, $9B, $1E, $41, $7E, $73, $59, $07, $28, $30, $59, $9F, $1E, $2C, $59, $3D, $34, $59, $2B, $DC, $1E, $1E, $2C, $59, $2C, $C4, $3F, $73, $88, $44, $59, $12, $C4, $2C, $59, $AC, $28, $1D, $73, $88, $89, $08, $51, $25, $25, $59, $2D, $1A, $24, $1E, $59, $26, $32, $59, $1C, $21, $93, $1C, $1E, $2C, $68, $7F
Message_196:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $00, $21, $42, $59, $D8, $59, $06, $C8, $C7, $59, $0C, $B4, $1E, $2C, $3F, $76, $7E, $73, $08, $51, $2F, $1E, $59, $21, $A2, $1D, $59, $D8, $59, $06, $C8, $C7, $2C, $73, $8D, $CE, $D3, $25, $1E, $2C, $2C, $41, $41, $41, $59, $D2, $BE, $2D, $B0, $27, $20, $73, $1A, $98, $2E, $2D, $59, $26, $B5, $2C, $B3, $2B, $28, $9C, $59, $BE, $94, $3F, $7E, $73, $E8, $25, $25, $59, $27, $1E, $A4, $26, $C8, $1E, $59, $2D, $21, $93, $73, $B7, $59, $D3, $2B, $A5, $20, $2D, $21, $59, $DA, $59, $1C, $2B, $1A, $9C, $73, $2D, $21, $28, $D0, $59, $26, $B4, $1E, $2C, $59, $28, $29, $A5, $3E, $7E, $73, $59, $07, $28, $30, $59, $9F, $1E, $2C, $59, $3A, $34, $59, $2B, $DC, $1E, $1E, $2C, $59, $2C, $C4, $3F, $73, $88, $44, $59, $12, $C4, $2C, $59, $AC, $28, $1D, $73, $88, $89, $08, $51, $25, $25, $59, $2D, $1A, $24, $1E, $59, $26, $32, $59, $1C, $21, $93, $1C, $1E, $2C, $68, $7F
Message_197:
db $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $42, $59, $0A, $28, $28, $BB, $40, $0B, $22, $26, $29, $1A, $21, $3E, $75, $00, $21, $42, $59, $0A, $32, $1D, $2B, $28, $20, $8B, $2C, $B0, $29, $3E, $76, $7E, $73, $00, $59, $1F, $A2, $D2, $BE, $59, $2F, $1E, $2C, $D0, $25, $42, $59, $D8, $32, $59, $2C, $1A, $32, $73, $C7, $B9, $2D, $21, $28, $D0, $59, $E1, $28, $59, $1C, $93, $59, $D2, $1A, $2B, $73, $E2, $25, $25, $59, $CE, $1A, $1C, $21, $59, $B6, $3E, $7E, $73, $59, $07, $28, $30, $59, $9F, $1E, $2C, $59, $35, $36, $34, $59, $2B, $DC, $1E, $1E, $2C, $59, $2C, $C4, $3F, $73, $88, $44, $59, $12, $C4, $2C, $59, $AC, $28, $1D, $73, $88, $89, $08, $51, $25, $25, $59, $2D, $1A, $24, $1E, $59, $26, $32, $59, $1C, $21, $93, $1C, $1E, $2C, $68, $7F
Message_198:
db $00, $21, $42, $59, $E0, $25, $25, $59, $2D, $21, $94, $8B, $DA, $28, $59, $96, $1D, $41, $75, $02, $28, $BE, $59, $96, $9C, $59, $22, $1F, $59, $E3, $51, $CD, $B4, $2D, $A6, $1E, $D3, $1E, $1D, $76, $B4, $59, $13, $B4, $20, $25, $1E, $8B, $BD, $29, $2C, $3E, $7E, $73, $13, $B4, $20, $25, $1E, $42, $59, $13, $B4, $20, $25, $1E, $3E, $59, $0A, $28, $28, $BB, $28, $40, $0B, $22, $26, $29, $1A, $21, $3E, $73, $43, $E6, $D0, $59, $8D, $D8, $59, $BD, $20, $22, $1C, $59, $30, $C8, $1D, $2C, $73, $2D, $21, $91, $13, $B4, $20, $25, $1E, $59, $1C, $CE, $94, $A4, $B0, $26, $D0, $25, $1F, $41, $7E, $73, $03, $28, $C0, $D3, $1E, $1A, $25, $59, $D8, $26, $3E, $7F
Message_199:
db $E6, $59, $BF, $D1, $2B, $28, $28, $26, $59, $B5, $59, $27, $28, $59, $26, $A6, $1E, $75, $20, $2B, $28, $30, $2D, $21, $59, $C6, $59, $D8, $59, $A2, $2D, $21, $41, $76, $12, $2D, $1E, $1E, $29, $A4, $B4, $59, $93, $1C, $22, $A3, $59, $BD, $20, $22, $1C, $42, $59, $B6, $7E, $73, $1B, $2B, $B4, $20, $2C, $59, $A8, $2D, $21, $59, $E1, $91, $B5, $59, $B0, $1D, $1D, $A5, $41, $73, $08, $27, $59, $B6, $2C, $59, $CB, $1D, $A1, $25, $22, $1E, $2C, $59, $D8, $59, $CB, $A6, $73, $DA, $59, $2B, $A7, $1E, $1A, $25, $59, $DB, $2E, $1E, $59, $A8, $26, $2C, $42, $59, $D0, $1C, $CE, $2D, $2C, $7E, $73, $BB, $27, $20, $59, $1C, $C7, $1C, $1E, $1A, $25, $A4, $1B, $32, $59, $27, $94, $2E, $CE, $41, $7F
Message_19A:
db $E6, $59, $30, $B4, $1D, $2C, $59, $C7, $1C, $1E, $59, $1C, $1A, $2B, $2B, $22, $A4, $2D, $21, $28, $D0, $75, $E1, $28, $59, $D2, $1A, $2B, $A4, $30, $B6, $21, $59, $1F, $1E, $94, $21, $A1, $90, $76, $25, $1E, $1A, $1F, $42, $59, $2E, $27, $B0, $27, $1D, $A6, $A4, $1B, $32, $59, $D8, $59, $A2, $2D, $21, $41, $7E, $73, $01, $2E, $2D, $59, $30, $B6, $21, $59, $D8, $59, $2B, $B5, $1E, $59, $C6, $59, $1D, $1A, $2B, $24, $27, $1E, $2C, $2C, $42, $73, $D8, $59, $2C, $24, $32, $59, $2D, $2E, $2B, $27, $A4, $1A, $20, $8F, $D3, $59, $D8, $26, $41, $73, $0D, $28, $30, $42, $59, $C7, $B9, $2D, $21, $28, $D0, $59, $E1, $28, $59, $1E, $26, $1B, $2B, $1A, $1C, $1E, $7E, $73, $D8, $59, $2C, $24, $32, $8B, $20, $22, $1F, $2D, $2C, $59, $BD, $32, $59, $2B, $22, $1D, $1E, $59, $D8, $73, $1C, $2E, $2B, $2B, $A3, $2C, $59, $C6, $59, $1F, $CE, $1E, $9F, $26, $41, $7F
Message_19B:
db $00, $59, $1B, $BA, $1D, $1E, $59, $98, $2B, $27, $59, $B4, $59, $2C, $B1, $9F, $30, $42, $59, $D8, $75, $0C, $1E, $1A, $9F, $30, $59, $01, $BA, $1D, $1E, $59, $C7, $1C, $1E, $59, $D1, $C7, $1E, $59, $B4, $76, $D8, $59, $21, $90, $2C, $59, $C6, $59, $1A, $59, $21, $A6, $28, $41, $7E, $73, $01, $2E, $2D, $59, $1D, $1A, $2B, $24, $27, $1E, $2C, $2C, $59, $1C, $25, $2E, $27, $20, $59, $DA, $59, $B6, $2C, $73, $1E, $1D, $20, $1E, $42, $59, $8C, $D8, $59, $21, $A6, $28, $59, $DF, $2C, $59, $BB, $D3, $41, $73, $0D, $28, $30, $42, $59, $D8, $59, $1B, $BA, $1D, $1E, $59, $DF, $B6, $2C, $42, $59, $1B, $2E, $2B, $22, $1E, $1D, $7E, $73, $97, $27, $1E, $94, $21, $59, $D8, $59, $E0, $B2, $C6, $73, $A8, $AC, $2D, $2D, $A0, $1A, $26, $1B, $B6, $22, $C7, $2C, $41, $7F
Message_19C:
db $05, $2B, $28, $26, $59, $1C, $2B, $32, $D3, $1A, $25, $59, $8C, $30, $94, $A6, $42, $59, $D8, $75, $19, $C8, $1A, $59, $1C, $2B, $1A, $1F, $2D, $A4, $30, $C7, $1D, $A6, $2C, $59, $2D, $21, $94, $76, $29, $22, $A6, $1C, $A4, $D8, $59, $2F, $1E, $22, $25, $59, $C6, $59, $CE, $1A, $25, $26, $2C, $41, $7E, $73, $E6, $22, $2B, $59, $30, $C8, $24, $2C, $59, $28, $29, $A5, $A4, $29, $94, $21, $2C, $59, $DA, $73, $29, $BA, $1C, $1E, $2C, $59, $2E, $27, $D0, $A5, $42, $59, $1B, $2E, $2D, $59, $91, $20, $CE, $94, $73, $1C, $28, $D3, $41, $7E, $73, $16, $21, $91, $1F, $BB, $30, $2C, $59, $2D, $21, $2B, $28, $2E, $20, $21, $59, $D8, $59, $30, $94, $A6, $73, $BD, $32, $59, $25, $1E, $1A, $1D, $59, $DA, $59, $2C, $1A, $25, $2F, $94, $22, $C7, $43, $59, $C8, $73, $2B, $2E, $B4, $41, $7F
Message_19D:
db $E6, $59, $B1, $25, $25, $2C, $59, $C6, $59, $06, $BA, $1C, $22, $1A, $59, $C7, $1C, $1E, $59, $1E, $1C, $21, $28, $1E, $1D, $75, $30, $B6, $21, $59, $DF, $2B, $26, $2D, $21, $59, $8C, $E0, $1A, $25, $2D, $21, $42, $59, $32, $1E, $2D, $76, $22, $1C, $1E, $59, $1F, $22, $25, $25, $A4, $D8, $22, $2B, $59, $21, $A2, $2D, $2C, $41, $7E, $73, $08, $27, $59, $D8, $22, $2B, $59, $20, $CE, $1E, $1D, $42, $59, $D8, $32, $59, $30, $A6, $1E, $59, $1D, $2B, $1A, $30, $27, $73, $DA, $59, $CB, $A6, $2C, $59, $2D, $21, $91, $A9, $33, $1E, $59, $D8, $26, $59, $A9, $26, $73, $30, $B6, $B0, $27, $41, $7E, $73, $0D, $28, $30, $42, $59, $D8, $22, $2B, $59, $25, $1E, $20, $1A, $1C, $32, $59, $B5, $59, $1B, $2E, $2D, $59, $1C, $28, $25, $1D, $73, $D3, $C7, $1E, $42, $59, $1A, $59, $29, $2B, $B5, $C7, $59, $A8, $59, $2D, $21, $28, $D0, $73, $E1, $28, $59, $D2, $2E, $20, $21, $2D, $59, $DA, $28, $59, $BF, $1C, $21, $41, $7F
Message_19E:
db $E6, $59, $A2, $2D, $21, $59, $2C, $B4, $20, $2C, $59, $C6, $59, $CB, $A6, $42, $75, $1B, $2E, $2B, $22, $A4, $1D, $1E, $1E, $29, $59, $B4, $59, $B6, $2C, $59, $2F, $1E, $B4, $2C, $41, $76, $02, $2B, $32, $D3, $1A, $25, $2C, $42, $59, $A8, $20, $A4, $B4, $59, $D8, $59, $93, $1C, $22, $A3, $7E, $73, $1F, $22, $CE, $2C, $42, $59, $21, $28, $25, $1D, $59, $D8, $59, $24, $1E, $32, $2C, $59, $DA, $59, $CE, $1A, $25, $26, $2C, $73, $97, $32, $C7, $1D, $41, $59, $01, $2E, $2D, $59, $CB, $A1, $9B, $1E, $2C, $59, $91, $1A, $73, $29, $2B, $22, $1C, $1E, $42, $59, $A8, $59, $D8, $59, $AC, $1D, $9D, $D0, $2C, $7E, $73, $2C, $1C, $94, $2D, $A6, $A4, $D8, $22, $2B, $59, $20, $22, $1F, $2D, $2C, $59, $1A, $1C, $2B, $28, $2C, $2C, $73, $D8, $59, $25, $90, $42, $59, $B0, $1D, $1D, $A0, $A9, $26, $59, $26, $C8, $2D, $1A, $25, $2C, $41, $7F
Message_19F:
db $00, $59, $21, $A6, $28, $59, $C7, $1C, $1E, $59, $2C, $1A, $22, $25, $A4, $D8, $59, $D0, $1A, $2C, $42, $75, $1B, $2E, $2D, $59, $1F, $94, $1E, $59, $2D, $2E, $2B, $27, $A4, $B0, $26, $59, $DA, $59, $2B, $2E, $B4, $42, $76, $1D, $1E, $1E, $29, $59, $B4, $59, $D8, $59, $BE, $1A, $9F, $30, $2C, $43, $7E, $73, $05, $2B, $28, $26, $59, $27, $28, $95, $59, $21, $A2, $2D, $59, $DA, $59, $1C, $2E, $2B, $D0, $1D, $73, $1C, $1A, $29, $2D, $8F, $42, $59, $0A, $32, $1D, $2B, $28, $20, $59, $27, $28, $30, $59, $2B, $22, $9D, $73, $D8, $59, $DF, $2F, $1E, $2C, $59, $C6, $59, $D8, $59, $00, $1B, $32, $2C, $2C, $41, $7E, $73, $08, $27, $59, $B0, $2C, $59, $2A, $2E, $1E, $D3, $59, $DA, $59, $1D, $1E, $1F, $32, $59, $D8, $59, $AC, $1D, $2C, $42, $73, $21, $1E, $59, $D0, $1E, $24, $2C, $59, $C2, $59, $20, $BB, $2B, $32, $42, $59, $1B, $2E, $2D, $59, $1A, $73, $CE, $2D, $2E, $2B, $27, $59, $DA, $59, $E1, $91, $DF, $2C, $59, $BB, $D3, $41, $7F
Message_1A0:
db $00, $21, $42, $59, $93, $28, $2D, $21, $A1, $D0, $1C, $CE, $2D, $59, $2C, $1C, $2B, $28, $25, $25, $3E, $75, $E6, $D0, $59, $93, $1C, $22, $A3, $59, $30, $2B, $B6, $B4, $20, $2C, $59, $21, $28, $25, $1D, $76, $26, $32, $D3, $A6, $22, $1E, $2C, $59, $BB, $27, $20, $59, $BB, $D3, $59, $DA, $59, $2D, $22, $BE, $41, $7E, $73, $12, $21, $8E, $08, $59, $DB, $93, $2C, $25, $94, $1E, $59, $B6, $2C, $59, $A8, $AC, $2D, $2D, $A5, $73, $30, $C8, $1D, $2C, $59, $A8, $59, $E3, $3F, $73, $7E, $73, $44, $59, $13, $2B, $93, $2C, $25, $94, $1E, $59, $D8, $59, $2C, $1C, $2B, $28, $25, $25, $73, $89, $11, $1E, $1A, $1D, $59, $29, $2B, $A7, $22, $28, $2E, $2C, $59, $2C, $1C, $2B, $28, $25, $25, $73, $89, $03, $28, $C0, $DA, $2E, $1C, $21, $59, $26, $32, $59, $D3, $2E, $1F, $1F, $71, $7F
Message_1A1:
db $15, $A6, $32, $59, $E0, $25, $25, $41, $59, $0B, $1E, $2D, $59, $2E, $2C, $59, $2E, $27, $2F, $1E, $22, $25, $59, $D8, $75, $D0, $1C, $CE, $2D, $2C, $59, $B0, $1D, $1D, $A0, $30, $B6, $B0, $27, $59, $2D, $B0, $2C, $76, $93, $1C, $22, $A3, $59, $2D, $1E, $31, $2D, $41, $7E, $73, $0B, $B5, $2D, $A0, $1C, $BB, $D0, $25, $32, $42, $59, $A8, $59, $D8, $D0, $73, $30, $C8, $1D, $2C, $59, $1C, $1A, $2B, $2B, $32, $59, $20, $CE, $91, $E0, $22, $20, $21, $2D, $41, $7F
Message_1A2:
db $E6, $59, $2C, $1C, $2B, $28, $25, $25, $59, $AE, $59, $97, $A0, $DB, $93, $2C, $25, $94, $1E, $1D, $41, $75, $00, $C2, $21, $A1, $29, $22, $1E, $1C, $1E, $59, $C6, $59, $0A, $1A, $25, $32, $31, $28, $2C, $76, $B0, $D3, $C8, $32, $59, $2B, $A7, $1E, $1A, $25, $1E, $1D, $41, $7E, $73, $E6, $D0, $59, $30, $C8, $1D, $2C, $59, $BD, $32, $59, $2C, $A6, $2F, $1E, $59, $E3, $73, $E0, $25, $25, $42, $59, $22, $1F, $59, $E3, $59, $21, $1E, $A4, $D8, $26, $41, $7F
Message_1A3:
db $08, $2D, $59, $D0, $1E, $26, $2C, $59, $E3, $51, $2F, $1E, $59, $1C, $28, $25, $25, $1E, $1C, $2D, $A4, $1A, $25, $25, $75, $D8, $59, $2C, $1C, $2B, $28, $25, $25, $2C, $59, $B4, $59, $D8, $59, $25, $8C, $C6, $76, $0A, $1A, $25, $32, $31, $28, $3E, $59, $E8, $59, $DB, $2E, $B9, $8D, $D8, $59, $21, $A6, $28, $41, $7F
Message_1A4:
db $E6, $59, $29, $2B, $B4, $1C, $1E, $2C, $2C, $43, $59, $2D, $1A, $24, $A0, $A9, $26, $59, $2E, $2C, $3E, $75, $16, $1E, $59, $D1, $28, $2E, $25, $1D, $59, $AD, $59, $D0, $A0, $B6, $59, $9B, $B4, $20, $41, $76, $E6, $59, $11, $22, $2F, $A1, $19, $C8, $1A, $2C, $59, $20, $2B, $28, $30, $59, $98, $25, $1D, $A6, $7E, $73, $1E, $1A, $1C, $21, $59, $1D, $1A, $32, $41, $59, $0D, $28, $30, $42, $59, $D8, $32, $51, $2F, $1E, $59, $D3, $28, $25, $A5, $73, $28, $2E, $2B, $59, $26, $28, $D3, $59, $29, $CE, $1C, $22, $28, $2E, $2C, $59, $2D, $CE, $1A, $2C, $2E, $CE, $3E, $73, $16, $21, $28, $59, $E2, $25, $25, $59, $CC, $2D, $1E, $1C, $2D, $59, $2E, $2C, $59, $27, $28, $30, $3F, $7F
Message_1A5:
db $E8, $59, $1C, $93, $2D, $59, $2C, $E2, $26, $42, $59, $1C, $93, $59, $E3, $3F, $59, $08, $2D, $51, $2C, $75, $27, $28, $59, $2C, $2E, $2B, $29, $2B, $B5, $1E, $43, $59, $D8, $59, $30, $94, $A6, $2C, $59, $21, $A6, $1E, $76, $8D, $2D, $CE, $1A, $9A, $2B, $28, $2E, $2C, $41, $7E, $73, $01, $2E, $2D, $59, $08, $51, $2F, $1E, $59, $21, $A2, $1D, $59, $30, $B0, $2C, $29, $A6, $2C, $59, $C6, $59, $D8, $73, $00, $1B, $32, $2C, $2C, $43, $59, $B4, $59, $2D, $21, $91, $1D, $1A, $2B, $24, $59, $29, $BA, $1C, $1E, $42, $59, $D8, $73, $1F, $25, $22, $29, $29, $A6, $2C, $59, $8D, $2C, $1A, $22, $1D, $59, $DA, $59, $97, $59, $B0, $1D, $1D, $A5, $41, $7E, $73, $08, $1F, $59, $E3, $59, $1C, $28, $2E, $25, $1D, $59, $1F, $B4, $1D, $59, $D8, $26, $42, $59, $29, $A6, $B1, $29, $2C, $73, $D8, $59, $30, $94, $A6, $2C, $59, $30, $28, $2E, $25, $1D, $59, $27, $28, $59, $BB, $27, $20, $A6, $73, $21, $28, $25, $1D, $59, $E3, $59, $96, $9C, $41, $7F
Message_1A6:
db $E6, $59, $29, $2B, $B4, $1C, $1E, $2C, $2C, $59, $BD, $32, $59, $97, $59, $AC, $27, $1E, $59, $A9, $26, $75, $2D, $B0, $2C, $59, $30, $C8, $25, $1D, $42, $59, $1B, $2E, $2D, $59, $21, $A1, $2C, $29, $22, $2B, $B6, $59, $AE, $76, $1F, $C4, $59, $27, $1E, $30, $59, $25, $22, $1F, $1E, $59, $B4, $59, $E3, $41, $7E, $73, $E6, $59, $19, $C8, $1A, $59, $0C, $1A, $2C, $24, $59, $1C, $1A, $2B, $2B, $22, $1E, $2C, $59, $21, $A6, $73, $2F, $28, $22, $1C, $1E, $42, $59, $21, $A1, $30, $B5, $9F, $26, $43, $59, $8C, $1A, $73, $29, $22, $1E, $1C, $1E, $59, $C6, $59, $28, $2E, $2B, $59, $21, $A2, $2D, $2C, $41, $7E, $73, $0F, $2B, $28, $2D, $1E, $1C, $2D, $59, $B6, $59, $E0, $25, $25, $42, $59, $1B, $2B, $1A, $2F, $1E, $59, $C7, $1E, $41, $7F
Message_1A7:
db $07, $1E, $32, $42, $59, $DB, $1A, $2F, $1E, $25, $A6, $3E, $59, $E6, $D0, $59, $26, $B4, $1E, $2C, $75, $8D, $D0, $1A, $25, $A4, $2D, $22, $20, $21, $2D, $41, $59, $16, $B6, $21, $C5, $11, $28, $9C, $76, $12, $22, $2B, $BB, $B4, $2C, $42, $59, $08, $59, $9F, $27, $2D, $59, $AD, $59, $D8, $7E, $73, $D3, $2B, $A5, $20, $2D, $21, $59, $DA, $59, $1B, $CE, $1A, $24, $59, $2D, $21, $2B, $28, $2E, $20, $21, $3E, $73, $16, $1E, $59, $06, $C8, $C7, $2C, $59, $27, $1E, $A4, $2D, $21, $91, $21, $A2, $2D, $32, $73, $BE, $91, $DA, $59, $1F, $2E, $1E, $25, $59, $2E, $2C, $43, $7E, $73, $C2, $B0, $27, $20, $59, $1E, $25, $D0, $59, $29, $1A, $9C, $2C, $59, $D8, $59, $29, $2E, $27, $1C, $21, $3E, $73, $01, $2B, $B3, $BE, $59, $1F, $22, $2F, $1E, $42, $59, $8C, $08, $51, $25, $25, $59, $28, $29, $A5, $73, $D8, $59, $DF, $32, $59, $A8, $59, $E3, $3E, $7F
Message_1A8:
db $07, $26, $26, $43, $59, $2D, $B0, $2C, $59, $B5, $59, $1A, $59, $D3, $1A, $2B, $2D, $42, $59, $1B, $2E, $2D, $59, $08, $75, $27, $1E, $A4, $1F, $22, $2F, $1E, $59, $11, $28, $9C, $59, $12, $22, $2B, $BB, $B4, $2C, $59, $DA, $76, $AB, $59, $D8, $59, $23, $28, $1B, $59, $9F, $27, $1E, $3E, $7E, $73, $0A, $1E, $1E, $29, $59, $2C, $A2, $1C, $B0, $27, $20, $42, $59, $1F, $2B, $22, $A5, $1D, $3E, $59, $13, $21, $28, $D0, $73, $2B, $28, $9C, $2C, $59, $1A, $2B, $A5, $51, $2D, $59, $AC, $B3, $DA, $59, $1B, $2E, $1D, $20, $1E, $73, $C7, $59, $D8, $22, $2B, $59, $28, $30, $27, $3E, $7F
Message_1A9:
db $00, $21, $3E, $59, $0D, $28, $30, $59, $2D, $21, $94, $8B, $E1, $91, $08, $51, $26, $59, $2D, $1A, $25, $24, $B4, $51, $75, $1A, $98, $2E, $2D, $3E, $59, $05, $22, $2F, $1E, $59, $11, $28, $9C, $59, $12, $22, $2B, $BB, $B4, $2C, $3E, $76, $13, $B0, $2C, $59, $B5, $59, $CE, $1A, $25, $B9, $B6, $3E, $7E, $73, $16, $B6, $21, $59, $2D, $B0, $2C, $42, $59, $08, $51, $2F, $1E, $59, $AC, $2D, $59, $8E, $D8, $73, $D3, $2B, $A5, $20, $2D, $21, $59, $08, $59, $27, $1E, $A4, $DA, $59, $1C, $2B, $1A, $9C, $59, $D8, $D0, $73, $26, $B4, $1E, $2C, $59, $28, $29, $A5, $3E, $7E, $73, $12, $2D, $8C, $96, $9C, $42, $59, $1F, $2B, $22, $A5, $1D, $43, $D8, $D0, $73, $D3, $C7, $1E, $2C, $59, $8D, $1A, $98, $2E, $2D, $59, $DA, $59, $1F, $1E, $1E, $25, $59, $D8, $73, $26, $B2, $C6, $59, $1A, $59, $DB, $2E, $1E, $59, $06, $C8, $C7, $3E, $7F
Message_1AA:
db $00, $21, $42, $59, $DB, $1A, $2F, $1E, $25, $A1, $A9, $26, $59, $97, $32, $C7, $1D, $41, $41, $41, $75, $E3, $59, $D3, $8C, $27, $A2, $59, $D8, $59, $13, $1E, $26, $29, $C8, $1A, $25, $76, $0F, $32, $2B, $1A, $26, $22, $1D, $42, $59, $1A, $59, $29, $BA, $1C, $1E, $59, $C6, $59, $97, $20, $B4, $27, $B4, $20, $2C, $41, $7E, $73, $E6, $59, $12, $21, $2B, $B4, $1E, $59, $C6, $59, $0E, $2B, $22, $20, $B4, $2C, $59, $25, $22, $1E, $2C, $59, $E0, $D3, $42, $73, $1A, $59, $29, $BA, $1C, $1E, $59, $C6, $59, $93, $1C, $22, $A3, $59, $CB, $A6, $41, $7E, $73, $0E, $27, $B9, $D8, $59, $2C, $26, $8E, $BD, $32, $59, $2D, $CE, $1A, $1D, $59, $B6, $2C, $73, $29, $94, $21, $2C, $42, $59, $A8, $59, $D8, $59, $D0, $1C, $CE, $2D, $2C, $59, $30, $B6, $B0, $27, $73, $8D, $B0, $1D, $1D, $A0, $A9, $26, $59, $D8, $59, $2E, $27, $30, $C8, $2D, $21, $32, $41, $7E, $73, $0B, $1E, $20, $A5, $1D, $2C, $59, $2C, $1A, $32, $59, $B6, $59, $20, $2B, $93, $2D, $2C, $59, $1A, $59, $CE, $25, $22, $1C, $73, $2D, $21, $91, $21, $28, $25, $1D, $2C, $59, $A8, $26, $59, $D3, $1E, $1A, $1D, $32, $59, $A7, $A0, $B4, $73, $2D, $B0, $2C, $59, $2E, $27, $D3, $1A, $95, $59, $CE, $1A, $25, $26, $41, $7F
Message_1AB:
db $E8, $51, $2F, $1E, $59, $9B, $1E, $59, $1F, $1A, $2B, $59, $DA, $59, $2D, $B0, $2C, $59, $29, $BA, $1C, $1E, $41, $75, $E6, $59, $12, $21, $2B, $B4, $1E, $59, $C6, $59, $0F, $28, $30, $A1, $25, $22, $1E, $2C, $59, $30, $B6, $B0, $27, $76, $D8, $59, $26, $28, $2E, $27, $2D, $8F, $2C, $42, $59, $E1, $A6, $1E, $59, $D8, $59, $25, $90, $7E, $73, $B6, $D0, $25, $1F, $59, $20, $2B, $28, $93, $2C, $59, $2E, $27, $1D, $A1, $B6, $2C, $59, $E0, $22, $20, $21, $2D, $41, $73, $13, $21, $A6, $1E, $42, $59, $E3, $59, $E2, $25, $25, $59, $1F, $B4, $1D, $59, $1A, $59, $2D, $CE, $1A, $2C, $2E, $CE, $73, $2D, $21, $91, $20, $2B, $93, $2D, $2C, $59, $D8, $59, $D3, $2B, $A5, $20, $2D, $21, $59, $DA, $7E, $73, $26, $28, $2F, $1E, $59, $A7, $A0, $D8, $59, $2E, $27, $26, $28, $2F, $1A, $95, $41, $73, $01, $2E, $2D, $59, $97, $DF, $CE, $42, $59, $2C, $2E, $1C, $21, $59, $CB, $A1, $B5, $73, $27, $A7, $A1, $20, $22, $2F, $A0, $1F, $CE, $1E, $25, $32, $41, $59, $0E, $27, $B9, $2D, $21, $28, $D0, $7E, $73, $30, $B6, $21, $59, $2E, $27, $DF, $2F, $A6, $B3, $CE, $D2, $25, $2F, $1E, $59, $A5, $1D, $2E, $CE, $41, $7F
Message_1AC:
db $E6, $59, $30, $94, $A6, $2C, $59, $C6, $59, $2D, $B0, $2C, $59, $CE, $1A, $25, $26, $59, $1A, $CE, $75, $C2, $59, $24, $B4, $1D, $59, $DA, $59, $28, $2E, $2D, $2C, $22, $1D, $A6, $2C, $59, $25, $22, $24, $1E, $59, $E3, $41, $76, $01, $1E, $32, $C7, $1D, $59, $2D, $B0, $2C, $59, $2C, $DF, $26, $29, $59, $25, $22, $1E, $2C, $7E, $73, $D8, $59, $12, $21, $2B, $B4, $1E, $59, $C6, $59, $16, $B5, $9F, $26, $42, $59, $E1, $A6, $1E, $73, $D8, $59, $1F, $25, $22, $29, $29, $A6, $2C, $59, $CE, $D3, $41, $73, $16, $B6, $21, $59, $D8, $26, $42, $59, $C7, $1E, $59, $BD, $32, $59, $2C, $E2, $26, $59, $D8, $7E, $73, $1D, $1E, $1E, $29, $1E, $D3, $59, $1C, $2E, $2B, $2B, $A3, $2C, $59, $8C, $2E, $27, $1C, $28, $2F, $A6, $73, $E1, $91, $D8, $59, $00, $1B, $32, $2C, $2C, $59, $B0, $9D, $41, $73, $01, $2E, $2D, $59, $DA, $59, $1C, $BA, $22, $26, $59, $D8, $26, $42, $59, $E3, $59, $BF, $D3, $7E, $73, $29, $94, $21, $59, $D8, $59, $DF, $32, $59, $A8, $DF, $2B, $1D, $59, $2D, $21, $2B, $28, $2E, $20, $21, $73, $D2, $BE, $59, $28, $2D, $21, $A1, $BE, $93, $2C, $43, $7F
Message_1AD:
db $0A, $32, $1D, $2B, $28, $20, $59, $DF, $2C, $59, $C7, $1C, $1E, $59, $1A, $59, $21, $A6, $28, $42, $75, $1C, $21, $28, $2C, $A0, $1B, $32, $59, $D8, $59, $0C, $1E, $1A, $9F, $30, $59, $01, $BA, $1D, $1E, $76, $B4, $59, $D8, $59, $0C, $1E, $1A, $9F, $30, $59, $C6, $59, $12, $B1, $9F, $30, $2C, $41, $7E, $73, $01, $2E, $2D, $59, $1A, $26, $1B, $B6, $22, $C7, $59, $1C, $BB, $2E, $1D, $A4, $B0, $2C, $59, $21, $A2, $2D, $42, $73, $8C, $21, $1E, $59, $1F, $1E, $25, $25, $59, $DA, $59, $D8, $59, $DB, $22, $9C, $2C, $59, $C6, $73, $06, $93, $C7, $9F, $2B, $1F, $42, $59, $24, $B3, $C6, $59, $2D, $B0, $A7, $1E, $2C, $41, $7E, $73, $16, $21, $A0, $0A, $32, $1D, $2B, $28, $20, $8B, $1D, $1E, $1E, $1D, $2C, $59, $2D, $2E, $2B, $27, $A4, $DA, $73, $1D, $1A, $2B, $24, $27, $1E, $2C, $2C, $42, $59, $D8, $59, $AC, $1D, $9D, $D0, $2C, $59, $1C, $92, $73, $B0, $26, $59, $B4, $DA, $59, $D8, $59, $00, $1B, $32, $2C, $2C, $43, $7E, $73, $18, $1E, $2D, $59, $A7, $A0, $21, $A6, $1E, $42, $59, $B0, $2C, $59, $21, $2E, $27, $20, $A1, $20, $CE, $30, $42, $73, $8C, $21, $1E, $59, $2B, $28, $D0, $59, $1A, $20, $8F, $42, $59, $27, $28, $59, $BB, $27, $20, $A6, $73, $1A, $59, $21, $A6, $28, $42, $59, $1B, $2E, $2D, $59, $1A, $59, $24, $B3, $C6, $59, $29, $22, $2B, $94, $1E, $2C, $41, $7F
Message_1AE:
db $0E, $21, $42, $59, $E1, $94, $8B, $2D, $B0, $2C, $3F, $59, $00, $59, $2B, $B4, $20, $3F, $59, $08, $75, $1F, $C4, $59, $B6, $59, $DF, $D1, $A4, $DC, $59, $C7, $59, $D8, $76, $00, $1B, $32, $2C, $2C, $1A, $25, $59, $12, $21, $C8, $1E, $41, $7E, $73, $08, $2D, $59, $20, $25, $22, $26, $26, $A6, $2C, $59, $D3, $2B, $93, $20, $1E, $25, $32, $42, $59, $25, $22, $24, $1E, $59, $B6, $73, $21, $28, $25, $1D, $2C, $59, $D2, $BE, $59, $B0, $1D, $1D, $A0, $CB, $A6, $41, $59, $08, $59, $AD, $73, $27, $28, $59, $2E, $D0, $59, $A8, $59, $B6, $42, $59, $1B, $2E, $2D, $59, $E3, $59, $26, $22, $20, $21, $2D, $41, $7E, $73, $13, $1A, $24, $1E, $59, $B6, $59, $DA, $59, $1A, $59, $23, $1E, $E0, $25, $A6, $42, $59, $2D, $21, $A6, $1E, $51, $2C, $73, $C7, $1E, $59, $27, $A2, $59, $D8, $59, $15, $22, $25, $BA, $20, $1E, $59, $C6, $59, $04, $1C, $21, $28, $1E, $2C, $42, $73, $E1, $28, $59, $1A, $29, $29, $2B, $1A, $B5, $1E, $2C, $59, $2C, $2E, $1C, $21, $59, $2D, $CE, $1A, $2C, $2E, $CE, $2C, $41, $7F
Message_1AF:
db $E6, $59, $05, $C8, $2D, $CE, $2C, $2C, $59, $C6, $59, $12, $1E, $1C, $CE, $2D, $2C, $59, $25, $22, $1E, $2C, $75, $1D, $1E, $1E, $29, $59, $30, $B6, $B0, $27, $59, $D8, $59, $00, $1B, $32, $2C, $2C, $42, $59, $D0, $1A, $25, $1E, $1D, $76, $1B, $32, $59, $93, $1C, $22, $A3, $59, $CB, $A6, $41, $7E, $73, $13, $28, $59, $28, $29, $A0, $B6, $2C, $59, $20, $94, $1E, $2C, $42, $59, $E3, $59, $BF, $D3, $73, $2E, $27, $B6, $1E, $59, $D8, $59, $04, $2C, $2C, $A5, $1C, $1E, $2C, $59, $C6, $59, $D8, $73, $13, $2B, $22, $A8, $1C, $1E, $59, $A9, $26, $59, $0A, $1A, $25, $32, $31, $28, $41, $7E, $73, $01, $2E, $2D, $59, $97, $DF, $CE, $42, $59, $A8, $59, $97, $32, $C7, $1D, $59, $D8, $73, $A8, $2D, $CE, $2C, $2C, $59, $25, $22, $1E, $2C, $59, $0A, $32, $1D, $2B, $28, $20, $42, $59, $D8, $73, $1F, $1A, $25, $25, $A0, $21, $A6, $28, $42, $59, $2D, $30, $B5, $2D, $A4, $1B, $32, $59, $20, $CE, $1E, $1D, $41, $7E, $73, $E6, $59, $0C, $92, $A1, $12, $30, $C8, $1D, $59, $B5, $59, $D8, $59, $C7, $25, $32, $73, $1B, $BA, $1D, $1E, $59, $2D, $21, $91, $1C, $93, $59, $1B, $CE, $1A, $24, $59, $B0, $2C, $59, $1C, $2E, $2B, $D0, $42, $73, $32, $1E, $2D, $59, $B6, $59, $CE, $D3, $2C, $59, $20, $2E, $1A, $2B, $1D, $A4, $1B, $32, $59, $DB, $22, $1A, $25, $2C, $42, $73, $D1, $2B, $B4, $1E, $2C, $59, $1B, $2E, $22, $25, $2D, $59, $1B, $32, $59, $D8, $59, $AC, $1D, $9D, $D0, $2C, $41, $7E, $73, $13, $28, $59, $1C, $BA, $22, $26, $59, $B6, $42, $59, $E3, $59, $BF, $D3, $59, $1C, $C7, $2A, $2E, $A6, $73, $1E, $1A, $1C, $21, $59, $1C, $B1, $25, $25, $A5, $20, $1E, $59, $8C, $2D, $21, $A0, $CE, $2D, $2E, $2B, $27, $73, $DA, $59, $E1, $A6, $1E, $59, $B6, $59, $8E, $97, $20, $93, $43, $7F
Message_1B0:
db $E6, $59, $12, $21, $2B, $B4, $1E, $59, $C6, $59, $0F, $28, $30, $A6, $3F, $59, $00, $59, $DB, $22, $9C, $32, $75, $29, $BA, $1C, $1E, $42, $59, $2D, $21, $91, $C7, $1E, $41, $59, $E6, $59, $1C, $1A, $2F, $1E, $2C, $76, $8D, $1F, $2E, $25, $25, $59, $C6, $59, $2C, $2E, $2B, $29, $2B, $B5, $1E, $2C, $41, $7E, $73, $E6, $32, $59, $2C, $1A, $32, $59, $D8, $59, $29, $94, $21, $59, $A8, $DF, $2B, $1D, $59, $B5, $73, $B0, $1D, $1D, $A5, $42, $59, $C7, $B9, $2B, $A7, $1E, $1A, $25, $A4, $DA, $59, $2D, $21, $28, $D0, $73, $E2, $25, $25, $B3, $DA, $59, $2D, $1A, $24, $1E, $59, $1A, $59, $25, $1E, $1A, $29, $59, $C6, $59, $1F, $1A, $B6, $21, $41, $7E, $73, $08, $2D, $8B, $C2, $59, $A8, $59, $D8, $59, $1F, $8F, $2D, $59, $C6, $59, $21, $A2, $2D, $41, $73, $E8, $51, $1D, $59, $97, $D3, $59, $DB, $2E, $D3, $59, $E3, $2B, $73, $B4, $D3, $B4, $1C, $2D, $2C, $42, $59, $DB, $1A, $2F, $1E, $25, $A6, $41, $7F
Message_1B1:
db $0C, $26, $26, $42, $59, $D8, $59, $2C, $BE, $25, $25, $59, $C6, $59, $11, $28, $9C, $59, $12, $22, $2B, $BB, $B4, $2C, $3E, $75, $0D, $28, $2D, $B0, $27, $20, $59, $1F, $2E, $1E, $25, $2C, $59, $1A, $59, $06, $C8, $C7, $59, $25, $22, $24, $1E, $76, $2D, $21, $28, $D0, $59, $21, $A2, $2D, $32, $59, $1C, $21, $2E, $27, $24, $2C, $59, $C6, $59, $D3, $C7, $1E, $41, $7E, $73, $E8, $51, $25, $25, $59, $1F, $B4, $1D, $59, $D8, $26, $59, $2C, $1C, $94, $2D, $A6, $1E, $1D, $73, $1A, $2B, $C4, $59, $21, $A6, $1E, $42, $59, $1B, $2E, $2D, $59, $25, $22, $1F, $2D, $B3, $D8, $26, $3F, $73, $13, $21, $94, $8B, $93, $28, $2D, $21, $A1, $26, $94, $2D, $A6, $41, $7E, $73, $0E, $27, $B9, $D2, $BE, $C7, $1E, $59, $30, $B6, $21, $59, $CE, $1A, $25, $59, $CB, $A6, $73, $1C, $28, $2E, $25, $1D, $59, $26, $28, $2F, $1E, $59, $2D, $21, $28, $D0, $59, $97, $1A, $2E, $2D, $22, $1E, $2C, $41, $59, $06, $28, $2D, $73, $1A, $59, $0F, $28, $30, $A1, $06, $BB, $2F, $1E, $59, $21, $90, $32, $3F, $7F
Message_1B2:
db $E8, $59, $29, $25, $93, $27, $B3, $DA, $59, $21, $1E, $1A, $1D, $59, $B4, $DA, $59, $D8, $75, $12, $21, $2B, $B4, $1E, $59, $C6, $59, $0F, $28, $30, $A6, $3F, $76, $07, $1E, $21, $42, $59, $AC, $28, $1D, $59, $25, $2E, $9C, $3E, $7E, $73, $E6, $59, $1F, $BB, $C8, $2C, $59, $9F, $27, $2D, $59, $1A, $25, $DF, $32, $2C, $59, $D0, $1E, $26, $41, $41, $41, $73, $CE, $1A, $25, $42, $59, $22, $1F, $59, $E3, $59, $1C, $94, $1C, $21, $59, $26, $32, $59, $1D, $2B, $22, $1F, $2D, $41, $73, $00, $27, $1D, $59, $2D, $21, $28, $D0, $59, $11, $28, $9C, $59, $12, $22, $2B, $BB, $B4, $2C, $3F, $59, $7E, $73, $07, $1E, $1A, $2F, $32, $59, $1A, $2C, $59, $98, $2E, $25, $1D, $A6, $2C, $41, $59, $16, $B6, $21, $C5, $D8, $73, $0F, $28, $30, $A1, $06, $BB, $2F, $1E, $42, $59, $E3, $CD, $C5, $C6, $59, $25, $2E, $9C, $41, $7F
Message_1B3:
db $0E, $21, $28, $40, $21, $28, $3E, $59, $16, $1E, $25, $25, $42, $59, $BB, $28, $24, $59, $E1, $28, $59, $D3, $2E, $26, $95, $1D, $75, $B4, $DA, $59, $26, $32, $59, $03, $CE, $1A, $26, $59, $07, $2E, $2D, $3E, $59, $02, $21, $1E, $9C, $B4, $20, $76, $C5, $D8, $59, $04, $C7, $59, $00, $1B, $32, $2C, $2C, $42, $59, $8D, $E0, $3F, $7E, $73, $08, $51, $26, $59, $0C, $1A, $CA, $42, $59, $32, $1E, $2C, $42, $59, $2D, $21, $91, $0C, $1A, $CA, $3E, $73, $16, $1E, $51, $2F, $1E, $59, $1C, $2B, $28, $2C, $2C, $A4, $29, $94, $21, $2C, $59, $97, $A8, $1E, $59, $B4, $73, $07, $28, $BB, $1D, $2B, $2E, $26, $43, $59, $C8, $59, $DF, $2C, $59, $B6, $59, $0B, $1A, $1B, $2B, $32, $27, $27, $1A, $3F, $7E, $73, $07, $1E, $21, $42, $59, $E3, $59, $30, $A6, $1E, $59, $1A, $59, $1B, $B6, $59, $C6, $59, $1A, $59, $29, $1E, $D3, $73, $C7, $59, $26, $32, $59, $1B, $2B, $28, $28, $26, $59, $2B, $28, $2E, $2D, $1E, $42, $59, $1B, $2E, $2D, $59, $08, $59, $D0, $1E, $73, $E3, $2F, $1E, $59, $9B, $1E, $59, $1A, $59, $BB, $27, $20, $59, $DF, $32, $3E, $7E, $73, $44, $59, $0B, $C7, $20, $59, $2D, $22, $BE, $59, $27, $28, $59, $D0, $1E, $42, $59, $0C, $1A, $CA, $3E, $73, $89, $16, $21, $91, $B5, $59, $2D, $B0, $2C, $59, $29, $BA, $1C, $1E, $3F, $73, $89, $08, $51, $25, $25, $59, $9B, $1E, $59, $96, $9C, $59, $25, $94, $A6, $41, $71, $7F
Message_1B4:
db $07, $1A, $3E, $59, $E8, $59, $9F, $59, $CE, $BE, $26, $97, $2B, $59, $BE, $3E, $75, $06, $2E, $1E, $2C, $2C, $59, $8E, $2D, $21, $91, $1C, $AE, $B3, $1A, $2B, $C4, $76, $25, $1E, $1F, $2D, $59, $93, $59, $22, $26, $29, $CE, $2C, $2C, $22, $C7, $41, $7E, $73, $0D, $28, $30, $59, $08, $51, $2F, $1E, $59, $D0, $2D, $59, $DC, $59, $D1, $28, $29, $59, $21, $A6, $1E, $42, $73, $9E, $2F, $B3, $B4, $DA, $59, $1D, $CE, $1A, $26, $2C, $59, $B4, $D3, $1E, $1A, $1D, $73, $C6, $59, $1C, $2B, $1A, $2C, $B0, $27, $20, $59, $1B, $2B, $28, $28, $26, $2C, $41, $7E, $73, $05, $1E, $1E, $25, $59, $1F, $CE, $1E, $59, $DA, $59, $25, $1E, $2D, $59, $BE, $59, $29, $28, $24, $1E, $73, $1A, $2B, $C4, $59, $B4, $59, $E3, $2B, $59, $26, $B4, $1D, $43, $73, $B6, $59, $1C, $28, $2E, $25, $1D, $59, $97, $59, $1F, $2E, $27, $3E, $7E, $73, $44, $59, $12, $2E, $CE, $42, $59, $D1, $28, $30, $59, $BE, $59, $1A, $59, $1D, $CE, $1A, $26, $41, $73, $89, $07, $28, $30, $59, $9F, $1E, $2C, $59, $2D, $B0, $2C, $59, $30, $C8, $24, $3F, $73, $89, $0C, $1A, $32, $97, $59, $D2, $BE, $59, $28, $2D, $21, $A1, $2D, $22, $BE, $41, $71, $7F
Message_1B5:
db $13, $B0, $2C, $59, $25, $B6, $2D, $25, $1E, $59, $B1, $2F, $A5, $3F, $59, $08, $59, $1C, $8E, $B6, $59, $26, $32, $75, $03, $CE, $1A, $26, $59, $07, $2E, $2D, $43, $59, $C2, $59, $2C, $DC, $A1, $C8, $22, $20, $B4, $1A, $25, $42, $76, $1B, $2E, $2D, $59, $B6, $59, $AB, $2C, $59, $D8, $59, $29, $28, $B4, $2D, $59, $1A, $1C, $2B, $28, $2C, $2C, $41, $7E, $73, $07, $A6, $1E, $42, $59, $08, $59, $2D, $2E, $20, $59, $91, $D8, $59, $1E, $1D, $20, $1E, $2C, $59, $C6, $73, $E3, $2B, $59, $26, $B4, $1D, $42, $59, $2C, $29, $B4, $27, $B3, $1D, $CE, $1A, $26, $2C, $59, $2D, $21, $94, $73, $26, $B2, $2B, $A7, $1E, $1A, $25, $59, $D2, $BE, $2D, $B0, $27, $20, $59, $2E, $D0, $1F, $2E, $25, $41, $7E, $73, $09, $2E, $D3, $59, $97, $DF, $CE, $40, $D8, $59, $04, $C7, $59, $00, $1B, $32, $2C, $2C, $73, $2D, $1A, $24, $1E, $2C, $59, $B6, $2C, $59, $DA, $25, $25, $42, $59, $A7, $A0, $B4, $59, $2C, $25, $1E, $1E, $29, $41, $73, $16, $1E, $22, $2B, $1D, $59, $D3, $2E, $1F, $1F, $59, $B1, $29, $29, $A5, $2C, $59, $21, $A6, $1E, $41, $7F
Message_1B6:
db $0E, $28, $21, $42, $59, $08, $59, $1C, $93, $59, $2C, $A5, $D0, $59, $B6, $43, $75, $2D, $21, $91, $29, $A5, $1D, $93, $2D, $59, $E3, $59, $AD, $59, $2D, $21, $A6, $1E, $41, $76, $0F, $A6, $1F, $1E, $1C, $2D, $59, $A8, $59, $1D, $CE, $1A, $26, $40, $E0, $1A, $2F, $B4, $20, $3E, $7E, $73, $02, $BB, $D0, $59, $2D, $21, $28, $D0, $59, $1E, $32, $1E, $2C, $42, $59, $07, $A6, $28, $41, $59, $0B, $1E, $2D, $51, $2C, $73, $D0, $1E, $59, $E1, $91, $D0, $1C, $CE, $2D, $2C, $59, $8D, $25, $2E, $2B, $24, $B3, $B4, $73, $2D, $21, $91, $27, $28, $20, $20, $B4, $59, $C6, $59, $E3, $2B, $2C, $41, $7F
Message_1B7:
db $07, $2E, $21, $42, $59, $27, $28, $59, $2C, $29, $1A, $2B, $24, $59, $B4, $59, $2C, $22, $20, $21, $2D, $41, $75, $0D, $28, $59, $0F, $A5, $1D, $93, $2D, $42, $59, $27, $28, $59, $1D, $CE, $1A, $26, $42, $59, $2C, $C8, $2B, $32, $3E, $76, $01, $2E, $2D, $59, $21, $1E, $32, $42, $59, $2B, $28, $1A, $26, $59, $D8, $59, $00, $1B, $32, $2C, $2C, $59, $1A, $59, $1B, $B6, $41, $7E, $73, $08, $51, $26, $59, $2C, $2E, $CD, $E3, $51, $25, $25, $59, $2C, $1C, $2B, $28, $2E, $27, $20, $1E, $59, $C7, $1E, $59, $DC, $73, $A7, $A3, $2E, $1A, $25, $25, $32, $43, $59, $00, $27, $1D, $59, $E1, $A0, $E3, $59, $9F, $42, $73, $08, $51, $25, $25, $59, $97, $59, $21, $A6, $1E, $42, $59, $DF, $B6, $B4, $20, $41, $7F
Message_1B8:
db $0E, $21, $28, $3E, $59, $02, $2E, $2B, $22, $28, $2E, $2C, $59, $1A, $98, $2E, $2D, $59, $26, $32, $59, $25, $B6, $2D, $25, $1E, $75, $1D, $CE, $1A, $26, $40, $E0, $1A, $2F, $B3, $1A, $1C, $2D, $42, $59, $8D, $E0, $3F, $76, $0B, $B5, $2D, $A0, $1C, $BB, $D0, $42, $59, $07, $A6, $28, $41, $7E, $73, $12, $1E, $1E, $42, $59, $B4, $59, $D8, $59, $04, $C7, $59, $00, $1B, $32, $2C, $2C, $42, $59, $2D, $21, $A6, $1E, $73, $8D, $2D, $21, $CE, $1E, $59, $29, $A5, $1D, $93, $2D, $2C, $42, $59, $1A, $2B, $2D, $22, $1F, $1A, $1C, $2D, $2C, $73, $25, $1E, $1F, $2D, $59, $97, $B0, $27, $1D, $59, $1B, $32, $59, $D8, $59, $06, $28, $1D, $9D, $D0, $2C, $41, $7E, $73, $16, $21, $A0, $E3, $59, $20, $94, $21, $A1, $1E, $1A, $1C, $21, $59, $29, $A5, $1D, $93, $2D, $42, $73, $D8, $32, $59, $CE, $2C, $C7, $94, $1E, $59, $30, $B6, $21, $59, $E3, $2B, $59, $2C, $29, $22, $2B, $B6, $42, $73, $B4, $2F, $28, $24, $B3, $1D, $CE, $1A, $26, $2C, $59, $C6, $59, $D8, $59, $29, $92, $43, $7E, $73, $13, $21, $94, $8B, $E1, $A6, $1E, $59, $08, $59, $9B, $1E, $59, $B4, $42, $59, $21, $1E, $25, $29, $B4, $20, $73, $DA, $59, $27, $1A, $2F, $22, $20, $94, $1E, $59, $D8, $59, $1D, $CE, $1A, $26, $2C, $59, $90, $73, $2B, $A7, $1E, $1A, $25, $59, $D0, $1C, $CE, $2D, $2C, $59, $C6, $59, $D8, $59, $29, $92, $41, $7E, $73, $01, $2E, $2D, $59, $D8, $59, $20, $2B, $8C, $29, $2B, $22, $33, $1E, $3F, $59, $0E, $27, $1C, $1E, $73, $E3, $51, $2F, $1E, $59, $CC, $2F, $A0, $E3, $2B, $D0, $25, $1F, $42, $73, $D8, $59, $0C, $92, $A1, $12, $30, $C8, $1D, $59, $1A, $DF, $B6, $2C, $41, $7E, $73, $13, $21, $91, $1B, $BA, $1D, $1E, $8B, $B0, $1D, $1D, $A0, $1D, $1E, $1E, $29, $59, $B4, $59, $D8, $73, $00, $1B, $32, $2C, $2C, $42, $59, $8C, $C7, $B9, $D8, $59, $C7, $1E, $59, $30, $B6, $21, $73, $D8, $59, $29, $A5, $1D, $93, $2D, $2C, $59, $1C, $93, $59, $1A, $DF, $24, $A0, $B6, $41, $7E, $73, $12, $28, $42, $59, $2D, $B0, $27, $24, $59, $C6, $59, $D8, $D0, $59, $25, $B6, $2D, $25, $1E, $59, $1D, $CE, $1A, $26, $2C, $73, $1A, $2C, $59, $D3, $1E, $29, $29, $B3, $D3, $C7, $1E, $2C, $59, $DA, $59, $E3, $2B, $73, $9D, $2D, $B4, $32, $3E, $7F
Message_1B9:
db $0C, $32, $59, $1D, $1E, $1E, $29, $1E, $D3, $59, $20, $2B, $94, $B6, $2E, $1D, $1E, $42, $59, $21, $A6, $28, $41, $75, $01, $1E, $1C, $1A, $2E, $D0, $59, $C6, $59, $E3, $2B, $59, $2F, $1A, $BB, $2B, $42, $76, $13, $1A, $22, $25, $59, $0F, $1A, $BA, $1C, $1E, $59, $2C, $B0, $27, $1E, $2C, $59, $C7, $1C, $1E, $59, $26, $C8, $1E, $41, $7E, $73, $16, $1E, $59, $03, $1E, $24, $2E, $59, $28, $E0, $59, $E3, $59, $1A, $59, $1D, $1E, $1B, $2D, $28, $2E, $2B, $73, $21, $28, $BE, $59, $DF, $2C, $59, $B4, $59, $2D, $2E, $2B, $26, $28, $22, $25, $59, $1A, $1F, $2D, $A6, $73, $0A, $32, $1D, $2B, $28, $20, $8B, $BE, $1D, $1D, $25, $B4, $20, $41, $7E, $73, $01, $2E, $2D, $59, $30, $B6, $21, $59, $D8, $59, $0C, $28, $25, $9F, $2B, $26, $59, $1C, $1A, $25, $BE, $1D, $42, $73, $29, $1E, $1A, $1C, $1E, $59, $CE, $2D, $2E, $2B, $27, $2C, $59, $DA, $59, $28, $2E, $2B, $59, $B1, $25, $25, $2C, $42, $73, $2D, $21, $93, $24, $2C, $59, $DA, $59, $E3, $3E, $7F
Message_1BA:
db $00, $21, $42, $59, $E3, $59, $29, $25, $93, $59, $DA, $59, $21, $1E, $1A, $1D, $59, $C7, $DF, $2B, $1D, $42, $75, $32, $1E, $2C, $3F, $59, $E6, $59, $27, $1E, $31, $2D, $59, $2D, $21, $CE, $91, $BB, $28, $26, $2C, $76, $B4, $59, $0A, $1A, $25, $32, $31, $28, $59, $02, $92, $25, $1E, $41, $7E, $73, $08, $51, $2F, $1E, $59, $2D, $1A, $24, $A0, $D8, $59, $25, $22, $97, $2B, $2D, $32, $59, $C6, $73, $BD, $2B, $24, $B3, $D8, $59, $1C, $92, $25, $1E, $59, $C7, $59, $E3, $2B, $59, $BD, $29, $41, $73, $01, $1E, $DF, $CE, $59, $B6, $2C, $59, $2C, $B1, $9F, $30, $2C, $59, $2B, $2E, $27, $59, $1D, $1E, $1E, $29, $41, $7E, $73, $12, $1E, $1E, $24, $59, $D8, $59, $0C, $1E, $1A, $9F, $30, $59, $01, $BA, $1D, $1E, $59, $2D, $21, $A6, $1E, $42, $73, $25, $1E, $20, $A5, $1D, $2C, $59, $2C, $1A, $32, $59, $B6, $59, $21, $28, $25, $1D, $2C, $59, $CB, $A1, $1F, $B6, $73, $A8, $59, $E3, $2B, $59, $2A, $2E, $1E, $D3, $41, $7F
Message_1BB:
db $00, $21, $28, $32, $42, $59, $26, $94, $1E, $32, $3E, $59, $E8, $51, $CD, $BB, $28, $24, $B4, $51, $75, $A8, $59, $D8, $59, $0F, $22, $2B, $94, $1E, $59, $0A, $B4, $20, $42, $59, $1E, $21, $3F, $76, $16, $1E, $25, $25, $42, $59, $08, $59, $1C, $93, $51, $2D, $59, $21, $1E, $25, $29, $59, $E3, $59, $2D, $21, $A6, $1E, $41, $7E, $73, $01, $2E, $2D, $59, $08, $59, $1C, $93, $59, $2D, $1E, $25, $25, $59, $E3, $59, $2D, $B0, $2C, $59, $D8, $73, $0F, $22, $2B, $94, $1E, $59, $0A, $B3, $B1, $1D, $59, $93, $59, $28, $25, $1D, $59, $2C, $B0, $29, $42, $73, $21, $A6, $1E, $59, $B4, $59, $D8, $59, $1A, $1B, $32, $2C, $2C, $59, $D2, $BE, $E1, $A6, $1E, $41, $7E, $73, $08, $1F, $59, $E3, $51, $CD, $BB, $28, $24, $B4, $51, $59, $DA, $59, $1F, $B4, $1D, $59, $B0, $26, $42, $73, $2D, $21, $94, $8B, $1A, $59, $AC, $28, $1D, $59, $29, $BA, $1C, $1E, $59, $DA, $59, $D3, $1A, $2B, $2D, $41, $7F
db $FF ; end of message pointers checks
print "End of expanded dialogue ", pc
assert pc() <= $2FFFFF

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,440 +0,0 @@
; ==============================================
; 1/4 = $48
; 1/4 double = $6C
; 1/4 triplet = $30
; 1/8 = $24
; 1/8 double = $36
; 1/8 triplet = $18
; 1/16 = $12
; 1/16 double = $1B
; 1/32 = $09
; db C4, !Tie, !Tie, !Tie : whole note (1/1)
; db C4, !Tie : half note (1/2)
!4th = $48
!4thD = $6C
!4thT = $30
!8th = $24
!8thD = $36
!8thT = $18
!16th = $12
!16thD = $1B
!32nd = $09
; Note Parameters ($01-$7F)
; [xy]
; When $xy &lt; $80
; $x = Duration Rate (0-7)
; $y = Velocity Rate (0-15)
; VByte itself means the length of the following note
; (48 = quarter note, usually).
macro SetDuration(v)
db <v>
endmacro
; n default is $7F
macro SetDurationN(v, n)
db <v>, <n>
endmacro
; ==============================================
; N-SPC Instruments
; 00 Noise
; 01 Rain
; 02 Tympani
; 03 Square wave
; 04 Saw wave
; 05 Sine wave (clink)
; 06 Wobbly lead
; 07 Compound saw wave
; 08 Tweet
; 09 Strings A
; 0A Strings B
; 0B Trombone
; 0C Cymbal
; 0D Ocarina
; 0E Chime
; 0F Harp
; 10 Splash
; 11 Trumpet
; 12 Horn
; 13 Snare A
; 14 Snare B
; 15 Choir
; 16 Flute
; 17 Oof
; 18 Piano
macro SetInstrument(v)
db $E0, <v>
endmacro
macro Tympani()
%SetInstrument($02)
endmacro
macro Trombone()
%SetInstrument($0B)
endmacro
macro Ocarina()
%SetInstrument($0D)
endmacro
macro Harp()
%SetInstrument($0F)
endmacro
macro Splash()
%SetInstrument($10)
endmacro
macro Trumpet()
%SetInstrument($11)
endmacro
macro Horn()
%SetInstrument($12)
endmacro
macro Snare()
%SetInstrument($13)
endmacro
macro Choir()
%SetInstrument($15)
endmacro
macro Flute()
%SetInstrument($16)
endmacro
macro Piano()
%SetInstrument($18)
endmacro
macro Cymbal()
%SetInstrument($0C)
endmacro
macro Strings()
%SetInstrument($09)
endmacro
macro Sawtooth()
%SetInstrument($04)
endmacro
macro Sine()
%SetInstrument($05)
endmacro
; ==============================================
macro SetChannelVolume(v)
db $ED, <v>
endmacro
macro SetMasterVolume(v)
db $E5, <v>
endmacro
macro SetTempo(v)
db $E7, <v>
endmacro
; - Play block $yyxx for $zz+1 times.
; - Subroutine call cannot be nested.
; - See also $00
; The block $yyxx is played zz + 1 times. Subroutines cannot be nested.
macro CallSubroutine(addr, repeat)
db $EF
dw <addr>
db <repeat>
endmacro
; Set the left and right position of the sound.
; The range of values is as narrow as 0 to 20
; (the actual setting ratio is defined in the internal table).
; Depending on the version, it depends on whether the large value is left or right.
; The upper 2 bits are used for phase inversion.
; Lower-5bit for pan value (0-20), higher-2bit is used for phase reverse switch.
macro SetPan(v)
db $E1, <v>
endmacro
; The position of the sound fades from the current value to yy over xx time.
macro PanFade(length, dest)
db $E2, <length>, <dest>
endmacro
; Enables vibrato (pitch fluctuation / pitch swing).
; Set zz-sized vibrato at yy speed after xx time.
macro VibratoOn(delay, rate, depth)
db $E3, <delay>, <rate>, <depth>
endmacro
macro VibratoOff()
db $E4
endmacro
; The volume of the entire song fades from the current value to yy over xx time.
macro MasterVolumeFade(length, dest)
db $E6, <length>, <dest>
endmacro
; Specifies the playing speed of the song.
; Value of about 24/60 is written.
macro TempoFade(length, dest)
db $E8, <length>, <dest>
endmacro
; Raises the playing pitch of all channels by xx
; (negative numbers can be specified).
macro GlobalTranspose(tone)
db $E9, <tone>
endmacro
; Raises the playing pitch of a single channel by xx
; (negative numbers can also be specified).
macro ChannelTranspose(tone)
db $EA, <tone>
endmacro
; Enable tremolo (volume fluctuation).
; Set the tremolo of the size of zz to be applied at the speed of yy after xx time.
macro TremoloOn(delay, rate, depth)
db $EB, <delay>, <rate>, <depth>
endmacro
macro TremoloOff()
db $EC
endmacro
macro ChannelVolumeFade(length, dest)
db $EE, <length>, <dest>
endmacro
; After temporarily setting the vibrato depth to 0,
; it will smoothly return to the original value over xx time.
macro VibratoFade(length)
db $F0, <length>
endmacro
; Specifies that subsequent sounds will be
; "higher by zz over yy time after xx time."
; zz is a semitone unit, and you can specify a negative number.
macro PitchEnvelopeTo(delay, length, key)
db $F1, <delay>, <length>, <key>
endmacro
; Specifies that subsequent notes will be
; "played at a pitch that is zz higher than normal,
; and will return to normal pitch over yy time after xx time."
; zz is a semitone unit, and you can specify a negative number.
macro PitchEnvelopeFrom(delay, length, key)
db $F2, <delay>, <length>, <key>
endmacro
macro PitchEnvelopeOff()
db $F3
endmacro
; Change the pitch slightly.
; Only positive numbers can be specified, so the pitch cannot be lowered.
; xx = Unsigned. Make the pitch xx/256 semitones higher.
macro Tuning(v)
db $F4, <v>
endmacro
; Specifies the channel and volume at which echo is enabled.
; The value set in the register remains the same.
; xx = Echo Switch (EON)
; yy = Echo Left Volume (EVOL (L))
; zz = Echo Right Volume (EVOL (R))
macro EchoVBits(switch, left, right)
db $F5, <switch>, <left>, <right>
endmacro
macro EchoOff()
db $F6
endmacro
macro EchoParams(delay, feedback, filter)
db $F7, <delay>, <feedback>, <filter>
endmacro
macro EchoVolumeFade(length, left, right)
db $F8, <length>, <left>, <right>
endmacro
; This VCMD is handled at different timing than other VCMDs.
; utter note $90, (wait), set instrument to $01, utter note $92
; $90, $e0 $01, $92
; utter note $90 then change the key immediately to note $91, (wait),
; utter note $92.
; $90, $f9 $00 $01 $91, $92
; utter note $90 then change the key immediately to note $91, (wait),
; set instrument to $01, utter note $92.
; $90, $f9 $00 $01 $91, $e0 01, $92
; <weird example> utter note $90, (wait), set instrument to $01,
; (pitch slide vcmd appears but note $90 has been end), utter note $92.
; $90, $e0 01, $f9 $00 $01 $91, $92
; Smoothly changes the pitch of the sound being pronounced.
; After xx time from play, it will be changed to the zz pitch
; (absolute designation) over yy time.
; If you want to raise or lower the sound in the middle of one note,
; write this command continuously.
; If the pronunciation time is long, you can write it with Thai.
; Normally, after one Note, it waits for the length of the note
; and then processes the next byte, but only this command
; is read and processed immediately.
macro PitchSlide(delay, length, note)
db $F9, <delay>, <length>, <note>
endmacro
; Determines the correspondence between the percussion value and the sound you hear.
macro PercussionPatchBass(instrument)
db $FA, <instrument>
endmacro
; ==============================================
macro PlayQuarterNotes(...)
if sizeof(...) > 0
db !4th, <...>
else
db !4th
endif
endmacro
macro PlayEighthNotes(...)
if sizeof(...) > 0
db !8th, <...>
else
db !8th
endif
endmacro
macro PlayHalfNotes(...)
if sizeof(...) > 0
db !4th, <...>
else
db !4th
endif
; db !4th, <note>, $C8
endmacro
macro SustainNoteN(note, num)
db note
if num > 1
db $C8
%SustainNoteN(note, num - 1)
endif
endmacro
End = $00
Tie = $C8
Rest = $C9
; Percussion Note ($CA-DF)
; VByte itself means percussion note (#).
; Relations between percussion note and SRCN depends on $FA.
; By default, percussion uses the same instrument set as the song,
; and all percussion is keyed on with a note of $A4.
; The starting ID to use for all channels can be redefined by VCMD $FA.
; =========================================================
; Tone Map
;
; C C+ D D+ E F F+ G G+ A A+ B
; Oc1 80 81 82 83 84 85 86 87 88 89 8A 8B
; Oc2 8C 8D 8E 8F 90 91 92 93 94 95 96 97
; Oc3 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3
; Oc4 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
; Oc5 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB
; Oc6 BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7
C1 = $80
C1s = $81
D1 = $82
D1s = $83
E1 = $84
F1 = $85
F1s = $86
G1 = $87
G1s = $88
A1 = $89
A1s = $8A
B1 = $8B
C2 = $8C
C2s = $8D
D2 = $8E
D2s = $8F
E2 = $90
F2 = $91
F2s = $92
G2 = $93
G2s = $94
A2 = $95
A2s = $96
B2 = $97
C3 = $98
C3s = $99
D3 = $9A
D3s = $9B
E3 = $9C
F3 = $9D
F3s = $9E
G3 = $9F
G3s = $A0
A3 = $A1
A3s = $A2
B3 = $A3
C4 = $A4
C4s = $A5
D4 = $A6
D4s = $A7
E4 = $A8
F4 = $A9
F4s = $AA
G4 = $AB
G4s = $AC
A4 = $AD
A4s = $AE
B4 = $AF
C5 = $B0
C5s = $B1
D5 = $B2
D5s = $B3
E5 = $B4
F5 = $B5
F5s = $B6
G5 = $B7
G5s = $B8
A5 = $B9
A5s = $BA
B5 = $BB
C6 = $BC
C6s = $BD
D6 = $BE
D6s = $BF
E6 = $C0
F6 = $C1
F6s = $C2
G6 = $C3
G6s = $C4
A6 = $C5
A6s = $C6
B6 = $C7

File diff suppressed because it is too large Load Diff

View File

@@ -1,321 +0,0 @@
; =========================================================
; SFX instruments - Table: ARAM $3E00, ROM $1A:9C04
; ID VOL L,R Pitch SRCN ADSR Gain Mult Name
; -----------------------------------------------------------------------------
; $00 $70, $70 $1000 $00 $F6 $6A $B8 $03 Fwoosh
; $01 $70, $70 $1000 $01 $8E $E0 $B8 $02 Swish
; $02 $70, $70 $1000 $14 $FE $6A $B8 $02 Bomp
; $03 $70, $70 $1000 $03 $FE $F8 $B8 $0D Ting
; $04 $70, $70 $1000 $04 $FE $6A $7F $03 Rrrrr
; $05 $70, $70 $1000 $02 $FE $6A $7F $03 Clunk
; $06 $70, $70 $1000 $05 $FE $6A $70 $03 Ching
; $07 $70, $70 $1000 $06 $FE $6A $70 $03 Fwomp
; $08 $70, $70 $1000 $08 $FA $6A $70 $03 Squee
; $09 $70, $70 $1000 $06 $FE $6A $70 $01 Unused
; $0A $70, $70 $1000 $07 $FE $6A $70 $05 Bzzzrt
; $0B $70, $70 $1000 $0B $FE $6A $B8 $03 Brrfft
; $0C $70, $70 $1000 $0C $FE $E0 $B8 $02 Brrwwww
; $0D $70, $70 $1000 $0D $F9 $6E $B8 $03 Twee
; $0E $70, $70 $1000 $0E $FE $F5 $B8 $07 Pwing
; $0F $70, $70 $1000 $0F $FE $F5 $B8 $06 Pling
; $10 $70, $70 $1000 $01 $FE $FC $B8 $03 Chshtsh
; $11 $70, $70 $1000 $10 $8E $E0 $B8 $03 Splssh
; $12 $70, $70 $1000 $08 $8E $E0 $B8 $02 Weewoo
; $13 $70, $70 $1000 $14 $8E $E0 $B8 $02 Brbrbrb
; $14 $70, $70 $1000 $0A $88 $E0 $B8 $02 Bwow
; $15 $70, $70 $1000 $17 $8E $E0 $B8 $02 Uughf
; $16 $70, $70 $1000 $15 $FF $E0 $B8 $04 Aaaaaa
; $17 $70, $70 $1000 $03 $DF $11 $B8 $0F Twing
; $18 $70, $70 $1000 $01 $88 $E0 $B8 $01 Whooo
; -----------------------------------------------------------------------------
; SFX instruments by usage
; $00 SFX1.13, SFX1.14
; SFX2.07, SFX2.09, SFX2.0D, SFX2.0E, SFX2.2C, SFX2.3A
; SFX3.05, SFX3.26
; SFXU2533
; $01 SFX1.01, SFX1.02, SFX1.03, SFX1.04
; SFX2.01, SFX2.02, SFX2.12, SFX2.1A, SFX2.1E, SFX2.1F
; SFX2.21, SFX2.23, SFX2.29, SFX2.32, SFX2.39
; SFX3.02, SFX3.1E, SFX3.23, SFX3.31
; $02 SFX2.03, SFX2.04, SFX2.08, SFX2.0B, SFX2.12, SFX2.1F, SFX2.21
; SFX3.06, SFX3.0E
; SFXU2831
; $03 SFX2.06
; SFX3.0A, SFX3.30
; $04 SFX2.3C
; SFX3.32
; SFXU2831
; $05 SFX2.10, SFX2.11, SFX2.22
; SFX3.18, SFX3.3E
; SFXU252D
; $06 SFX2.05, SFX2.0A, SFX2.0F, SFX2.3B
; SFX3.04, SFX3.14, SFX3.25
; $07 SFX2.14, SFX2.15, SFX2.33
; SFX3.01, SFX3.11, SFX3.12, SFX3.19, SFX3.27, SFX3.28, SFX3.29, SFX3.35, SFX3.39
; SFXU26A2
; $08 SFX3.17
; $09 nothing
; $0A SFX1.15, SFX1.16
; SFX3.1C, SFX3.2A, SFX3.2B, SFX3.2C
; $0B SFX2.27
; SFX3.0B, SFX3.0F, SFX3.2E, SFX3.34, SFX3.35, SFX3.36, SFX3.3C, SFX3.3D, SFX3.3F
; $0C SFX2.2A
; SFX3.07, SFX3.08, SFX3.09
; $0D SFX1.0B, SFX1.0C, SFX1.17, SFX1.18, SFX1.1B, SFX1.1C
; SFX2.13, SFX2.20, SFX2.31, SFX2.3E, SFX2.3F
; SFX3.0C, SFX3.13, SFX3.24
; SFXU1EE2, SFXU279D, SFXU27F6, SFXU2807, SFXU2818
; $0E SFX1.0D, SFX1.0E, SFX1.0F, SFX1.10, SFX1.1D, SFX1.1E, SFX1.1F, SFX1.20
; SFX2.2B, SFX2.37
; SFX3.0D, SFX3.10, SFX3.1B, SFX3.2F, SFX3.33, SFX3.3A, SFX3.3B
; $0F SFX2.2D
; SFX3.1A, SFX3.1D, SFX3.20, SFX3.2D, SFX3.37
; SFXU1D1C
; $10 SFX2.16, SFX2.17, SFX2.18, SFX2.19
; $11 SFX2.1B, SFX2.1C, SFX2.24, SFX2.25, SFX2.28, SFX2.2E, SFX2.34, SFX3.28, SFX2.3D
; $12 SFX3.04
; $13 SFX1.07, SFX1.08
; SFX2.0C, SFX2.35, SFX2.36
; SFX3.03, SFX3.15, SFX3.16, SFX3.25, SFX3.38
; $14 SFX3.21, SFX3.22
; SFXU277E
; $15 SFX2.26, SFX2.30
; SFXU1F13
; $16 SFX1.11, SFX1.12
; SFX2.1D
; SFX3.1F
; $17 SFX2.2C, SFX2.3A
; $18 SFX1.09, SFX1.0A
; -----------------------------------------------------------------------------
; SFX1 - queued via $012D | Table: ARAM $17C0, ROM $1A:8B70
; ID ARAM ROM Name
; -----------------------------------------------------------------------------
; SFX1.01 $2652 $1A9A02 Rain / Zora area
; SFX1.02 $2662 $1A9A12 Rain / Zora area (packaged with $01)
; SFX1.03 $2677 $1A9A27 Rain
; SFX1.04 $2687 $1A9A37 Rain (packaged with $03)
; SFX1.05 $284F $1A9BFF Silence
; SFX1.06 $284F $1A9BFF Silence (packaged with $05)
; SFX1.07 $2739 $1A9AE9 The Rumbling
; SFX1.08 $2736 $1A9AE6 The Rumbling (packaged with $08)
; SFX1.09 $1C8E $1A903E Wind
; SFX1.0A $1CBC $1A906C Wind (packaged with $09 by APU)
; SFX1.0B $1BA3 $1A8F53 Flute song by flute boy
; SFX1.0C $1B62 $1A8F12 Flute song by flute boy (packaged with $0B)
; SFX1.0D $1B0E $1A8EBE Magic jingle
; SFX1.0E $1B1D $1A8ECD Magic jingle (packaged with $0D)
; SFX1.0F $1B2C $1A8EDC Crystal / Save and quit
; SFX1.10 $1B3E $1A8EEE Crystal / Save and quit (packaged with $0F)
; SFX1.11 $1EAC $1A925C Choir melody
; SFX1.12 $1EC8 $1A9278 Choir countermelody (packaged with $11)
; SFX1.13 $1AD2 $1A8E82 Large boss swoosh
; SFX1.14 $1AE1 $1A8E91 Large boss swoosh (packaged with $13)
; SFX1.15 $1AF0 $1A8EA0 Triforce door / Pyramid hole opening
; SFX1.16 $1AFF $1A8EAF VOMP (packaged with $15)
; SFX1.17 $1C24 $1A8FD4 Flute song for weathervane
; SFX1.18 $1BE3 $1A8F93 Flute song for weathervane (packaged with $17)
; SFX1.19 $0000 ------- Nothing (unused)
; SFX1.1A $0000 ------- Nothing (unused; packaged with $19)
; SFX1.1B $1BA3 $1A8F53 Flute song by flute boy duplicate (unused)
; SFX1.1C $1B62 $1A8F12 Flute song by flute boy duplicate (unused; packaged with $1B)
; SFX1.1D $1B0E $1A8EBE Magic jingle duplicate (unused)
; SFX1.1E $1B1D $1A8ECD Magic jingle duplicate (unused; packaged with $1D)
; SFX1.1F $1B2C $1A8EDC Crystal / Save and quit duplicate (unused)
; SFX1.20 $1B3E $1A8EEE Crystal / Save and quit duplicate (unused; packaged with $1F)
; $80..$FF Initiates a fade to half volume for SFX1
; -----------------------------------------------------------------------------
; SFX2 - queued via $012E | Table: ARAM $1820, ROM $1A:8BD0
; ID ARAM ROM Name
; -----------------------------------------------------------------------------
; 00 $0020 ------- Undefined; when queued value of $40, $C0, $80
; SFX2.01 $2614 $1A99C4 Slash
; SFX2.02 $2625 $1A99D5 Slash
; SFX2.03 $2634 $1A99E4 Slash
; SFX2.04 $2643 $1A99F3 Slash
; SFX2.05 $25DD $1A998D Clink
; SFX2.06 $25D7 $1A9987 Bombable door clink
; SFX2.07 $25B7 $1A9967 Fwoosh
; SFX2.08 $25E3 $1A9993 Arrow smash
; SFX2.09 $25AD $1A995D Boomerang fwish
; SFX2.0A $25C7 $1A9977 Hookshot clink
; SFX2.0B $2478 $1A9828 Placing bomb
; SFX2.0C $269C $1A9A4C Explosion
; SFX2.0D $2414 $1A97C4 Powder (paired $0D→$3F)
; SFX2.0E $2404 $1A97B4 Fire rod shot
; SFX2.0F $24C3 $1A9873 Ice rod shot
; SFX2.10 $23FA $1A97AA Hammer use
; SFX2.11 $23F0 $1A97A0 Hammering peg
; SFX2.12 $23CD $1A977D Digging
; SFX2.13 $23A0 $1A9750 Flute (paired $13→$3E)
; SFX2.14 $2380 $1A9730 Cape on
; SFX2.15 $2390 $1A9740 Cape off / Wallmaster grab
; SFX2.16 $232C $1A96DC Staircase
; SFX2.17 $2344 $1A96F4 Staircase
; SFX2.18 $2356 $1A9706 Staircase
; SFX2.19 $236E $1A971E Staircase
; SFX2.1A $2316 $1A96C6 Tall grass / Hammer hitting bush
; SFX2.1B $2307 $1A96B7 Shallow water
; SFX2.1C $2301 $1A96B1 Mire shallow water
; SFX2.1D $22BB $1A966B Lifting object
; SFX2.1E $2577 $1A9927 Cutting grass
; SFX2.1F $22E9 $1A9699 Item breaking
; SFX2.20 $22DA $1A968A Item falling in pit
; SFX2.21 $22CF $1A967F Bomb hitting ground / General thud
; SFX2.22 $2107 $1A94B7 Pushing object / Armos bounce
; SFX2.23 $22B1 $1A9661 Boots dust
; SFX2.24 $22A5 $1A9655 Splashing (paired $24→$3D)
; SFX2.25 $2296 $1A9646 Mire shallow water again?
; SFX2.26 $2844 $1A9BF4 Link taking damage
; SFX2.27 $2252 $1A9602 Fainting
; SFX2.28 $2287 $1A9637 Item splash
; SFX2.29 $243F $1A97EF Rupee refill (paired $29→$3B)
; SFX2.2A $2033 $1A93E3 Fire splash / Bombos spell
; SFX2.2B $1FF2 $1A93A2 Heart beep / Text box
; SFX2.2C $1FD9 $1A9389 Sword up (paired $2C→$3A) (also uses instrument $17)
; SFX2.2D $20A6 $1A9456 Magic drain
; SFX2.2E $1FCA $1A937A GT opening (paired $2E→$39)
; SFX2.2F $1F47 $1A92F7 GT opening / Water drain (paired $2F→$38)
; SFX2.30 $1EF1 $1A92A1 Cucco
; SFX2.31 $20CE $1A947E Fairy
; SFX2.32 $1D47 $1A90F7 Bug net
; SFX2.33 $1CDC $1A908C Teleport (paired $34→$33)
; SFX2.34 $1F6F $1A931F Teleport (paired $34→$33)
; SFX2.35 $1C67 $1A9017 Shaking
; SFX2.36 $1C64 $1A9014 Mire entrance (extends above; paired $35→$36)
; SFX2.37 $1A43 $1A8DF3 Spin charged
; SFX2.38 $1F6F $1A931F Water sound (paired $2F→$38)
; SFX2.39 $1F9C $1A934C Thunder (paired $2E→$39)
; SFX2.3A $1FE7 $1A9397 Sword up (paired $2C→$3A)
; SFX2.3B $2462 $1A9812 Rupee refill (paired $29→$3B)
; SFX2.3C $1A37 $1A8DE7 Error beep
; SFX2.3D $22AB $1A965B Big splash (paired $24→$3D)
; SFX2.3E $23B5 $1A9765 Flute (paired $13→$3E)
; SFX2.3F $2435 $1A97E5 Powder (paired $0D→$3F)
; -----------------------------------------------------------------------------
; SFX3 - queued via $012F | Table: ARAM $191C, ROM $1A:8CCC
; ID ARAM ROM Name
; -----------------------------------------------------------------------------
; 00 $003C ------- Undefined; when queued value of $40, $C0, $80
; SFX3.01 $1A18 $1A8DC8 Sword beam
; SFX3.02 $254E $1A98FE TR opening
; SFX3.03 $224A $1A95FA Pyramid hole
; SFX3.04 $220E $1A95BE Angry soldier
; SFX3.05 $25B7 $1A9967 Lynel shot / Javelin toss
; SFX3.06 $21F5 $1A95A5 Swoosh
; SFX3.07 $223D $1A95ED Cannon fire
; SFX3.08 $21E6 $1A9596 Damage to enemy; $0BEX.4=1
; SFX3.09 $21C1 $1A9571 Enemy death
; SFX3.0A $21A9 $1A9559 Collecting rupee
; SFX3.0B $2198 $1A9548 Collecting heart
; SFX3.0C $218E $1A953E Non-blank text character
; SFX3.0D $21B5 $1A9565 HUD heart
; SFX3.0E $2182 $1A9532 Opening chest
; SFX3.0F $24B9 $1A9869 ♪Do do do doooooo♫ (paired $0F→$3C→$3D→$3E→$3F)
; SFX3.10 $216D $1A951D Map (paired $10→$3B)
; SFX3.11 $214F $1A94FF Opening item menu / Bomb shop guy breathing
; SFX3.12 $215E $1A950E Closing item menu / Bomb shop guy breathing
; SFX3.13 $213B $1A94EB Throwing object / Stalfos jump
; SFX3.14 $246C $1A981C Key door
; SFX3.15 $212F $1A94DF Door / Chest (used with SFX2.29)
; SFX3.16 $2123 $1A94D3 Armos Knight thud
; SFX3.17 $25A6 $1A9956 Rat squeak
; SFX3.18 $20DD $1A948D Dragging
; SFX3.19 $250A $1A98BA Fireball / Laser shot
; SFX3.1A $1E8A $1A923A Chest reveal jingle (paired $1A→$38)
; SFX3.1B $20B6 $1A9466 Puzzle jingle (paired $1B→$3A)
; SFX3.1C $1A62 $1A8E12 Damage to enemy
; SFX3.1D $20A6 $1A9456 Magic meter
; SFX3.1E $2091 $1A9441 Wing flapping
; SFX3.1F $204B $1A93FB Link falling
; SFX3.20 $276C $1A9B1C Menu / Text cursor moved
; SFX3.21 $27E2 $1A9B92 Damage to boss
; SFX3.22 $26CF $1A9A7F Boss dying / Deleting file
; SFX3.23 $2001 $1A93B1 Spin attack swoosh (paired $23→$39)
; SFX3.24 $2043 $1A93F3 OW map perspective change
; SFX3.25 $1E9D $1A924D Pressure switch (also uses instrument $06)
; SFX3.26 $1E7B $1A922B Lightning / Game over / Laser / Ganon bat / Trinexx lunge
; SFX3.27 $1E40 $1A91F0 Agahnim charge
; SFX3.28 $26F7 $1A9AA7 Agahnim / Ganon teleport
; SFX3.29 $1E21 $1A91D1 Agahnim shot
; SFX3.2A $1E12 $1A91C2 Somaria / Byrna / Ether spell / Helma fire ball
; SFX3.2B $1DF3 $1A91A3 Electrocution
; SFX3.2C $1DC0 $1A9170 Bees
; SFX3.2D $1DA9 $1A9159 Milestone jingle (paired $2D→$37)
; SFX3.2E $1D5D $1A910D Heart container jingle (paired $2E→$35→$34)
; SFX3.2F $1D80 $1A9130 Key jingle (paired $2F→$33)
; SFX3.30 $1B53 $1A8F03 Magic zap / Plop
; SFX3.31 $1ACA $1A8E7A Sprite falling / Moldorm shuffle
; SFX3.32 $1A78 $1A8E28 BOING
; SFX3.33 $1D93 $1A9143 Key jingle (paired $2F→$33)
; SFX3.34 $1D66 $1A9116 Heart container jingle (paired $2E→$35→$34)
; SFX3.35 $1D73 $1A9123 Heart container jingle (paired $2E→$35→$34)
; SFX3.36 $1AA7 $1A8E57 Magic attack
; SFX3.37 $1DB4 $1A9164 Milestone jingle (paired $2D→$37)
; SFX3.38 $1E93 $1A9243 Chest reveal jingle (paired $1A→$38)
; SFX3.39 $2017 $1A93C7 Swish (paired $23→$39)
; SFX3.3A $20C0 $1A9470 Puzzle jingle (paired $1B→$3A)
; SFX3.3B $2176 $1A9526 Map (paired $10→$3B)
; SFX3.3C $248A $1A983A Item jingle (paired $0F→$3C→$3D→$3E→$3F)
; SFX3.3D $2494 $1A9844 Item jingle ($0F→$3C→$3D→$3E→$3F)
; SFX3.3E $249E $1A984E Item jingle (paired $0F→$3C→$3D→$3E→$3F)
; SFX3.3F $2480 $1A9830 Item jingle (paired $0F→$3C→$3D→$3E→$3F)
; -----------------------------------------------------------------------------
; Unused SFX
; ARAM ROM Description
; -----------------------------------------------------------------------------
; $1A5B $1A8E0B Noisy fsssh; bleeds into SFX3.1C
; $1D1C $1A90CC Radar ping
; $1EE2 $1A9292 Slide whistle / Chirp
; $1F13 $1A92C3 Cucco clucking
; $252D $1A98DD Brighter hammer peg
; $2533 $1A98E3 Bat wings flapping
; $2657 $1A9A07 Broken static
; $267C $1A9A2C Static; Loops
; $26A2 $1A9A52 Tuba jingle followed by a roar
; $277E $1A9B2E UFO winding up
; $279D $1A9B4D Distant whistling
; $27C9 $1A9B79 Bwuuuoow
; $27F6 $1A9BA6 Cat call
; $2807 $1A9BB7 Higher pitched cat call
; $2818 $1A9BC8 Reverse cat call
; $2829 $1A9BD9 Dial-up
; $2831 $1A9BE1 Bumper peg

File diff suppressed because it is too large Load Diff

View File

@@ -1,354 +0,0 @@
; Write Sprite Properties in the rom MACRO
macro Set_Sprite_Properties(SprPrep, SprMain)
{
pushpc ; Save writing Position for the sprite
org $0DB080+!SPRID ; Oam Harmless ($0E40)
db ((!Harmless<<7)|(!HVelocity<<6)|!NbrTiles)
org $0DB173+!SPRID ; Sprite HP ($0E50)
db !Health
org $0DB266+!SPRID ; Sprite Damage ($0CD2)
db !Damage
org $0DB359+!SPRID ; Sprite Data ($0E60 / $0F50)
db ((!DeathAnimation<<7)|(!ImperviousAll<<6)|(!SmallShadow<<5)|(!Shadow<<4)|(!Palette<<1))
org $0DB44C+!SPRID ; Sprite Hitbox ($0F60)
db ((!CollisionLayer<<7)|(!Statis<<6)|(!Persist<<5)|(!Hitbox))
org $0DB53F+!SPRID ; Sprite Fall ($0B6B)
db ((!DeflectArrow<<3)|(!Boss<<1)|!CanFall)
org $0DB632+!SPRID ; Sprite Prize ($0BE0)
db ((!Interaction<<7)|(!WaterSprite<<6)|(!Blockable<<5)|(!Sound<<4)|!Prize)
org $0DB725+!SPRID ; Sprite ($0CAA)
db ($40|(!Statue<<5)|(!DeflectProjectiles<<4)|(!ImpervSwordHammer<<2)|(!ImperviousArrow<<1))
org $069283+(!SPRID*2) ; Vanilla Sprite Main Pointer
dw NewMainSprFunction
org $06865B+(!SPRID*2) ; Vanilla Sprite Prep Pointer
dw NewSprPrepFunction
org NewSprRoutinesLong+(!SPRID*3) ; New Long Sprite Pointer
dl <SprMain>
org NewSprPrepRoutinesLong+(!SPRID*3) ; New Long Sprite Pointer
dl <SprPrep>
pullpc ; Get back the writing position for the sprite
}
endmacro
macro sta(...)
!a #= 0
while !a < sizeof(...)
STA <...>
!a #= !a+1
endwhile
endmacro
macro m16()
REP #$30
endmacro
macro m8()
SEP #$30
endmacro
macro a16()
REP #$20
endmacro
macro a8()
SEP #$20
endmacro
macro index16()
REP #$10
endmacro
macro index8()
SEP #$10
endmacro
macro GotoAction(action)
LDA.b #<action> : STA.w SprAction, X
endmacro
macro SetFrame(frame)
LDA.b #<frame> : STA.w SprFrame, X
endmacro
macro JumpTable(index, ...)
LDA.w <index>
JSL JumpTableLocal
!a #= 0
while !a < sizeof(...)
dw <...[!a]>
!a #= !a+1
endwhile
endmacro
macro SpriteJumpTable(...)
LDA.w SprAction, X
JSL JumpTableLocal
!a #= 0
while !a < sizeof(...)
dw <...[!a]>
!a #= !a+1
endwhile
endmacro
macro SetFlag(flag_addr, bit_pos)
LDA.b flag_addr : ORA.b #(1 << bit_pos) : STA.b flag_addr
endmacro
macro ClearFlag(flag_addr, bit_pos)
LDA.b flag_addr : AND.b #~(1 << bit_pos) : STA.b flag_addr
endmacro
macro ToggleFlag(flag_addr, bit_pos)
LDA.b flag_addr : EOR.b #(1 << bit_pos) : STA.b flag_addr
endmacro
macro CheckFlag(flag_addr, bit_pos, set_label, clear_label)
LDA.b flag_addr : AND.b #(1 << bit_pos) : BEQ clear_label
BRA set_label
endmacro
macro CheckFlagLong(flag_addr, bit_pos, set_label, clear_label)
LDA.l flag_addr : AND.b #(1 << bit_pos) : BEQ clear_label
BRA set_label
endmacro
; Increase the sprite frame every (frames_wait) frames
; reset to (frame_start) when reaching (frame_end)
; This is using SprTimerB
macro PlayAnimation(frame_start, frame_end, frame_wait)
{
LDA.w SprTimerB, X : BNE +
LDA.w SprFrame, X : INC : STA.w SprFrame, X
CMP.b #<frame_end>+1 : BCC ++
LDA.b #<frame_start> : STA.w SprFrame, X
++
LDA.b #<frame_wait> : STA.w SprTimerB, X
+
}
endmacro
macro PlayAnimBackwards(frame_start, frame_end, frame_wait)
LDA.w SprTimerB, X : BNE +
LDA.w SprFrame, X : DEC : STA.w SprFrame, X
CMP.b #<frame_end> : BCS ++
LDA.b #<frame_start> : STA.w SprFrame, X
++
LDA.b #<frame_wait> : STA.w SprTimerB, X
+
endmacro
macro StartOnFrame(frame)
LDA.w SprFrame, x : CMP.b #<frame> : BCS +
LDA.b #<frame> : STA.w SprFrame, x
+
endmacro
; Show message if the player is facing toward sprite and pressing A
; Return Carry Set if message is displayed
; can use BCC .label <> .label to see if message have been displayed
macro ShowSolicitedMessage(message_id)
LDY.b #(<message_id>)>>8
LDA.b #<message_id>
JSL Sprite_ShowSolicitedMessageIfPlayerFacing
endmacro
macro ShowMessageOnContact(message_id)
LDY.b #(<message_id>)>>8
LDA.b #<message_id>
JSL $05E1F0 ; Sprite_ShowMessageOnContact
endmacro
; Show message no matter what (should not be used without code condition)
macro ShowUnconditionalMessage(message_id)
LDY.b #(<message_id>)>>8
LDA.b #<message_id>
JSL Sprite_ShowMessageUnconditional
endmacro
; Make the sprite move towards the player at a speed of (speed)
macro MoveTowardPlayer(speed)
LDA.b #<speed>
JSL Sprite_ApplySpeedTowardsPlayer
JSL Sprite_MoveLong
endmacro
; Prevent the player from passing through sprite hitbox
macro PlayerCantPassThrough()
JSL Sprite_PlayerCantPassThrough
endmacro
; Do damage to player on contact if sprite is on same layer as player
macro DoDamageToPlayerSameLayerOnContact()
JSL Sprite_CheckDamageToPlayerSameLayer
endmacro
; Set harmless flag, 0 = harmful, 1 = harmless
macro SetHarmless(value)
LDA.w SprNbrOAM, X
AND #$7F
if <value> != 0
ORA.b #(<value>)<<7
endif
STA.w SprNbrOAM, X
endmacro
; Set Room Flag (Chest 6)
; Do not use if you have more than 5 chests or a small key under a pot
; in that room unless you want it to be already opened/taken
macro SetRoomFlag(value)
if <value> != 0
LDA $0403 : ORA #$20 : STA $0403
else
LDA $0403 : AND #$DF : STA $0403
endif
endmacro
; Will prevent the player from moving or opening his menu
macro PreventPlayerMovement()
LDA #$01 : STA $02E4
endmacro
; Will allow the player to move or open his menu
macro AllowPlayerMovement()
STZ.w $02E4
endmacro
; This is a 16 bit will load A with current rupee count
; to use with instructions CMP and BCC/BCS
macro GetPlayerRupees()
LDA $7EF360
endmacro
; Set the velocity Y of the sprite at (speed) value
; this require the use of the function JSL Sprite_MoveLong
macro SetSpriteSpeedY(speed)
LDA.b #<speed> : STA.w SprYSpeed, x
endmacro
; Set the velocity X of the sprite at (speed) value
; this require the use of the function JSL Sprite_MoveLong
macro SetSpriteSpeedX(speed)
LDA.b #<speed> : STA.w SprXSpeed, x
endmacro
macro PlaySFX1(sfxid)
LDA.b #<sfxid> : STA $012E
endmacro
macro PlaySFX2(sfxid)
LDA.b #<sfxid> : STA $012F
endmacro
macro PlayMusic(musicid)
LDA.b #<musicid> : STA $012C
endmacro
macro SetTimerA(length)
LDA.b #<length> : STA.w SprTimerA, X
endmacro
macro SetTimerB(length)
LDA.b #<length> : STA.w SprTimerB, X
endmacro
macro SetTimerC(length)
LDA.b #<length> : STA.w SprTimerC, X
endmacro
macro SetTimerD(length)
LDA.b #<length> : STA.w SprTimerD, X
endmacro
macro SetTimerE(length)
LDA.b #<length> : STA.w SprTimerE, X
endmacro
macro SetTimerF(length)
LDA.b #<length> : STA.w SprTimerF, X
endmacro
macro ErrorBeep()
LDA.b #$3C : STA.w $012E ; Error beep
endmacro
macro NextAction()
INC $0D80, X
endmacro
macro GetTilePos(x, y)
LDX.w #((<y>*$80)+(<x>*$02))
endmacro
macro SetupDistanceFromSprite()
LDA.w POSX : STA $02
LDA.w POSY : STA $03
LDA.w SprX, X : STA $04
LDA.w SprY, X : STA $05
endmacro
macro ProbCheck(mask, label)
JSL GetRandomInt
AND.b #<mask>
BNE <label>
endmacro
macro ProbCheck2(mask, label)
JSL GetRandomInt
AND.b #<mask>
BEQ <label>
endmacro
macro DrawSprite()
{
JSL Sprite_PrepOamCoord
JSL Sprite_OAM_AllocateDeferToPlayer
LDA.w SprGfx, X : CLC : ADC.w SprFrame, X : TAY
LDA.w .start_index, Y : STA $06
LDA.w SprFlash, X : STA $08
PHX
LDX .nbr_of_tiles, Y ; amount of tiles -1
LDY.b #$00
.nextTile
PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add Animation Index Offset
PHA ; Keep the value with animation index offset?
ASL A : TAX
REP #$20
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
AND.w #$0100 : STA $0E
INY
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
CLC : ADC #$0010 : CMP.w #$0100
SEP #$20
BCC .on_screen_y
; Put the sprite out of the way
LDA.b #$F0 : STA ($90), Y : STA $0E
.on_screen_y
PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore)
INY
LDA .chr, X : STA ($90), Y
INY
LDA .properties, X : ORA $08 : STA ($90), Y
PHY
TYA : LSR #2 : TAY
LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY
PLX : DEX : BPL .nextTile
PLX
RTS
}
endmacro

View File

@@ -1,80 +0,0 @@
pushpc
org $06FFF8 ; New Jumptable for sprites
NewMainSprFunction:
JSL SpriteActiveExp_MainLong
RTS
org $068EB9
NewSprPrepFunction:
JSL Sprite_PrepExp_Long
RTS
pullpc
SpriteActiveExp_MainLong:
{
PHB : PHK : PLB
JSL NewSprTable
PLB
RTL
}
NewSprTable:
{
LDA $0E20, X ; Load Sprite ID
REP #$30
AND.w #$00FF
STA $06
ASL A ; *2
CLC : ADC $06 ; *3
TAY
LDA NewSprRoutinesLong, Y ; Load sprite Address
STA $06
SEP #$20
LDA NewSprRoutinesLong+2, Y
STA $08
SEP #$30
JMP [$0006]
;do a JML and sprite will RTL back to previous code
}
Sprite_PrepExp_Long:
{
PHB : PHK : PLB
JSL NewSprPrepTable
PLB
RTL
}
NewSprPrepTable:
{
LDA $0E20, X ; Load Sprite ID
REP #$30
AND.w #$00FF
STA $06
ASL A ; *2
CLC : ADC $06 ; *3
TAY
LDA NewSprPrepRoutinesLong, Y ; Load sprite Address
STA $06
SEP #$20 ; Previously SEP #$30 -_- (that's fine for sprites below ~0x40 over that it will crash)
LDA NewSprPrepRoutinesLong+2, Y
STA $08
SEP #$30
JMP [$0006]
}
NewSprRoutinesLong:
{
fillbyte $00
fill $2FD
}
NewSprPrepRoutinesLong:
{
fillbyte $00
fill $2FD
}

View File

@@ -1,515 +0,0 @@
; Game state
; 0x00 - Very start; progress cannot be saved in this state
; 0x01 - Uncle reached
; 0x02 - Zelda rescued
; 0x03 - Agahnim defeated
GameState = $7EF3C5
; Red X on Hall of Secrets
; Red X on Kalyxo Pyramid
; .fmp h.i.
; f - fortress of secrets
; m - master sword
; p - pendant quest
; h - hall of secrets
; i - intro over, maku tree
OOSPROG = $7EF3D6
; Bitfield of less important progression
; .fbh .zsu
; u - Uncle
; s - Priest visited in sanc after Zelda is kidnapped again
; z - Zelda brought to sanc
; h - Uncle left Link's house (0: spawn | 1: gone)
; b - Book of Mudora obtained/mentioned; controls Aginah dialog
; f - Flipped by fortune tellers to decide fortune set to give
OOSPROG2 = $7EF3C6
; .... ...m
; m - maku tree has met link (0: no | 1: yes)
MakuTreeQuest = $7EF3D4
; Map icon
; 0x00 - Red X on Maku Tree/Maku Warp
; 0x01 - Toadstool Woods Crystal
; 0x02 - Kalyxo All Crystals
; 0x03 -
; 0x04 -
; 0x05 -
; 0x06 -
; 0x07 -
; 0x08 - Skull on GT | Climb Ganon's Tower
MapIcon = $7EF3C7
; 01 - Fishing Rod
; 02 - Portal Rod
CustomRods = $7EF351
; Free SRAM Block 38A-3C4
FishingRod = $7EF38A
; Collectibles
Bananas = $7EF38B
Pineapples = $7EF38D
RockMeat = $7EF38F
Seashells = $7EF391
Honeycomb = $7EF393
DekuSticks = $7EF395
TingleMaps = $7EF396
TingleId = $7EF397
; .dgi zktm
; m - Mushroom Grotto
; t - Tail Palace
; k - Kalyxo Castle
; z - Zora Temple
; i - Glacia Estate
; g - Goron Mines
; d - Dragon Ship
Scrolls = $7EF398
; Keep track of the previous scroll
; For re-reading old hints.
PrevScroll = $7EF39A
; .dts fwpb
; b - bean planted
; w - plant watered
; p - pollinated by bee
; f - first day
; s - second day
; t - third day
; d - done
MagicBeanProg = $7EF39B
; .... .cpw
; c - courage
; p - power
; w - wisdom
Dreams = $7EF410
; =========================================================
; Items
; =========================================================
; 0x00 - Nothing
; 0x01 - Bow
; 0x02 - Bow and arrows
; 0x03 - Silver bow
; 0x04 - Silver bow and arrows
; Picking the arrow and nonarrow versions is done by the HUD draw routines
Bow = $7EF340
; 0x00 - Nothing
; 0x01 - Blue boomerang
; 0x02 - Red boomerang
Boomerang = $7EF341
; 0x00 - Nothing
; 0x01 - Hookshot
; 0x02 - Goldstar (L/R)
Hookshot = $7EF342
; Number of bombs
Bombs = $7EF343
; 0x00 - Nothing
; 0x01 - Mushroom
; 0x02 - Powder
MagicPowder = $7EF344
; 0x00 - Nothing
; 0x01 - Fire rod
FireRod = $7EF345
; 0x00 - Nothing
; 0x01 - Ice rod
IceRod = $7EF346
; 0x00 - Nothing
; 0x01 - Zora Mask
ZoraMask = $7EF347
; 0x00 - Nothing
; 0x01 - Bunny Hood
BunnyHood = $7EF348
; 0x00 - Nothing
; 0x01 - Deku Mask
DekuMask = $7EF349
; 0x00 - Nothing
; 0x01 - Lamp
Lamp = $7EF34A
; 0x00 - Nothing
; 0x01 - Magic hammer
Hammer = $7EF34B
; 0x00 - Nothing
; 0x01 - Shovel
; 0x02 - Inactive flute
; 0x03 - Active flute
Flute = $7EF34C
; 0x00 - Nothing
; 0x01 - Roc's Feather
RocsFeather = $7EF34D
; 0x00 - Nothing
; 0x01 - Book of Mudora
Book = $7EF34E
; 0x00 - Nothing
; Other values indicate the index of the currently selected bottle
BottleIndex = $7EF34F
; 0x00 - Nothing
; 0x01 - Cane of Somaria
Somaria = $7EF350
; 0x00 - Nothing
; 0x01 - Cane of Byrna
Byrna = $7EF351
; 0x00 - Nothing
; 0x01 - Stone Mask
StoneMask = $7EF352
; 0x00 - Nothing
; 0x01 - Letter (works like mirror)
; 0x02 - Mirror
; 0x03 - Deleted triforce item
Mirror = $7EF353
; 0x00 - Lift 1 (nothing)
; 0x01 - Lift 2 (power glove)
; 0x02 - Lift 3 (titan's mitt)
Gloves = $7EF354
; 0x00 - Nothing
; 0x01 - Pegasus boots
; bit 2 of $7E:F379 also needs to be set to actually dash
Boots = $7EF355
; 0x00 - Nothing
; 0x01 - Zora's flippers
Flippers = $7EF356
; 0x00 - Nothing
; 0x01 - Moon pearl
Pearl = $7EF357
; 0x00 - Nothing
; 0x01 - Wolf Mask
WolfMask = $7EF358
; 0x00 - Nothing
; 0x01 - Fighter sword
; 0x02 - Master sword
; 0x03 - Tempered sword
; 0x04 - Golden sword
; 0xFF - Set when sword is handed in to smithy
Sword = $7EF359
; 0x00 - Nothing
; 0x01 - Fighter shield
; 0x02 - Fire shield
; 0x03 - Mirror shield
Shield = $7EF35A
; 0x00 - Green mail
; 0x01 - Blue mail
; 0x02 - Red mail
Armor = $7EF35B
; 0x00 - Nothing
; 0x01 - Mushroom (unused)
; 0x02 - Empty bottle
; 0x03 - Red potion
; 0x04 - Green potion
; 0x05 - Blue potion
; 0x06 - Fairy
; 0x07 - Bee
; 0x08 - Good bee
; 0x09 - Magic Bean
; 0x0A - Milk Bottle
Bottle1 = $7EF35C
Bottle2 = $7EF35D
Bottle3 = $7EF35E
Bottle4 = $7EF35F
; Number of rupees you have
; RUPEEDISP will be incremented or decremented until it reaches this value
Rupees = $7EF360
RupeesGoal = $7EF361
; Rupee count displayed on the HUD
RUPEEDISP = $7EF362
; Bitfields for ownership of various dungeon items
; SET 2 SET 1
; xced aspm wihb tg..
; c - Hyrule Castle
; x - Sewers
; a - Agahnim's Tower
;
; e - Eastern Palace
; d - Desert Palace
; h - Tower of Hera
;
; p - Palace of Darkness
; s - Swamp Palace
; w - Skull Woods
; b - Thieves' Town
; i - Ice Palace
; m - Misery Mire
; t - Turtle Rock
; g - Ganon's Tower
COMPASS1 = $7EF364
COMPASS2 = $7EF365
BIGKEY1 = $7EF366
BIGKEY2 = $7EF367
DNGMAP1 = $7EF368
DNGMAP2 = $7EF369
; Number of rupees donated to fairies
WISHRUP = $7EF36A
; Number of heart pieces towards next container
; Intended to be a value from 0-3
HEARTPC = $7EF36B
; Maximum health; 1 heart container = 0x08 HP
MAXHP = $7EF36C
; Current health
; You die at 0x00
; You also die at ≥0xA8
CURHP = $7EF36D
; Magic power, capped at 128
MagicPower = $7EF36E
; Current number of keys for whatever dungeon is loaded
KEYS = $7EF36F
; Number of capacity upgrades received
BOMBCAP = $7EF370
ARROWCAP = $7EF371
; Refills health
; Expects multiples of 8
HeartRefill = $7EF372
; Refills magic
ZAPME = $7EF373
; ... ..gbr
; r - Wisdom (red)
; b - Power (blue)
; g - Courage (green)
Pendants = $7EF374
; Refills bombs
BOMBME = $7EF375
; Refills arrows
SHOOTME = $7EF376
; Arrow count
Arrows = $7EF377
; Unused
UNUSED_7EF378 = $7EF378
; Displays ability flags
; lrtu pbsh
; h - Pray (unused and mostly cut off by HUD borders)
; s - Swim
; b - Run
; u - unused but set by default
; p - Pull
; t - Talk
; r - Read
; l - Lift
; This only controls the display of "LIFT.1"
; If this bit is unset but LIFT is set then the proper lift text is displayed
Ability = $7EF379
; Dungeon ID Legend
; Mushroom Grotto ID 0x0C (Palace of Darkness)
; Tail Palace ID 0x0A (Swamp Palace)
; Kalyxo Castle ID 0x10 (Skull Woods)
; Zora Temple ID 0x16 (Thieves Town)
; Glacia Estate 0x12 (Ice Palace)
; Goron Mines 0x0E (Misery Mire)
; Dragon Ship 0x18 (Turtle Rock)
; .wbs tipm
; p - Palace of Darkness
; s - Swamp Palace
; w - Skull Woods
; b - Thieves' Town
; i - Ice Palace
; m - Misery Mire
; t - Turtle Rock
Crystals = $7EF37A
; 0x00 - Normal magic
; 0x01 - Half magic
; 0x02 - Quarter magic
; Quarter magic has no special HUD graphic, unlike half magic
; Also, not everything is necessarily quarter magic
MagicUsage = $7EF37B
; Keys earned per dungeon
; Sewers and Castle are kept in sync
KEYSSEWER = $7EF37C
KEYSHYRULE = $7EF37D
KEYSEAST = $7EF37E
KEYSDESERT = $7EF37F
KEYSAGA = $7EF380
KEYSSWAMP = $7EF381
KEYSPOD = $7EF382
KEYSMIRE = $7EF383
KEYSWOODS = $7EF384
KEYSICE = $7EF385
KEYSHERA = $7EF386
KEYSTHIEF = $7EF387
KEYSTROCK = $7EF388
KEYSGANON = $7EF389
; Unused block of SRAM
UNUSED_7EF38A = $7EF38A
; Game state
; 0x00 - Very start; progress cannot be saved in this state
; 0x01 - Uncle reached
; 0x02 - Zelda rescued
; 0x03 - Agahnim defeated
GAMESTATE = $7EF3C5
; Bitfield of less important progression
; .fbh .zsu
; u - Uncle visited in secret passage; controls spawn (0: spawn | 1: gone)
; s - Priest visited in sanc after Zelda is kidnapped again
; z - Zelda brought to sanc
; h - Uncle has left Link's house; controls spawn (0: spawn | 1: gone)
; b - Book of Mudora obtained/mentioned; controls Aginah dialog
; f - Flipped by fortune tellers to decide which fortune set to give
PROGLITE = $7EF3C6
; Map icon to guide noob players
; 0x00 - Red X on castle | Save zelda
; 0x01 - Red X on Kakariko | Talk to villagers about elders
; 0x02 - Red X on Eastern | Talk to Sahasrahla
; 0x03 - Pendants and MS | Obtain the master sword
; 0x04 - Master sword on LW | Grab the master sword
; 0x05 - Skull on castle | Kill Agahnim
; 0x06 - Crystal on POD | Get the first crystal
; 0x07 - Crystals | Get all 7 crystals
; 0x08 - Skull on GT | Climb Ganon's Tower
MAPICON = $7EF3C7
; 0x00 - Link's house
; 0x01 - Sanctuary
; 0x02 - Prison
; 0x03 - Uncle
; 0x04 - Throne
; 0x05 - Old man cave
; 0x06 - Old man home
SpawnPoint = $7EF3C8
; Another bitfield for progress
; t.dp s.bh
; t - smiths are currently tempering sword
; d - swordsmith rescued
; p - purple chest has been opened
; s - stumpy has been stumped
; b - bottle purchased from vendor
; h - bottle received from hobo
PROGLITE2 = $7EF3C9
; .d.. ....
; d - World (0: Light World | 1: Dark World)
SAVEWORLD = $7EF3CA
; Not used
UNUSED_7EF3CB = $7EF3CB
; Current follower ID
FOLLOWER = $7EF3CC
; Cache of follower properties
FOLLOWCYL = $7EF3CD
FOLLOWCYH = $7EF3CE
FOLLOWCXL = $7EF3CF
FOLLOWCXH = $7EF3D0
; Copies INDOORS
FOLLOWERINOUT = $7EF3D1
; Copies LAYER
FOLLOWERCLAYER = $7EF3D2
; Indicates the follower is currently following
; 0x00 - Following
; 0x80 - Not following
FOLLOWERING = $7EF3D3
; Unused
UNUSED_7EF3D4 = $7EF3D4
UNUSED_7EF3D5 = $7EF3D5
UNUSED_7EF3D6 = $7EF3D6
UNUSED_7EF3D7 = $7EF3D7
UNUSED_7EF3D8 = $7EF3D8
; Player name
NAME1L = $7EF3D9
NAME1H = $7EF3DA
NAME2L = $7EF3DB
NAME2H = $7EF3DC
NAME3L = $7EF3DD
NAME3H = $7EF3DE
NAME4L = $7EF3DF
NAME4H = $7EF3E0
; Save file checksum; expected to be $55AA
SCHKSML = $7EF3E1
SCHKSMH = $7EF3E2
; Games played in each dungeon
GPSEWER = $7EF3E3
GPHYRULE = $7EF3E5
GPEAST = $7EF3E7
GPDESERT = $7EF3E9
GPAGA = $7EF3EB
GPSWAMP = $7EF3ED
GPPOD = $7EF3EF
GPMIRE = $7EF3F1
GPWOODS = $7EF3F3
GPICE = $7EF3F5
GPHERA = $7EF3F7
GPTHIEF = $7EF3F9
GPTROCK = $7EF3FB
GPGANON = $7EF3FD
; Games played for current segment
GPNOW = $7EF3FF
; Total games played
; No display on file select if 0xFFFF
GAMESPLAYED = $7EF401
; Big unused block
UNUSED_7EF403 = $7EF403
DEATHS_MAXED = $7EF405
; Inverse checksum for save file
SAVEICKSML = $7EF4FE
SAVEICKSMH = $7EF4FF

View File

@@ -1,63 +0,0 @@
struct Sprite $7E0BA0
{
.BulletProof: skip 16
.AncillaId: skip 16
.Slot: skip 16
.OwDeath: skip 32
.Prize: skip 16
; 7E0BF0
; 7E0C9A
.OwScreen: skip 16
.Deflect: skip 16
.ForceDrop: skip 16
.OverlordRoom: skip 8
.BumpDamage: skip 16
.CurrDamage: skip 16
; 0CF2
; 0CFF
.yl: skip 16
.xl: skip 16
.yh: skip 16
.xh: skip 16
.vy: skip 16
.vx: skip 16
.sub_vy: skip 16
.sub_vx: skip 16
.action: skip 16
.frame: skip 16
.misc_a: skip 16
.misc_b: skip 16
.gfx: skip 16
.state: skip 16
.misc_c: skip 16
.TimerA: skip 16
.TimerB: skip 16
.TimerC: skip 16
.type: skip 16
.subtype: skip 16
.nbr_oam: skip 16
.hp: skip 16
.props: skip 16
.collide: skip 16
.delay: skip 16
.misc_d: skip 16
.recoil: skip 16
.misc_e: skip 16
.misc_f: skip 16
.misc_g: skip 16
.timer_d: skip 16
.death_timer: skip 16
.pause: skip 16
.timer_e: skip 16
.floor: skip 16
.recoil_y: skip 16
.recoil_x: skip 16
.oam_prop: skip 16
.collision_prop: skip 16
.z: skip 16
.vz: skip 16
.sub_vz: skip 16
}
endstruct

View File

@@ -1,758 +0,0 @@
; =========================================================
; WRAM in Use
org $008000
base $7E0730 ; MAP16OVERFLOW free ram region
{
MenuScrollLevelV: skip 1
MenuScrollLevelH: skip 1
MenuScrollHDirection: skip 2
MenuItemValueSpoof: skip 2
ShortSpoof: skip 1
MusicNoteValue: skip 2
OverworldLocationPointer: skip 2
HasGoldstar: skip 1
GoldstarOrHookshot: skip 1
Neck_Index: skip 1
Neck1_OffsetX: skip 1
Neck1_OffsetY: skip 1
Neck2_OffsetX: skip 1
Neck2_OffsetY: skip 1
Neck3_OffsetX: skip 1
Neck3_OffsetY: skip 1
Offspring1_Id: skip 1
Offspring2_Id: skip 1
Offspring3_Id: skip 1
Kydreeok_Id: skip 1
FishingOrPortalRod: skip 1
}
base off
; =========================================================
function RGBto555(R,G,B) = ((R/8)<<10)|((G/8)<<5)|(B/8) ; zarby
function menu_offset(y,x) = (y*64)+(x*2)
; Current Dream ID (0x00-0x03)
CurrentDream = $0426
; Current Song
CurrentSong = $030F
; 01 - Song of Healing
; 02 - Song of Time
; 03 - Song of Storms
SongFlag = $FE
; =========================================================
; The record format for the low table is 4 bytes:
; byte OBJ*4+0: xxxxxxxx
; byte OBJ*4+1: yyyyyyyy
; byte OBJ*4+2: cccccccc
; byte OBJ*4+3: vhoopppN
; The record format for the high table is 2 bits:
; bit 0/2/4/6 of byte OBJ/4: X
; bit 1/3/5/7 of byte OBJ/4: s
; Xxxxxxxxx = X position of the sprite. signed but see below.
; yyyyyyyy = Y position of the sprite.
; cccccccc = First tile of the sprite.
; N = Name table of the sprite. See below for VRAM address calculation
; ppp = Palette of the sprite. The first palette index is 128+ppp*16.
; oo = Sprite priority. See below for details.
; h/v = Horizontal/Vertical flip flags.
; s = Sprite size flag. See below for details.
OamPtr = $90
OamPtrH = $92
OamBackup = $0FEC
; =========================================================
; Sprite RAM
SprY = $0D00
SprX = $0D10
SprYH = $0D20
SprXH = $0D30
SprYSpeed = $0D40
SprXSpeed = $0D50
SprYRound = $0D60
SprXRound = $0D70
SprCachedX = $0FD8
SprCachedY = $0FDA
SprAction = $0D80 ; Indexes the action jump table
SprFrame = $0D90 ; Indexes the SprGfx for drawing
SprGfx = $0DC0 ; Determine the GFX used for the sprite
SprMiscA = $0DA0 ; Direction, position, or other misc usage
SprMiscB = $0DB0 ; Various usages, truly auxiliary
SprMiscC = $0DE0 ; Cardinal direction the sprite is facing
SprMiscD = $0E90 ; Pikit stolen item, misc usage
SprMiscE = $0EB0 ; Head direction 0123 -> udlr
SprMiscF = $0EC0 ;
SprMiscG = $0ED0 ;
SprCustom = $1CC0 ;
; Used in sprite state 0x03 (falling in water)
; used as delay in most of the sprites
SprDelay = $0E80
SprFlash = $0B89 ; Enemy color flash buffer
SprTimerA = $0DF0 ; Action, decreased by 1 each frame
SprTimerB = $0E00 ; Animation, decreased by 1 each frame
SprTimerC = $0E10 ; decreased by 1 each frame
SprTimerD = $0EE0 ; decreased by 1 each frame
SprTimerE = $0F10 ; decreased by 1 each frame
SprTimerF = $0F80 ; Gravity, decreased by 2 each frame
SprSlot = $0FA0 ; Current sprite slot being executed
SprStunTimer = $0B58 ; counts down from 0xFF
SprPause = $0F00 ; Inactive if nonzero
SprFloor = $0F20 ; 0 (top layer), 1 (bottom layer)
SprType = $0E20 ; Sprite ID
SprSubtype = $0E30 ; Sprite subtype
; hmwo oooo
; o - define the number of OAM slots used by the sprite
; w - Causes enemies to go towards the walls
; m - Master sword ceremony sprite flag
; h - If set, harmless. Unset you take damage from contact.
SprNbrOAM = $0E40
SprHealth = $0E50
; 0x00 - Sprite is dead, totally inactive
; 0x01 - Sprite falling into a pit with generic animation.
; 0x02 - Sprite transforms into a puff of smoke, often producing an item
; 0x03 - Sprite falling into deep water (optionally making a fish jump up?)
; 0x04 - Death mode for bosses
; 0x05 - Sprite falling into a pit that has a special animation
; 0x06 - Death Mode for normal creatures.
; 0x08 - Sprite is being spawned at load time.
; An initialization routine will be run for one frame,
; and then move on to the active state (0x09) next frame.
; 0x09 - Sprite is in the normal, active mode.
; 0x0A - Sprite is being carried by the player.
; 0x0B - Sprite is frozen and / or stunned.
SprState = $0DD0
; nios pppt
; n - if set, don't draw extra death anim
; i - impervious to attacks and collision? TODO
; o - shadow size (0: normal | 1: small)
; s - shadow (0: no shadow | 1: shadow)
; p - palette used for OAM props
; t - name table used for OAM props
SprGfxProps = $0E60
; Direction of sprite collision with wall
SprCollision = $0E70
; Definitely closely tied to the process of a sprite taking damage.
; Seems to serve as a palette cycling index, or a state variable.
; When this value is positive
; 0x80 - Signal that the recoil process has finished
; and will terminate during this frame.
SprRecoil = $0EA0 ; Recoil Timer
; abbbbbbb:
; a - start death timer
; b - death timer
SprDeath = $0EF0
SprYRecoil = $0F30
SprXRecoil = $0F40
; DIWS UUUU
; D - boss death
; I - Impervious to all attacks
; W - Water slash
; S - Draw Shadow
; U - Unused
SprProps = $0F50
; ISPH HHHH
; I - ignore collisions
; S - Statis (not alive eg beamos)
; P - Persist code still run outside of camera
; H - Hitbox
SprHitbox = $0F60
SprHeight = $0F70 ; Distance from the shadow
SprHeightS = $0F90 ; Distance from the shadow subpixel
SprFreeze = $0FC1 ; Seems to freeze sprites
; Primarily deals with bump damage
; tzpd bbbb
; t - TODO
; z - High priority target for bees to give hints
; p - Powder interaction (0: normal | 1: ignore)
; d - Behavior when a boss spawns (0: die | 1: live)
; b - bump damage class
; Bump damage classes are read from a table at $06F42D
; Each table entry has 3 values, for green, blue, and red mails
; class g b r
; 0x00 2 1 1
; 0x01 4 4 4
; 0x02 0 0 0
; 0x03 8 4 2
; 0x04 8 8 8
; 0x05 16 8 4
; 0x06 32 16 8
; 0x07 32 24 16
; 0x08 24 16 8
; 0x09 64 48 24
SprBump = $0CD2
; Damage sprite is enduring
SprDmgTaken = $0CE2
; Sprite Deflection Properties
; abcdefgh
; a - If set, sprite is active
; b - Same as bit 'a' for Zora.
; c - Never queried, pushable interaction flag
; d - If hit from front, deflect Ice Rod, Somarian missile,
; boomerang, hookshot, and sword beam, and arrows stick in
; it harmlessly. If bit 1 is also set, frontal arrows will
; instead disappear harmlessly.
; e - If set, sprite collides with less tiles than usual
; f - If set, impervious to sword and hammer type attacks
; g - If set, impervious to arrows, but may have other additional meanings.
; h - Handles behavior with previous deaths flagged in $7FDF80 (0: default | 1: ignore)
SprDefl = $0CAA
; iwbs pppp
; i - disable tile interaction
; w - something water
; b - sprite is blocked by shield
; s - taking damage sfx to use TODO name
; p - prize pack
SprPrize = $0BE0
; tttt a.bp
; t - tile interaction hitbox
; a - deflect arrows TODO VERIFY
; b - boss death
; p - Sprite ignores falling into a pit when frozen?
SprTileDie = $0B6B
; For sprites that interact with speical objects (arrows in particular)
; the special object will identify its type to the sprite via this location.
SprSpecial = $0BB0
; If nonzero, ancillae do not interact with the sprite
; Bulletproof
SprBulletproof = $0BA0
SprRoom = $0C9A ;X W Contains the area or room id the sprite has been loaded in
SprDrop = $0CBA ;X W 00: Drop nothing, 01: drop normal key, 03: Drop green rupee, OtherValues: Drop big key
; Overlord
OverlordId = $0B00
OverlordX = $0B08
OverlordXH = $0B10
OverlordY = $0B18
OverlordYH = $0B20
OverlordTimerA = $0B28
OverlordTimerB = $0B30
OverlordTimerC = $0B38
; =========================================================
; Sprite Functions
SpriteData_OAMProp = $0DB359
; Clear all properties for sprites
SpritePrep_ResetProperties = $0DB871
; set the oam coordinate for the sprite draw
Sprite_PrepOamCoord = $06E416
; Draw the sprite depending of the position of the player
; (if he has to be over or under link)
Sprite_OAM_AllocateDeferToPlayer = $06F864
OAM_AllocateFromRegionA = $0DBA80 ; Above
OAM_AllocateFromRegionB = $0DBA84 ; Below
OAM_AllocateFromRegionC = $0DBA88 ; Above
OAM_AllocateFromRegionD = $0DBA8C ; Above
OAM_AllocateFromRegionE = $0DBA90 ; Above
OAM_AllocateFromRegionF = $0DBA94 ; Above
Sprite_DrawMultiple_quantity_preset = $05DF70
; check if the sprite is getting damage from player or items
Sprite_CheckDamageFromPlayer = $06F2AA
; check if the sprite is touching the player to damage
Sprite_CheckDamageToPlayer = $06F121
; damage the player everywhere on screen?
Sprite_AttemptDamageToPlayerPlusRecoil = $06F41F
; makes all the sprites on screen shaking
ApplyRumbleToSprites = $0680FA
Sprite_MoveLong = $1D808C
Sprite_ProjectSpeedTowardsPlayer = $06EA1A
Sprite_Decelerate_X = $05E657
Sprite_Decelerate_Y = $05E666
; =========================================================
; returns carry clear if there was no overlap
; args:
pos1_x_low = $00
pos1_y_low = $01
pos1_size = $02
pos1_height = $03
pos2_x_low = $04
pos2_y_low = $05
pos2_size = $06
pos2_height = $07
pos1_x_high = $08
pos1_y_high = $09
pos2_x_high = $0A
pos2_y_high = $0B
ans_low = $0F
ans_high = $0C
CheckIfHitBoxesOverlap = $0683E6
; $0FD8 = sprite's X coordinate
; $0FDA = sprite's Y coordinate
Sprite_Get16BitCoords_Local = $0684C1
Sprite_Get_16_bit_Coords = $0684BD
; load / draw a 16x16 sprite
Sprite_PrepAndDrawSingleLarge = $06DBF0
; load / draw a 8x8 sprite
Sprite_PrepAndDrawSingleSmall = $06DBF8
; draw shadow (requires additional oam allocation)
Sprite_DrawShadow = $06DC54
Sprite_DrawWaterRipple = $059FFA
Sprite_DrawRippleIfInWater = $1EFF8D
; check if the sprite is colliding with a solid tile set $0E70, X
; ----udlr , u = up, d = down, l = left, r = right
Sprite_CheckTileCollision = $06E496
Sprite_CheckTileCollision_long = $06E496
; $00[0x02] - Entity Y coordinate
; $02[0x03?] - Entity X coordinate
; $0FA5 - Tile ID result
Sprite_GetTileAttr = $06E87B
; check if the sprite is colliding with a solid sloped tile
Sprite_CheckSlopedTileCollision = $06E8FD
; set the velocity x,y towards the player (A = speed)
Sprite_ApplySpeedTowardsPlayer = $06EA12
; \return $0E is low byte of player_y_pos - sprite_y_pos
; \return $0F is low byte of player_x_pos - sprite_x_pos
Sprite_DirectionToFacePlayer = $06EAA0
; if Link is to the left of the sprite, Y = 1, otherwise Y = 0.
Sprite_IsToRightOfPlayer = $06EACD
; return Y=1 sprite is below player, otherwise Y = 0
Sprite_IsBelowPlayer = $06EAE4
; $06 = sprite's Y coordinate
; $07 = sprite's X coordinate
Sprite_IsBelowLocation = $06EB1D
; check damage done to player if they collide on same layer
Sprite_CheckDamageToPlayerSameLayer = $06F129
; check damage done to player if they collide even if they are not on same layer
Sprite_CheckDamageToPlayerIgnoreLayer = $06F131
; play a sound loaded in A
Sound_SetSfx1PanLong = $0DBB6E
Sound_SetSfx2PanLong = $0DBB7C
Sound_SetSfx3PanLong = $0DBB8A
; =========================================================
; spawn a new sprite on screen, A = sprite id
; when using this function you have to set the position yourself
; these values belong to the sprite who used that function not the new one
; $00 low x, $01 high x
; $02 low y, $03 high y
; $04 height, $05 low x (overlord)
; $06 high x (overlord), $07 low y (overlord)
; $08 high y (overlord)
Sprite_SpawnDynamically = $1DF65D
Sprite_SpawnDynamically_slot_limited = $1DF65F
Sprite_SetSpawnedCoords = $09AE64
Sprite_SetSpawnedCoordinates = $09AE64
; move the sprite if he stand on a conveyor belt
Sprite_ApplyConveyorAdjustment = $1D8010
; Setup sprite hitbox for comparison with scrap ram
Sprite_SetupHitBoxLong = $0683EA
; player can't pass through the sprite
Sprite_BehaveAsBarrier = $1EF4F3
Sprite_PlayerCantPassThrough = $1EF4F3
; player can't hookshot to that sprite
Sprite_CancelHookshot = $0FF540
Sprite_NullifyHookshotDrag = $0FF540
; show a message box without any condition
; A = low byte of message ID to use.
; Y = high byte of message ID to use.
Sprite_ShowMessageUnconditional = $05E219
; show a message if we press A and face the sprite
; A = low byte of message ID to use.
; Y = high byte of message ID to use.
Sprite_ShowSolicitedMessage = $05E1A7
Sprite_ShowSolicitedMessageIfPlayerFacing = $05E1A7
; show a message if we touch the sprite
; should be used with Sprite_PlayerCantPassThrough
; A = low byte of message ID to use.
; Y = high byte of message ID to use.
Sprite_ShowMessageOnContact = $05E1F0
Sprite_ShowMessageFromPlayerContact = $05E1F0
; Parameters: Stack, A
JumpTableLocal = $008781
UseImplicitRegIndexedLocalJumpTable = $008781
EnableForceBlank = $00893D
Snitch_SpawnGuard = $09C02F
Sprite_KillFriends = $09EF56
Sprite_KillSelf = $09F1F8
Dungeon_SpriteInducedTilemapUpdate = $01E7A9
; =========================================================
; $04 = X
; $05 = HighX
; $06 = Y
; $07 = HighY
; A = Speed
; \return $00 - Y Velocity
; \return $01 - X Velocity
Sprite_ProjectSpeedTowardsEntityLong = $06EA22
; =========================================================
; Guard and Prober functions
; SprMiscB contains the ID of the parent sprite to alert
Guard_ChaseLinkOnOneAxis = $05C542
Guard_ParrySwordAttacks = $06EB5E
Probe_CheckTileSolidity = $0DC26E
ProbeAndSparkCheckDirXSpeed = $05C359
ProbeAndSparkCheckDirYSpeed = $05C361
ProbeAndSparkXSpeed = $05C369
ProbeAndSparkYSpeed = $05C371
ColinearDirections = $05C381
OrthogonalDirections = $05C389
ColinearNextDirections = $05C391
OrthogonalNextDirections = $05C399
Sprite_SpawnProbeAlways_long = $05C66E
Sprite_TrackBodyToHead = $05DCA2
; =========================================================
; Misc long functions
GetRandomInt = $0DBA71
Sprite_SpawnFireball = $0DDA06
Sprite_SpawnSmallSplash = $1EA820
Sprite_SpawnSparkleGarnish = $058008
Sprite_SpawnPoofGarnish = $05AB9C
Sprite_CheckIfLifted = $06AA0C
Sprite_TransmuteToBomb = $06AD50
Sprite_RepelDash = $079291
Sprite_LoadGfxProperties = $00FC41
ThrownSprite_TileAndSpriteInteraction_long = $06DFF2
Overworld_DrawMap16_Persist = $1BC97C
; =========================================================
; Local functions which may be useful for sprites
; Sprite_AttemptZapDamage - 06EC02
; =========================================================
; Misc RAM
FrameCounter = $1A ; value that is increasing every frame
Indoor = $1B ; 0: outside, 1: indoor
UpdPalFlag = $15 ; Update all palettes $7EC500-$7EC700 if non-zero
RoomIndex = $A0 ; Return the current room ID
AreaIndex = $8A ; Return the current overworld area ID
MsgChoice = $1CE8 ; Choice made in a message box
; set the mosaic setting ($2106) XXXXDCBA
; [ABCD BG1/BG2/BG3/BG4][X size of the mosaic pixels 0-16]
Mosaic = $95
DungeonMainCheck = $021B
SpriteRanCheck = $8E
; Underworld:
; Flags sprite deaths in underworld based on slot.
; Indexed by 2 * room ID.
; Overworld:
; Holds ID+1 of sprite with each position being assigned a unique byte
; 0x00 indicates no sprite in this slot
UWDEATH = $7FDF80
RebuildHUD_long = $0DFA58
ForcePrizeDrop_long = $06FA54
TileDetect_BigArea_long = $07CF0A
Follower_Initialize = $099EFC
HandleFollowersAfterMirroring = $07AAA2
; =========================================================
; Controllers
; BYSTUDLR
; [B BButton][Y YButton]
; [SSelect Button][TStart Button]
; [UDLR dpad buttons Up, Down, Left, Right]
RawJoypad1L = $F0
; AXLRIIII
; [A AButton][X Xbutton][L LButton][R RButton][I = controller ID]
RawJoypad1H = $F2
; BYSTUDLR
; [B BButton][Y YButton]
; [SSelect Button][TStart Button]
; [UDLR dpad buttons Up, Down, Left, Right]
PressPad1L = $F4
; AXLRIIII
; [A AButton][X Xbutton]
; [L LButton][R RButton][I = controller ID]
PressPad1H = $F6
ButtonAFlag = $3B ; bit7: Button A is down (A-------)
; Timer for B button
; ssss tttt
; s - spin attack in action; set to 0x9
; t - sword swing timer
; 0x00 - No swing
; —0x08 - Sword swing
; 0x09 - Sword primed
; —0x0C - Poking wall
;
; Also used as a 16-bit countdown for various cutscenes:
; Ether tablet: 0x00C0
; Bombos tablet: 0x00E0
; Desert tablet: 0x0001
BFLAG = $3C
; =========================================================
; Ancilla
AnciOAMPrior = $0280 ; Ancilla oam priority if non zero use highest priority for draw
AnciColTimer = $028A ; Ancilla collision timer to prevent doing collision code too often set to 06 after a collision
AnciZSpeed = $0294 ; Ancilla Z Speed
AnciHeight = $029E ; Ancilla Height how far it is from its shadow
AnciHeightH = $02A8 ; Ancilla Height hight byte how far it is from its shadow
AnciMiscA = $0BF0 ; This can be used to do anything in ancilla
AnciMiscB = $0C54 ; This can be used to do anything in ancilla
AnciMiscC = $0C5E ; This can be used to do anything in ancilla (often used to track item received)
AnciMiscD = $0C72 ; This can be used to do anything in ancilla (often used to track direction)
; General use variable for ancillae. Only intended for front slots.
; LENGTH: 0x05
AnciMiscJ = $03CA
; General use variable for ancillae.
; LENGTH: 0x0A
ANC0MISCB = $0385
AnciTimerA = $0C68 ; This is a timer, value is decreased by 1 every frame
AnciY = $0BFA ; Position Y of the ancilla (Up to Down)
AnciX = $0C04 ; Position X of the ancilla (Left to Right)
AnciYH = $0C0E ; High (often determine the room) Position Y of the ancilla (Up to Down)
AnciXH = $0C18 ; High (often determine the room) Position X of the ancilla (Left to Right)
AnciXSpeed = $0C22 ; Y Speed of the ancilla can go negative to go up
AnciYSpeed = $0C2C ; X Speed of the ancilla can go negative to go left
AnciLayer = $0C7C ; return the floor where the ancilla is
AnciOamBuf = $0C86 ; Oam buffer?
AnciOAMNbr = $0C90 ; Number of OAM slots used
AnciYsub = $0C36 ; sub pixel for Y position for ancilla
AnciXsub = $0C40 ; sub pixel for X position for ancilla
; Ancilla IDs
; db $00 ; 0x00 - NOTHING
; db $08 ; 0x01 - SOMARIA BULLET
; db $0C ; 0x02 - FIRE ROD SHOT
; db $10 ; 0x03 - UNUSED
; db $10 ; 0x04 - BEAM HIT
; db $04 ; 0x05 - BOOMERANG
; db $10 ; 0x06 - WALL HIT
; db $18 ; 0x07 - BOMB
; db $08 ; 0x08 - DOOR DEBRIS
; db $08 ; 0x09 - ARROW
; db $08 ; 0x0A - ARROW IN THE WALL
; db $00 ; 0x0B - ICE ROD SHOT
; db $14 ; 0x0C - SWORD BEAM_BOUNCE
; db $00 ; 0x0D - SPIN ATTACK FULL CHARGE SPARK
; db $10 ; 0x0E - BLAST WALL EXPLOSION
; db $28 ; 0x0F - BLAST WALL EXPLOSION
; db $18 ; 0x10 - BLAST WALL EXPLOSION
; db $10 ; 0x11 - ICE ROD WALL HIT
; db $10 ; 0x12 - BLAST WALL EXPLOSION
; db $10 ; 0x13 - ICE ROD SPARKLE
; db $10 ; 0x14 - BAD POINTER
; db $0C ; 0x15 - SPLASH
; db $08 ; 0x16 - HIT STARS
; db $08 ; 0x17 - SHOVEL DIRT
; db $50 ; 0x18 - ETHER SPELL
; db $00 ; 0x19 - BOMBOS SPELL
; db $10 ; 0x1A - POWDER DUST
; db $08 ; 0x1B - SWORD WALL HIT
; db $40 ; 0x1C - QUAKE SPELL
; db $00 ; 0x1D - SCREEN SHAKE
; db $0C ; 0x1E - DASH DUST
; db $24 ; 0x1F - HOOKSHOT
; db $10 ; 0x20 - BLANKET
; db $0C ; 0x21 - SNORE
; db $08 ; 0x22 - ITEM GET
; db $10 ; 0x23 - LINK POOF
; db $10 ; 0x24 - GRAVESTONE
; db $04 ; 0x25 - BAD POINTER
; db $0C ; 0x26 - SWORD SWING SPARKLE
; db $1C ; 0x27 - DUCK
; db $00 ; 0x28 - WISH POND ITEM
; db $10 ; 0x29 - MILESTONE ITEM GET
; db $14 ; 0x2A - SPIN ATTACK SPARKLE A
; db $14 ; 0x2B - SPIN ATTACK SPARKLE B
; db $10 ; 0x2C - SOMARIA BLOCK
; db $08 ; 0x2D - SOMARIA BLOCK FIZZ
; db $20 ; 0x2E - SOMARIA BLOCK FISSION
; db $10 ; 0x2F - LAMP FLAME
; db $10 ; 0x30 - BYRNA WINDUP SPARK
; db $10 ; 0x31 - BYRNA SPARK
; db $04 ; 0x32 - BLAST WALL FIREBALL
; db $00 ; 0x33 - BLAST WALL EXPLOSION
; db $80 ; 0x34 - SKULL WOODS FIRE
; db $10 ; 0x35 - MASTER SWORD GET
; db $04 ; 0x36 - FLUTE
; db $30 ; 0x37 - WEATHERVANE EXPLOSION
; db $14 ; 0x38 - CUTSCENE DUCK
; db $10 ; 0x39 - SOMARIA PLATFORM POOF
; db $00 ; 0x3A - BIG BOMB EXPLOSION
; db $10 ; 0x3B - SWORD UP SPARKLE
; db $00 ; 0x3C - SPIN ATTACK CHARGE SPARKLE
; db $00 ; 0x3D - ITEM SPLASH
; db $08 ; 0x3E - RISING CRYSTAL
; db $00 ; 0x3F - BUSH POOF
; db $10 ; 0x40 - DWARF POOF
; db $08 ; 0x41 - WATERFALL SPLASH
; db $78 ; 0x42 - HAPPINESS POND RUPEES
; db $80 ; 0x43 - GANONS TOWER CUTSCENE
AnciType = $0C4A
AncillaInit_SetCoordsAndExit = $0980C3
Ancilla_PrepOAMCoord_long = $08F6D9
Ancilla_SetOAM_XY_long = $08F6FE
Ancilla_GetRadialProjection_long = $08FB23
Ancilla_CheckForAvailableSlot = $0FF577
Ancilla_CheckInitialTile_A = $099DD3
Ancilla_CheckSpriteCollision_long = $088DA2
Ancilla_CheckTileCollision_long = $08923B
Ancilla_CheckTileCollision_Class2_long = $089243
Ancilla_CalculateSFXPan = $0DBB5E
Ancilla_CheckDamageToSprite = $06ECB7
; Table of ancilla properties
AncillaObjectAllocation = $08806F
AncillaAdd_BombosSpell = $08AF66
AncillaAdd_FireRodShot = $0880B3
AncillaAdd_Snoring = $0980C8
AncillaAdd_Bomb = $09811F
AncillaAdd_Boomerang = $09820F
AncillaAdd_BoomerangAsClink = $098345
AncillaAdd_DugUpFlute = $098C73
AncillaAdd_ChargedSpinAttackSparkle = $098CB1
AncillaAdd_ExplodingWeatherVane = $098D11
AncillaAdd_CutsceneDuck = $098D90
AncillaAdd_SomariaPlatformPoof = $098DD2
AncillaAdd_SuperBombExplosion = $098DF9
ConfigureRevivalAncillae = $098E4E
AncillaAdd_CaneOfByrnaInitSpark = $098EE0
AncillaAdd_LampFlame = $098F1C
AncillaAdd_ShovelDirt = $098F5B
AncillaAdd_BlastWallFireball = $099031
AncillaAdd_Arrow = $0990A4
AncillaAdd_CapePoof = $09912C
AncillaAdd_BushPoof = $0991C3
AncillaAdd_EtherSpell = $0991FC
AncillaAdd_VictorySpin = $0992AC
AncillaAdd_MagicPowder = $0992F0
AncillaAdd_WallTapSpark = $099395
AncillaAdd_SwordSwingSparkle = $0993C2
AncillaAdd_QuakeSpell = $099589
AncillaAdd_IceRodShot = $099863
AncillaAdd_Splash = $0998FC
AncillaAdd_Hookshot = $099B10
AncillaAdd_Blanket = $098091
AddHappinessPondRupees = $098AE0
DeleteBoomAndByrnaSparks = $0FFD86
Sparkle_PrepOAMFromRadial = $08DA17
Fireball_SpawnTrailGarnish = $09B020
SpriteSFX_QueueSFX2WithPan = $0DBB7C
SpriteSFX_QueueSFX3WithPan = $0DBB8A

View File

@@ -1,415 +0,0 @@
; Main Modules
Module00_Intro
Module01_FileSelect
Module02_CopyFile
Module03_KILLFile
Module04_NameFile
Module05_LoadFile
Module06_UnderworldLoad
Module07_Underworld
Module08_OverworldLoad
Module09_Overworld
Module0A_OverworldSpecialLoad
Module0B_OverworldSpecial
Module0C_Unused
Module0D_Unused
Module0E_Interface
Module0F_SpotlightClose
Module10_SpotlightOpen
Module11_UnderworldFallingEntrance
Module12_GameOver
Module13_BossVictory_Pendant
Module14_Attract
Module15_MirrorWarpFromAga
Module16_BossVictory_Crystal
Module17_SaveAndQuit
Module18_GanonEmerges
Module19_TriforceRoom
Module1A_Credits
Module1B_SpawnSelect
; Garnish IDs
Garnish01_FireSnakeTail
Garnish02_MothulaBeamTrail
Garnish03_FallingTile
Garnish04_LaserTrail
Garnish05_SimpleSparkle
Garnish06_ZoroTrail
Garnish07_BabasuFlash
Garnish08_KholdstareTrail
Garnish09_LightningTrail
Garnish0A_CannonSmoke
Garnish0B_WaterTrail
Garnish0C_TrinexxIceBreath
$0000
Garnish0E_TrinexxFireBreath
Garnish0F_BlindLaserTrail
Garnish10_GanonBatFlame
Garnish11_WitheringGanonBatFlame
Garnish12_Sparkle
Garnish13_PyramidDebris
Garnish14_KakKidDashDust
Garnish15_ArrghusSplash
Garnish16_ThrownItemDebris
Module09_Overworld:
Module09_00_PlayerControl ; 0x00
Module09_LoadAuxGFX ; 0x01
Module09_TriggerTilemapUpdate ; 0x02
Module09_LoadNewMapAndGFX ; 0x03
Module09_LoadNewSprites ; 0x04
Overworld_StartScrollTransition ; 0x05
Overworld_RunScrollTransition ; 0x06
Overworld_EaseOffScrollTransition ; 0x07
Overworld_FinalizeEntryOntoScreen ; 0x08
Module09_09_OpenBigDoorFromExiting ; 0x09
Module09_0A_WalkFromExiting_FacingDown ; 0x0A
Module09_0B_WalkFromExiting_FacingUp ; 0x0B
Module09_0C_OpenBigDoor ; 0x0C
Overworld_StartMosaicTransition ; 0x0D
Overworld_LoadSubscreenAndSilenceSFX1 ; 0x0E
Module09_LoadAuxGFX ; 0x0F
Module09_TriggerTilemapUpdate ; 0x10
Module09_LoadNewMapAndGFX ; 0x11
Module09_LoadNewSprites ; 0x12
Overworld_StartScrollTransition ; 0x13
Overworld_RunScrollTransition ; 0x14
Overworld_EaseOffScrollTransition ; 0x15
Module09_FadeBackInFromMosaic ; 0x16
Overworld_StartMosaicTransition ; 0x17
Module09_18 ; 0x18
Module09_19 ; 0x19
Module09_LoadAuxGFX ; 0x1A
Module09_TriggerTilemapUpdate ; 0x1B
Module09_1C ; 0x1C
Module09_1D ; 0x1D
Module09_1E ; 0x1E
Module09_1F ; 0x1F
Overworld_ReloadSubscreenOverlay ; 0x20
Module09_21 ; 0x21
Module09_22 ; 0x22
Module09_MirrorWarp ; 0x23
Overworld_StartMosaicTransition ; 0x24
Module09_25 ; 0x25
Module09_LoadAuxGFX ; 0x26
Module09_TriggerTilemapUpdate ; 0x27
Overworld_LoadAndBuildScreen ; 0x28
Module09_FadeBackInFromMosaic ; 0x29
Module09_2A_RecoverFromDrowning ; 0x2A
Module09_2B ; 0x2B
Module09_MirrorWarp ; 0x2C
Module09_2D_WaitForBird ; 0x2D
Module09_2E_Whirlpool ; 0x2E
Module09_2F
Module07_Underworld:
Module07_00_PlayerControl ; 0x00
Module07_01_IntraroomTransition ; 0x01
Module07_02_InterroomTransition ; 0x02
Module07_03_OverlayChange ; 0x03
Module07_04_UnlockDoor ; 0x04
Module07_05_ControlShutters ; 0x05
Module07_06_FatInterRoomStairs ; 0x06
Module07_07_FallingTransition ; 0x07
Module07_08_NorthIntraRoomStairs ; 0x08
Module07_09_OpenCrackedDoor ; 0x09
Module07_0A_ChangeBrightness ; 0x0A
Module07_0B_DrainSwampPool ; 0x0B
Module07_0C_FloodSwampWater ; 0x0C
Module07_0D_FloodDam ; 0x0D
Module07_0E_SpiralStairs ; 0x0E
Module07_0F_LandingWipe ; 0x0F
Module07_10_SouthIntraRoomStairs ; 0x10
Module07_11_StraightInterroomStairs ; 0x11
Module07_11_StraightInterroomStairs ; 0x12
Module07_11_StraightInterroomStairs ; 0x13
Module07_14_RecoverFromFall ; 0x14
Module07_15_WarpPad ; 0x15
Module07_16_UpdatePegs ; 0x16
Module07_17_PressurePlate ; 0x17
Module07_18_RescuedMaiden ; 0x18
Module07_19_MirrorFade ; 0x19
Module07_1A_RoomDraw_OpenTriforceDoor_bounce ; 0x1A
Link_ControlHandler:
LinkState_Default ; 0x00
LinkState_Pits ; 0x01
LinkState_Recoil ; 0x02
LinkState_SpinAttack ; 0x03
LinkState_Swimming ; 0x04
LinkState_OnIce ; 0x05
LinkState_Recoil ; 0x06
LinkState_Zapped ; 0x07
LinkState_UsingEther ; 0x08
LinkState_UsingBombos ; 0x09
LinkState_UsingQuake ; 0x0A - DekuHover
LinkState_HoppingSouthOW ; 0x0B
LinkState_HoppingHorizontallyOW ; 0x0C
LinkState_HoppingDiagonallyUpOW ; 0x0D
LinkState_HoppingDiagonallyDownOW ; 0x0E
LinkState_0F ; 0x0F
LinkState_0F ; 0x10
LinkState_Dashing ; 0x11
LinkState_ExitingDash ; 0x12
LinkState_Hookshotting ; 0x13
LinkState_CrossingWorlds ; 0x14
LinkState_ShowingOffItem ; 0x15
LinkState_Sleeping ; 0x16
LinkState_Bunny ; 0x17
LinkState_HoldingBigRock ; 0x18
LinkState_ReceivingEther ; 0x19
LinkState_ReceivingBombos ; 0x1A
LinkState_ReadingDesertTablet ; 0x1B
LinkState_TemporaryBunny ; 0x1C
LinkState_TreePull ; 0x1D
LinkState_SpinAttack ; 0x1E
Link_HandleYItem:
LinkItem_Bombs
LinkItem_Boomerang
LinkItem_Bow
LinkItem_Hammer
LinkItem_Rod
LinkItem_Rod
LinkItem_Net
LinkItem_ShovelAndFlute
LinkItem_Lamp
LinkItem_Powder
LinkItem_Bottle
LinkItem_Book
LinkItem_CaneOfByrna
LinkItem_Hookshot
LinkItem_Bombos
LinkItem_Ether
LinkItem_Quake
LinkItem_CaneOfSomaria
LinkItem_Cape
LinkItem_Mirror
; Liftable object palettes
; Sprites Aux 2 #8 for DW
; Sprites Aux 2 #6 for LW
; #7 and #9 are the yellow bush palettes
OverworldPaletteSet:
db $00, $FF, $07, $FF ; 0x00
db $00, $01, $07, $FF ; 0x01
db $00, $02, $07, $FF ; 0x02
db $00, $03, $07, $FF ; 0x03
db $00, $04, $07, $FF ; 0x04
db $00, $05, $07, $FF ; 0x05
db $00, $06, $07, $FF ; 0x06
db $07, $06, $05, $FF ; 0x07
db $00, $08, $07, $FF ; 0x08
db $00, $09, $07, $FF ; 0x09
db $00, $0A, $07, $FF ; 0x0A
db $00, $0B, $07, $FF ; 0x0B
db $00, $FF, $07, $FF ; 0x0C
db $00, $FF, $07, $FF ; 0x0D
db $03, $04, $07, $FF ; 0x0E
db $04, $04, $03, $FF ; 0x0F
db $10, $FF, $06, $FF ; 0x10
db $10, $01, $06, $FF ; 0x11
db $10, $11, $06, $FF ; 0x12
db $10, $03, $06, $FF ; 0x13
db $10, $04, $06, $FF ; 0x14
db $10, $05, $06, $FF ; 0x15
db $10, $06, $06, $FF ; 0x16
db $12, $13, $04, $FF ; 0x17
db $12, $05, $04, $FF ; 0x18
db $10, $09, $06, $FF ; 0x19
db $10, $0B, $06, $FF ; 0x1A
db $10, $0C, $06, $FF ; 0x1B
db $10, $0D, $06, $FF ; 0x1C
db $10, $0E, $06, $FF ; 0x1D
db $10, $0F, $06, $FF ; 0x1E
LDA.l UnderworldPaletteSets+0,X
STA.w $0AB6 ; PALBG
LDA.l UnderworldPaletteSets+1,X
STA.w $0AAC ; PALSPR0
LDA.l UnderworldPaletteSets+2,X
STA.w $0AAD ; PALSPR1
LDA.l UnderworldPaletteSets+3,X
STA.w $0AAE ; PALSPR2
; PALBG
; 0x00 - Kalyxo Castle
; 0x01 - Blue
; 0x02 - House
; 0x03 - Green
; 0x04 - Glacia Estate Ice
; 0x05 - Zora Temple
; 0x06 - Tail Palace Pink
; 0x07 - Goron Mines Cave Red
; 0x08 - Mushroom Grotto Gray
; 0x09
; 0x0A (10) - Ranch Pink
; 0x0B (11) - Another green
; 0x0C - Goron Mines Cave Red
; 0x0D
; 0x0E
; 0x0F
; 0x10 -
; 0x (19) -
UnderworldPaletteSets:
db $00, $00, $03, $01 ; 0x00
db $02, $00, $03, $01 ; 0x01
db $04, $00, $0A, $01 ; 0x02 House
db $06, $00, $01, $07 ; 0x03 Fortress of Secrets
db $0A, $02, $02, $07 ; 0x04 Zora Temple
db $04, $04, $03, $0A ; 0x05 House
db $0C, $05, $08, $14 ; 0x06 Tail Palace
db $0E, $00, $03, $0A ; 0x07 Goron Mines/Caves
db $02, $00, $0F, $14 ; 0x08 Castle Basement
db $0A, $02, $00, $07 ; 0x09
db $02, $00, $0F, $0C ; 0x0A
db $06, $00, $06, $07 ; 0x0B
db $00, $00, $0E, $12 ; 0x0C Kalyxo Castle
db $12, $05, $05, $0B ; 0x0D
db $12, $00, $02, $0C ; 0x0E
db $10, $05, $0A, $07 ; 0x0F Mushroom Grotto
db $10, $00, $10, $0C ; 0x10 Ranch?
db $16, $07, $02, $07 ; 0x11 Hall of Secrets
db $16, $00, $07, $0F ; 0x12
db $08, $00, $04, $0C ; 0x13 Glacia Estate
db $08, $00, $04, $09 ; 0x14
db $04, $00, $03, $01 ; 0x15 House
db $14, $00, $04, $04 ; 0x16
db $14, $00, $14, $0C ; 0x17
db $18, $05, $07, $0B ; 0x18 Lava Lands Cave/Turtle Rock
db $18, $06, $10, $0C ; 0x19
db $1A, $05, $08, $14 ; 0x1A Dragon Ship
db $1A, $02, $00, $07 ; 0x1B Dragon Ship
db $06, $00, $03, $0A ; 0x1C
db $1C, $00, $03, $01 ; 0x1D
db $1E, $00, $0B, $11 ; 0x1E Swordsmith
db $04, $00, $0B, $11 ; 0x1F
db $0E, $00, $00, $02 ; 0x20
db $20, $08, $13, $0D ; 0x21 Ganondorf Boss
db $0A, $00, $03, $0A ; 0x22 Zora Temple
db $14, $00, $04, $04 ; 0x23
db $1A, $02, $02, $07 ; 0x24 Dragon Ship
db $1A, $0A, $00, $00 ; 0x25 Dragon Ship
db $00, $00, $03, $02 ; 0x26
db $0E, $00, $03, $07 ; 0x27
db $1A, $05, $05, $0B ; 0x28 Dragon Ship
PrizePackRarities:
{
db $01 ; pack 1 : 50%
db $01 ; pack 2 : 50%
db $01 ; pack 3 : 50%
db $00 ; pack 4 : 100%
db $01 ; pack 5 : 50%
db $01 ; pack 6 : 50%
db $01 ; pack 7 : 50%
db $00 ; pack 8 : 100% - doesn't exist
}
ItemDropBounceProps:
{
db $24 ; GREEN RUPEE
db $24 ; BLUE RUPEE
db $24 ; RED RUPEE
db $20 ; BOMB REFILL 1
db $20 ; BOMB REFILL 4
db $20 ; BOMB REFILL 8
db $24 ; SMALL MAGIC DECANTER
db $24 ; LARGE MAGIC DECANTER
db $24 ; ARROW REFILL 5
db $24 ; ARROW REFILL 10
db $00 ; FAIRY
db $24 ; SMALL KEY
db $20 ; BIG KEY
db $20 ; STOLEN SHIELD
}
PrizePackPrizes:
{
.pack_1
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D9 ; SPRITE D9 - green rupee
db $D8 ; SPRITE D8 - heart
db $D8 ; SPRITE D8 - heart
db $D9 ; SPRITE D9 - green rupee
.pack_2
db $DA ; SPRITE DA - blue rupee
db $D9 ; SPRITE D9 - green rupee
db $DA ; SPRITE DA - blue rupee
db $DB ; SPRITE DB - red rupee
db $DA ; SPRITE DA - blue rupee
db $D9 ; SPRITE D9 - green rupee
db $DA ; SPRITE DA - blue rupee
db $DA ; SPRITE DA - blue rupee
.pack_3
db $E0 ; SPRITE E0 - full magic
db $DF ; SPRITE DF - small magic
db $DF ; SPRITE DF - small magic
db $DA ; SPRITE DA - blue rupee
db $E0 ; SPRITE E0 - full magic
db $DF ; SPRITE DF - small magic
db $D8 ; SPRITE D8 - heart
db $DF ; SPRITE DF - small magic
.pack_4
db $DC ; SPRITE DC - 1 bomb
db $DC ; SPRITE DC - 1 bomb
db $DC ; SPRITE DC - 1 bomb
db $DD ; SPRITE DD - 4 bombs
db $DC ; SPRITE DC - 1 bomb
db $DC ; SPRITE DC - 1 bomb
db $DE ; SPRITE DE - 8 bombs
db $DC ; SPRITE DC - 1 bomb
.pack_5
db $E1 ; SPRITE E1 - 5 arrows
db $D8 ; SPRITE D8 - heart
db $E1 ; SPRITE E1 - 5 arrows
db $E2 ; SPRITE E2 - 10 arrows
db $E1 ; SPRITE E1 - 5 arrows
db $D8 ; SPRITE D8 - heart
db $E1 ; SPRITE E1 - 5 arrows
db $E2 ; SPRITE E2 - 10 arrows
.pack_6
db $DF ; SPRITE DF - small magic
db $D9 ; SPRITE D9 - green rupee
db $D8 ; SPRITE D8 - heart
db $E1 ; SPRITE E1 - 5 arrows
db $DF ; SPRITE DF - small magic
db $DC ; SPRITE DC - 1 bomb
db $D9 ; SPRITE D9 - green rupee
db $D8 ; SPRITE D8 - heart
.pack_7
db $D8 ; SPRITE D8 - heart
db $E3 ; SPRITE E3 - fairy
db $E0 ; SPRITE E0 - full magic
db $DB ; SPRITE DB - red rupee
db $DE ; SPRITE DE - 8 bombs
db $D8 ; SPRITE D8 - heart
db $DB ; SPRITE DB - red rupee
db $E2 ; SPRITE E2 - 10 arrows
}

View File

@@ -1,100 +0,0 @@
# Guia del Probador Beta
## Notas
- El juego tiene pequeños errores con los gráficos.
- Los marcadores del mapa del supramundo no siempre son precisos, pueden cambiar dependiendo del NPC con el que hables.
- Los mapas de las mazmorras aún no están completos, pero se pueden comprar en Tingle.
- Si la escena de introducción en el bosque no funciona y el árbol te habla a ti en lugar del pirata, intenta reiniciar tu emulador.
## Introducción
- Conoce a Impa en la playa Loom
- Salta al pozo del pueblo descarriado
- Conoce a Farore en el bosque
## Varado en Abismo del Eón
- Ve al Santuario de los Orígenes en la pirámide.
- Encuentra la Perla de la Luna para convertirte en Link de Game-Boy.
- Conoce a buho en el bosque de los sueños.
- Encuentra la espada y el escudo en el bosque.
- Encuentra el portal de regreso a Kalyxo.
## Isla Kalyxo
Objectivo es coleccionar siete esencias de trifuerza, mientras ocasionalmente visitas el Abismo del Eón para coleccionar pendientes para la Espada Maestra.
Las mazmorras están en la isla, mientras los santuarios están en el abismo del eón.
El vendedor de máscaras está al este del pueblo. El salón de los secretos está al noreste del castillo.
<details>
<summary>Spoiler de ocarina y hongo</summary>
Para realizar varias misiones se requiere la Ocarina, que puedes obtener usando el Polvo Mágico en un pollo en el rancho dentro de la casa. Para obtener el polvo mágico, debes intercambiar el hongo con la bruja en las montañas y luego irte y cruzar un mapa del supramundo antes de regresar.
</details>
<details>
<summary>Spoiler de la Máscara de Deku</summary>
Para conseguir la máscara deku, toca la canción de sanación para el deku afuera de la tienda del vendedor de máscaras.
</details>
<details>
<summary>Spoiler de libro de secretos y botas de correr</summary>
Reproduce la canción de sanación para el niño enfermo del pueblo para las botas de correr. Para obtener el libro de los secretos, corre hacia la estantería de la biblioteca.
</details>
<details>
<summary>Spoiler de la tierra submarina</summary>
Usa la forma de máscara zora y sumérgete en el gran remolino de la playa.
</details>
### Mazmorra Uno: Bosque de setas venenosas
- Objetos: Arco y flecha, hongo
- Jefe: Manhandla
### Mazmorra Dos: Palacio de la cola
- Objecto: La pluma de Roc (saltar)
- Jefe: Moldorm
### Mazmorra Tres: Castillo de Kalyxo
- Objecto: Hoja de pradera (lv2 espada)
- Jefe: Caballeros de eyegores
- Requiere la libro de secretos a abrir la puente.
### Santuario de la Sabiduría
- Objecto: Aletas de Zora
- Requiere la varilla de hielo de las montañas de la isla.
- La varilla de hielo congela el agua para poder caminar sobre ella.
### Mazmorra Cuatro: Templo Zora
- Objecto: Gancho, Máscara Zora
- Jefe: Avanzada Arrghus
### Mazmorra Cinco: Finca Glacia
- Objecto: Varilla de fuego
- Jefe: Twinrova
### Santuario del Poder
- Objecto: Guante de poder
### Mazmorra Seis: Minas Goron
- Objecto: Martillo
- Jefe: Dodongo Rey
### Santuario del Doraje
- Objecto: Escudo de espejo
### Mazmorra Siete: Barco Dragón
- Objecto: Bastón de Somaria
- Jefe: Rey Pirata Kydrog
- Requiere el guante de titanes de la tierra submarina.
### Mazmorra Final: Fortaleza de los secretos
- Objecto: Flechas de plata
- Jefe: Link Oscuro
## Final
- Encuentra el barco pirata en las tierras de lava del abismo eónico.
- Para derrotar al jefe final, Kydreeok, debes destruir ambas cabezas de dragón rápidamente con las flechas plateadas.

View File

@@ -8,7 +8,7 @@ org $0E942A
JSL Dungeon_LoadCustomTileAttr
RTL
pullpc
org $338000
; *$7142A-$71458 LONG
Dungeon_LoadCustomTileAttr:
@@ -94,7 +94,7 @@ group00:
db $02, $02, $02, $02, $18, $00, $00, $00, $00, $00, $02, $02, $01, $01, $01, $01
db $02, $02, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $09, $09 ; Animated Tiles
; Zora Temple
group01:
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
@@ -105,10 +105,10 @@ group01:
db $01, $01, $01, $01, $01, $01, $6E, $6F, $01, $6C, $02, $02, $02, $02, $01, $02
db $00, $00, $22, $00, $00, $00, $02, $02, $02, $02, $02, $02, $00, $00, $01, $00
db $01, $01, $01, $00, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $08, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $18, $00, $00, $00, $00, $00, $02, $02, $01, $01, $01, $01
db $08, $08, $02, $01, $01, $09, $08, $08, $08, $08, $09, $09, $09, $09, $09, $09 ; Animated Tiles
db $01, $01, $01, $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $18, $00, $00, $00, $00, $00, $02, $02, $01, $01, $01, $01
db $02, $02, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $09, $09 ; Animated Tiles
group02:
@@ -145,20 +145,20 @@ group03:
; Goron Mines
group04:
{
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $00, $00, $02, $02, $B6, $BD, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $00, $00, $02, $02, $00, $00, $00, $00, $BB, $BB, $02, $01, $01, $01, $01, $01
db $00, $00, $00, $00, $00, $00, $00, $00, $BB, $BB, $02, $02, $02, $02, $02, $02
db $00, $00, $22, $00, $B1, $B1, $BC, $BC, $BC, $BC, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $18, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $09, $09 ; Animated Tiles
}
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $00, $00, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $00, $00, $02, $02, $00, $00, $00, $00, $00, $00, $02, $01, $01, $01, $01, $01
db $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $00, $00, $22, $00, $00, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $18, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $09, $09 ; Animated Tiles
group05:
@@ -192,7 +192,6 @@ group06:
db $6B, $6A, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $68, $69 ; Animated Tiles
; Mushroom Grotto
group07:
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
@@ -203,9 +202,9 @@ group07:
db $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $02, $02, $02, $02, $02, $02
db $00, $00, $22, $00, $00, $00, $00, $00, $00, $00, $02, $02, $00, $00, $02, $00
db $01, $65, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $65, $65, $65, $65, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $65, $02, $65, $00, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $00, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $6B, $6A, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $68, $69 ; Animated Tiles
@@ -257,38 +256,37 @@ group0A:
db $6B, $6A, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $68, $69 ; Animated Tiles
; Glacia Estate
group0B:
{
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $02, $02, $02, $02, $02, $02
db $00, $00, $22, $00, $00, $00, $02, $02, $02, $02, $02, $02, $00, $00, $00, $00
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $02, $00, $0F, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $01, $02, $0E, $08, $08, $08, $08, $0E, $0E, $0E, $0E, $00, $00 ; Animated Tiles
}
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $02, $02, $02, $02, $02, $02
db $00, $00, $22, $00, $00, $00, $02, $02, $02, $02, $02, $02, $00, $00, $00, $00
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $02, $00, $0F, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $01, $02, $02, $08, $08, $08, $08, $0E, $0E, $0E, $0E, $00, $00 ; Animated Tiles
group0C:
{
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $01, $01, $01, $01, $01, $01, $02, $02, $01, $02, $02, $02, $02, $02, $02, $02
db $00, $00, $22, $00, $00, $00, $00, $00, $00, $00, $02, $02, $00, $00, $00, $00
db $01, $01, $01, $01, $02, $02, $02, $0D, $0D, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $0D, $0D, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $02, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $6B, $6A, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $68, $69 ; Animated Tiles
}
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $01, $01, $01, $01, $01
db $01, $01, $01, $01, $01, $01, $02, $02, $01, $02, $02, $02, $02, $02, $02, $02
db $00, $00, $22, $00, $00, $00, $00, $00, $00, $00, $02, $02, $00, $00, $00, $00
db $01, $01, $01, $01, $02, $02, $02, $0D, $0D, $02, $02, $02, $02, $02, $02, $02
db $01, $01, $01, $01, $02, $02, $02, $0D, $0D, $02, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $02, $00, $00, $00, $00, $00, $02, $02, $02, $02, $02, $02
db $6B, $6A, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $68, $69 ; Animated Tiles
group0D:
@@ -465,4 +463,21 @@ group17:
db $02, $02, $02, $02, $18, $00, $00, $00, $00, $00, $02, $02, $01, $01, $01, $01
db $02, $02, $02, $01, $02, $02, $08, $08, $08, $08, $09, $09, $09, $09, $09, $09 ; Animated Tiles
pushpc
; -----------------------------------------------------------------------------------
; Animated Object Graphics
; -----------------------------------------------------------------------------------
; (PC: $01011E) (SNES: $02811E)
; 5D = Deep Water
; 5E = Lava
; 5F = Slime
org $02811E
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $5D, $5D, $5D, $5D, $5D, $5D, $5D, $5F, $5D, $5F, $5F, $5E, $5F, $5E, $5E, $5D
db $5D, $5E, $5D, $5D, $5D, $5D, $5D, $5D

View File

@@ -32,7 +32,7 @@ org $E9659
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $01, $01, $01, $00, $02, $01, $02, $00, $01, $01, $02, $02, $02, $02, $02, $02
db $02, $02, $02, $00, $00, $00, $00, $00, $02, $00, $00, $02, $02, $02, $02, $02
db $02, $02, $02, $00, $00, $01, $00, $00, $02, $00, $00, $02, $02, $02, $02, $02
db $02, $02, $02, $02, $01, $01, $01, $02, $02, $02, $02, $02, $01, $01, $00, $00
db $02, $02, $02, $02, $02, $02, $01, $02, $02, $02, $02, $02, $01, $01, $00, $00
@@ -83,9 +83,9 @@ org $E9759
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $27, $02, $02, $02, $27, $64, $27, $27, $02, $02, $02, $24, $00, $00, $00, $00
db $27, $27, $27, $27, $27, $64, $02, $02, $01, $02, $02, $23, $02, $00, $00, $00
db $27, $27, $27, $27, $27, $64, $02, $27, $02, $54, $00, $00, $27, $02, $02, $02
db $27, $02, $02, $02, $27, $27, $27, $27, $02, $02, $02, $24, $00, $00, $00, $00
db $27, $27, $27, $27, $27, $20, $02, $02, $01, $02, $02, $23, $02, $00, $00, $00
db $27, $27, $27, $27, $27, $20, $02, $27, $02, $54, $00, $00, $27, $02, $02, $02
db $27, $27, $27, $27, $27, $27, $02, $27, $02, $54, $00, $00, $27, $02, $02, $02
@@ -108,19 +108,3 @@ org $E9799
db $27, $63, $27, $53, $53, $01, $44, $01, $0D, $00, $00, $00, $09, $09, $09, $09
; -----------------------------------------------------------------------------------
; Animated Object Graphics
; -----------------------------------------------------------------------------------
; (PC: $01011E) (SNES: $02811E)
; 5D = Deep Water
; 5E = Lava
; 5F = Slime
org $02811E
; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
; -----------------------------------------------------------------------------------
db $5D, $5D, $5D, $5D, $5D, $5D, $5D, $5F, $5D, $5F, $5F, $5E, $5F, $5E, $5E, $5D
db $5D, $5E, $5D, $5D, $5D, $5D, $5D, $5D

View File

@@ -1,110 +0,0 @@
;Custom dungeon collision code
;mostly written by kan
;put together by Jared_Brian_
;meant to be used with the ZScream collision editor
;12-18-2021
; Format:
; dw <offset> : db width, height
; dw <tile data>, ...
;
; if <offset> == $F0F0, start doing single tiles
; format:
; dw <offset> : db <data>
;
; if <offset> == $FFFF, stop
RoomPointer = $258090
org $01B95B
JSL CustomRoomCollision
NOP #6
org $258000
CustomRoomCollision_easyout:
{
RTL
}
CustomRoomCollision:
{
LDA $B4 : CMP.w #$2000 : BNE .notEndOfTable
INC $0200
.notEndOfTable
REP #$30
LDA.b $A0 : ASL : ADC.b $A0 : TAX
LDA.l RoomPointer, X : BEQ .easyout
STA.b $08
LDA.l RoomPointer+1, X : STA.b $09
PHB
PEA.w $7F7F
PLB
PLB
LDY.w #$0000
.read_next
LDA.b [$08],Y
INY
INY
CMP.w #$F0F0
BCC .new_rectangle
.single_tiles
CMP.w #$FFFF
BEQ .done
TAX
SEP #$20
LDA.b [$08],Y
STA.w $2000,X
REP #$20
INY
LDA.b [$08],Y
INY
INY
BRA .single_tiles
.done
PLB
RTL
.new_rectangle
STA.b $02 ; beginning of row
LDA.b [$08],Y ; number of rows and columns
STA.b $06
INY
INY
.next_row
REP #$21
LDA.b $02
TAX
ADC.w #64
STA.b $02
SEP #$20
LDA.b $06 : STA $0C; save number of columns
.next_column
LDA.b [$08],Y
STA.w $2000,X
INY
INX
DEC.b $0C
BNE .next_column
DEC.b $07
BNE .next_row
REP #$21
JMP .read_next
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,64 +1,32 @@
; Dungeon Object Handler
; Tile types
TileBehavior_Nothing = $07DC54
TileBehavior_Pit = $07DC8B
TileBehavior_Door = $07DD0A
org $018262 ; Object ID 0x31
org $018262 ;object id 0x31
dw ExpandedObject
org $018264 ; Object ID 0x32
dw ExpandedObject2
org $0182A8 ; Object ID 0x54
dw SpriteBodyObjects
; RoomDraw_WeirdUglyPot
org $018650 ; Object ID 230
; #_018650: dw RoomDraw_WeirdUglyPot ID 230
org $018650
dw HeavyPot
; Heavy rock object draw code
DrawBigGraySegment_hook = $01B350
; Bank01 Free Space
org $01B53C
ExpandedObject:
JSL CustomObjectHandler
RTS
ExpandedObject2:
JSL CustomObjectHandler2
RTS
SpriteBodyObjects:
JSL SpriteObjectsDraw
RTS
JSL NewObjectsCode
RTS
HeavyPot:
JSL InitHeavyPot
JMP DrawBigGraySegment_hook
assert pc() <= $01B560
org $2C8000
; TODO: Fix the graphics used for the heavy pot in game
InitHeavyPot:
{
LDA.w #$1010
PHX
LDX.w $042C ; MANIPINDEX
LDA.w #$1111 : STA $0500, X ; M16BUFF500
PHX : LDX.w $042C
LDA.w #$1111 : STA $0500, X
; Store this object's position in the object buffer to $0520, X
LDA $BA : STA $0520, X
; Store it's tilemap position.
TYA : STA $0540, X
RTL
}
JMP $B350
CustomObjectHandler:
warnpc $01B560
org $2C8000
NewObjectsCode:
{
PHB : PHK : PLB
PHX
@@ -66,115 +34,10 @@ CustomObjectHandler:
STZ $03 ; 03 will be used to store the object ID for custom config
LDA $00 : PHA
LDA $02 : PHA
; $00 Will be used for tile count and tile to skip
; $00 Will be used for tile count and tile to skip
LDA $B2 : ASL #2 : ORA $B4
;get the offset for the object data based on the object height
ASL : TAX
LDA .ObjOffset, X
TAX
.lineLoop
LDA .ObjData, X : BNE .continue
;break
BRA .Done
.continue
PHY ; Keep current position in the buffer
STA $00 ; we save the tile count + tile to skip
-- ;Tiles Loop
INX : INX
; Vhopppcc cccccccc
LDA .ObjData, X : BEQ +
STA [$BF], Y
+
INY : INY
LDA $00 : DEC : STA $00 : AND #$001F : BNE +
LDA $00 : XBA : AND #$00FF : STA $00
PLA ;Pull back position
CLC : ADC $00 : TAY
INX : INX
BRA .lineLoop
+
BRA --
.Done
PLA : STA $02
PLA : STA $00 ;Not sure if needed
PLX
PLB
RTL
.ObjOffset
dw .LeftRight-.ObjData ; 00
dw .UpDown-.ObjData ; 01
dw .TopLeft-.ObjData ; 02
dw .TopRight-.ObjData ; 03
dw .Bottomleft-.ObjData ; 04
dw .BottomRight-.ObjData ; 05
dw .UpDownFloor-.ObjData ; 06
dw .LeftRightFloor-.ObjData ; 07
dw .TopLeftFloor-.ObjData ; 08
dw .TopRightFloor-.ObjData ; 09
dw .BottomleftFloor-.ObjData ; 10
dw .BottomRightFloor-.ObjData ; 11
dw .FloorAny-.ObjData ; 12
dw .WallSwordHouse-.ObjData ; 13
dw .TrackAny-.ObjData ; 14
dw .SmallStatue-.ObjData ; 15
.ObjData
.LeftRight
incbin Data/track_LR.bin
.UpDown
incbin Data/track_UD.bin
.TopLeft
incbin Data/track_corner_TL.bin
.TopRight
incbin Data/track_corner_TR.bin
.Bottomleft
incbin Data/track_corner_BL.bin
.BottomRight
incbin Data/track_corner_BR.bin
.UpDownFloor
incbin Data/track_floor_UD.bin
.LeftRightFloor
incbin Data/track_floor_LR.bin
.TopLeftFloor
incbin Data/track_floor_corner_TL.bin
.TopRightFloor
incbin Data/track_floor_corner_TR.bin
.BottomleftFloor
incbin Data/track_floor_corner_BL.bin
.BottomRightFloor
incbin Data/track_floor_corner_BR.bin
.FloorAny
incbin Data/track_floor_any.bin
.WallSwordHouse
incbin Data/wall_sword_house.bin
.TrackAny
incbin Data/track_any.bin
.SmallStatue
incbin Data/small_statue.bin
}
SpriteObjectsDraw:
{
PHB : PHK : PLB
PHX
STZ $03 ; 03 will be used to store the object ID for custom config
LDA $00 : PHA
LDA $02 : PHA
; $00 Will be used for tile count and tile to skip
LDA $B2 : ASL #2 : ORA $B4
;get the offset for the object data based on the object height
;get the offset for the object data based on the object height
ASL : TAX
LDA .ObjOffset, X
TAX
@@ -192,7 +55,7 @@ SpriteObjectsDraw:
INX : INX
; Vhopppcc cccccccc
LDA .ObjData, X : BEQ +
ORA.w #$0300
JSR CustomDrawConfig
STA [$BF], Y
+
@@ -217,112 +80,84 @@ SpriteObjectsDraw:
RTL
.ObjOffset
dw .KydreeokBody-.ObjData ; 00
dw .ManhandlaBody1-.ObjData ; 01
dw .LeftRight-.ObjData ; 00
dw .UpDown-.ObjData ; 01
dw .TopLeft-.ObjData ; 02
dw .TopRight-.ObjData ; 03
dw .Bottomleft-.ObjData ; 04
dw .BottomRight-.ObjData ; 05
dw .UpDownFloor-.ObjData ; 06
dw .LeftRightFloor-.ObjData ; 07
dw .TopLeftFloor-.ObjData ; 08
dw .TopRightFloor-.ObjData ; 09
dw .BottomleftFloor-.ObjData ; 10
dw .BottomRightFloor-.ObjData ; 11
dw .FloorAny-.ObjData ; 12
dw .WallSwordHouse-.ObjData ; 13
dw .KydreeokBody-.ObjData ; 14
dw .SmallStatue-.ObjData ; 15
.ObjData
.LeftRight
incbin Data/track_LR.bin
.UpDown
incbin Data/track_UD.bin
.TopLeft
incbin Data/track_corner_TL.bin
.TopRight
incbin Data/track_corner_TR.bin
.Bottomleft
incbin Data/track_corner_BL.bin
.BottomRight
incbin Data/track_corner_BR.bin
.UpDownFloor
incbin Data/track_floor_UD.bin
.LeftRightFloor
incbin Data/track_floor_LR.bin
.TopLeftFloor
incbin Data/track_floor_corner_TL.bin
.TopRightFloor
incbin Data/track_floor_corner_TR.bin
.BottomleftFloor
incbin Data/track_floor_corner_BL.bin
.BottomRightFloor
incbin Data/track_floor_corner_BR.bin
.FloorAny
incbin Data/track_floor_any.bin
.WallSwordHouse
incbin Data/wall_sword_house.bin
.KydreeokBody
incbin Data/kydreeok_body.bin
.ManhandlaBody1
incbin Data/manhandla_body_1a.bin
.SmallStatue
incbin Data/small_statue.bin
}
CustomObjectHandler2:
; May need to make this a table
; This modifies object 0xOE to use the spritesheets for the object
CustomDrawConfig:
{
PHB : PHK : PLB
PHX
PHA
LDA $03 : AND #$00FF : CMP.w #$000E : BEQ .custom_config
STZ $03 ; 03 will be used to store the object ID for custom config
LDA $00 : PHA
LDA $02 : PHA
; $00 Will be used for tile count and tile to skip
LDA $B2 : ASL #2 : ORA $B4
TYA : LSR : AND #$00FF
;get the offset for the object data based on the object height
ASL : TAX
LDA .ObjOffset, X
TAX
.lineLoop
LDA .ObjData, X : BNE .continue
;break
BRA .Done
.continue
PHY ; Keep current position in the buffer
STA $00 ; we save the tile count + tile to skip
-- ;Tiles Loop
INX : INX
; Vhopppcc cccccccc
LDA .ObjData, X : BEQ +
STA [$BF], Y
+
INY : INY
LDA $00 : DEC : STA $00 : AND #$001F : BNE +
LDA $00 : XBA : AND #$00FF : STA $00
PLA ;Pull back position
CLC : ADC $00 : TAY
INX : INX
BRA .lineLoop
+
BRA --
.Done
PLA : STA $02
PLA : STA $00 ;Not sure if needed
PLX
PLB
RTL
.ObjOffset
dw .IceFurnace-.ObjData ; 00
dw .Firewood-.ObjData ; 01
dw .IceChair-.ObjData ; 02
.ObjData
.IceFurnace
incbin Data/furnace.bin
.Firewood
incbin Data/firewood.bin
.IceChair
incbin Data/ice_chair.bin
CMP #$000E : BNE .no_spriteset
LDA #$000E : STA $03
.custom_config
PLA
ORA.w #$0300 : JMP .return
.no_spriteset
PLA
.return
RTS
}
pushpc
; Item ID 22B
; Item ID 22B
org $00A9AC
dw $0D28, $0D38, $4D28, $4D38
; org $01B306 ; RoomDraw_WeirdGloveRequiredPot
; LDA.w #$1010
; Normal Door
; #obj2716:
; dw $2888, $0808, $0818, $2889
; dw $09EF, $0878, $6889, $09EF
; dw $4878, $6888, $4808, $4818
; Unused door 3A
; #obj2866:
org $00C3B8
dw $2888, $0808, $0818, $2889
; 09
dw $282C, $082D, $6889, $682C
; 10
dw $482D, $6888, $4808, $4818
; 282D
; 682D
; $682C
; #obj2866:
; dw $282C, $0808, $080D, $282D
; dw $09EF, $0878, $682D, $09EF
; dw $4878, $682C, $4808, $480D

File diff suppressed because it is too large Load Diff

View File

@@ -1,154 +0,0 @@
; Crumble Floor Room Tag
pushpc
org $01CC08 ; holes_3 tag routine
JSL CrumbleFloorTag_Main
RTS
pullpc
; check under link feet what tile he is standing on
; save in ram last tile we were on so it doesn't turn back off
; kill room tag
CrumbleFloorTag_Main:
{
LDA.w $02B2 : CMP.b #$05 : BNE +
RTL
+
LDA.b $20 : CLC : ADC #$10 : AND.b #$F0 : STA.w $0224 ; y
LDA.b $22 : CLC : ADC #$08 : AND.b #$F0 : STA.w $0225 ; x
LDA.w $0224 : CMP.w $0226 : BNE .differentTile
LDA.w $0225 : CMP.w $0227 : BNE .differentTile
JMP .sameTile
.differentTile
; do code here for tile code
REP #$30
LDA.w $022A : AND.w #$01F0 : LSR #$02 : STA.b $00
LDA.w $0228 : AND.w #$01F0 : ASL #$04
CLC : ADC.b $00 : STA.b $06
TAX
LDA.l $7E2000, X : CMP.w #$0CCC : BNE +
JSR update_pit_tile
SEP #$30
JSR SpawnFallingTile
BRA .doneupdate
+
LDA.l $7E2000, X : CMP.w #$0C62 : BNE +
-
JSR update_crack_tile
+
LDA.l $7E2000, X : CMP.w #$0C63 : BEQ -
.doneupdate
SEP #$30
.sameTile
LDA.w $0224 : STA.w $0226 : STA.w $0228 ; Last Y
LDA.w $0225 : STA.w $0227 : STA.w $022A ; Last X
; Last Y with link high byte
LDA.b $21 : STA.w $0229
LDA.b $23 : STA.w $022B
RTL
}
SpawnFallingTile:
{
LDX.b #$1D
.next
LDA.l $7FF800, X : BNE .skip
; GARNISH 03
LDA.b #$03 : STA.l $7FF800, X
LDA.w $022A : STA.l $7FF83C, X
LDA.w $022B : STA.l $7FF878, X
LDA.w $0228 : CLC : ADC.b #$10 : STA.l $7FF81E, X
LDA.w $0229 : ADC.b #$00 : STA.l $7FF85A, X
LDA.b #$1F : STA.l $7FF90E, X
STA.w $0FB4
BRA .exit
.skip
DEX
BPL .next
.exit
RTS
}
update_crack_tile:
{
STZ.b $0E
REP #$30
JSR replace_crack_pit
SEP #$30
LDA.b #$01 : STA.b $14
REP #$30
RTS
}
update_pit_tile:
{
STZ.b $0E
REP #$30
JSR replace_tile_pit
SEP #$30
LDA.b #$01 : STA.b $14
REP #$30
RTS
}
replace_crack_pit:
{
LDX.w $1000
LDA.w #$0CCC : STA.w $1006, X
LDA.w #$0CDC : STA.w $100C, X
LDA.w #$0CCD : STA.w $1012, X
LDA.w #$0CDD : STA.w $1018, X
LDX.b $06
LDA.w #$0CCC : STA.l $7E2000, X
LDA.w #$0CDC : STA.l $7E2080, X
LDA.w #$0CCD : STA.l $7E2002, X
LDA.w #$0CDD : STA.l $7E2082, X
LDA.w #$01E9 : AND.w #$03FF : TAX
LDA.l $7EFE00, X : AND.w #$00FF
STA.b $08 : STA.b $09
JMP replace_tile_continue
}
replace_tile_pit:
{
LDX.w $1000
LDA.w #$01E9
STA.w $1006, X
STA.w $100C, X
STA.w $1012, X
STA.w $1018, X
LDX.b $06
LDA.w #$01E9
STA.l $7E2000, X
STA.l $7E2080, X
STA.l $7E2002, X
STA.l $7E2082, X
TXA
LSR
TAX
LDA.w #$2020
STA.l $7F2000, X
STA.l $7F2040, X
LDA.w #$01E9 : AND.w #$03FF : TAX
LDA.l $7EFE00, X : AND.w #$00FF : STA.b $08 : STA.b $09
JMP replace_tile_continue
}

View File

@@ -1,116 +0,0 @@
; =========================================================
; Custom Tag
; Provide custom room behavior based on room ID
StoryState = $7C
RoomTag_Return = $01CC5A
; override routine 0x39 "Holes(7)"
org $01CC18 : JML CustomTag
; RoomTag_Holes5
org $01CC10 : JML RoomTag_MinishShutterDoor
pullpc
CustomTag:
{
PHX
LDA $7EF3C6 : BNE .game_has_begun
JSR HouseTag_Main
.game_has_begun
PLX
JML RoomTag_Return
}
; =========================================================
; Room tag to initialize the game without the Uncle sprite.
HouseTag_Main:
{
LDA.w StoryState
JSL $008781
dw HouseTag_TelepathicPlea
dw HouseTag_WakeUpPlayer
dw HouseTag_End
HouseTag_TelepathicPlea:
{
LDA.b #$08 : STA $7EE000 ; Set the time to 8:00am
LDA.b #$03 : STA.w $012C ; Play the deku tree music
; Set Link's coordinates to this specific position.
LDA.b #$40 : STA $0FC2
LDA.b #$09 : STA $0FC3
LDA.b #$5A : STA $0FC4
LDA.b #$21 : STA $0FC5
; "Accept our quest, Link!"
LDA.b #$1F : LDY.b #$00
JSL Sprite_ShowMessageUnconditional
INC.b StoryState
RTS
}
HouseTag_WakeUpPlayer:
{
; Lighten the screen gradually and then wake Link up partially
LDA $1A : AND.b #$03 : BNE .delay
LDA $9C : CMP.b #$00 : BEQ .colorTargetReached
DEC $9C : DEC $9D
.delay
RTS
.colorTargetReached
INC $0D80, X
INC $037D
INC $037C
LDA.b #$57 : STA $20
LDA.b #$21 : STA $21
;LDA.b #$01 : STA $02E4
STZ $02E4 ; awake from slumber
INC.b StoryState
; Make it so Link's uncle never respawns in the house again.
LDA $7EF3C6 : ORA.b #$10 : STA $7EF3C6
; Set the game mode
LDA #$00 : STA GameState ; (0 - intro, 1 - pendants, 2 - crystals)
LDA #$00 : STA $7EF3CC ; disable telepathic message
JSL Sprite_LoadGfxProperties
RTS
}
HouseTag_End:
{
LDA $B6 : BNE .hasMetFarore
LDA #$00 : STA.w StoryState
.hasMetFarore
RTS
}
}
print "End of house_tag.asm ", pc
; ========================================================
; Room tag to open shutter door when player is minish
RoomTag_MinishShutterDoor:
{
LDA.w $02B2 : CMP.b #$05 : BNE .no_minish
REP #$30
LDX.w #$0000 : CPX.w $0468 : BEQ .exit
STZ.w $0468
STZ.w $068E : STZ.w $0690
SEP #$30
LDA.b #$1B : STA.w $012F
LDA.b #$05 : STA.b $11
.exit
SEP #$30
.no_minish
JML RoomTag_Return
}
pushpc

Binary file not shown.

View File

@@ -1,169 +1,26 @@
; Dungeons
incsrc "Dungeons/keyblock.asm"
print "End of keyblock.asm ", pc
; Pendant from chest position
org $098823 : LDY.b #$68
incsrc "Dungeons/sanctuary_transition.asm"
; Disable hardcoded sanctuary song
org $028BE7 : NOP #2
; Fixed color fade-in effect
; TODO: Investigate if this is the best way to fix this.
; Module06_UnderworldLoad
org $028364
Module06_UnderworldLoad:
{
; Fixed color RGB: #808000
LDA.b #$00 : STA.b $9C
LDA.b #$00 : STA.b $9D
LDA.b #$00 : STA.b $9E
LDA.b #$00
STA.l $7EC005
STA.l $7EC006
JSL $079A2C ; Link_TuckIntoBed
}
incsrc "Dungeons/entrances.asm"
print "End of entrances.asm ", pc
incsrc "Dungeons/enemy_damage.asm"
print "End of enemy_damage.asm ", pc
incsrc "Dungeons/house_walls.asm"
incsrc "Collision/CollisionTablesExpanded.asm"
incsrc "Collision/GlobalCollisionTables.asm"
; Use of Bank 0x2C begins
incsrc "Dungeons/Objects/object_handler.asm"
print "End of object_handler.asm ", pc
; Tag: Holes8
incsrc "Dungeons/together_warp_tag.asm"
; Custom Tag: Holes7
; Minish Tag: Holes5
incsrc "Dungeons/custom_tag.asm"
; Tag: Holes0
incsrc "Dungeons/floor_puzzle.asm"
print "End of floor_puzzle.asm ", pc
; Crumble Floor Tag: Holes3
incsrc "Dungeons/crumblefloor_tag.asm"
pushpc
incsrc "Dungeons/spike_subtype.asm"
incsrc "Dungeons/attract_scenes.asm"
print "End of attract_scenes.asm ", pc
incsrc "Dungeons/house_tag.asm"
print "End of house_tag.asm ", pc
incsrc "Collision/custom_collision.asm"
incsrc "Collision/CollisionTablesExpanded.asm"
incsrc "Collision/GlobalCollisionTables.asm"
pullpc ; Bank 0x33
TransferDungeonMapGfx:
{
REP #$20
LDX #$80 : STX $2100
LDX #$80 : STX $2115
LDA #$5000 : STA $2116 ; Destination of the DMA in VRAM
LDA #$1801 : STA $4300 ; DMA Transfer Mode and destination register
LDA.w #MapGfx : STA $4302
LDX.b #MapGfx>>16 : STX $4304
LDA #$2000 : STA $4305
LDX #$01 : STX $420B
LDX #$0F : STX $2100
SEP #$30
LDA.b #$09 : STA.b $14
RTL
MapGfx:
incbin dungeon_maps.bin
}
pushpc
org $0288FF
JSL CheckForTingleMaps : NOP
pullpc
CheckForTingleMaps:
{
LDA.w $040C : CMP.b #$0C : BEQ .check_mush
CMP.b #$0A : BEQ .check_tail
CMP.b #$10 : BEQ .check_castle
CMP.b #$16 : BEQ .check_zora
CMP.b #$12 : BEQ .check_glacia
CMP.b #$0E : BEQ .check_goron
CMP.b #$18 : BEQ .check_ship
JMP +
.check_mush
LDA.l TingleMaps : AND.b #$01 : BEQ +
JMP ++
.check_tail
LDA.l TingleMaps : AND.b #$02 : BEQ +
JMP ++
.check_castle
LDA.l TingleMaps : AND.b #$04 : BEQ +
JMP ++
.check_zora
LDA.l TingleMaps : AND.b #$08 : BEQ +
JMP ++
.check_glacia
LDA.l TingleMaps : AND.b #$10 : BEQ +
JMP ++
.check_goron
LDA.l TingleMaps : AND.b #$20 : BEQ +
JMP ++
.check_ship
LDA.l TingleMaps : AND.b #$40 : BEQ +
++
LDA.b #$01 : RTL
+
LDA.w $040C : CMP.b #$FF : RTL
}
NewWaterOverlayData:
; Horizontal
db $1B, $A1, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 06, 28 } | Size: 0D
db $51, $A1, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 14, 28 } | Size: 05
db $71, $A1, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 1C, 28 } | Size: 05
db $92, $A1, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 24, 28 } | Size: 09
db $A2, $A1, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 24, 28 } | Size: 09
db $C1, $A1, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 28, 0C } | Size: 07
; Vertical
db $A1, $33, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 28, 0C } | Size: 07
db $A1, $72, $C9 ; 0x0C9: Flood water (medium) ⇲ | { 28, 1C } | Size: 06
db $FF, $FF ; End
print "End of dungeons.asm ", pc
pushpc
; Transfer Dungeon Map Graphics
; Module0E_03_01_00_PrepMapGraphics
org $0AE152 : JSL TransferDungeonMapGfx
; RoomTag_GetHeartForPrize
; Swap LW/DW check on spawn falling prize
org $01C71B : LDA.l $7EF37A ; Crystals in LW
org $01C727 : LDA.l $7EF374 ; Pendants in DW
org $01F195 ; Replace static LDA
LDA $0682
org $01F1C9 ; Replace static LDA
LDA $0682
org $01F3D2 ; do tilemapcollision stuff for the dam
JML $01F237
; RoomTag_WaterGate
org $01CBAC
LDA.w #NewWaterOverlayData>>16
STA.b $B9
LDA.w #NewWaterOverlayData>>0
incsrc "Dungeons/floor_puzzle.asm"
print "End of floor_puzzle.asm ", pc

View File

@@ -1,4 +1,4 @@
; Change Enemy Damage
; Change Enemy Damage
; tzpd bbbb
; t - TODO
; z - High priority target for bees to give hints
@@ -38,10 +38,10 @@ org $0DB330
org $0DB266+$53
db $13
org $0DB1C6 ; 0x53 - ARMOS KNIGHT health
org $0DB1C6 ; 0x53 - ARMOS KNIGHT health
db 64
; Firebar
; Firebar
org $0DB44C+$7F
db $64 ; persist, same damage
@@ -49,12 +49,12 @@ org $0DB44C+$7F
org $0DB266+$55
db $03, $03
; Arrghus
org $0DB266+$8C
; Arrghus
org $0DB266+$8C
db $14
org $0DB266+$8D ; Arrgi
db $14
org $0DB266+$5D ; Roller vertical
org $0DB266+$5D ; Roller vertical
db $05, $05, $05, $05

32
Dungeons/entrances.asm Normal file
View File

@@ -0,0 +1,32 @@
; $DB8BF (0x2C entries, 2 bytes each) - valid map8 (CHR) values for entrances (left side)
; $DB917 (0x2C entries, 2 bytes each) - valid map8 (CHR) values for entrances (right side)
; $DB8BF-$DB916 - chr types indicating door entrances
org $1BB8BF
ValidDoorTypes_low:
dw $00FE, $00C5, $00FE, $0114 ; ???, House Door, ???, ???
dw $0115, $0175, $0156, $00F5
dw $00E2, $01EF, $0119, $00FE ; ???, ???, ???, Desert Door
dw $0172, $0177, $013F, $0172
dw $0112, $0161, $0172, $014C ; ???, ???, Dam Door, ???
dw $0156, $01EF, $00FE, $00FE
dw $00FE, $010B, $0173, $0143 ; ???, ???, ???, Tower of Hera
dw $0149, $0175, $0103, $0100
dw $01C6, $015E, $0167, $0128
dw $0131, $0112, $016D, $0163
dw $0173, $00FE, $0113, $0177
;---------------------------------------------------------------------------------------------------
ValidDoorTypes_high:
dw $014A, $00C4, $014F, $0115 ; ???, House Door, ???, ???
dw $0114, $0174, $0155, $00F5
dw $00EE, $01EB, $0118, $0146 ; ???, ???, ???, Desert Door
dw $0171, $0155, $0137, $0174
dw $0173, $0121, $0164, $0155 ; ???, ???, Dam Door, ???
dw $0157, $0128, $0114, $0123
dw $0113, $0109, $0118, $0161
dw $0149, $0117, $0174, $0101
dw $01C6, $0131, $0051, $014E
dw $0131, $0112, $017A, $0163
dw $0172, $01BD, $0152, $0167

View File

@@ -1,300 +1,324 @@
; ================================================
; use holes_0 tag routine
;================================================
;use holes_0 tag routine
; DO NOT USE holes_1 tag (broken because of holes_0 tag)
;==================================================
org $01CC00 ; holes_0 tag routine
JSL NewTagRoutine
RTS
; org $3A8000
pullpc
NewTagRoutine:
{
; check under link feet what tile he is standing on
; save somewhere in ram last tile we were on so it doesn't turn it back off
; kill room tag
LDA.b $20 : CLC : ADC #$10 : AND.b #$F0 : STA.w $0224 ; y
LDA.b $22 : CLC : ADC #$08 : AND.b #$F0 : STA.w $0225 ; x
; check under link feet what tile he is standing on
; save somewhere in ram last tile we were on so it doesn't turn it back off
; kill room tag
LDA.b $20 : CLC : ADC #$10 : AND.b #$F0
STA.w $0224 ; y
LDA.w $0224 : CMP.w $0226 : BNE .different_tile
LDA.w $0225 : CMP.w $0227 : BNE .different_tile
JMP .same_tile
.different_tile
LDA.b $22 : CLC : ADC #$08 : AND.b #$F0
STA.w $0225 ; x
; do code here for tile code
REP #$30
LDA.w $22 : CLC : ADC.w #$0008 : AND.w #$01F0 : LSR #$02 : STA.b $00
LDA.w $20 : CLC : ADC.w #$0010 : AND.w #$01F0 : ASL #$04 : CLC : ADC.b $00 : STA.b $06
TAX
LDA.w $0224 : CMP.w $0226 : BNE .differentTile
LDA.w $0225 : CMP.w $0227 : BNE .differentTile
JMP .sameTile
.differentTile
LDA.l $7E2000, X : CMP.w #$0DED : BNE +
; do code here for tile code
REP #$30
LDA.w $22 : CLC : ADC.w #$0008 : AND.w #$01F0 : LSR #$02 : STA.b $00
LDA.w $20 : CLC : ADC.w #$0010 : AND.w #$01F0 : ASL #$04 : CLC : ADC.b $00 : STA.b $06
TAX
LDA.l $7E2000, X : CMP.w #$0DED : BNE +
JSR update_star_tile
JSR SearchForEmptyStar
BRA .done_update
+
LDA.l $7E2000, X : CMP.w #$0DEE : BNE +
BRA .doneupdate
+
LDA.l $7E2000, X : CMP.w #$0DEE : BNE +
;JSR SearchToRedStar
JSR update_red_star_tile
SEP #$30
STZ.b $AE ; kill room tag!
;JSR update_empty_tile
;JSR SearchForEmptyStar
+
+
.done_update
SEP #$30
.doneupdate
SEP #$30
.same_tile
.sameTile
LDA.w $0224 : STA.w $0226 ; Last Y
LDA.w $0225 : STA.w $0227 ; Last X
LDA.w $0224 : STA.w $0226 ; Last Y
LDA.w $0225 : STA.w $0227 ; Last X
RTL
RTL
}
update_empty_tile:
{
STZ.b $0E
REP #$30
JSR replace_tile_empty
SEP #$30
LDA.b #$01 : STA.b $14
REP #$30
RTS
}
STZ.b $0E
REP #$30
JSR replace_tile_empty
SEP #$30
LDA.b #$01
STA.b $14
REP #$30
RTS
update_star_tile:
{
STZ.b $0E
REP #$30
JSR replace_tile_star
SEP #$30
LDA.b #$01 : STA.b $14
LDA.b #$0C : STA.w $012F
REP #$30
RTS
}
STZ.b $0E
REP #$30
JSR replace_tile_star
SEP #$30
LDA.b #$01
STA.b $14
REP #$30
RTS
update_red_star_tile:
{
STZ.b $0E
REP #$30
JSR replace_red_tile_star
SEP #$30
LDA.b #$01 : STA.b $14
LDA.b #$3C : STA.w $012E
REP #$30
RTS
}
STZ.b $0E
REP #$30
JSR replace_red_tile_star
SEP #$30
LDA.b #$01
STA.b $14
REP #$30
RTS
replace_red_tile_star:
{
LDX.w $1000
LDA.w #$19EE : STA.w $1006, X
LDA.w #$99EE : STA.w $100C, X
LDA.w #$59EE : STA.w $1012, X
LDA.w #$D9EE : STA.w $1018, X
LDX.w $1000
LDX.b $06
LDA.w #$19EE : STA.l $7E2000, X
LDA.w #$99EE : STA.l $7E2080, X
LDA.w #$59EE : STA.l $7E2002, X
LDA.w #$D9EE : STA.l $7E2082, X
AND.w #$03FF : TAX
LDA.l $7EFE00,X : AND.w #$00FF
STA.b $08 : STA.b $09
LDA.w #$19EE
STA.w $1006,X
LDA.w #$99EE
STA.w $100C,X
LDA.w #$59EE
STA.w $1012,X
LDA.w #$D9EE
STA.w $1018,X
LDX.b $06
LDA.w #$19EE : STA.l $7E2000, X
LDA.w #$99EE : STA.l $7E2080, X
LDA.w #$59EE : STA.l $7E2002, X
LDA.w #$D9EE : STA.l $7E2082, X
AND.w #$03FF
TAX
LDA.l $7EFE00,X
AND.w #$00FF
STA.b $08
STA.b $09
JMP replace_tile_continue
JMP replace_tile_continue
}
replace_tile_star:
{
LDX.w $1000
LDX.w $1000
LDA.w #$0DEE
STA.w $1006,X
LDA.w #$0DEE
STA.w $1006,X
LDA.w #$8DEE
STA.w $100C,X
LDA.w #$8DEE
STA.w $100C,X
LDA.w #$4DEE
STA.w $1012,X
LDA.w #$4DEE
STA.w $1012,X
LDA.w #$CDEE
STA.w $1018,X
LDA.w #$CDEE
STA.w $1018,X
LDX.b $06
LDX.b $06
LDA.w #$0DEE : STA.l $7E2000, X
LDA.w #$8DEE : STA.l $7E2080, X
LDA.w #$4DEE : STA.l $7E2002, X
LDA.w #$CDEE : STA.l $7E2082, X
LDA.w #$0DEE : STA.l $7E2000, X
LDA.w #$8DEE : STA.l $7E2080, X
LDA.w #$4DEE : STA.l $7E2002, X
LDA.w #$CDEE : STA.l $7E2082, X
AND.w #$03FF
TAX
AND.w #$03FF
TAX
LDA.l $7EFE00,X
AND.w #$00FF
STA.b $08
STA.b $09
LDA.l $7EFE00,X
AND.w #$00FF
STA.b $08
STA.b $09
JMP replace_tile_continue
JMP replace_tile_continue
}
replace_tile_empty:
{
LDX.w $1000
LDX.w $1000
LDA.w #$0DED
STA.w $1006,X
LDA.w #$0DED
STA.w $1006,X
LDA.w #$8DED
STA.w $100C,X
LDA.w #$8DED
STA.w $100C,X
LDA.w #$4DED
STA.w $1012,X
LDA.w #$4DED
STA.w $1012,X
LDA.w #$CDED
STA.w $1018,X
LDA.w #$CDED
STA.w $1018,X
LDX.b $06
LDA.w #$0DED : STA.l $7E2000, X
LDA.w #$8DED : STA.l $7E2080, X
LDA.w #$4DED : STA.l $7E2002, X
LDA.w #$CDED : STA.l $7E2082, X
LDX.b $06
LDA.w #$0DED : STA.l $7E2000, X
LDA.w #$8DED : STA.l $7E2080, X
LDA.w #$4DED : STA.l $7E2002, X
LDA.w #$CDED : STA.l $7E2082, X
AND.w #$03FF
TAX
AND.w #$03FF
TAX
LDA.l $7EFE00,X
AND.w #$00FF
STA.b $08
STA.b $09
LDA.l $7EFE00,X
AND.w #$00FF
STA.b $08
STA.b $09
replace_tile_continue:
replace_tile_continue:
LDX.w $1000
LDX.w $1000
LDA.w #$0000
JSR draw_one_corner
STA.w $1002,X
LDA.w #$0000
JSR draw_one_corner
STA.w $1002,X
LDA.w #$0080
JSR draw_one_corner
STA.w $1008,X
LDA.w #$0080
JSR draw_one_corner
STA.w $1008,X
LDA.w #$0002
JSR draw_one_corner
STA.w $100E,X
LDA.w #$0002
JSR draw_one_corner
STA.w $100E,X
LDA.w #$0082
JSR draw_one_corner
STA.w $1014,X
LDA.w #$0082
JSR draw_one_corner
STA.w $1014,X
LDA.w #$0100
STA.w $1004,X
STA.w $100A,X
STA.w $1010,X
STA.w $1016,X
LDA.w #$0100
STA.w $1004,X
STA.w $100A,X
STA.w $1010,X
STA.w $1016,X
LDA.w #$FFFF
STA.w $101A,X
LDA.w #$FFFF
STA.w $101A,X
TXA
CLC
ADC.w #$0018
STA.w $1000
TXA
CLC
ADC.w #$0018
STA.w $1000
RTS
}
RTS
; ---------------------------------------------------------
;---------------------------------------------------------------------------------------------------
draw_one_corner:
{
CLC
ADC.b $06
STA.b $0E
CLC
ADC.b $06
STA.b $0E
AND.w #$0040
AND.w #$0040
LSR A
LSR A
LSR A
LSR A
LSR A
LSR A
LSR A
LSR A
XBA
STA.b $08
XBA
STA.b $08
LDA.b $0E
AND.w #$303F
LSR A
ORA.b $08
STA.b $08
LDA.b $0E
AND.w #$303F
LSR A
ORA.b $08
STA.b $08
LDA.b $0E
AND.w #$0F80
LSR A
LSR A
ORA.b $08
XBA
LDA.b $0E
AND.w #$0F80
LSR A
LSR A
ORA.b $08
XBA
RTS
RTS
}
SearchForEmptyStar:
{
LDX.w #$1FFE
--
LDA.l $7E2000, X : CMP.w #$0DED : BEQ .foundEmptyTile
DEX : DEX
BPL --
; all tiles were on
SEP #$30
LDA.w $0468 : BEQ +
STZ.w $0468
STZ.w $068E
STZ.w $0690
LDA.b #$05 : STA.b $11
LDA.b #$25 : STA $012F
STZ.b $AE ; kill room tag!
LDA.b #$01 : STA $0466
+
BRA +
.foundEmptyTile
SEP #$30
LDA.w $0468 : BNE +
INC.w $0468
STZ.w $068E
STZ.w $0690
LDA.b #$05 : STA.b $11
+
RTS
}
LDX.w #$1FFE
--
LDA.l $7E2000, X : CMP.w #$0DED : BEQ .foundEmptyTile
DEX : DEX
BPL --
; all tiles were on
SEP #$30
LDA.w $0468 : BEQ +
STZ.w $0468
STZ.w $068E
STZ.w $0690
LDA.b #$05 : STA.b $11
LDA.b #$25 : STA $012F
STZ.b $AE ; kill room tag!
+
BRA +
.foundEmptyTile
SEP #$30
LDA.w $0468 : BNE +
INC.w $0468
STZ.w $068E
STZ.w $0690
LDA.b #$05 : STA.b $11
+
RTS
SearchToRedStar:
{
LDX.w #$1FFE
--
LDA.l $7E2000, X : CMP.w #$0DEE : BEQ .foundStarTile
DEX : DEX
BPL --
SEP #$30
STZ.b $AE ; kill room tag!
LDX.w #$1FFE
RTS
--
LDA.l $7E2000, X : CMP.w #$0DEE : BEQ .foundStarTile
DEX : DEX
BPL --
.foundStarTile
PHX
STX.b $06
JSR update_red_star_tile
PLX
BRA --
}
SEP #$30
STZ.b $AE ; kill room tag!
RTS
.foundStarTile
PHX
STX.b $06
JSR update_red_star_tile
PLX
BRA --
pushpc

212
Dungeons/house_tag.asm Normal file
View File

@@ -0,0 +1,212 @@
; =========================================================
; Room tag to initialize the game without the Uncle sprite.
;
StoryState = $7C
org $01CC18 ; override routine 0x39 "Holes(7)"
JML HouseTag
org $01CC5A
HouseTag_Return:
pullpc
HouseTag:
{
PHX
; -------------------------------
LDA $7EF3C6 : BNE .game_has_begun
JSR HouseTag_Main
.game_has_begun
; -------------------------------
PLX
JML HouseTag_Return
}
; =========================================================
HouseTag_Main:
{
LDA StoryState
JSL $008781
dw HouseTag_TelepathicPlea
dw HouseTag_WakeUpPlayer
dw HouseTag_End
}
; =========================================================
HouseTag_TelepathicPlea:
{
LDA #$06 : STA $7EE000 ; Set the time to 6:00am
; -------------------------------
; Set Link's coordinates to this specific position.
LDA.b #$40 : STA $0FC2
LDA.b #$09 : STA $0FC3
LDA.b #$5A : STA $0FC4
LDA.b #$21 : STA $0FC5
; "Accept our quest, Link!"
LDA.b #$1F : LDY.b #$00
JSL $05E219 ; Sprite_ShowMessageUnconditional
INC.b StoryState
RTS
}
; =========================================================
HouseTag_WakeUpPlayer:
{
; Lighten the screen gradually and then wake Link up partially
LDA $1A : AND.b #$03 : BNE .delay
LDA $9C : CMP.b #$00 : BEQ .colorTargetReached
DEC $9C : DEC $9D
.delay
RTS
.colorTargetReached
INC $0D80, X
INC $037D
INC $037C
LDA.b #$57 : STA $20
LDA.b #$21 : STA $21
;LDA.b #$01 : STA $02E4
STZ $02E4 ; awake from slumber
INC.b StoryState
; TODO: Make it so "uncle" respawns when the player dies
; and experiences a game over
; Make it so Link's uncle never respawns in the house again.
LDA $7EF3C6 : ORA.b #$10 : STA $7EF3C6
; Set the game mode
LDA #$00 : STA $7EF3C5 ; (0 - intro, 1 - pendants, 2 - crystals)
LDA #$00 : STA $7EF3CC ; disable telepathic message
LDA #$01 : STA $7EE00E ; Make it rain
JSL $00FC41 ; fix monsters
RTS
}
; =========================================================
HouseTag_End:
{
LDA $B6 : BNE .hasMetFarore
LDA #$00 : STA StoryState
.hasMetFarore
RTS
}
pushpc
; =========================================================
; Fixed color fade-in effect
; TODO: Investigate if this is the best way to fix this.
org $028364
{
#_028364: LDA.b #$00 ; Fixed color RGB: #808000
#_028366: STA.b $9C
#_028368: LDA.b #$00
#_02836A: STA.b $9D
#_02836C: LDA.b #$00
#_02836E: STA.b $9E
#_028370: LDA.b #$00
#_028372: STA.l $7EC005
#_028376: STA.l $7EC006
#_02837A: JSL $079A2C ; Link_TuckIntoBed
}
; =========================================================
; Dying Uncle Code Hook
; Uncle won't remove tagalong when interacting
org $05DF3A
LDA.b #$01 : STA $7EF3CC
; =========================================================
; SRM Start Modifier
; Credit: Conn, Euclid, MathOnNapkins
org $0cdc5a
JSR $ffb1
org $0cffb1
; =========================================================
;$3C5: $00: Unset, Will put Link in his bed state at the beginning of the game. (Also can't use sword or shield)
; $01: Start in the castle on start up.
; $02: Indicates you have completed the first Hyrule Castle dungeon.
; $03: Indicates you have beaten Agahnim and are now searching for crystals.
; $04 and above: meaningless. Though, you could write code using them to expand the event system perhaps.
;$3C6: Progress Flags (bitwise)
; 00 - Set after your Uncle gives you his gear in the secret passage. Prevents him from showing up there again.
; 01 - Indicates that you've touched the dying priest in Sanctuary.
; 02 - Set after you bring Zelda to sanctuary?
; 03 - Unused? (98% certainty)
; 04 - Set after Link's Uncle leaves your house. It's used to prevent him from respawning there.
; 05 - Set after you obtain the Book of Mudora (this is a guess)
; 06 - Seems to be a persistent flag that toggles between two possible statements that a fortune teller can give you during your "reading".
; In other words, don't expect this to stay in one state if you're using fortune tellers. Has no other known purpose.
; 07 - Unused? (98% certainty)
; 10 - Start value (in house, bed)
LDA #$0000
STA $7003C5,x
; =========================================================
;$3C7: Map Icons Indicator 2 (value, not bitwise)
; 00 - start value (cross at Hyrule Castle)
; 01 - cross at Sahasrala's house
; 02 - cross at ruins
; 03 - The Three Pendants
; 04 - Master Sword in Lost Woods
; 05 - Agahnim (skull icon at Hyrule Castle)
; 06 - Just crystal 1 shown (Sahasrala's idea)
; 07 - All crystals shown
; 08 - Agahnim (skull icon at Ganon's Tower)
; All values beyond 8 are invalid, it seems.
;$3C8: Starting Entrance to use. Abbreviations: LH = Link's House - SA = Sanctuary - MC = Mountain Cave - PP = Pyramid of Power in DW
; 00 - Start the game in Link's house always.
; 01 - SA.
; 03 - Secret passage under HC garden (near dying uncle).
; 05 - LH or SA or MC.
LDA #$0000
STA $7003C7,x
; =========================================================
;$359: Sword you start with
; 00 - No sword
; 01 - Fighter Sword
; 02 - Master Sword
; 03 - Tempered Sword
; 04 - Golden Sword
;$35A: Shield you start with
; 00 - No shield
; 01 - Blue Shield
; 02 - Hero's Shield
; 03 - Mirror Shield
LDA #$0000 ; 01=sword, 02 = shield to start with
STA $700359,x
LDY #$0000
RTS

View File

@@ -1,6 +1,7 @@
;
; Editor View
; 1 2 -> 1 3
; 1 2 -> 1 3
; 3 4 -> 2 4
; Top Left Corner Layer 1
@@ -8,31 +9,31 @@
org $00A6B8
dw $C89E, $489E, $0894, $0892
dw $889E, $089E, $08B6, $0899
dw $4893, $08B5, $08A6, $08B7
dw $0893, $08B5, $08A6, $08B7
dw $0890, $0897, $08B3, $0CAE
; Bottom Left Corner Layer 1
#obj0B86:
dw $0892, $8894, $C89E, $489E
dw $0899, $88B6, $889E, $089E
dw $88B7, $88A6, $88B5, $C893
dw $88B7, $88A6, $88B5, $8893
dw $8CAE, $88B3, $8897, $8890
; Top Right Corner Layer 1
#obj0BA6:
dw $0890, $0896, $48B3, $4CAE
dw $0893, $48B5, $48A6, $48B7
dw $4893, $48B5, $48A6, $48B7
dw $C89E, $489E, $48B6, $4899
dw $889E, $089E, $4894, $4892
; Bottom Right Corner Layer 1
; Bottom Right Corner Layer 1
#obj0BC6:
dw $CCAE, $C8B3, $8896, $8890
dw $C8B7, $C8A6, $C8B5, $8893
dw $C8B7, $C8A6, $C8B5, $C893
dw $4898, $C8B6, $C89E, $489E
dw $4892, $C894, $889E, $089E
; Top Wall Layer 1
; Top Wall Layer 1
#obj02E8:
org $009E3A
dw $0890, $0896, $08A2, $0CAC
@@ -42,13 +43,13 @@ org $009E3A
dw $8CAC, $88A2, $8896, $C890
dw $CCAC, $88A3, $8897, $8890
; Left Wall Layer 1
; Left Wall Layer 1
#obj02C8:
org $009E1A
dw $0892, $0898, $08A4, $0CAD
dw $0892, $0899, $08A4, $0CAD
dw $0892, $0899, $08A5, $8CAD
#obj02D8:
dw $4CAD, $48A4, $4898, $4892
dw $CCAD, $48A5, $4899, $4892
dw $4CAD, $48A4, $4899, $4892
dw $CCAD, $48A5, $4899, $4892

View File

@@ -1,8 +1,8 @@
; ==========================================================
; =============================================================================
; Key Block Object like Link's Awakening
; Overwrites the Prison Door
;
; Author: XaserLE
; Author: XaserLE
; Thanks: - PuzzleDude for finding a drawing bug and get rid of it
; - MathOnNapkins' Zelda Doc's
; - wiiqwertyuiop for his Zelda Disassembly
@@ -11,45 +11,51 @@
; left and right will not work (will try to fix this in the future).
;
; The key block must always be placed on EVEN x and y.
; 00, 02, 04, 06, 08, 0A, 0C, 0E
; ==========================================================
; 00, 02, 04, 06, 08, 0A, 0C, 0E
; =============================================================================
; Big chest key for compass
; Big chest key for compass
org $01EC1A
db $64
org $01EB8C
org $01EB8C
Object_KeyBlock:
{
LDA $7EF36F ; load the small key counter
AND #$00FF ; check if we have at least one small key (AND will not be zero)
BEQ $4C ; if not (AND is zero), do nothing
; otherwise we will decrement the small key counter
BEQ $4C ; if not (AND is zero), do nothing
; otherwise we will decrement the small key counter
; and branch to the code that opens the prison door
LDA $7EF36F ; reload small key counter
DEC A ; remove one key
STA $7EF36F ; save the new value at small key counter position
BRA $05 ; branch to the code that opens the prison door
; Fix draw bug from floor tile left by block after unlock.
org $01EBC8
LDA.w $9B5A,y
org $01EBD1
LDA.w $9B54,y
org $01EBDA
LDA.w $9B5C,y
; Draw Values
; 50 - /
; 52 - normal
; 54 - x mirror
; 56 - normal
; 58 - x mirror
; 5A - y mirror
; 5C - xy mirror
; 5E - y mirror
}
; Fix draw bug from floor tile left by block after unlock.
org $01EBC8 : LDA.w $9B5A, Y
; =============================================================================
org $01EBD1 : LDA.w $9B54, Y
org $01EBDA : LDA.w $9B5C, Y
; Draw Values
; 50 - /
; 52 - normal
; 54 - x mirror
; 56 - normal
; 58 - x mirror
; 5A - y mirror
; 5C - xy mirror
; 5E - y mirror
org $00AFE6
dw $4936

View File

@@ -0,0 +1,24 @@
; Disable Code
; ------------
org $028BE7
db $EA, $EA
; Load Sanctuary music during Room 02 to 12 transition
; ----------------------------------------------------
;org $028BDA
;db $14
; Room Number (Sanctuary)
;org $028BDE
;db $12
; Load Hyrule Castle music during Room 12 to 02 transition
; --------------------------------------------------------
;org $028BE3
;db $16
; Room Number (Sewers)
;org $028BE5
;db $02

View File

@@ -17,6 +17,7 @@ org $1EBD0E
JSL NewSpikeCollision
RTS
pullpc
speedValuesH:
db $20, $10, $18, $28, $30, $38, $40, $FF
@@ -27,23 +28,23 @@ db $00, $00, $00, $00, $00, $00, $00, $FF
db $20, $18, $20, $28, $30, $38, $40, $FF
NewSpikePrep:
{
PHB : PHK : PLB
LDA $0E30, X : TAY
LDA.w speedValuesH, Y : STA.w SprXSpeed, X
LDA.w speedValuesV, Y : STA.w SprYSpeed, X
PLB
RTL
}
PHB : PHK : PLB
LDA $0E30, X : TAY
LDA.w speedValuesH, Y : STA $0D50, X
LDA.w speedValuesV, Y : STA $0D40, X
PLB
RTL
NewSpikeCollision:
{
LDA.b #$04 : STA.w SprTimerA, X
LDA.w SprXSpeed, X : EOR.b #$FF : INC A : STA.w SprXSpeed, X
LDA.w SprYSpeed, X : EOR.b #$FF : INC A : STA.w SprYSpeed, X
LDA.b #$05 : JSL $0DBB7C ; Sound_SetSfx2PanLong
RTL
}
LDA.b #$04 : STA $0DF0, X
LDA $0D50, X : EOR.b #$FF : INC A : STA $0D50, X
LDA $0D40, X : EOR.b #$FF : INC A : STA $0D40, X
LDA.b #$05 : JSL $0DBB7C ; Sound_SetSfx2PanLong
RTL
print "End of spike_subtype.asm ", pc
pushpc
pushpc

View File

@@ -1,36 +1,49 @@
; ==========================================================
; ==============================================================================
; Special Warp room tag
; Written by Jared_Brian_
; 11-19-2022
;
; Makes it so that what room the player will warp to when
; falling in a hole or using a warp pad will change
; depending on the player's position in the room. This uses
; the 4 "stairs" properties in the room header.
; Edit by scawful since I'm already using Holes(7)
; ==============================================================================
; Replaces the "Holes(8)" tag in HM or ZS. Makes it so that what room the player
; will warp to when falling in a hole or using a warp pad will change depending
; on the player's position in the room. This uses the 4 "stairs" properties in
; the room header.
org $01CC1C : JML WarpTag
; ==============================================================================
WarpTag_Return = $01CC5A
;relpaces the original tag.
; dw $CC1C ; = $CC1C* ; routine 0x3A "Holes(8)"
org $01CC1C
JML WarpTag
org $01CC5A
WarpTag_Return:
; ==============================================================================
pullpc ; Bank 0x2C
WarpTag:
{
PHX
PHX
; Get a value 0-3 that represents where we are in the room
; -----------
; | 0 | 1 |
; | | |
; -----------
; | 2 | 3 |
; | | |
; -----------
LDA $A9 : CLC : ADC $AA : TAX
LDA $7EC001, X : STA $7EC000
; Get a value 0-3 that represents where we are in the room
; -----------
; | 0 | 1 |
; | | |
; -----------
; | 2 | 3 |
; | | |
; -----------
LDA $A9 : CLC : ADC $AA : TAX
LDA $7EC001, X : STA $7EC000
PLX
JML WarpTag_Return
PLX
JML WarpTag_Return
}
print "End of together_warp_tag.asm ", pc
pushpc
; ==============================================================================

View File

@@ -1,84 +1,17 @@
; Inherits Free Space from Bank07
incsrc "Items/bottle_net.asm"
; Starts Expanded Bank 0x2B
incsrc "Items/ocarina.asm"
print "End of Items/ocarina.asm ", pc
incsrc "Items/ice_rod.asm"
print "End of Items/ice_rod.asm ", pc
; Starts Expanded Bank 0x2B
incsrc "Items/jump_feather.asm"
incsrc "Items/book_of_secrets.asm"
incsrc "Items/sword_collect.asm"
incsrc "Items/goldstar.asm"
incsrc "Items/portal_rod.asm"
incsrc "Items/fishing_rod.asm"
incsrc "Items/magic_rings.asm"
incsrc "Items/fist_damage.asm"
print "End of Items/fist_damage.asm ", pc
MagicBeanGfx:
incbin "gfx/magic_bean.bin"
MagicBeanSwapDynamicGfx:
{
PHX : PHP
REP #$30
LDX #$01BE
--
LDA.l MagicBeanGfx, X : STA.l $7EA480, X
DEX : DEX : BPL --
PLP : PLX
RTL
}
Link_ConsumeMagicBagItem:
{
LDA.w $020B
JSL JumpTableLocal
dw Link_Banana
dw Link_Pineapple
dw Link_RockMeat
dw Link_Seashells
dw Link_Honeycombs
dw Link_DekuSticks
Link_Banana:
{
LDA.l CURHP : CMP.w MAXHP : BCS +
LDA.l CURHP : CLC : ADC.b #$10 : STA.l CURHP
LDA.b #$0D : STA.w $012F ; HUD Heart SFX
+
RTS
}
Link_Pineapple:
{
RTS
}
Link_RockMeat:
{
RTS
}
Link_Seashells:
{
RTS
}
Link_Honeycombs:
{
RTS
}
Link_DekuSticks:
{
RTS
}
}
pushpc
; League of its own
incsrc "Items/ice_rod.asm"
print "End of Items/ice_rod.asm ", pc
pullpc

View File

@@ -3,51 +3,26 @@
; Makes BG2 Disappear when holding L in a building
; Based on the Parallel Worlds feature
;
; Layer Flags: xxxsabcd
; (i count BG from 1 to 4 - MathOnNapkins RAM-Map counts from 0 to 3)
; s - Sprite layer enabled
; Layer Flags: xxxsabcd (i count BG from 1 to 4 - MathOnNapkins RAM-Map counts from 0 to 3)
; s - Sprite layer enabled
; a - BG4 enabled
; b - BG3 enabled
; c - BG2 enabled
; d - (BG1 disabled) --> only works if the room uses the feature "BG2 on Top"
; d - (BG1 disabled) --> only works properly if the room uses the feature "BG2 on Top"
;
; Originally by XaserLE, updated by scawful
; LinkItem_Book
; Desert Book activation trigger
org $07A484 ; LDA $02ED : BNE BRANCH_BETA
NOP #01
JML LinkItem_BookOfSecrets
return_pos:
; =========================================================
; long subroutine that is executed every frame
org $068365
JSL LinkItem_SecretsBook ; overwrite it (originally JSL $099F91)
; =========================================================
pullpc
LinkItem_BookOfSecrets:
{
; set link in praying mode
; LDA.b #$02 : STA.w $037A
; LDA #$FF : STA $8C
; LDA #$00 : STA $7EE00E
; STZ $1D : STZ $9A
; STZ.w $012D
; Are we on the castle map?
LDA $8A : CMP.b #$1B : BNE +
; Is there an overlay playing?
LDA $04C6 : BNE +
; If not, start the castle entrance animation
LDA.b #$02 : STA.w $04C6 ; Set the overlay
STZ.b $B0 : STZ.b $C8
; Cache the camera
REP #$20
LDA.w $0618 : STA.w CameraCache
SEP #$20
+
JML $07A493 ; return do not !
}
Dungeon_RevealSecrets:
LinkItem_SecretsBook:
{
; Check if we are in a building
LDA $1B : AND #$01 : BEQ .end
@@ -58,20 +33,20 @@ Dungeon_RevealSecrets:
; load unfiltered joypad 1 register (AXLR|????)
; delete all bits except those for L
LDA $F2 : AND #$20
LDA $F2 : AND #$20
; L button pressed? (if yes, zero flag is set)
SEC : SBC #$20 : BNE $06 ; if not, go to enable BG2
; load layer flags and disable BG2 (0xFD = 11111101)
LDA $1C : AND #$FD : BRA $04 ; go to store layer flags
; enable BG2 (0x02 = 00000010)
LDA $1C : ORA #$02 : STA $1C
LDA $1C : ORA #$02 : STA $1C
; ----------
.end
; @ $068365, JSL $099F91 old hook
.end
JSL $099F91 ; at least execute original code
RTL
}

View File

@@ -1,43 +1,51 @@
; ===========================================================
; Bottle Net Code
; ===========================================================
; =============================================================================
; Bottle Net Code
; =============================================================================
!BottleFlag = $0AA6
PlayerItem_SpawnFaerie = $1EFE33
PlayerItem_ReleaseBee = $1EDCCF
org $1EFE33
PlayerItem_SpawnFaerie:
; ===========================================================
org $1EDCCF
PlayerItem_ReleaseBee:
; =============================================================================
; LinkItem_Bottle
org $07A15B
LinkItem_NewBottle:
{
{
; Check if we have a bottle or not
LDA.l BottleIndex : DEC A : TAX
LDA.l Bottle1, X : BEQ .exit
LDA $7EF34F : DEC A : TAX
LDA $7EF35C, X : BEQ .exit
; Check if the bottle is empty
; Check if the bottle is empty
CMP.b #$03 : BCC .empty_bottle
; Confirm we aren't currently catching
LDA $030D : BNE .empty_bottle
; Confirm we aren't currently catching
LDA $030D : BNE .empty_bottle
; If no, prepare and call the LinkItem_Bottles routine
JSR LinkItem_Bottles
BRA .exit
; If no, prepare and call the LinkItem_Bottles routine
JSR LinkItem_Bottles
BRA .exit
.empty_bottle
.empty_bottle
; Otherwise, prepare and call the LinkItem_BugCatchingNet routine
JSR LinkItem_CatchBottle
.exit
.exit
RTS
}
assert pc() <= $07A249
warnpc $07A249
pullpc
print " LinkItem_CatchBottle ", pc
; =============================================================================
pose_id:
db $0B, $06, $07, $08, $01, $02, $03, $04, $05, $06 ; up
db $01, $02, $03, $04, $05, $06, $07, $08, $01, $02 ; down
@@ -52,153 +60,152 @@ pose_offset:
; *$3AFF8-$3B072 LOCAL
LinkItem_CatchBottle:
{
{
BIT $3A : BVS .y_press
LDA $6C : BNE .bottle_exit ; (RTS)
JSR Link_CheckNewY_ButtonPress : BCC .bottle_exit ; (RTS)
LDA $2F : LSR A : TAY
LDX pose_offset, Y
LDA.w pose_id, X : STA $0300
LDA.b #$03 : STA $3D
LDA $6C : BNE .bottle_exit ; (RTS)
JSR Link_CheckNewY_ButtonPress : BCC .bottle_exit ; (RTS)
STZ $030D, X
LDA $2F : LSR A : TAY
LDX pose_offset, Y
LDA pose_id, X : STA $0300
LDA.b #$03 : STA $3D
STZ $030D, X
LDA.b #$10 : STA $037A
LDA.b #$01 : TSB $50
STZ $2E
LDA.b #$32 : JSR Player_DoSfx2
LDA.b #$10 : STA $037A
LDA.b #$01 : TSB $50
STZ $2E
LDA.b #$32 : JSR Player_DoSfx2
.y_press:
JSR $AE65 ; HaltLinkWhenUsingItems
.y_press:
JSR $AE65 ;UnknownRoutine
LDA $67 : AND.b #$F0 : STA $67
DEC $3D : BPL .bottle_exit
LDX $030D : INX : STX $030D
LDA.b #$03 : STA $3D
LDA $2F : LSR A : TAY
LDA.w pose_offset, Y : CLC : ADC $030D : TAY
LDA.w pose_id, Y : STA $0300
LDA pose_offset, Y : CLC : ADC $030D : TAY
LDA pose_id, Y : STA $0300
CPX.b #$0A : BNE .bottle_exit
STZ $030D
STZ $0300
LDA $3A : AND.b #$80 : STA $3A
STZ $037A
LDA $50 : AND.b #$FE : STA $50
LDA.b #$80 : STA $44 : STA $45
.bottle_exit:
NetExit:
.bottle_exit:
NetExit:
RTS
}
; =============================================================================
print " LinkItem_Bottles ", pc
LinkItem_Bottles:
{
JSR Link_CheckNewY_ButtonPress : BCC NetExit ; (RTS)
LDA.b $3A : AND.b #$BF : STA.b $3A
LDA.b $3A : AND.b #$BF : STA.b $3A
; Check if we have a bottle or not
LDA.l $7EF34F : DEC A : TAX
LDA.l $7EF35C, X : BEQ NetExit ; (RTS)
CMP.b #$03 : BCC .LinkItem_UselessBottle
CMP.b #$03 : BEQ .LinkItem_RedPotion
CMP.b #$04 : BEQ .LinkItem_GreenPotion
CMP.b #$05 : BEQ .LinkItem_BluePotion
CMP.b #$06 : BEQ .fairy
BRL .LinkItem_BeeBottle
; Check if we have a bottle or not
LDA.l BottleIndex : DEC A : TAX
.fairy
BRL .LinkItem_FairyBottle
LDA.l $7EF35C, X : BEQ NetExit ; (RTS)
CMP.b #$03 : BCC .LinkItem_UselessBottle
CMP.b #$03 : BEQ .LinkItem_RedPotion
CMP.b #$04 : BEQ .LinkItem_GreenPotion
CMP.b #$05 : BEQ .LinkItem_BluePotion
CMP.b #$06 : BEQ .fairy
CMP.b #$09 : BEQ .magic_bean
CMP.b #$0A : BEQ .milk_bottle
BRL .LinkItem_BeeBottle
.LinkItem_RedPotion
LDA.l $7EF36C : CMP.l $7EF36D : BNE .can_drink_red
.milk_bottle
LDA.l $7EF36C : CMP.l $7EF36D : BEQ .LinkItem_UselessBottle
JSL Bottle_DrinkMilk
RTS
.LinkItem_UselessBottle
BRL LinkGoBeep ; BRL $07A955 Investigate
.magic_bean
JSL ReleaseMagicBean
RTS
.can_drink_red
LDA.b #$02 : STA.l $7EF35C, X : STZ.w $0301
LDA.b #$04 : STA.b $11
LDA.b $10 : STA.w $010C
LDA.b #$0E : STA.b $10
LDA.b #$07 : STA.w $0208
JSL $0DFA58
RTS
.fairy
BRL .LinkItem_FairyBottle
.LinkItem_GreenPotion
LDA.l $7EF36E : CMP.b #$80 : BNE .can_drink
BRL LinkGoBeep
.LinkItem_RedPotion
LDA.l $7EF36C : CMP.l $7EF36D : BNE .can_drink_red
.can_drink
; Set the bottle empty
LDA.b #$02 : STA.l $7EF35C, X : STZ.w $0301
.LinkItem_UselessBottle
BRL LinkGoBeep ; BRL $07A955 Investigate
; submodule ????
LDA.b #$08 : STA.b $11
LDA.b $10 : STA.w $010C
; Go to text mode
LDA.b #$0E : STA.b $10
LDA.b #$07 : STA.w $0208
.can_drink_red
LDA.b #$02 : STA.l $7EF35C, X : STZ.w $0301
JSL $0DFA58 ; RebuildHUD_long
BRA .bottle_exit
LDA.b #$04 : STA.b $11
LDA.b $10 : STA.w $010C
LDA.b #$0E : STA.b $10
LDA.b #$07 : STA.w $0208
.LinkItem_BluePotion
LDA $7EF36C : CMP $7EF36D : BNE .useBluePotion
LDA $7EF36E : CMP.b #$80 : BNE .useBluePotion
BRL LinkGoBeep ; BRL $07A955
JSL RebuildHUD_long
.useBluePotion
LDA.b #$02 : STA $7EF35C, X : STZ $0301
; more submodule code
LDA.b #$09 : STA.b $11
LDA.b $10 : STA.w $010C
RTS
; Go to text mode (?)
LDA.b #$0E : STA.b $10
LDA.b #$07 : STA.w $0208
JSL $0DFA58 ; RebuildHUD_Long
BRA .bottle_exit
.LinkItem_GreenPotion
LDA.l $7EF36E : CMP.b #$80 : BNE .can_drink
BRL LinkGoBeep
.LinkItem_FairyBottle
STZ.w $0301 : LDA.b #$02 : STA.l $7EF35C, X
JSL PlayerItem_SpawnFaerie : BPL .released
BRL LinkGoBeep ; BRL $07A955
.can_drink
; Set the bottle empty
LDA.b #$02 : STA.l $7EF35C, X : STZ.w $0301
.released
JSL $0DFA58 ; RebuildHUD_Long
BRA .bottle_exit
; submodule ????
LDA.b #$08 : STA.b $11
LDA.b $10 : STA.w $010C
.LinkItem_BeeBottle
STZ.w $0301
JSL PlayerItem_ReleaseBee : BPL .bee_spawn_success
BRL LinkGoBeep ; BRL $07A955
; Go to text mode
LDA.b #$0E : STA.b $10
LDA.b #$07 : STA.w $0208
.bee_spawn_success
LDA.b #$02 : STA.l $7EF35C, X
JSL $0DFA58 ; RebuildHUD_Long
JSL RebuildHUD_long
BRA .bottle_exit
.LinkItem_BluePotion
LDA $7EF36C : CMP $7EF36D : BNE .useBluePotion
LDA $7EF36E : CMP.b #$80 : BNE .useBluePotion
BRL LinkGoBeep ; BRL $07A955
.useBluePotion
LDA.b #$02 : STA $7EF35C, X : STZ $0301
; more submodule code
LDA.b #$09 : STA.b $11
LDA.b $10 : STA.w $010C
; Go to text mode (?)
LDA.b #$0E : STA.b $10
LDA.b #$07 : STA.w $0208
JSL RebuildHUD_long
BRA .bottle_exit
.LinkItem_FairyBottle
STZ.w $0301 : LDA.b #$02 : STA.l $7EF35C, X
JSL PlayerItem_SpawnFaerie : BPL .released
BRL LinkGoBeep ; BRL $07A955
.released
JSL RebuildHUD_long
BRA .bottle_exit
.LinkItem_BeeBottle
STZ.w $0301
JSL PlayerItem_ReleaseBee : BPL .bee_spawn_success
BRL LinkGoBeep ; BRL $07A955
.bee_spawn_success
LDA.b #$02 : STA.l $7EF35C, X
JSL RebuildHUD_long
.bottle_exit
.bottle_exit
RTS
}
@@ -208,12 +215,5 @@ LinkGoBeep:
BRA LinkItem_Bottles_bottle_exit
}
Bottle_DrinkMilk:
{
LDA.b #$28 : STA.l $7EF372 ; Heal 5 hearts
LDA.b #$02 : STA.l $7EF35C, X : STZ.w $0301
RTL
}
print "End of Items/bottle_net.asm ", pc
pushpc
pushpc

View File

@@ -9,48 +9,28 @@
; $7F5BA2 RAM for fishing mode - 1 = rod out, 2 = pull
; $7F5BA3 RAM Index for the fishing floater
; Modify the code of the sprite "RunningBoy" 0x74
; ====================================================
; =========================================================
; Values
;#$400 ; to show fishing hud
;#$14A ; only the hud
; Sprite_2D_NecklessMan_bounce
org $06C0B2
; ================= USED FOR THE FLOATER ==================
; TODO: Fix sprite override of RunningBoy or pick new sprite
org $06C058 ; JSL Sprite_74_RunningBoy
{
JSL FloaterBoySpriteCheck
RTS
}
org $07AF3E ; Cane of Byrna
LinkItem_FishingRodAndPortalRod:
org $07AF3E ; Cane of Byrna - End: $07AFB4
LinkItem_CaneOfByrna:
{
; If the sram slot is 02, we can swap between the fishing rod and the portal rod
LDA.l $7EF351 : CMP.b #$02 : BEQ +
JSL LinkItem_FishingRod
RTS
+
LDA.w FishingOrPortalRod : BNE .portal_rod
JSL LinkItem_FishingRod
JMP ++
.portal_rod
JSR LinkItem_PortalRod
++
LDA.b $F6
BIT.b #$20 : BNE .left ; pressed left
BIT.b #$10 : BNE .right ; pressed right
RTS
; Swap the ram variable FishingOrPortalRod based on left or right
; 00 = fishing rod, 01 = portal rod
.left
LDA.w FishingOrPortalRod : CMP #$00 : BEQ .right
LDA.b #$00 : STA.w FishingOrPortalRod
RTS
.right
LDA.w FishingOrPortalRod : CMP #$01 : BEQ .left
LDA.b #$01 : STA.w FishingOrPortalRod
JSL LinkItem_FishingRod
RTS
}
assert pc() <= $07AFB4
warnpc $07AFB4
pullpc
@@ -62,35 +42,46 @@ LinkItem_FishingRod:
{
PHB : PHK : PLB
BIT.b $3A : BVS .holding_y
LDA.b $6C : BNE FishingRodExit
JSR CheckYButtonPress : BCC FishingRodExit
BIT.b $3A
BVS .holding_y
LDA.b $67 : AND.b #$F0 : STA.b $67
LDA.b $6C
BNE FishingRodExit
JSL FishingSwapCaneBlockHammerGfx
JSR CheckYButtonPress
BCC FishingRodExit
JSR AltLinkUsingItem
LDA.b $67
AND.b #$F0
STA.b $67
STZ.b $69
STZ.b $68
LDA.b #$08
TSB.w $037A
STZ.b $2E
STZ.w $0300
STZ.w $0301
JSL FishingSwapCaneBlockHammerGfx
STZ.b $69
STZ.b $68
LDA.b #$08
TSB.w $037A
STZ.b $2E
STZ.w $0300
STZ.w $0301
LDA.w RodAndCaneAnimationTimer
STA.b $3D
LDA.w RodAndCaneAnimationTimer : STA.b $3D
.holding_y
JSR HaltLinkWhenUsingItems
LDA.b #$26 : STA.w $0107 ; Sword DMA to Floater Hammer
LDA.w $0300 : CMP #$02 : BEQ +
DEC.b $3D ; decrease timer
BPL FishingRodExit
DEC.b $3D ; decrease timer
BPL FishingRodExit
+
LDA.l $7F5BA2 : CMP #$02 : BNE +
JMP EndFishing
JMP EndFishing
+
CMP #$01 : BEQ .waitforend
@@ -100,26 +91,29 @@ LinkItem_FishingRod:
TAX
; load timer for current frame animation state
LDA.w RodAndCaneAnimationTimer, X : STA.b $3D ; timer
LDA.w RodAndCaneAnimationTimer, X ; load timer for current frame animation state
STA.b $3D ; timer
CPX.b #$01 : BNE +
; spawn floaters
PHX
LDA.b #$2D
JSL Sprite_SpawnDynamically
; spawn floater
PHX
LDA.b #$74
JSL $1DF65D ; Sprite_SpawnDynamically because whatever
LDA.b $22 : STA.w $0D10, Y
LDA.b $23 : STA.w $0D30, Y
LDA.b $20 : STA.w $0D00, Y
LDA.b $21 : STA.w $0D20, Y
LDA.b #$01 : STA.w $0E70, Y ; is floater
TYA : STA.l $7F5BA3 ; keep the index of the sprite
TYX
JSL SpritePrep_Floater ; just call it there
PLX
LDA.b $22 : STA.w SprX, Y
LDA.b $23 : STA.w SprXH, Y
LDA.b $20 : STA.w SprY, Y
LDA.b $21 : STA.w SprYH, Y
LDA.b #$01 : STA.w SprCollision, Y ; is floater
TYA : STA.l $7F5BA3 ; keep the index of the sprite
TYX
JSL SpritePrep_Floater ; just call it there
PLX
+
CPX.b #$02 : BCC .exit
LDA #$01 : STA.l $7F5BA2 ; set fishing rod state to rod is out
CPX.b #$02
BCC .exit
LDA #$01
STA.l $7F5BA2 ; set fishing rod state to rod is out
LDA.b #$FE : STA $3D ;set timer to 8 frames
; wait for Y press
.waitforend
@@ -130,36 +124,38 @@ LinkItem_FishingRod:
LDA.l $7F5BA3 : TAX
LDY.b $66
LDA.w DirSpeedsY, Y : STA.w SprYSpeed, X ; YSpeed
LDA.w DirSpeedsX, Y : STA.w SprXSpeed, X ; YSpeed
LDA.w DirSpeedsY, Y : STA.w $0D40, X ; YSpeed
LDA.w DirSpeedsX, Y : STA.w $0D50, X ; YSpeed
.BringBackFloater
LDA.b #$10 : STA.w $0F80, X ; Gravity
; =======================================================
;===========================================================
; We got something spawn it and pull it at us
LDA.w SprMiscB, X : BEQ .noPrize
JSL GetRandomInt : AND #$0F : TAY : LDA Prizes, Y : BEQ .noPrize
JSL Sprite_SpawnDynamically
JSL Sprite_SetSpawnedCoordinates
LDA.w $0DB0, X : BEQ .noPrize
JSL $0DBA71 : AND #$0F ; get random int
TAY : LDA Prizes, Y : BEQ .noPrize
LDA.w $0E20, Y : CMP.b #$D2 : BNE .notafish
LDA #$04 : STA.w SprHeight, Y
LDA #$01 : STA.w $0D80, Y
.notafish
JSL $1DF65D ; Sprite_SpawnDynamically because whatever
JSL $09AE64 ; Sprite_SetSpawnedCoords
PHX
LDX.b $66
LDA.w DirSpeedsY, X : STA.w SprYSpeed, Y ; YSpeed
LDA.w DirSpeedsX, X : STA.w SprXSpeed, Y ; YSpeed
LDA.w $0E20, Y : CMP.b #$D2 : BNE .notafish
LDA #$04 : STA.w $0F70, Y
LDA #$01 : STA.w $0D80, Y
.notafish
PLX
LDA.b #$FF : STA.w SprTimerD, Y
LDA.b #$20 : STA.w $0F80, Y ; Gravity
;LDA.b #$06 : STA.w SprHeight, Y
PHX
LDX.b $66
LDA.w DirSpeedsY, X : STA.w $0D40, Y ; YSpeed
LDA.w DirSpeedsX, X : STA.w $0D50, Y ; YSpeed
PLX
LDA.b #$FF : STA.w $0EE0, Y
LDA.b #$20 : STA.w $0F80, Y ; Gravity
;LDA.b #$06 : STA.w $0F70, Y
.noPrize
LDA.b #$02 : STA.l $7F5BA2 ; set fishing rod state to pulling back
LDA.b #$02 : STA.l $7F5BA2 ; set fishing rod state to pulling back
.exit
@@ -172,7 +168,7 @@ EndFishing:
LDA #$00
STA.l $7F5BA2
LDA.l $7F5BA3 : TAX
STZ.w SprState, X
STZ.w $0DD0, X
STZ.b $5E
STZ.w $0300
STZ.b $3D
@@ -198,7 +194,7 @@ Prizes:
db $D8, $D2, $D2, $D2, $D9, $DA, $DB, $DC, $DF, $E0, $E1, $D9, $D9, $DA, $D9, $DA
;assert pc() <= $07A64A
;warnpc $07A64A
fishingrodgfx:
@@ -215,35 +211,42 @@ hammergfx:
CheckYButtonPress:
{
BIT.b $3A : BVS .fail
LDA.b $46 : BNE .fail
LDA.b $F4 : AND.b #$40 : BEQ .fail
TSB.b $3A
BIT.b $3A : BVS .fail
LDA.b $46 : BNE .fail
LDA.b $F4 : AND.b #$40 : BEQ .fail
TSB.b $3A
SEC
RTS
.fail
CLC
RTS
CLC
RTS
}
HaltLinkWhenUsingItems:
AltLinkUsingItem:
{
LDA.b $AD : CMP.b #$02 : BNE .skip
LDA.b $AD : CMP.b #$02 : BNE .skip
LDA.w $0322 : AND.b #$03 : CMP.b #$03 : BNE .skip
STZ.b $30
STZ.b $31
STZ.b $67
STZ.b $2A
STZ.b $2B
STZ.b $6B
STZ.b $30
STZ.b $31
STZ.b $67
STZ.b $2A
STZ.b $2B
STZ.b $6B
.skip
LDA.w $02F5 : BEQ .return
LDA.w $02F5 : BEQ .return
STZ.b $67
.return
RTS
RTS
}
FishingSwapCaneBlockHammerGfx:
@@ -285,178 +288,210 @@ RestoreCaneBlockHammerGfx:
RTL
}
FloaterBoySpriteCheck:
{
LDA.w $0E70, X : BEQ .noThatsRunningBoy
PHB : PHK : PLB
JSR Sprite_Floater
PLB
RTL
.noThatsRunningBoy
JSL $05E8A2 ; Sprite_74_RunningBoy
RTL
}
Sprite_CheckIfActive:
{
LDA.w SprFreeze ; Remove that if want to be able to pause all other sprites
BNE .inactive
LDA.w $0FC1 ; Remove that if want to be able to pause all other sprites
BNE .inactive
LDA.b $11
BNE .inactive
LDA.b $11
BNE .inactive
LDA.w SprDefl, X
BMI .active
LDA.w $0CAA,X
BMI .active
LDA.w $0F00, X
BEQ .active
LDA.w $0F00,X
BEQ .active
.inactive
PLA
PLA
PLA
PLA
.active
RTS
RTS
}
; =========================================================
; Floater sprite code
;======================================================================
;Floater sprite code
SpritePrep_Floater:
{
LDA.b $66 : CMP.b #$03 : BNE .notRight
LDA.b #$12 : STA.w SprXSpeed, X ; XSpeed
LDA.b $66 : CMP.b #$03 : BNE .notRight
LDA.b #$12 : STA.w $0D50, X ; XSpeed
BRA .DoInitFloater
.notRight
CMP.b #$02 : BNE .notLeft
LDA.b #$ED : STA.w SprXSpeed, X ; XSpeed
.notRight
CMP.b #$02 : BNE .notLeft
LDA.b #$ED : STA.w $0D50, X ; XSpeed
BRA .DoInitFloater
.notLeft
CMP.b #$01 : BNE .notDown
LDA.b #$12 : STA.w SprYSpeed, X ; YSpeed
.notLeft
CMP.b #$01 : BNE .notDown
LDA.b #$12 : STA.w $0D40, X ; YSpeed
BRA .DoInitFloater
.notDown
CMP.b #$00 : BNE .notUp
LDA.b #$ED : STA.w SprYSpeed, X ; YSpeed
.notDown
CMP.b #$00 : BNE .notUp
LDA.b #$ED : STA.w $0D40, X ; YSpeed
BRA .DoInitFloater
.notUp
.notUp
.DoInitFloater
LDA.b #$08 : STA.w SprHeight, X ; Height
LDA.b #$10 : STA.w $0F80, X ; Gravity
LDA.b #$00 : STA.w SprMiscG, X ; is it in water?
LDA.b #$00 : STA.w SprMiscE, X ; Wiggling Velocity index
LDA.b #$00 : STA.w SprMiscD, X ; just for a check
LDA.b #$00 : STA.w SprMiscB, X ; if we have a fish on line
LDA.b #$08 : STA.w $0F70, X ; Height
LDA.b #$10 : STA.w $0F80, X ; Gravity
LDA.b #$00 : STA.w $0ED0, X ; is it in water?
LDA.b #$00 : STA.w $0EB0, X ; Wiggling Velocity index
LDA.b #$00 : STA.w $0E90, X ; just for a check
LDA.b #$00 : STA.w $0DB0, X ; if we have a fish on line
;SprTimerD Timer for when floater is in water waiting for a fish to catch
;$0EE0 Timer for when floater is in water waiting for a fish to catch
RTL
RTL
}
; ---------------------------------------------------------
;---------------------------------------------------------------------
Sprite_Floater:
{
; Floater Draw, allocate 4 tiles to use for the hud
LDA.w SprMiscG, X : BEQ +
JSL Sprite_DrawWaterRipple
LDA $0ED0, X : BEQ +
JSL $059FFA ; draw water ripple
+
JSR Sprite_Floater_Draw
LDA.w SprMiscG, X : BNE +
JSL Sprite_DrawShadow
LDA $0ED0, X : BNE +
JSL $06DC54 ; shadow
+
JSR Sprite_CheckIfActive
LDA.w SprMiscG, X : BEQ .noFishOnLine ; is the floater in water?
LDA.w SprTimerD, X : BNE .noWigglingYet ; timerD wait until fish is on line
LDA.w SprMiscB, X : BNE .fishOnlineWait
; start another random timer for the time it'll last
JSL GetRandomInt : AND #$3F
CLC : ADC.b #$0F : STA.w SprTimerA, X ; wiggling timer
INC.w SprMiscB, X ; we have a fish on line
.noWigglingYet
LDA.w SprMiscB, X : BEQ .noFishOnLine ; do we already have a fish on line?
.fishOnlineWait
LDA.w SprTimerA, X : BNE .still_wiggling
STZ.w SprMiscB, X ; no more fish on line took too much time
JSL GetRandomInt : AND.b #$7F
CLC : ADC.b #$7F : STA.w SprTimerD, X ; reset timer wait until fish is on line
STZ.w SprXSpeed, X
STZ.w SprYSpeed, X
BRA .noFishOnLine
.still_wiggling
LDA.w $0ED0, X : BEQ .noFishOnLine ; is the floater in water?
LDA.w $0EE0, X : BNE .noWigglingYet; timerD wait until fish is on line
LDA.w $0DB0, X : BNE .fishOnlineWait
; start another random timer for the time it'll last
JSL $0DBA71 : AND #$3F ; GetRandomInt
CLC : ADC.b #$0F : STA.w $0DF0, X ; wiggling timer
INC.w $0DB0, X ; we have a fish on line
.noWigglingYet
LDA.w $0DB0, X : BEQ .noFishOnLine ; do we already have a fish on line?
.fishOnlineWait
LDA.w $0DF0, X : BNE .stillwiggling
STZ.w $0DB0, X ; no more fish on line took too much time
JSL $0DBA71 : AND.b #$7F ; GetRandomInt
CLC : ADC.b #$7F : STA.w $0EE0, X ; reset timer wait until fish is on line
STZ.w $0D50, X
STZ.w $0D40, X
BRA .noFishOnLine
.stillwiggling
LDY.w $0E10, X
LDA.w WigglingTable, Y : STA.w $0D50,X
LDA.w WigglingTable, Y : STA.w $0D40,X
LDY.w $0E10, X : BNE + ; use timer to do wiggling
; if = 0 then put it back to F
LDA.b #$0F : STA.w $0E10, X ; wiggling timer
+
LDY.w SprTimerC, X
LDA.w WigglingTable, Y : STA.w SprXSpeed, X
LDA.w WigglingTable, Y : STA.w SprYSpeed, X
LDY.w SprTimerC, X : BNE + ; use timer to do wiggling
; if = 0 then put it back to F
LDA.b #$0F : STA.w SprTimerC, X ; wiggling timer
+
.noFishOnLine
JSL Sprite_MoveLong
JSL $1D808C ; Sprite_Move_XY
JSL Sprite_MoveAltitude
LDA.w $0F80, X : SEC : SBC.b #$01 : STA.w $0F80, X
LDA.w $0F80,X
SEC
SBC.b #$01
STA.w $0F80,X
LDA.w SprHeight, X : BPL .aloft
LDA.w $0F70,X
BPL .aloft
STZ.w SprHeight, X
STZ.w $0F70,X
LDA.w SprXSpeed, X : ASL A : ROR.w SprXSpeed, X
LDA.w $0D50,X
ASL A
ROR.w $0D50,X
LDA.w SprYSpeed, X : ASL A : ROR.w SprYSpeed, X
LDA.w $0D40,X
ASL A
ROR.w $0D40,X
LDA.w $0F80, X : EOR.b #$FF : INC A
LDA.w $0F80,X
EOR.b #$FF
INC A
LSR A
CMP.b #$09
BCS .no_bounce
LDA.w SprMiscD, X : BNE .not_water_tile_last
INC.w SprMiscD, X
JSL Sprite_CheckTileCollision
LDA.w $0FA5
CMP.b #$08 : BEQ .water_tile_last
CMP.b #$09 : BNE .not_water_tile_last
.water_tile_last
INC.w SprMiscG, X ; Set that so we know floater is in water!
JSL Sprite_SpawnSmallSplash
JSL GetRandomInt : AND #$3F
CLC : ADC #$3F : STA.w SprTimerD, X
.not_water_tile_last
STZ.w $0F80, X
STZ.w SprXSpeed, X
STZ.w SprYSpeed, X
LDA.w $0E90, X : BNE .not_water_tileLast
INC.w $0E90, X
JSL $06E496 ; Sprite_CheckTileCollision
LDA.w $0FA5
CMP.b #$08 ; TILETYPE 08
BEQ .water_tileLast
CMP.b #$09 ; TILETYPE 09
BNE .not_water_tileLast
.water_tileLast
INC.w $0ED0, X ; Set that so we know floater is in water!
JSL $1EA820 ; Sprite_SpawnSmallSplash
JSL $0DBA71 : AND #$3F ; GetRandomInt
CLC : ADC #$3F : STA.w $0EE0, X
.not_water_tileLast
STZ.w $0F80,X
STZ.w $0D50,X
STZ.w $0D40,X
BRA .aloft
.no_bounce
STA.w $0F80, X
STA.w $0F80,X
JSL Sprite_CheckTileCollision
JSL $06E496 ; Sprite_CheckTileCollision
LDA.w $0FA5
CMP.b #$08 : BEQ .water_tile
CMP.b #$09 : BNE .not_water_tile
CMP.b #$08 ; TILETYPE 08
BEQ .water_tile
CMP.b #$09 ; TILETYPE 09
BNE .not_water_tile
.water_tile
;STZ.w $0F80, X
;STZ.w $0F80,X
JSL Sprite_SpawnSmallSplash
JSL $1EA820 ; Sprite_SpawnSmallSplash
.not_water_tile
.aloft
LDA.b #$01 : STA.w SprCollision, X ; restore floater sprite seems to be overwriten
LDA.b #$01 : STA.w $0E70, X ; restore floater sprite seems to be overwriten
RTS
}
@@ -491,28 +526,6 @@ Sprite_Floater_Draw:
WigglingTable:
db 08, -10, 06, -8, 12, -14, 18, -20
db 10, -12, 04, -6, 08,-10, 14,-16, 08
db -10, 06, -8, 12, -14, 18, -20, 10
db -12, 04, -6, 08,-10, 14,-16
db 08, -10, 06, -8, 12, -14, 18, -20, 10, -12, 04, -6, 08,-10, 14,-16, 08, -10, 06, -8, 12, -14, 18, -20, 10, -12, 04, -6, 08,-10, 14,-16
DismissRodFromMenu:
{
STZ.w $0300
STZ.b $3D
LDA #$00
STA.l $7F5BA2
LDA.l $7F5BA3 : TAX
STZ.w SprState, X
STZ.b $5E
STZ.w $0300
STZ.b $3D
STZ.w $0350
STZ.w $037A
LDA.b $3A
AND.b #$BF
STA.b $3A
RTL
}
print "End of Items/fishing_rod.asm ", pc
print "End of Items/fishing_rod.asm ", pc

View File

@@ -1,96 +0,0 @@
lorom
pushpc
org $028925
NOP
NOP
org $06EB90
NOP
NOP
org $06ED6A
JSL FistBump ; $1BB4D0
org $06F2D6
db $80, $05 ; BRA 05 ??
JSL FistBump2 ; $1BB572
RTS
org $06F3C7
JMP $F2D8
org $06F6C4
JSL FistBump3 ; $1BB380
NOP
org $0781CD
NOP
NOP
org $079E67
NOP #$04
CMP #$FF
org $09F608
NOP
NOP
pullpc
FistBump3: ; Good ; $1BB380
ORA #$05
STA $012E ; play sound effect
PHA
AND #$05 : CMP #$05 : BEQ .branchA
PLA
RTL
.branchA
LDA.w $037A : CMP #$10 : BEQ .branchB
PLA
RTL
.branchB
STZ.w $037A
PLA
RTL
FistBump: ; $1BB4D0
JMP FistBump4
FistBump5:
CPX #$FE : BEQ .branchC
CPX #$FF : BEQ .branchC
LDA.l $06ED33, X
BRA .branchD
.branchC
LDA.b #$00
.branchD
RTL
FistBump4: ;$1BB4F0
LDA $037A
CMP #$10 : BNE .branchE
JMP FistBump5_branchC
.branchE
JMP FistBump5
FistBump2:; $1BB572
BCC .branchF
LDA $037A
AND #$10 : BNE +
.branchF
LDA.b #$00
+
RTL

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,10 @@
;===========================================================
; Ice Rod freezes water
; Written by Conn
;
;===========================================================
IceRodTileRam = $03EF
; Ancilla_CheckTileCollision_Targeted_continue
@@ -10,82 +12,87 @@ org $088A5D
JSL $0EFBA0
org $0EFBA0 ; main code
LinkItem_IceRod:
LinkItem_IceRod:
{
; load native value
STA $03E4, X : TAY
; check if you're on overworld
; check if you're on overworld
LDA $008C : BNE $01
RTL
RTL
; disable other flying object icing water (boomerang, sword beam)
LDA $03A3 : CMP #$06 : BEQ $01
RTL
; disable other flying object icing water (boomerang, sword beam)
LDA $03A3 : CMP #$06 : BEQ $01
RTL
; check if ice shot #1 only is used (disable 2nd shot to ice)
CPX #$04 : BEQ $01
RTL
; check if ice shot #1 only is used (disable 2nd shot to ice)
CPX #$04 : BEQ $01
RTL
; check if ice shot is on water tiles
; check if ice shot is on water tiles
LDA $03E8 : CMP #$08 : BEQ .on_water_tiles
; check if ice shot is on native unused, edited blocks
LDA $03E8 : CMP #$03 : BEQ $01
RTL
.on_water_tiles
; check if ice shot is on native unused, edited blocks
LDA $03E8 : CMP #$03 : BEQ $01
RTL
.on_water_tiles
; double check if really ice shot is used
LDA $0303 : CMP #$06 : BEQ $01
RTL
LDA $0303 : CMP #$06 : BEQ $01
RTL
LDA $0304 : CMP #$06 : BEQ $01
RTL
TXA
LDA $0304 : CMP #$06 : BEQ $01
RTL
TXA
STA $7ED004 ; store native x value into ram to regain after code
; wait for vblank to enable dma transfer
LDA $4212 : AND #$80 : BEQ $F9
; wait for vblank to enable dma transfer
LDA $4212 : AND #$80 : BEQ $F9
REP #$30
LDA $2116 : STA $7ED005 ; store native value to regain later
REP #$30
LDA $2116 : STA $7ED005 ; store native value to regain later
; calculation procedure to get correct x,y coordinates for new tile
LDA $00 : SEC : SBC $0708 : AND $070A
ASL A : ASL A : ASL A : STA $06
LDA $02 : SEC : SBC $070C : AND $070E : ORA $06
TAX
LDA $00 : SEC : SBC $0708 : AND $070A
ASL A
ASL A
ASL A
STA $06
LDA $02 : SEC : SBC $070C : AND $070E : ORA $06
TAX
LDA #$00B7 : STA $7E2000, X ; store new 16x16 ice tile into ram (property of tile!)
CLC : STZ $02 ; calculation procedure to get 8x8 vram map address (look of tile)
TXA
AND #$003F : CMP #$0020 : BCC $05
LDA #$0400 : STA $02
TXA
AND #$0FFF : CMP #$0800 : BCC $07
LDA $02 : ADC #$07FF : STA $02
TXA
AND #$001F : ADC $02 : STA $02
TXA : AND #$0780 : LSR A : ADC $02
TXA
AND #$003F : CMP #$0020 : BCC $05
LDA #$0400 : STA $02
TXA
AND #$0FFF : CMP #$0800 : BCC $07
LDA $02 : ADC #$07FF : STA $02
TXA
AND #$001F : ADC $02 : STA $02
TXA
AND #$0780
LSR A
ADC $02
STA $2116 ; store vram address for upper tile part (8x16) to $2116
STA $7ED007
; Palette set here
LDA #$1D83 ; load new ice tiles
STA $7ED000
STA $7ED002
JSR $FD00 ; jsr to dma vram transfer for upper ice tile part
REP #$30
REP #$30
LDA $7ED007 ; regain vram address
ADC #$0020 ; add 20 for lower part (8x16) and store to $2116
STA $2116
STA $2116
JSR $FD00 ; jsr to dma vram transfer for lower ice tile part
LDA $7ED005 ; regain native register value
STA $2116
SEP #$30
SEP #$30
LDA $7ED004 ; regain native x-value
TAX
RTL
TAX
RTL
}
@@ -93,50 +100,52 @@ org $0EFD00 ; vram dma transfer
VramDmaTransfer:
{
LDA #$007E ; load origin of bytes to transfer (7E/d000)
STA $4304
LDA #$D000 : STA $4302
SEP #$30
STA $4304
LDA #$D000
STA $4302
SEP #$30
LDA #$18 ; bus
STA $4301
LDA #$04 ; transfer 4 bytes
STA $4305
LDA #$01 : STA $4300
STA $4301
LDA #$04 ; transfer 4 bytes
STA $4305
LDA #$01
STA $4300
STA $420B ; make dma transfer
RTS
RTS
}
; bug fix to not swim through tiles but jump onto them
; TileBehavior_GanonIce
org $07DC9E
JSL $0EFC80
NOP
nop
org $0EFC80
LDA $0A
TSB $0343
TSB $0348
RTL
LDA $0A
TSB $0343
TSB $0348
RTL
; bug fix to stop gliding on shallow water when leaving ice tile
org $07DD1B
; bug fix to stop gliding on shallow water when leaving ice tile
org $07DD1B
JSL $0EFC90
RTS
org $0EFC90
LDA $0A
TSB $0359
LDA $0350
CMP #$0100
BNE $03
STZ $034A
RTL
LDA $0A
TSB $0359
LDA $0350
CMP #$0100
BNE $03
STZ $034A
RTL
org $0E95DC ; get a 0e written here (first byte) to enable gliding on new tiles
ASL $5757
org $0F85B8 ; get new tile values (83 1d) written 4 times here
STA $1D, S
STA $1D, S
STA $1D, S
STA $1D, S
STA $1D,s
STA $1D,s
STA $1D,s
STA $1D,s

View File

@@ -1,92 +1,67 @@
; =========================================================
; Zarby Feather
; =============================================================================
; Zarby Feather
org $07AFF8 ; LinkItem_BugCatchingNet
{
BIT $3A : BVS .return ;if Y or B are already pressed
LDA $6C : BNE .return ; if we are standing in a dooray or not
; Link_CheckNewY_ButtonPress
JSR $B073 : BCC .return ; Check if we just pressed Y Button
JSL LinkItem_JumpFeather
.return
LDA $6C : BNE .return ; if we are standing in a dooray or not
; Link_CheckNewY_ButtonPress
JSR $B073 : BCC .return ; Check if we just pressed Y Button
JSL NewBookCode
.return
RTS
}
; =========================================================
; Prevent Link from taking damage while jumping spikes
; The game originally differentiates between your armor
; for the damage take, however the table has all the same
; values, so it's effectively useless.
; =============================================================================
; TileDetect_MainHandler_no_moon_pearl
; org $07D23D
org $07D242
JSL CheckIfJumpingForSpikeDamage
NOP #2
assert pc() <= $07D248
; =========================================================
pullpc
LinkItem_JumpFeather:
org $2B8000
NewBookCode:
{
JSL Link_ResetSwimmingState
LDA $46 : BNE .cant_use_it
LDA #$02 : STA $5D ; set link state recoil
LDA #$02 : STA $4D ; set jumping state (ledge hop)
LDA #$20 : STA $46 ; length of the jump
LDA #$24 ; Height of the jump
JSL $07983A ; Reset swim state
LDA $46 : BNE .cantuseit
LDA #$02 : STA $5D ; state recoil
LDA #$01 : STA $4D ; state recoil 2
; Set vertical resistance
STA $29
STA $02C7
; Length of the jump
LDA #$20
; Set Links direction to right(?)
LDA #$08 : STA $0340 : STA $67
STA $46
; Reset Link movement offsets
STZ $31 : STZ $30
; Height of the jump
LDA #$24
LDA $F4 : AND #$08 : BEQ .no_up
LDA #-8
; Set vertical resistance
STA $29
STA $02C7
; Set Links direction to right(?)
LDA #$08 : STA $0340 : STA $67
; Reset Link movement offsets
STZ $31
STZ $30
LDA $F4 : AND #$08 : BEQ .noUp
LDA #-8 ; Change that -8 if you want higher speed moving up
STA $27 ; Vertical recoil
.no_up
LDA $F4 : AND #$04 : BEQ .no_down
LDA #8
.noUp
LDA $F4 : AND #$04 : BEQ .noDown
LDA #8 ; Change that -8 if you want higher speed moving down
STA $27
.no_down
LDA $F4 : AND #$02 : BEQ .no_left
LDA #-8
.noDown
LDA $F4 : AND #$02 : BEQ .noLeft
LDA #-8 ; Change that -8 if you want higher speed moving left
STA $28 ; Horizontal recoil
.no_left
LDA $F4 : AND #$01 : BEQ .no_right
LDA #8
.noLeft
LDA $F4 : AND #$01 : BEQ .noRight
LDA #8 ; Change that 8 if you want higher speed moving right
STA $28
.no_right
.cant_use_it
.noRight
.cantuseit
RTL
}
; =========================================================
; Y contains our armor value
; Currently requires a very close jump and will still
; damage the player midair if you jump from too far away.
CheckIfJumpingForSpikeDamage:
{
PHB : PHK : PLB
; Check Z pos of Link
LDA $5D : CMP.b #$02 : BEQ .airborne
LDA.w .spike_floor_damage, Y : STA.w $0373
.airborne
PLB
RTL
.spike_floor_damage
db $08 ; green
db $08 ; blue
db $04 ; red
}
print "End of Items/jump_feather.asm ", pc
pushpc
pushpc

View File

@@ -1,161 +0,0 @@
; =========================================================
; Magic Rings
; ..pa slbh
; p - power
; a - armor
; s - steadfast
; l - light
; b - blast
; h - heart
FOUNDRINGS = $7EF3D7
MAGICRINGS = $7EF3D8
RingSlot1 = $7EF38C
RingSlot2 = $7EF38D
RingSlot3 = $7EF38E
RingSlotsNum = $7EF38F
DamageSubclassValue = $0DB8F1
pushpc
; Sprite_ApplyCalculatedDamage
org $06EDC0
JSL MagicRing_CheckForPower
pullpc
; Power - Attack Up, Defense Down
MagicRing_CheckForPower:
{
LDA.l RingSlot1 : AND.b #$20 : BEQ +
LDA.l RingSlot2 : AND.b #$20 : BEQ +
LDA.l RingSlot3 : AND.b #$20 : BEQ +
LDA.w $0CF2 : CMP.b #$04 : BCS .not_sword
CMP.b #$01 : BCC .not_sword
LDA.l DamageSubclassValue, X
CLC : ADC.b #$10
RTL
.not_sword
+
LDA.l DamageSubclassValue, X
RTL
}
pushpc
; Sprite_AttemptDamageToLinkPlusRecoil
org $06F400
JSL MagicRing_CheckForArmor
pullpc
; $0373 - Damage queue for Link
Sprite_BumpDamageGroups = $06F427
; Armor - Defense Up, Attack Down
MagicRing_CheckForArmor:
{
LDA.w Sprite_BumpDamageGroups, Y : STA.w $0373
LDA.l RingSlot1 : AND.b #$10 : BEQ +
LDA.l RingSlot2 : AND.b #$10 : BEQ +
LDA.l RingSlot3 : AND.b #$10 : BEQ +
; Reduce the damage queue by half
LDA $0373 : BEQ +
LSR : STA $0373
+
RTL
}
; =========================================================
; Steadfast - Less knockback
MagicRing_CheckForSteadfast:
{
LDA.l RingSlot1 : AND.b #$07 : BEQ +
LDA.l RingSlot2 : AND.b #$07 : BEQ +
LDA.l RingSlot3 : AND.b #$07 : BEQ +
STZ.b LinkRecoilX
STZ.b LinkRecoilY
+
#_07E1BE: STZ.b $67
#_07E1C0: LDY.b #$08
RTL
}
pushpc
org $07E1BE
JSL MagicRing_CheckForSteadfast
pullpc
; =========================================================
; Light - Sword beam at -2 hearts
MagicRing_CheckForLight:
{
PHA
LDA.l RingSlot1 : AND.b #$05 : BEQ +
LDA.l RingSlot2 : AND.b #$05 : BEQ +
LDA.l RingSlot3 : AND.b #$05 : BEQ +
PLA
SEC
SBC.b #$10
CMP.l $7EF36D
RTL
+
PLA
CMP.l $7EF36D
RTL
}
pushpc
org $079C77
JSL MagicRing_CheckForLight
pullpc
; =========================================================
; Blast - Bomb Damage up
MagicRing_CheckForBlast:
{
CPX #$07 : BNE +
LDA.l RingSlot1 : AND.b #$06 : BEQ +
LDA.l RingSlot2 : AND.b #$06 : BEQ +
LDA.l RingSlot3 : AND.b #$06 : BEQ +
LDA.b #$0D
RTL
+
LDA.l AncillaDamageClasses, X
RTL
}
AncillaDamageClasses = $06EC7E
pushpc
org $06ECBF
JSL MagicRing_CheckForBlast
pullpc
; =========================================================
; Heart - Slowly regenerate hearts
MagicRings_CheckForHeart:
{
LDA.l RingSlot1 : AND.b #$04 : BEQ ++
LDA.l RingSlot2 : AND.b #$04 : BEQ ++
LDA.l RingSlot3 : AND.b #$04 : BEQ ++
LDA.l CURHP : CMP.l MAXHP : BCS ++
LDA.l FrameCounter : LSR #2 : AND.b #$3F : BEQ +
JMP ++
+
LDA.l CURHP : CLC : ADC.b #$01 : STA.l CURHP
++
LDA.b $F5
AND.b #$80
RTL
}
pushpc
org $07810C
JSL MagicRings_CheckForHeart
pullpc

View File

@@ -1,124 +1,103 @@
; =========================================================
; Ocarina Multiple Song Select
;
; $030F - Current Song RAM
; 00 - No Song
; 01 - Song of Storms
; 02 - Song of Healing
; 03 - Song of Soaring
; 04 - Song of Time
; =========================================================
org $0994FE
AddTravelBird:
org $098D11
AddWeathervaneExplosion:
org $078021
Player_DoSfx1:
; =========================================================
; Song of Healing
; SFX2_Accomp
; SFX2 13 (Previous $3E)
org $1A8C60 : db $00
org $1A8C60
db $00
; SFX2_13
org $1A9750
Song_of_Healing:
{
%SetInstrument($0D) ; Ocarina
db $2A ; length of quarter note
db $E0, $0D
db $2A ; change this to change length of quarter note
db $46
db B3, A3, F3
db B3, A3, F3
db B3, A3
db $A3, $A1, $9D
db $A3, $A1, $9D
db $A3, $A1
db $15 ; make this half of whatever you made quarter note
db E3, D3
db $9C, $9A
db $7F ; make this triple whatever you made quarter note (max value 7F)
db E3
db End
db $9C
db $00
}
assert pc() <= $1A9765
; =========================================================
; D F D - D F D - E F E - F E C
; D F d D F d e f e f e c
; SFX2_12
; org $1A977D
!Storms_Duration = $0F
!Storms_Params = $46
!Storms_Duration2 = $1E
!Storms_Params2 = $3C
; SFX1_18
; org $1A92F7
org $1A92F7 ; SFX2_2F
Song_of_Storms:
{
!Storms_Duration = $0F
!Storms_Params = $46
!Storms_Duration2 = $1E
!Storms_Params2 = $3C
%SetInstrument($0D)
db $E0, $0D ; set sfx instrument - twee
db !Storms_Duration
db !Storms_Params ; duration 1/4
db D3, F3
db $9A ; play note D3
db $9D ; play note F3
db !Storms_Duration2
db !Storms_Params ; duration 1/2
db D3
db $9A ; play note D3
db !Storms_Duration
db !Storms_Params ; duration 1/4
db D3, F3
db $9A ; play note D3
db $9D ; play note F3
db !Storms_Duration2
db !Storms_Params ; duration 1/2
db D3
db $9A ; play note D3
db !Storms_Duration
db !Storms_Params2 ; duration 1/4
db E3, F3, E3
db $9C ; play note E3
db $9D ; play note F3
db $9C ; play note E3
db F3, E3
db $9D ; play note F3
db $9C ; play note E3
db !Storms_Duration2
db !Storms_Params2 ; duration 1/2
db C3
db End
db $98 ; play note C3
db $00 ; end sfx
}
assert pc() <= $1A931F
; warnpc $1A8FD4
; =========================================================
; A, D, F, A, D, F
; SFX3_27 Agahnim charge
; 0x003B
org $1A91F0
Song_of_Time:
{
!Time4th = $2A
!TimeParams = $46
%SetInstrument($0D)
db !Time4th ; duration 1/4
db !TimeParams ; params
db A3
db $54 ; duration 1/2
db !TimeParams ; params
db D3
db !Time4th ; duration 1/4
db !TimeParams ; params
db F3
db A3
db $54 ; duration 1/2
db !TimeParams ; params
db D3
db !Time4th ; duration 1/4
db !TimeParams ; params
db F3
db End
}
assert pc() <= $1A922B
; =========================================================
AddTravelBird = $0994FE
AddWeathervaneExplosion = $098D11
Player_DoSfx1 = $078021
org $07A3DB
LinkItem_FluteHook:
{
JSR LinkItem_NewFlute
RTS
}
; =========================================================
; Free Space Bank07
pullpc
@@ -131,168 +110,168 @@ LinkItem_NewFlute:
{
; Code for the flute item (with or without the bird activated)
BIT.b $3A : BVC .y_button_not_held
DEC.w $03F0 : LDA.w $03F0 : BNE ReturnFromFluteHook
LDA.b $3A : AND.b #$BF : STA.b $3A
.y_button_not_held
DEC.w $03F0 : LDA.w $03F0 : BNE ReturnFromFluteHook
LDA.b $3A : AND.b #$BF : STA.b $3A
; Check for Switch Swong
.y_button_not_held
; Check for Switch Swong
JSR UpdateFluteSong
JSR Link_CheckNewY_ButtonPress : BCC ReturnFromFluteHook
; Success... play the flute.
LDA.b #$80 : STA.w $03F0
; Success... play the flute.
LDA.b #$80 : STA.w $03F0
LDA $030F
CMP.b #$01 : BEQ .song_of_soaring
CMP.b #$02 : BEQ .song_of_healing
CMP.b #$03 : BEQ .song_of_storms
LDA.w $030F : CMP.b #$01 : BEQ .song_of_storms
CMP.b #$02 : BEQ .song_of_healing
CMP.b #$03 : BEQ .song_of_soaring
CMP.b #$04 : BEQ .song_of_time
JMP .song_of_storms
.song_of_time
LDA.b #$27 : JSR $802F ; Player_DoSfx3
LDA.b #$02 : STA.b SongFlag
RTS
.song_of_healing
LDA.b #$13 : JSR Player_DoSfx2
LDA.b #$01 : STA $FE
RTS
.song_of_healing
LDA.b #$13 : JSR Player_DoSfx2
LDA.b #$01 : STA.b SongFlag
RTS
.song_of_storms
; Play the Song of Storms SFX
; LDA.b #$18 : JSR Player_DoSfx1
LDA.b #$2F : JSR Player_DoSfx2
JSL OcarinaEffect_SummonStorms
RTS
.song_of_storms
; Play the Song of Storms SFX
LDA.b #$2F : JSR Player_DoSfx2
LDA.b #$03 : STA.b SongFlag
JSL OcarinaEffect_SummonStorms
RTS
.song_of_soaring
.song_of_soaring
LDA.b #$3E : JSR Player_DoSfx2
; Are we indoors?
LDA.b $1B : BNE .return
; Are we in the dark world? Then become Moosh form.
LDA.b $8A : AND #$40 : BEQ .light_world
JSL Link_TransformMoosh
RTS
.light_world
; Are we in the dark world? The flute doesn't work there.
LDA.b $8A : AND.b #$40 : BNE .return
; Also doesn't work in special areas like Master Sword area.
LDA.b $10 : CMP.b #$0B : BEQ .return
LDX.b #$04
.next_ancillary_slot
.next_ancillary_slot
; Is there already a travel bird effect in this slot?
LDA $0C4A, X : CMP.b #$27 : BEQ .return
; If there isn't one, keep checking.
DEX : BPL .next_ancillary_slot
; Paul's weathervane stuff Do we have a normal flute (without bird)?
LDA $7EF34C : CMP.b #$02 : BNE .travel_bird_already_released
REP #$20
; check the area, is it #$18 = 30?
LDA $8A : CMP.w #$0018 : BNE .not_weathervane_trigger
; Y coordinate boundaries for setting it off.
LDA $20
CMP.w #$0760 : BCC .not_weathervane_trigger
CMP.w #$07E0 : BCS .not_weathervane_trigger
REP #$20
; do if( (Ycoord >= 0x0760) && (Ycoord < 0x07e0
LDA $22
CMP.w #$01CF : BCC .not_weathervane_trigger
CMP.w #$0230 : BCS .not_weathervane_trigger
; check the area, is it #$18 = 30?
LDA $8A : CMP.w #$0018 : BNE .not_weathervane_trigger
; Y coordinate boundaries for setting it off.
LDA $20
CMP.w #$0760 : BCC .not_weathervane_trigger
CMP.w #$07E0 : BCS .not_weathervane_trigger
; do if( (Ycoord >= 0x0760) && (Ycoord < 0x07e0
LDA $22
CMP.w #$01CF : BCC .not_weathervane_trigger
CMP.w #$0230 : BCS .not_weathervane_trigger
; do if( (Xcoord >= 0x1cf) && (Xcoord < 0x0230)
SEP #$20
; Apparently a special Overworld mode for doing this?
LDA.b #$2D : STA $11
; Trigger the sequence to start the weathervane explosion.
LDY.b #$00
LDA.b #$37
JSL AddWeathervaneExplosion
; do if( (Xcoord >= 0x1cf) && (Xcoord < 0x0230)
SEP #$20
; Apparently a special Overworld mode for doing this?
LDA.b #$2D : STA $11
.not_weathervane_trigger
; Trigger the sequence to start the weathervane explosion.
LDY.b #$00
LDA.b #$37
JSL AddWeathervaneExplosion
.not_weathervane_trigger
SEP #$20
BRA .return
.travel_bird_already_released
SEP #$20
BRA .return
.travel_bird_already_released
LDY.b #$04
LDA.b #$27
JSL AddTravelBird
STZ $03F8
.return
.return
RTS
}
; =========================================================
; $030F - Current Song RAM
; 00 - No Song
; 01 - Song of Healing
; 02 - Song of Soaring
; 03 - Song of Storms
UpdateFluteSong:
JSL UpdateFluteSong_Long
{
LDA $030F : BNE .songExists
LDA #$01 : STA $030F ; if this code is running, we have the flute song 1
.songExists
LDA.b $F6
BIT.b #$20 : BNE .left
BIT.b #$10 : BNE .right
RTS
Link_HandleCardinalCollision_Long:
{
PHB : PHK : PLB
JSR $B7C7
PLB
RTL
.left
; LDA.b #$13 : JSR Player_DoSfx2
DEC $030F
LDA $030F
BNE .notPressed
LDA #$03
STA $030F
JMP .notPressed
.right
; R Button Pressed - Increment song
INC $030F ; increment $030F Song RAM
LDA $030F ; load incremented Song RAM
CMP.b #$04 ; compare with 3
BCC .notPressed ; if less than 3, branch to .notFlute
LDA #$01 ; load value 1
STA $030F ; set Song RAM to 1
.notPressed
RTS
}
pushpc
print "Bank07 Free Space: ", pc
; ZS OW
; Load the rain overlay by default for the song of storms
org $02B011
LDX #$009F
org $2B8000
org $3C8000
OcarinaEffect_SummonStorms:
{
; Dismiss the rain in the Zora area where it is already raining
LDA.w $8A : CMP.b #$00 : BEQ .check_for_magic_bean
CMP.b #$2E : BEQ .dismiss_storms
CMP.b #$2F : BEQ .dismiss_storms
; Check for areas which should not be allowed to have rain
CMP.b #$05 : BEQ .error_beep
CMP.b #$06 : BEQ .error_beep
CMP.b #$07 : BEQ .error_beep
CMP.b #$10 : BEQ .error_beep
CMP.b #$18 : BEQ .error_beep
CMP.b #$28 : BEQ .error_beep
CMP.b #$29 : BEQ .error_beep
.summon_or_dismiss
; If the rain is already summoned, dismiss it
LDA.l $7EE00E : BEQ .summon_storms
.dismiss_storms
LDA #$FF : STA $8C
LDA #$00 : STA $7EE00E
STZ $1D
STZ $9A
RTL
.summon_storms
LDA #$9F : STA $8C
LDA.b #$01 : STA.b $1D
LDA.b #$72 : STA.b $9A
LDA #$01 : STA $7EE00E
RTL
.error_beep
LDA.b #$3C : STA.w $012E ; Error beep
LDA.l $7EE00E : BEQ .summonStorms
LDA #$FF : STA $8C
LDA #$00 : STA $7EE00E
STZ $1D
STZ $9A
RTL
.check_for_magic_bean
LDA.b #Sprite_BeanVendor : LDX.b #$00
JSL Sprite_CheckForPresence : BCC .not_active
; Check that it's the magic bean planted
LDA.l MagicBeanProg : AND.b #$01 : BEQ +
AND.b #$04 : BNE +
LDA.l MagicBeanProg
ORA.b #$04
STA.l MagicBeanProg
LDA.b #$2D : STA.w $012F
+
JMP .summon_or_dismiss
.not_active
.summonStorms
LDA #$9F : STA $8C
LDA.b #$01 : STA.b $1D
LDA.b #$72 : STA.b $9A
LDA #$01 : STA $7EE00E
RTL
}
@@ -306,145 +285,93 @@ PlayThunderAndRain:
CheckRealTable:
{
LDA $7EE00E : CMP #$00 : BEQ .continue
JML RainAnimation_Overridden_rainOverlaySet
.continue
JML RainAnimation_Overridden_rainOverlaySet
.continue
LDA #$05 : STA $012D
LDA.b $8A : ASL : TAX
LDA.l Pool_OverlayTable, X
CMP.b #$9F : BNE .not_rain_area
RTL
.not_rain_area
STZ.b $1D
RTL
.not_rain_area
JML RainAnimation_Overridden_skipMovement
}
ResetOcarinaFlag:
{
LDA.l GameState : BEQ .continue
CMP #$01 : BEQ .continue
REP #$30
LDA #$0000 : STA.l $7EE00E
SEP #$30
.continue
LDA.w $0416 : ASL A
LDA $7EF3C5 : BEQ .continue
CMP #$01 : BEQ .continue
REP #$30
LDA #$0000 : STA.l $7EE00E
SEP #$30
.continue
LDA.w $0416 : ASL A
RTL
}
; Values at $7EF34C determine scrolling behavior
; 01 - No scrolling allowed
; 02 - Scroll between two songs
; 03 - Scroll between three songs
; 04 - Scroll between four songs
UpdateFluteSong_Long:
org $02F210 ; OverworldTransitionScrollAndLoadMap
{
LDA $7EF34C : CMP.b #$01 : BEQ .not_pressed
LDA $030F : BNE .song_exists
; if this code is running, we have the flute song 1
LDA #$01 : STA $030F
.song_exists
LDA.b $F6
BIT.b #$20 : BNE .left ; pressed left
BIT.b #$10 : BNE .right ; pressed right
RTL
.left ; L Button Pressed - Decrement song
; LDA.b #$13 : JSR Player_DoSfx2
DEC $030F
LDA $030F : CMP #$00 : BEQ .wrap_to_max
BRA .update_song
.right ; R Button Pressed - Increment song
INC $030F
LDA $7EF34C : CMP.b #$02 : BEQ .max_2
CMP.b #$03 : BEQ .max_3
LDA $030F : CMP.b #$05 : BCS .wrap_to_min
RTL
.max_2
LDA $030F : CMP.b #$03 : BCS .wrap_to_min
RTL
.max_3
LDA $030F : CMP.b #$04 : BCS .wrap_to_min
.update_song
RTL
.wrap_to_max
LDA $7EF34C : CMP.b #$01 : BEQ .wrap_to_min
CMP.b #$02 : BEQ .set_max_to_2
CMP.b #$03 : BEQ .set_max_to_3
LDA #$04 : STA $030F : RTL
.set_max_to_3
LDA #$03 : STA $030F : RTL
.set_max_to_2
LDA #$02 : STA $030F : RTL
.wrap_to_min
LDA #$01 : STA $030F
.not_pressed
RTL
JSL ResetOcarinaFlag
}
print "End of Items/ocarina.asm ", pc
pushpc ; Bank2B freespace
; OverworldTransitionScrollAndLoadMap
org $02F210 : JSL ResetOcarinaFlag
; ZS OW
org $02A4CD
RainAnimation_Overridden:
{
JSL CheckRealTable : BEQ .rainOverlaySet
; LDA.b $8C : CMP.b #$9F :
JSL CheckRealTable : BEQ .rainOverlaySet
; LDA.b $8C : CMP.b #$9F :
; Check the progress indicator
LDA.l GameState : CMP.b #$02 : BRA .skipMovement
LDA.l $7EF3C5 : CMP.b #$02 : BRA .skipMovement
.rainOverlaySet
; If misery mire has been opened already, we're done.
; LDA.l $7EF2F0 : AND.b #$20 : BNE .skipMovement
; Check the frame counter.
; On the third frame do a flash of lightning.
LDA.b $1A
; If misery mire has been opened already, we're done.
;LDA.l $7EF2F0 : AND.b #$20 : BNE .skipMovement
; Check the frame counter.
; On the third frame do a flash of lightning.
LDA.b $1A
CMP.b #$03 : BEQ .lightning ; On the 0x03rd frame, cue the lightning.
CMP.b #$05 : BEQ .normalLight ; On the 0x05th frame, normal light level.
CMP.b #$24 : BEQ .thunder ; On the 0x24th frame, cue the thunder.
CMP.b #$2C : BEQ .normalLight ; On the 0x2Cth frame, normal light level.
CMP.b #$58 : BEQ .lightning ; On the 0x58th frame, cue the lightning.
CMP.b #$5A : BNE .moveOverlay ; On the 0x5Ath frame, normal light level.
CMP.b #$03 : BEQ .lightning ; On the 0x03rd frame, cue the lightning.
CMP.b #$05 : BEQ .normalLight ; On the 0x05th frame, normal light level.
CMP.b #$24 : BEQ .thunder ; On the 0x24th frame, cue the thunder.
CMP.b #$2C : BEQ .normalLight ; On the 0x2Cth frame, normal light level.
CMP.b #$58 : BEQ .lightning ; On the 0x58th frame, cue the lightning.
CMP.b #$5A : BNE .moveOverlay ; On the 0x5Ath frame, normal light level.
.normalLight
; Keep the screen semi-dark.
LDA.b #$72
; Keep the screen semi-dark.
LDA.b #$72
BRA .setBrightness
BRA .setBrightness
.thunder
; Play the thunder sound when outdoors.
; LDX.b #$36 : STX.w $012E
JSL PlayThunderAndRain
; Play the thunder sound when outdoors.
;LDX.b #$36 : STX.w $012E
JSL PlayThunderAndRain
.lightning
LDA.b #$32 ; Make the screen flash with lightning.
LDA.b #$32 ; Make the screen flash with lightning.
.setBrightness
STA.b $9A
STA.b $9A
.moveOverlay
; Overlay is only moved every 4th frame.
LDA.b $1A : AND.b #$03 : BNE .skipMovement
LDA.w $0494 : INC A : AND.b #$03 : STA.w $0494 : TAX
LDA.b $E1 : CLC : ADC.l $02A46D, X : STA.b $E1
LDA.b $E7 : CLC : ADC.l $02A471, X : STA.b $E7
; Overlay is only moved every 4th frame.
LDA.b $1A : AND.b #$03 : BNE .skipMovement
LDA.w $0494 : INC A : AND.b #$03 : STA.w $0494 : TAX
LDA.b $E1 : CLC : ADC.l $02A46D, X : STA.b $E1
LDA.b $E7 : CLC : ADC.l $02A471, X : STA.b $E7
.skipMovement
RTL
RTL
}
assert pc() <= $02A52D
warnpc $02A52D
pullpc

View File

@@ -1,7 +1,11 @@
; =========================================================
; Portal Rod Item
org $07A471 ; Mudora
JSR LinkItem_PortalRod
RTS
; LinkState_UsingEther
warnpc $07A493
; *$3A50F-$3A568
org $07A50F
RodAnimationTimer:
db $03, $03, $05
@@ -9,134 +13,120 @@ RodAnimationTimer:
LinkItem_PortalRod:
{
BIT $3A : BVS .y_button_held
LDA $6C : BNE .return
JSR Link_CheckNewY_ButtonPress : BCC .return
LDX.b #$00
JSR LinkItem_EvaluateMagicCost : BCC .insufficient_mp
LDA.b #$30 : JSR $802F ; Sfx3
JSL LinkItem_FirePortal
.y_button_held
LDA $6C : BNE .return
JSR $AE65 ; HaltLinkWhenUsingItems
DEC $3D : BPL .return
LDA $0300 : INC A : STA $0300 : TAX
LDA RodAnimationTimer, X : STA $3D
CPX.b #$03 : BNE .return
STZ $0300
STZ $5E
STZ $3D
LDA $0301 : AND.b #$FE : STA $0301
JSR Link_CheckNewY_ButtonPress : BCC .return
LDX.b #$00
JSR LinkItem_EvaluateMagicCost : BCC .insufficient_mp
LDA.b #$30 : JSR $802F ; Sfx3
JSL LinkItem_FirePortal
.y_button_held
.insufficient_mp
LDA $3A : AND.b #$BF : STA $3A
JSR $AE65 ; HaltLinkWhenUsingItems
; What's the point of this?
; LDA $67 : AND.b #$F0 : STA $67
DEC $3D : BPL .return
LDA $0300 : INC A : STA $0300 : TAX
LDA RodAnimationTimer, X : STA $3D
CPX.b #$03 : BNE .return
STZ $5E
STZ $0300
STZ $3D
LDA $0301 : AND.b #$FE : STA $0301
.return
.insufficient_mp
LDA $3A : AND.b #$BF : STA $3A
.return
RTS
}
assert pc() <= $07A568
; Ancilla_CheckSpriteCollision
org $088DC3
JSL Ancilla_HandlePortalCollision : NOP
warnpc $07A568
pullpc
Ancilla_HandlePortalCollision:
{
LDA.w $0E20, Y : CMP.b #$03 : BNE .not_portal_arrow
; Check if Y is the orange or blue portal
LDA.w SprSubtype, Y : CMP.b #$02 : BEQ .blue_portal
CMP.b #$01 : BEQ .orange_portal
.orange_portal
PHY
LDY.w $0632 ; Blue Sprite ID
LDA.w SprX, Y : CLC : ADC.b #$10 : STA.w ANC0XL, X
LDA.w SprY, Y : STA.w ANC0YL, X
LDA.w SprXH, Y : STA.w ANC0XH, X
LDA.w SprYH, Y : STA.w ANC0YH, X
PLY
JMP .continue
.blue_portal
PHY
LDY.w $0633 ; Orange Sprite ID
LDA.w SprX, Y : STA.w ANC0XL, X
LDA.w SprY, Y : CLC : ADC.b #$10 : STA.w ANC0YL, X
LDA.w SprXH, Y : STA.w ANC0XH, X
LDA.w SprYH, Y : STA.w ANC0YH, X
PLY
.continue
LDA.b #$08
RTL
.not_portal_arrow
; Restore arrow deflection sprite code from $088DC3
LDA.w SprTileDie,Y : AND.b #$08
RTL
}
macro SpawnPortal(x_offset, y_offset)
REP #$20
LDA $22 : CLC : ADC.w #<x_offset>
SEP #$20
STA.w SprX, Y ; SprX
XBA : STA.w SprXH, Y ; SprXH
STA $0D10, Y ; SprX
XBA : STA $0D30, Y ; SprXH
REP #$20
LDA $20 : CLC : ADC.w #<y_offset>
SEP #$20
STA.w SprY, Y ; SprY
XBA : STA.w SprYH, Y ; SprYH
STA $0D00, Y ; SprY
XBA : STA $0D20, Y ; SprYH
endmacro
LinkItem_FirePortal:
{
LDA.b #$03
LDA.b #$B8
JSL Sprite_SpawnDynamically : BPL .continue
RTS
.continue
RTS
.continue
PHX
LDA $7E0FA6 : BEQ .spawn_blue
STZ.w $0FA6
JMP .check_direction
.spawn_blue
STZ.w $0FA6
JMP .check_direction
.spawn_blue
LDA #$01 : STA $7E0FA6
.check_direction
.check_direction
LDA $2F : CMP.b #$00 : BEQ .facing_up
LDA $2F : CMP.b #$02 : BEQ .facing_down
LDA $2F : CMP.b #$04 : BEQ .facing_left
LDA $2F : CMP.b #$06 : BEQ .facing_right
; Portal Spawn Location
LDA $2F : CMP.b #$02 : BEQ .facing_down
LDA $2F : CMP.b #$04 : BEQ .facing_left
LDA $2F : CMP.b #$06 : BEQ .facing_right
; Portal Spawn Location
.facing_up
%SpawnPortal($0000, -0020)
JMP .finish
.facing_down
%SpawnPortal($0000, $001F)
JMP .finish
.facing_left
%SpawnPortal(-0020, $0000)
JMP .finish
.facing_right
%SpawnPortal(0020, $0000)
.facing_up
%SpawnPortal($0000, -0020)
JMP .finish
.facing_down
%SpawnPortal($0000, $001F)
JMP .finish
.facing_left
%SpawnPortal(-0020, $0000)
JMP .finish
.facing_right
%SpawnPortal(0020, $0000)
JMP .finish
.finish
.finish
TYX
STZ.w SprYRound, X : STZ.w SprXRound, X
STZ $0D60, X
STZ $0D70, X
PLX
.return
.return
; Delay the spin attack for some amount of time?
LDA RodAnimationTimer : STA $3D
STZ $2E
STZ $0300 : STZ $0301
STZ $0300
STZ $0301
LDA.b #$01 : TSB $0301
RTL
}
pushpc
pushpc
org $02FF6E
Overworld_OperateCameraScroll_Long:
@@ -145,7 +135,7 @@ Overworld_OperateCameraScroll_Long:
JSR $BB90
PLB
PLB
RTL
}
@@ -154,120 +144,343 @@ Overworld_ScrollMap_Long:
{
PHB : PHK : PLB
JSR $F273
PLB
PLB
RTL
}
pullpc
pullpc
ScrollToPortal:
{
REP #$20
STZ $00
STZ $02
LDA $22 : CMP $7EC186 : BEQ .set_x : BCC .x_low
DEC $02
DEC A : CMP $7EC186 : BEQ .set_x
DEC $02
DEC A
BRA .set_x
.x_low
DEC $02
DEC A : CMP $7EC186 : BEQ .set_x
DEC $02
DEC A
BRA .set_x
.x_low
INC $02
INC A : CMP $7EC186 : BEQ .set_x
INC $02
INC A
.set_x
.set_x
STA $22
LDA $20 : CMP $7EC184 : BEQ .set_y : BCC .y_low
DEC $00
DEC A : CMP $7EC184 : BEQ .set_y
DEC $00
DEC A
BRA .set_y
.y_low
DEC $00
DEC A : CMP $7EC184 : BEQ .set_y
DEC $00
DEC A
BRA .set_y
.y_low
INC $00
INC A : CMP $7EC184 : BEQ .set_y
INC $00
INC A
.set_y
.set_y
STA $20
CMP $7EC184 : BNE .delay_advance
LDA $22 : CMP $7EC186 : BNE .delay_advance
INC $B0
STZ $46
.delay_advance
LDA $22 : CMP $7EC186 : BNE .delay_advance
INC $B0
STZ $46
.delay_advance
SEP #$20
LDA $00 : STA $30
LDA $02 : STA $31
JSL Overworld_OperateCameraScroll_Long ; $13B90 IN ROM
LDA $0416 : BEQ .exit
JSL Overworld_ScrollMap_Long ; $17273 IN ROM
.exit
JSL Overworld_ScrollMap_Long ; $17273 IN ROM
.exit
RTL
}
Ancilla_MoveXYWithPortal:
{
; Increments X_reg by 0x0A so that X coordinates will be handled next
TXA : CLC : ADC.b #$0A : TAX
; MoveVertical
LDA $0C22, X : ASL #4 : CLC : ADC $0C36, X : STA $0C36, X
LDY.b #$00
; upper 4 bits are pixels per frame. lower 4 bits are 1/16ths of a pixel per frame.
; store the carry result of adding to $0C36, X
; check if the y pixel change per frame is negative
LDA $0C22, X : PHP : LSR #4 : PLP : BPL .moving_down
; sign extend from 4-bits to 8-bits
ORA.b #$F0
DEY
.moving_down
; modifies the y coordinates of the special object
ADC $0BFA, X : STA $0BFA, X
TYA : ADC $0C0E, X : STA $0C0E, X
LDX.w $0FA0
RTL
}
; #_088087: db $50 ; 0x18 - ETHER SPELL
; #_088088: db $00 ; 0x19 - BOMBOS SPELL
; LDA.b #$18 ; Ether Spell
; LDY.b #$01
; JSL Ancilla_PortalShot
print "End of Items/portal_rod.asm ", pc
pushpc
; org $0997DE
; AddSilverArrowSparkle:
; org $088D68
; Ancilla_CheckSpriteCollision:
; org $088981
; Ancilla_CheckTileCollision:
; org $088027
; Ancilla_DoSfx2:
; org $08A121
; Ancilla_Arrow:
; {
; .y_offsets
; dw -4, 2, 0, 0
; .x_offsets
; dw 0, 0, -4, 4
; LDA.b $11 : BEQ .normal_submode
; BRL .draw
; .normal_submode
; DEC.w $0C5E, X : LDA.w $0C5E, X : BMI .timer_elapsed
; CMP.b #$04 : BCC .begin_moving
; ; The object doesn't even start being drawn until this timer counts
; ; down.
; BRL .do_nothing
; .timer_elapsed
; LDA.b #$FF : STA.w $0C5E, X
; .begin_moving
; ; JSL Ancilla_MoveXYWithPortal
; JSR $908B
; JSR $9080
; LDA.l $7EF340 : AND.b #$04 : BEQ .dont_spawn_sparkle
; LDA.b $1A : AND.b #$01 : BNE .dont_spawn_sparkle
; PHX
; JSL AddSilverArrowSparkle
; PLX
; .dont_spawn_sparkle
; LDA.b #$FF : STA $03A9, X
; JSR Ancilla_CheckSpriteCollision : BCS .sprite_collision
; JSR Ancilla_CheckTileCollision : BCS .tile_collision
; BRL .draw
; .tile_collision
; TYA : STA $03C5, X
; LDA $0C72, X : AND.b #$03 : ASL A : TAY
; LDA.w .y_offsets+0, Y : CLC : ADC.w $0BFA, X : STA.w $0BFA, X
; LDA.w .y_offsets+1, Y : ADC.w $0C0E, X : STA.w $0C0E, X
; LDA.w .x_offsets+0, Y : CLC : ADC.w $0C04, X : STA.w $0C04, X
; LDA.w .x_offsets+1, Y : ADC.w $0C18, X : STA.w $0C18, X
; STZ.w $0B88
; BRA .transmute_to_halted_arrow
; .sprite_collision
; LDA $0C04, X : SEC : SBC $0D10, Y : STA $0C2C, X
; LDA $0BFA, X : SEC : SBC $0D00, Y : CLC : ADC $0F70, Y : STA $0C22, X
; TYA : STA $03A9, X
; LDA $0E20, Y : CMP.b #$65 : BNE .not_archery_game_sprite
; LDA $0D90, Y : CMP.b #$01 : BNE .not_archery_target_mop
; LDA.b #$2D : STA $012F
; ; Set a delay for the archery game proprietor and set a timer for the
; ; target that was hit (indicating it was hit)
; LDA.b #$80 : STA $0E10, Y : STA $0F10
; ; \tcrf In conjunction with the ArcheryGameGuy sprite code, this is
; ; another lead the suggested that there were 9 game prize values
; ; instead of just the normal 5.
; LDA $0B88 : CMP.b #$09 : BCS .prize_index_maxed_out
; INC $0B88
; .prize_index_maxed_out
; LDA $0B88 : STA $0DA0, Y
; LDA $0ED0, Y : INC A : STA $0ED0, Y
; BRA .transmute_to_halted_arrow
; .not_archery_target_mop
; LDA.b #$04 : STA $0EE0, Y
; .not_archery_game_sprite
; STZ $0B88
; .transmute_to_halted_arrow
; LDA $0E20, Y : CMP.b #$1B : BEQ .hit_enemy_arrow_no_sfx
; LDA.b #$08 : JSR Ancilla_DoSfx2
; .hit_enemy_arrow_no_sfx
; STZ $0C5E, X
; LDA.b #$0A : STA $0C4A, X
; LDA.b #$01 : STA $03B1, X
; LDA $03C5, X : BEQ .draw
; REP #$20
; LDA $E0 : SEC : SBC $E2 : CLC : ADC $0C04, X : STA $00
; LDA $E6 : SEC : SBC $E8 : CLC : ADC $0BFA, X : STA $02
; SEP #$20
; LDA $00 : STA $0C04, X
; LDA $02 : STA $0BFA, X
; BRA .draw
; .do_nothing
; RTS
; .draw
; BRL $09236E ; Arrow_Draw
; }
; warnpc $08A24E
; ; Portal Rod logic based on Fire Rod
; Ancilla_PortalShot:
; {
; LDA $0C54, X : BEQ .traveling_shot
; JMP Ancilla_ConsumingFire
; .traveling_shot
; LDA $11 : BNE .just_draw
; STZ $0385, X
; JSR Ancilla_MoveHoriz
; JSR Ancilla_MoveVert
; JSR Ancilla_CheckSpriteCollision : BCS .collided
; LDA $0C72, X : ORA.b #$08 : STA $0C72, X
; JSR Ancilla_CheckTileCollision
; PHP
; LDA $03E4, X : STA $0385, X
; PLP : BCS .collided
; LDA $0C72, X : ORA.b #$0C : STA $0C72, X
; LDA $028A, X : STA $74
; JSR Ancilla_CheckTileCollision
; PHP
; LDA $74 : STA $028A, X
; PLP : BCC .no_collision
; .collided
; INC $0C54, X
; ; Check if it's blue or orange portal
; LDA $0C68, X
; CMP.b #$1F
@@ -289,23 +502,23 @@ pushpc
; ; CLC : ADC portal creation logic here if necessary
; .no_collision
; INC $0C5E, X
; LDA $0C72, X : AND.b #$F3 : STA $0C72, X
; LDA $0385, X : STA $0333
; AND.b #$F0 : CMP.b #$C0 : BNE .just_draw
; LDA $03E4, X : STA $0333
; AND.b #$F0 : CMP.b #$C0 : BNE .just_draw
; .just_draw
; JSR PortalShot_Draw
; RTS
; }
@@ -313,46 +526,46 @@ pushpc
; PortalShot_Draw:
; {
; JSR Ancilla_BoundsCheck
; LDA $0280, X : BEQ .default_priority
; LDA.b #$30 : TSB $04
; .default_priority
; LDA $0C5E, X : AND.b #$0C : STA $02
; PHX
; LDX.b #$02
; LDY.b #$00
; .next_oam_entry
; STX $03
; TXA : ORA $02 : TAX
; LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
; LDA $01 : CLC : ADC .y_offsets, X : INY : STA ($90), Y
; LDX $03
; LDA .chr, X : INY : STA ($90), Y
; LDA $04 : ORA.b #$02 : INY : STA ($90), Y
; PHY
; TYA : LSR #2 : TAY
; LDA.b #$00 : STA ($92), Y
; PLY : INY
; DEX : BPL .next_oam_entry
; PLX
; RTS
; .x_offsets

View File

@@ -5,35 +5,50 @@ org $86F725
pullpc
collectSword:
{
ADC #$00 : STA $09
LDA $79 : BEQ $01
RTL
ADC #$00
STA $09
LDA $79
BEQ $01
RTL
LDA $0E20, X : SEC : SBC #$D8 : BCS $01
RTL
LDA $0E20, x
SEC
SBC #$D8
BCS $01
RTL
LDA $0E20, X : SEC : SBC #$E7 : BCC $01
RTL
LDA $0E20, x
SEC
SBC #$E7
BCC $01
RTL
PHY
LDY $3C : BPL $02 : PLY
RTL
PHY
LDY $3C
BPL $02
PLY
RTL
LDA $F571, Y : BEQ $02
PLY
RTL
LDA $F571, y
BEQ $02
PLY
RTL
PHX
PHX
LDA $2F
ASL A
ASL A
ASL A
CLC : ADC $3C
CLC
ADC $3C
TAX
INX
LDY #$00 : LDA $45
CLC : ADC $F46D, X : BPL $01
DEY
INX
LDY #$00
LDA $45
CLC
ADC $F46D, x
BPL $01
DEY
CLC
ADC $22
STA $00
@@ -46,7 +61,7 @@ collectSword:
ADC $F4EF, x
BPL $01
DEY
CLC
CLC
ADC $20
STA $01
TYA
@@ -57,7 +72,7 @@ collectSword:
LDA $F530, x
STA $03
PLX
PLY
PLY
RTL
}
pushpc

View File

@@ -3,32 +3,32 @@
; =========================================================
; 00 = Human
; 01 = Deku
; 01 = Deku
; 02 = Zora
; 03 = Wolf
; 04 = Bunny Hood
; 04 = Bunny Hood
; 05 = Minish Form
; 06 = GBC Form
; 07 = Moosh Form
!CurrentMask = $02B2
; Indexed by the bank number
!LinkGraphics = $BC
; If set, player is diving with Zora Mask
!ZoraDiving = $0AAB
; If set, deku is hovering and can drop bombs
DekuFloating = $70
; =========================================================
; If set, on deku platform and can hover
; Unset, will shoot deku bubble instead
DekuHover = $71
org $09912C
AddTransformationCloud:
AddTransformationCloud = $09912C
Link_CheckNewY_ButtonPress = $07B073
LinkItem_EvaluateMagicCost = $07B0AB
Player_DoSfx2 = $078028
org $07B073
Link_CheckNewY_ButtonPress:
org $07B0AB
LinkItem_EvaluateMagicCost:
org $078028
Player_DoSfx2:
; =========================================================
incsrc "Masks/mask_routines.asm"
@@ -59,8 +59,4 @@ org $388000
org $3B8000
incbin gfx/gbc_link.4bpp
incsrc "Masks/gbc_form.asm"
org $338000
incbin gfx/moosh.4bpp
incsrc "Masks/moosh.asm"
incsrc "Masks/gbc_form.asm"

View File

@@ -1,23 +1,23 @@
; =========================================================
; =============================================================================
; Bunny Hood Item
; Makes Link run quicker when holding
; Written by Conn (I think)
; $7EF349 bunny hood RAM slot
;
;
; Adjustable speed table at the end
; db (0) $18: - Horizontal and vertical walking speed
; (Default = 18)
; (Default = 18)
; db (1) $10 - Diagonal walking speed
; (Default = 10)
; (Default = 10)
; db (2) $0a - Stairs walking speed
; (Default = 0A)
; (Default = 0A)
; db (0c) $14 - walking through heavy grass speed (also shallow water)
; (Default = 14)
; (Default = 14)
; db (0d) $0d - walking diagonally through heavy grass speed (also shallow water)
; (Default = 0D)
; (Default = 0D)
; db (10) $40 - Pegasus boots speed (Default = 40)
;
; =========================================================
; =============================================================================
UpdateBunnyPalette:
{
@@ -25,12 +25,7 @@ UpdateBunnyPalette:
LDX #$001E
.loop
LDA.l bunny_palette, X
PHX
STA.l !SubPalColor
JSL ColorSubEffect
PLX
STA $7EC6E0, X
LDA.l bunny_palette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
@@ -38,45 +33,44 @@ UpdateBunnyPalette:
RTL ; or RTS depending on where you need it
}
; =========================================================
; =============================================================================
bunny_palette:
dw $7BDE, $7FFF, $2F7D, $19B5, $3A9C, $14A5, $19FD, $14B6
dw $55BB, $362A, $3F4E, $162B, $22D0, $2E5A, $1970, $7616
dw $6565, $7271, $2AB7, $477E, $1997, $14B5, $459B, $69F2
dw $7AB8, $2609, $19D8, $3D95, $567C, $1890, $52F6, $2357, $0000
dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$19FD, #$14B6
dw #$55BB, #$362A, #$3F4E, #$162B, #$22D0, #$2E5A, #$1970, #$7616
dw #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2
dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357, #$0000
print "End of Bunny Hood GFX ", pc
; =========================================================
; =============================================================================
; Bunny Hood Speed Modification
; Link_HandleVelocity_load_subvel
org $07E330
JSR Link_CheckForBunnyRun
CLC
JSR Link_CheckForBunnyRun
CLC
; org $87FD66
pullpc
Link_CheckForBunnyRun:
JSL LinkState_BunnyHoodRun
RTS
JSL LinkState_BunnyHoodRun
RTS
pushpc
SubVelocityValues = $87E227
org $20AF20
LinkState_BunnyHoodRun:
{
CPX.b #$11 : BCS .end ; speed value upper bound check
LDA.w $0202 ; check the current item
CMP.b #$16 : BNE .end ; is it the bunny hood?
LDA.w !CurrentMask : CMP.b #$04 : BNE .end
LDA.l BunnySpeedTable, X ; load new speed values
CLC
RTL
LDA.w !CurrentMask ; did you put it on?
BEQ .end
LDA.l BunnySpeedTable, X ; load new speed values
CLC
RTL
.end
LDA.l SubVelocityValues, X ; load native speed values
.end
LDA $87E227, X ; load native speed values
CLC
RTL
}
@@ -84,52 +78,34 @@ LinkState_BunnyHoodRun:
org $20AF70 ; this selects the new speed values
BunnySpeedTable:
{
db $20 ; 0x00 - walking on ground
db $12 ; 0x01 - walking diagonally
db $0A ; 0x02 - walking on stairs
db $18 ; 0x03 - walking on stairs diagonally, impossible to reach
db $10 ; 0x04 - soft slipping
db $08 ; 0x05 - soft slipping diagonally
db $08 ; 0x06 - entering underworld/hard slipping
db $04 ; 0x07 - hard slipping diagonally
db $0C ; 0x08 - pushing statue
db $10 ; 0x09 - pushing statue diagonally
db $09 ; 0x0A - intraroom stairs
db $19
db $14 ; 0x0C - walking with sword out/carrying/sloshing
db $0D ; 0x0D - walking with sword out/carrying/sloshing diagonally
db $10 ; 0x0E - sword out/carry sloshing
db $08 ; 0x0F - sword out/carry sloshing diagonally
db $40 ; 0x10 - dashing
db $2A ; 0x11 - dashing diagonally
db $10 ; 0x12 - pushing block
db $08 ; 0x13 - pushing block diagonally
db $04 ; 0x14 - pulling statue/walking to triforce
db $02 ; 0x15 - pulling statue diagonally
db $30 ; 0x16 - slosh dashing
db $18 ; 0x17 - slosh dashing diagonally
db $20 ; 0x18 - dashing on ice
db $15 ; 0x19 - dashing on ice diagonally
db $F0 ; 0x1A -
db $00 ; 0x1B -
db $F0 ; 0x1C -
db $01 ; 0x1D -
db $20, $12, $0a, $18, $10, $08, $08, $04, $0c, $10, $09, $19, $14, $0d, $10, $08, $40
}
; =========================================================
; =============================================================================
; Press R to transform into bunny form and run faster.
; =========================================================
; =============================================================================
org $07A494
LinkItem_Ether:
{
LDA #$04
JSL Link_TransformMask
LDA $0114 : CMP.b #$20 : BNE +
LDA.b #$03 : STA $5B
JSR $9427
+
%CheckNewR_ButtonPress() : BEQ .return
LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; can't open menu
%PlayerTransform()
LDA $02B2 : CMP #$04 : BEQ .unequip ; is the hood already on?
JSL UpdateBunnyPalette
LDA #$37 : STA $BC ; change link's sprite
LDA #$04 : STA $02B2
BRA .return
.unequip
%ResetToLinkGraphics()
.return
CLC
RTS
}
assert pc() <= $07A4F6
warnpc $07A4F6

View File

@@ -1,91 +1,106 @@
; =========================================================
; Deku Mask
; Press R to transform into Deku Link
; Press Y to perform a spin and jump, allowing you to hover
; for a short period of time, as well as drop bombs while
; hovering with the Y button, and cancelling the hover with
; the B button.
; Deku Mask
; =========================================================
UpdateDekuPalette:
{
REP #$30 ; change 16bit mode
LDX #$001E
.loop
LDA.l deku_palette, X
PHX
STA.l !SubPalColor
JSL ColorSubEffect
PLX
STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
}
deku_palette:
dw $6739, $15C5, $150E, $26C9, $17AA, $21F4, $17DF, $42DB
dw $14A5, $14BC, $14B2, $14A5, $7FFF, $7A18, $178C
print "End of Masks/deku_mask.asm ", pc
; =========================================================
org $07A64B ; formerly Quake
org $07A64B ; formerly Quake
LinkItem_DekuMask:
{
; Don't use magic unless deku form
LDA.w $02B2 : CMP.b #$01 : BNE .continue
; Don't shoot while transform is active
LDA.w $0C4E : BNE .continue
JSR Link_CheckNewY_ButtonPress : BCC .continue
LDA $3A : AND.b #$BF : STA $3A
LDX.b #$02
JSR LinkItem_EvaluateMagicCost : BCC .return
JSL DekuLink_ShootBubbleOrStartHover
RTS
JSR Link_CheckNewY_ButtonPress : BCC .continue
LDX.b #$01 : JSR LinkItem_EvaluateMagicCost : BCC .return
JSL PrepareQuakeSpell
RTS
.continue
; Don't transform while shooting
LDA.w $0C52 : CMP.b #$0E : BEQ .return
LDA.b #$01
JSL Link_TransformMask
.return
.continue
%CheckNewR_ButtonPress() : BEQ .return
LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; can't open menu
%PlayerTransform()
LDA $02B2 : CMP #$01 : BEQ .unequip ; is the deku mask on?
JSL Palette_ArmorAndGloves ; set the palette
LDA.l $7EF35A : STA $0AAF ; Store the current shield
LDA.b #$00 : STA $7EF35A ; Clear the shield
LDA #$35 : STA $BC ; put the mask on
LDA #$01 : STA $02B2 ; set the deku mask flag
STA $02F5 ; Somaria platform flag, no dash.
BRA .return
.unequip
STZ $5D
; Restore the shield
LDA $0AAF : STA.l $7EF35A
STZ $02F5
%ResetToLinkGraphics()
.return
RTS
}
assert pc() <= $07A6BE
warnpc $07A6BE
; =========================================================
Link_HandleChangeInZVelocity = $078926
Link_HandleChangeInZVelocity_preset = $078932
org $07811A
JSR Link_HandleDekuTransformation
PlaySFX_Set2 = $078028
PlaySFX_Set3 = $07802F
pullpc ; Bank 07 Free Space from minish_form
Link_HandleDekuTransformation:
{
; Check if using Quake Medallion
LDA $5D : CMP.b #$0A : BEQ .continue
.continue
JSR $82DA ; Link_HandleBunnyTransformation
RTS
}
print "End of Masks/deku_mask.asm ", pc
pushpc
org $07E370
LinkHop_FindArbitraryLandingSpot:
org $078926
Link_HandleChangeInZVelocity:
org $078932
Link_HandleChangeInZVelocity_preset:
org $099589
AncillaAdd_QuakeSpell:
org $078028
PlaySFX_Set2:
org $07802F
PlaySFX_Set3:
org $07A6BE
LinkState_UsingQuake:
{
.anim_step
db $00, $01, $02, $03
db $00, $01, $02, $03
db $10, $10, $00, $00 ; 16
.anim_step
db #$00, #$01, #$02, #$03
db #$00, #$01, #$02, #$03
db #$10, #$10, #$00, #$00 ; 16
.anim_timer
db 5, 5, 5, 5
db 5, 5, 5, 5
db 5, 5, 5, 19
.anim_timer
db 5, 5, 5, 5
db 5, 5, 5, 5
db 5, 5, 5, 19
; INC.w $0FC1 ; Keep sprites frozen
JSR $F514 ; CacheCameraPropertiesIfOutdoors
STZ.b $27 : STZ.b $28 ; Reset recoil X and Y
STZ.b $27 : STZ.b $28 ; Reset recoil X and Y
; SPIN STEP CHECK
LDA.w LinkSpinStep : CMP.b #$0A : BNE .not_ascending
LDA.w $031D : CMP.b #$0A : BNE .not_ascending
LDA.w $0362 : STA.b $29
LDA.w $0363 : STA.w $02C7
LDA.w $0364 : STA.b $24
@@ -95,63 +110,75 @@ LinkState_UsingQuake:
JSR Link_HandleChangeInZVelocity_preset
JSL LinkHop_FindArbitraryLandingSpot
; Link recoil Z value, hop Z value
LDA.b LinkRecoilZ : STA.w $0362
; Link recoil Z value, hop Z value
LDA.b $29 : STA.w $0362
LDA.w $02C7 : STA.w $0363
; Z Position of Link
LDA.b $24 : STA.w $0364 : BMI .still_ascending
; End of ASCEND -------------------------------------
LDY.b #$00 : LDA.b LinkRecoilZ : BPL .done_ascending
LDY.b #$00 ; Thrust Sword Down OAM Frame Set
; End of ASCEND -----------------------------------------
; Link recoil Z
LDY.b #$00 : LDA.b $29 : BPL .done_ascending
.done_ascending
STY.w $031C : BRA .exit
; ---------------------------------------------------
LDY.b #$00 ; Thrust Sword Down OAM Frame Set
.done_ascending
STY.w $031C : BRA .exit
; -------------------------------------------------------
.not_ascending
DEC.b $3D : BPL .special
.still_ascending
INC.w LinkSpinStep
LDX.w LinkSpinStep
CPX.b #$04 : BNE .skip_swish_sfx
INC.w $031D
; $031D - Spin Step
LDX.w $031D : CPX.b #$04 : BNE .skip_swish_sfx
PHX : LDA.b #$23 : JSR PlaySFX_Set3 : PLX
.skip_swish_sfx
CPX.b #$0C : BNE .dont_reset_step
LDA.b #$0B : STA.w LinkSpinStep
TAX
.dont_reset_step
LDA.w .anim_timer,X : STA.b $3D
LDA.w .anim_step,X : STA.w $031C
LDA.w $0324 : BNE .special ; Prevent repeat spellcast check
CPX.b #$0B : BNE .special ; Animation step check
.skip_swish_sfx
CPX.b #$0A : BNE .skip_ping_sfx
; PHX : LDA.b #$2C : JSR PlaySFX_Set2 : PLX
; -------------------------------------------------
; Prevent repeat spellcast set
LDA.b #$01 : STA.w $0324
LDA.b #$12 : STA.w LinkZ
LDA.b #$FF : STA.w FallTimer
LDA.b #$01 : STA.w DekuFloating
; -------------------------------------------------
.skip_ping_sfx
CPX.b #$0B : BNE .skip_boom_sfx
; LDA.b #$0C : JSR PlaySFX_Set2
.exit
.skip_boom_sfx
CPX.b #$0C : BNE .dont_reset_step
LDA.b #$0B : STA.w $031D
TAX
.dont_reset_step
LDA.w .anim_timer,X : STA.b $3D
LDA.w .anim_step,X : STA.w $031C
LDA.w $0324 : BNE .special ; Prevent repeat spellcast check
CPX.b #$0B : BNE .special ; Animation step check
; -----------------------------------------------------
; Prevent repeat spellcast set
LDA.b #$01 : STA.w $0324
LDA.b #$12 : STA $24
LDA.b #$FF : STA $5C
LDA.b #$01 : STA $70
; ; Quake Spell, End Quake State happens during Ancilla
; LDY.b #$00 : LDA.b #$1C ; ANCILLA 1C
; JSL AncillaAdd_QuakeSpell
; STZ.b $4D : STZ.w $0046
; -----------------------------------------------------
.exit
RTS
.special
LDA.b DekuFloating : BEQ +
DEC $5C
JSL DekuLink_HoverBasedOnInput
+
.special
DEC $5C
JSL DekuLink_HoverBasedOnInput
JSR $E8F0 ; HandleIndoorCameraAndDoors
RTS
}
assert pc() <= $07A779
; LinkHop_FindArbitraryLandingSpot
; Allow LinkState 0x0A to use velocity
; Previously would skip velocity for LinkState 0x0A
org $07E38B
LDA.b $5D : CMP.b #$09
warnpc $07A779

View File

@@ -1,6 +1,6 @@
; =========================================================
; ========================================
; GBC Link
; =========================================================
; ========================================
UpdateGbcPalette:
{
@@ -8,119 +8,99 @@ UpdateGbcPalette:
LDX #$001E
LDA $7EF35B : AND.w #$00FF : CMP #$0001 : BEQ .blue_mail
LDA $7EF35B : AND.w #$00FF : CMP #$0002 : BEQ .red_mail
.loop
LDA.l GameboyLinkPalette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
.blue_mail
.blue_mail
LDX #$001E
.loop2
LDA.l GameboyLinkBlueMail, X : STA $7EC6E0, X
DEX : DEX : BPL .loop2
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
.red_mail
LDX #$001E
.loop3
LDA.l GameboyLinkRedMail, X : STA $7EC6E0, X
DEX : DEX : BPL .loop3
.loop2
LDA.l GameboyLinkBlueMail, X : STA $7EC6E0, X
DEX : DEX : BPL .loop2
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
}
GameboyLinkPalette:
dw $0000, $7FFF, $237E, $B711, $369E, $14A5, $01FF, $1078
dw $46FF, $22A2, $3B68, $0A4A, $12EF, $2A5C, $1571, $7A18
{
dw #$0000, #$7FFF, #$237E, #$B711, #$369E, #$14A5, #$01FF, #$1078
dw #$46FF, #$22A2, #$3B68, #$0A4A, #$12EF, #$2A5C, #$1571, #$7A18
}
GameboyLinkBlueMail:
dw $0000, $7FFF, $237E, $B711, $369E, $14A5, $01FF, $1078
dw $46FF, $4D25, $3B68, $0A4A, $12EF, $2A5C, $1571, $7A18
GameboyLinkRedMail:
dw $0000, $7FFF, $237E, $B711, $369E, $14A5, $01FF, $1078
dw $46FF, $081D, $3B68, $0A4A, $12EF, $2A5C, $1571, $7A18
{
dw #$0000, #$7FFF, #$237E, #$B711, #$369E, #$14A5, #$01FF, #$1078
dw #$46FF, #$4D25, #$3B68, #$0A4A, #$12EF, #$2A5C, #$1571, #$7A18
}
LinkState_GameboyInDungeonEntrance:
{
print pc
; if link is in the dark world, change his sprite to the gbc one
LDA $0FFF : CMP #$00 : BEQ .return
LDA.w !CurrentMask : CMP.b #$05 : BEQ .return
JSL UpdateGbcPalette
LDA #$3B : STA $BC ; change link's sprite
.return
LDA $BC : CMP #$06 : BEQ .return
JSL UpdateGbcPalette
LDA #$3B : STA $BC ; change link's sprite
.return
JSL $0AFE80 ; Underworld_HandleLayerEffect
RTL
}
; Retain GBC sprite when exiting DW dungeons
LoadOverworld_CheckForGbcLink:
org $07A9B1
LinkMode_MagicMirror:
{
LDA $0FFF : BEQ .return_lw
LDA.w !CurrentMask : CMP.b #$05 : BEQ .return
LDA.b #$06 : STA $02B2
LDA.b #$3B : STA $BC ; change link's sprite
JSL UpdateGbcPalette
JMP .return
.return_lw
STZ.w $02B2
.return
JSL Palette_ArmorAndGloves
STZ.b $B0
STZ.b $11
RTL
JSL LinkState_GameboyForm
}
OverworldTransition_CheckForGbcLink:
org $0287A4
{
LDA $0FFF : BEQ .return
LDA.w !CurrentMask : CMP.b #$05 : BEQ .return
LDA #$3B : STA $BC ; change link's sprite
LDA #$06 : STA $02B2
JSL Palette_ArmorAndGloves
.return
JSL Link_HandleMovingAnimation_FullLongEntry
RTL
JSL LinkState_GameboyInDungeonEntrance
}
; Module08_02_LoadAndAdvance
org $02EDC0 : JSL LoadOverworld_CheckForGbcLink
org $1EE48E
; TODO: Check a status flag to dismiss villager girl
NOP #6
; Overworld_RunScrollTransition
org $02ABDA : JSL OverworldTransition_CheckForGbcLink
org $09ACFF
; TODO: Decide if we want to disable other followers
LDA.b #$0A
; LinkState_CrossingWorlds
org $07A9B1 : JSL LinkState_GameboyForm
; Module07_Underworld
org $0287A4 : JSL LinkState_GameboyInDungeonEntrance
org $09A903
db $02 ; Kiki palette
pullpc
LinkState_GameboyForm:
{
SEP #$30
LDA $02B2 : CMP.b #$06 : BEQ .already_gbc
LDA $0FFF : BEQ .return ; not in dark world
.transform
JSL PlayerTransform
LDA #$3B : STA $BC ; change link's sprite
LDA #$06 : STA $02B2
JSL UpdateGbcPalette
BRA .return
LDA $7EF357 : BEQ .return ; doesnt have the pearl
LDA $0FFF : BEQ .return ; not in dark world
.already_gbc
JSL PlayerTransform
.transform
%PlayerTransform()
JSL UpdateGbcPalette
LDA #$3B : STA $BC ; change link's sprite
LDA #$06 : STA $02B2
BRA .return
.already_gbc
%PlayerTransform()
LDA #$10 : STA $BC
STZ $02B2
JSL Palette_ArmorAndGloves
.return
JSL $07F1E6
.not_gbc
.return
JSL $07F1E6
RTL
}
pushpc
pushpc

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,98 +1,78 @@
; =========================================================
; Minish Form Link
;
;
; Reacts to Tile ID 64 to transform into Minish Link
; =========================================================
; Overworld Collision Tables
org $07DA2A
TileDetection_OverworldAttributeJumpTable:
; org $07DAEB ; Tile ID 61
org $07DAF2
dw LinkState_CheckForMinishForm ; Tile ID 64
dw LinkState_CheckMinishTile ; Tile ID 65
; Underworld Collision Tables
org $07D8A0
dw LinkState_CheckForMinishForm
dw LinkState_CheckMinishTile
; LinkState_Bunny.not_moving
org $078427 : JSR $9BAA ; Link_HandleAPress
; =========================================================
pullpc
LinkState_CheckForMinishForm:
{
SEP #$30
LDA.l GameState : BEQ .return
JSL $0FF979 ; AncillaSpawn_SwordChargeSparkle
; Check for the R button (like minish cap)
JSL CheckNewRButtonPress : BCC .return
; Check for the R button (like minish cap)
%CheckNewR_ButtonPress() : BEQ .return
; Skip the code if you have a mask item out
LDA $0202
; Skip the code if you have a mask item out
LDA $0202
; Check if the value in A (from $0202) is LT $13.
CMP.b #$13 : BCC .continue
; Check if the value in A (from $0202) is LT $13.
CMP.b #$13 : BCC .continue
; Check if the value in A (from $0202) is GTE to $16.
CMP.b #$17 : BCS .continue
LDA.b #$3C : STA.w $012E ; Error beep
JMP .return
.continue
; Check if the value in A (from $0202) is GTE to $16.
CMP.b #$17 : BCS .continue
LDA !CurrentMask
CMP.b #$05 : BEQ .already_minish ; return to human form
CMP.b #$00 : BEQ .transform
CMP.b #$06 : BCC .return ; don't transform if not human
.transform
JSL PlayerTransform
JMP .return
LDA #$39 : STA $BC ; Change link's sprite
LDA #$05 : STA $02B2 ; Set the current mask form
BRA .return
.continue
.already_minish
JSL PlayerTransform
JSL ResetToLinkGraphics
LDA !CurrentMask
CMP.b #$05 : BEQ .already_minish ; return to human form
CMP.b #$00 : BNE .return ; don't transform if not human
%PlayerTransform()
.return
LDA.l $7EF35A : STA $0AAF ; Store the current shield
LDA.b #$00 : STA $7EF35A ; Clear the shield
LDA #$39 : STA $BC ; Change link's sprite
LDA #$05 : STA $02B2 ; Set the current mask form
BRA .return
.already_minish
%PlayerTransform()
%ResetToLinkGraphics()
LDA $0AAF : STA.l $7EF35A ; restore the shield
.return
REP #$30
RTS
}
; =========================================================
; =============================================================================
LinkState_CheckMinishTile:
{
LDA $02B2 : BEQ .blocked ; no form
CMP.w #$0007 : BEQ .allowed ; moosh can fly over
CMP.w #$0005 : BNE .blocked ; not minish
.allowed
LDA $0A : TSB $0343
RTS
.blocked
LDA $0A : TSB $0E ; Blocked
LDA $02B2 : BEQ .blocked ; no form
CMP.b #$05 : BNE .blocked ; not minish
LDA $0A : TSB $0343
RTS
}
; Prevent lifting while minish
CheckForMinishLift:
{
PHA
LDA.w $02E0 : BNE .no_lift ; bunny form
LDA.w $02B2 : CMP.b #$05 : BNE .return
.no_lift
PLA
AND.l $7EF379 : AND.b #$80
RTL
.return
PLA
AND.l $7EF379
RTL
.blocked
LDA $0A : TSB $0E ; Blocked
RTS
}
print "End of Masks/minish_form.asm ", pc
pushpc
org $079C32
JSL CheckForMinishLift

View File

@@ -1,31 +0,0 @@
UpdateMooshPalette:
{
REP #$30 ; change 16bit mode
LDX #$001E
.loop
LDA.l MooshPalette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL ; or RTS depending on where you need it
}
MooshPalette:
dw $0000, $7FFF, $237E, $46FF, $369E, $14A5, $01FF, $1078
dw $6E25, $7AEF, $6759, $0A4A, $12EF, $2A5C, $1571, $7A18
Link_HoverIfMooshWantsToDash:
{
LDA.w !CurrentMask : CMP.b #$07 : BNE .return
JSL PrepareQuakeSpell
RTL
.return
JSL Link_HandleMovingAnimation_FullLongEntry
RTL
}
print "End of Masks/moosh.asm ", pc
org $079093
JSL Link_HoverIfMooshWantsToDash

View File

@@ -1,7 +1,10 @@
; =========================================================
; Wolf Mask
; =============================================================================
; Wolf Mask
;
; Talk to animals
; Dig for treasure ability (shovel)
; =========================================================
;
; =============================================================================
UpdateWolfPalette:
{
@@ -9,12 +12,7 @@ UpdateWolfPalette:
LDX #$001E
.loop
LDA.l WolfPalette, X
PHX
STA.l !SubPalColor
JSL ColorSubEffect
PLX
STA $7EC6E0, X
LDA.l WolfPalette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30 ; go back to 8 bit mode
@@ -22,56 +20,69 @@ UpdateWolfPalette:
RTL ; or RTS depending on where you need it
}
; =========================================================
; =============================================================================
WolfPalette:
dw $7BDE, $7FFF, $2F7D, $19B5, $3A9C, $14A5, $1A3D, $14B6
dw $4650, $362A, $3F4E, $162B, $318A, $39CC, $1CE7, $76D1
dw $6565, $7271, $14B5, $459B, $3D95, $22D0, $567C, $1890
dw $7616, $0000
dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$1A3D, #$14B6
dw #$4650, #$362A, #$3F4E, #$162B, #$318A, #$39CC, #$1CE7, #$76D1
dw #$6565, #$7271, #$14B5, #$459B, #$3D95, #$22D0, #$567C, #$1890
dw #$7616, #$0000
; =============================================================================
; =========================================================
org $07A3DB
LinkItem_Flute:
LinkItem_Flute = $07A3DB
LinkItem_Shovel = $07A32C
org $07A32C
LinkItem_Shovel:
; LinkItem_Shovel
org $07A3B2
NOP #5
; DigGame_SpawnPrize
org $1DFD5E
NOP #5
; =========================================================
; =============================================================================
org $07A313
LinkItem_ShovelAndFlute:
{
; Play flute or use the Wolf Mask
LDA $0202 : CMP.b #$0D : BNE .use_wolf_mask
BRL LinkItem_Flute
.use_wolf_mask
BRL LinkItem_Flute
.use_wolf_mask
JMP LinkItem_WolfMask
}
; assert pc() <= $07A31F
; warnpc $07A31F
; =========================================================
; =============================================================================
; Bank 07 Free Space
pullpc
LinkItem_WolfMask:
{
; SEP #$30
LDA $02B2 : CMP #$03 : BNE .equip
JSR LinkItem_Shovel
.equip
LDA.b #$03
JSL Link_TransformMask
.return
JSR LinkItem_Shovel
.equip
; Check for R button press
%CheckNewR_ButtonPress() : BEQ .return
LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; can't open menu
%PlayerTransform()
LDA $02B2 : CMP #$03 : BEQ .unequip ; is the wolf mask already on?
JSL UpdateWolfPalette
LDA #$38 : STA $BC ; change link's sprite
LDA #$03 : STA $02B2
BRA .return
.unequip
%ResetToLinkGraphics()
.return
; REP #$30
RTS
}
print "End of Masks/wolf_mask.asm ", pc
pushpc
pushpc

View File

@@ -1,160 +1,189 @@
; =========================================================
; =============================================================================
; Zora Mask - by scawful
; Based on the Fairy Flippers item by Conn
; Special Thanks to Zarby89 for the PaletteArmorAndGloves hook
;
; Transforms Link into Zora Link
; Transforms Link into Zora Link
; Allows Link to dive underwater in the overworld and dungeons as Zora Link.
;
; How To Use:
; How To Use:
; Press R to transform into Zora Link. Press R again to transform back.
; Press Y in deep water to dive. Press Y again to resurface.
; =========================================================
; =============================================================================
UpdateZoraPalette:
{
REP #$30
REP #$30 ; change 16 bit mode
LDX #$001E
.loop
LDA.l zora_palette, X
PHX
STA.l !SubPalColor
JSL ColorSubEffect
PLX
STA $7EC6E0, X
.loop
LDA.l zora_palette, X : STA $7EC6E0, X
DEX : DEX : BPL .loop
SEP #$30
INC $15
RTL
SEP #$30 ; go back to 8 bit mode
INC $15 ; update the palette
RTL
}
; =========================================================
; =============================================================================
; TODO: Finish the Zora palette
; TODO: Change from "bunny palette" to blue zora palette colors
zora_palette:
dw $7BDE, $7FFF, $2F7D, $19B5, $3A9C, $14A5, $4E48, $3582
dw $55BB, $6EF7, $7BDE, $55C7, $6ECD, $2E5A, $1970, $7616
; dw #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357
dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$4E48, #$3582
dw #$55BB, #$6EF7, #$7BDE, #$55C7, #$6ECD, #$2E5A, #$1970, #$7616
; dw #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357, #$0000
; zora_palette:
; dw #$7BDE, #$7FFF, #$2F7D, #$19B5, #$3A9C, #$14A5, #$19FD, #$14B6
; dw #$55BB, #$362A, #$3F4E, #$162B, #$22D0, #$2E5A, #$1970, #$7616
; dw #$6565, #$7271, #$2AB7, #$477E, #$1997, #$14B5, #$459B, #$69F2
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357
; dw #$7AB8, #$2609, #$19D8, #$3D95, #$567C, #$1890, #$52F6, #$2357, #$0000
AddTransitionSplash = $0998FC
; =============================================================================
; =========================================================
org $0998FC
AddTransitionSplash:
; =============================================================================
; Replaces Bombos medallion
org $07A569
LinkItem_ZoraMask:
{
; No removing the mask whilst diving.
LDA !ZoraDiving : BNE .return
LDA.b #$02
JSL Link_TransformMask
.return
LDA !ZoraDiving : BNE .return
; Check for R button held
%CheckNewR_ButtonPress() : BEQ .return
LDA $6C : BNE .return ; in a doorway
LDA $0FFC : BNE .return ; can't open menu
%PlayerTransform()
LDA $02B2 : CMP #$02 : BEQ .unequip ; is the zora mask on?
JSL UpdateZoraPalette ; change links palette
LDA #$36 : STA $BC ; change links graphics
LDA #$02 : STA $02B2 ; set the zora mask on
BRA .return
.unequip
%ResetToLinkGraphics()
.return
CLC
RTS
}
assert pc() <= $07A5CE
warnpc $07A5CE
; =========================================================
; =============================================================================
; End of LinkState_Swimming
org $079781
org $079781
JSR LinkState_UsingZoraMask
RTS
; =========================================================
; =============================================================================
pullpc ; Bank07 Free Space from Deku Mask
LinkState_UsingZoraMask:
{
; Check if the mask is equipped
LDA $02B2 : CMP #$02 : BNE .normal
; Check if we are in water or not
LDA $5D : CMP #$04 : BEQ .swimming
; Check if the mask is equipped
LDA $02B2 : CMP #$02 : BNE .normal : CLC
.normal
; Return to normal state
; Check if we are in water or not
LDA $5D : CMP #$04 : BEQ .swimming : CLC
.normal
; Return to normal state
STZ $55
STZ $5E ; Reset speed to normal
STZ $5E ; Reset speed to normal
STZ $037B
STZ $0351
JMP .return
.swimming
; Check if we are indoors or outdoors
LDA $1B : BNE .dungeon ; z flag is 1
.swimming
; Check if we are indoors or outdoors
LDA $1B : BNE .dungeon ; z flag is 1
; OVERWORLD ---------------------------------------------
.overworld
; OVERWORLD -----------------------------------------------------------------
.overworld
{
; Check the Y button and clear state if activated
JSR Link_CheckNewY_ButtonPress : BCC .return
LDA $3A : AND.b #$BF : STA $3A
; Check if already underwater
; Check if already underwater
LDA !ZoraDiving : BEQ .dive
STZ $55 ; Reset cape flag
STZ !ZoraDiving ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $037B ; Reset invincibility flag
LDA #$04 : STA $5D ; Put Link in Swimming State
JMP .return
.dive
STZ $55 ; Reset cape flag
STZ !ZoraDiving ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $037B ; Reset invincibility flag
LDA #$04 : STA $5D ; Put Link in Swimming State
; Handle overworld underwater swimming
LDA #$01 : STA $55 ; Set cape flag
STA $037B ; Set invincible flag
LDA #$08 : STA $5E ; Set underwater speed
JMP .return
.dive
; Handle overworld underwater swimming
LDA #$01 : STA $55 ; Set cape flag
STA $037B ; Set invincible flag
LDA #$08 : STA $5E ; Set underwater speed
LDA #$01 : STA !ZoraDiving ; Set underwater flag
STA $0351 ; Set ripple flag
; Splash visual effect
; Splash visual effect
LDA.b #$15 : LDY.b #$00
JSL AddTransitionSplash
; Stay in swimming mode
; Stay in swimming mode
LDA #$04 : STA $5D
; Splash sound effect
; LDA #$24 : STA $012E
; Splash sound effect
; LDA #$24 : STA $012E
.return
JSR $E8F0 ; HandleIndoorCameraAndDoors
RTS
}
; DUNGEON DIVE ------------------------------------------
; DUNGEON DIVE --------------------------------------------------------------
.dungeon
{
; Check if we are in water or not
LDA $5D : CMP #$04 : BNE .return_dungeon
; Check if already underwater
LDA !ZoraDiving : BNE .return_dungeon
; Check the Y button and clear state if activated
JSR Link_CheckNewY_ButtonPress : BCC .return_dungeon
LDA $3A : AND.b #$BF : STA $3A
; Check if we are in water or not
LDA $5D : CMP #$04 : BNE .return_dungeon : CLC
.dive_dungeon
; Splash effect
LDA.b #$15 : LDY.b #$00
JSL AddTransitionSplash
; Check if already underwater
LDA !ZoraDiving : BNE .return_dungeon : CLC
STZ $5D ; reset player to ground state
STZ $EE ; move link to lower level
LDA #$72 : STA $9A ; Set layer
LDA #$08 : STA $5E ; Set the player speed
STZ $0345 ; Reset deep water flag
LDA #$01 : STA !ZoraDiving ; Set the player underwater flag
; Check if we are on a proper tile or not
;
.return_dungeon
; Check the Y button and clear state if activated
JSR Link_CheckNewY_ButtonPress : BCC .return_dungeon
LDA $3A : AND.b #$BF : STA $3A
.dive_dungeon
; Splash effect
LDA.b #$15 : LDY.b #$00
JSL AddTransitionSplash
STZ $5D ; reset player to ground state
STZ $EE ; move link to lower level
LDA #$72
STA $9A ; Set layer
LDA #$08
STA $5E ; Set the player speed
STZ $0345 ; Reset deep water flag
LDA #$01
STA !ZoraDiving ; Set the player underwater flag
.return_dungeon
JSR $E8F0 ; HandleIndoorCameraAndDoors
RTS
}
@@ -162,33 +191,32 @@ LinkState_UsingZoraMask:
pushpc
; End of LinkState_Default
; End of LinkState_Default
org $0782D2
JSR LinkState_UsingZoraMask_dungeon_resurface
JSR $E8F0 ; HandleIndoorCameraAndDoors
CLC
RTS
assert pc() <= $0782DA
warnpc $078364
pullpc
.dungeon_resurface
{
LDA $1B : BEQ .return_overworld ; We are in overworld actually
LDA $1B : BEQ .return_default ; We are in overworld actually
; Check if the player is actually diving
; Check if the player is actually diving
LDA !ZoraDiving : BEQ .return_default
; Check precise tile types for interaction
LDA $0114 : CMP #$85 : BEQ .player_is_falling
CMP #$09 : BEQ .player_is_falling
CMP #$20 : BEQ .fall_into_pit
CMP #$23 : BEQ .return_default
LDA $0114 : CMP #$09 : BEQ .player_is_falling
LDA $5B : CMP #$02 : BEQ .dungeon_stairs
; Check if the ground level is safe
; Otherwise, eject the player back to the surface
LDA $0114 : BNE .remove_dive
LDA $0114 : BNE .remove_dive : CLC
; CMP.b #$09 : BEQ .remove_dive
; Check the Y button and clear state if activated
JSR Link_CheckNewY_ButtonPress : BCC .return_default
@@ -196,17 +224,17 @@ pullpc
{
; Restore Swimming Effects
LDA.b #$15 : LDY.b #$00 : JSL AddTransitionSplash
.remove_dive
.remove_dive
LDA #$04 : STA $5D ; Set Link to Swimming State
LDA #$01 : STA $EE ; Set Link to upper level
STA $0345 ; Set deep water flag
STA $0345 ; Set deep water flag
; Remove Diving Effects
.player_is_falling
.player_is_falling
LDA $67 : AND #$01 : STA $2F
STZ $5E ; Reset speed to normal
STZ !ZoraDiving ; Reset underwater flag
STZ !ZoraDiving ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $24 ; Reset z coordinate for link
STZ $0372 ; Reset link bounce flag
@@ -214,21 +242,14 @@ pullpc
JMP .return_default
}
.return_overworld
STZ !ZoraDiving
.return_default
.return_default
STZ $0302
RTS
.fall_into_pit
LDA.b #$03 : STA $5B
JSR $9427
JMP .return_default
}
pushpc
; C2C3
; Link_HopInOrOutOfWater_Vertical
org $07C307
JSR LinkState_UsingZoraMask_dungeon_stairs
RTS
@@ -238,13 +259,42 @@ pullpc
.dungeon_stairs
{
LDA $02B2 : CMP #$02 : BNE .return_hop
STZ $5E ; Reset speed to normal
STZ !ZoraDiving ; Reset underwater flag
LDA #$62 : STA $9A ; Reset dungeon layer
.return_hop
STZ $5E ; Reset speed to normal
STZ !ZoraDiving ; Reset underwater flag
LDA #$62 : STA $9A ; Reset dungeon layer
.return_hop
LDA #$06 : STA $5D ; Set Link to Recoil State
RTS
}
; =============================================================================
; TODO: Make this so it does not cancel if $0202 is still the same mask
; corresponding to the form the player is in.
; Also, prevent this from canceling minish form.
LinkState_ResetMaskAnimated:
{
LDA $02B2 : BEQ .no_mask
CMP.b #$05 : BEQ .no_mask
CMP.b #$06 : BEQ .gbc_form
CMP.b #$02 : BEQ .no_mask
CMP #$01 : BNE .transform
; Restore the sword, shield, and bow override
LDA $0AAF : STA.l $7EF35A
.transform
LDY.b #$04 : LDA.b #$23
JSL AddTransformationCloud
LDA.b #$14 : JSR Player_DoSfx2
STZ $02B2
JSL Palette_ArmorAndGloves
LDA #$10 : STA $BC
.no_mask
.gbc_form
RTL
}
print "End of Masks/zora_mask.asm ", pc
pushpc

View File

@@ -1,74 +0,0 @@
; =========================================================
; Meadow of Shadows
; =========================================================
; game will switch to part 1 after your uncle lEFt the house
lorom
org $05DF12
JSL $04ECA0
NOP
NOP
org $04ECA0
STZ.w SprState,x
STZ $02E4 ; repeat native code overwritten by hook
LDA #$02
STA $7EF3C5 ; store "part 2"
LDA #$00
STA $7EF3CC ; disable telepathic message
JSL $00FC41 ; fix monsters
RTL
; =========================================================
lorom
org $0cdc5a
JSR $ffb1
org $0cffb1
LDA #$0000
STA $7003C5,x
LDA #$0000
STA $7003C7,x
LDA #$00
STA $7003C8
LDA #$0101 ; 01=sword, 02 = shield to start with
STA $700359,x ; sword/shield save
LDY #$0000
RTS
; =========================================================
;Start Textbox Removed
; =========================================================
org $0281F2
NOP #4
; =========================================================
;Forest Fog for Log Woods
; =========================================================
; norom $12FC3
org $02AFC3
LDX.w #$0097
LDA.b $8A
CMP.w #$0010
; skip 2
; CMP.w #$0023 ; Another foggy area if needed.
; skip 2
; CMP.w #$0024 ; Another foggy area if needed.
; =========================================================
; no glove color
org $0DEE24
db $80

View File

@@ -9,7 +9,16 @@
; - Custom HUD with new magic meter
; =========================================================
pushpc
; update in game hud colors
org $1BD662 : dw hexto555($814f16), hexto555($552903)
org $1BD66A : dw hexto555($d51d00), hexto555($f9f9f9)
org $1DB672 : dw hexto555($d0a050), hexto555($f9f9f9)
org $1DB67A : dw hexto555($5987e0), hexto555($f9f9f9)
org $1DB682 : dw hexto555($7b7b83), hexto555($bbbbbb)
org $1DB68A : dw hexto555($a58100), hexto555($dfb93f)
; Free ROM in Bank 00
org $0098AB : db $6C
org $0098AC : db $64
@@ -28,7 +37,7 @@ org $8DDFB2 : LDA.l Menu_ItemIndex, X
pullpc
; =========================================================
; Menu Bank
; Menu Bank
org $2D8000
incsrc "menu_gfx_table.asm"
@@ -40,65 +49,39 @@ incsrc "menu_palette.asm"
Menu_Entry:
{
PHB : PHK : PLB
PHB : PHK : PLB
LDA.w $0200 : ASL : TAX
JSR (.vectors,X)
SEP #$20
PLB
RTL
.vectors
dw Menu_InitGraphics ; 00
dw Menu_UploadRight ; 01
dw Menu_UploadLeft ; 02
dw Menu_ScrollDown ; 03
dw Menu_ItemScreen ; 04
dw Menu_ScrollTo ; 05
dw Menu_StatsScreen ; 06
dw Menu_ScrollFrom ; 07
dw Menu_ScrollUp ; 08
dw Menu_RingBox ; 09
dw Menu_Exit ; 0A
dw Menu_InitiateScrollDown ; 0B
dw Menu_MagicBag ; 0C
dw Menu_SongMenu ; 0D
}
.vectors
dw Menu_InitGraphics ; 00
dw Menu_UploadRight ; 01
dw Menu_UploadLeft ; 02
dw Menu_ScrollDown ; 03
dw Menu_ItemScreen ; 04
dw Menu_ScrollTo ; 05
dw Menu_StatsScreen ; 06
dw Menu_ScrollFrom ; 07
dw Menu_ScrollUp ; 08
dw Menu_CheckBottle ; 09
dw Menu_Exit ; 0A
dw Menu_InitiateScrollDown ; 0B
; =========================================================
; 00 MENU INIT GRAPHICS
; 00 MENU INIT GRAPHICS
Menu_InitGraphics:
{
LDA.w $0780 : STA.w $00
LDA.w $0202
CMP.b #$10 : BNE .not_fishing
JSL DismissRodFromMenu
.not_fishing
CMP.b #$06 : BEQ .bottle
CMP.b #$0C : BEQ .bottle
CMP.b #$12 : BEQ .bottle
CMP.b #$18 : BEQ .bottle
CMP.b #$15 : BEQ .wolf_shovel
BRA +
.bottle
LDA $3A : AND.b #$80 : STA $3A
LDA $50 : AND.b #$FE : STA $50
LDA.b #$80 : STA $44 : STA $45
BRA +
.wolf_shovel
LDA.b $3A : AND.b #$80 : STA.b $3A
LDA.b $50 : AND.b #$FE : STA.b $50
+
STZ.w $030D ; SWEAT
STZ.w $0300 ; ITEMSTEP
STZ.w $037A ; USEY2
STZ.w $0301 ; USEY1
INC $0200
}
; =========================================================
; 01 MENU UPLOAD RIGHT
; 01 MENU UPLOAD RIGHT
incsrc "menu_draw.asm"
@@ -113,10 +96,11 @@ Menu_UploadRight:
JSR Menu_DrawQuestIcons
JSR Menu_DrawTriforceIcons
JSR Menu_DrawPendantIcons
JSR Menu_DrawMagicRings
JSR Menu_DrawPlaytimeLabel
JSR Menu_DrawHeartPieces
JSR Menu_DrawMusicNotes
JSR Menu_DrawQuestStatus
JSR Menu_DrawAreaNameTXT
JSR DrawLocationName
@@ -129,7 +113,7 @@ Menu_UploadRight:
}
; =========================================================
; 02 MENU UPLOAD LEFT
; 02 MENU UPLOAD LEFT
Menu_UploadLeft:
{
@@ -137,6 +121,7 @@ Menu_UploadLeft:
JSR DrawYItems
JSR Menu_DrawSelect
JSR Menu_DrawItemName
; INSERT PALETTE -------
LDX.w #$3E
@@ -145,17 +130,19 @@ Menu_UploadLeft:
STA.l $7EC502, X
DEX : DEX
BPL .loop
SEP #$30
;-----------------------
LDA.b #$22 : STA.w $0116
LDA.b #$01 : STA.b $17 : STA.b $15 ; added for palette
INC.w $0200
RTS
RTS
}
; =========================================================
; 03 MENU SCROLL DOWN
; 03 MENU SCROLL DOWN
Menu_Scroll:
dw 0, -3, -5, -7, -10, -12, -15, -20
@@ -171,7 +158,7 @@ Menu_ScrollDown:
LDX.w MenuScrollLevelV
INX : INX
LDA.w Menu_Scroll, X
LDA.w Menu_Scroll, X
STA.b $EA
CMP.w #$FF12 : BNE .notDoneScrolling
JMP Menu_InitItemScreen
@@ -182,7 +169,7 @@ Menu_ScrollDown:
}
; =========================================================
; 04 MENU ITEM SCREEN
; 04 MENU ITEM SCREEN
incsrc "menu_select_item.asm"
@@ -191,71 +178,75 @@ Menu_ItemScreen:
JSR Menu_CheckHScroll
INC $0207
LDA.w $0202 : BEQ .do_no_input
; Scroll through joypad 1 inputs
ASL : TAY : LDA.b $F4
LDA.w $0202 : BEQ .no_inputs
; Scroll through joypad 1 inputs
ASL : TAY : LDA.b $F4
LSR : BCS .move_right
LSR : BCS .move_left
LSR : BCS .move_down
LSR : BCS .move_up
LDA.w $0202 : CMP.b #$05 : BNE +
LDA.b $F6 : BIT.b #$80 : BEQ +
STZ.w $020B
LDA.b #$0C : STA.w $0200 ; Magic Bag
+
LDA.w $0202 : CMP.b #$0D : BNE ++
LDA.b $F6 : BIT.b #$80 : BEQ ++
LDA.b #$0D : STA.w $0200
JSR Menu_DeleteCursor
JSR Menu_DrawSongMenu
SEP #$30
JMP .exit
++
LDA.b $F6 : BIT.b #$40 : BEQ +++
JSR Menu_DeleteCursor
JSR Menu_DrawRingBox
STZ.w $020B
LDA.b #$09 : STA.w $0200 ; Ring Box
JMP .exit
+++
.do_no_input
BRA .no_inputs
.move_right
JSR Menu_DeleteCursor
JSR Menu_FindNextItem
BRA .draw_cursor
.move_left
JSR Menu_DeleteCursor
JSR Menu_FindPrevItem
BRA .draw_cursor
.move_down
.move_down
JSR Menu_DeleteCursor
JSR Menu_FindNextDownItem
BRA .draw_cursor
.move_up
.move_up
JSR Menu_DeleteCursor
JSR Menu_FindNextUpItem
BRA .draw_cursor
.draw_cursor
LDA.b #$20 : STA.w $012F ; cursor move sound effect
LDA.b #$20 : STA.w $012F ; cursor move sound effect
.no_inputs
SEP #$30
LDA.w $0202 : ASL : TAY
LDA.w $0202
ASL : TAY
REP #$10
LDX.w Menu_ItemCursorPositions-2, Y
JSR Menu_DrawCursor
LDA.b #$20 : BIT.w $0207
REP #$20
BEQ .no_delete
; Delete cursor
LDA.w #$20F5
STA.w $1108, X : STA.w $1148, X
STA.w $114E, X : STA.w $110E, X
STA.w $11C8, X : STA.w $1188, X
STA.w $118E, X : STA.w $11CE, X
BRA .done
.no_delete
LDA.w #$3060 : STA.w $1108, X ; corner
LDA.w #$3070 : STA.w $1148, X
LDA.w #$7060 : STA.w $110E, X ; corner
LDA.w #$7070 : STA.w $114E, X
LDA.w #$3070 : STA.w $1188, X
LDA.w #$B060 : STA.w $11C8, X ; corner
LDA.w #$7070 : STA.w $118E, X
LDA.w #$F060 : STA.w $11CE, X ; corner
.done
JSR Menu_DrawItemName
SEP #$20
.exit
LDA.b #$22 : STA.w $0116
LDA.b #$01 : STA.b $17
@@ -263,52 +254,57 @@ Menu_ItemScreen:
}
; =========================================================
; 05 MENU SCROLL TO
; 05 MENU SCROLL TO
Menu_ScrollTo:
{
SEP #$20
JSR Menu_ScrollHorizontal : BCC .not_done
SEP #$20
JSR Menu_ScrollHorizontal
BCC .not_done
INC.w $0200
.not_done
RTS
}
; =========================================================
; 06 MENU STATS SCREEN
; 06 MENU STATS SCREEN
incsrc "menu_scroll.asm"
Menu_StatsScreen:
{
JSR Menu_CheckHScroll
RTS
}
; =========================================================
; 07 MENU SCROLL FROM
; 07 MENU SCROLL FROM
Menu_ScrollFrom:
{
JSR Menu_ScrollHorizontal : BCC .not_done
JSR Menu_ScrollHorizontal
BCC .not_done
JMP Menu_InitItemScreen
.not_done
RTS
}
; =========================================================
; 08 MENU SCROLL UP
; 08 MENU SCROLL UP
Menu_ScrollUp:
{
{
SEP #$10
REP #$20
LDX.w MenuScrollLevelV
LDA.w Menu_Scroll, X
LDA.w Menu_Scroll, X
STA.b $EA : BNE .notDoneScrolling
STZ.b $E4
LDA.w #$000A : STA.w $0200
INC.w $0200
RTS
.notDoneScrolling
@@ -317,55 +313,56 @@ Menu_ScrollUp:
}
; =========================================================
; CHECK BOTTLE
; 09 CHECK BOTTLE
Menu_CheckBottle:
{
LDA.w $0202 : CMP.b #$06 : BNE .not_first
LDA.b #$0001 : JMP .prepare_bottle
.not_first
LDA.w $0202 : CMP.b #$06 : BNE .not_first
LDA.b #$0001 : JMP .prepare_bottle
.not_first
LDA.w $0202 : CMP.b #$0C : BNE .not_second
LDA.b #$0002 : JMP .prepare_bottle
.not_second
LDA.b #$0002 : JMP .prepare_bottle
.not_second
LDA.w $0202 : CMP.b #$12 : BNE .not_third
LDA.b #$0003 : JMP .prepare_bottle
.not_third
LDA.b #$0003 : JMP .prepare_bottle
.not_third
LDA.w $0202 : CMP.b #$18 : BNE .not_any
LDA.b #$0004
.prepare_bottle
STA.l BottleIndex
.not_any
RTS
LDA.b #$0004
.prepare_bottle
STA.l $7EF34F
.not_any
INC.w $0200
RTS
}
; =========================================================
; 0A MENU EXIT
; 0A MENU EXIT
Menu_Exit:
{
JSL LinkState_ResetMaskAnimated
JSR Menu_CheckBottle
REP #$20
; reset submodule
STZ $0200
; go back to the submodule we came from
; go back to the submodule we came from
LDA.w $010C : STA.b $10
; set $0303 by using $0202 to index table on exit
; set $0304 to prevent item + 1 animation exploits
LDX $0202
LDA.w Menu_ItemIndex, X : STA $0303 : STA.w $0304
LDX $0202
LDA.w Menu_ItemIndex, X : STA $0303
LDX.b #$3E
.loop
LDA.l $7EC300, X
LDA.l $7EC300, X
STA.l $7EC500, X
DEX : DEX
DEX : DEX
BPL .loop
INC.b $15
@@ -382,26 +379,36 @@ Menu_InitiateScrollDown:
REP #$20
; Clear out the whole buffer.
LDX.b #$FE ; $1700-17FF
LDX.b #$FE ; $1700-17FF
.loop
LDA.w #$387F
STA.w $1000, X : STA.w $1100, X
STA.w $1200, X : STA.w $1300, X
STA.w $1400, X : STA.w $1500, X
STA.w $1600, X : STA.w $1700, X
DEX : DEX : BNE .loop
STA.w $1000, X
STA.w $1100, X
STA.w $1200, X
STA.w $1300, X
STA.w $1400, X
STA.w $1500, X
STA.w $1600, X
STA.w $1700, X
; TODO: The BPL wasn't working so figure out why and
DEX : DEX
BNE .loop
; TODO: The BPL wasn't working so figure out why and
; fix it instead of doing this abomination.
STA.w $1000 : STA.w $1100
STA.w $1200 : STA.w $1300
STA.w $1400 : STA.w $1500
STA.w $1600 : STA.w $1700
STA.w $1000
STA.w $1100
STA.w $1200
STA.w $1300
STA.w $1400
STA.w $1500
STA.w $1600
STA.w $1700
SEP #$20
JSL RebuildHUD_long
JSL $0DFA58 ; HUD_Rebuild_Long
; Draw one frame of the clock so it doesn't just
; pop in when scrolling down.
@@ -433,307 +440,17 @@ Menu_InitiateScrollDown:
LDA.b #$24 : STA.w $0116
LDA.b #$01 : STA.b $17
LDA.b #$08 : STA.w $0200
LDA.b #$12 : STA.w $012F ; play menu exit sound effect
RTS
}
LDA.b #$12 : STA.w $012F ; play menu exit sound effect
; =========================================================
; 0C MENU MAGIC BAG
Menu_MagicBag:
{
JSR Menu_DrawMagicBag
JSR Menu_DrawMagicItems
SEP #$30
INC $0207
LDA.b $F4
LSR : BCS .move_right
LSR : BCS .move_left
LSR : BCS .move_down
LSR : BCS .move_up
BRA .continue
.move_up
.move_right
REP #$30
LDX.w Menu_MagicBagCursorPositions-2, Y
JSR Menu_DeleteCursor_AltEntry
INC.w $020B
LDA.w $020B : CMP.b #$06 : BCS .zero
BRA .continue
.move_down
.move_left
REP #$30
LDX.w Menu_MagicBagCursorPositions-2, Y
JSR Menu_DeleteCursor_AltEntry
LDA.w $020B : CMP.b #$00 : BEQ .continue
DEC.w $020B
BRA .continue
.zero
STZ.w $020B
.continue
JSR DrawCollectibleNamesAndCount
LDA.w $020B
ASL : TAY
REP #$10
LDX.w Menu_MagicBagCursorPositions, Y
JSR Menu_DrawCursor
JSR Submenu_Return
LDA.b #$22 : STA.w $0116
LDA.b #$01 : STA.b $17
RTS
}
Menu_MagicBagCursorPositions:
dw menu_offset(8,6) ; banana
dw menu_offset(8,10) ; pineapple
dw menu_offset(8,14) ; goron rock meat
dw menu_offset(12,6) ; seashells
dw menu_offset(12,10) ; honeycombs
dw menu_offset(12,14) ; deku sticks
; =========================================================
; 0D MENU SONG MENU
Menu_SongMenu:
{
REP #$30
JSR Menu_DrawMusicNotes
INC $0207
LDA.w CurrentSong : BEQ +
ASL : TAY
LDA.b $F4
LSR : BCS .move_right
LSR : BCS .move_left
LSR : BCS .move_down
LSR : BCS .move_up
+
JMP .continue
.move_right
.move_up
REP #$30
LDX.w Menu_SongIconCursorPositions-2, Y
JSR Menu_DeleteCursor_AltEntry
LDA.w CurrentSong : CMP.b #$04 : BEQ .reset
INC.w CurrentSong
LDA.w CurrentSong
PHA
LDA $7EF34C : CMP.b #$01 : BEQ .max_1
CMP.b #$02 : BEQ .max_2
CMP.b #$03 : BEQ .max_3
PLA
CMP.b #$05 : BCS .wrap_to_min
JMP .continue
.max_1
PLA : CMP.b #$02 : BCS .wrap_to_min
.max_2
PLA : CMP.b #$03 : BCS .wrap_to_min
JMP .continue
.max_3
PLA : CMP.b #$04 : BCS .wrap_to_min
JMP .continue
.wrap_to_max
LDA $7EF34C : CMP.b #$01 : BEQ .wrap_to_min
CMP.b #$02 : BEQ .set_max_to_2
CMP.b #$03 : BEQ .set_max_to_3
LDA #$04 : STA.w CurrentSong : JMP .continue
.set_max_to_3
LDA #$03 : STA.w CurrentSong : JMP .continue
.set_max_to_2
LDA #$02 : STA.w CurrentSong : JMP .continue
.wrap_to_min
LDA #$01 : STA.w CurrentSong
BRA .continue
.move_left
.move_down
REP #$30
LDX.w Menu_SongIconCursorPositions-2, Y
JSR Menu_DeleteCursor_AltEntry
LDA.w CurrentSong : CMP.b #$01 : BEQ .reset
DEC.w CurrentSong
LDA.w CurrentSong
CMP #$00 : BEQ .wrap_to_max
BRA .continue
.reset
LDA #$01 : STA.w CurrentSong
.continue
JSR Menu_DrawItemName
SEP #$30
LDA.w CurrentSong : ASL : TAY
REP #$10
LDX.w Menu_SongIconCursorPositions-2, Y
JSR Menu_DrawCursor
JSR Submenu_Return
SEP #$20
LDA.b #$22 : STA.w $0116
LDA.b #$01 : STA.b $17
RTS
}
Menu_SongIconCursorPositions:
dw menu_offset(8,4)
dw menu_offset(8,8)
dw menu_offset(8,12)
dw menu_offset(8,16)
; =========================================================
; 09 MENU RING BOX
Menu_RingBox:
{
JSR Menu_DrawRingBox
JSR Menu_DrawMagicRingsInBox
INC $0207
LDA.b $F4
LSR : BCS .move_right
LSR : BCS .move_left
LSR : BCS .move_down
LSR : BCS .move_up
BRA .continue
.move_up
.move_right
REP #$30
LDX.w Menu_RingIconCursorPositions-2, Y
JSR Menu_DeleteCursor_AltEntry
INC.w $020B
LDA.w $020B : CMP.b #$06 : BCS .zero
BRA .continue
.move_left
.move_down
REP #$30
LDX.w Menu_RingIconCursorPositions-2, Y
JSR Menu_DeleteCursor_AltEntry
LDA.w $020B : CMP.b #$00 : BEQ .continue
DEC.w $020B
BRA .continue
.zero
STZ.w $020B
.continue
JSR DrawMagicRingNames
LDA.w $020B : ASL : TAY
REP #$10
LDX.w Menu_RingIconCursorPositions, Y
JSR Menu_DrawCursor
JSR RingMenu_Controls
SEP #$20
LDA.b #$22 : STA.w $0116
LDA.b #$01 : STA.b $17
RTS
}
Menu_RingIconCursorPositions:
dw menu_offset(8,6)
dw menu_offset(8,10)
dw menu_offset(8,14)
dw menu_offset(12,6)
dw menu_offset(12,10)
dw menu_offset(12,14)
RingMenu_StoreRingToSlotStack:
{
; TODO: Check how many ring slots we currently have
; Check if the ring is already in a slot
STA.b $00
LDA.b $00 : CMP.l RingSlot1 : BEQ .return
LDA.b $00 : CMP.l RingSlot2 : BEQ .return
LDA.b $00 : CMP.l RingSlot3 : BEQ .return
PHA
; Check the SRAM for an available ring slot
; If none is available we shift the stack
; $7EF38C-7EF38E (Size 03)
LDA.l RingSlot1 : BEQ .slot1_available
LDA.l RingSlot2 : BEQ .slot2_available
LDA.l RingSlot3 : BEQ .slot3_available
; Shift the stack
LDA.l RingSlot2 : STA.l RingSlot1
LDA.l RingSlot3 : STA.l RingSlot2
.slot3_available
PLA : STA.l RingSlot3
.return
RTS
.slot1_available
PLA : STA.l RingSlot1
RTS
.slot2_available
PLA : STA.l RingSlot2
RTS
}
RingMenu_Controls:
{
; Load the current ring selected (0-5) into A
REP #$30
LDA.w $020B
AND.w #$00FF
SEP #$30
; Set the current ring to the cursor position
TAY ; Transfer A to Y for indexing
LDA.b $F6 : BIT.b #$80 : BEQ + ; Check if the confirm button is pressed
LDA .rings, Y ; Load the ring bitmask
AND.l MAGICRINGS ; Check if the ring is owned
BEQ + ; If not, skip setting the ring
INY #2
TYA ; Transfer Y to A
JSR RingMenu_StoreRingToSlotStack
+
; Return to item menu if player presses X
LDA.b $F6 : BIT.b #$40 : BEQ +
LDA.b #$01 : STA.w $0200
+
; Close the menu if the player presses start
LDA.b $F4 : BIT.b #$10 : BEQ +
LDA.b #$08 : STA.w $0200
+
RTS
.rings
db $20, $10, $08, $04, $02, $01
}
Submenu_Return:
{
; Return to the item menu if they press A
LDA.b $F6 : BIT.b #$80 : BEQ +
LDA.b #$02 : STA.w $0200
+
; Close the menu if the player presses start
LDA.b $F4 : BIT.b #$10 : BEQ +
LDA.b #$08 : STA.w $0200
+
RTS
}
menu_frame: incbin "tilemaps/menu_frame.tilemap"
quest_icons: incbin "tilemaps/quest_icons.tilemap"
incsrc "menu_map_names.asm"
print "End of Menu/menu.asm ", pc
incsrc "menu_hud.asm"
print "End of Menu/menu_hud.asm ", pc
; =========================================================

View File

@@ -1,11 +1,11 @@
; =========================================================
; Tilemap Menu background
; Tilemap Menu background
; This function is bled into via the previous menu.asm file.
Menu_DrawBackground:
{
REP #$30
LDX.w #$FE ; $1700-17FF
LDX.w #$FE ; $1700-17FF
.loop
LDA.w menu_frame, X
@@ -32,7 +32,7 @@ Menu_DrawBackground:
}
; =========================================================
; Menu Item Draw Routine
; Menu Item Draw Routine
; Credit to Kan
DrawMenuItem:
@@ -53,32 +53,39 @@ DrawMenuItem:
TAY
.draw
LDA.w $0000,Y : STA.w $1108,X
LDA.w $0002,Y : STA.w $110A,X
LDA.w $0004,Y : STA.w $1148,X
LDA.w $0006,Y : STA.w $114A,X
LDA.w $0000,Y : STA.w $1108,X
LDA.w $0002,Y : STA.w $110A,X
LDA.w $0004,Y : STA.w $1148,X
LDA.w $0006,Y : STA.w $114A,X
RTS
}
; =========================================================
; Quest Icons Tilemap Draw Routine
; Quest Icons Tilemap Draw Routine
Menu_DrawQuestIcons:
{
LDX.w #$10
.loop
LDA.w quest_icons, X : STA.w $1364, X
LDA.w quest_icons+$10, X : STA.w $13A4, X
LDA.w quest_icons+$20, X : STA.w $13E4, X
LDA.w quest_icons+$30, X : STA.w $1424, X
LDA.w quest_icons+$40, X : STA.w $1464, X
LDA.w quest_icons+$50, X : STA.w $14A4, X
LDA.w quest_icons+$60, X : STA.w $14E4, X
DEX : DEX : BPL .loop
LDA.w quest_icons, X
STA.w $1364, X
LDA.w quest_icons+$10, X
STA.w $13A4, X
LDA.w quest_icons+$20, X
STA.w $13E4, X
LDA.w quest_icons+$30, X
STA.w $1424, X
LDA.w quest_icons+$40, X
STA.w $1464, X
LDA.w quest_icons+$50, X
STA.w $14A4, X
LDA.w quest_icons+$60, X
STA.w $14E4, X
DEX : DEX : BPL .loop
LDA.w #$20F5 : STA.w $13B4 : STA.w $13F4 : STA.w $1474 : STA.w $14B4
LDA.w #$20F5 : STA.w $13B4 : STA.w $13F4 : STA.w $1474 : STA.w $14B4
RTS
}
@@ -87,11 +94,11 @@ Menu_DrawQuestIcons:
Menu_DrawTriforceIcons:
{
LDA.l $7EF37A
LDX.w #$3534
LDA.l $7EF37A
LDX.w #$3534
LDY.w #$3544
LSR : BCC +
LSR : BCC +
STX.w $1366 : INX : STX.w $1368 : DEX
STY.w $13A6 : INY : STY.w $13A8 : DEY
+
@@ -105,22 +112,22 @@ Menu_DrawTriforceIcons:
STX.w $136E : INX : STX.w $1370 : DEX
STY.w $13AE : INY : STY.w $13B0 : DEY
+
LSR : BCC +
STX.w $13E4 : INX : STX.w $13E6 : DEX
STY.w $1424 : INY : STY.w $1426 : DEY
+
LSR : BCC +
STX.w $13E8 : INX : STX.w $13EA : DEX
STY.w $1428 : INY : STY.w $142A : DEY
+
LSR : BCC +
STX.w $13EC : INX : STX.w $13EE : DEX
STY.w $142C : INY : STY.w $142E : DEY
+
LSR : BCC +
STX.w $13F0 : INX : STX.w $13F2 : DEX
STY.w $1430 : INY : STY.w $1432 : DEY
@@ -135,21 +142,19 @@ Menu_DrawPendantIcons:
{
LDA.l $7EF374
; Power
LSR : BCC +
LDX.w #$2502 : STX.w $14A4 : INX : STX.w $14A6
LDX.w #$2512 : STX.w $14E4 : INX : STX.w $14E6
+
LSR : BCC +
LDX.w #$3D3D : STX.w $14AA : INX : STX.w $14AC
LDX.w #$BD3D : STX.w $14EA : INX : STX.w $14EC
LDX.w #$3D00 : STX.w $14AA : INX : STX.w $14AC
LDX.w #$3D10 : STX.w $14EA : INX : STX.w $14EC
+
; Wisdom
LSR : BCC +
LDX.w #$2D23 : STX.w $14B0 : INX : STX.w $14B2
LDX.w #$AD23 : STX.w $14F0 : INX : STX.w $14F2
LDX.w #$2D06 : STX.w $14B0 : INX : STX.w $14B2
LDX.w #$2D16 : STX.w $14F0 : INX : STX.w $14F2
+
RTS
@@ -170,7 +175,7 @@ Menu_DrawHeartPieces:
{
; Empty heart containter
LDX.w #$2484 : STX.w $149E ; top left
LDX.w #$6484 : STX.w $14A0 ; top right
LDX.w #$6484 : STX.w $14A0 ; top right
LDX.w #$2485 : STX.w $14DE ; bottom left
LDX.w #$6485 : STX.w $14E0 ; bottom right
@@ -185,62 +190,36 @@ Menu_DrawHeartPieces:
LDX.w #$64AD : STX.w $14A0
.bottom_left
LDX.w #$24AE : STX.w $14DE
LDX.w #$24AE : STX.w $14DE
.top_left
LDX.w #$24AD : STX.w $149E
LDX.w #$24AD : STX.w $149E
RTS
}
; =========================================================
; TODO: Attach SRAM values to these for progression
Menu_DrawMusicNotes:
{
SEP #$30
LDA.b #$7E : STA.b $0A ; Set up the bank of our indirect address
REP #$30
LDA.l $7EF34C : AND.w #$00FF : CMP.w #$0001 : BCC .no_storms
LDA.w #$0002 : BRA .draw_storms
.no_storms
LDA.w #$0001
.draw_storms
LDA.w #$02
STA.w MusicNoteValue
LDA.w #MusicNoteValue
LDX.w #menu_offset(9,5)
LDX.w #menu_offset(17,14)
LDY.w #QuarterNoteGFX
JSR DrawMenuItem
LDA.l $7EF34C : AND.w #$00FF : CMP.w #$0002 : BCC .no_healing
LDA.w #$03 : BRA .draw_healing
.no_healing
LDA.w #$01
.draw_healing
LDA.w #$03
STA.w MusicNoteValue
LDA.w #MusicNoteValue
LDX.w #menu_offset(9,9)
LDX.w #menu_offset(17,17)
LDY.w #QuarterNoteGFX
JSR DrawMenuItem
LDA.l $7EF34C : AND.w #$00FF : CMP.w #$0003 : BCC .no_soaring
LDA.w #$04 : BRA .draw_soaring
.no_soaring
LDA.w #$01
.draw_soaring
LDA.w #$04
STA.w MusicNoteValue
LDA.w #MusicNoteValue
LDX.w #menu_offset(9,13)
LDY.w #QuarterNoteGFX
JSR DrawMenuItem
LDA.l $7EF34C : AND.w #$00FF : CMP.w #$0004 : BCC .no_songs
LDA.w #$05 : BRA .draw_songs
.no_songs
LDA.w #$01
.draw_songs
STA.w MusicNoteValue
LDA.w #MusicNoteValue
LDX.w #menu_offset(9,17)
LDX.w #menu_offset(17,20)
LDY.w #QuarterNoteGFX
JSR DrawMenuItem
@@ -250,7 +229,7 @@ Menu_DrawMusicNotes:
; =========================================================
DrawYItems:
{
{
SEP #$30
LDA.b #$7E : STA.b $0A ; Set up the bank of our indirect address
REP #$30
@@ -287,7 +266,7 @@ DrawYItems:
.no_bomb
LDA.w #$7EF344
LDX.w #menu_offset(7,16)
LDX.w #menu_offset(7,16)
LDY.w #PowderGFX
JSR DrawMenuItem
@@ -298,7 +277,7 @@ DrawYItems:
; Row 2 -------------------------------------------------
LDA.w #$7EF34B
LDA.w #$7EF34B
LDX.w #menu_offset(10,3)
LDY.w #HammerGFX
JSR DrawMenuItem
@@ -333,7 +312,7 @@ DrawYItems:
LDA.l $7EF34C : AND.w #$00FF : CMP.w #$0000 : BEQ .no_ocarina
LDA.w $030F : BNE .spoof_ocarina
LDA #$0001 ; Multi-songs not unlocked yet
.spoof_ocarina
.spoof_ocarina
STA.w ShortSpoof : LDA.w #ShortSpoof
LDX.w #menu_offset(13,3)
@@ -348,20 +327,22 @@ DrawYItems:
JSR DrawMenuItem
.no_book
LDA.w #$7EF350
LDX.w #menu_offset(13,9)
LDY.w #SomariaGFX
JSR DrawMenuItem
; LDA.l $7EF350 : CMP.w #$00 : BEQ .no_somaria
; LDA.w SomariaOrByrna : BNE .spoof_somaria
; .spoof_somaria
; LDA.w #$7EF351
LDA.l $7EF351 : AND.w #$00FF : CMP.w #$00 : BEQ .no_rods
LDA.w FishingOrPortalRod
INC A
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(13,13)
LDY.w #FishingRodGFX
; LDA.w #$01 : STA.w ShortSpoof : LDA.w #ShortSpoof
LDA.w #$7EF350
LDX.w #menu_offset(13,9)
LDY.w #SomariaGFX
JSR DrawMenuItem
.no_rods
.no_somaria
LDA.w #$7EF351
LDX.w #menu_offset(13,13)
;LDY.w #ByrnaGFX
LDY.w #FishingRodGFX
JSR DrawMenuItem
LDA.w #$7EF34D
LDX.w #menu_offset(13,16)
@@ -419,7 +400,7 @@ Menu_DrawQuestItems:
LDA.w #$7EF359
LDX.w #menu_offset(14,2)
LDY.w #SwordGFX
JSR DrawMenuItem
JSR DrawMenuItem
LDA.w #$7EF35A
LDX.w #menu_offset(14,5)
@@ -439,14 +420,14 @@ Menu_DrawQuestItems:
LDY.w #PowerGloveGFX
JSR DrawMenuItem
LDA.w #$7EF356
LDA.w #$7EF355
LDX.w #menu_offset(17,5)
LDY.w #FlippersGFX
LDY.w #PegasusBootsGFX
JSR DrawMenuItem
LDA.w #$7EF355
LDA.w #$7EF356
LDX.w #menu_offset(17,8)
LDY.w #PegasusBootsGFX
LDY.w #FlippersGFX
JSR DrawMenuItem
LDA.w #$7EF357
@@ -463,6 +444,7 @@ Menu_DrawBigKey:
{
LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalace
LSR A : TAX
; Check if we have the big key in this palace
LDA $7EF366
@@ -500,6 +482,7 @@ Menu_DrawBigKey:
LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalaceAgain
LSR A : TAX
; Check if we have the map in this dungeon
LDA $7EF368
@@ -516,6 +499,7 @@ Menu_DrawBigKey:
.dontHaveMap
.notInPalaceAgain
RTS
}
@@ -525,8 +509,11 @@ Menu_DrawBigKey:
CheckPalaceItemPossession:
{
SEP #$30
LDA $040C : LSR A
JSL JumpTableLocal
JSL UseImplicitRegIndexedLocalJumpTable
dw .no_item
dw .no_item
dw .bow
@@ -552,6 +539,7 @@ CheckPalaceItemPossession:
STZ $02
STZ $03
RTS
.bow
@@ -567,6 +555,7 @@ CheckPalaceItemPossession:
LDA.b #$01 : STA $02
STZ $03
RTS
.power_glove
@@ -604,24 +593,30 @@ CheckPalaceItemPossession:
.mirror_shield
LDA $7EF35A : CMP.b #$03 : BEQ .success
STZ $02
STZ $03
RTS
.red_mail
LDA $7EF35B : CMP.b #$02 : BEQ .success
STZ $02
STZ $03
RTS
}
; *$6EF39-$6EF66 LOCAL
Menu_DrawBigChestKey:
{
{
LDA $040C : AND.w #$00FF : CMP.w #$00FF : BEQ .notInPalace
LSR A : TAX
LDA $7EF364
.locateCompassFlag
ASL A : DEX : BPL .locateCompassFlag
@@ -636,285 +631,11 @@ Menu_DrawBigChestKey:
LDX.w #menu_offset(11, 5)
LDY.w #BigChestKeyGFX
JSR DrawMenuItem
.dontHaveCompass
.notInPalace
RTS
}
Menu_DrawSongMenu:
{
REP #$30
LDX.w #$FE ; $1700-17FF
.loop
LDA.w .magic_bag_tilemap, X
STA.w $1000, X
LDA.w .magic_bag_tilemap+$100, X
STA.w $1100, X
LDA.w .magic_bag_tilemap+$200, X
STA.w $1200, X
LDA.w .magic_bag_tilemap+$300, X
STA.w $1300, X
LDA.w .magic_bag_tilemap+$400, X
STA.w $1400, X
LDA.w .magic_bag_tilemap+$500, X
STA.w $1500, X
LDA.w .magic_bag_tilemap+$600, X
STA.w $1600, X
LDA.w .magic_bag_tilemap+$700, X
STA.w $1700, X
DEX : DEX
BPL .loop
RTS
.magic_bag_tilemap
incbin "tilemaps/song_menu.tilemap"
}
Menu_DrawMagicBag:
{
REP #$30
LDX.w #$FE ; $1700-17FF
.loop
LDA.w .magic_bag_tilemap, X
STA.w $1000, X
LDA.w .magic_bag_tilemap+$100, X
STA.w $1100, X
LDA.w .magic_bag_tilemap+$200, X
STA.w $1200, X
LDA.w .magic_bag_tilemap+$300, X
STA.w $1300, X
LDA.w .magic_bag_tilemap+$400, X
STA.w $1400, X
LDA.w .magic_bag_tilemap+$500, X
STA.w $1500, X
LDA.w .magic_bag_tilemap+$600, X
STA.w $1600, X
LDA.w .magic_bag_tilemap+$700, X
STA.w $1700, X
DEX : DEX
BPL .loop
RTS
.magic_bag_tilemap
incbin "tilemaps/magic_bag.tilemap"
}
Menu_DrawRingBox:
{
REP #$30
LDX.w #$FE ; $1700-17FF
.loop
LDA.w .ring_box_tilemap, X
STA.w $1000, X
LDA.w .ring_box_tilemap+$100, X
STA.w $1100, X
LDA.w .ring_box_tilemap+$200, X
STA.w $1200, X
LDA.w .ring_box_tilemap+$300, X
STA.w $1300, X
LDA.w .ring_box_tilemap+$400, X
STA.w $1400, X
LDA.w .ring_box_tilemap+$500, X
STA.w $1500, X
LDA.w .ring_box_tilemap+$600, X
STA.w $1600, X
LDA.w .ring_box_tilemap+$700, X
STA.w $1700, X
DEX : DEX
BPL .loop
SEP #$30
RTS
.ring_box_tilemap
incbin "tilemaps/ring_box.tilemap"
}
Menu_DrawMagicRings:
{
LDA.l RingSlot1 : AND.w #$00FF : CMP.w #$0001 : BCC .no_attack
BRA .draw_storms
.no_attack
LDA.w #$0001
.draw_storms
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(17,14)
LDY.w #RingGFX
JSR DrawMenuItem
LDA.l RingSlot2 : AND.w #$00FF : CMP.w #$0001 : BCC .no_defense
BRA .draw_defense
.no_defense
LDA.w #$0001
.draw_defense
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(17,17)
LDY.w #RingGFX
JSR DrawMenuItem
LDA.l RingSlot3 : AND.w #$00FF : CMP.w #$0001 : BCC .no_luck
BRA .draw_luck
.no_luck
LDA.w #$0001
.draw_luck
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(17,20)
LDY.w #RingGFX
JSR DrawMenuItem
RTS
}
Menu_DrawMagicRingsInBox:
{
SEP #$30
LDA.b #$7E : STA.b $0A ; Set up the bank of our indirect address
REP #$30
LDA.l MAGICRINGS : AND.w #$00FF : BIT.w #$0020 : BEQ .no_attack
LDA.w #$0002 : BRA +
.no_attack
LDA.w #$0001
+
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(9,7)
LDY.w #RingGFX
JSR DrawMenuItem
LDA.l MAGICRINGS : AND.w #$00FF : BIT.w #$0010 : BEQ .no_defense
LDA.w #$0003 : BRA +
.no_defense
LDA.w #$0001
+
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(9,11)
LDY.w #RingGFX
JSR DrawMenuItem
LDA.l MAGICRINGS : AND.w #$00FF : BIT.w #$0008 : BEQ .no_steadfast
LDA.w #$0004 : BRA +
.no_steadfast
LDA.w #$0001
+
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(9,15)
LDY.w #RingGFX
JSR DrawMenuItem
LDA.l MAGICRINGS : AND.w #$00FF : BIT.w #$0004 : BEQ .no_light
LDA.w #$0005 : BRA +
.no_light
LDA.w #$0001
+
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(13,7)
LDY.w #RingGFX
JSR DrawMenuItem
LDA.l MAGICRINGS : AND.w #$00FF : BIT.w #$0002 : BEQ .no_blast
LDA.w #$0006 : BRA +
.no_blast
LDA.w #$0001
+
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(13,11)
LDY.w #RingGFX
JSR DrawMenuItem
LDA.l MAGICRINGS : AND.w #$00FF : BIT.w #$0001 : BEQ .no_heart
LDA.w #$0007 : BRA +
.no_heart
LDA.w #$0001
+
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(13,15)
LDY.w #RingGFX
JSR DrawMenuItem
SEP #$30
RTS
}
Menu_DrawMagicItems:
{
SEP #$30
LDA.b #$7E : STA.b $0A ; Set up the bank of our indirect address
REP #$30
LDA.w #$0001
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(9,7)
LDY.w #BananaGFX
JSR DrawMenuItem
LDA.w #$0001
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(9,11)
LDY.w #PineappleGFX
JSR DrawMenuItem
LDA.w #$0001
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(9,15)
LDY.w #RockMeatGFX
JSR DrawMenuItem
LDA.w #$0001
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(13,7)
LDY.w #SeashellGFX
JSR DrawMenuItem
LDA.w #$0001
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(13,11)
LDY.w #HoneycombGFX
JSR DrawMenuItem
LDA.w #$0001
STA.w MenuItemValueSpoof : LDA.w #MenuItemValueSpoof
LDX.w #menu_offset(13,15)
LDY.w #DekuStickGFX
JSR DrawMenuItem
RTS
}
Menu_DrawCursor:
{
LDA.b #$20 : BIT.w $0207
REP #$20
BEQ .no_delete
; Delete cursor
LDA.w #$20F5
STA.w $1108, X : STA.w $1148, X
STA.w $114E, X : STA.w $110E, X
STA.w $11C8, X : STA.w $1188, X
STA.w $118E, X : STA.w $11CE, X
BRA .done
.no_delete
LDA.w #$3060 : STA.w $1108, X ; corner
LDA.w #$3070 : STA.w $1148, X
LDA.w #$7060 : STA.w $110E, X ; corner
LDA.w #$7070 : STA.w $114E, X
LDA.w #$3070 : STA.w $1188, X
LDA.w #$B060 : STA.w $11C8, X ; corner
LDA.w #$7070 : STA.w $118E, X
LDA.w #$F060 : STA.w $11CE, X ; corner
.done
SEP #$20
RTS
}
; =========================================================

View File

@@ -7,6 +7,8 @@
NothingGFX:
dw $20F5, $20F5, $20F5, $20F5
; ---------------------------------------------------------
BowsGFX:
dw $28BA, $28E9, $28E8, $28CB ; Empty bow
@@ -14,69 +16,105 @@ BowsGFX:
dw $28BA, $28E9, $28E8, $28CB ; Empty silvers bow
dw $28BA, $28BB, $24CA, $28CB ; Silver bow and arrows
; ---------------------------------------------------------
BoomsGFX:
dw $2CB8, $2CB9, $2CC9, $ACB9 ; Blue boomerang
dw $24B8, $24B9, $24C9, $A4B9 ; Red boomerang
; ---------------------------------------------------------
HookGFX:
dw $24F5, $24F6, $24C0, $24F5 ; Hookshot
dw $2C17, $3531, $2D40, $3541 ; Ball & Chain
; ---------------------------------------------------------
BombsGFX:
dw $2CB2, $2CB3, $2CC2, $6CC2 ; Bombs
; ---------------------------------------------------------
PowderGFX:
dw $2444, $2445, $2446, $2447 ; Mushroom
dw $283B, $283C, $283D, $283E ; Powder
; ---------------------------------------------------------
Fire_rodGFX:
dw $24B0, $24B1, $24C0, $24C1 ; Fire Rod
; ---------------------------------------------------------
Ice_rodGFX:
dw $2CB0, $2CBE, $2CC0, $2CC1 ; Ice Rod
; ---------------------------------------------------------
; formerly Quake
DekuMaskGFX:
dw $2066, $6066, $2076, $6076
; ---------------------------------------------------------
; formerly Ether
BunnyHoodGFX:
dw $3469, $7469, $3479, $7479
; ---------------------------------------------------------
LampGFX:
dw $24BC, $24BD, $24CC, $64CC
; ---------------------------------------------------------
HammerGFX:
dw $24B6, $24B7, $20C6, $24C7
; ---------------------------------------------------------
ShovelGFX:
dw $30D0, $20D1, $30E0, $30E1
; ---------------------------------------------------------
OcarinaGFX:
dw $2CD4, $2CD5, $2CE4, $2CE5 ; Blue
dw $2CD4, $2CD5, $2CE4, $2CE5
dw $3CD4, $3CD5, $3CE4, $3CE5 ; Green
dw $24D4, $24D5, $24E4, $24E5 ; Red
dw $34D4, $34D5, $34E4, $34E5 ; Gold
; ---------------------------------------------------------
BigKeyGFX:
dw $34D6, $74D6, $34E6, $34E7
; ---------------------------------------------------------
BigChestKeyGFX:
dw $34BF, $74BF, $34E6, $34E7
; ---------------------------------------------------------
MapGFX:
dw $2936, $2937, $2946, $2947
dw $2936, $2937, $2946, $2947
; ---------------------------------------------------------
TreasureChestGFX:
dw $294B, $294C, $294D, $294E
; ---------------------------------------------------------
; formerly fishing net
JumpFeatherGFX:
dw $2840, $2841, $3C42, $3C43
; ---------------------------------------------------------
BookGFX:
dw $3CA5, $3CA6, $3CD8, $3CD9
dw $3CA5, $3CA6, $3CD8, $3CD9
; ---------------------------------------------------------
BottlesGFX:
dw $2044, $2045, $2046, $2047 ; Mushroom
@@ -87,24 +125,30 @@ BottlesGFX:
dw $2855, $6855, $2C57, $2C5A ; Fairy
dw $2837, $2838, $2839, $283A ; Bee
dw $2837, $2838, $2839, $283A ; Good bee
dw $2837, $2838, $3CF7, $3CF8 ; Magic Bean
dw $2837, $2838, $3CFB, $3CFC ; Milk Bottle
; ---------------------------------------------------------
SomariaGFX:
dw $24DC, $24DD, $24EC, $24ED
dw $24DC, $24DD, $24EC, $24ED
; ---------------------------------------------------------
ByrnaGFX:
dw $2CDC, $2CDD, $2CEC, $2CED
FishingRodGFX:
dw $2C82, $2C83, $2C8B, $2C8C
dw $2C82, $2C83, $2C8B, $2C8C
PortalRodGFX:
dw $2CF0, $24F1, $30EC, $E4F0
dw $2CF0, $24F1, $30EC, $24F2
; ---------------------------------------------------------
; formerly Magic Cape
StoneMaskGFX:
dw $30B4, $30B5, $30C4, $30C5
dw $30B4, $30B5, $30C4, $30C5
; ---------------------------------------------------------
WolfMaskGFX:
dw $3086, $7086, $3087, $7087
@@ -112,17 +156,22 @@ WolfMaskGFX:
dw $3086, $7086, $3087, $7087
dw $3086, $7086, $3087, $7087
; ---------------------------------------------------------
; Formerly Bombos
ZoraMaskGFX:
dw $2C88, $6C88, $2C89, $6C89
; ---------------------------------------------------------
MirrorGFX:
dw $2C72, $2C73, $2C62, $2C63 ; Mirror
dw $2C62, $2C63, $2C72, $2C73 ; Mirror
; =========================================================
; =============================================================================
; Collectibles
; ---------------------------------------------------------
; vhopppcc cccccccc
@@ -133,66 +182,62 @@ QuarterNoteGFX:
dw $24AA, $246B, $247A, $246A ; Red Note
dw $34AA, $346B, $347A, $346A ; Gold Note
BananaGFX:
dw $341E, $341F, $342E, $342F ; Banana
; ---------------------------------------------------------
RingGFX:
dw $3049, $304A, $B049, $B04A ; Gray Ring
dw $2449, $244A, $A449, $A44A ; Red Ring
dw $2C49, $2C4A, $AC49, $AC4A ; Blue Ring
dw $3C49, $3C4A, $BC49, $BC4A ; Green Ring
dw $2849, $284A, $A849, $A84A ; Gold Ring
dw $3449, $344A, $B449, $B44A ; Silver Ring
dw $2049, $204A, $A049, $A04A ; Black Ring
TradeQuestGFX:
dw $3D36, $3D37, $3D46, $3D47 ; Yoshi Doll
dw $28DE, $28DF, $28EE, $28EF ; Tasty Meat
dw $346C, $346D, $347C, $347D ; This shit is Bananas!
dw $241E, $241F, $242E, $242F ; Pretty Bow
dw $3D7E, $3D7F, $356C, $756C ; Pineapple
PineappleGFX:
dw $3D7C, $3D7D, $356C, $756C ; Pineapple
RockMeatGFX:
dw $20D0, $20D1, $20E0, $20E1 ; Rock Meat
SeashellGFX:
dw $2D06, $2D07, $2D16, $2D17 ; Seashell
HoneycombGFX:
dw $28F9, $68F9, $28FB, $28FC ; Honeycomb
DekuStickGFX:
dw $2067, $20F5, $2077, $20F5 ; Deku Stick
; =========================================================
; Equipped Items
PegasusBootsGFX:
dw $2429, $242A, $242B, $242C ; Pegasus Boots
dw $2429, $242A, $242B, $242C ; Pegasus Boots
; ---------------------------------------------------------
PowerGloveGFX:
dw $30DA, $30DB, $30EA, $30EB ; Worn-Out Glove
dw $28DA, $28DB, $28EA, $28EB ; Power Glove
; ---------------------------------------------------------
FlippersGFX:
dw $2C9A, $2C9B, $2C9D, $2C9E
dw $2C9A, $2C9B, $2C9D, $2C9E
; ---------------------------------------------------------
MoonPearlGFX:
dw $2433, $2434, $2435, $2436
dw $2433, $2434, $2435, $2436
; ---------------------------------------------------------
SwordGFX:
dw $2C64, $2CCE, $2C75, $EC64 ; level one
dw $2C64, $2C65, $2C74, $2D26 ; level two
dw $248A, $2465, $3C74, $2D48 ; level three
dw $288A, $2865, $2C74, $2D39 ; level four
dw $2C64, $2CCE, $2C75, $EC64 ; level one
dw $2C64, $2C65, $2C74, $2D26 ; level two
dw $3464, $3465, $3475, $3429 ; level three
dw $3864, $3865, $3875, $3829 ; level four
; ---------------------------------------------------------
ShieldGFX:
dw $2CFD, $6CFD, $2CFE, $6CFE ; baby shield
dw $2CFF, $6CFF, $2C9F, $6C9F ; island shield
dw $2C80, $2C81, $2C8D, $2C8E ; mirror shield
; ---------------------------------------------------------
TunicGFX:
dw $3C68, $7C68, $3C78, $7C78 ; green tunic
dw $2C68, $6C68, $2C78, $6C78 ; blue tunic
dw $2468, $6468, $2478, $6478 ; red tunic
dw $3468, $7468, $3478, $7478 ; gold tunic
; Static Text on the Menu
; =============================================================================
; Static Text on the Menu
SelectItemTXT:
dw $2562, $2554, $255B, $2554
@@ -202,11 +247,11 @@ SelectItemTXT:
QuestStatusTXT:
dw $2560, $2564, $2554, $2562
dw $2563, $2417, $2562, $2563
dw $2550, $2563, $2564, $2562
dw $2550, $2563, $2564, $2562
AreaNameTXT:
dw $243F, $2550, $2561, $2554
dw $2550, $2417, $255D, $2550
dw $255C, $2554, $241C, $2430
dw $2430, $2430, $2430, $2430
dw $2430, $2430, $2430, $2430
dw $2430, $2430, $2430, $2430

View File

@@ -30,6 +30,7 @@ org $0DF14F ; AnimateHeartRefill
LDA.b #$C7 : STA $01
LDA.b #$7E : STA $02
; ==========================================================
; Main HUD Update Loop
@@ -175,8 +176,9 @@ HUD_Update:
; Also check to see if the key spot is blank
LDA $05 : AND.w #$00FF : ORA.w #$2400 : STA $7EC7A4
CMP.w #$247F : BNE .dont_blank_key_icon
; TODO: Find the proper index of the key icon, this one is outdated.
; If the key digit is blank, also blank out the key icon.
STA $7EC764
STA $7EC724
.dont_blank_key_icon
@@ -221,18 +223,17 @@ HUD_UpdateItemBox:
LDA $7EF340 : BEQ .no_bow
CMP.b #$03 : BCC .no_silver_arrows
; Check how many arrows the player has:
LDA $7EF377 : BNE .silver_with_arrows
LDA $7EF377 : BNE .draw_bow_item_icon
LDX.b #$03
BRA .draw_bow_item_icon
.no_silver_arrows
LDX.b #$02
LDA $7EF377 : BNE .draw_bow_item_icon
LDX.b #$01
BRA .draw_bow_item_icon
.silver_with_arrows
LDX.b #$04
.draw_bow_item_icon
; Values of X correspond to how the icon will end up drawn:
; 0x01 - normal bow with no arrows
@@ -287,12 +288,9 @@ HUD_UpdateItemBox:
CPX.w #$0003 : BNE .hookshot_not_equipped
LDA.w GoldstarOrHookshot : BEQ .hookshot_not_equipped
SEC : SBC.w #$0001
.hookshot_not_equipped
SEC : SBC.b #$01
CPX.w #$0010 : BNE .custom_rod_not_equipped
LDA.w FishingOrPortalRod
.custom_rod_not_equipped
.hookshot_not_equipped
JSR HUD_DrawItem
@@ -324,35 +322,36 @@ HUD_UpdateHearts:
; Draws hearts in a painfully slow loop
LDX.w #$0000
.next_heart
.next_heart
LDA.b $00 : CMP.w #$0008 : BCC .less_than_one_heart
; Notice no SEC was needed since carry is assumedly set.
SBC.w #$0008 : STA.b $00
LDY.w #$0004
JSR .draw_heart
INX #2
BRA .next_heart
.less_than_one_heart
; Notice no SEC was needed since carry is assumedly set.
SBC.w #$0008 : STA.b $00
LDY.w #$0004
JSR .draw_heart
INX #2
BRA .next_heart
.less_than_one_heart
CMP.w #$0005 : BCC .half_heart_or_less
LDY.w #$0004
BRA .draw_heart
.half_heart_or_less
LDY.w #$0004
BRA .draw_heart
.half_heart_or_less
CMP.w #$0001 : BCC .empty_heart
LDY.w #$0002
BRA .draw_heart
.empty_heart
LDY.w #$0002
BRA .draw_heart
.empty_heart
RTS
.draw_heart
.draw_heart
; Compare number of hearts so far on current line to 10
CPX.w #$0014 : BCC .no_line_change
; if not, we have to move down one tile in the tilemap
LDX.w #$0000
LDA.b $07 : CLC : ADC.w #$0040 : STA.b $07
.no_line_change
; if not, we have to move down one tile in the tilemap
LDX.w #$0000
LDA.b $07 : CLC : ADC.w #$0040 : STA.b $07
.no_line_change
LDA.b [$0A], Y : TXY : STA.b [$07], Y
RTS
}
@@ -361,26 +360,26 @@ HUD_UpdateHearts:
HexToDecimal:
{
REP #$30
STZ $0003
LDX.w #$0000
LDY.w #$0002
.next_digit
CMP $F9F9, Y : BCC .next_lowest_10s_place
REP #$30
STZ $0003
LDX.w #$0000
LDY.w #$0002
.next_digit
CMP $F9F9, Y : BCC .next_lowest_10s_place
SEC : SBC $F9F9, Y
INC $03, X
BRA .next_digit
.next_lowest_10s_place
.next_lowest_10s_place
INX : DEY #2
BPL .next_digit
STA $05
SEP #$30
LDX.b #$02
.set_next_digit_tile
.set_next_digit_tile
LDA $03, X : CMP.b #$7F
BEQ .blank_digit
ORA.b #$90
.blank_digit
.blank_digit
STA $03, X
DEX : BPL .set_next_digit_tile
RTS
@@ -399,7 +398,7 @@ HudItems:
; hammer, lamp, fire rod, ice rod, mirror, bottle2
dw $F701, $F6F1, $F6A1, $F6B1, $F7C1, $F751
; flute, book, somaria, byrna, feather, bottle3
dw $F859, $F741, $F7A9, $F8A9, $F729, $F751
dw $F859, $F741, $F799, $F7A9, $F729, $F751
; deku, zora, wolf, bunny, stone, bottle4
dw $F6E1, $F821, $F6D1, $F7B9, $F811, $F751
}
@@ -441,7 +440,7 @@ org $0DF701
; Lamp
org $0DF6F1
dw $24BC, $24BD, $24CC, $64CC
; Fire Rod
org $0DF6B1
dw $2CB0, $2CBE, $2CC0, $2CC1
@@ -461,7 +460,7 @@ org $0DF859
dw $2CD4, $2CD5, $2CE4, $2CE5 ; Blue
dw $3CD4, $3CD5, $3CE4, $3CE5 ; Green
dw $24D4, $24D5, $24E4, $24E5 ; Red
dw $34D4, $34D5, $34E4, $34E5 ; Gold
; Roc's Feather (Net)
org $0DF731
@@ -478,16 +477,14 @@ org $0DF751
dw $2855, $6855, $2C57, $2C5A ; Fairy
dw $2837, $2838, $2839, $283A ; Bee
dw $2837, $2838, $2839, $283A ; Good bee
dw $2837, $2838, $3CF7, $3CF8 ; Magic Bean
dw $2837, $2838, $3CFB, $3CFC ; Milk Bottle
; Somaria (Unchanged)
; Byrna
org $0DF7A9
dw $20F5, $20F5, $20F5, $20F5 ; No somaria
dw $24DC, $24DD, $24EC, $24ED ; Cane of Somaria
org $0DF8A9
dw $2CDC, $2CDD, $2CEC, $2CED ; Cane of Byrna
dw $2C82, $2C83, $2C8B, $2C8C ; Fishing Rod
dw $2CF0, $24F1, $30EC, $E4F0 ; Portal Rod
; Deku (Quake)
org $0DF6E1
@@ -512,7 +509,7 @@ org $0DF7B9
dw $3469, $7469, $3479, $7479
; Stone Mask (Flippers Slot)
org $0DF811
org $0DF811
dw $20F5, $20F5, $20F5, $20F5
dw $30B4, $30B5, $30C4, $30C5
@@ -521,7 +518,7 @@ org $0DF811
org $0DFE77
HUD_Tilemap:
incbin tilemaps/hud.tilemap
incbin tilemaps/hud.tilemap
; #_02816A: JSL RebuildHUD_Keys
@@ -538,6 +535,8 @@ FloorIndicatorNumberHigh:
dw $E51C, $250E, $007F
}
; ==========================================================
; $57CF6 DATA
org $0AFCF6
FloorIndicatorNumberLow:
@@ -546,6 +545,8 @@ FloorIndicatorNumberLow:
dw $E50C, $A50E, $007F
}
; ==========================================================
; *$57D0C-$57DA7 JUMP LOCATION (LONG)
org $0AFD0C
FloorIndicator:
@@ -557,7 +558,7 @@ FloorIndicator:
; disable the floor indicator during the next frame.
LDA.w #$0000
.dont_disable
STA $04A0
PHB : PHK : PLB
LDA.w #$251E : STA $7EC7F0
@@ -577,16 +578,18 @@ FloorIndicator:
; Check the world state
LDA $7EF3C5 : CMP.b #$02 : BCS .no_rain_state
; cause the ambient rain sound to occur (indoor version)
LDA.b #$05 : STA $012D
.no_rain_state
; cause the ambient rain sound to occur (indoor version)
LDA.b #$03 : STA $012D
.no_rain_state
REP #$20
.not_floor_1F
.sanctuary_rat_room
.not_floor_1F
.sanctuary_rat_room
LDA $A4 : AND.w #$00FF
BRA .set_floor_indicator_number
.basement_floor
.basement_floor
SEP #$20
; turn off any ambient sound effects
LDA.b #$05 : STA $012D
@@ -594,7 +597,7 @@ FloorIndicator:
INX #2
LDA $A4 : ORA.w #$FF00 : EOR.w #$FFFF
.set_floor_indicator_number
.set_floor_indicator_number
ASL A : TAY
@@ -610,7 +613,7 @@ FloorIndicator:
RTL
.hide_indicator ; *$57D90 ALTERNATE ENTRY POINT
.hide_indicator ; *$57D90 ALTERNATE ENTRY POINT
REP #$20
@@ -622,4 +625,4 @@ FloorIndicator:
RTL
}
pullpc
pullpc

View File

@@ -3,8 +3,8 @@ OverworldLocationNames:
dw "RANCH___________" ; 01
dw "PYRAMID_________" ; 02
dw "LAND_OF_TREE____" ; 03
dw "SNOW_MOUNTAIN___" ; 04
dw "SNOW_MOUNTAIN___" ; 05
dw "SNOW_MOUNTAIN___" ; 04
dw "SNOW_MOUNTAIN___" ; 05
dw "SNOW_MOUNTAIN___" ; 06
dw "SNOW_MOUNTAIN___" ; 07
dw "RANCH___________" ; 08
@@ -17,7 +17,7 @@ OverworldLocationNames:
dw "CEMETERY________" ; 0F
dw "TOADSTOOL_WOODS_" ; 10
dw "RANCH_PATH______" ; 11
dw "CROSSROADS______" ; 12
dw "CROSSROADS______" ; 12
dw "KALYXO_CASTLE___" ; 13
dw "KALYXO_CASTLE___" ; 14
dw "MOUNTAINSIDE____" ; 15
@@ -65,163 +65,163 @@ OverworldLocationNames:
dw "GARO_DESERT_____" ; 3F
DarkWorldLocationNames:
dw "TEMPORAL_GATE__" ; 00
dw "TEMPORAL_GATE__" ; 01
dw "PYRAMID_OF_EONS" ; 02
dw "LAVA_LANDS_____" ; 03
dw "LAVA_LANDS_____" ; 04
dw "LAVA_LANDS_____" ; 05
dw "LAVA_LANDS_____" ; 06
dw "LAVA_LANDS_____" ; 07
dw "TEMPORAL_GATE__" ; 08
dw "TEMPORAL_GATE__" ; 09
dw "LUPO_WATERFALL_" ; 0A
dw "LUPO_MOUNTAIN__" ; 0B
dw "LUPO_MOUNTAIN__" ; 0C
dw "LUPO_MOUNTAIN__" ; 0D
dw "LAVA_LANDS_____" ; 0E
dw "LAVA_LANDS_____" ; 0F
dw "SHRINE_COURAGE_" ; 10
dw "_______________" ; 00
dw "_______________" ; 01
dw "_______________" ; 02
dw "_______________" ; 03
dw "_______________" ; 04
dw "_______________" ; 05
dw "_______________" ; 06
dw "_______________" ; 07
dw "_______________" ; 08
dw "_______________" ; 09
dw "_______________" ; 0A
dw "_______________" ; 0B
dw "_______________" ; 0C
dw "_______________" ; 0D
dw "_______________" ; 0E
dw "_______________" ; 0F
dw "_______________" ; 10
dw "_______________" ; 11
dw "_______________" ; 12
dw "LUPO_MOUNTAIN__" ; 13
dw "LUPO_MOUNTAIN__" ; 14
dw "LUPO_MOUNTAIN__" ; 15
dw "LAVA_LANDS_____" ; 16
dw "LAVA_LANDS_____" ; 17
dw "_______________" ; 13
dw "_______________" ; 14
dw "_______________" ; 15
dw "_______________" ; 16
dw "_______________" ; 17
dw "_______________" ; 18
dw "_______________" ; 19
dw "_______________" ; 1A
dw "_______________" ; 1B
dw "_______________" ; 1C
dw "_______________" ; 1D
dw "THE_FORTRESS___" ; 1E
dw "THE_FORTRESS___" ; 1F
dw "_______________" ; 1E
dw "_______________" ; 1F
dw "_______________" ; 20
dw "_______________" ; 21
dw "_______________" ; 22
dw "WISDOM_SWAMP___" ; 23
dw "WISDOM_SWAMP___" ; 24
dw "_______________" ; 23
dw "_______________" ; 24
dw "_______________" ; 25
dw "THE_FORTRESS___" ; 26
dw "THE_FORTRESS___" ; 27
dw "_______________" ; 26
dw "_______________" ; 27
dw "_______________" ; 28
dw "_______________" ; 29
dw "_______________" ; 2A
dw "WISDOM_SWAMP___" ; 2B
dw "WISDOM_SWAMP___" ; 2C
dw "_______________" ; 2B
dw "_______________" ; 2C
dw "_______________" ; 2D
dw "_______________" ; 2E
dw "_______________" ; 2F
dw "UNDERWATER_____" ; 30
dw "UNDERWATER_____" ; 31
dw "UNDERWATER_____" ; 32
dw "UNDERWATER_____" ; 33
dw "UNDERWATER_____" ; 34
dw "UNDERWATER_____" ; 35
dw "ABYSS_BEACH____" ; 36
dw "ABYSS_BEACH____" ; 37
dw "UNDERWATER_____" ; 38
dw "UNDERWATER_____" ; 39
dw "UNDERWATER_____" ; 3A
dw "UNDERWATER_____" ; 3B
dw "UNDERWATER_____" ; 3C
dw "UNDERWATER_____" ; 3D
dw "ABYSS_BEACH____" ; 3E
dw "ABYSS_BEACH____" ; 3F
dw "_______________" ; 30
dw "_______________" ; 31
dw "_______________" ; 32
dw "_______________" ; 33
dw "_______________" ; 34
dw "_______________" ; 35
dw "_______________" ; 36
dw "_______________" ; 37
dw "_______________" ; 38
dw "_______________" ; 39
dw "_______________" ; 3A
dw "_______________" ; 3B
dw "_______________" ; 3C
dw "_______________" ; 3D
dw "_______________" ; 3E
dw "_______________" ; 3F
DungeonLocationNames:
dw "TRIFORCE_CHAMBER", "HALL_OF_SECRETS_", "________________", "DEVELOPERS_DEN__"
dw "GANONS_LAIR_____", "________________", "________________", "________________"
dw "________________", "________________", "ZORA_TEMPLE_____", "SHRINE_COURAGE__"
dw "FAIRY_FOUNTAIN__", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_"
dw "FORTRESS_SECRETS", "FORTRESS_SECRETS", "TAIL_PALACE_____", "________________" ; 0F
dw "________________", "________________", "TAIL_PALACE_____", "________________" ; 15
dw "________________", "________________", "HALL_OF_SECRETS_", "________________"
dw "________________", "ZORA_TEMPLE_____", "SHRINE_COURAGE__", "ZORA_TEMPLE_____"
dw "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_", "________________"
dw "________________", "TAIL_PALACE_____", "________________", "________________" ; 1F
dw "________________", "________________", "________________", "SHRINE_COURAGE__"
dw "ZORA_TEMPLE_____", "ZORA_TEMPLE_____", "SHRINE_COURAGE__", "ZORA_TEMPLE_____"
dw "KALYXO_CASTLE___", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_", "________________"
dw "FORTRESS_SECRETS", "TAIL_PALACE_____", "TAIL_PALACE_____", "________________" ; 2F
dw "________________", "________________", "________________", "SHRINE_COURAGE__"
dw "ZORA_TEMPLE_____", "ZORA_TEMPLE_____", "ZORA_TEMPLE_____", "KALYXO_CASTLE___"
dw "KALYXO_CASTLE___", "KALYXO_CASTLE___", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_"
dw "________________", "FORTRESS_SECRETS", "TAIL_PALACE_____", "TAIL_PALACE_____" ; 3F
dw "HALL_OF_SECRETS_", "HALL_OF_SECRETS_", "HALL_OF_SECRETS_", "SHRINE_COURAGE__"
dw "ZORA_TEMPLE_____", "ZORA_TEMPLE_____", "ZORA_TEMPLE_____", "KALYXO_CASTLE___"
dw "KALYXO_CASTLE___", "KALYXO_CASTLE___", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_"
dw "FORTRESS_SECRETS", "FORTRESS_SECRETS", "TAIL_PALACE_____", "TAIL_PALACE_____" ; 4F
dw "________________", "________________", "________________", "SHRINE_COURAGE__"
dw "CASTLE_BASEMENT_", "CASTLE_BASEMENT_", "KALYXO_CASTLE___", "KALYXO_CASTLE___"
dw "KALYXO_CASTLE___", "KALYXO_CASTLE___", "MUSHROOM_GROTTO_", "MUSHROOM_GROTTO_"
dw "FORTRESS_SECRETS", "FORTRESS_SECRETS", "TAIL_PALACE_____", "TAIL_PALACE_____" ; 5F
dw "________________", "________________", "________________", "SHRINE_COURAGE__"
dw "________________", "________________", "KALYXO_CASTLE___", "KALYXO_CASTLE___"
dw "KALYXO_CASTLE___", "GORON_MINES_____", "MUSHROOM_GROTTO_", "FORTRESS_SECRETS"
dw "FORTRESS_SECRETS", "FORTRESS_SECRETS", "TAIL_PALACE_____", "TAIL_PALACE_____" ; 6F
dw "CASTLE_BASEMENT_", "CASTLE_BASEMENT_", "CASTLE_BASEMENT_", "SHRINE_POWER____"
dw "SHRINE_POWER____", "SHRINE_POWER____", "SHRINE_POWER____", "GORON_MINES_____"
dw "GORON_MINES_____", "GORON_MINES_____", "SHRINE_WISDOM___", "FORTRESS_SECRETS"
dw "FORTRESS_SECRETS", "FORTRESS_SECRETS", "TAIL_PALACE_____", "TAIL_PALACE_____" ; 7F
dw "CASTLE_BASEMENT_", "CASTLE_BASEMENT_", "CASTLE_BASEMENT_", "SHRINE_POWER____"
dw "SHRINE_POWER____", "SHRINE_POWER____", "SHRINE_POWER____", "GORON_MINES_____"
dw "GORON_MINES_____", "GORON_MINES_____", "SHRINE_WISDOM___", "FORTRESS_SECRETS"
dw "FORTRESS_SECRETS", "FORTRESS_SECRETS", "TAIL_PALACE_____", "TAIL_PALACE_____" ; 8F
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "GORON_MINES_____"
dw "GORON_MINES_____", "GORON_MINES_____", "SHRINE_WISDOM___", "FORTRESS_SECRETS"
dw "FORTRESS_SECRETS", "FORTRESS_SECRETS", "GLACIA_ESTATE___", "GLACIA_ESTATE___" ; 9F
dw "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____"
dw "KYDROGS_DEN_____", "KYDROGS_SHIP____", "________________", "________________"
dw "GORON_MINES_____", "GORON_MINES_____", "SHRINE_WISDOM___", "________________"
dw "GLACIA_ESTATE___", "GLACIA_ESTATE___", "GLACIA_ESTATE___", "GLACIA_ESTATE___" ; AF
dw "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____"
dw "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____"
dw "GORON_MINES_____", "GORON_MINES_____", "SHRINE_WISDOM___", "GLACIA_ESTATE___"
dw "GLACIA_ESTATE___", "GLACIA_ESTATE___", "GLACIA_ESTATE___", "GLACIA_ESTATE___" ; BF
dw "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____"
dw "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____", "KYDROGS_SHIP____"
dw "GORON_MINES_____", "SHRINE_WISDOM___", "SHRINE_WISDOM___", "GLACIA_ESTATE___"
dw "GLACIA_ESTATE___", "GLACIA_ESTATE___", "GLACIA_ESTATE___", "GLACIA_ESTATE___" ; CF
dw "ABYSS_LAVA_CAVE_", "ABYSS_LAVA_CAVE_", "ABYSS_LAVA_CAVE_", "FROSTPEAK_CAVE__"
dw "FROSTPEAK_CAVE__", "KYDROGS_SHIP____", "KYDROGS_SHIP____", "GORON_MINES_____"
dw "GORON_MINES_____", "GORON_MINES_____", "GORON_MINES_____", "GLACIA_ESTATE___"
dw "GLACIA_ESTATE___", "GLACIA_ESTATE___", "TAIL_PALACE_____", "GLACIA_ESTATE___" ; DF
dw "________________", "________________", "________________", "________________"
dw "FROSTPEAK_CAVE__", "FROSTPEAK_CAVE__", "TAIL_CAVE_ROUTE_", "TAIL_CAVE_ROUTE_"
dw "MOUNTAIN_CAVE___", "________________", "________________", "________________"
dw "________________", "________________", "FROSTPEAK_CAVE__", "FROSTPEAK_CAVE__" ; EF
dw "________________", "TAIL_PALACE_____", "________________", "________________" ; 32
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "VILLAGE_CAVE____", "VILLAGE_CAVE____", "________________" ; FF
dw "________________", "________________", "________________", "________________" ; 48
dw "CHEST_GAME______", "RANCH_GIRL_HOUSE", "SICK_BOY_HOUSE__", "VILLAGE_BAR_____"
dw "YOUR_HOUSE______", "ZORA_CHAMBERS___", "________________", "VILLAGE_LIBRARY_"
dw "RANCH_HOUSE_____", "POTION_SHOP_____", "ZENIEA_CAVE_____", "ZORA_WATERFALL__"
dw "________________", "GORON_STORAGE___", "________________", "KALY_HOTEL______" ; 10F
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 64
dw "________________", "ARROW_MINIGAME__", "MAGIC_SCHOOL____", "BELOW_GRAVEYARD_"
dw "FAIRY_FOUNTAIN__", "FAIRY_FOUNTAIN__", "FAIRY_FOUNTAIN__", "SPIKE_CAVE______"
dw "________________", "TOWN_HALL_______", "________________", "________________"
dw "BOMB_SHOP_______", "MAYORAL_BASEMENT", "________________", "HAPPY_MASK_SHOP_" ; 11F
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "MUSHROOM_GROTTO_", "________________"
dw "________________", "________________", "________________", "________________"
dw "WOLFOS_CAVE_____", "SWORDSMITHS_HUT_", "FORTUNE_TELLER__", "CAVE____________"
dw "CAVE____________", "CAVE____________", "CAVE____________", "CAVE____________" ; 127
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 128
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 144
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 160
dw "________________", "________________", "________________", "________________"
dw "KYDROGS_DEN_____", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 176
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 192
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 208
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 224
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 240
dw "________________", "________________", "________________", "________________" ; 244
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 256
dw "________________", "________________", "________________", "________________" ; 260
dw "YOUR_HOUSE______", "ZORA_CHAMBERS___", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 272
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 288
dw "________________", "________________", "________________", "________________"
dw "________________", "________________", "________________", "________________" ; 295

View File

@@ -1,17 +1,3 @@
; Menu Palette
function hexto555(h) = ((((h&$FF)/8)<<10)|(((h>>8&$FF)/8)<<5)|(((h>>16&$FF)/8)<<0))
pushpc
; update in game hud colors
org $1BD662 : dw hexto555($814f16), hexto555($552903)
org $1BD66A : dw hexto555($d51d00), hexto555($f9f9f9)
org $1DB672 : dw hexto555($d0a050), hexto555($f9f9f9)
org $1DB67A : dw hexto555($5987e0), hexto555($f9f9f9)
org $1DB682 : dw hexto555($7b7b83), hexto555($bbbbbb)
org $1DB68A : dw hexto555($a58100), hexto555($dfb93f)
pullpc
Menu_Palette:
dw hexto555($814f16)
dw hexto555($552903)

View File

@@ -1,3 +1,4 @@
; -----------------------------------------------------------------------------
Menu_CheckHScroll:
{
@@ -6,8 +7,7 @@ Menu_CheckHScroll:
LDA.b $F6
BIT.b #$20 : BNE .left
BIT.b #$10 : BNE .right
BIT.b #$80 : BNE .leave_menu
RTS
RTS
.left
@@ -19,7 +19,7 @@ Menu_CheckHScroll:
REP #$20
LDA.w #$0008
.merge
.merge
STA.w MenuScrollHDirection
SEP #$30
@@ -33,14 +33,16 @@ Menu_CheckHScroll:
RTS
}
; -----------------------------------------------------------------------------
Menu_ScrollHorizontal:
{
REP #$21 ; set A to 16 bit, clear carry flag
LDA.w $E4 ; BG3 Horizontal Scroll Value
ADC.w MenuScrollHDirection ; Direction set by Menu_CheckHScroll
AND.w #$01FF
STA.b $E4
AND.w #$01FF
STA.b $E4
AND.w #$00FF
BNE .loop
@@ -48,7 +50,8 @@ Menu_ScrollHorizontal:
RTS
.loop
CLC
CLC
RTS
}
; -----------------------------------------------------------------------------

View File

@@ -14,32 +14,32 @@ Menu_ItemIndex:
db $11, $0F, $08, $10, $13, $0B
; =========================================================
; Decides which graphics is drawn
; Decides which graphics is drawn
Menu_AddressIndex:
db $7EF340 ; Bow
db $7EF341 ; Boomerang
db $7EF342 ; Hookshot / Goldstar
db $7EF342 ; Hookshot
db $7EF343 ; Bombs
db $7EF344 ; Powder
db $7EF344 ; Powder
db $7EF35C ; Bottle 1
db $7EF34B ; Hammer
db $7EF34A ; Lamp
db $7EF34B ; Hammer
db $7EF34A ; Lamp
db $7EF345 ; Fire Rod
db $7EF346 ; Ice Rod
db $7EF346 ; Ice Rod
db $7EF353 ; Magic Mirror
db $7EF35D ; Bottle 2
db $7EF34C ; Ocarina ; shovel 7EF34F
db $7EF34E ; Book of Secrets
db $7EF34C ; shovel 7EF34F
db $7EF34E ; Book
db $7EF350 ; Cane of Somaria / Cane of Byrna
db $7EF351 ; Fishing Rod / Portal Rod
db $7EF34D ; Roc's Feather
db $7EF351 ; Fishing rod
db $7EF34D ; Roc's Feather
db $7EF35E ; Bottle 3
db $7EF349 ; Deku Mask
db $7EF349 ; Deku Mask
db $7EF347 ; Zora Mask
db $7EF358 ; Wolf Mask
db $7EF358 ; Wolf Mask
db $7EF348 ; Bunny Hood
db $7EF352 ; Stone Mask
db $7EF35F ; Bottle #4
@@ -54,35 +54,36 @@ Menu_ItemCursorPositions:
dw menu_offset(6,15) ; deku mask
dw menu_offset(6,18) ; bottle1
dw menu_offset(9,2) ; hammer
dw menu_offset(9,2) ; hammer
dw menu_offset(9,5) ; lamp
dw menu_offset(9,8) ; firerod
dw menu_offset(9,12) ; icerod
dw menu_offset(9,15) ; goron
dw menu_offset(9,18) ; bottle2
dw menu_offset(12,2) ; shovel
dw menu_offset(12,5) ; feather
dw menu_offset(12,2) ; shovel
dw menu_offset(12,5) ; feather
dw menu_offset(12,8) ; somaria
dw menu_offset(12,12) ; byrna / fishing rod
dw menu_offset(12,15) ; bunny hood
dw menu_offset(12,18) ; bottle3
dw menu_offset(15,2) ; powder
dw menu_offset(15,5) ; book
dw menu_offset(15,2) ; powder
dw menu_offset(15,5) ; book
dw menu_offset(15,8) ; flute
dw menu_offset(15,12) ; mirror
dw menu_offset(15,15) ; stone mask
dw menu_offset(15,15) ; stone mask
dw menu_offset(15,18) ; bottle4
; =========================================================
Menu_FindNextItem:
{
LDY.w $0202 : INY
CPY.b #$19 : BCC .no_reset
LDY.b #$01
.no_reset
LDY.b #$01
.no_reset
STY.w $0202
LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X
@@ -95,8 +96,8 @@ Menu_FindNextItem:
Menu_FindPrevItem:
{
LDY.w $0202 : DEY : BNE .no_reset
LDY.b #$18
.no_reset
LDY.b #$18
.no_reset
STY.w $0202
LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X
@@ -110,13 +111,13 @@ Menu_FindNextDownItem:
{
LDA.w $0202 : CLC : ADC.b #$06
CMP.b #$19 : BCC .no_reset
SBC.b #$18
.no_reset
SBC.b #$18
.no_reset
TAY : STY.w $0202
LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X
BEQ Menu_FindNextItem
RTS
RTS
}
; =========================================================
@@ -125,21 +126,21 @@ Menu_FindNextUpItem:
{
LDA.w $0202 : SEC : SBC.b #$06
BPL .no_reset : BNE .no_reset
CLC : ADC.b #$18
.no_reset
CLC : ADC.b #$18
.no_reset
TAY : STY.w $0202
CPY.b #$19 : BCS .reset_up
LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X
BEQ Menu_FindNextItem
RTS
.reset_up
LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X
BEQ Menu_FindNextItem
RTS
.reset_up
LDY.b #$01
STY.w $0202
LDX.w Menu_AddressIndex-1, Y
LDA.l $7EF300, X
BEQ Menu_FindNextItem
RTS
RTS
}
@@ -150,7 +151,6 @@ Menu_DeleteCursor:
REP #$30
LDX.w Menu_ItemCursorPositions-2, Y
Menu_DeleteCursor_AltEntry:
LDA.w #$20F5
STA.w $1108, X : STA.w $1148, X
STA.w $114E, X : STA.w $110E, X
@@ -158,7 +158,7 @@ Menu_DeleteCursor_AltEntry:
STA.w $118E, X : STA.w $11CE, X
SEP #$30
STZ $0207
RTS
RTS
}
; =========================================================
@@ -192,7 +192,7 @@ Menu_InitItemScreen:
STA.w $0200
RTS
.all_good
.all_good
; Double check we still have the item that was selected.
; This is to prevent a bug where we can get stuck in an
; infinite loop later on.
@@ -210,118 +210,139 @@ Menu_InitItemScreen:
Menu_AddressLong:
db $40 ; Bow
db $41 ; Boomerang
db $42 ; Hookshot
db $42 ; Hookshot
db $43 ; Bombs
db $44 ; Powder
db $44 ; Powder
db $5C ; Bottle 1
db $4B ; Hammer
db $4A ; Lamp
db $4B ; Hammer
db $4A ; Lamp
db $45 ; Fire Rod
db $46 ; Ice Rod
db $46 ; Ice Rod
db $53 ; Magic Mirror
db $5D ; Bottle 2
db $4C ; Ocarina (formerly shovel 4F)
db $4E ; Book
db $4C ; shovel 4F
db $4E ; Book
db $50 ; Cane of Somaria / Cane of Byrna
db $51 ; Fishing Rod
db $4D ; Roc's Feather
db $4D ; Roc's Feather
db $5E ; Bottle 3
db $49 ; Deku Mask
db $49 ; Deku Mask
db $47 ; Zora Mask
db $58 ; Wolf Mask
db $58 ; Wolf Mask
db $48 ; Bunny Hood
db $52 ; Stone Mask
db $5F ; Bottle 4
db $5F ; Bottle #4
; TODO: Fix all of these routines.
GotoNextItem_Local:
{
; Load our currently equipped item, and move to the next one
; If we reach our limit (21), set it back to the bow and arrow slot.
LDA $0202 : INC A : CMP.b #$18 : BCC .dont_reset
LDA.b #$01
.dont_reset
; Otherwise try to equip the item in the next slot
STA $0202
RTS
}
DoWeHaveThisItem_OverrideLong:
{
PHB : PHK : PLB
JSR DoWeHaveThisItem_Override
PLB
RTL
}
DoWeHaveThisItem_Override:
{
LDY.w $0202 : LDX.w Menu_AddressLong-1, Y
LDA.l $7EF300, X : CMP.b #$00 : BNE .have_this_item
LDY $0202 : LDX.w Menu_AddressLong-1, Y
LDA.l $7EF300, X : BNE .have_this_item
CLC
RTL
RTS
.have_this_item
SEC
RTL
SEC
RTS
}
TryEquipNextItem_Override:
{
.keep_looking
JSR GotoNextItem_Local
JSL DoWeHaveThisItem_Override : BCC .keep_looking
JSR DoWeHaveThisItem_Override : BCC .keep_looking
RTS
}
SearchForEquippedItem_OverrideLong:
{
PHB : PHK : PLB
JSR SearchForEquippedItem_Override
PLB
RTL
}
SearchForEquippedItem_Override:
{
PHB : PHK : PLB
SEP #$30
SEP #$30
LDA.b #$00
LDY.b #$18
.next_check
LDX.w Menu_AddressLong-1, Y
LDA.l $7EF300, X : CMP.b #$00 : BNE .item_available
DEY : BPL .next_check
.itemCheck
; In this case we have no equippable items
STZ $0202 : STZ $0203 : STZ $0204
LDX Menu_AddressLong-1, Y
ORA $7EF300, X
DEY : CPY.b #$00 : BNE .itemCheck
.we_have_that_item
REP #$30
PLB
RTL
CMP.b #$00 : BNE .equippableItemAvailable
; In this case we have no equippable items
STZ $0202 : STZ $0203 : STZ $0204
.weHaveThatItem
RTS
.equippableItemAvailable
.item_available
; Is there an item currently equipped (in the HUD slot)?
LDA.w $0202 : BNE .alreadyEquipped
; If not, set the equipped item to the Lamp
LDA.b #$08 : STA $0202
LDA $0202 : BNE .alreadyEquipped
; If not, set the equipped item to the Bow and Arrow
; (even if we don't actually have it)
LDA.b #$01 : STA $0202
.alreadyEquipped
JMP .exit
.keep_looking
JSR GotoNextItem_Local
JSL DoWeHaveThisItem_Override : BCC .keep_looking
BCS .we_have_that_item
JSR TryEquipNextItem_Override
.exit
REP #$30
PLB
RTL
; Checks to see if we actually have that item
; We're done if we have that item
JSR DoWeHaveThisItem_Override : BCS .weHaveThatItem
JMP TryEquipNextItem_Override
}
pushpc
pushpc
org $0DDEB0
ItemMenu_CheckForOwnership:
DoWeHaveThisItem:
{
JSL DoWeHaveThisItem_Override
JSL DoWeHaveThisItem_OverrideLong
RTS
}
org $0DE399
SearchForEquippedItem:
{
JSL SearchForEquippedItem_Override
JSL SearchForEquippedItem_OverrideLong
RTS
}
assert pc() <= $0DE3C7
warnpc $0DE3C7
pullpc
; =========================================================
pullpc

View File

@@ -43,62 +43,29 @@
; =========================================================
TimeLabels:
dw "00", "01", "02", "03", "04", "05", "06", "07", "08"
dw "09", "10", "11", "12", "13", "14", "15", "16", "17"
dw "18", "19", "20", "21", "22", "23", "24", "25", "26"
dw "27", "28", "29", "30", "31", "32", "33", "34", "35"
dw "36", "37", "38", "39", "40", "41", "42", "43", "44"
dw "45", "46", "47", "48", "49", "50", "51", "52", "53"
dw "54", "55", "56", "57", "58", "59"
PlaytimeLabel:
dw "TIME:_____"
Menu_DrawHourDigit:
{
SEP #$30
LDA.l $7EE000
ASL A : ASL A
TAX
REP #$30
LDA.w TimeLabels, X : STA.w $1692+$12
INX : INX
LDA.w TimeLabels, X : STA.w $1692+$14
RTS
}
Menu_DrawMinuteDigit:
{
SEP #$30
LDA.l $7EE001
ASL A : ASL A
TAX
REP #$30
LDA.w TimeLabels, X : STA.w $1692+$18
INX : INX
LDA.w TimeLabels, X : STA.w $1692+$1A
RTS
}
dw "PLAYTIME:_"
Menu_DrawPlaytimeLabel:
{
LDX.w #$10
.draw2
.draw2
LDA.w PlaytimeLabel, X
STA.w $1692, X
STA.w $1692, X
DEX : DEX : BPL .draw2
; Draw the current time based on the time system RAM
JSR Menu_DrawHourDigit
; TODO: Draw the current time based on the time system ram.
; ; Starting at 0 = $2570 we draw the hours
; ; Get hours
; LDA $7EE000 : CLC : ADC #$2570
; STA.w $1692+#$12 ; First digit of hour
; STA.w $1692+#$14 ; Second digit of hour
; Draw colon
LDA.w #$256B
STA.w $1692+$16
; LDX #$18
JSR Menu_DrawMinuteDigit
; ; Get minutes
; LDA $7EE001 : CLC : ADC #$2570
; STA.w $1692+#$16 ; First digit of minute
; STA.w $1692+#$18 ; Second digit of minute
RTS
}
@@ -121,6 +88,7 @@ Menu_ItemNames:
dw "___OCARINA____ "
dw "_SECRET_TOME__ "
dw "___SOMARIA____ "
; dw "____BYRNA_____ "
dw "_FISHING_ROD__ "
dw "_ROCS_FEATHER_ "
dw "____BOTTLE____ "
@@ -139,41 +107,15 @@ Menu_BottleItems:
dw "_GREEN_POTION_ "
dw "_BLUE_POTION__ "
dw "____FAIRY_____ "
dw "_____BEE______ "
dw "__GOOD_BEE____ "
dw "_MAGIC_BEAN___ "
dw "_MILK_BOTTLE__ "
Menu_GoldstarLabel:
dw "__GOLD_STAR___ "
Menu_PortalRodItems:
dw "__PORTAL_ROD__ "
Menu_SongNames:
dw "SONG:_STORMS__ "
dw "SONG:_HEALING_ "
dw "SONG:_SOARING_ "
dw "SONG:_TIME____ "
Menu_RingNames:
dw "____POWER_____ "
dw "____ARMOR_____ "
dw "____HEART_____ "
dw "____LIGHT_____ "
dw "____BLAST_____ "
dw "___STEADFAST__ "
Menu_RingDescriptions:
dw "ATK_UP__DEF_DOWN"
dw "ATK_DOWN__DEF_UP"
dw "SLOW_HEART_REGEN"
dw "SWD_BEAM_2_HRTS_"
dw "_BOMB_DAMAGE_UP_"
dw "__NO_KNOCKBACK__"
Menu_RingsFound:
dw "NEW_RING_FOUND__"
dw "SONG:_HEALING_ "
dw "SONG:_STORMS__ "
Menu_DrawItemName:
{
@@ -186,17 +128,18 @@ Menu_DrawItemName:
CMP.b #$01 : BCS .haveItem
REP #$30
RTS
.haveItem
LDA.w $0202 : CMP.b #$03 : BEQ .goldstar
CMP.b #$05 : BEQ .mushroom
CMP.b #$0D : BEQ .ocarina
CMP.b #$10 : BEQ .custom_rods
; Check if it's a bottle
CMP.b #$06 : BEQ .bottle_1
CMP.b #$0C : BEQ .bottle_2
CMP.b #$12 : BEQ .bottle_3
CMP.b #$18 : BEQ .bottle_4
.draw_item
REP #$30
LDA.w $0202 : BEQ .no_items
@@ -225,13 +168,8 @@ Menu_DrawItemName:
JSR DrawBottleNames
RTS
.custom_rods
LDA.w FishingOrPortalRod : CMP.b #$01 : BNE .draw_item
JSR DrawPortalRodName
RTS
.goldstar
LDA.w GoldstarOrHookshot : CMP.b #$02 : BNE .draw_item
LDA GoldstarOrHookshot : CMP.b #$02 : BNE .draw_item
JSR DrawGoldstarName
RTS
@@ -246,135 +184,50 @@ Menu_DrawItemName:
; Check the timer and see if we should draw the item name
LDA $1A : AND.w #$00FF : CMP #$0080 : BCC .draw_item
LDA $030F : BEQ .draw_item
LDA $030F : AND.w #$00FF : DEC : ASL #5 : TAX
LDA $030F : AND.w #$00FF : DEC : ASL #5 : TAX
LDY.w #$0000
.draw_ocarina_loop
LDA.w Menu_SongNames, X : STA.w $1692, Y
LDA.w Menu_SongNames, X : STA.w $1692, Y
INX #2 : INY #2 : CPY #$001C : BCC .draw_ocarina_loop
RTS
}
DrawPortalRodName:
{
REP #$30
LDX.w #$0000
LDY.w #$0000
.draw_portal_rod_loop
LDA.w Menu_PortalRodItems, X : STA.w $1692, Y
INX #2 : INY #2
CPY #$001C : BCC .draw_portal_rod_loop
RTS
}
DrawBottleNames:
{
LDA.l $7EF35C, X : AND.w #$00FF
DEC : ASL #5 : TAX
LDY.w #$0000
.draw_bottle_loop
LDA.w Menu_BottleItems, X : STA.w $1692, Y
INX #2 : INY #2
CPY #$001C : BCC .draw_bottle_loop
RTS
}
DrawMagicRingNames:
{
REP #$30
LDA.w $020B : ASL #5 : TAX
LDY.w #$0000
.draw_ring_loop
LDA.w Menu_RingNames, X : STA.w $1692, Y
INX #2 : INY #2
CPY #$001C : BCC .draw_ring_loop
LDA.w $020B : ASL #5 : TAX
LDY.w #$0000
.draw_ring_desc_loop
LDA.w Menu_RingDescriptions, X : STA.w $1590, Y
INX #2 : INY #2
CPY #$0020 : BCC .draw_ring_desc_loop
LDA.l MAGICRINGS : AND.w #$00FF : STA.b $00
LDA.l FOUNDRINGS : AND.w #$00FF : CMP.b $00 : BEQ +
LDA.l $7EF35C, X : AND.w #$00FF
DEC : ASL #5 : TAX
LDY.w #$0000
.draw_found_ring
LDA.w Menu_RingsFound, Y : STA.w $1692, Y
INY #2 : CPY #$001C : BCC .draw_found_ring
+
SEP #$30
RTS
.draw_bottle_loop
LDA.w Menu_BottleItems, X : STA.w $1692, Y
INX #2 : INY #2
CPY #$001C : BCC .draw_bottle_loop
RTS
}
Menu_CollectibleNames:
dw "BANANAS:________"
dw "PINEAPPLES:_____"
dw "ROCK_MEAT:______"
dw "SEASHELLS:______"
dw "HONEYCOMBS:_____"
dw "DEKU_STICKS:____"
DrawCollectibleNamesAndCount:
DrawGoldstarName:
{
REP #$30
LDA.w $020B : ASL #5 : TAX : LDY.w #$0000
REP #$30
LDX.w #$0000
LDY.w #$0000
.draw_loop
LDA.w Menu_CollectibleNames, X : STA.w $1692, Y
INX #2 : INY #2
CPY #$001C : BCC .draw_loop
SEP #$30
; Draw the number of each collectible
LDA.w $020B : CMP.b #$01 : BEQ .pineapples
CMP.b #$02 : BEQ .rock_meat
CMP.b #$03 : BEQ .seashells
CMP.b #$04 : BEQ .honeycomb
CMP.b #$05 : BEQ .deku_sticks
LDA.l Bananas : JMP .draw
.pineapples
LDA.l Pineapples : JMP .draw
.rock_meat
LDA.l RockMeat : JMP .draw
.seashells
LDA.l Seashells : JMP .draw
.honeycomb
LDA.l Honeycomb : JMP .draw
.deku_sticks
LDA.l DekuSticks
.draw
ASL #2 : TAX
REP #$30
LDA.w TimeLabels, X : STA.w $1692+$18
INX : INX
LDA.w TimeLabels, X : STA.w $1692+$1A
SEP #$30
RTS
.draw_goldstar_loop
LDA.w Menu_GoldstarLabel, X
STA.w $1692, X : INX #2 : INY #2 : CPY #$001C : BCC .draw_goldstar_loop
RTS
}
DrawGoldstarName:
DrawMushroomName:
{
REP #$30
LDX.w #$0000 : LDY.w #$0000
.draw_goldstar_loop
LDA.w Menu_GoldstarLabel, X : STA.w $1692, X
INX #2 : INY #2 : CPY #$001C : BCC .draw_goldstar_loop
RTS
}
REP #$30
LDX.w #$0000
LDY.w #$0000
DrawMushroomName:
{
REP #$30
LDX.w #$0000 : LDY.w #$0000
.draw_mushroom_loop
LDA.w Menu_MushroomLabel, X : STA.w $1692, X
INX #2 : INY #2 : CPY #$001C : BCC .draw_mushroom_loop
RTS
.draw_mushroom_loop
LDA.w Menu_MushroomLabel, X
STA.w $1692, X : INX #2 : INY #2 : CPY #$001C : BCC .draw_mushroom_loop
RTS
}
; =========================================================
@@ -382,33 +235,33 @@ DrawMushroomName:
DrawLocationName:
{
REP #$30
LDA $1B ; check if indoors or outdoors
AND.w #$00FF ; isolate bit
CMP.w #$01 ; if 1, then indoors
LDA $1B ; check if indoors or outdoors
AND.w #$00FF ; isolate bit
CMP.w #$01 ; if 1, then indoors
BEQ .indoors
LDA.b $8A
ASL #5
LDY.w #$000
TAX
TAX
.draw_overworld_loop
.draw_overworld_loop
LDA.w OverworldLocationNames, X ; Load your text character
STA.w $12CC, Y ; Store into the buffer
INX : INX
INY : INY : CPY #$0020 : BCC .draw_overworld_loop
RTS
.indoors
.indoors
LDA.b $A0 ; Load current room
ASL #5
TAY
LDX.w #$0000
.draw_indoors_loop
.draw_indoors_loop
LDA.w DungeonLocationNames, Y : STA.w $12CC, X
INY : INY
INY : INY
INX : INX : CPX #$0020 : BCC .draw_indoors_loop
RTS
}
@@ -421,7 +274,7 @@ Menu_DrawSelect:
REP #$30
LDX.w #$16
.loop
.loop
LDA.w SelectItemTXT, X : STA.w $1194, X
DEX #2 : BPL .loop
@@ -435,7 +288,7 @@ Menu_DrawQuestStatus:
REP #$30
LDX.w #$16
.loop
.loop
LDA.w QuestStatusTXT, X : STA.w $1194, X
DEX #2 : BPL .loop
@@ -449,7 +302,7 @@ Menu_DrawAreaNameTXT:
REP #$30
LDX.w #$26
.loop
.loop
LDA.w AreaNameTXT, X
STA.w $128C, X
@@ -462,28 +315,27 @@ Menu_DrawAreaNameTXT:
; =========================================================
; Player's Name
; $3D9-$3E4: See appendix for listing of character codes.
; $3D9-$3E4: See appendix for listing of character codes.
; Note each of the six letters is represented by a 16-bit number.
;
; 00-A 01-B 02-C 03-D 04-E 05-F 06=G 07-H
; 08-I^ 09-J 0A-K 0B-L 0C-M 0D-N OE-O OF-P
; 10-?? 20-Q 21-R 22-S 23-T 24-U 25-V
; 26-W 27-X 28-Y 29-Z
; 00-A 01-B 02-C 03-D 04-E 05-F 06=G 07-H
; 08-I^ 09-J 0A-K 0B-L 0C-M 0D-N OE-O OF-P
; 10-?? 20-Q 21-R 22-S 23-T 24-U 25-V
; 26-W 27-X 28-Y 29-Z
;
; 2A-a 2B-b-2C-c 2D-d 2E-e 2F-f 40-g 41-h
; 42-k 43-j 44-i 45-l 46-m 47-n 48-o 49-p
; 2A-a 2B-b-2C-c 2D-d 2E-e 2F-f 40-g 41-h
; 42-k 43-j 44-i 45-l 46-m 47-n 48-o 49-p
; 4A-q 4B-r 4C-s 4D-t 4E-u 4F-v 60-w 61-x 62-y 63-z
;
; 64-0 65-1 66-2 67-3 68-4 69-5 6A-6 6B-7 6C-8 6D-9 6E-"?" 6F-"!"
; 80-"-"
; 81-"."
; 82-","
; 85-"(" 86-")"
; 81-"."
; 82-","
; 85-"(" 86-")"
;
; B1-blank^
;
; ^This code is not the canon encoding of this character.
; ex. AF is the proper "I". 08 is not.
; ^This code is not the canon encoding of this character. ex. AF is the proper "I". 08 is not.
AlphabetTable:
db $00, $01, $02, $03, $04, $05, $06, $07
@@ -501,30 +353,30 @@ Menu_DrawCharacterName:
REP #$30
LDX.w #$C
.draw_name_loop
; Player's Name in memory, indexed by X
.draw_name_loop
; Player's Name in memory, indexed by X
LDA.l $7EF3D9, X
; Check if the character is the special encoding for "I" first.
CMP.w #$AF : BEQ .fix_i
CMP.w #$AF : BEQ .fix_i
; Check if it is the gap between the P and Q characters
; Check if it is the gap between the P and Q characters
CMP.w #$10 : BCC .write_to_screen ; handle P, Q gap
SBC.b #$10
CLC
CMP.w #$2A : BCS .fix_lowercase
.write_to_screen
CMP.w #$2A : BCS .fix_lowercase
.write_to_screen
CLC : ADC #$2550 : STA.w $134C, X
DEX : DEX : BPL .draw_name_loop
RTS
.fix_i
LDA.w #$08 : BRA .write_to_screen
.fix_i
LDA.w #$08 : BRA .write_to_screen
.fix_lowercase
; TODO: Convert the lowercase value of 2A or greater inside of the
; accumulator and convert it to an uppercase value.
.fix_lowercase
; TODO: Convert the lowercase value of 2A or greater inside of the
; accumulator and convert it to an uppercase value.
LDA.w #$1D : BRA .write_to_screen
}

Binary file not shown.

View File

@@ -1 +1 @@
ª0415141514151ª0ª0D1E1D1E1D1E1ª04151415141514151D1E1D1E1D1E1D1E1ª$ª$ª$ª$ª$ª$ª$ª$%%ª$;%<%ª$!%"%%%ª$;¥<¥ª$!¥"¥ª$ª$ª$ª$ª$ª$ª$ª$
ª0415141514151ª0ª0D1E1D1E1D1E1ª04151415141514151D1E1D1E1D1E1D1E1ª$ª$ª$ª$ª$ª$ª$ª$%%ª$;%<%ª$!%"%%%ª$=%>%ª$#%$%ª$ª$ª$ª$ª$ª$ª$ª$

Binary file not shown.

Binary file not shown.

View File

@@ -1,75 +0,0 @@
# This Makefile is used to extract the song data from the ROM
# The song data is extracted from the ROM and saved as a binary file
ROMFILE:= ../Roms/oos154.sfc
SONGBINS:= song01.bin \
song02.bin \
song03.bin \
song04.bin \
song05.bin \
song06.bin \
song07.bin \
song08.bin \
song09.bin \
song0A.bin \
song0B.bin \
song0C.bin \
song0D.bin \
song0E.bin \
song0F.bin
.PHONY: clean
all: $(ROMFILE) $(SONGBINS)
clean:
@rm -f $(SONGBINS)
# Triforce Intro Size: 201 bytes (0x00C9)
song01.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=859951 count=201 status=none
# Light World Overture Size 1899 bytes (0x76B)
song02.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=860152 count=1899 status=none
song03.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=862051 count=1085 status=none
song04.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=863136 count=574 status=none
song05.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=863710 count=1157 status=none
song06.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=864867 count=1394 status=none
song07.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=866261 count=1333 status=none
song08.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=867594 count=348 status=none
song09.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=867942 count=2214 status=none
song0A.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=870156 count=227 status=none
# TODO: Songs beneath this line don't have accurate skip or count
# Blame ZScream for having innacurate song size labels
song0B.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=859689 count=244 status=none
song0C.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=865054 count=255 status=none
song0D.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=865309 count=364 status=none
song0E.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=865673 count=15 status=none
song0F.bin: $(ROMFILE)
@dd if=$< of=$@ bs=1 skip=865688 count=760 status=none

View File

@@ -1,17 +0,0 @@
incsrc "Core/music_macros.asm"
incsrc "Music/lost_woods_v2.asm"
print "End of Music/lost_woods_v2.asm ", pc
incsrc "Music/color_dungeon_theme.asm"
print "End of color_dungeon_theme.asm ", pc
incsrc "Music/deku_theme.asm"
print "End of Music/deku_theme.asm ", pc
incsrc "Music/song_of_healing.asm"
print "End of Music/song_of_healing.asm ", pc
; incsrc "Music/ww_ganondorf.asm"
; incsrc "Music/great_sea.asm"

View File

@@ -1,352 +0,0 @@
;=====================================================================================
; The Legend of Zelda: A Link to the Past (Custom Music Track)
; The Legend of Zelda: Link's Awakening - Color Dungeon Theme v1.00
; Original Song by Koji Kondo and Yuichi Ozaki
; Midi by Princess Peach Toadstool
; ASM Framework by Zarby89
; Ported by Letterbomb
; Size 0x037F (895 Decimal)
;=====================================================================================
; org $1A9FF8; Sections?
; ColorDungeonTheme:
; !ARAMAddr = $D0FF
org $1B9C0F; Sections?
ColorDungeonTheme:
!ARAMAddr = $EC0B
dw !ARAMAddr+$08
dw $00FF
dw !ARAMAddr
dw $0000
.Channels
!ARAMC = !ARAMAddr-ColorDungeonTheme
dw .Channel0+!ARAMC
dw .Channel1+!ARAMC
dw .Channel2+!ARAMC
dw .Channel3+!ARAMC
dw .Channel4+!ARAMC
dw .Channel5+!ARAMC
dw $0000
dw $0000
.Channel0
%SetMasterVolume($6F)
%SetTempo(93);
%SetInstrument($09) ; Strings
%SetDurationN($24, $7F) ; 1/8
%CallSubroutine(.sub001+!ARAMC, 4) ;]
%CallSubroutine(.sub002+!ARAMC, 4) ;]_____ D6, D6s Row
%CallSubroutine(.sub003+!ARAMC, 4) ;]
%CallSubroutine(.sub004+!ARAMC, 4) ;]
%CallSubroutine(.sub005+!ARAMC, 4) ;]_____ C6, D6 Row
%CallSubroutine(.sub006+!ARAMC, 4) ;]
%CallSubroutine(.sub007+!ARAMC, 1) ;]----- Upscale
%CallSubroutine(.sub001+!ARAMC, 4) ;]
%CallSubroutine(.sub002+!ARAMC, 4) ;]_____ D6, D6s Row
%CallSubroutine(.sub003+!ARAMC, 4) ;]
%CallSubroutine(.sub004+!ARAMC, 4) ;]
%CallSubroutine(.sub005+!ARAMC, 4) ;]_____ C6, D6 Row
%CallSubroutine(.sub006+!ARAMC, 4) ;]
%CallSubroutine(.sub007+!ARAMC, 1) ;]----- Upscale
%CallSubroutine(.sub008+!ARAMC, 4) ;]
%CallSubroutine(.sub009+!ARAMC, 4) ;]
%CallSubroutine(.sub010+!ARAMC, 4) ;]_____ D6 Row
%CallSubroutine(.sub011+!ARAMC, 4) ;]
%CallSubroutine(.sub012+!ARAMC, 4) ;]
%CallSubroutine(.sub013+!ARAMC, 4) ;]
%CallSubroutine(.sub007+!ARAMC, 1) ;]----- Upscale
db $00 ; End of the channel
.sub001 ;]
db G4, A4s, D5, D5s ;]
db $00 ; End ;]
;]
.sub002 ;]
db F4s, A4, D5, D5s ;]
db $00 ; End ;]
;]----- D6, D6s Row
.sub003 ;]
db F4, G4s, D5, D5s ;]
db $00 ; End ;]
;]
.sub004 ;]
db E4, G4, D5, D5s ;]
db $00 ; End ;]
.sub005 ;]
db D4s, G4, C5, D5 ;]
db $00 ; End ;]
;]----- C6, D6 Row
.sub006 ;]
db D4, G4, C5, D5 ;]
db $00 ; End ;]
.sub007 ;]
db C4, F4s, A4, C5, F4s, A4, C5, D5s, A4, C5, D5s, C5, D5s, F5s, D5s, F5s, A5, F5s, A5, C6 ;]----- Upscale
db $00 ; End ;]
.sub008 ;]
db D5, A4s, G4, A4s ;]
db $00 ; End ;]
;]
.sub009 ;]
db D5, A4, F4s, A4 ;]
db $00 ; End ;]
;]
.sub010 ;]
db D5, G4s, F4, G4s ;]
db $00 ; End ;]_____ D6 Row
;]
.sub011 ;]
db D5, G4, E4, G4 ;]
db $00 ; End ;]
;]
.sub012 ;]
db D5, G4, D4s, G4 ;]
db $00 ; End ;]
;]
.sub013 ;]
db D5, G4, D4, G4 ;]
db $00 ; End ;]
.Channel1
%SetInstrument($18) ; Guitar
%SetDurationN($48, $7F) ; 1/4
%CallSubroutine(.sub101+!ARAMC, 1) ;]----- Melody
%CallSubroutine(.sub102+!ARAMC, 1) ;]----- Upscale
%CallSubroutine(.sub101+!ARAMC, 1) ;]----- Melody
%CallSubroutine(.sub102+!ARAMC, 1) ;]----- Upscale
db $48, D3, Tie, Tie, Tie, D3
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db C3s, Tie, A2, Tie, Tie, Tie, C3
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db D3, C3, B2
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db G2, A2, A2s
%CallSubroutine(.subA01+!ARAMC, 4) ;]----- Tie Repeats
db A2s, C3, A2s, A2
%CallSubroutine(.subA01+!ARAMC, 4) ;]----- Tie Repeats
db G2, F2s, G2, A2, Tie, Tie, Tie, Rest
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db $00 ; End of the channel
.sub101
db $48, G2, Tie, Tie, Tie, A2s, Tie, D3, Tie, C3s, Tie, F2s, Tie, Tie, Tie, Tie, Tie, F2, Tie, Tie, Tie, Tie, $24, Tie, G2s, $48, Tie, C3s, C3, Tie, E2, Tie, Tie, Tie, Tie, Tie, $24, D2s, D2, $48, D2s, Tie, Tie, G2, $24, Tie, D3s, Tie, Tie, D3, Tie, D2, C2s, $48, D2, Tie, Tie, G2, $24, Tie, D3, Tie, Tie, C3s, Tie
db $00 ; End
;|_________________________________________________________|
;|
;|
;Melody
.sub102 ;]
db D2, F2s, A2, F2s, A2, C3, A2, C3, D3s, C3, D3s, F3s, A3, F3s, D3s, C3s, D3s, C3s, A2, F2s ;]----- Upscale
db $00 ; End ;]
.Channel2
%SetInstrument($18) ; Guitar
%SetDurationN($24, $7F) ; 1/8
%CallSubroutine(.sub201+!ARAMC, 4) ;]
%CallSubroutine(.sub202+!ARAMC, 4) ;]_____ D6, D6s Row
%CallSubroutine(.sub203+!ARAMC, 4) ;]
%CallSubroutine(.sub204+!ARAMC, 4) ;]
%CallSubroutine(.sub205+!ARAMC, 4) ;]_____ C6, D6 Row
%CallSubroutine(.sub206+!ARAMC, 4) ;]
%CallSubroutine(.sub207+!ARAMC, 1) ;]----- Upscale
%CallSubroutine(.sub201+!ARAMC, 4) ;]
%CallSubroutine(.sub202+!ARAMC, 4) ;]_____ D6, D6s Row
%CallSubroutine(.sub203+!ARAMC, 4) ;]
%CallSubroutine(.sub204+!ARAMC, 4) ;]
%CallSubroutine(.sub205+!ARAMC, 4) ;]_____ C6, D6 Row
%CallSubroutine(.sub206+!ARAMC, 4) ;]
%CallSubroutine(.sub207+!ARAMC, 1) ;]----- Upscale
%SetInstrument($0F) ; Harp
db $48, D6, Tie, Tie, Tie, D6
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db C6s, Tie, A5, Tie, Tie, Tie, C6
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db D6, C6, B5
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db G5, A5, A5s
%CallSubroutine(.subA01+!ARAMC, 4) ;]----- Tie Repeats
db A5s, C6, A5s, A5
%CallSubroutine(.subA01+!ARAMC, 4) ;]----- Tie Repeats
db G5, F5s, G5, A5, Tie, Tie, Tie, Rest
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db $00 ; End of the channel
.sub201 ;]
db G2, A2s, D3, D3s ;]
db $00 ; End ;]
;]
.sub202 ;]
db F2s, A2, D3, D3s ;]
db $00 ; End ;]
;]----- D6, D6s Row
.sub203 ;]
db F2, G2s, D3, D3s ;]
db $00 ; End ;]
;]
.sub204 ;]
db E2, G2, D3, D3s ;]
db $00 ; End ;]
.sub205 ;]
db D2s, G2, C3, D3 ;]
db $00 ; End ;]
;]----- C6, D6 Row
.sub206 ;]
db D2, G2, C3, D3 ;]
db $00 ; End ;]
.sub207 ;]
db C2, F2s, A2, C3, F2s, A2, C3, D3s, A2, C3, D3s, C3, D3s, F3s, D3s, F3s, A3, F3s, A3, C4 ;]----- Upscale
db $00 ; End ;]
.Channel3
%SetChannelVolume($9D)
%SetInstrument($13) ; Snare
%SetDurationN($48, $7F) ; 1/4
%CallSubroutine(.sub301+!ARAMC, 4)
%CallSubroutine(.sub302+!ARAMC, 4)
%CallSubroutine(.sub303+!ARAMC, 8)
%CallSubroutine(.sub304+!ARAMC, 6)
db G2, Tie, G2, Tie, G2
%CallSubroutine(.subA01+!ARAMC, 9)
%CallSubroutine(.sub301+!ARAMC, 4)
%CallSubroutine(.sub302+!ARAMC, 4)
%CallSubroutine(.sub303+!ARAMC, 8)
%CallSubroutine(.sub304+!ARAMC, 6)
db G2, Tie, G2, Tie, G2
%CallSubroutine(.subA01+!ARAMC, 9)
%SetInstrument($15) ; Choir
db $48, D5, Tie, Tie, Tie, D5
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db C5s, Tie, A4, Tie, Tie, Tie, C5
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db D5, C5, B4
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db G4, A4, A4s
%CallSubroutine(.subA01+!ARAMC, 4) ;]----- Tie Repeats
db A4s, C5, A4s, A4
%CallSubroutine(.subA01+!ARAMC, 4) ;]----- Tie Repeats
db G4, F4s, G4, A4, Tie, Tie, Tie, Rest
%CallSubroutine(.subA01+!ARAMC, 5) ;]----- Tie Repeats
db $00 ; End of the channel
.sub301
db G2, Tie
db $00 ; End
.sub302
db F2, Tie
db $00 ; End
.sub303
db E2, Tie
db $00 ; End
.sub304
db D2s, Tie
db $00 ; End
.Channel4
%SetInstrument($09) ; Strings
%SetDurationN($48, $7F) ; 1/4
%CallSubroutine(.sub401+!ARAMC, 1) ;]----- Melody
%CallSubroutine(.sub402+!ARAMC, 1) ;]----- Upscale
%CallSubroutine(.sub401+!ARAMC, 1) ;]----- Melody
%CallSubroutine(.sub402+!ARAMC, 1) ;]----- Upscale
%SetInstrument($18) ; Guitar
%CallSubroutine(.sub403+!ARAMC, 4) ;]
%CallSubroutine(.sub404+!ARAMC, 4) ;]
%CallSubroutine(.sub405+!ARAMC, 4) ;]_____ D6 Row
%CallSubroutine(.sub406+!ARAMC, 4) ;]
%CallSubroutine(.sub407+!ARAMC, 4) ;]
%CallSubroutine(.sub408+!ARAMC, 4) ;]
%CallSubroutine(.sub207+!ARAMC, 1) ;]----- Upscale
db $00 ; End of the channel
.sub401
db $48, G3, Tie, Tie, Tie, A3s, Tie, D4, Tie, C4s, Tie, F3s, Tie, Tie, Tie, Tie, Tie, F3, Tie, Tie, Tie, Tie, $24, Tie, G3s, $48, Tie, C4s, C4, Tie, E3, Tie, Tie, Tie, Tie, Tie, $24, D3s, D3, $48, D3s, Tie, Tie, G3, $24, Tie, D4s, Tie, Tie, D4, Tie, D3, C3s, $48, D3, Tie, Tie, G3, $24, Tie, D4, Tie, Tie, C4s, Tie
db $00 ; End
;|_________________________________________________________|
;|
;|
;Melody
.sub402 ;]
db D3, F3s, A3, F3s, A3, C4, A3, C4, D4s, C4, D4s, F4s, A4, F4s, D4s, C4s, D4s, C4s, A3, F3s ;]----- Upscale
db $00 ; End ;]
.sub403 ;]
db D3, A2s, G2, A2s ;]
db $00 ; End ;]
;]
.sub404 ;]
db D3, A2, F2s, A2 ;]
db $00 ; End ;]
;]
.sub405 ;]
db D3, G2s, F2, G2s ;]
db $00 ; End ;]_____ D6 Row
;]
.sub406 ;]
db D3, G2, E2, G2 ;]
db $00 ; End ;]
;]
.sub407 ;]
db D3, G2, D2s, G2 ;]
db $00 ; End ;]
;]
.sub408 ;]
db D3, G2, D2, G2 ;]
db $00 ; End ;]
.Channel5
%SetInstrument($09) ; Strings
%SetDurationN($12, $7F) ; 1/16
db Rest, $24
%CallSubroutine(.sub001+!ARAMC, 4) ;]
%CallSubroutine(.sub002+!ARAMC, 4) ;]_____ D6, D6s Row
%CallSubroutine(.sub003+!ARAMC, 4) ;]
%CallSubroutine(.sub004+!ARAMC, 4) ;]
%CallSubroutine(.sub005+!ARAMC, 4) ;]_____ C6, D6 Row
%CallSubroutine(.sub006+!ARAMC, 4) ;]
%CallSubroutine(.sub007+!ARAMC, 1) ;]----- Upscale
%CallSubroutine(.sub001+!ARAMC, 4) ;]
%CallSubroutine(.sub002+!ARAMC, 4) ;]_____ D6, D6s Row
%CallSubroutine(.sub003+!ARAMC, 4) ;]
%CallSubroutine(.sub004+!ARAMC, 4) ;]
%CallSubroutine(.sub005+!ARAMC, 4) ;]_____ C6, D6 Row
%CallSubroutine(.sub006+!ARAMC, 4) ;]
%CallSubroutine(.sub007+!ARAMC, 1) ;]----- Upscale
db Rest, $48
%CallSubroutine(.subA01+!ARAMC, 58) ;]----- Tie Repeats
db $00 ; End of the channel
.subA01 ;]
db Tie ;]----- Tie Repeats
db $00 ; End ;]

View File

@@ -1,83 +0,0 @@
;==========================================================
; The Legend of Zelda: A Link to the Past (Custom Music Track)
; The Legend of Zelda: Ocarina of Time - Great Deku Tree Theme v1.00
; Original Song by Koji Kondo
; Midi by Loeder
; ASM Framework by Zarby89
; Ported by Letterbomb
; Size 0x0098 (152 Decimal)
;==========================================================
org $1AA763; Sections?
GreatDekuTreeTheme:
!ARAMAddr = $D86A
dw !ARAMAddr+$08
dw $00FF
dw !ARAMAddr
dw $0000
.Channels
!ARAMC = !ARAMAddr-GreatDekuTreeTheme
dw .Channel0+!ARAMC
dw .Channel1+!ARAMC
dw .Channel2+!ARAMC
dw $0000
dw $0000
dw $0000
dw $0000
dw $0000
.Channel0
%SetMasterVolume($C8)
%SetTempo(45)
%SetInstrument($09) ; Strings
%SetDurationN($48, $7F) ; 1/4
db Rest
%CallSubroutine(.sub001+!ARAMC, 1)
db C4, Tie, Tie, Rest
%CallSubroutine(.sub001+!ARAMC, 1)
db A4s, G4, Tie, Rest, F4, E4, C4, B3, G3, Tie, G3, $24, A3s, G3s, $48, A3s, Tie, G3s, Tie, G3, Tie, Tie, Tie
db $00 ; End of the channel
.sub001
db C4, C4s, F4, E4
db $00 ; End
.Channel1
%SetInstrument($09) ; Strings
%SetDurationN($48, $7F) ; 1/4
db Rest
%CallSubroutine(.sub101+!ARAMC, 1)
db G3, Tie, Tie, Rest
%CallSubroutine(.sub101+!ARAMC, 1)
db F4, E4, Tie, Rest, C4, C4s, F4, E4, C4, Tie, Tie, Rest, $24, C3, C3s, D3s, F3, F3s, G3s, A3s, C4s, $48, C4, Tie, Tie
db $00 ; End of the channel
.sub101
db G3, G3s, C4, B3
db $00 ; End
.Channel2
%SetInstrument($11) ; Trumpet
%SetDurationN($48, $7F) ; 1/4
db C3
%CallSubroutine(.subA01+!ARAMC, 7)
db C3s
%CallSubroutine(.subA01+!ARAMC, 7)
db C3
%CallSubroutine(.subA01+!ARAMC, 7)
db C3s, Tie, Tie, Tie, C3, Tie, Tie, Tie
db $00 ; End of the channel
.subA01
db Tie
db $00 ; End

View File

@@ -1,138 +0,0 @@
; Expanded Music Banks
; Adds a new song bank to the dark world
SPC_ENGINE = $0800
SFX_DATA = $17C0
SAMPLE_POINTERS = $3C00
INSTRUMENT_DATA = $3D00
INSTRUMENT_DATA_SFX = $3E00
SAMPLE_DATA = $4000
SONG_POINTERS = $D000
SONG_POINTERS_AUX = $2B00
CREDITS_AUX_POINTER = $2900
LoadOverworldSongs = $008913
SongBank_Overworld_Main = $1A9EF5
pullpc
SongBank_OverworldExpanded_Main:
#_1A9EF5: dw $2DAE, SONG_POINTERS ; Transfer size, transfer address
base SONG_POINTERS
{
#_1A9EF9: #_D000o: dw Song01_TriforceIntro
#_1A9EFB: #_D002o: dw Song02_LightWorldOverture
#_1A9EFD: #_D004o: dw Song03_Rain
#_1A9EFF: #_D006o: dw Song04_BunnyTheme
#_1A9F01: #_D008o: dw Song05_LostWoods
#_1A9F03: #_D00Ao: dw Song06_LegendsTheme_Attract
#_1A9F05: #_D00Co: dw Song07_KakarikoVillage
#_1A9F07: #_D00Eo: dw Song08_MirrorWarp
#_1A9F09: #_D010o: dw Song09_DarkWorld
#_1A9F0B: #_D012o: dw Song0A_PullingTheMasterSword
#_1A9F0D: #_D014o: dw Song0B_FairyTheme
#_1A9F0F: #_D016o: dw Song0C_Fugitive
#_1A9F11: #_D018o: dw Song0D_SkullWoodsMarch
#_1A9F13: #_D01Ao: dw Song0E_MinigameTheme
#_1A9F15: #_D01Co: dw Song0F_IntroFanfare
#_1A9F17: #_D01Eo: dw $0000
#_1A9F19: #_D020o: dw $0000
#_1A9F1B: #_D022o: dw $0000
#_1A9F1D: #_D024o: dw $0000
#_1A9F1F: #_D026o: dw $0000
#_1A9F21: #_D028o: dw $0000
#_1A9F23: #_D02Ao: dw $0000
#_1A9F25: #_D02Co: dw $0000
#_1A9F27: #_D02Eo: dw $0000
#_1A9F29: #_D030o: dw $0000
#_1A9F2B: #_D032o: dw $0000
#_1A9F2D: #_D034o: dw $0000
Song01_TriforceIntro:
incbin song01.bin
Song02_LightWorldOverture:
incbin song02.bin
Song03_Rain:
; incbin song03.bin
incsrc deku_theme.asm
Song04_BunnyTheme:
incbin song04.bin
Song05_LostWoods:
incbin song05.bin
Song06_LegendsTheme_Attract:
incbin song06.bin
Song07_KakarikoVillage:
incbin song07.bin
Song08_MirrorWarp:
incbin song08.bin
Song09_DarkWorld:
incbin song09.bin
Song0A_PullingTheMasterSword:
incbin song0A.bin
Song0B_FairyTheme:
incbin song0B.bin
Song0C_Fugitive:
incbin song0C.bin
Song0F_IntroFanfare:
incbin song0F.bin
}
base off
SongBank_Overworld_Auxiliary:
#_1ACCA7: dw $0688, SONG_POINTERS_AUX ; Transfer size, transfer address
base SONG_POINTERS_AUX
{
Song0D_SkullWoodsMarch:
incbin song0D.bin
Song0E_MinigameTheme:
incbin song0E.bin
}
base off
#_1AF420: dw $0000, SPC_ENGINE ; end of transfer
print pc
LoadOverworldSongsExpanded:
{
LDA.w $0FFF : BEQ .light_world
LDA.b #SongBank_OverworldExpanded_Main>>0
STA.b $00
LDA.b #SongBank_OverworldExpanded_Main>>8
STA.b $01
LDA.b #SongBank_OverworldExpanded_Main>>16
STA.b $02
RTL
.light_world
#_008913: LDA.b #SongBank_Overworld_Main>>0
#_008915: STA.b $00
#_008917: LDA.b #SongBank_Overworld_Main>>8
#_008919: STA.b $01
#_00891B: LDA.b #SongBank_Overworld_Main>>16
#_00891D: STA.b $02
RTL
}
pushpc
org $008919 ; LoadOverworldSongs
JSL LoadOverworldSongsExpanded
pullpc

View File

@@ -7,11 +7,11 @@
; Ported by Letterbomb
;=====================================================================================
; lorom
lorom
; org $1ACCAB; Sections?
org $1ACCAB; Sections?
FrozenHyruleTheme:
!ARAMAddr = $EF6D
!ARAMAddr = $2B00
dw !ARAMAddr+$0A ; Intro
dw !ARAMAddr+$1A ; Looping
dw $00FF
@@ -42,7 +42,7 @@ dw $0000
.Channel0Intro
%SetMasterVolume($80)
%SetMasterVolume($AF)
%SetTempo(80);
%SetInstrument($15) ; Choir
%SetDurationN($48, $7F) ; 1/4

View File

@@ -1,286 +0,0 @@
; =========================================================
; The Legend of Zelda: Wind Waker - The Great Sea
; Kenta Nagata, Hajime Wakai, Toru Minegishi, and Koji Kondo
; Test code to play the song as the game start (Only for Testing)
!n = $7F
org $00FFD7 ; Set rom on 16mb
db #$0B
org $3FFFFF ; write at the last position to expand on 2mb
db #$00
org $0CC120
LDA #$02 : STA $012C
STA $2140 : STA $0133 : STA $0130
RTL
; !ARAMAddr = $2BB3
org $1A9FF8
GreatSea:
{
!ARAMAddr = $D0FF
dw !ARAMAddr+$0A ; Intro
dw !ARAMAddr+$1A ; Looping
dw $00FF
dw !ARAMAddr+$02 ; Looping Section
dw $0000
.ChannelsIntro
!ARAMC = !ARAMAddr-GreatSea
dw .Channel0_Choir+!ARAMC
dw .Channel1_Strings+!ARAMC
dw .Channel2_Piano+!ARAMC
dw $0000
dw $0000
dw $0000
dw $0000
dw $0000
.Channels
!ARAMC = !ARAMAddr-GreatSea
dw .MainChannel0_Choir+!ARAMC
dw .MainChannel1_Strings+!ARAMC
dw .MainChannel2_Piano+!ARAMC
dw .MainChannel3_Trumpet+!ARAMC
dw .MainChannel4_TrumpetSupport+!ARAMC
dw .MainChannel5_Drums+!ARAMC
dw $0000
dw $0000
; ---------------------------------------------
; Intro Channels
{
.Channel0_Choir
%SetMasterVolume($C8)
%SetTempo(100)
%Choir()
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.intro_choir00+!ARAMC, 2)
db $00
.Channel1_Strings
%Strings()
%SetChannelVolume($D8)
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.intro_strings+!ARAMC, 8)
db $00
.Channel2_Piano
%Piano()
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.intro_lead+!ARAMC, 8)
db $00
}
; ---------------------------------------------
; Main Channels
{
.MainChannel0_Choir
%Choir()
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.main_choir00+!ARAMC, 8)
%CallSubroutine(.intro_lead+!ARAMC, 8) ; Change me
%CallSubroutine(.main_choir00+!ARAMC, 32) ; Change me
db $00
.MainChannel1_Strings
%Strings()
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.main_piano+!ARAMC, 8)
%CallSubroutine(.intro_lead+!ARAMC, 8) ; Change me
%CallSubroutine(.main_piano+!ARAMC, 32)
db $00
.MainChannel2_Piano
%Piano()
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.main_piano+!ARAMC, 8)
%CallSubroutine(.intro_lead+!ARAMC, 8)
%CallSubroutine(.main_piano+!ARAMC, 32)
db $00
.MainChannel3_Trumpet
%Trumpet()
%SetDurationN(!4th, $7F)
%TremoloOn(1, 4, 4)
%CallSubroutine(.main_trumpet+!ARAMC, 0)
%CallSubroutine(.silence+!ARAMC, 32)
%CallSubroutine(.main_trumpet+!ARAMC, 0)
%TremoloOff()
db $00
.MainChannel4_TrumpetSupport
%Trumpet()
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.support_trumpet+!ARAMC, 0)
%CallSubroutine(.silence+!ARAMC, 32)
%CallSubroutine(.main_piano_support_trumpet+!ARAMC, 0)
db $00
.MainChannel5_Drums
%Tympani()
%SetChannelVolume($88)
%SetDurationN(!4th, $7F) ; 1/4
%CallSubroutine(.main_drums+!ARAMC, 48)
db $00
}
; ---------------------------------------------
.silence
db Rest, $00
.sustain
db Tie, $00
.intro_choir00
db F3s, Tie, Tie, Tie, G3s, Tie, Tie, Tie, F3s, Tie, Tie, Tie, A3, Tie, Tie, Tie
db $00
.intro_strings
db D3, Tie, Tie, Tie
db E3, Tie, Tie, Tie
db D3, Tie, Tie, Tie
db C3s, Tie, Tie, Tie
db $00
.intro_lead
db !8th, D2, A2, D3, !4th, E3, !8th, D3, D3, A2
db $00
.main_drums
db F1s, Tie, Tie, Tie, F1s, Tie, Tie, Tie
db G1, Tie, Tie, Tie, G1, Tie, Tie, Tie
db A1, Tie, Tie, Tie, A1, Tie, Tie, Tie
db G1, Tie, Tie, Tie, G1, Tie, Tie, Tie
db F1s, Tie, Tie, Tie, F1s, Tie, Tie, Tie
db E1, Tie, Tie, Tie, E1, Tie, Tie, Tie
db A1, Tie, Tie, Tie, A1, Tie, Tie, Tie
db D1, Tie, Tie, Tie, D1, Tie, Tie, Tie
db F1s, Tie, Tie, Tie, F1s, Tie, Tie, Tie
db G1, Tie, Tie, Tie, G1, Tie, Tie, Tie
db A1, Tie, Tie, Tie, A1, Tie, Tie, Tie
db G1, Tie, Tie, Tie, G1, Tie, Tie, Tie
db F1s, Tie, Tie, Tie, B1, Tie, Tie, Tie
db A1s, Tie, Tie, Tie, A1s, Tie, Tie, Tie
db C2, Tie, Tie, Tie, C2, Tie, Tie, Tie
db $00
.main_choir00
db D3, Tie, D3, Tie, E3, Tie, D3, Tie, D3, Tie, D3, Tie, D3, Tie, C3s, Tie
db $00
.main_piano
db !4th, D1, !8th, Rest, D1, Rest, !16th, D1, Rest, D1, Rest, D1, Rest
db !4th, D1, !8th, Rest, D1, Rest, !16th, D1, Rest, D1, Rest, D1, Rest
db !4th, F1s, !8th, Rest, F1s, Rest, !16th, F1s, Rest, F1s, Rest, F1s, Rest
db !4th, F1s, !8th, Rest, F1s, Rest, !16th, F1s, Rest, F1s, Rest, F1s, Rest
db !4th, G1, !8th, Rest, G1, Rest, !16th, G1, Rest, G1, Rest, D1, Rest
db !4th, G1, !8th, Rest, G1, Rest, !16th, G1, Rest, G1, Rest, G1, Rest
db $00
.main_piano_support_trumpet
db !4th, D3, !8th, Rest, D3, Rest, !16th, D3, Rest, D3, Rest, D3, Rest
db !4th, D3, !8th, Rest, D3, Rest, !16th, D3, Rest, D3, Rest, D3, Rest
db !4th, F3s, !8th, Rest, F3s, Rest, !16th, F3s, Rest, F3s, Rest, F3s, Rest
db !4th, F3s, !8th, Rest, F3s, Rest, !16th, F3s, Rest, F3s, Rest, F3s, Rest
db !4th, G3, !8th, Rest, G3, Rest, !16th, G3, Rest, G3, Rest, D3, Rest
db !4th, G3, !8th, Rest, G3, Rest, !16th, G3, Rest, G3, Rest, G3, Rest
db $00
.main_trumpet
db !8th, F3s, !16th, Rest, D3
db !4th, A2, Tie, Tie, Tie, Tie, Tie
db !16th, D3, A2, D3, F3s, !4th
db A3, Tie, Tie, Tie, Tie, Tie, Tie
db !16th, A3, Rest, G3, F3s
db !4th, G3, Tie, Tie, Tie, Tie, Tie, Tie, Tie
db E3, Tie, Tie, Tie, Tie, Tie
db A2, Tie
db !16th, B2, Rest, B2, C3s
db !4th, D3, Tie, Tie, Tie, Tie, Tie, E3
db D3, Tie, Tie, Tie
db A2, Tie, Tie, Tie
db !16th, B2, Rest, B2, C3s
db !4th, D3, Tie, Tie, Tie, Tie, Tie, E3
db D3, Tie, Tie, Tie
db E3, Tie, Tie, Tie
db !8th, F3s, !16th, Rest, D3
db !4th, A2, Tie, Tie, Tie, Tie, Tie
db !16th, D3, A2, D3, F3s
db !4th, A3, Tie, Tie, Tie, Tie, Tie, Tie
db !16th, A3, Rest, G3, F3s
db !4th, G3, Tie, Tie, Tie, Tie, Tie, Tie, Tie
db E3, Tie, Tie, Tie, Tie, Tie
db !16th, A2, Tie, Tie, Tie
db !16th, B2, Rest, B2, C3s
db !4th, D3, Tie, Tie, Tie, Tie, Tie, E3
db D3, Tie, Tie, Tie
db E3, Tie, Tie, Tie
db $00
.support_trumpet
db A2, Tie, Tie, Tie, Tie, Tie, Tie, Tie
db E3, Tie, Tie, Tie
db D3, Tie, Tie, Tie
db D3, Tie, Tie, Tie, Tie, Tie, Tie, Tie
db E3, Tie, Tie
db !16th, A3, A3, A3
db !4th, A3, Tie, Tie, Tie
db Rest, Rest, Rest, Rest
db !16th, B2, Rest, B2, C3s
db !4th, D3, Tie, Tie, Tie
db D3, Tie, Tie, Tie
db A2, Tie, Tie, Tie
; 21
db Rest, Rest, Rest, Rest
db !16th, B2, Rest, B2, C3s
db !4th, D3, Tie, Tie
db B2, Tie, Tie, Tie
db C3s, Tie, Tie, Tie
db A2, Tie, Tie, Tie
db !8th, F3s, !16th, Rest, D3
db !4th, A2, Tie, Tie ; 26
db E3, Tie, Tie, Tie
db D3, Tie, Tie, Tie
db D3, Tie, Tie
db !16th, A3, Rest, G3, F3s
; 30
db !4th, G3, Tie, Tie, Tie
db E3, Tie, Tie
db !16th, A3, A3, A3
db !4th, A3, Tie, Tie, Tie
; 33
db Rest, Rest, Rest, Rest
db !16th, B2, Rest, B2, C3s
db !4th, D3, Tie, Tie, Tie
db D3, Tie, Tie, Tie
db E3, D3, Tie, Tie, Tie
db Rest, Rest, Rest, Rest
db !16th, A2s, Rest, A2s, C3
db !4th, D3, Tie, Tie, Tie
db !16th, A2s, Rest, A2s, C3
db !4th, D3, Tie, Tie, Tie
db E3, D3, Tie, Tie, Tie
db $00
}
print "End of WW Great Sea ", pc

View File

@@ -1,233 +0,0 @@
;=====================================================================================
; The Legend of Zelda: A Link to the Past (Custom Music Track)
; The Legend of Zelda: Ocarina of Time - Lost Woods Theme v1.00
; Original Song by Koji Kondo
; Midi by John Kuzma
; ASM Framework by Zarby89
; Ported by Letterbomb
; Size 0x0246 (582 Decimal)
;=====================================================================================
org $1AADDE; Sections?
LostWoodsTheme:
!ARAMAddr = $DEE5
dw !ARAMAddr+$0A ; Intro
dw !ARAMAddr+$1A ; Looping
dw $00FF
dw !ARAMAddr+$02 ; Looping Section
dw $0000
.ChannelsIntro
!ARAMC = !ARAMAddr-LostWoodsTheme
dw .Channel0Intro+!ARAMC
dw .Channel1Intro+!ARAMC
dw $0000
dw $0000
dw $0000
dw $0000
dw $0000
dw $0000
.Channels
!ARAMC = !ARAMAddr-LostWoodsTheme
dw .Channel0+!ARAMC
dw .Channel1+!ARAMC
dw .Channel2+!ARAMC
dw .Channel3+!ARAMC
dw .Channel4+!ARAMC
dw .Channel5+!ARAMC
dw $0000
dw $0000
.Channel0Intro
%SetTempo(86);
%SetChannelVolume($60)
%SetInstrument($13) ; Snare
%SetDurationN($12, $7F) ; 1/16
%CallSubroutine(.sub0100+!ARAMC, 1)
db $00 ; End of the channel
.Channel1Intro
%SetChannelVolume($60)
%SetInstrument($0C) ; Cymbal
%SetDurationN($12, $7F) ; 1/16
%CallSubroutine(.sub0100+!ARAMC, 1)
db $00 ; End of the channel
.Channel0
db $12
%CallSubroutine(.sub0101+!ARAMC, 16)
%CallSubroutine(.sub0102+!ARAMC, 25)
%CallSubroutine(.sub0103+!ARAMC, 4)
%CallSubroutine(.sub0102+!ARAMC, 3)
%CallSubroutine(.sub0104+!ARAMC, 1)
db $00 ; End of the channel
.sub0100
db F5s, Tie, F5s, F5s, F5s, Tie, F5s, F5s, F5s, Tie, $24, F5s, Tie, C6
db $00 ; End
.sub0101
db F5s, Tie, F5s, F5s, F5s, Tie, F5s, Tie
db $00 ; End
.sub0102
db F5s, Tie, F5s, F5s
db $00 ; End
.sub0103
db $48, D6, $12, F5s, Tie, F5s, F5s
db $00 ; End
.sub0104
db F5s, Tie, F5s, F5s, Tie, Tie, F5s, Tie, $48, F5s, F5s
db $00 ; End
.Channel1
db $12
%CallSubroutine(.sub0101+!ARAMC, 16)
%CallSubroutine(.sub0102+!ARAMC, 25)
%CallSubroutine(.sub0103+!ARAMC, 4)
%CallSubroutine(.sub0102+!ARAMC, 3)
%CallSubroutine(.sub0104+!ARAMC, 1)
db $00 ; End of the channel
.Channel2
%SetChannelVolume($9E)
%SetInstrument($0F) ; Harp
%SetDurationN($48, $7F) ; 1/4
%CallSubroutine(.sub201+!ARAMC, 4)
%CallSubroutine(.sub202+!ARAMC, 4)
%CallSubroutine(.sub201+!ARAMC, 4)
%CallSubroutine(.sub202+!ARAMC, 4)
db $24
%CallSubroutine(.sub203+!ARAMC, 3)
%CallSubroutine(.sub204+!ARAMC, 2)
%CallSubroutine(.sub205+!ARAMC, 2)
db E2, A2, Tie, A2, E2, B2, Tie, A2, E2, G2s, G2s, G2s, $48, G2s, B4
db $00 ; End of the channel
.sub201
db F2, Tie
db $00 ; End
.sub202
db C2, Tie
db $00 ; End
.sub203
db D2, F2, D2, F2, G1, D2, G1, G2, C2, G2, C2, G2, A1, E2, A1, E2
db $00 ; End
.sub204
db D2, A2, F2, Tie
db $00 ; End
.sub205
db C2, G2, G2, Tie
db $00 ; End
.Channel3
%SetChannelVolume($9E)
%SetInstrument($16) ; Flute
%SetDurationN($24, $7F) ; 1/8
%CallSubroutine(.sub301+!ARAMC, 1)
db B4, G4, E4, $48, Tie, Tie, $24, D4, E4, G4, $48, E4, Tie, Tie, $24
%CallSubroutine(.sub301+!ARAMC, 1)
db E5, B4, G4, $48, Tie, Tie, $24, B4, G4, D4, E4, Tie, $48, Tie, Tie
%CallSubroutine(.subA01+!ARAMC, 8)
db $24, F4, G4, A4, Tie, B4, C5, D5, Tie, E5, F5, $48, G5, Tie, Tie
%CallSubroutine(.subA01+!ARAMC, 8)
db $24, F4, E4, A4, G4, B4, A4, C5, B4, D5, C5, E5, D5, F5, E5, $12, B4, C5, Tie, A4, $48, B4, Tie, Tie, Tie
%CallSubroutine(.subA01+!ARAMC, 4)
db $00 ; End of the channel
.sub301
db F4, A4, B4, Tie, F4, A4, B4, Tie, F4, A4, B4, E5, D5, Tie, B4, C5
db $00 ; End
.Channel4
%SetChannelVolume($9F)
%SetInstrument($18) ; Guitar
%SetDurationN($24, $7F) ; 1/8
%CallSubroutine(.sub401+!ARAMC, 1)
%CallSubroutine(.sub402+!ARAMC, 3)
%CallSubroutine(.sub403+!ARAMC, 1)
%CallSubroutine(.sub401+!ARAMC, 1)
%CallSubroutine(.sub402+!ARAMC, 3)
%CallSubroutine(.sub403+!ARAMC, 1)
%SetChannelVolume($9D)
%SetInstrument($09) ; Strings
%CallSubroutine(.sub501+!ARAMC, 1)
db B4, $48, E4, Tie, Tie, $24
%CallSubroutine(.sub501+!ARAMC, 1)
db D5, $48, E5, Tie, Tie, $24
%CallSubroutine(.sub501+!ARAMC, 1)
db B4, $48, E4, Tie, Tie, $24, D4, C4, F4, E4, G4, F4, A4, G4, B4, A4, C5, B4, D5, C5, $12, E5, F5, Tie, D5, $48, E5, Tie, Tie, Tie
%CallSubroutine(.subA01+!ARAMC, 4)
db $00 ; End of the channel
.sub401
db F3, C4, C4, C4
db $00 ; End
.sub402
db F3, A3, A3, A3
db $00 ; End
.sub403
db E3, G3, G3, G3, E3, G3, G3, C3, F3, C4, G3, G3, E3, G3, G3, C3
db $00 ; End
.Channel5
%SetChannelVolume($9D)
%SetInstrument($09) ; Strings
%SetDurationN($24, $7F) ; 1/8
%CallSubroutine(.sub401+!ARAMC, 1)
%CallSubroutine(.sub402+!ARAMC, 3)
%CallSubroutine(.sub403+!ARAMC, 1)
%CallSubroutine(.sub401+!ARAMC, 1)
%CallSubroutine(.sub402+!ARAMC, 3)
%CallSubroutine(.sub403+!ARAMC, 1)
%SetChannelVolume($9F)
%SetInstrument($18) ; Guitar
%CallSubroutine(.sub501+!ARAMC, 1)
db B4, $48, E4, Tie, Tie, $24
%CallSubroutine(.sub501+!ARAMC, 1)
db D5, $48, E5, Tie, Tie, $24
%CallSubroutine(.sub501+!ARAMC, 1)
db B4, $48, E4, Tie, Tie, $24, D4, C4, F4, E4, G4, F4, A4, G4, B4, A4, C5, B4, D5, C5, $12, E5, F5, Tie, D5, $48, E5, Tie, Tie, Tie
%CallSubroutine(.subA01+!ARAMC, 4)
db $00 ; End of the channel
.sub501
db D4, E4, F4, Tie, G4, A4, B4, Tie, C5
db $00 ; End
.subA01
db Rest
db $00 ; End

Some files were not shown because too many files have changed in this diff Show More