Initial commit

This commit is contained in:
Háčky 2014-11-21 10:46:12 +00:00
parent 92c6af6c35
commit 2375d2c8db
206 changed files with 8443 additions and 1 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.bin
*.gbc
*.o
*.tx
*.z80

View File

@ -1,2 +1,6 @@
pokecarde
Pokémon Card e
=========
This is a disassembly of the e-Reader cards released for Pokémon Ruby and Sapphire. Currently, it includes the English release of the Pokémon Battle e series, and the Eon Ticket.
RGBDS is needed to compile the Z80 binary for each card. To build a working e-Reader card, you will need to compress the binary with nevpk and add the card metadata with nedcenc—both tools are from the nedclib package, which is unfortunately Windows-only.

2
battle-e/08-A001.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/devin.bin", "sprites/trainers/cooltrainer_m.4bpp"

2
battle-e/08-A002.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/goro.bin", "sprites/trainers/ninja_boy.4bpp"

2
battle-e/08-A003.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/sonya.bin", "sprites/trainers/tuber_f.4bpp"

2
battle-e/08-A004.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/antonio.bin", "sprites/trainers/gentleman.4bpp"

2
battle-e/08-A005.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/alana.bin", "sprites/trainers/pokefan_f.4bpp"

2
battle-e/08-A006.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/renee.bin", "sprites/trainers/picnicker.4bpp"

2
battle-e/08-A007.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/sophie.bin", "sprites/trainers/lady.4bpp"

2
battle-e/08-A008.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/fay.bin", "sprites/trainers/beauty.4bpp"

2
battle-e/08-A009.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/natasha.bin", "sprites/trainers/psychic_f.4bpp"

2
battle-e/08-A010.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/patrick.bin", "sprites/trainers/camper.4bpp"

2
battle-e/08-A011.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/oscar.bin", "sprites/trainers/sailor.4bpp"

2
battle-e/08-A012.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/tyler.bin", "sprites/trainers/pokemaniac.4bpp"

2
battle-e/08-A013.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/rudy.bin", "sprites/trainers/youngster.4bpp"

2
battle-e/08-A014.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/ellie.bin", "sprites/trainers/beauty.4bpp"

2
battle-e/08-A015.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/candice.bin", "sprites/trainers/pkmn_breeder_f.4bpp"

2
battle-e/08-A016.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/belford.bin", "sprites/trainers/cooltrainer_m.4bpp"

2
battle-e/08-A017.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/clayton.bin", "sprites/trainers/pkmn_ranger_m.4bpp"

2
battle-e/08-A018.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/dustin.bin", "sprites/trainers/triathlete_m_swim.4bpp"

2
battle-e/08-A019.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/hugo.bin", "sprites/trainers/hiker.4bpp"

2
battle-e/08-A020.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/jeffrey.bin", "sprites/trainers/youngster.4bpp"

2
battle-e/08-A021.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/logan.bin", "sprites/trainers/ruin_maniac.4bpp"

2
battle-e/08-A022.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/maggie.bin", "sprites/trainers/pokefan_f.4bpp"

2
battle-e/08-A023.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/wilson.bin", "sprites/trainers/pkmn_breeder_m.4bpp"

2
battle-e/08-A024.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/zuril.bin", "sprites/trainers/ruin_maniac.4bpp"

2
battle-e/08-A025.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/mandy.bin", "sprites/trainers/school_kid_f.4bpp"

2
battle-e/08-A026.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/sofia.bin", "sprites/trainers/parasol_lady.4bpp"

2
battle-e/08-A027.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/hillary.bin", "sprites/trainers/lady.4bpp"

2
battle-e/08-A028.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/dominic.bin", "sprites/trainers/guitarist.4bpp"

2
battle-e/08-A029.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/bryce.bin", "sprites/trainers/fisherman.4bpp"

2
battle-e/08-A030.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/irvin.bin", "sprites/trainers/bug_maniac.4bpp"

2
battle-e/08-A031.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/natalie.bin", "sprites/trainers/battle_girl.4bpp"

2
battle-e/08-A032.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/sandia.bin", "sprites/trainers/expert_f.4bpp"

2
battle-e/08-A033.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/marcus.bin", "sprites/trainers/expert_m.4bpp"

