Skip to content

Commit

Permalink
Start reorganizing pokeyellow
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Nov 5, 2020
1 parent 87131ea commit aae999f
Show file tree
Hide file tree
Showing 164 changed files with 2,158 additions and 2,150 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
*.tilemap binary
*.wav binary
*.blk binary
*.pic binary
*.pic binary
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*.2bpp
*.pic

# compiled audio
*.pcm

# compiled roms
*.gbc
*.gb
Expand All @@ -21,9 +24,6 @@
*.pyc
*$py.class

# converted audio data
*.pcm

# save game files
*.sgm
*.sav
Expand Down
7 changes: 4 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Open **Terminal** and enter the following commands, depending on which distro yo
To install the software required for **pokeyellow**:

```bash
sudo apt-get install make gcc git
sudo apt-get install make gcc git python
```

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
Expand All @@ -92,7 +92,7 @@ Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source)
To install the software required for **pokeyellow**:

```bash
sudo zypper install make gcc git
sudo zypper install make gcc git python
```

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source) to build **rgbds 0.4.1** from source.
Expand All @@ -102,7 +102,7 @@ Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/source)
To install the software required for **pokeyellow**:

```bash
sudo pacman -S make gcc git
sudo pacman -S make gcc git python
```

Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install/arch) for Arch Linux to install **rgbds 0.4.1**.
Expand Down Expand Up @@ -133,6 +133,7 @@ If your distro is not listed here, try to find the required software in its repo
- `gcc` (or `clang`)
- `git`
- `rgbds`
- `python`

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

Expand Down
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
PYTHON := python
pcm := $(PYTHON) tools/pokemontools/pcm.py pcm

rom := pokeyellow.gbc

rom_obj := \
Expand All @@ -11,6 +8,7 @@ maps.o \
text.o \
wram.o \
gfx/pics.o \
gfx/pikachu.o \
gfx/sprites.o \
gfx/tilesets.o

Expand All @@ -29,6 +27,9 @@ RGBFIX ?= $(RGBDS)rgbfix
RGBGFX ?= $(RGBDS)rgbgfx
RGBLINK ?= $(RGBDS)rgblink

PYTHON := python
pcm := $(PYTHON) tools/pokemontools/pcm.py pcm


### Build targets

Expand All @@ -42,7 +43,8 @@ all: $(rom)
yellow: $(rom)

