summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md56
-rwxr-xr-xdata/super_rod.asm15
-rwxr-xr-xengine/hidden_object_functions7.asm2
-rw-r--r--engine/joypad.asm20
-rwxr-xr-xengine/palettes.asm7
-rw-r--r--hram.asm2
-rwxr-xr-xscripts/pokemontower7.asm2
7 files changed, 48 insertions, 56 deletions
diff --git a/INSTALL.md b/INSTALL.md
index 124e9408..11450d93 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,73 +1,57 @@
# Linux
-Dependencies:
-
sudo apt-get install make gcc bison git python python-setuptools
- sudo easy_install pip
-
-The assembler used is [**rgbds**](https://github.com/bentley/rgbds).
+ sudo easy_install pypng
git clone git://github.com/bentley/rgbds.git
cd rgbds
- sudo mkdir -p /usr/local/man/man{1,7}
sudo make install
cd ..
- rm -rf rgbds
-
-Set up the repository.
- git clone git://github.com/iimarckus/pokered.git
+ git clone --recursive git://github.com/iimarckus/pokered.git
cd pokered
- git submodule init
- git submodule update
- sudo pip install -r extras/requirements.txt
To build **pokered.gbc** and **pokeblue.gbc**:
make
-This should take about 10 seconds. Subsequent builds are faster.
-
To build them individually:
make red
make blue
-# OS X
+# Mac
In the shell, run:
xcode-select --install
+ sudo easy_install pypng
-Then follow the Linux instructions.
+ git clone git://github.com/bentley/rgbds.git
+ cd rgbds
+ sudo make install
+ cd ..
+ git clone --recursive git://github.com/iimarckus/pokered.git
+ cd pokered
-# Windows
+ make
-It's recommended that you use a virtual machine running Linux or OS X.
-If you insist on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit).
+# Windows
-Dependencies are downloaded in the installer rather than the command line.
-Select the following packages:
-* make
-* git
-* gettext
-* python
-* python-setuptools
+To build on Windows, use [**Cygwin**](http://cygwin.com/install.html) (32-bit).
-The latest version of **rgbds** is [**0.2.2**](https://github.com/bentley/rgbds/releases/download/v0.2.2/rgbds-0.2.2-win32.zip). To install, put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`.
+In the installer, select the following packages: `make` `git` `gettext` `python` `python-setuptools`
-Then set up the repository. In the **Cygwin terminal**:
+Then get the most recent version of [**rgbds**](https://github.com/bentley/rgbds/releases/).
+Put `rgbasm.exe`, `rgblink.exe` and `rgbfix.exe` in `C:\cygwin\usr\local\bin`.
- git clone git://github.com/iimarckus/pokered.git
- cd pokered
- git submodule init
- git submodule update
- easy_install pypng
+In the **Cygwin terminal**:
-To build:
+ easy_install pypng
+ git clone --recursive git://github.com/iimarckus/pokered.git
+ cd pokered
make
-
diff --git a/data/super_rod.asm b/data/super_rod.asm
index ead970d8..2b0646fc 100755
--- a/data/super_rod.asm
+++ b/data/super_rod.asm
@@ -25,16 +25,15 @@ SuperRodData: ; e919 (3:6919)
dbw ROUTE_25, FishingGroup3
dbw CERULEAN_GYM, FishingGroup3
dbw VERMILION_DOCK, FishingGroup4
-;XXX syntax errors on the rest?
- dbw $A1, FishingGroup8 ; SEAFOAM_ISLANDS_4
- dbw $A2, FishingGroup8 ; SEAFOAM_ISLANDS_5
+ dbw SEAFOAM_ISLANDS_4, FishingGroup8
+ dbw SEAFOAM_ISLANDS_5, FishingGroup8
dbw SAFARI_ZONE_EAST, FishingGroup6
- dbw $DA, FishingGroup6 ; SAFARI_ZONE_NORTH
+ dbw SAFARI_ZONE_NORTH, FishingGroup6
dbw SAFARI_ZONE_WEST, FishingGroup6
- dbw $DC, FishingGroup6 ; SAFARI_ZONE_CENTER
- dbw $E2, FishingGroup9 ; UNKNOWN_DUNGEON_2
- dbw $E3, FishingGroup9 ; UNKNOWN_DUNGEON_3
- dbw $E4, FishingGroup9 ; UNKNOWN_DUNGEON_1
+ dbw SAFARI_ZONE_CENTER, FishingGroup6
+ dbw UNKNOWN_DUNGEON_2, FishingGroup9
+ dbw UNKNOWN_DUNGEON_3, FishingGroup9
+ dbw UNKNOWN_DUNGEON_1, FishingGroup9
db $FF
; fishing groups
diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm
index 012e941d..f97190de 100755
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -80,7 +80,7 @@ asm_1e9b0: ; 1e9b0 (7:69b0)
call DisplayTextID
xor a
ld [wd528], a
- ld a, $9c
+ ld a, SAFARI_ZONE_ENTRANCE
ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
ld a, $3
ld [wDestinationWarpID], a
diff --git a/engine/joypad.asm b/engine/joypad.asm
index d2ad1c31..31e197e2 100644
--- a/engine/joypad.asm
+++ b/engine/joypad.asm
@@ -1,9 +1,13 @@
_Joypad::
+; hJoyReleased: (hJoyLast ^ hJoyInput) & hJoyLast
+; hJoyPressed: (hJoyLast ^ hJoyInput) & hJoyInput
+
ld a, [hJoyInput]
cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset
jp z, TrySoftReset
+
ld b, a
- ld a, [hJoyHeldLast]
+ ld a, [hJoyLast]
ld e, a
xor b
ld d, a
@@ -13,15 +17,19 @@ _Joypad::
and b
ld [hJoyPressed], a
ld a, b
- ld [hJoyHeldLast], a
+ ld [hJoyLast], a
+
ld a, [wd730]
bit 5, a
jr nz, DiscardButtonPresses
- ld a, [hJoyHeldLast]
+
+ ld a, [hJoyLast]
ld [hJoyHeld], a
+
ld a, [wJoyIgnore]
and a
ret z
+
cpl
ld b, a
ld a, [hJoyHeld]
@@ -41,11 +49,13 @@ DiscardButtonPresses:
TrySoftReset:
call DelayFrame
- ; reset joypad (to make sure the
- ; player is really trying to reset)
+
+ ; deselect (redundant)
ld a, $30
ld [rJOYP], a
+
ld hl, hSoftReset
dec [hl]
jp z, SoftReset
+
jp Joypad
diff --git a/engine/palettes.asm b/engine/palettes.asm
index 67afc12d..ed06cf4e 100755
--- a/engine/palettes.asm
+++ b/engine/palettes.asm
@@ -381,7 +381,7 @@ SendSGBPacket: ; 71feb (1c:5feb)
LoadSGB: ; 7202b (1c:602b)
xor a
ld [wOnSGB], a
- call Func_7209b
+ call CheckSGB
ret nc
ld a, $1
ld [wOnSGB], a
@@ -440,7 +440,7 @@ PointerTable_72089: ; 72089 (1c:6089)
dw DataSnd_725a8
dw DataSnd_725b8
-Func_7209b: ; 7209b (1c:609b)
+CheckSGB: ; 7209b (1c:609b)
ld hl, MltReq2Packet
di
call SendSGBPacket
@@ -536,8 +536,7 @@ Func_7210b: ; 7210b (1c:610b)
ret
Wait7000: ; 7214a (1c:614a)
-; each loop takes about 10 cycles so this routine actually loops through 70000
-; cycles.
+; Each loop takes 9 cycles so this routine actually waits 63000 cycles.
ld de, 7000
.loop
nop
diff --git a/hram.asm b/hram.asm
index da56997e..1becd8c0 100644
--- a/hram.asm
+++ b/hram.asm
@@ -60,7 +60,7 @@ hSCX EQU $FFAE
hSCY EQU $FFAF
hWY EQU $FFB0
-hJoyHeldLast EQU $FFB1
+hJoyLast EQU $FFB1
hJoyReleased EQU $FFB2
hJoyPressed EQU $FFB3
hJoyHeld EQU $FFB4
diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm
index 4d1012b7..ab42121d 100755
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -71,7 +71,7 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
predef HideObject
ld a, $4
ld [wSpriteStateData1 + 9], a
- ld a, $95
+ ld a, LAVENDER_HOUSE_1
ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
ld a, $1
ld [wDestinationWarpID], a