2
battle-e/08-A034.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/raquel.bin", "sprites/trainers/cooltrainer_f.4bpp"

2
battle-e/08-A035.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/tsutomu.bin", "sprites/trainers/black_belt.4bpp"

2
battle-e/08-A036.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/justine.bin", "sprites/trainers/pokefan_f.4bpp"

2
battle-e/08-A037.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/heather.bin", "sprites/trainers/pkmn_ranger_f.4bpp"

2
battle-e/08-A038.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/judith.bin", "sprites/trainers/psychic_f.4bpp"

2
battle-e/08-A039.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/stuart.bin", "sprites/trainers/collector.4bpp"

2
battle-e/08-A040.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/irazu.bin", "sprites/trainers/pkmn_ranger_m.4bpp"

2
battle-e/08-A041.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/sandy.bin", "sprites/trainers/picnicker.4bpp"

2
battle-e/08-A042.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/annie.bin", "sprites/trainers/swimmer_f.4bpp"

2
battle-e/08-A043.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/celina.bin", "sprites/trainers/hex_maniac.4bpp"

2
battle-e/08-A044.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/april.bin", "sprites/trainers/aroma_lady.4bpp"

2
battle-e/08-A045.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/hayden.bin", "sprites/trainers/guitarist.4bpp"

2
battle-e/08-A046.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/griffin.bin", "sprites/trainers/psychic_m.4bpp"

2
battle-e/08-A047.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/kendall.bin", "sprites/trainers/pokefan_m.4bpp"

2
battle-e/08-A048.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "battletrainer.tx"
BattleTrainer "trainers/fuego.bin", "sprites/trainers/cooltrainer_m.4bpp"

2
battle-e/08-K001.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "enigmaberry.tx"
EnigmaBerry "berries/pumkin.bin"

2
battle-e/08-K002.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "enigmaberry.tx"
EnigmaBerry "berries/drash.bin"

2
battle-e/08-K003.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "enigmaberry.tx"
EnigmaBerry "berries/chilan.bin"

2
battle-e/08-K004.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "enigmaberry.tx"
EnigmaBerry "berries/strib.bin"

2
battle-e/08-K005.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "enigmaberry.tx"
EnigmaBerry "berries/eggant.bin"

2
battle-e/08-K006.asm Normal file
View File

@ -0,0 +1,2 @@
INCLUDE "enigmaberry.tx"
EnigmaBerry "berries/nutpea.bin"

34
battle-e/Makefile Normal file
View File

@ -0,0 +1,34 @@
all: 08-A001.z80 08-A002.z80 08-A003.z80 08-A004.z80 \
08-A005.z80 08-A006.z80 08-A007.z80 08-A008.z80 \
08-A009.z80 08-A010.z80 08-A011.z80 08-A012.z80 \
08-A013.z80 08-A014.z80 08-A015.z80 08-A016.z80 \
08-A017.z80 08-A018.z80 08-A019.z80 08-A020.z80 \
08-A021.z80 08-A022.z80 08-A023.z80 08-A024.z80 \
08-A025.z80 08-A026.z80 08-A027.z80 08-A028.z80 \
08-A029.z80 08-A030.z80 08-A031.z80 08-A032.z80 \
08-A033.z80 08-A034.z80 08-A035.z80 08-A036.z80 \
08-A037.z80 08-A038.z80 08-A039.z80 08-A040.z80 \
08-A041.z80 08-A042.z80 08-A043.z80 08-A044.z80 \
08-A045.z80 08-A046.z80 08-A047.z80 08-A048.z80 \
08-K001.z80 08-K002.z80 08-K003.z80 08-K004.z80 \
08-K005.z80 08-K006.z80
%.tx: %.asm
python ../scripts/charmap.py $< $@
08-A%.o: 08-A%.asm battletrainer.tx
rgbasm -o $@ $<
08-K%.o: 08-K%.asm enigmaberry.tx
rgbasm -o $@ $<
%.gbc: %.o
rgblink -o $@ $<
# hack to use RGBDS for something other than its intended purpose
08-A%.z80: 08-A%.gbc
dd if=$< of=$@ bs=1 skip=256 count=6815
# cmp -b ../z80/$@ $@
08-K%.z80: 08-K%.gbc
dd if=$< of=$@ bs=1 skip=256 count=3578
# cmp -b ../z80/$@ $@
clean:
rm -f *.z80 *.tx *.o *.gbc

