Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b4bae4a
Add a `CANNOT_MOVE` constant (#508)
Rangi42 May 31, 2025
fd043a6
Fix typos
dannye Jun 4, 2025
0520dce
Add .rgbds-version file for rgbenv compatibility
Rangi42 Jun 7, 2025
663b061
Simplify `li` macro
Rangi42 Jun 11, 2025
5e5a498
Fishing graphics make more sense horizontally
Rangi42 Jun 25, 2025
fcb61ae
Distinguish single trainer pics section from Pokemon pics
Rangi42 Jun 26, 2025
56c405d
Replace hardware_constants.asm with hardware.inc (#511)
Rangi42 Jun 30, 2025
78e44a8
Use combined hardware constants
Rangi42 Jun 30, 2025
1e99747
Use more audio constants
Rangi42 Jun 30, 2025
aa85c00
Define `MAX_WARP_EVENTS`
Rangi42 Jul 2, 2025
3f4b3ee
Check limits for warp, bg, and object events
Rangi42 Jul 2, 2025
d6e9f53
Require RGBDS 0.9.3 for its DMG palette specs (#513)
Rangi42 Jul 3, 2025
4eaccc4
Use less generic labels for party finding loops (#514)
kagnusdev Jul 7, 2025
e2f7c5c
Use hardware constants for tile attributes in VermilionDockOAMBlock (…
kagnusdev Jul 11, 2025
fd86bca
Update hardware.inc to 5.2.0
Rangi42 Jul 22, 2025
6f8ee8a
Try to catch missing commas in `tmhm` learnsets
Rangi42 Aug 4, 2025
bdbc8cb
Update hardware.inc to 5.3.0 and use its `JOYP_SGB_*` constants
Rangi42 Aug 11, 2025
1eb6f61
Identify `JOYP_SGB_MLT_REQ` constant
Rangi42 Aug 11, 2025
263a35a
Say how many bytes the assertion macros expected vs got
Rangi42 Aug 13, 2025
c51d1b7
List end markers (-1 aka $FF) are not part of table data
Rangi42 Aug 13, 2025
31fc2e2
Use `<STAT>_UP1_EFFECT` constants (#522)
PokefanMarcel Aug 16, 2025
5e8b835
Use `dname` macro to automatically pad names with `"@"` characters (#…
Rangi42 Aug 17, 2025
126c3f3
Document a bug in `PrintBenchGuyText` (#523)
Narishma-gb Aug 17, 2025
fd5dc11
Specify file extensions that `make` does not generate
Rangi42 Aug 27, 2025
d98b5e6
Document where badge and elevator floor "items" are used
Rangi42 Aug 28, 2025
4d2594c
Label and constant cleanup (#528)
Narishma-gb Sep 3, 2025
8da7deb
Update comment for clarity (#529)
Vortyne Sep 3, 2025
b496791
Document visual glitch with Pewter City Gym guy (#526)
PokefanMarcel Sep 3, 2025
108bf29
Use RAMG_SRAM_ENABLE (#530)
PokefanMarcel Sep 7, 2025
59da8c8
Clean up home/copy2.asm (#531)
PokefanMarcel Sep 10, 2025
628797b
Revise some RAM buffer constants
Rangi42 Sep 26, 2025
e3af20b
Consistently use `ld [hli]`/`ld [hld]`, not `ldi`/`ldd`
Rangi42 Oct 5, 2025
c2d81fb
Expand comment on `_AfterTrade2Text ` to mention pokeyellow's changes…
PokefanMarcel Nov 6, 2025
8105df9
Use the same tools/make_patch.c as Gen 2
Rangi42 Nov 12, 2025
5943b96
Use features of RGBDS 1.0.0 (#537)
Rangi42 Nov 12, 2025
70b5ab9
Add `_vc` patch targets to `.PHONY`
Rangi42 Nov 13, 2025
f332678
Use more hardware and graphics constants (#532)
Narishma-gb Nov 18, 2025
308189b
Use `ld_hli_a_string` macro to make byte-by-byte strings more obvious…
Rangi42 Nov 24, 2025
e92d1af
Avoid magic numbers for most `CopyData` calls (#542)
Rangi42 Nov 25, 2025
3a4382c
Use more Pokemon data constants, create MOVE_NAME_LENGTH (#543)
Narishma-gb Nov 27, 2025
9a6bb3e
Define player and rival names once, to be used in two places (#545)
Rangi42 Dec 1, 2025
7272d9b
Comment that `farcall` and `callfar` are interchangable
Rangi42 Dec 1, 2025
917a0eb
Correct comment
Rangi42 Dec 1, 2025
8bb0354
Update `StatusScreen`, add `*_STATS_BOX` constants (#546)
Narishma-gb Dec 1, 2025
e1948fe
Clarify how the order of map constants matters for the Town Map (#553)
Rangi42 Dec 15, 2025
e9d3324
Comment more unreferenced local labels (#550)
Narishma-gb Dec 15, 2025
d79c578
Specify a max item length for `list_start` (#552)
Rangi42 Dec 15, 2025
0555b42
Replace magic number `$7` with `SLP_MASK` constant (#555)
jordanmoore753 Dec 26, 2025
1d861f3
Merge commit 'pret/master' into master
Brianum Jan 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.9.2
ref: v1.0.0
repository: gbdev/rgbds

- name: Install rgbds
Expand Down
1 change: 1 addition & 0 deletions .rgbds-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
20 changes: 10 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,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** install instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.9.2**.
Then follow the [**rgbds** install instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 1.0.0**.

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

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

Expand All @@ -69,7 +69,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.9.2**.
Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 1.0.0**.

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

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

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

### OpenSUSE

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

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

### Arch Linux

Expand All @@ -106,7 +106,7 @@ To install the software required for **pokered**:
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.9.2** 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 1.0.0** from source.

### Termux

Expand All @@ -122,7 +122,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.9.2** 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 1.0.0** from source.

### Other distros

Expand All @@ -133,7 +133,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.9.2** 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 1.0.0** from source.

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

Expand All @@ -155,8 +155,8 @@ 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.9.2 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-0.9.2/`. 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 1.0.0 globally. Instead, you can put its files in a directory within pokered, such as `pokered/rgbds-1.0.0/`. Then specify it when you run `make`:

```bash
make RGBDS=rgbds-0.9.2/
make RGBDS=rgbds-1.0.0/
```
88 changes: 56 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,30 @@ RGBFIX ?= $(RGBDS)rgbfix
RGBGFX ?= $(RGBDS)rgbgfx
RGBLINK ?= $(RGBDS)rgblink

RGBASMFLAGS ?= -Weverything -Wtruncation=1
RGBLINKFLAGS ?= -Weverything -Wtruncation=1
RGBFIXFLAGS ?= -Weverything
RGBGFXFLAGS ?= -Weverything


### Build targets

.SUFFIXES:
.SECONDEXPANSION:
.PRECIOUS:
.SECONDARY:
.PHONY: all red blue green blue_debug clean tidy compare tools
.PHONY: \
all \
red \
blue \
green \
blue_debug \
red_vc \
blue_vc \
clean \
tidy \
compare \
tools

all: $(roms)
red: pokered.gbc
Expand Down Expand Up @@ -89,7 +105,7 @@ tools:
$(MAKE) -C tools/


RGBASMFLAGS = -Q8 -P includes.asm -Weverything -Wtruncation=1
RGBASMFLAGS += -Q8 -P includes.asm
# Create a sym/map for debug purposes if `make` run with `DEBUG=1`
ifeq ($(DEBUG),1)
RGBASMFLAGS += -E
Expand Down Expand Up @@ -134,40 +150,38 @@ $(foreach obj, $(pokeblue_vc_obj), $(eval $(call DEP,$(obj),$(obj:_blue_vc.o=.as
endif


%.asm: ;


pokered_pad = 0x00
pokeblue_pad = 0x00
pokegreen_pad = 0x00
pokered_vc_pad = 0x00
pokeblue_vc_pad = 0x00
pokeblue_debug_pad = 0xff
pokered.gbc: RGBLINKFLAGS += -p 0x00
pokeblue.gbc: RGBLINKFLAGS += -p 0x00
pokeblue_debug.gbc: RGBLINKFLAGS += -p 0xff
pokered_vc.gbc: RGBLINKFLAGS += -p 0x00
pokeblue_vc.gbc: RGBLINKFLAGS += -p 0x00

pokered_opt = -cjsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON RED"
pokeblue_opt = -cjsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON BLUE"
pokegreen_opt = -cjsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON GREEN"
pokeblue_debug_opt = -cjsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON BLUE"
pokered_vc_opt = -cjsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON RED"
pokeblue_vc_opt = -cjsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03 -t "POKEMON BLUE"
RGBFIXFLAGS += -cjsv -n 0 -k 01 -l 0x33 -m MBC3+RAM+BATTERY -r 03
pokered.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON RED"
pokeblue.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON BLUE"
pokegreen.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON GREEN"
pokeblue_debug.gbc: RGBFIXFLAGS += -p 0xff -t "POKEMON BLUE"
RGBLINKFLAGS+= -p 0xff
pokered_vc.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON RED"
pokeblue_vc.gbc: RGBFIXFLAGS += -p 0x00 -t "POKEMON BLUE"

%.gbc: $$(%_obj) layout.link
$(RGBLINK) -p $($*_pad) -m $*.map -n $*.sym -l layout.link -o $@ $(filter %.o,$^)
$(RGBFIX) -p $($*_pad) $($*_opt) $@
$(RGBLINK) $(RGBLINKFLAGS) -l layout.link -m $*.map -n $*.sym -o $@ $(filter %.o,$^)
$(RGBFIX) $(RGBFIXFLAGS) $@


### Misc file-specific graphics rules

gfx/battle/move_anim_0.2bpp: tools/gfx += --trim-whitespace
gfx/battle/move_anim_1.2bpp: tools/gfx += --trim-whitespace

gfx/intro/blue_jigglypuff_1.2bpp: rgbgfx += --columns
gfx/intro/blue_jigglypuff_2.2bpp: rgbgfx += --columns
gfx/intro/blue_jigglypuff_3.2bpp: rgbgfx += --columns
gfx/intro/red_nidorino_1.2bpp: rgbgfx += --columns
gfx/intro/red_nidorino_2.2bpp: rgbgfx += --columns
gfx/intro/red_nidorino_3.2bpp: rgbgfx += --columns
gfx/intro/gengar.2bpp: rgbgfx += --columns
gfx/intro/blue_jigglypuff_1.2bpp: RGBGFXFLAGS += --columns
gfx/intro/blue_jigglypuff_2.2bpp: RGBGFXFLAGS += --columns
gfx/intro/blue_jigglypuff_3.2bpp: RGBGFXFLAGS += --columns
gfx/intro/red_nidorino_1.2bpp: RGBGFXFLAGS += --columns
gfx/intro/red_nidorino_2.2bpp: RGBGFXFLAGS += --columns
gfx/intro/red_nidorino_3.2bpp: RGBGFXFLAGS += --columns
gfx/intro/gengar.2bpp: RGBGFXFLAGS += --columns
gfx/intro/gengar.2bpp: tools/gfx += --remove-duplicates --preserve=0x19,0x76

gfx/credits/the_end.2bpp: tools/gfx += --interleave --png=$<
Expand All @@ -184,17 +198,27 @@ gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates

### Catch-all graphics rules

%.png: ;

%.2bpp: %.png
$(RGBGFX) $(rgbgfx) -o $@ $<
$(RGBGFX) --colors dmg $(RGBGFXFLAGS) -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) -o $@ $@)
tools/gfx $(tools/gfx) -o $@ $@ || $$($(RM) $@ && false))

%.1bpp: %.png
$(RGBGFX) $(rgbgfx) --depth 1 -o $@ $<
$(RGBGFX) --colors dmg $(RGBGFXFLAGS) --depth 1 -o $@ $<
$(if $(tools/gfx),\
tools/gfx $(tools/gfx) --depth 1 -o $@ $@)
tools/gfx $(tools/gfx) --depth 1 -o $@ $@ || $$($(RM) $@ && false))

%.pic: %.2bpp
tools/pkmncompress $< $@


### File extensions that are never generated and should be manually created

%.asm: ;
%.inc: ;
%.png: ;
%.pal: ;
%.bin: ;
%.blk: ;
%.bst: ;
%.rle: ;
44 changes: 22 additions & 22 deletions audio/engine_1.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Audio1_UpdateMusic::
set BIT_MUTE_AUDIO, a
ld [wMuteAudioAndPauseMusic], a
xor a ; disable all channels' output
ldh [rNR51], a
ldh [rNR30], a
ld a, $80
ldh [rNR30], a
ldh [rAUDTERM], a
ldh [rAUD3ENA], a
ld a, AUD3ENA_ON
ldh [rAUD3ENA], a
jr .nextChannel
.applyAffects
call Audio1_ApplyMusicAffects
Expand Down Expand Up @@ -184,9 +184,9 @@ Audio1_sound_ret:
jr nz, .skipSfxChannel3
; restart hardware channel 3 (wave channel) output
xor a
ldh [rNR30], a
ldh [rAUD3ENA], a
ld a, $80
ldh [rNR30], a
ldh [rAUD3ENA], a
.skipSfxChannel3
jr nz, .afterDisable
ld a, [wDisableChannelOutputWhenSfxEnds]
Expand Down Expand Up @@ -218,9 +218,9 @@ Audio1_sound_ret:
.disableChannelOutput
ld hl, Audio1_HWChannelDisableMasks
add hl, bc
ldh a, [rNR51]
ldh a, [rAUDTERM]
and [hl]
ldh [rNR51], a
ldh [rAUDTERM], a
.afterDisable
ld a, [wChannelSoundIDs + CHAN5]
cp CRY_SFX_START
Expand All @@ -236,7 +236,7 @@ Audio1_sound_ret:
ret c
.skipRewind
ld a, [wSavedVolume]
ldh [rNR50], a
ldh [rAUDVOL], a
xor a
ld [wSavedVolume], a
.skipCry
Expand Down Expand Up @@ -543,7 +543,7 @@ Audio1_volume:
cp volume_cmd
jr nz, Audio1_execute_music
call Audio1_GetNextMusicByte
ldh [rNR50], a ; store volume
ldh [rAUDVOL], a ; store volume
jp Audio1_sound_ret

Audio1_execute_music:
Expand Down Expand Up @@ -632,7 +632,7 @@ Audio1_pitch_sweep:
bit BIT_EXECUTE_MUSIC, [hl]
jp nz, Audio1_note ; no
call Audio1_GetNextMusicByte
ldh [rNR10], a
ldh [rAUD1SWEEP], a
jp Audio1_sound_ret

;;;;;;;;;; PureRGBnote: ADDED: new audio commands that can be used in songs, needed for tcg/tcg2/pinball songs to work properly
Expand Down Expand Up @@ -876,9 +876,9 @@ Audio1_note_pitch:
ld b, 0
ld hl, Audio1_HWChannelDisableMasks
add hl, bc
ldh a, [rNR51]
ldh a, [rAUDTERM]
and [hl]
ldh [rNR51], a ; disable hardware channel 3's output
ldh [rAUDTERM], a ; disable hardware channel 3's output
ret
.notChannel3
ld b, REG_VOLUME_ENVELOPE
Expand Down Expand Up @@ -944,7 +944,7 @@ Audio1_EnableChannelOutput:
ld b, 0
call Audio1_9972
add hl, bc
ldh a, [rNR51]
ldh a, [rAUDTERM]
or [hl] ; set this channel's bits
ld d, a
ld a, c
Expand All @@ -966,15 +966,15 @@ Audio1_EnableChannelOutput:
add hl, bc
and [hl]
ld d, a
ldh a, [rNR51]
ldh a, [rAUDTERM]
ld hl, Audio1_HWChannelDisableMasks
add hl, bc
and [hl] ; reset this channel's output bits
or d ; set this channel's output bits that enabled in [wStereoPanning]
ld d, a
.skip
ld a, d
ldh [rNR51], a
ldh [rAUDTERM], a
ret

Audio1_ApplyDutyCycleAndSoundLength:
Expand Down Expand Up @@ -1025,10 +1025,10 @@ Audio1_ApplyWavePatternAndFrequency:
ld a, [hli]
ld e, a
ld d, [hl]
ld hl, rWave_0
ld hl, rAUD3WAVE_0
ld b, $f
xor a ; stop hardware channel 3
ldh [rNR30], a
ldh [rAUD3ENA], a
.loop
ld a, [de]
inc de
Expand All @@ -1037,8 +1037,8 @@ Audio1_ApplyWavePatternAndFrequency:
dec b
and a
jr nz, .loop
ld a, $80 ; start hardware channel 3
ldh [rNR30], a
ld a, AUD3ENA_ON ; start hardware channel 3
ldh [rAUD3ENA], a
pop de
.notChannel3
ld a, d
Expand Down Expand Up @@ -1633,10 +1633,10 @@ Audio1_PlaySound::
ld a, [wSavedVolume]
and a
ret nz
ldh a, [rNR50]
ldh a, [rAUDVOL]
ld [wSavedVolume], a
ld a, $77
ldh [rNR50], a ; full volume
ldh [rAUDVOL], a ; full volume
ret

Audio1_CryRet:
Expand Down
4 changes: 2 additions & 2 deletions audio/engine_3.asm
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ PlaySoundCommon_3:
ld a, [wSavedVolume]
and a
ret nz
ldh a, [rNR50]
ldh a, [rAUDVOL]
ld [wSavedVolume], a
ld a, $77
ldh [rNR50], a
ldh [rAUDVOL], a ; full volume
ret

Noise3_endchannel:
Expand Down
2 changes: 1 addition & 1 deletion audio/low_health_alarm.asm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Music_DoLowHealthAlarm::

;update sound channel 1 to play the alarm, overriding all other sounds.
.playTone
ld hl, rNR10 ;channel 1 sound register
ld hl, rAUD1SWEEP ;channel 1 sound register
ld c, $5
xor a

Expand Down
2 changes: 1 addition & 1 deletion audio/wave_samples.asm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
; these are the definitions for the channel 3 instruments
; each instrument definition is made up of 32 points (nibbles) that form
; the graph of the wave
; the current instrument is copied to rWave_0--rWave_f
; the current instrument is copied to _AUD3WAVERAM
.wave0
dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1

Expand Down
Loading