shithub: pokered

Download patch

ref: 031e33957dfaf9a5e29fb67aaf600ec809b8e35f
parent: 1ee8de792ba5bf45290a4cb49b6bc3ee6aa539f3
author: yenatch <yenatch@gmail.com>
date: Sun May 25 06:51:53 EDT 2014

Rename joypad registers.

--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6677,7 +6677,7 @@
 	ld a, [$d732]
 	bit 1, a
 	jr z, .asm_3ef2f
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	bit 1, a
 	ret nz
 .asm_3ef2f
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -94,7 +94,7 @@
 
 PrintSafariGameOverText: ; 1e9ed (7:69ed)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, SafariGameOverText
 	jp PrintText
 
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -1,6 +1,6 @@
 PlayIntro: ; 41682 (10:5682)
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	inc a
 	ld [H_AUTOBGTRANSFERENABLED], a
 	call PlayShootingStar
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -530,7 +530,7 @@
 	jp nc,NoCyclingAllowedHere
 	call ItemUseReloadOverworldData
 	xor a ; no keys pressed
-	ld [H_CURRENTPRESSEDBUTTONS],a ; current joypad state
+	ld [hJoyHeld],a ; current joypad state
 	inc a
 	ld [$d700],a ; change player state to bicycling
 	ld hl,GotOnBicycleText
@@ -593,7 +593,7 @@
 	xor a
 	ld [$d700],a ; change player state to walking
 	dec a
-	ld [wJoypadForbiddenButtonsMask],a
+	ld [wJoyIgnore],a
 	call Func_2307 ; play walking music
 	jp LoadWalkingPlayerSpriteGraphics
 ; uses a simulated button press to make the player move forward
--- a/engine/menu/league_pc.asm
+++ b/engine/menu/league_pc.asm
@@ -54,7 +54,7 @@
 	push bc
 	call Func_76610
 	call WaitForTextScrollButtonPress
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	bit 1, a
 	jr nz, .fifth
 	ld hl, $CC6B
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -97,11 +97,11 @@
 	set 5,[hl]
 .next6
 	xor a
-	ld [H_NEWLYPRESSEDBUTTONS],a
-	ld [H_NEWLYRELEASEDBUTTONS],a
-	ld [H_CURRENTPRESSEDBUTTONS],a
+	ld [hJoyPressed],a
+	ld [hJoyReleased],a
+	ld [hJoyHeld],a
 	call GetJoypadState
-	ld a,[H_CURRENTPRESSEDBUTTONS]
+	ld a,[hJoyHeld]
 	bit 0,a
 	jr nz,.next5
 	bit 1,a
@@ -315,8 +315,8 @@
 
 Func_5d5f: ; 5d5f (1:5d5f)
 	xor a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
+	ld [hJoyHeld], a
 	ld [$ffb5], a
 	ld [$d72d], a
 	ld hl, $d732
--- a/engine/menu/naming_screen.asm
+++ b/engine/menu/naming_screen.asm
@@ -134,7 +134,7 @@
 	pop af
 	ld [wCurrentMenuItem], a ; $cc26
 	call GetJoypadStateLowSensitivity
-	ld a, [H_NEWLYPRESSEDBUTTONS]
+	ld a, [hJoyPressed]
 	and a
 	jr z, .asm_65ff
 	ld hl, .unknownPointerTable_665e ; $665e
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -81,7 +81,7 @@
 ; EXIT falls through to here
 CloseStartMenu:: ; 2b70 (0:2b70)
 	call GetJoypadState
-	ld a,[H_NEWLYPRESSEDBUTTONS]
+	ld a,[hJoyPressed]
 	bit 0,a ; was A button newly pressed?
 	jr nz,CloseStartMenu
 	call LoadTextBoxTilePatterns
--- a/engine/overworld/ledges.asm
+++ b/engine/overworld/ledges.asm
@@ -38,11 +38,11 @@
 	inc hl
 	jr .asm_1a691
 .asm_1a6a9
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	and e
 	ret z
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d736
 	set 6, [hl]
 	call Func_3486
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -4,7 +4,7 @@
 	call HandleDoors
 	jr nc, .asm_1a406
 	ld a, $fc
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d736
 	set 1, [hl]
 	ld a, $1
@@ -76,7 +76,7 @@
 	ld hl, W_FLAGS_D733
 	set 1, [hl]
 	ld a, $fc
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 
 Func_1a485: ; 1a485 (6:6485)
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -503,9 +503,9 @@
 	call UpdateSprites
 	call Delay3
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_NEWLYRELEASEDBUTTONS], a
+	ld [hJoyHeld], a
+	ld [hJoyPressed], a
+	ld [hJoyReleased], a
 	ld [$d714], a
 	ld hl, $d736
 	res 6, [hl]
@@ -512,7 +512,7 @@
 	ld hl, $d730
 	res 7, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 
 PlayerJumpingYScreenCoords: ; 708ba (1c:48ba)
--- a/engine/play_time.asm
+++ b/engine/play_time.asm
@@ -56,6 +56,6 @@
 	ld [$d730], a
 	ret z
 	xor a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
+	ld [hJoyHeld], a
 	ret
--- a/engine/titlescreen.asm
+++ b/engine/titlescreen.asm
@@ -238,7 +238,7 @@
 	call Func_4533
 	call Delay3
 	call LoadGBPal
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	ld b, a
 	and $46
 	cp $46
--- a/home.asm
+++ b/home.asm
@@ -150,7 +150,7 @@
 	and %1111
 	or b
 
-	ld [H_JOYPADSTATE], a
+	ld [hJoyInput], a
 
 	ld a, 1 << 4 + 1 << 5 ; deselect keys
 	ld [rJOYP], a
@@ -158,9 +158,9 @@
 
 GetJoypadState::
 ; Update the joypad state variables:
-; [H_NEWLYRELEASEDBUTTONS]  keys released since last time
-; [H_NEWLYPRESSEDBUTTONS]   keys pressed since last time
-; [H_CURRENTPRESSEDBUTTONS] currently pressed keys
+; [hJoyReleased]  keys released since last time
+; [hJoyPressed]   keys pressed since last time
+; [hJoyHeld] currently pressed keys
 	homecall _GetJoypadState
 	ret
 
@@ -177,7 +177,7 @@
 EnterMap::
 ; Load a new map.
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call LoadMapData
 	callba Func_c335 ; initialize map variables
 	ld hl, $d72c
@@ -207,7 +207,7 @@
 	set 5, [hl]
 	set 6, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 OverworldLoop::
 	call DelayFrame
@@ -238,10 +238,10 @@
 	ld a,[$d730]
 	bit 7,a ; are we simulating button presses?
 	jr z,.notSimulating
-	ld a,[H_CURRENTPRESSEDBUTTONS]
+	ld a,[hJoyHeld]
 	jr .checkIfStartIsPressed
 .notSimulating
-	ld a,[H_NEWLYPRESSEDBUTTONS]
+	ld a,[hJoyPressed]
 .checkIfStartIsPressed
 	bit 3,a ; start button
 	jr z,.startButtonNotPressed