205
battle-e/battletrainer.asm Normal file
View File

@ -0,0 +1,205 @@
INCLUDE "../macros.asm"
BattleTrainer: MACRO
SECTION "battletrainer",ROM0[$100]
jp Start
db $00
BattleTrainerBackdrop: ; 104
INCBIN "sprites/battletrainer.4bpp"
DoorSprite: ; 604
INCBIN "sprites/trainerdoor.4bpp"
BackdropPalettes: ; A04
INCLUDE "sprites/battletrainer1.pal"
INCLUDE "sprites/battletrainer2.pal"
INCLUDE "sprites/battletrainer3.pal"
INCLUDE "sprites/battletrainer4.pal"
TrainerPalette: ; A6C
INCLUDE "sprites/battletrainer5.pal"
DoorPalette: ; A74
INCLUDE "sprites/trainerdoor.pal"
BackdropTilemap: ; A7C
INCBIN "sprites/battletrainer.tilemap"
Prologue: ; 0DFC
Insert_Prologue $12345678, "カ。ドE@", REGION_EN ; corrupted カードe “Card e”
DataPacket: ; 0E38
Insert_Header REGION_EN
db BATTLE_TRAINER
GBAPTR DataPacket, TrainerData ; $02000018
dw $0002
TrainerData: ; 0E50
INCBIN \1
REPT 44
db 0 ; pads the data to 256 bytes
ENDR
TrainerSprite: ; 0F38
INCBIN \2
TrainerSpriteData: ; 1738
dw TrainerSprite
dw TrainerPalette
db $08,$08,$01,$01,$01,$01,$01
INCLUDE "../common/mem_struct.asm"
BackdropSpriteData: ; 1777
dw BattleTrainerBackdrop
dw BackdropPalettes
dw BackdropTilemap
db $28,$00,$04,$00
DoorSpriteData: ; 1781
dw DoorSprite
dw DoorPalette
db $04,$08,$01,$01,$01,$01,$01
Instructions1: ; 178c
db "Link e-Reader to Pokémon Ruby or \n"
db "Sapphire and select MYSTERY EVENTS\n"
db "on the game's main menu.\n"
db "Press the B Button to cancel.\0"
Instructions2: ; 1808
db "Press the A Button on the Game Boy\n"
db "Advance containing Pokémon Ruby or\n"
db "Sapphire to begin the Battle Entry.\0"
BattleEntryInProcess: ; 1872
db "Battle Entry in Process...\0"
BattleEntryFinished: ; 188d
db "Battle Entry finished!\n"
db "\n"
db "Press the A Button to resend.\n"
db "Press the B Button to cancel.\0"
INCLUDE "../common/battle_e_transfer.asm"
Open_Doors: ; 1946
ld l, $20
push hl
ld bc, $0040
ld de, $0048
LD_HL_IND LeftDoorSpriteHandle
API $03B
pop bc
ld l, $20
push hl
ld bc, $0040
ld de, $00A8
LD_HL_IND RightDoorSpriteHandle
API $03B
pop bc
ret
Close_Doors: ; 1965
ld l, $20
push hl
ld bc, $0040
ld de, $0068
LD_HL_IND LeftDoorSpriteHandle
API $03B
pop bc
ld l, $20
push hl
ld bc, $0040
ld de, $0088
LD_HL_IND RightDoorSpriteHandle
API $03B
pop bc
ret
Start: ; 1984
API_121
LoadCustomBackground BackdropSpriteData, 0
ld hl, $0000
push hl
ld bc, $1e06
ld de, $000e
xor a
API $02C
pop bc
LoadCustomBackground BackdropSpriteData, 1
API_02C $1e06, $000e, $01
pop bc
API_02C $0808, $0B04, $00
pop bc
ld a, $4
API $0AE
CreateCustomSprite TrainerSpriteHandle, $80, TrainerSpriteData
SetSpritePos TrainerSpriteHandle, 119, 64
CreateCustomSprite LeftDoorSpriteHandle, $81, DoorSpriteData
CreateCustomSprite RightDoorSpriteHandle, $81, DoorSpriteData
SpriteMirrorToggle $01, LeftDoorSpriteHandle
SetSpritePos LeftDoorSpriteHandle, 104, 64
SetSpritePos RightDoorSpriteHandle, 136, 64
CreateRegion RegionHandlePtr, 30, 6, 0, 14, 0, 3
ld h, a
ld l, $00
SetTextSize
API_09B RegionHandlePtr, $0102
SetTextColor RegionHandlePtr, 3, 0
FadeIn 16
wait 16
API $0C6
DrawText RegionHandlePtr, Instructions1, 8, 4
API $08D
INCLUDE "../common/wait_for_link.asm"
call Open_Doors
DrawText RegionHandlePtr, Instructions2, 8, 4
API $08D
and [hl]
ld [bc], a
UNKNOWN_VALUE EQU $02A6
INCLUDE "../common/wait_for_ready.asm"
call Close_Doors
DrawText RegionHandlePtr, BattleEntryInProcess, 8, 4
DATA_TRANSFER_LENGTH EQU 6144
INCLUDE "../common/transfer_data.asm"
ld hl, $5fff
LD_IND_HL Space_1
API_0C7 Space_1
LD_HL_IND TrainerSpriteHandle
API $047
wait 128
call Open_Doors
DrawText RegionHandlePtr, BattleEntryFinished, 8, 4
API $08D
ld c, a
nop
INCLUDE "../common/wrap_up.asm"
INCLUDE "../common/word_shift_right.asm"
SomeVar1: ds 1 ; 1B9F
SomeVar2: ds 2 ; 1BA0
RegionHandlePtr: ds 1 ; 1BA2
LeftDoorSpriteHandle: ds 2 ; 1BA3
RightDoorSpriteHandle: ds 2 ; 1BA5
TrainerSpriteHandle: ds 2 ; 1BA7
ENDM

