-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathzelda.asm
executable file
·68 lines (64 loc) · 1.48 KB
/
zelda.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.include "nes.inc"
.include "zelda.inc"
;iNES header data
.segment "INESHDR"
.byte "NES",$1A ; magic signature - Identify ourselves as a NES ROM.
.byte $8 ; number of 16kB banks - 8 of them.
.byte $0 ; number of 8kB VROM banks - LoZ does not use VROM.
.byte $12, $0 ; mapper type - vertical mirroring, battery backed RAM
;Zero page
.segment "ZEROPAGE"
local0: .res 1
.exportzp local0
local1: .res 1
.exportzp local1
local2: .res 1
.exportzp local2
local3: .res 1
.exportzp local3
local4: .res 1
.exportzp local4
local5: .res 1
.exportzp local5
.org $66
musicData: .res 2 ;0x66
.exportzp musicData
.org $E0
gamePaused: .res 1
.exportzp gamePaused
.org $FE
ppuMaskVal: .res 1
.exportzp ppuMaskVal ;0xFE
ppuCtrlVal: .res 1
.exportzp ppuCtrlVal ;0xFF
.segment "WRAM"
.org $600
musicRequest: .res 1
.export musicRequest
unknown601: .res 1
musicEffectRequest: .res 1
.export musicEffectRequest
unknown603: .res 1
soundEffectRequest: .res 1
.export soundEffectRequest
currentSoundEffect: .res 1
.export currentSoundEffect
unknown606: .res 1
currentMusicEffect: .res 1
.export currentMusicEffect
unknown608: .res 1
currentMusic: .res 1
.export currentMusic
musicOffsetVoiceA: .res 1
.export musicOffsetVoiceA
musicOffsetVoiceB: .res 1
.export musicOffsetVoiceB
musicOffsetVoiceC: .res 1
.export musicOffsetVoiceC
musicOffsetVoiceD: .res 1
.export musicOffsetVoiceD
.org $610
noteDuration: .res 1
.export noteDuration
musicTimer: .res 1
.export musicTimer