@@ -317,7 +317,7 @@
 	ld [$d528],a ; zero the direction
 	jp OverworldLoop
 .checkIfDownButtonIsPressed
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; current joypad state
+	ld a,[hJoyHeld] ; current joypad state
 	bit 7,a ; down button
 	jr z,.checkIfUpButtonIsPressed
 	ld a,$01
@@ -489,7 +489,7 @@
 	set 5,[hl]
 	set 6,[hl]
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS],a ; clear joypad state
+	ld [hJoyHeld],a ; clear joypad state
 	ld a,[W_CURMAP]
 	cp a,CINNABAR_GYM
 	jr nz,.notCinnabarGym
@@ -541,7 +541,7 @@
 	ld a,[W_CURMAP]
 	cp a,ROUTE_17 ; Cycling Road
 	jr nz,.goFaster
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; current joypad state
+	ld a,[hJoyHeld] ; current joypad state
 	and a,%01110000 ; bit mask for up, left, right buttons
 	ret nz
 .goFaster
@@ -591,7 +591,7 @@
 	call GetJoypadState
 	pop bc
 	pop de
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; current joypad state
+	ld a,[hJoyHeld] ; current joypad state
 	and a,%11110000 ; bit mask for directional buttons
 	jr z,CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp
 	jr WarpFound1
@@ -2018,17 +2018,17 @@
 	ld a,[W_CURMAP]
 	cp a,ROUTE_17 ; Cycling Road
 	jr nz,.notForcedDownwards
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; current joypad state
+	ld a,[hJoyHeld] ; current joypad state
 	and a,%11110011 ; bit mask for all directions and A/B
 	jr nz,.notForcedDownwards
 	ld a,%10000000 ; down pressed
-	ld [H_CURRENTPRESSEDBUTTONS],a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press
+	ld [hJoyHeld],a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press
 .notForcedDownwards
 	ld a,[$d730]
 	bit 7,a
 	ret z
 ; if simulating button presses
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; current joypad state
+	ld a,[hJoyHeld] ; current joypad state
 	ld b,a
 	ld a,[$cd3b] ; bit mask for button presses that override simulated ones
 	and b
@@ -2046,11 +2046,11 @@
 	inc h
 .noCarry
 	ld a,[hl]
-	ld [H_CURRENTPRESSEDBUTTONS],a ; store simulated button press in joypad state
+	ld [hJoyHeld],a ; store simulated button press in joypad state
 	and a
 	ret nz
-	ld [H_NEWLYPRESSEDBUTTONS],a
-	ld [H_NEWLYRELEASEDBUTTONS],a
+	ld [hJoyPressed],a
+	ld [hJoyReleased],a
 	ret
 ; if done simulating button presses
 .doneSimulating
@@ -2058,8 +2058,8 @@
 	ld [$cd3a],a
 	ld [$cd38],a
 	ld [$ccd3],a
-	ld [wJoypadForbiddenButtonsMask],a
-	ld [H_CURRENTPRESSEDBUTTONS],a
+	ld [wJoyIgnore],a
+	ld [hJoyHeld],a
 	ld hl,$d736
 	ld a,[hl]
 	and a,$f8
@@ -2598,7 +2598,7 @@
 	push bc
 	call GetJoypadStateLowSensitivity
 	pop bc
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; currently pressed buttons
+	ld a,[hJoyHeld] ; currently pressed buttons
 	cp a,%01000110 ; Up, Select button, B button
 	jr z,.setCarry ; if all three keys are pressed
 	ld a,[$ffb5] ; either newly pressed buttons or currently pressed buttons at low sampling rate
@@ -4226,7 +4226,7 @@
 TextCommand0A:: ; 1c1d (0:1c1d)
 	push bc
 	call GetJoypadState
-	ld a,[H_CURRENTPRESSEDBUTTONS]
+	ld a,[hJoyHeld]
 	and a,%00000011 ; A and B buttons
 	jr nz,.skipDelay
 	ld c,30
@@ -4304,7 +4304,7 @@
 	push de
 	call GetJoypadState
 	pop de
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; joypad state
+	ld a,[hJoyHeld] ; joypad state
 	and a,%00000011 ; is A or B button pressed?
 	jr nz,.skipDelay ; if so, skip the delay
 	ld c,10
@@ -4945,8 +4945,8 @@
 
 	ld a, rLCDC_DEFAULT
 	ld [rLCDC], a
-	ld a, $10
-	ld [H_SOFTRESETCOUNTER], a
+	ld a, 16
+	ld [hSoftReset], a
 	call StopAllSounds
 
 	ei
@@ -6514,7 +6514,7 @@
 ; loop to hold the dialogue box open as long as the player keeps holding down the A button
 HoldTextDisplayOpen:: ; 29df (0:29df)
 	call GetJoypadState
-	ld a,[H_CURRENTPRESSEDBUTTONS]
+	ld a,[hJoyHeld]
 	bit 0,a ; is the A button being pressed?
 	jr nz,HoldTextDisplayOpen
 
@@ -6954,7 +6954,7 @@
 	jp .incrementQuantity
 .waitForKeyPressLoop
 	call GetJoypadStateLowSensitivity
-	ld a,[H_NEWLYPRESSEDBUTTONS] ; newly pressed buttons
+	ld a,[hJoyPressed] ; newly pressed buttons
 	bit 0,a ; was the A button pressed?
 	jp nz,.buttonAPressed
 	bit 1,a ; was the B button pressed?
@@ -7725,7 +7725,7 @@
 	ld a, $4c
 	call Predef
 	ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	xor a
 	ldh [$b4], a
 	call TrainerWalkUpToPlayer_Bank0
@@ -7737,7 +7737,7 @@
 	ld a, [$d730]
 	and $1
 	ret nz
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, [$cf13]
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -7744,7 +7744,7 @@
 
 Func_325d:: ; 325d (0:325d)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call InitBattleEnemyParameters
 	ld hl, $d72d
 	set 6, [hl]
@@ -7792,10 +7792,10 @@
 
 ResetButtonPressedAndMapScript:: ; 32c1 (0:32c1)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_NEWLYRELEASEDBUTTONS], a
+	ld [wJoyIgnore], a
+	ld [hJoyHeld], a
+	ld [hJoyPressed], a
+	ld [hJoyReleased], a
 	ld [W_CURMAPSCRIPT], a               ; reset battle status
 	ret
 
@@ -8440,7 +8440,7 @@
 	ld [$CD3B],a
 	ld [$CCD3],a
 	dec a
-	ld [wJoypadForbiddenButtonsMask],a
+	ld [wJoyIgnore],a
 	ld [$CD3A],a
 	ret
 
@@ -8764,7 +8764,7 @@
 ; there are esentially three modes of operation
 ; 1. Get newly pressed buttons only
 ;    ([$ffb7] == 0, [$ffb6] == any)
-;    Just copies [H_NEWLYPRESSEDBUTTONS] to [$ffb5].
+;    Just copies [hJoyPressed] to [$ffb5].
 ; 2. Get currently pressed buttons at low sample rate with delay
 ;    ([$ffb7] == 1, [$ffb6] != 0)
 ;    If the user holds down buttons for more than half a second,