19
battle-e/berries/Makefile Normal file
View File

@ -0,0 +1,19 @@
all: chilan.bin drash.bin eggant.bin nutpea.bin pumkin.bin strib.bin
%.1: %.asm
python ../../scripts/charmap.py $< $@
%.2: %.1
rgbasm -o $@ $<
%.3: %.2
rgblink -o $@ $<
%.4: %.3
dd if=$< of=$@ bs=1 skip=256 count=1324
%.bin: %.4
python ../../scripts/berrychecksum.py $< $@
clean:
rm -f *.bin

View File

@ -0,0 +1,24 @@
INCLUDE "macros.asm"
Berry "CHILAN"
db SOFT
Size 27,2
Yield_Range 1, 2
REPT 8
db 0
ENDR
db 1 ; hours per growth stage
db 30,0,30,0,0 ; flavor
db 85 ; smoothness
db 0
BerrySprite:
INCBIN "../sprites/berries/chilan.4bpp"
BerryPalette:
INCLUDE "../sprites/berries/chilan.pal"
Tag_Text "This sparse BERRY grows quickly."
Tag_Text "Its skin is quite tough."
REPT 22
db 0 ; Pokéblock ingredient only
ENDR

View File

@ -0,0 +1,24 @@
INCLUDE "macros.asm"
Berry "DRASH"
db VERY_HARD
Size 13,4
Yield_Range 2, 3
db 0,0,0,0,0,0,0,0
db 18 ; hours per growth stage
db 0,0,40,0,0 ; flavor
db 65 ; smoothness
db 0
BerrySprite:
INCBIN "../sprites/berries/drash.4bpp"
BerryPalette:
INCLUDE "../sprites/berries/drash.pal"
Tag_Text "When it ripens, this sweet BERRY"
Tag_Text "falls and sticks into the ground."
db 0,0,0
db $10 ; cures poison
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0
db $04 ; self-cures poison
db 0,0,0

View File

@ -0,0 +1,24 @@
INCLUDE "macros.asm"
Berry "EGGANT"
db SOFT
Size 4,1
Yield_Range 2, 3
db 0,0,0,0, 0,0,0,0
db 18 ; hours per growth stage
db 0,40,0,0,0 ; flavor
db 65 ; smoothness
db 0
BerrySprite:
INCBIN "../sprites/berries/eggant.4bpp"
BerryPalette:
INCLUDE "../sprites/berries/eggant.pal"
Tag_Text "Very dry tasting, especially the"
Tag_Text "parts not exposed to the sun."
db 0,0,0
db $00
db 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0
db $1C ; self-cure infatuation
db 0,0,0

