diff options
Diffstat (limited to 'wram.asm')
-rw-r--r-- | wram.asm | 169 |
1 files changed, 82 insertions, 87 deletions
@@ -1,13 +1,16 @@ -INCLUDE "includes.asm" +INCLUDE "contents.asm" +INCLUDE "constants.asm" + INCLUDE "macros/wram.asm" + INCLUDE "vram.asm" SECTION "Audio RAM", WRAM0 -wc000:: + wMusic:: -wMusicPlaying:: ; c000 + ; nonzero if playing - ds 1 +wMusicPlaying:: db ; c100 wChannels:: wChannel1:: channel_struct wChannel1 ; c101 @@ -18,121 +21,113 @@ wChannel4:: channel_struct wChannel4 ; c197 wSFXChannels:: wChannel5:: channel_struct wChannel5 ; c1c9 wChannel6:: channel_struct wChannel6 ; c1fb -wChannel7:: channel_struct wChannel7 ; c12d -wChannel8:: channel_struct wChannel8 ; c15f +wChannel7:: channel_struct wChannel7 ; c22d +wChannel8:: channel_struct wChannel8 ; c25f + + ds 1 ; c291 - ds 1 ; c191 -wCurTrackDuty:: ds 1 -wCurTrackIntensity:: ds 1 +wCurTrackDuty:: db +wCurTrackIntensity:: db wCurTrackFrequency:: dw wUnusedBCDNumber:: db ; BCD value, dummied out -wCurNoteDuration:: ds 1 ; used in MusicE0 and LoadNote +wCurNoteDuration:: db ; used in MusicE0 and LoadNote -wCurMusicByte:: ; c198 - ds 1 -wCurChannel:: ; c199 - ds 1 -wVolume:: ; c19a -; corresponds to $ff24 +wCurMusicByte:: db ; c298 +wCurChannel:: db ; c299 +wVolume:: ; c29a +; corresponds to rNR50 ; Channel control / ON-OFF / Volume (R/W) ; bit 7 - Vin->SO2 ON/OFF ; bit 6-4 - SO2 output level (volume) (# 0-7) ; bit 3 - Vin->SO1 ON/OFF ; bit 2-0 - SO1 output level (volume) (# 0-7) - ds 1 -wSoundOutput:: ; c19b -; corresponds to $ff25 + db +wSoundOutput:: ; c29b +; corresponds to rNR51 ; bit 4-7: ch1-4 so2 on/off ; bit 0-3: ch1-4 so1 on/off - ds 1 -wSoundInput:: ; c19c -; corresponds to $ff26 + db +wSoundInput:: ; c29c +; corresponds to rNR52 ; bit 7: global on/off ; bit 0: ch1 on/off ; bit 1: ch2 on/off ; bit 2: ch3 on/off ; bit 3: ch4 on/off - ds 1 + db -wMusicID:: -wMusicIDLo:: ; c19d - ds 1 -wMusicIDHi:: ; c19e - ds 1 -wMusicBank:: ; c19f - ds 1 -wNoiseSampleAddress:: -wNoiseSampleAddressLo:: ; c1a0 - ds 1 -wNoiseSampleAddressHi:: ; c1a1 - ds 1 -wNoiseSampleDelay:: ; noise delay? ; c1a2 - ds 1 -; c1a3 - ds 1 -wMusicNoiseSampleSet:: ; c1a4 - ds 1 -wSFXNoiseSampleSet:: ; c1a5 - ds 1 -wLowHealthAlarm:: ; c1a6 +wMusicID:: dw ; c29d +wMusicBank:: db ; c29f +wNoiseSampleAddress:: dw ; c2a0 +wNoiseSampleDelay:: db ; c2a2 + ds 1 ; c2a3 +wMusicNoiseSampleSet:: db ; c2a4 +wSFXNoiseSampleSet:: db ; c2a5 + +wLowHealthAlarm:: ; c2a6 ; bit 7: on/off ; bit 4: pitch ; bit 0-3: counter - ds 1 -wMusicFade:: ; c1a7 + db + +wMusicFade:: ; c2a7 ; fades volume over x frames ; bit 7: fade in/out ; bit 0-5: number of frames for each volume level ; $00 = none (default) - ds 1 -wMusicFadeCount:: ; c1a8 - ds 1 -wMusicFadeID:: -wMusicFadeIDLo:: ; c1a9 - ds 1 -wMusicFadeIDHi:: ; c1aa - ds 1 + db +wMusicFadeCount:: db ; c2a8 +wMusicFadeID:: dw ; c2a9 + ds 5 -wCryPitch:: ; c1b0 - ds 2 -wCryLength:: ; c1b2 - ds 2 -wLastVolume:: ; c1b4 - ds 1 -wUnusedMusicF9Flag:: ds 1 ; c1b5 -wSFXPriority:: ; c1b6 + +wCryPitch:: dw ; c2b0 +wCryLength:: dw ; c2b2 + +wLastVolume:: db ; c2b4 +wUnusedMusicF9Flag:: db ; c2b5 + +wSFXPriority:: ; c2b6 ; if nonzero, turn off music when playing sfx + db + ds 1 - ds 1 -wChannel1JumpCondition:: ds 1 -wChannel2JumpCondition:: ds 1 -wChannel3JumpCondition:: ds 1 -wChannel4JumpCondition:: ds 1 -wStereoPanningMask:: ds 1 ; c1bc -wCryTracks:: ; c1bd + +wChannel1JumpCondition:: db +wChannel2JumpCondition:: db +wChannel3JumpCondition:: db +wChannel4JumpCondition:: db + +wStereoPanningMask:: db ; c2bc + +wCryTracks:: ; c2bd ; plays only in left or right track depending on what side the monster is on ; both tracks active outside of battle - ds 1 -wSFXDuration:: ds 1 -wCurSFX:: ; c1bf + db + +wSFXDuration:: db +wCurSFX:: ; c2bf ; id of sfx currently playing - ds 1 + db wChannelsEnd:: -wMapMusic:: ; c1c0 - ds 1 -wDontPlayMapMusicOnReload:: ds 1 +wMapMusic:: db ; c2c0 + +wDontPlayMapMusicOnReload:: db wMusicEnd:: + SECTION "WRAM", WRAM0 -wLZAddress:: dw ; c1c2 -wLZBank:: ds 1 ; c1c4 -wc1c5:: ds 1 ; c1c5 -wInputType:: ds 1 ; c1c6 -wAutoInputAddress:: dw ; c1c7 -wAutoInputBank:: ds 1 ; c1c9 -wAutoInputLength:: ds 1 ; c1ca +wLZAddress:: dw ; c2c2 +wLZBank:: db ; c2c4 + +wBoxAlignment:: db + +wInputType:: db ; c2c6 +wAutoInputAddress:: dw ; c2c7 +wAutoInputBank:: db ; c2c9 +wAutoInputLength:: db ; c2ca wMonStatusFlags:: ds 1 ; c1cb wGameLogicPaused:: ds 1 ; c1cc @@ -2433,8 +2428,8 @@ wcfd8:: ds 1 ; cfd8 wcfd9:: ds 1 ; cfd9 wcfda:: ds 1 ; cfda wPredefID:: ds 1 ; cfdb -wPredefHLBuffer:: dw ; cfdc -wPredefPointerBuffer:: dw ; cfde +wPredefTemp:: dw ; cfdc +wPredefAddress:: dw ; cfde wFarCallBCBuffer:: dw ; cfe0 wcfe2:: ds 1 ; cfe2 wcfe3:: ds 1 ; cfe3 @@ -2841,11 +2836,11 @@ wOptions:: ; d199 ds 1 wSaveFileExists:: ds 1 ; d19a -wTextBoxFrame:: ; d19b +wTextboxFrame:: ; d19b ; bits 0-2: textbox frame 0-7 ds 1 -wTextBoxFlags:: ; d19c +wTextboxFlags:: ; d19c ; bit 0: 1-frame text delay ; bit 1: when unset, no text delay ds 1 |