@@ -8777,12 +8777,12 @@
 	call GetJoypadState
 	ld a,[$ffb7] ; flag
 	and a ; get all currently pressed buttons or only newly pressed buttons?
-	ld a,[H_NEWLYPRESSEDBUTTONS] ; newly pressed buttons
+	ld a,[hJoyPressed] ; newly pressed buttons
 	jr z,.storeButtonState
-	ld a,[H_CURRENTPRESSEDBUTTONS] ; all currently pressed buttons
+	ld a,[hJoyHeld] ; all currently pressed buttons
 .storeButtonState
 	ld [$ffb5],a
-	ld a,[H_NEWLYPRESSEDBUTTONS] ; newly pressed buttons
+	ld a,[hJoyPressed] ; newly pressed buttons
 	and a ; have any buttons been newly pressed since last check?
 	jr z,.noNewlyPressedButtons
 .newlyPressedButtons
@@ -8799,7 +8799,7 @@
 	ret
 .delayOver
 ; if [$ffb6] = 0 and A or B is pressed, report no buttons as pressed
-	ld a,[H_CURRENTPRESSEDBUTTONS]
+	ld a,[hJoyHeld]
 	and a,%00000011 ; A and B buttons
 	jr z,.setShortDelay
 	ld a,[$ffb6] ; flag
@@ -8923,7 +8923,7 @@
 	ld [H_FRAMECOUNTER],a
 .checkButtons
 	call GetJoypadState
-	ld a,[H_CURRENTPRESSEDBUTTONS]
+	ld a,[hJoyHeld]
 .checkAButton
 	bit 0,a ; is the A button pressed?
 	jr z,.checkBButton
@@ -10042,7 +10042,7 @@
 Func_3eb5:: ; 3eb5 (0:3eb5)
 	ld a, [H_LOADEDROMBANK]
 	push af
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	bit 0, a
 	jr z, .asm_3eea
 	ld a, Bank(Func_469a0)
--- a/hram.asm
+++ b/hram.asm
@@ -4,7 +4,11 @@
 H_SPRITEHEIGHT          EQU $FF8C ; in bytes
 H_SPRITEOFFSET          EQU $FF8D
 
-H_SOFTRESETCOUNTER EQU $FF8A ; initialized to 16, decremented each input iteration if the user presses the reset sequence (A+B+S+s). Soft reset when 0 is reached.
+hSoftReset EQU $FF8A
+; Initialized to 16.
+; Decremented each input iteration if the player
+; presses the reset sequence (A+B+SEL+START).
+; Soft reset when 0 is reached.
 
 ; counters for blinking down arrow
 H_DOWNARROWBLINKCNT1 EQU $FF8B
@@ -28,10 +32,10 @@
 H_POWEROFTEN        EQU $FF99 ; 3 bytes, big endian order
 H_SAVEDNUMTOPRINT   EQU $FF9C ; 3 bytes, big endian order (to back out of a subtraction)
 
-H_OLDPRESSEDBUTTONS     EQU $FFB1
-H_NEWLYRELEASEDBUTTONS  EQU $FFB2
-H_NEWLYPRESSEDBUTTONS   EQU $FFB3
-H_CURRENTPRESSEDBUTTONS EQU $FFB4
+hJoyHeldLast     EQU $FFB1
+hJoyReleased  EQU $FFB2
+hJoyPressed   EQU $FFB3
+hJoyHeld EQU $FFB4
 
 H_LOADEDROMBANK     EQU $FFB8
 
@@ -112,5 +116,5 @@
 
 H_WHOSETURN EQU $FFF3 ; 0 on player’s turn, 1 on enemy’s turn
 
-H_JOYPADSTATE EQU $FFF8
+hJoyInput EQU $FFF8
 
--- a/main.asm
+++ b/main.asm
@@ -70,7 +70,7 @@
 	ld [W_ISINBATTLE], a ; $d057
 	ld [$d35d], a
 	ld [$cf10], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld [$cc57], a
 	ld [wFlags_0xcd60], a
 	ld [$ff9f], a
@@ -103,7 +103,7 @@
 	res 3, [hl]
 	set 6, [hl]
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $7
 	jp Predef ; indirect jump to HealParty (f6a5 (3:76a5))
 
@@ -3076,52 +3076,53 @@
 SECTION "bank3",ROMX,BANK[$3]
 
 _GetJoypadState::
-	ld a, [H_JOYPADSTATE]
+	ld a, [hJoyInput]
 	cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset
-	jp z, HandleJoypadResetButtons
+	jp z, TrySoftReset
 	ld b, a
-	ld a, [H_OLDPRESSEDBUTTONS]
+	ld a, [hJoyHeldLast]
 	ld e, a
 	xor b
 	ld d, a
 	and e
-	ld [H_NEWLYRELEASEDBUTTONS], a
+	ld [hJoyReleased], a
 	ld a, d
 	and b
-	ld [H_NEWLYPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
 	ld a, b
-	ld [H_OLDPRESSEDBUTTONS], a
+	ld [hJoyHeldLast], a
 	ld a, [$d730]
 	bit 5, a
 	jr nz, DiscardButtonPresses
-	ld a, [H_OLDPRESSEDBUTTONS]
-	ld [H_CURRENTPRESSEDBUTTONS], a
-	ld a, [wJoypadForbiddenButtonsMask]
+	ld a, [hJoyHeldLast]
+	ld [hJoyHeld], a
+	ld a, [wJoyIgnore]
 	and a
 	ret z
 	cpl
 	ld b, a
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	and b
-	ld [H_CURRENTPRESSEDBUTTONS], a
-	ld a, [H_NEWLYPRESSEDBUTTONS]
+	ld [hJoyHeld], a
+	ld a, [hJoyPressed]
 	and b
-	ld [H_NEWLYPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
 	ret
 
-; clears all button presses
-DiscardButtonPresses: ; c034 (3:4034)
+DiscardButtonPresses:
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_NEWLYRELEASEDBUTTONS], a
+	ld [hJoyHeld], a
+	ld [hJoyPressed], a
+	ld [hJoyReleased], a
 	ret
 
-HandleJoypadResetButtons: ; c03c (3:403c)
+TrySoftReset:
 	call DelayFrame
+	; reset joypad (to make sure the
+	; player is really trying to reset)
 	ld a, $30
-	ld [rJOYP], a ; reset joypad state (to enusre the user really intends to reset)
-	ld hl, H_SOFTRESETCOUNTER
+	ld [rJOYP], a
+	ld hl, hSoftReset
 	dec [hl]
 	jp z, SoftReset
 	jp GetJoypadState
@@ -3138,9 +3139,9 @@
 	ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
 	ld [$d13b], a
 	ld [W_LONEATTACKNO], a ; $d05c
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_NEWLYRELEASEDBUTTONS], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
+	ld [hJoyReleased], a
+	ld [hJoyHeld], a
 	ld [$cd6a], a
 	ld [$d5a3], a
 	ld hl, $d73f