View File

@ -0,0 +1,37 @@
RGB: MACRO
dw \1 | (\2 << 5) | (\3 << 10)
ENDM
Berry: MACRO
Section "berry",ROM0[$100]
db \1
REPT 7 - STRLEN(\1)
db $FF
ENDR
ENDM
; firmness
VERY_SOFT EQU 1
SOFT EQU 2
HARD EQU 3
VERY_HARD EQU 4
SUPER_HARD EQU 5
Yield_Range: MACRO
db \2, \1
ENDM
Size: MACRO
dw \1 * 10 + \2
ENDM
; this cant be used because RGBDS has no reliable way of putting null bytes in strings
;Tag_Text: MACRO
; db \1
; db $FF
; REPT 44 - STRLEN(\1)
; db 0
; ENDR
; ENDM
Tag_Text EQUS "db"

View File

@ -0,0 +1,23 @@
INCLUDE "macros.asm"
Berry "NUTPEA"
db SUPER_HARD
Size 12,4
Yield_Range 1, 3
db 0,0,0,0,0,0,0,0
db 18 ; hours per growth stage
db 10,10,10,10,10 ; flavor
db 5 ; smoothness
db 0
BerrySprite:
INCBIN "../sprites/berries/nutpea.4bpp"
BerryPalette:
INCLUDE "../sprites/berries/nutpea.pal"
Tag_Text "This BERRY is rigid and cracks open"
Tag_Text "when the center is squeezed."
REPT 22
db 0 ; Pokéblock ingredient only
ENDR

View File

@ -0,0 +1,24 @@
INCLUDE "macros.asm"
Berry "PUMKIN"
db SUPER_HARD
Size 4,8
Yield_Range 2, 3
db 0,0,0,0,0,0,0,0
db 18 ; hours per growth stage
db 0,0,0,0,40 ; flavor
db 65 ; smoothness
db 0
BerrySprite:
INCBIN "../sprites/berries/pumkin.4bpp"
BerryPalette:
INCLUDE "../sprites/berries/pumkin.pal"
Tag_Text "This BERRY is amazingly sour."
Tag_Text "Its heavy due to its dense filling."
db 0,0,0
db $04 ; cures freeze
db 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0
db $06 ; self-cures freeze
db 0,0,0

View File

@ -0,0 +1,22 @@
INCLUDE "macros.asm"
Berry "STRIB"
db HARD
Size 12,2
Yield_Range 4, 12
db 0,0,0,0,0,0,0,0
db 24 ; hours per growth stage
db 30,0,0,30,0 ; flavor
db 85 ; smoothness
db 0
BerrySprite:
INCBIN "../sprites/berries/strib.4bpp"
BerryPalette:
INCLUDE "../sprites/berries/strib.pal"
Tag_Text "It grows slowly, but abundantly."
Tag_Text "Makes a soothing sound when shaken."
REPT 22
db 0 ; Pokéblock ingredient only
ENDR

140
battle-e/enigmaberry.asm Normal file
View File

