Skip to content

Commit

Permalink
Use RGBDS 0.9.0 (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 authored Dec 26, 2024
1 parent 724bf17 commit bcb1092
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@master
with:
path: rgbds
ref: v0.8.0
ref: v0.9.0
repository: gbdev/rgbds

- name: Install rgbds
Expand Down
22 changes: 11 additions & 11 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Run setup and leave the default settings. At the "**Select Packages**" step, cho

Double click on the text that says "**Skip**" next to each package to select the most recent version to install.

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.7.0**.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.9.0**.

**Note:** If you already have an installed rgbds older than 0.7.0, you will need to update to 0.7.0. Ignore this if you have never installed rgbds before. If a version newer than 0.7.0 does not work, try downloading 0.7.0.
**Note:** If you already have an installed rgbds older than 0.9.0, you will need to update to 0.9.0. Ignore this if you have never installed rgbds before. If a version newer than 0.9.0 does not work, try downloading 0.9.0.

Now open the **Cygwin terminal** and enter the following commands.

Expand All @@ -67,7 +67,7 @@ Install [**Homebrew**](https://brew.sh/). Follow the official instructions.

Open **Terminal** and prepare to enter commands.

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.7.0**.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.9.0**.

Now you're ready to [build **pokegold**](#build-pokegold).

Expand All @@ -84,7 +84,7 @@ To install the software required for **pokegold**:
sudo apt-get install make gcc git
```

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.9.0** from source.

### OpenSUSE

Expand All @@ -94,7 +94,7 @@ To install the software required for **pokegold**:
sudo zypper install make gcc git
```

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.9.0** from source.

### Arch Linux

Expand All @@ -104,7 +104,7 @@ To install the software required for **pokegold**:
sudo pacman -S make gcc git rgbds
```

If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.9.0** from source.

### Termux

Expand All @@ -120,7 +120,7 @@ To install **rgbds**:
pkg install rgbds
```

If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.
If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.9.0** from source.

### Other distros

Expand All @@ -131,7 +131,7 @@ If your distro is not listed here, try to find the required software in its repo
- `git`
- `rgbds`

If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.7.0** from source.
If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.9.0** from source.

Now you're ready to [build **pokegold**](#build-pokegold).

Expand Down Expand Up @@ -165,12 +165,12 @@ make

### Build with a local rgbds version

If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.7.0 globally. Instead, you can put its files in a directory within pokegold, such as `pokegold/rgbds-0.7.0/`. Then specify it when you run `make`:
If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.9.0 globally. Instead, you can put its files in a directory within pokegold, such as `pokegold/rgbds-0.9.0/`. Then specify it when you run `make`:

```bash
make RGBDS=rgbds-0.7.0/ gold
make RGBDS=rgbds-0.9.0/ gold
```

```bash
make RGBDS=rgbds-0.7.0/ silver
make RGBDS=rgbds-0.9.0/ silver
```
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ tools:
$(MAKE) -C tools/


RGBASMFLAGS = -Q8 -P includes.asm -Weverything -Wnumeric-string=2 -Wtruncation=1
RGBASMFLAGS = -Q8 -P includes.asm -Weverything -Wtruncation=1
# Create a sym/map for debug purposes if `make` run with `DEBUG=1`
ifeq ($(DEBUG),1)
RGBASMFLAGS += -E
Expand Down Expand Up @@ -174,12 +174,12 @@ $(foreach obj, $(silver_vc_excl_obj), \
endif


pokegold_opt = -cjsv -t POKEMON_GLD -i AAUE -k 01 -l 0x33 -m 0x10 -r 3 -p 0
pokesilver_opt = -cjsv -t POKEMON_SLV -i AAXE -k 01 -l 0x33 -m 0x10 -r 3 -p 0
pokegold_debug_opt = -cjsv -t POKEMON_GLD -i AAUE -k 01 -l 0x33 -m 0x10 -r 3 -p 0
pokesilver_debug_opt = -cjsv -t POKEMON_SLV -i AAXE -k 01 -l 0x33 -m 0x10 -r 3 -p 0
pokegold_vc_opt = -cjsv -t POKEMON_GLD -i AAUE -k 01 -l 0x33 -m 0x10 -r 3 -p 0
pokesilver_vc_opt = -cjsv -t POKEMON_SLV -i AAXE -k 01 -l 0x33 -m 0x10 -r 3 -p 0
pokegold_opt = -cjsv -t POKEMON_GLD -i AAUE -k 01 -l 0x33 -m MBC3+TIMER+RAM+BATTERY -r 3 -p 0
pokesilver_opt = -cjsv -t POKEMON_SLV -i AAXE -k 01 -l 0x33 -m MBC3+TIMER+RAM+BATTERY -r 3 -p 0
pokegold_debug_opt = -cjsv -t POKEMON_GLD -i AAUE -k 01 -l 0x33 -m MBC3+TIMER+RAM+BATTERY -r 3 -p 0
pokesilver_debug_opt = -cjsv -t POKEMON_SLV -i AAXE -k 01 -l 0x33 -m MBC3+TIMER+RAM+BATTERY -r 3 -p 0
pokegold_vc_opt = -cjsv -t POKEMON_GLD -i AAUE -k 01 -l 0x33 -m MBC3+TIMER+RAM+BATTERY -r 3 -p 0
pokesilver_vc_opt = -cjsv -t POKEMON_SLV -i AAXE -k 01 -l 0x33 -m MBC3+TIMER+RAM+BATTERY -r 3 -p 0

%.gbc: $$(%_obj) layout.link
$(RGBLINK) -n $*.sym -m $*.map -l layout.link -o $@ $(filter %.o,$^)
Expand Down
3 changes: 1 addition & 2 deletions engine/battle/battle_transition.asm
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,7 @@ StartTrainerBattle_LoadPokeBallGraphics:

.PokeBallTransition:
; 16x16 overlay of a Poke Ball
pusho
opt b.X ; . = 0, X = 1
pusho b.X ; . = 0, X = 1
bigdw %......XXXX......
bigdw %....XXXXXXXX....
bigdw %..XXXX....XXXX..
Expand Down
3 changes: 1 addition & 2 deletions engine/pokedex/pokedex.asm
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
const DEXSTATE_UPDATE_UNOWN_MODE
const DEXSTATE_EXIT

DEF POKEDEX_SCX EQU 5
EXPORT POKEDEX_SCX
EXPORT DEF POKEDEX_SCX EQU 5

Pokedex:
ldh a, [hWX]
Expand Down
12 changes: 3 additions & 9 deletions macros/code.asm
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@ MACRO maskbits
; cp 26
; jr nc, .loop
assert 0 < (\1) && (\1) <= $100, "bitmask must be 8-bit"
DEF x = 1
rept 8
if x + 1 < (\1)
DEF x = (x << 1) | 1
endc
endr
DEF x = (1 << BITWIDTH((\1) - 1)) - 1
if _NARG == 2
and x << (\2)
else
and x
DEF x <<= \2
endc
and x
ENDM

MACRO calc_sine_wave
Expand Down
6 changes: 3 additions & 3 deletions rgbdscheck.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__)
fail "pokegold requires rgbds v0.7.0 or newer."
fail "pokegold requires rgbds v0.9.0 or newer."
ENDC
IF __RGBDS_MAJOR__ == 0 && __RGBDS_MINOR__ < 7
fail "pokegold requires rgbds v0.7.0 or newer."
IF __RGBDS_MAJOR__ == 0 && __RGBDS_MINOR__ < 9
fail "pokegold requires rgbds v0.9.0 or newer."
ENDC

0 comments on commit bcb1092

Please sign in to comment.