@@ -3665,7 +3666,7 @@
 	ld hl, W_PARTYMON1NAME ; $d2b5
 	call GetPartyMonName
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call EnableAutoTextBoxDrawing
 	ld a, $d0
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
@@ -4548,7 +4549,7 @@
 	bit 6, [hl]
 	set 6, [hl]
 	ret z
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	and $f0
 	ret z
 	ld a, $5a
@@ -4556,7 +4557,7 @@
 	ld a, [$d71c]
 	and a
 	jp nz, Func_f2dd
-	ld a, [H_CURRENTPRESSEDBUTTONS]
+	ld a, [hJoyHeld]
 	ld b, a
 	ld a, [$c109]
 	cp $4
@@ -4609,7 +4610,7 @@
 	ret nz
 	callab Func_79f54
 	call DiscardButtonPresses
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call Func_f2dd
 	set 7, [hl]
 	ld a, [$d718]
--- a/scripts/agatha.asm
+++ b/scripts/agatha.asm
@@ -63,8 +63,8 @@
 	call ArePlayerCoordsInArray
 	jp nc, CheckFightingMapTrainers
 	xor a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
+	ld [hJoyHeld], a
 	ld [$ccd3], a
 	ld [$cd38], a
 	ld a, [wWhichTrade] ; $cd3d
@@ -101,7 +101,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_AGATHACURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -46,7 +46,7 @@
 	ld hl, $d7f2
 	set 6, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $3
 	ld [W_BILLSHOUSECURSCRIPT], a
 	ret
@@ -56,7 +56,7 @@
 	bit 3, a
 	ret z
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $2
 	ld [$cf13], a
 	ld a, $c
@@ -90,7 +90,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d7f2
 	set 5, [hl]
 	ld hl, $d7f1
--- a/scripts/bruno.asm
+++ b/scripts/bruno.asm
@@ -63,8 +63,8 @@
 	call ArePlayerCoordsInArray
 	jp nc, CheckFightingMapTrainers
 	xor a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
+	ld [hJoyHeld], a
 	ld [$ccd3], a
 	ld [$cd38], a
 	ld a, [wWhichTrade] ; $cd3d
@@ -101,7 +101,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_BRUNOCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -39,7 +39,7 @@
 
 CeladonGameCornerScript_48c07: ; 48c07 (12:4c07)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_CELADONGAMECORNERCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -57,7 +57,7 @@
 	cp $ff
 	jp z, CeladonGameCornerScript_48c07
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $d
 	ld [H_SPRITEHEIGHT], a
 	call DisplayTextID
@@ -94,7 +94,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $46
 	ld [$cc4d], a
 	ld a, $11
--- a/scripts/celadongym.asm
+++ b/scripts/celadongym.asm
@@ -24,7 +24,7 @@
 
 CeladonGymText_48943: ; 48943 (12:4943)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_CELADONGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -40,7 +40,7 @@
 	cp $ff
 	jp z, CeladonGymText_48943
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 CeladonGymText_48963: ; 48963 (12:4963)
 	ld a, $9
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -6,7 +6,7 @@
 
 CeruleanCityScript_1948c: ; 1948c (6:548c)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_CERULEANCITYCURSCRIPT], a
 	ld a, $5
 	ld [$cc4d], a
@@ -25,7 +25,7 @@
 	cp $ff
 	jp z, CeruleanCityScript_1948c
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d75b
 	set 7, [hl]
 	ld a, $2
@@ -32,7 +32,7 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_CERULEANCITYCURSCRIPT], a
 	ret
 
@@ -76,9 +76,9 @@
 	ld a, MUSIC_MEET_RIVAL
 	call PlayMusic
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, [W_XCOORD]
 	cp $14
 	jr z, .asm_19535 ; 0x19526 $d
@@ -126,7 +126,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $1
 	ld [$ff8c], a
 	call DisplayTextID
@@ -156,7 +156,7 @@
 	ld [W_TRAINERNO], a
 
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	call CeruleanCityScript_1955d
 	ld a, $2
 	ld [W_CERULEANCITYCURSCRIPT], a
@@ -168,7 +168,7 @@
 	jp z, CeruleanCityScript_1948c
 	call CeruleanCityScript_1955d
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d75a
 	set 0, [hl]
 	ld a, $1
@@ -211,7 +211,7 @@
 	ld a, $11
 	call Predef
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call Func_2307
 	ld a, $0
 	ld [W_CERULEANCITYCURSCRIPT], a
--- a/scripts/ceruleangym.asm
+++ b/scripts/ceruleangym.asm
@@ -24,7 +24,7 @@
 
 CeruleanGymScript_5c6ed: ; 5c6ed (17:46ed)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_CERULEANGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -40,7 +40,7 @@
 	cp $ff
 	jp z, CeruleanGymScript_5c6ed
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 CeruleanGymScript_5c70d: ; 5c70d (17:470d)
 	ld a, $5
--- a/scripts/cinnabargym.asm
+++ b/scripts/cinnabargym.asm
@@ -30,7 +30,7 @@
 
 CinnabarGymScript_75792: ; 75792 (1d:5792)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_CINNABARGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ld [$da38], a
@@ -80,7 +80,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, [$da38]
 	ld [wTrainerHeaderFlagBit], a
 	ld [$ff8c], a
@@ -122,7 +122,7 @@
 	call CinnabarGymScript_757f1
 	call Func_3ead
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [$da38], a
 	ld a, $0
 	ld [W_CINNABARGYMCURSCRIPT], a
@@ -134,7 +134,7 @@
 	cp $ff
 	jp z, CinnabarGymScript_75792
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 CinnabarGymScript3_75857: ; 75857 (1d:5857)
 	ld a, $a
 	ld [$ff8c], a
--- a/scripts/cinnabarisland.asm
+++ b/scripts/cinnabarisland.asm
@@ -30,7 +30,7 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $1
 	ld [$cd38], a
 	ld a, $80
@@ -38,7 +38,7 @@
 	call Func_3486
 	xor a
 	ld [$c109], a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $1
 	ld [W_CINNABARISLANDCURSCRIPT], a
 	ret
--- a/scripts/fightingdojo.asm
+++ b/scripts/fightingdojo.asm
@@ -32,7 +32,7 @@
 	bit 1, a
 	ret nz
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld [$cf0d], a
 	ld a, [W_YCOORD]
 	cp $3
--- a/scripts/fuchsiagym.asm
+++ b/scripts/fuchsiagym.asm
@@ -25,7 +25,7 @@
 
 FuchsiaGymScript_75477: ; 75477 (1d:5477)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_FUCHSIAGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -41,7 +41,7 @@
 	cp $ff
 	jp z, FuchsiaGymScript_75477
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 FuchsiaGymScript3_75497: ; 75497 (1d:5497)
 	ld a, $9
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
--- a/scripts/gary.asm
+++ b/scripts/gary.asm
@@ -6,7 +6,7 @@
 
 GaryScript_75f29: ; 75f29 (1d:5f29)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_GARYCURSCRIPT], a
 	ret
 
@@ -28,7 +28,7 @@
 
 GaryScript1: ; 75f48 (1d:5f48)
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $ccd3
 	ld de, RLEMovement75f63
 	call DecodeRLEList