clean: tidy
find . \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' -o -iname '*.pcm' \) -delete
find gfx \( -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -delete
find audio/pikachu_cries \( -iname '*.pcm' \) -delete

tidy:
rm -f $(rom) $(rom_obj) $(rom:.gbc=.map) $(rom:.gbc=.sym) rgbdscheck.o
Expand Down Expand Up @@ -105,11 +107,14 @@ gfx/slots/slots_1.2bpp: tools/gfx += --trim-whitespace
gfx/tilesets/%.2bpp: tools/gfx += --trim-whitespace
gfx/tilesets/reds_house.2bpp: tools/gfx += --preserve=0x48

gfx/title/pokemon_logo.2bpp: tools/gfx += --trim-whitespace

gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates

gfx/sgb/border.2bpp: tools/gfx += --trim-whitespace
gfx/surfing_pikachu_1c.2bpp: tools/gfx += --trim-whitespace
gfx/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace

gfx/surfing_pikachu/surfing_pikachu_1c.2bpp: tools/gfx += --trim-whitespace
gfx/surfing_pikachu/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace


### Catch-all graphics rules
Expand All @@ -130,5 +135,9 @@ gfx/surfing_pikachu_3.2bpp: tools/gfx += --trim-whitespace
tools/pkmncompress $< $@


### Catch-all audio rules

%.wav: ;
%.pcm: %.wav ; @$(pcm) $<

%.pcm: %.wav
@$(pcm) $<
14 changes: 3 additions & 11 deletions audio.asm
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,6 @@ INCLUDE "audio/sfx/get_item2_4.asm"

SECTION "Audio Engine 1", ROMX

AudioEngine1::

INCLUDE "audio/play_battle_music.asm"
INCLUDE "audio/engine_1.asm"
INCLUDE "audio/alternate_tempo.asm"
Expand All @@ -447,25 +445,18 @@ INCLUDE "audio/low_health_alarm.asm"

SECTION "Audio Engine 2", ROMX

AudioEngine2::

INCLUDE "audio/engine_2.asm"


SECTION "Audio Engine 3", ROMX

AudioEngine3::

INCLUDE "audio/pokedex_rating_sfx.asm"
INCLUDE "audio/engine_3.asm"


SECTION "Audio Engine 4", ROMX

SurfingPikachu1Graphics1:: INCBIN "gfx/surfing_pikachu_1a.2bpp"
SurfingPikachu1Graphics2:: INCBIN "gfx/surfing_pikachu_1b.2bpp"
SurfingPikachu1Graphics3:: INCBIN "gfx/surfing_pikachu_1c.2bpp"

INCLUDE "gfx/surfing_pikachu.asm"
INCLUDE "audio/engine_4.asm"


Expand Down Expand Up @@ -550,5 +541,6 @@ INCLUDE "audio/music/meetjessiejames.asm"

INCBIN "audio/unknown_832b9.bin"

; cries are in different banks

; Pikachu cries are in different banks
INCLUDE "audio/pikachu_cries.asm"
7 changes: 3 additions & 4 deletions audio/alternate_tempo.asm
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ Music_RivalAlternateTempo::
ld a, MUSIC_MEET_RIVAL
call PlayMusic
ld de, Music_MeetRival_branch_b119
jr asm_99ed
jr FinishAlternateRivalMusic

; applies both the alternate start and alternate tempo
Music_RivalAlternateStartAndTempo::
call Music_RivalAlternateStart
ld de, Music_MeetRival_branch_b19b
asm_99ed:
FinishAlternateRivalMusic:
ld hl, wChannelCommandPointers
jp Audio1_OverwriteChannelPointer

; XXX
ret
ret ; unused

; an alternate tempo for Cities1 which is used for the Hall of Fame room
Music_Cities1AlternateTempo::
Expand Down
4 changes: 2 additions & 2 deletions audio/engine_1.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; The first of three duplicated sound engines.
; The first of four partially duplicated sound engines.

Audio1_UpdateMusic::
ld c, Ch1
Expand Down Expand Up @@ -1064,7 +1064,7 @@ Audio1_IsCry:

Audio1_96c3:
ld a, [wAudioROMBank]
cp BANK(AudioEngine2)
cp BANK("Audio Engine 2")
jr nz, .asm_96dc
ld a, [wChannelSoundIDs + Ch8]
ld b, a
Expand Down
2 changes: 1 addition & 1 deletion audio/engine_2.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; The second of three duplicated sound engines.
; The second of four partially duplicated sound engines.
; This copy has a few differences relating to battle sound effects
; and the low health alarm that plays in battle

Expand Down
2 changes: 1 addition & 1 deletion audio/engine_3.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; The third of three duplicated sound engines.
; The third of four partially duplicated sound engines.

Audio3_PlaySound::
ld [wSoundID], a
Expand Down
2 changes: 1 addition & 1 deletion audio/engine_4.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; The fourth of three duplicated sound engines.
; The fourth of four partially duplicated sound engines.

Audio4_PlaySound::
ld [wSoundID], a
Expand Down
2 changes: 0 additions & 2 deletions audio/music/dungeon1.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ Music_Dungeon1_Ch1::
vibrato 10, 1, 4
note_type 12, 4, -5
rest 8
; stereo_panning %1110, %1101
octave 4
note F#, 8
; stereo_panning %1111, %1111

Music_Dungeon1_branch_7dee5::
note_type 12, 11, 2
Expand Down
30 changes: 16 additions & 14 deletions audio/pikachu_cries.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ pcm: MACRO
.End:
ENDM

SECTION "Pikachu Cries 1", ROMX ; BANK $21

; All of the pcm data has one trailing byte that is never processed.

SECTION "Pikachu Cries 1", ROMX

PikachuCry1::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_1.pcm"
db $77 ; unused
; All of the pcm data has one trailing byte that is never processed.

PikachuCry2::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_2.pcm"
Expand All @@ -25,7 +27,7 @@ PikachuCry4::
db $e0 ; unused


SECTION "Pikachu Cries 2", ROMX ; BANK $22
SECTION "Pikachu Cries 2", ROMX

PikachuCry5::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_5.pcm"
Expand All @@ -40,7 +42,7 @@ PikachuCry7::
db $ff ; unused


SECTION "Pikachu Cries 3", ROMX ; BANK $23
SECTION "Pikachu Cries 3", ROMX

PikachuCry8::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_8.pcm"
Expand All @@ -55,7 +57,7 @@ PikachuCry10::
db $ff ; unused


SECTION "Pikachu Cries 4", ROMX ; BANK $24
SECTION "Pikachu Cries 4", ROMX

PikachuCry11::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_11.pcm"
Expand All @@ -70,7 +72,7 @@ PikachuCry13::
db $f0 ; unused


SECTION "Pikachu Cries 5", ROMX ; BANK $25
SECTION "Pikachu Cries 5", ROMX

PikachuCry14::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_14.pcm"
Expand All @@ -80,7 +82,7 @@ PikachuCry15::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_15.pcm"
db $77 ; unused

SECTION "Pikachu Cries 6", ROMX ; BANK $31
SECTION "Pikachu Cries 6", ROMX

PikachuCry16::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_16.pcm"
Expand All @@ -95,7 +97,7 @@ PikachuCry22::
db $7e ; unused


SECTION "Pikachu Cries 7", ROMX ; BANK $32
SECTION "Pikachu Cries 7", ROMX

PikachuCry20::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_20.pcm"
Expand All @@ -106,7 +108,7 @@ PikachuCry21::
db $ff ; unused


SECTION "Pikachu Cries 8", ROMX ; BANK $33
SECTION "Pikachu Cries 8", ROMX

PikachuCry19::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_19.pcm"
Expand All @@ -120,7 +122,7 @@ PikachuCry26::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_26.pcm"
db $00 ; unused

SECTION "Pikachu Cries 9", ROMX ; BANK $34
SECTION "Pikachu Cries 9", ROMX

PikachuCry17::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_17.pcm"
Expand All @@ -135,7 +137,7 @@ PikachuCry25::
db $03 ; unused


SECTION "Pikachu Cries 10", ROMX ; BANK $35
SECTION "Pikachu Cries 10", ROMX

PikachuCry27::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_27.pcm"
Expand All @@ -157,7 +159,7 @@ PikachuCry31::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_31.pcm"
db $00 ; unused

SECTION "Pikachu Cries 11", ROMX ; BANK $36
SECTION "Pikachu Cries 11", ROMX

PikachuCry32::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_32.pcm"
Expand All @@ -176,7 +178,7 @@ PikachuCry41::
db $9b ; unused


SECTION "Pikachu Cries 12", ROMX ; BANK $37
SECTION "Pikachu Cries 12", ROMX

PikachuCry35::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_35.pcm"
Expand All @@ -191,7 +193,7 @@ PikachuCry39::
db $0f ; unused


SECTION "Pikachu Cries 13", ROMX ; BANK $38
SECTION "Pikachu Cries 13", ROMX

PikachuCry37::
pcm INCBIN "audio/pikachu_cries/pikachu_cry_37.pcm"
Expand Down
1 change: 0 additions & 1 deletion audio/wave_instruments.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
dw .wave5 ; used in the Lavender Town and Pokemon Tower themes
dw .wave5 ; unused
dw .wave5 ; unused
; dw .wave5 ; unused

; these are the definitions for the channel 3 instruments
; each instrument definition is made up of 32 points (nibbles) that form
Expand Down
1 change: 1 addition & 0 deletions constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ INCLUDE "constants/tileset_constants.asm"
INCLUDE "constants/event_constants.asm"
INCLUDE "constants/text_constants.asm"
INCLUDE "constants/menu_constants.asm"
INCLUDE "constants/sprite_anim_constants.asm"
INCLUDE "constants/pikachu_emotion_constants.asm"
Loading

0 comments on commit aae999f

Please sign in to comment.