@ -0,0 +1,140 @@
INCLUDE "../macros.asm"
INCLUDE "macros.asm"
EnigmaBerry: MACRO
SECTION "drashberry",ROM0[$100]
jp Start
db $00
UnknownPalette:
RGB 18, 0, 0
RGB 0, 0, 0
RGB 31, 31, 31
RGB 15, 31, 31
RGB 6, 15, 29
BackgroundSprite:
INCBIN "sprites/berrybackdrop.4bpp"
BackgroundTilemap:
INCBIN "sprites/berrybackdrop.tilemap"
BackgroundPalette:
INCLUDE "sprites/berrybackdrop.pal"
REPT 72
db 0
ENDR
Prologue:
Insert_Prologue $12345678, "カ。ドE@", REGION_EN ; corrupted カードe “Card e”
DataPacket:
Insert_Header REGION_EN
db CUSTOM_BERRY
GBAPTR DataPacket, BerryData
dw $0002
BerryData:
INCBIN \1
db 0,0
INCLUDE "../common/mem_struct.asm"
BackgroundSpriteData:
dw BackgroundSprite, BackgroundPalette, BackgroundTilemap
db $05,$00,$01,$00
BerrySpriteData:
dw (BerryData+$1C),(BerryData+$49C)
db $06,$06,$01,$01,$01,$01,$01
Instructions1: ; B65
db "Link e-Reader to Pokémon Ruby or \n"
db "Sapphire and select MYSTERY EVENTS\n"
db "on the game's main menu.\n"
db "Press the B Button to cancel.\0"
Instructions2: ; BE1
db "Press the A Button on the Game Boy\n"
db "Advance containing Pokémon Ruby or\n"
db "Sapphire to send a BERRY.\0"
BerrySendingInProcess: ; C41
db "BERRY sending in Process...\0"
ABerryWasSent: ; C5D
db "A BERRY was sent.\n"
db "\n"
db "Press the A Button to resend.\n"
db "Press the B Button to cancel.\0"
INCLUDE "../common/battle_e_transfer.asm"
AfterTransfer:
ld hl, $5FFF
LD_IND_HL Space_1
ld hl, Space_1
API $0C7
wait $01
ret
Start:
API_121
LoadCustomBackground BackgroundSpriteData, 0
API_02C $1E06, $000E, 0
pop bc
CreateCustomSprite SpriteHandlePtr, $80, BerrySpriteData
SetSpritePos SpriteHandlePtr, 376, 56
CreateRegion RegionHandlePtr, 30, 6, 0, 14, 0, 4
ld h, a
ld l, $00
SetTextSize
API_09B RegionHandlePtr, $0102
SetTextColor RegionHandlePtr, 2, 0
SetRegionColor RegionHandlePtr, 0
SetBackgroundPalette $10, $0040, UnknownPalette
FadeIn 16
wait 16
API $0C6
DrawText RegionHandlePtr, Instructions1, 8, 4
API $08D
INCLUDE "../common/wait_for_link.asm"
API_084 SpriteHandlePtr, 120, 56, 16 ; sprite move and fade in?
pop bc
API $08D
push af
nop
DrawText RegionHandlePtr, Instructions2, 8, 4
UNKNOWN_VALUE EQU $00F5
INCLUDE "../common/wait_for_ready.asm"
DrawText RegionHandlePtr, BerrySendingInProcess, 8, 4
DATA_TRANSFER_LENGTH EQU 3072
INCLUDE "../common/transfer_data.asm"
call AfterTransfer
wait 128
API $08D
ld c, a
nop
API_084 SpriteHandlePtr, $FF78, 56, 16 ; sprite move and fade out?
pop bc
DrawText RegionHandlePtr, ABerryWasSent, 8, 4
INCLUDE "../common/wrap_up.asm"
INCLUDE "../common/word_shift_right.asm"
SomeVar1: ds 1 ; EFA
SomeVar2: ds 2 ; EFB
RegionHandlePtr: ds 1 ; EFD
SpriteHandlePtr: ds 2 ; EFE
ENDM

24
battle-e/macros.asm Normal file
View File

@ -0,0 +1,24 @@
INCLUDE "../constants/abilities.asm"
INCLUDE "../constants/items.asm"
INCLUDE "../constants/moves.asm"
INCLUDE "../constants/pokemon.asm"
INCLUDE "../constants/trainerclasses.asm"
MOSSDEEP_BATTLE EQU 0
LEVEL: MACRO
dw \1
ENDM
EVs: MACRO
db \1, \2, \3, \4, \5, \6
ENDM
OT: MACRO
dw \1, \2
ENDM
IVs: MACRO
dw \1 + (\2 << 5) + (\3 << 10) + ((\4 & 1) << 15)
dw (\4 >> 1) + (\5 << 4) + (\6 << 9) + (\7 << 15)
ENDM
PV: MACRO
dw (\1 & $FFFF), (\1 >> 16)
ENDM

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 0, 0, 0
RGB 0, 31, 0
RGB 0, 27, 0
RGB 0, 23, 0
RGB 0, 19, 0
RGB 0, 15, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0

View File