@@ -51,7 +51,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d355
 	res 7, [hl]
 	ld a, $1
@@ -84,7 +84,7 @@
 	ld [W_TRAINERNO], a
 
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $3
 	ld [W_GARYCURSCRIPT], a
 	ret
@@ -97,7 +97,7 @@
 	ld hl, $d867
 	set 1, [hl]
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $1
 	ld [$ff8c], a
 	call GaryScript_760c8
@@ -201,7 +201,7 @@
 
 GaryScript9: ; 76099 (1d:6099)
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $ccd3
 	ld de, RLEMovement760b4
 	call DecodeRLEList
@@ -222,7 +222,7 @@
 	and a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_GARYCURSCRIPT], a
 	ret
@@ -229,10 +229,10 @@
 
 GaryScript_760c8 ; 760c8 (1d:60c8)
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call DisplayTextID
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 
 GaryTextPointers: ; 760d6 (1d:60d6)
--- a/scripts/halloffameroom.asm
+++ b/scripts/halloffameroom.asm
@@ -6,7 +6,7 @@
 
 HallofFameRoomScript_5a4aa: ; 5a4aa (16:64aa)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_HALLOFFAMEROOMCURSCRIPT], a
 	ret
 
@@ -24,7 +24,7 @@
 	ld a, [$d358]
 	push af
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $55
 	call Predef
 	pop af
@@ -62,7 +62,7 @@
 
 HallofFameRoomScript0: ; 5a50d (16:650d)
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $ccd3
 	ld de, RLEMovement5a528
 	call DecodeRLEList
@@ -91,7 +91,7 @@
 	call Func_34a6
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	inc a
 	ld [$d528], a
 	ld a, $1
@@ -98,7 +98,7 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $8
 	ld [$cc4d], a
 	ld a, $11
--- a/scripts/lance.asm
+++ b/scripts/lance.asm
@@ -60,7 +60,7 @@
 	call ArePlayerCoordsInArray
 	jp nc, CheckFightingMapTrainers
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, [wWhichTrade] ; $cd3d
 	cp $3
 	jr nc, .asm_5a325
@@ -99,7 +99,7 @@
 
 LanceScript_5a35b: ; 5a35b (16:635b)
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $ccd3
 	ld de, RLEList_5a379
 	call DecodeRLEList
@@ -124,7 +124,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_LANCECURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
--- a/scripts/lorelei.asm
+++ b/scripts/lorelei.asm
@@ -63,8 +63,8 @@
 	call ArePlayerCoordsInArray
 	jp nc, CheckFightingMapTrainers
 	xor a
-	ld [H_NEWLYPRESSEDBUTTONS], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyPressed], a
+	ld [hJoyHeld], a
 	ld [$ccd3], a
 	ld [$cd38], a
 	ld a, [wWhichTrade] ; $cd3d
@@ -101,7 +101,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_LORELEICURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
--- a/scripts/mansion1.asm
+++ b/scripts/mansion1.asm
@@ -52,7 +52,7 @@
 	cp $4
 	ret nz
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $4
 	ld [H_SPRITEHEIGHT], a
 	jp DisplayTextID
--- a/scripts/mansion2.asm
+++ b/scripts/mansion2.asm
@@ -48,7 +48,7 @@
 	cp $4
 	ret nz
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $5
 	ld [H_SPRITEHEIGHT], a
 	jp DisplayTextID
--- a/scripts/mansion3.asm
+++ b/scripts/mansion3.asm
@@ -78,7 +78,7 @@
 	cp $4
 	ret nz
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $6
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	jp DisplayTextID
--- a/scripts/mansion4.asm
+++ b/scripts/mansion4.asm
@@ -49,7 +49,7 @@
 	cp $4
 	ret nz
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $9
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	jp DisplayTextID
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -40,7 +40,7 @@
 
 MtMoon3Script_49d58: ; 49d58 (12:5d58)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_MTMOON3CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -64,7 +64,7 @@
 	cp $d
 	jp nz, MtMoon3Script_49d91
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $1
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	jp DisplayTextID
@@ -84,7 +84,7 @@
 	ld hl, $d7f6
 	set 1, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_MTMOON3CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
@@ -136,7 +136,7 @@
 	bit 0, a
 	ret nz
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $1
 	ld [$cc3c], a
 	ld a, $a
@@ -154,7 +154,7 @@
 	ld a, $11
 	call Predef ; indirect jump to RemoveMissableObject (f1d7 (3:71d7))
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_MTMOON3CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
--- a/scripts/museum1f.asm
+++ b/scripts/museum1f.asm
@@ -23,7 +23,7 @@
 	ret nz
 .asm_5c120
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $1
 	ld [$ff8c], a
 	jp DisplayTextID
@@ -73,7 +73,7 @@
 	ld [$d125], a
 	call DisplayTextBoxID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld hl, Museum1FText_5c21f
 	call PrintText
 	call YesNoChoice
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -129,7 +129,7 @@
 
 OaksLabScript5: ; 1cbfd (7:4bfd)
 	ld a, $fc
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $11
 	ld [$ff8c], a
 	call DisplayTextID
@@ -148,7 +148,7 @@
 	ld hl, $d74b
 	set 1, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 	ld a, $6
 	ld [W_OAKSLABCURSCRIPT], a
@@ -271,7 +271,7 @@
 	bit 0, a
 	ret nz
 	ld a, $fc
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $1
 	ld [$ff8c], a
 	ld a, $4
@@ -313,7 +313,7 @@
 	ld hl, $d74b
 	set 2, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 	ld a, $a
 	ld [W_OAKSLABCURSCRIPT], a
@@ -389,7 +389,7 @@
 	set 6, [hl]
 	set 7, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $8
 	ld [$d528], a
 	ld a, $c
@@ -398,7 +398,7 @@
 
 OaksLabScript12: ; 1ce03 (7:4e03)
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $8
 	ld [$d528], a
 	call UpdateSprites
@@ -457,7 +457,7 @@
 	ld a, $11
 	call Predef
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call Func_2307 ; reset to map music
 	ld a, $12
 	ld [W_OAKSLABCURSCRIPT], a
@@ -486,7 +486,7 @@
 
 OaksLabScript15: ; 1ceb0 (7:4eb0)
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	call EnableAutoTextBoxDrawing
 	ld a, $ff
 	ld [$c0ee], a
@@ -536,7 +536,7 @@
 	call EnableAutoTextBoxDrawing
 	call Func_2307
 	ld a, $fc
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call OaksLabScript_1cefd
 	ld a, $16
 	ld [$ff8c], a
@@ -629,7 +629,7 @@
 	ld a, $5
 	ld [W_PALLETTOWNCURSCRIPT], a
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 	ld a, $12
 	ld [W_OAKSLABCURSCRIPT], a
@@ -925,7 +925,7 @@
 	ld hl, $d72e
 	set 3, [hl]
 	ld a, $fc
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $8
 	ld [W_OAKSLABCURSCRIPT], a
 OaksLabMonChoiceEnd: ; 1d21f (7:521f)
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -27,7 +27,7 @@
 	cp 1 ; is player near north exit?
 	ret nz
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS],a
+	ld [hJoyHeld],a
 	ld a,4
 	ld [$D528],a
 	ld a,$FF
