Add the ability to build Crystal 1.1.

This commit is contained in:
IIMarckus 2015-02-14 01:51:34 -07:00
parent b028e13834
commit 828d6b92f0
11 changed files with 72 additions and 3 deletions

View File

@ -10,6 +10,21 @@ gfx := $(PYTHON) $(poketools)/gfx.py
includes := $(PYTHON) $(poketools)/scan_includes.py includes := $(PYTHON) $(poketools)/scan_includes.py
crystal11_obj := \
wram11.o \
crystal11.o \
lib/mobile/main.o \
home.o \
audio.o \
maps_crystal.o \
engine/events_crystal.o \
engine/credits_crystal.o \
data/egg_moves_crystal.o \
data/evos_attacks_crystal.o \
data/pokedex/entries_crystal.o \
misc/crystal_misc.o \
gfx/pics.o
crystal_obj := \ crystal_obj := \
wram.o \ wram.o \
main.o \ main.o \
@ -25,7 +40,7 @@ data/pokedex/entries_crystal.o \
misc/crystal_misc.o \ misc/crystal_misc.o \
gfx/pics.o gfx/pics.o
all_obj := $(crystal_obj) all_obj := $(crystal_obj) crystal11.o wram11.o
# object dependencies # object dependencies
$(foreach obj, $(all_obj), \ $(foreach obj, $(all_obj), \
@ -53,6 +68,11 @@ $(all_obj): $$*.asm $$($$*_dep)
@$(gfx) lz $(lzq); $(eval lzq :=) @$(gfx) lz $(lzq); $(eval lzq :=)
rgbasm -o $@ $< rgbasm -o $@ $<
pokecrystal11.gbc: $(crystal11_obj)
rgblink -n $*.sym -m $*.map -o $@ $^
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -n 1 -p 0 -r 3 -t PM_CRYSTAL $@
cmp crystal11.gbc $@
pokecrystal.gbc: $(crystal_obj) pokecrystal.gbc: $(crystal_obj)
rgblink -n $*.sym -m $*.map -o $@ $^ rgblink -n $*.sym -m $*.map -o $@ $^
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@

4
crystal11.asm Normal file
View File

@ -0,0 +1,4 @@
CRYSTAL11 = 1
CORRUPT_TILES = 1
INCLUDE "main.asm"

View File

@ -19,8 +19,13 @@ Function1f8000: ; 1f8000
ld a, [hRandomAdd] ld a, [hRandomAdd]
add b add b
ld b, a ld b, a
IF DEF(CRYSTAL11)
and $7f
cp $46
ELSE
and $1f and $1f
cp $15 cp $15
ENDC
jr nc, .asm_1f8022 jr nc, .asm_1f8022
ld b, a ld b, a
ld a, $1 ld a, $1

View File

@ -66,7 +66,11 @@ InitPokedex: ; 40063
call Function414b7 call Function414b7
ld hl, wc6d0 ld hl, wc6d0
IF DEF(CRYSTAL11)
ld bc, $0116
ELSE
ld bc, $0115 ld bc, $0115
ENDC
xor a xor a
call ByteFill call ByteFill

View File

@ -0,0 +1,15 @@
121 ,-,./0
<=<7879:;$ GHG!"#ABCDEF$%$0
121 ,-,./0
;<=<7879:;F$%$ GHG!"#ABCDEF$,./0
 ,-,.79:;

7879CDEF$%$!"#ABCD ,-,./0&'()*+121 ,7879:;345643<=<7#ABCDEF>?@@?>GHG!"#A1 ,-,./0
121<7879:;<=<G!"#ABCDEF$%$ GHG!121 ,-,./0
1<=<7879:;< GHG!"#ABCDEF$%$ G

View File

@ -96474,5 +96474,9 @@ SECTION "bank7F", ROMX, BANK[$7F]
SECTION "stadium2", ROMX[$8000-$220], BANK[$7F] SECTION "stadium2", ROMX[$8000-$220], BANK[$7F]
INCBIN "misc/stadium2.bin" IF DEF(CRYSTAL11)
INCBIN "misc/stadium2_2.bin"
ELSE
INCBIN "misc/stadium2_1.bin"
ENDC

View File

@ -16333,7 +16333,11 @@ Function11c000:: ; 11c000
push af push af
ld a, $3 ld a, $3
ld [rSVBK], a ld [rSVBK], a
IF DEF(CRYSTAL11)
ld hl, wd10a
ELSE
ld hl, wd105 ld hl, wd105
ENDC
ld a, [hl] ld a, [hl]
dec a dec a
ld e, a ld e, a
@ -24067,7 +24071,11 @@ GFX_172f1f:
INCBIN "gfx/unknown/172f1f.2bpp" INCBIN "gfx/unknown/172f1f.2bpp"
Tilemap_1733af: Tilemap_1733af:
IF DEF(CORRUPT_TILES)
INCBIN "gfx/unknown/1733af_corrupt.tilemap"
ELSE
INCBIN "gfx/unknown/1733af.tilemap" INCBIN "gfx/unknown/1733af.tilemap"
ENDC
Attrmap_173517: Attrmap_173517:
INCBIN "gfx/unknown/173517.attrmap" INCBIN "gfx/unknown/173517.attrmap"

BIN
misc/stadium2_2.bin Normal file

Binary file not shown.

View File

@ -872,7 +872,11 @@ wc7e0:: ds 1
wc7e1:: ds 1 wc7e1:: ds 1
wc7e2:: ds 1 wc7e2:: ds 1
wc7e3:: ds 1 wc7e3:: ds 1
wc7e4:: ds 4 wc7e4:: ds 1
IF DEF(CRYSTAL11)
wPokedexStatus::
ENDC
ds 3
wc7e8:: ds 24 wc7e8:: ds 24
@ -1165,7 +1169,9 @@ CurSpecies:: ; cf60
wcf61:: ds 2 wcf61:: ds 2
wcf63:: ds 1 wcf63:: ds 1
wcf64:: ds 1 wcf64:: ds 1
IF !DEF(CRYSTAL11)
wPokedexStatus:: wPokedexStatus::
ENDC
wcf65:: ds 1 wcf65:: ds 1
wcf66:: ds 1 wcf66:: ds 1

3
wram11.asm Normal file
View File

@ -0,0 +1,3 @@
CRYSTAL11 = 1
INCLUDE "wram.asm"