@ -0,0 +1,16 @@
RGB 0, 0, 0
RGB 7, 23, 31
RGB 3, 19, 27
RGB 0, 15, 23
RGB 0, 11, 19
RGB 0, 9, 17
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0

View File

@ -0,0 +1,16 @@
RGB 0, 0, 0
RGB 31, 5, 5
RGB 25, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0

View File

@ -0,0 +1,4 @@
RGB 0, 0, 0
RGB 25, 19, 0
RGB 0, 0, 0
RGB 31, 31, 31

View File

@ -0,0 +1,4 @@
RGB 0, 0, 0
RGB 0, 31, 0
RGB 0, 11, 19
RGB 0, 0, 0

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 18, 30, 30
RGB 14, 18, 11
RGB 30, 22, 12
RGB 30, 13, 9
RGB 30, 5, 6
RGB 26, 6, 5
RGB 22, 7, 4
RGB 18, 8, 3
RGB 14, 10, 3
RGB 22, 27, 12
RGB 29, 24, 13
RGB 24, 19, 11
RGB 19, 15, 10
RGB 14, 11, 9
RGB 10, 8, 6
RGB 18, 22, 11

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 24, 30, 30
RGB 31, 24, 25
RGB 30, 20, 22
RGB 30, 16, 19
RGB 28, 11, 14
RGB 23, 9, 11
RGB 17, 5, 6
RGB 31, 28, 27
RGB 25, 21, 15
RGB 26, 31, 15
RGB 22, 28, 13
RGB 18, 25, 11
RGB 14, 22, 9
RGB 10, 19, 8
RGB 10, 13, 8
RGB 10, 19, 8

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 24, 24, 24
RGB 27, 31, 31
RGB 23, 28, 31
RGB 20, 24, 29
RGB 17, 21, 27
RGB 14, 18, 26
RGB 11, 15, 24
RGB 8, 12, 23
RGB 5, 8, 17
RGB 28, 29, 20
RGB 20, 28, 11
RGB 15, 24, 9
RGB 10, 20, 8
RGB 5, 16, 6
RGB 7, 11, 5
RGB 8, 11, 9

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 18, 30, 30
RGB 31, 31, 27
RGB 30, 30, 15
RGB 30, 29, 15
RGB 27, 25, 13
RGB 24, 21, 12
RGB 18, 15, 12
RGB 31, 27, 27
RGB 26, 24, 13
RGB 22, 20, 11
RGB 18, 16, 9
RGB 15, 12, 8
RGB 23, 29, 18
RGB 18, 24, 16
RGB 13, 17, 13
RGB 0, 0, 0

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 18, 30, 30
RGB 31, 31, 27
RGB 30, 30, 21
RGB 30, 29, 15
RGB 27, 25, 13
RGB 24, 22, 12
RGB 16, 17, 8
RGB 31, 25, 17
RGB 31, 20, 11
RGB 31, 15, 5
RGB 25, 11, 4
RGB 20, 8, 3
RGB 14, 26, 18
RGB 10, 22, 15
RGB 16, 14, 8
RGB 0, 0, 0

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 24, 31, 31
RGB 31, 31, 31
RGB 30, 31, 27
RGB 29, 31, 23
RGB 28, 31, 19
RGB 24, 29, 16
RGB 20, 27, 13
RGB 16, 25, 10
RGB 12, 23, 7
RGB 11, 19, 5
RGB 10, 15, 3
RGB 9, 12, 1
RGB 23, 29, 16
RGB 19, 25, 14
RGB 15, 21, 12
RGB 11, 17, 10

Binary file not shown.

View File

@ -0,0 +1,16 @@
RGB 0, 0, 0
RGB 6, 18, 21
RGB 9, 20, 22
RGB 15, 23, 25
RGB 19, 25, 26
RGB 23, 27, 28
RGB 27, 29, 30
RGB 16, 24, 23
RGB 13, 27, 27
RGB 20, 29, 29
RGB 18, 26, 26
RGB 23, 30, 30
RGB 31, 31, 31
RGB 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0

Binary file not shown.

View File

@ -0,0 +1 @@


View File

@ -0,0 +1,4 @@
RGB 0, 0, 0
RGB 7, 23, 31
RGB 0, 11, 19
RGB 0, 0, 0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More