@@ -37,7 +37,7 @@
 	ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music
 	call PlayMusic ; plays music
 	ld a,$FC
-	ld [wJoypadForbiddenButtonsMask],a
+	ld [wJoyIgnore],a
 	ld hl,$D74B
 	set 7,[hl]
 
@@ -53,7 +53,7 @@
 	ld [$FF8C],a
 	call DisplayTextID
 	ld a,$FF
-	ld [wJoypadForbiddenButtonsMask],a
+	ld [wJoyIgnore],a
 	ld a,0
 	ld [$CC4D],a
 	ld a,$15
@@ -89,7 +89,7 @@
 	ld [$FF8C],a
 	call MoveSprite
 	ld a,$FF
-	ld [wJoypadForbiddenButtonsMask],a
+	ld [wJoyIgnore],a
 
 	; trigger the next script
 	ld a,3
@@ -105,12 +105,12 @@
 	ld a,1
 	ld [$CF0D],a
 	ld a,$FC
-	ld [wJoypadForbiddenButtonsMask],a
+	ld [wJoyIgnore],a
 	ld a,1
 	ld [$FF8C],a
 	call DisplayTextID
 	ld a,$FF
-	ld [wJoypadForbiddenButtonsMask],a
+	ld [wJoyIgnore],a
 	ld a,1
 	ld [$CF13],a
 	xor a
--- a/scripts/pewtercity.asm
+++ b/scripts/pewtercity.asm
@@ -29,7 +29,7 @@
 	call ArePlayerCoordsInArray
 	ret nc
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $5
 	ld [$ff8c], a
 	jp DisplayTextID
@@ -102,7 +102,7 @@
 	ld a, $15
 	call Predef
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_PEWTERCITYCURSCRIPT], a
 	ret
@@ -168,7 +168,7 @@
 	ld a, $15
 	call Predef
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_PEWTERCITYCURSCRIPT], a
 	ret
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -24,7 +24,7 @@
 
 PewterGymScript_5c3bf: ; 5c3bf (17:43bf)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_PEWTERGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -40,7 +40,7 @@
 	cp $ff
 	jp z, PewterGymScript_5c3bf
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 PewterGymScript_5c3df: ; 5c3df (17:43df)
 	ld a, $4
--- a/scripts/pokemontower2.asm
+++ b/scripts/pokemontower2.asm
@@ -6,7 +6,7 @@
 
 PokemonTower2Script_604fe: ; 604fe (18:44fe)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_POKEMONTOWER2CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -51,8 +51,8 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
-	ld [H_NEWLYPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
+	ld [hJoyPressed], a
 	ret
 
 CoordsData_6055e: ; 6055e (18:455e)
@@ -65,7 +65,7 @@
 	cp $ff
 	jp z, PokemonTower2Script_604fe
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d764
 	set 7, [hl]
 	ld a, $1
@@ -104,7 +104,7 @@
 	ld a, $11
 	call Predef
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call Func_2307
 	ld a, $0
 	ld [W_POKEMONTOWER2CURSCRIPT], a
--- a/scripts/pokemontower5.asm
+++ b/scripts/pokemontower5.asm
@@ -27,9 +27,9 @@
 	set 7, [hl]
 	ret nz
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d72e
 	set 4, [hl]
 	ld a, $7
@@ -42,7 +42,7 @@
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 
 CoordsData_60992: ; 60992 (18:4992)
--- a/scripts/pokemontower6.asm
+++ b/scripts/pokemontower6.asm
@@ -9,7 +9,7 @@
 
 Func_60b02: ; 60b02 (18:4b02)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_POKEMONTOWER6CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -29,7 +29,7 @@
 	call ArePlayerCoordsInArray
 	jp nc, CheckFightingMapTrainers
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $6
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -50,13 +50,13 @@
 	cp $ff
 	jp z, Func_60b02
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, [$d72d]
 	bit 6, a
 	ret nz
 	call UpdateSprites
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, [$cf0b]
 	and a
 	jr nz, .asm_60b82
@@ -66,7 +66,7 @@
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_POKEMONTOWER6CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -9,7 +9,7 @@
 
 PokemonTower7Script_60d18: ; 60d18 (18:4d18)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_POKEMONTOWER7CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -29,7 +29,7 @@
 	jp z, PokemonTower7Script_60d18
 	call EndTrainerBattle
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, [$cf13]
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -55,7 +55,7 @@
 	ld a, $11
 	call Predef ; indirect jump to RemoveMissableObject (f1d7 (3:71d7))
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [$cf13], a
 	ld [wTrainerHeaderFlagBit], a
 	ld [$da38], a
@@ -66,7 +66,7 @@
 
 PokemonTower7Script4: ; 60d86 (18:4d86)
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $43
 	ld [$cc4d], a
 	ld a, $11
--- a/scripts/redshouse2f.asm
+++ b/scripts/redshouse2f.asm
@@ -10,7 +10,7 @@
 
 RedsHouse2FScript0: ; 5c0c0 (17:40c0)
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS],a
+	ld [hJoyHeld],a
 	ld a,8
 	ld [$D528],a
 	ld a,1
--- a/scripts/rockethideout2.asm
+++ b/scripts/rockethideout2.asm
@@ -28,7 +28,7 @@
 	ld a, (SFX_02_52 - SFX_Headers_02) / 3
 	call PlaySound
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $3
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -310,7 +310,7 @@
 	and a
 	jr nz, LoadSpinnerArrowTiles
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d736
 	res 7, [hl]
 	ld a, $0
--- a/scripts/rockethideout3.asm
+++ b/scripts/rockethideout3.asm
@@ -28,7 +28,7 @@
 	ld a, (SFX_02_52 - SFX_Headers_02) / 3
 	call PlaySound
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $3
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -140,7 +140,7 @@
 	and a
 	jp nz, LoadSpinnerArrowTiles
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d736
 	res 7, [hl]
 	ld a, $0
--- a/scripts/rockethideout4.asm
+++ b/scripts/rockethideout4.asm
@@ -36,7 +36,7 @@
 
 RocketHideout4Script_454a3: ; 454a3 (11:54a3)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROCKETHIDEOUT4CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -53,7 +53,7 @@
 	jp z, RocketHideout4Script_454a3
 	call UpdateSprites
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d81b
 	set 7, [hl]
 	ld a, $a
@@ -71,7 +71,7 @@
 	call UpdateSprites
 	call GBFadeOut1
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d126
 	set 5, [hl]
 	ld a, $0
--- a/scripts/route12.asm
+++ b/scripts/route12.asm
@@ -9,7 +9,7 @@
 
 Route12Script_59606: ; 59606 (16:5606)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE12CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
--- a/scripts/route16.asm
+++ b/scripts/route16.asm
@@ -9,7 +9,7 @@
 
 Func_59946: ; 59946 (16:5946)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE16CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
--- a/scripts/route16gate.asm
+++ b/scripts/route16gate.asm
@@ -22,7 +22,7 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, [$cd3d]
 	cp $1
 	jr z, .asm_4970e ; 0x496f1 $1b
@@ -55,7 +55,7 @@
 	and a
 	ret nz
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 Route16GateScript2: ; 49727 (12:5727)
 	ld a, $1
@@ -75,7 +75,7 @@
 	and a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d730
 	res 7, [hl]
 	ld a, $0
--- a/scripts/route18gate.asm
+++ b/scripts/route18gate.asm
@@ -22,7 +22,7 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, [$cd3d]
 	cp $1
 	jr z, .asm_498c6 ; 0x498a9 $1b
@@ -55,7 +55,7 @@
 	and a
 	ret nz
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 Route18GateScript2: ; 498df (12:58df)
 	ld a, $1
@@ -75,7 +75,7 @@
 	and a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d730
 	res 7, [hl]
 	ld a, $0
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -16,7 +16,7 @@
 
 Route22Script_50ece: ; 50ece (14:4ece)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE22CURSCRIPT], a
 Route22Script7: ; 50ed5 (14:4ed5)
 	ret
@@ -60,9 +60,9 @@
 	ld a, [$cd3d]
 	ld [$cf0d], a
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $2
 	ld [$d528], a
 	ld a, [$d7eb]
@@ -120,7 +120,7 @@
 	ld [$ff8c], a
 	call Func_34a6
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $1
 	ld [$ff8c], a
 	call DisplayTextID
@@ -161,7 +161,7 @@
 	ld [$ff8c], a
 	call Func_34a6
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d7eb
 	set 5, [hl]
 	ld a, $1
@@ -205,7 +205,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $22
 	ld [$cc4d], a
 	ld a, $11
@@ -264,7 +264,7 @@
 	ld [$ff8d], a
 	call Func_34a6
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $2
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -308,7 +308,7 @@
 	ld [$ff8d], a
 	call Func_34a6
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d7eb
 	set 6, [hl]
 	ld a, $2
@@ -352,7 +352,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $23
 	ld [$cc4d], a
 	ld a, $11
--- a/scripts/route22gate.asm
+++ b/scripts/route22gate.asm
@@ -22,7 +22,7 @@
 	call ArePlayerCoordsInArray
 	ret nc
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $1
 	ld [$ff8c], a
 	jp DisplayTextID
@@ -38,7 +38,7 @@
 	ld a, $80
 	ld [$ccd3], a
 	ld [$c109], a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	jp Func_3486
 
 Route22GateScript1: ; 1e6cd (7:66cd)
@@ -46,7 +46,7 @@
 	and a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	call Delay3
 	ld a, $0
 	ld [W_ROUTE22GATECURSCRIPT], a
--- a/scripts/route23.asm
+++ b/scripts/route23.asm
@@ -64,7 +64,7 @@
 	call Route23Script_5125d
 	call DisplayTextID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ret
 
 YCoordsData_51255: ; 51255 (14:5255)
@@ -126,7 +126,7 @@
 	ld [$ccd3], a
 	xor a
 	ld [$c109], a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	jp Func_3486
 
 Route23Script1: ; 512ec (14:52ec)
--- a/scripts/route24.asm
+++ b/scripts/route24.asm
@@ -9,7 +9,7 @@
 
 Route24Script_513c0: ; 513c0 (14:53c0)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE24CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -29,7 +29,7 @@
 	call ArePlayerCoordsInArray
 	jp nc, CheckFightingMapTrainers
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $1
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -66,7 +66,7 @@
 	jp z, Route24Script_513c0
 	call UpdateSprites
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d7ef
 	set 1, [hl]
 	ld a, $1
@@ -73,7 +73,7 @@
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_ROUTE24CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
@@ -175,7 +175,7 @@
 	call EngageMapTrainer
 	call InitBattleEnemyParameters
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $3
 	ld [W_ROUTE24CURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
--- a/scripts/route5gate.asm
+++ b/scripts/route5gate.asm
@@ -25,7 +25,7 @@
 	ld a, $2
 	ld [$d528], a
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	callba RemoveGuardDrink
 	ld a, [$ff00+$db]
 	and a
@@ -56,7 +56,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE5GATECURSCRIPT], a
 	ret
 	
--- a/scripts/route6gate.asm
+++ b/scripts/route6gate.asm
@@ -19,7 +19,7 @@
 	ld a, $1
 	ld [$d528], a
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	callba RemoveGuardDrink
 	ld a, [$ffdb]
 	and a
@@ -48,7 +48,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE6GATECURSCRIPT], a
 	ret
 
--- a/scripts/route7gate.asm
+++ b/scripts/route7gate.asm
@@ -31,7 +31,7 @@
 	ld a, $8
 	ld [$d528], a
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	callba RemoveGuardDrink
 	ld a, [$ffdb]
 	and a
@@ -62,7 +62,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE7GATECURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
--- a/scripts/route8gate.asm
+++ b/scripts/route8gate.asm
@@ -30,7 +30,7 @@
 	ld a, $2
 	ld [$d528], a
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	callba RemoveGuardDrink
 	ld a, [$ffdb]
 	and a
@@ -60,7 +60,7 @@
 	ret nz
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_ROUTE8GATECURSCRIPT], a
 	ret
 
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -21,9 +21,9 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $c
 	ld [$c109], a
 	ld a, [$cd3d]
@@ -37,7 +37,7 @@
 	ld c, $1
 	call SafariZoneEntranceScript_752a3
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $1
 	ld [W_SAFARIZONEENTRANCECURSCRIPT], a
 	ret
@@ -52,14 +52,14 @@
 	ret nz
 SafariZoneEntranceScript2: ; 7522a (1d:522a)
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [hJoyHeld], a
+	ld [wJoyIgnore], a
 	call UpdateSprites
 	ld a, $4
 	ld [$ff8c], a
 	call DisplayTextID
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 
 SafariZoneEntranceScript3: ; 75240 (1d:5240)
@@ -66,7 +66,7 @@
 	call SafariZoneEntranceScript_752b4
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $5
 	ld [W_SAFARIZONEENTRANCECURSCRIPT], a
 	ret
@@ -81,7 +81,7 @@
 	res 7, [hl]
 	call UpdateSprites
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $6
 	ld [$ff8c], a
 	call DisplayTextID
@@ -104,7 +104,7 @@
 	call SafariZoneEntranceScript_752b4
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_SAFARIZONEENTRANCECURSCRIPT], a
 	ret
--- a/scripts/saffrongym.asm
+++ b/scripts/saffrongym.asm
@@ -24,7 +24,7 @@
 
 SaffronGymText_5d048: ; 5d048 (17:5048)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_SAFFRONGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -40,7 +40,7 @@
 	cp $ff
 	jp z, SaffronGymText_5d048
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 SaffronGymText_5d068: ; 5d068 (17:5068)
 	ld a, $a
--- a/scripts/seafoamislands5.asm
+++ b/scripts/seafoamislands5.asm
@@ -7,7 +7,7 @@
 SeafoamIslands5Script_467a5: ; 467a5 (11:67a5)
 	xor a
 	ld [W_SEAFOAMISLANDS5CURSCRIPT], a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 
 SeafoamIslands5ScriptPointers: ; 467ad (11:67ad)
@@ -66,7 +66,7 @@
 	and a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_SEAFOAMISLANDS5CURSCRIPT], a
 	ret
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -110,7 +110,7 @@
 
 SilphCo11Script_621c4: ; 621c4 (18:61c4)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 SilphCo11Script_621c8: ; 621c8 (18:61c8)
 	ld [W_SILPHCO11CURSCRIPT], a
@@ -135,9 +135,9 @@
 	ld a, [wWhichTrade] ; $cd3d
 	ld [$cf0d], a
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $3
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -181,7 +181,7 @@
 .asm_62240
 	call SilphCo11Script_6221a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $6
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -193,7 +193,7 @@
 	ld hl, $d838
 	set 7, [hl]
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	jp SilphCo11Script_621c8
 
 SilphCo11Script3: ; 6226a (18:626a)
@@ -230,7 +230,7 @@
 	call EngageMapTrainer
 	call InitBattleEnemyParameters
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $5
 	jp SilphCo11Script_621c8
 
--- a/scripts/silphco7.asm
+++ b/scripts/silphco7.asm
@@ -104,7 +104,7 @@
 
 SilphCo7Text_51c0c: ; 51c0c (14:5c0c)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 SilphCo7Text_51c10: ; 51c10 (14:5c10)
 	ld [W_SILPHCO7CURSCRIPT], a
@@ -127,9 +127,9 @@
 	call ArePlayerCoordsInArray
 	jp nc, CheckFightingMapTrainers
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $4
 	ld [$d528], a
 	ld a, $ff
@@ -170,7 +170,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $d
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
 	call DisplayTextID
@@ -205,7 +205,7 @@
 	cp $ff
 	jp z, SilphCo7Text_51c0c
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d82f
 	set 0, [hl]
 	ld a, $4
@@ -250,7 +250,7 @@
 	call Predef ; indirect jump to RemoveMissableObject (f1d7 (3:71d7))
 	call Func_2307
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	jp SilphCo7Text_51c10
 
 SilphCo7TextPointers: ; 51d3f (14:5d3f)
--- a/scripts/ssanne2.asm
+++ b/scripts/ssanne2.asm
@@ -6,7 +6,7 @@
 
 SSAnne2Script_613ab: ; 613ab (18:53ab)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_SSANNE2CURSCRIPT], a
 	ret
 
@@ -41,9 +41,9 @@
 	ld [$ff8c], a
 	call SetSpriteMovementBytesToFF
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, [$ffdb]
 	cp $2
 	jr nz, .asm_61400 ; 0x613f9 $5
@@ -88,7 +88,7 @@
 	ret nz
 	call SSAnne2Script_61416
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $2
 	ld [$ff8c], a
 	call DisplayTextID
@@ -123,7 +123,7 @@
 	jp z, SSAnne2Script_613ab
 	call SSAnne2Script_61416
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $3
 	ld [$ff8c], a
 	call DisplayTextID
@@ -160,7 +160,7 @@
 	bit 0, a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $71
 	ld [$cc4d], a
 	ld a, $11
--- a/scripts/vermilioncity.asm
+++ b/scripts/vermilioncity.asm
@@ -46,7 +46,7 @@
 	call ArePlayerCoordsInArray
 	ret nc
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	ld [$cf0d], a
 	ld a, $3
 	ld [$ff8c], a
@@ -84,7 +84,7 @@
 
 VermilionCityScript2: ; 19833 (6:5833)
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $40
 	ld [$ccd3], a
 	ld [$ccd4], a
@@ -100,8 +100,8 @@
 	and a
 	ret nz
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [wJoyIgnore], a
+	ld [hJoyHeld], a
 	ld a, $0
 	ld [W_VERMILIONCITYCURSCRIPT], a
 	ret
--- a/scripts/vermiliondock.asm
+++ b/scripts/vermiliondock.asm
@@ -25,7 +25,7 @@
 	ld [$c206], a
 	ld [$cd3b], a
 	dec a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 .asm_1db8d
 	bit 5, [hl]
@@ -33,7 +33,7 @@
 	ld a, [$cd38]
 	and a
 	ret nz
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	set 5, [hl]
 	ret
 
@@ -40,7 +40,7 @@
 VermilionDock_1db9b: ; 1db9b (7:5b9b)
 	set 2, [hl]
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [$c0ee], a
 	call PlaySound
 	ld c, BANK(Music_Surfing)
--- a/scripts/vermiliongym.asm
+++ b/scripts/vermiliongym.asm
@@ -45,7 +45,7 @@
 
 VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_VERMILIONGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -61,7 +61,7 @@
 	cp $ff
 	jp z, VermilionGymScript_5ca8a
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 
 VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
 	ld a, $6
--- a/scripts/viridiancity.asm
+++ b/scripts/viridiancity.asm
@@ -35,7 +35,7 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	call ViridianCityScript_190cf
 	ld a, $3
 	ld [W_VIRIDIANCITYCURSCRIPT], a
@@ -55,7 +55,7 @@
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
-	ld [H_CURRENTPRESSEDBUTTONS], a
+	ld [hJoyHeld], a
 	call ViridianCityScript_190cf
 	ld a, $3
 	ld [W_VIRIDIANCITYCURSCRIPT], a
@@ -96,13 +96,13 @@
 	call UpdateSprites
 	call Delay3
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $f
 	ld [$ff8c], a
 	call DisplayTextID
 	xor a
 	ld [W_BATTLETYPE], a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $0
 	ld [W_VIRIDIANCITYCURSCRIPT], a
 	ret
@@ -124,7 +124,7 @@
 	ld [$ccd3], a
 	xor a
 	ld [$c109], a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ret
 
 ViridianCityTextPointers: ; 190e4 (6:50e4)
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -17,7 +17,7 @@
 
 ViridianGymScript_748d6: ; 748d6 (1d:48d6)
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld [W_VIRIDIANGYMCURSCRIPT], a
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -44,7 +44,7 @@
 	ld a, (SFX_02_52 - SFX_Headers_02) / 3
 	call PlaySound
 	ld a, $ff
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld a, $4
 	ld [W_CURMAPSCRIPT], a
 	ret
@@ -125,7 +125,7 @@
 	and a
 	jr nz, .asm_74980
 	xor a
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 	ld hl, $d736
 	res 7, [hl]
 	ld a, $0
@@ -141,7 +141,7 @@
 	cp $ff
 	jp z, ViridianGymScript_748d6
 	ld a, $f0
-	ld [wJoypadForbiddenButtonsMask], a
+	ld [wJoyIgnore], a
 ViridianGymScript3_74995: ; 74995 (1d:4995)
 	ld a, $c
 	ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
--- a/wram.asm
+++ b/wram.asm
@@ -260,8 +260,8 @@
 
 	ds 10
 
-wJoypadForbiddenButtonsMask:: ; cd6b
-; bit 1 means button presses will be ignored for that button
+wJoyIgnore:: ; cd6b
+; Set buttons are ignored.
 	ds 1
 
 	ds 21