Conflicts:
	engine/battle/1c.asm
This commit is contained in:
U-Fish-PC\Daniel 2014-05-30 13:17:47 -04:00
commit 286c160c27
83 changed files with 348 additions and 368 deletions

109
Makefile
View file

@ -1,94 +1,81 @@
PYTHON := python
MD5 := md5sum -c --quiet
.SUFFIXES:
.SUFFIXES: .asm .tx .o .gbc
.PHONY: all clean red blue compare pngs
.PHONY: all clean red blue yellow compare
.PRECIOUS: %.2bpp
.SECONDEXPANSION:
POKEMONTOOLS := extras/pokemontools
GFX := $(PYTHON) $(POKEMONTOOLS)/gfx.py
PIC := $(PYTHON) $(POKEMONTOOLS)/pic.py
INCLUDES := $(PYTHON) $(POKEMONTOOLS)/scan_includes.py
PREPROCESS := $(PYTHON) prequeue.py
poketools := extras/pokemontools
gfx := $(PYTHON) $(poketools)/gfx.py
pic := $(PYTHON) $(poketools)/pic.py
includes := $(PYTHON) $(poketools)/scan_includes.py
pre := $(PYTHON) prequeue.py
TEXTQUEUE :=
RED_OBJS := \
pokered.o \
audio_red.o \
wram.o \
text.o
versions := red blue yellow
BLUE_OBJS := \
pokeblue.o \
audio_blue.o \
wram.o \
text.o
$(foreach ver, $(versions), \
$(eval $(ver)_asm := $(shell find $(ver) -iname '*.asm')) \
$(eval $(ver)_obj := $($(ver)_asm:.asm=.o)) \
$(eval all_obj += $($(ver)_obj)) \
)
$(foreach obj, $(all_obj), \
$(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \
)
OBJS := $(RED_OBJS) $(BLUE_OBJS)
OBJS := $(sort $(OBJS))
ROMS := pokered.gbc pokeblue.gbc
roms := pokered.gbc pokeblue.gbc
# object dependencies
$(shell $(foreach obj, $(OBJS), $(eval $(obj:.o=)_DEPENDENCIES := $(shell $(INCLUDES) $(obj:.o=.asm)))))
all: $(roms)
red: pokered.gbc
blue: pokeblue.gbc
yellow: pokeyellow.gbc
all: $(ROMS)
red: pokered.gbc
blue: pokeblue.gbc
compare:
@md5sum -c --quiet roms.md5
@$(MD5) roms.md5
clean:
rm -f $(ROMS)
rm -f $(OBJS)
find . -iname '*.tx' -exec rm {} +
find gfx -iname '*.[12]bpp' -exec rm {} +
find pic -iname '*.pic' -exec rm {} +
find pic -iname '*.2bpp' -exec rm {} +
rm -f redrle
redrle: extras/redtools/redrle.c
${CC} -o $@ $<
rm -f $(roms) $(all_obj)
find . \( -iname '*.tx' -o -iname '*.1bpp' -o -iname '*.2bpp' -o -iname '*.pic' \) -exec rm {} +
%.asm: ;
.asm.tx:
$(eval TEXTQUEUE += $<)
%.tx: %.asm
$(eval txq += $<)
@rm -f $@
$(OBJS): $$*.tx $$(patsubst %.asm, %.tx, $$($$*_DEPENDENCIES))
@$(PREPROCESS) $(TEXTQUEUE)
@$(eval TEXTQUEUE :=)
@$(GFX) 2bpp $(2BPPQUEUE)
@$(eval 2BPPQUEUE :=)
@$(GFX) 1bpp $(1BPPQUEUE)
@$(eval 1BPPQUEUE :=)
@$(PIC) compress $(PICQUEUE)
@$(eval PICQUEUE :=)
$(all_obj): $$*.tx $$(patsubst %.asm, %.tx, $$($$*_dep))
@$(pre) $(txq); $(eval txq :=)
@$(gfx) 2bpp $(2bppq); $(eval 2bppq :=)
@$(gfx) 1bpp $(1bppq); $(eval 1bppq :=)
@$(pic) compress $(picq); $(eval picq :=)
rgbasm -o $@ $*.tx
OPTIONS = -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03
link := rgblink -n $*.sym -m $*.map
dmg_opt := -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03
cgb_opt := -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03
pokered.gbc: $(RED_OBJS)
rgblink -n $*.sym -m $*.map -o $@ $^
rgbfix $(OPTIONS) -t "POKEMON RED" $@
pokered.gbc: $(red_obj)
$(link) -o $@ $^
rgbfix $(dmg_opt) -t "POKEMON RED" $@
pokeblue.gbc: $(BLUE_OBJS)
rgblink -n $*.sym -m $*.map -o $@ $^
rgbfix $(OPTIONS) -t "POKEMON BLUE" $@
pokeblue.gbc: $(blue_obj)
$(link) -o $@ $^
rgbfix $(dmg_opt) -t "POKEMON BLUE" $@
pokeyellow.gbc: $(yellow_obj)
$(link) -o $@ $^
rgbfix $(cgb_opt) -t "POKEMON YELLOW" $@
%.2bpp: %.png
$(eval 2BPPQUEUE += $<)
$(eval 2bppq += $<)
@rm -f $@
%.1bpp: %.png
$(eval 1BPPQUEUE += $<)
$(eval 1bppq += $<)
@rm -f $@
%.pic: %.2bpp
$(eval PICQUEUE += $<)
%.pic: %.2bpp
$(eval picq += $<)
@rm -f $@

2
blue/text.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "blue.asm"
INCLUDE "text.asm"

2
blue/wram.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "blue.asm"
INCLUDE "wram.asm"

View file

@ -3,6 +3,7 @@ INCLUDE "version.asm"
INCLUDE "macros.asm"
INCLUDE "hram.asm"
INCLUDE "vram.asm"
INCLUDE "constants/hardware_constants.asm"
INCLUDE "constants/oam_constants.asm"

View file

@ -55,8 +55,8 @@ ENDC
SGBBorderGraphics: ; 72fe8 (1c:6fe8)
IF _RED
INCBIN "gfx/red/sgbborder.w128.2bpp"
INCBIN "gfx/red/sgbborder.2bpp"
ENDC
IF _BLUE
INCBIN "gfx/blue/sgbborder.w128.2bpp"
INCBIN "gfx/blue/sgbborder.2bpp"
ENDC

View file

@ -4,13 +4,13 @@ HallOfFameComputer: ; 7405c (1d:405c)
ld c, $64
call DelayFrames
call DisableLCD
ld hl, $8800
ld bc, $400
ld hl, vFont
ld bc, $800 / 2
call Func_74171
ld hl, $9600
ld bc, $100
ld hl, vChars2 + $600
ld bc, $200 / 2
call Func_74171
ld hl, $97e0
ld hl, vChars2 + $7e0
ld bc, $10
ld a, $ff
call FillMemory
@ -66,16 +66,16 @@ DisplayCreditsMon: ; 740cb (1d:40cb)
ld hl,Coord
call GetMonHeader
call LoadFrontSpriteByMonIndex
ld hl,$980C
ld hl,vBGMap0 + $c
call Func_74164
xor a
ld [H_AUTOBGTRANSFERENABLED],a
call LoadScreenTilesFromBuffer1
ld hl,$9800
ld hl,vBGMap0
call Func_74164
ld a,$A7
ld [$FF4B],a
ld hl,$9C00
ld hl,vBGMap1
call Func_74164
call FillMiddleOfScreenWithWhite
ld a,$FC
@ -238,7 +238,7 @@ Credits: ; 7418e (1d:418e)
call FillMiddleOfScreenWithWhite
pop de
ld de, TheEndGfx
ld hl, $9600
ld hl, vChars2 + $600
ld bc, (BANK(TheEndGfx) << 8) + $0a
call CopyVideoData
FuncCoord 4, 8
@ -260,4 +260,4 @@ INCLUDE "data/credits_order.asm"
INCLUDE "text/credits_text.asm"
TheEndGfx: ; 7473e (1d:473e) ; 473E (473F on blue)
INCBIN "gfx/theend.w40.interleave.2bpp"
INCBIN "gfx/theend.interleave.2bpp"

View file

@ -45,9 +45,9 @@ Func_708ca: ; 708ca (1c:48ca)
jp ClearSprites
Func_7092a: ; 7092a (1c:492a)
ld de, $9000
ld hl, $8000
ld bc, $31
ld de, vFrontPic
ld hl, vSprites
ld bc, 7 * 7
call CopyVideoData
ld a, $10
ld [W_BASECOORDY], a ; wd082
@ -261,7 +261,7 @@ DungeonMaps2: ; 70a44 (1c:4a44)
db $FF
LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
ld hl, $8ff0
ld hl, vChars1 + $7f0
ld de, BattleTransitionTile
ld bc, (BANK(BattleTransitionTile) << 8) + $01
jp CopyVideoData

View file

@ -341,7 +341,7 @@ LoadAnimationTileset: ; 781d2 (1e:41d2)
ld e,a
ld a,[hl]
ld d,a ; de = address of tileset
ld hl,$8310 ; destination address in VRAM
ld hl,vSprites + $310
ld b, BANK(AnimationTileset1) ; ROM bank
ld a,[wd07d]
ld c,a ; number of tiles
@ -1960,17 +1960,17 @@ AnimationSlideMonHalfLeft: ; 79645 (1e:5645)
Func_79652: ; 79652 (1e:5652)
ld a, [H_WHOSETURN] ; $fff3
and a
ld hl, $9310
ld hl, vBackPic
jr z, .asm_7965d
ld hl, $9000
ld hl, vFrontPic
.asm_7965d
ld de, wTempPic
ld bc, $31
ld bc, 7 * 7
jp CopyVideoData
AnimationWavyScreen: ; 79666 (1e:5666)
; used in Psywave/Psychic etc.
ld hl, $9800
ld hl, vBGMap0
call Func_79e0d
call Delay3
xor a
@ -2005,7 +2005,7 @@ AnimationWavyScreen: ; 79666 (1e:5666)
ld [H_AUTOBGTRANSFERENABLED], a
call Delay3
call LoadScreenTilesFromBuffer2
ld hl, $9c00
ld hl, vBGMap1
call Func_79e0d
ret
@ -2751,22 +2751,22 @@ Unknown_79d63: ; 79d63 (1e:5d63)
db $00,$84,$06,$81,$02,$88,$01,$83,$05,$89,$09,$80,$07,$87,$03,$82,$04,$85,$08,$86
AnimationShakeEnemyHUD: ; 79d77 (1e:5d77)
ld de, $9310
ld hl, $8000
ld bc, $0031
ld de, vBackPic
ld hl, vSprites
ld bc, 7 * 7
call CopyVideoData
xor a
ld [$ffae], a
ld hl, $9800
ld hl, vBGMap0
call Func_79e0d
ld a, $90
ld [$ffb0], a
ld hl, $9b20
ld hl, vBGMap0 + $320
call Func_79e0d
ld a, $38
ld [$ffb0], a
call Func_792fd
ld hl, $9800
ld hl, vBGMap0
call Func_79e0d
call AnimationHideMonPic
call Delay3
@ -2776,17 +2776,17 @@ AnimationShakeEnemyHUD: ; 79d77 (1e:5d77)
call ClearSprites
ld a, $90
ld [$ffb0], a
ld hl, $9c00
ld hl, vBGMap1
call Func_79e0d
xor a
ld [$ffb0], a
call SaveScreenTilesToBuffer1
ld hl, $9800
ld hl, vBGMap0
call Func_79e0d
call ClearScreen
call Delay3
call LoadScreenTilesFromBuffer1
ld hl, $9c00
ld hl, vBGMap1
jp Func_79e0d
Func_79dda: ; 79dda (1e:5dda)

View file

@ -103,7 +103,7 @@ Func_3c04c: ; 3c04c (f:404c)
call DisableLCD
call LoadFontTilePatterns
call Func_3ee58
ld hl, $9800
ld hl, vBGMap0
ld bc, $400
.asm_3c06f
ld a, $7f
@ -113,7 +113,7 @@ Func_3c04c: ; 3c04c (f:404c)
or c
jr nz, .asm_3c06f
ld hl, wTileMap
ld de, $9800
ld de, vBGMap0
ld b, $12
.asm_3c07f
ld c, $14
@ -1462,7 +1462,7 @@ Func_3c92a: ; 3c92a (f:492a)
ld [wcf91],a
ld [wd0b5],a
call GetMonHeader
ld de,$9000
ld de,vFrontPic
call LoadMonFrontSprite
ld a,$CF
ld [$FFE1],a
@ -2400,7 +2400,7 @@ Func_3d119: ; 3d119 (f:5119)
ld [wcf91], a
ld [wd0b5], a
call GetMonHeader
ld de, $9000
ld de, vFrontPic
call LoadMonFrontSprite
jr .asm_3d187
.asm_3d182
@ -6288,17 +6288,17 @@ Func_3ec92: ; 3ec92 (f:6c92)
ld e, a
dec b
jr nz, .asm_3ecb2
ld de, $9310
ld de, vBackPic
call InterlaceMergeSpriteBuffers
ld a, $a
ld [$0], a
xor a
ld [$4000], a
ld hl, $8000
ld hl, vSprites
ld de, S_SPRITEBUFFER1
ld a, [H_LOADEDROMBANK]
ld b, a
ld c, $31
ld c, 7 * 7
call CopyVideoData
xor a
ld [$0], a
@ -6552,22 +6552,22 @@ Func_3ee5b: ; 3ee5b (f:6e5b)
add a
jr c, .asm_3ee7c
ld hl, BattleHudTiles1 ; $6080
ld de, $96d0
ld de, vChars2 + $6d0
ld bc, $18
ld a, BANK(BattleHudTiles1)
call FarCopyDataDouble
ld hl, BattleHudTiles2 ; $6098
ld de, $9730
ld de, vChars2 + $730
ld bc, $30
ld a, BANK(BattleHudTiles2)
jp FarCopyDataDouble
.asm_3ee7c
ld de, BattleHudTiles1 ; $6080
ld hl, $96d0
ld hl, vChars2 + $6d0
ld bc, (BANK(BattleHudTiles1) << 8) + $03
call CopyVideoDataDouble
ld de, BattleHudTiles2 ; $6098
ld hl, $9730
ld hl, vChars2 + $730
ld bc, (BANK(BattleHudTiles2) << 8) + $06
jp CopyVideoDataDouble
@ -6751,13 +6751,13 @@ InitWildBattle: ; 3ef8b (f:6f8b)
push af
ld a, MON_GHOST
ld [wcf91], a
ld de, $9000
ld de, vFrontPic
call LoadMonFrontSprite ; load ghost sprite
pop af
ld [wcf91], a
jr .spriteLoaded
.isNoGhost
ld de, $9000
ld de, vFrontPic
call LoadMonFrontSprite ; load mon sprite
.spriteLoaded
xor a
@ -6825,7 +6825,7 @@ _LoadTrainerPic: ; 3f04b (f:704b)
ld a, Bank(RedPicFront)
.loadSprite
call UncompressSpriteFromDE
ld de, $9000
ld de, vFrontPic
ld a, $77
ld c, a
jp LoadUncompressedSpriteData
@ -6930,9 +6930,9 @@ asm_3f0d0: ; 3f0d0 (f:70d0)
jr nz, .asm_3f0f4
ret
; loads back sprite of mon to $8000
; assumes the corresponding mon header is already loaded
LoadMonBackSprite: ; 3f103 (f:7103)
LoadMonBackSprite:
; Assumes the monster's attributes have
; been loaded with GetMonHeader.
ld a, [wcfd9]
ld [wcf91], a
FuncCoord 1, 5
@ -6944,10 +6944,10 @@ LoadMonBackSprite: ; 3f103 (f:7103)
call UncompressMonSprite
ld a, $3
call Predef ; indirect jump to ScaleSpriteByTwo (2fe40 (b:7e40))
ld de, $9310
ld de, vBackPic
call InterlaceMergeSpriteBuffers ; combine the two buffers to a single 2bpp sprite
ld hl, $8000
ld de, $9310
ld hl, vSprites
ld de, vBackPic
ld c, (2*SPRITEBUFFERSIZE)/16 ; count of 16-byte chunks to be copied
ld a, [H_LOADEDROMBANK]
ld b, a

View file

@ -1382,7 +1382,7 @@ DrawEnemyPokeballs: ; 0x3a857
LoadPartyPokeballGfx: ; 3a85d (e:685d)
ld de, PokeballTileGraphics ; $697e
ld hl, $8310
ld hl, vSprites + $310
ld bc, (BANK(PokeballTileGraphics) << 8) + $04
jp CopyVideoData

View file

@ -28,9 +28,9 @@ Func_7bde9: ; 7bde9 (1e:7de9)
ld [wcf91], a
ld [wd0b5], a
call Func_7beb9
ld de, $9000
ld hl, $9310
ld bc, $31
ld de, vFrontPic
ld hl, vBackPic
ld bc, 7 * 7
call CopyVideoData
ld a, [wHPBarMaxHP]
ld [wcf91], a

View file

@ -4,15 +4,15 @@ LoadShootingStarGraphics: ; 70000 (1c:4000)
ld a, $a4
ld [rOBP1], a ; $ff49
ld de, AnimationTileset2 + $30 ; $471e ; star tile (top left quadrant)
ld hl, $8a00
ld hl, vChars1 + $200
ld bc, (BANK(AnimationTileset2) << 8) + $01
call CopyVideoData
ld de, AnimationTileset2 + $130 ; $481e ; star tile (bottom left quadrant)
ld hl, $8a10
ld hl, vChars1 + $210
ld bc, (BANK(AnimationTileset2) << 8) + $01
call CopyVideoData
ld de, FallingStar ; $4190
ld hl, $8a20
ld hl, vChars1 + $220
ld bc, (BANK(FallingStar) << 8) + $01
call CopyVideoData
ld hl, GameFreakLogoOAMData ; $4140

View file

@ -6,7 +6,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
call LoadFontTilePatterns
call LoadTextBoxTilePatterns
call DisableLCD
ld hl, $9800
ld hl,vBGMap0
ld bc, $800
ld a, $7f
call FillMemory
@ -197,14 +197,14 @@ Func_7033e: ; 7033e (1c:433e)
ld de, $a000
ld bc, $310
call CopyData
ld de, $9000
ld de, vFrontPic
call InterlaceMergeSpriteBuffers
ld de, RedPicBack ; $7e0a
ld a, BANK(RedPicBack)
call UncompressSpriteFromDE
ld a, $3
call Predef ; indirect jump to ScaleSpriteByTwo (2fe40 (b:7e40))
ld de, $9310
ld de, vBackPic
call InterlaceMergeSpriteBuffers
ld c, $1

View file

@ -73,7 +73,7 @@ DisplayMonFrontSpriteInBox: ; 5dbd9 (17:5bd9)
ld a, [wcf91]
ld [wd0b5], a
call GetMonHeader
ld de, $8b10
ld de, vChars1 + $310
call LoadMonFrontSprite
ld a, $80
ld [$ffe1], a

View file

@ -199,7 +199,7 @@ Func_417c7: ; 417c7 (10:57c7)
ret
Func_417f0: ; 417f0 (10:57f0)
ld hl, $9c00
ld hl, vBGMap1
ld bc, $240
jr asm_417fe
@ -275,22 +275,22 @@ Func_41849: ; 41849 (10:5849)
LoadIntroGraphics: ; 41852 (10:5852)
ld hl, FightIntroBackMon ; $5a99
ld de, $9000
ld de, vChars2
ld bc, $600
ld a, BANK(FightIntroBackMon)
call FarCopyData2
ld hl, GameFreakIntro ; $5959
ld de, $9600
ld de, vChars2 + $600
ld bc, $140
ld a, BANK(GameFreakIntro)
call FarCopyData2
ld hl, GameFreakIntro ; $5959
ld de, $8800
ld de, vChars1
ld bc, $140
ld a, BANK(GameFreakIntro)
call FarCopyData2
ld hl, FightIntroFrontMon ; $6099
ld de, $8000
ld de, vChars0
ld bc, $6c0
ld a, BANK(FightIntroFrontMon)
jp FarCopyData2
@ -341,10 +341,10 @@ Func_418e9: ; 418e9 (10:58e9)
ld hl, Coord
ld c, $50
call Func_41807
ld hl, $9c00
ld hl, vBGMap1
ld c, $80
call Func_41807
ld hl, $9dc0
ld hl, vBGMap1 + $1c0
ld c, $80
jp Func_41807
@ -425,7 +425,7 @@ IntroNidorinoAnimation7: ; 41950 (10:5950)
db $50 ; list terminator
GameFreakIntro: ; 41959 (10:5959)
INCBIN "gfx/gamefreak_intro.h8.2bpp"
INCBIN "gfx/gamefreak_intro.2bpp"
INCBIN "gfx/gamefreak_logo.2bpp"
ds $10 ; blank tile

View file

@ -2,10 +2,10 @@
LoadPokedexTilePatterns: ; 17840 (5:7840)
call LoadHpBarAndStatusTilePatterns
ld de,PokedexTileGraphics ; $6488
ld hl,$9600
ld hl,vChars2 + $600
ld bc,(BANK(PokedexTileGraphics) << 8) + $12
call CopyVideoData
ld de,PokeballTileGraphics ; $697e
ld hl,$9720
ld hl,vChars2 + $720
ld bc,(BANK(PokeballTileGraphics) << 8) + $01
jp CopyVideoData ; load pokeball tile for marking caught mons

View file

@ -137,7 +137,7 @@ Func_214e8: ; 214e8 (8:54e8)
BillsPCMenu:
ld a, [wccd3]
ld [wCurrentMenuItem], a ; wCurrentMenuItem
ld hl, $9780
ld hl, vChars2 + $780
ld de, PokeballTileGraphics ; $697e
ld bc, (BANK(PokeballTileGraphics) << 8) + $01
call CopyVideoData

View file

@ -8,7 +8,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
set 6, [hl]
call DisableLCD
ld hl, CircleTile ; $7d88
ld de, $9700
ld de, vChars2 + $700
ld bc, $0010
ld a, BANK(CircleTile)
call FarCopyData2

View file

@ -325,7 +325,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
LoadEDTile: ; 675b (1:675b)
ld de, ED_Tile
ld hl, $8f00
ld hl, vFont + $700
ld bc, $1
jp CopyVideoDataDouble

View file

@ -545,39 +545,39 @@ DrawTrainerInfo: ; 1349a (4:749a)
FuncCoord 1,2
ld hl,Coord
call TrainerInfo_DrawVerticalLine
ld hl,$9070
ld de,$9000
ld bc,$01c0
ld hl,vChars2 + $70
ld de,vChars2
ld bc,$70 * 4
call CopyData
ld hl,TrainerInfoTextBoxTileGraphics ; $7b98 ; trainer info text box tile patterns
ld de,$9770
ld de,vChars2 + $770
ld bc,$0080
push bc
call TrainerInfo_FarCopyData
ld hl,BlankLeaderNames ; $7c28
ld de,$9600
ld de,vChars2 + $600
ld bc,$0170
call TrainerInfo_FarCopyData
pop bc
ld hl,BadgeNumbersTileGraphics ; $7d98 ; badge number tile patterns
ld de,$8d80
ld de,vChars1 + $580
call TrainerInfo_FarCopyData
ld hl,GymLeaderFaceAndBadgeTileGraphics ; $6a9e ; gym leader face and badge tile patterns
ld de,$9200
ld de,vChars2 + $200
ld bc,$0400
ld a,$03
call FarCopyData2
ld hl,TextBoxGraphics ; $6288
ld de,$00d0
add hl,de ; hl = colon tile pattern
ld de,$8d60
ld de,vChars1 + $560
ld bc,$0010
ld a,$04
push bc
call FarCopyData2
pop bc
ld hl,TrainerInfoTextBoxTileGraphics + $80 ; $7c18 ; background tile pattern
ld de,$8d70
ld de,vChars1 + $570
call TrainerInfo_FarCopyData
call EnableLCD
ld hl,wWhichTrade

View file

@ -21,19 +21,19 @@ StatusScreen: ; 12953 (4:6953)
call UpdateSprites ; move sprites (?)
call LoadHpBarAndStatusTilePatterns
ld de, BattleHudTiles1 ; $6080 ; source
ld hl, $96d0 ; dest
ld hl, vChars2 + $6d0 ; dest
ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8
call CopyVideoDataDouble ; ·│ :L and halfarrow line end
ld de, BattleHudTiles2 ; $6098
ld hl, $9780
ld hl, vChars2 + $780
ld bc, (BANK(BattleHudTiles2) << 8) + $01
call CopyVideoDataDouble ; │
ld de, BattleHudTiles3 ; $60b0
ld hl, $9760
ld hl, vChars2 + $760
ld bc, (BANK(BattleHudTiles3) << 8) + $02
call CopyVideoDataDouble ; ─┘
ld de, PTile
ld hl, $9720
ld hl, vChars2 + $720
ld bc,(BANK(PTile) << 8 | $01)
call CopyVideoDataDouble ; P (for PP), inline
ld a, [$ffd7]

View file

@ -156,142 +156,142 @@ MonPartySpritePointers: ; 717c0 (1c:57c0)
dw SlowbroSprite + $c0
db $40 / $10 ; 40 bytes
db BANK(SlowbroSprite)
dw $8000
dw vSprites
dw BallSprite
db $80 / $10 ; $80 bytes
db BANK(BallSprite)
dw $8040
dw vSprites + $40
dw ClefairySprite + $c0
db $40 / $10 ; $40 bytes
db BANK(ClefairySprite)
dw $80C0
dw vSprites + $c0
dw BirdSprite + $c0
db $40 / $10 ; $40 bytes
db BANK(BirdSprite)
dw $8100
dw vSprites + $100
dw SeelSprite
db $40 / $10 ; $40 bytes
db BANK(SeelSprite)
dw $8140
dw vSprites + $140
dw MonPartySprites + $40
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8180
dw vSprites + $180
dw MonPartySprites + $50
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $81A0
dw vSprites + $1a0
dw MonPartySprites + $60
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $81C0
dw vSprites + $1c0
dw MonPartySprites + $70
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $81E0
dw vSprites + $1e0
dw MonPartySprites + $80
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8200
dw vSprites + $200
dw MonPartySprites + $90
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8220
dw vSprites + $220
dw MonPartySprites + $A0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8240
dw vSprites + $240
dw MonPartySprites + $B0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8260
dw vSprites + $260
dw MonPartySprites + $100
db $40 / $10 ; $40 bytes
db BANK(MonPartySprites)
dw $8380
dw vSprites + $380
dw SlowbroSprite
db $40 / $10 ; $40 bytes
db BANK(SlowbroSprite)
dw $8400
dw vSprites + $400
dw BallSprite
db $80 / $10 ; $80 bytes
db BANK(BallSprite)
dw $8440
dw vSprites + $440
dw ClefairySprite
db $40 / $10 ; $40 bytes
db BANK(ClefairySprite)
dw $84C0
dw vSprites + $4c0
dw BirdSprite
db $40 / $10 ; $40 bytes
db BANK(BirdSprite)
dw $8500
dw vSprites + $500
dw SeelSprite + $C0
db $40 / $10 ; $40 bytes
db BANK(SeelSprite)
dw $8540
dw vSprites + $540
dw MonPartySprites
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8580
dw vSprites + $580
dw MonPartySprites + $10
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $85A0
dw vSprites + $5a0
dw MonPartySprites + $20
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $85C0
dw vSprites + $5c0
dw MonPartySprites + $30
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $85E0
dw vSprites + $5E0
dw MonPartySprites + $C0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8600
dw vSprites + $600
dw MonPartySprites + $D0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8620
dw vSprites + $620
dw MonPartySprites + $E0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8640
dw vSprites + $640
dw MonPartySprites + $F0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
dw $8660
dw vSprites + $660
dw MonPartySprites + $140
db $40 / $10 ; $40 bytes
db BANK(MonPartySprites)
dw $8780
dw vSprites + $780
Func_71868: ; 71868 (1c:5868)
push hl
@ -323,11 +323,11 @@ Func_71890: ; 71890 (1c:5890)
ld a, [wcf91]
call GetPartyMonSpriteID
push af
ld hl, $8000
ld hl, vSprites
call Func_718ac
pop af
add $54
ld hl, $8040
ld hl, vSprites + $40
call Func_718ac
xor a
ld [wcd5d], a

View file

@ -117,7 +117,7 @@ Func_61bc: ; 61bc (1:61bc)
ld c,4
call DelayFrames
ld de,RedSprite ; $4180
ld hl,$8000
ld hl,vSprites
ld bc,(BANK(RedSprite) << 8) | $0C
call CopyVideoData
ld de,ShrinkPic1
@ -219,9 +219,9 @@ IntroPredef3B: ; 62a4 (1:62a4)
call UncompressSpriteFromDE
ld hl,S_SPRITEBUFFER1
ld de,$A000
ld bc,$0310
ld bc,$310
call CopyData
ld de,$9000
ld de,vFrontPic
call InterlaceMergeSpriteBuffers
pop bc
ld a,c

View file

@ -80,22 +80,22 @@ AnimateCutTree: ; eff7 (3:6ff7)
cp $52
jr z, .asm_f020
ld de, Overworld_GFX + $2d0 ; $42d0 ; cuttable tree sprite top row
ld hl, $8fc0
ld hl, vChars1 + $7c0
ld bc, (BANK(Overworld_GFX) << 8) + $02
call CopyVideoData
ld de, Overworld_GFX + $3d0 ; $43d0 ; cuttable tree sprite bottom row
ld hl, $8fe0
ld hl, vChars1 + $7e0
ld bc, (BANK(Overworld_GFX) << 8) + $02
call CopyVideoData
jr asm_f055
.asm_f020
ld hl, $8fc0
ld hl, vChars1 + $7c0
call LoadCutTreeOAM
ld hl, $8fd0
ld hl, vChars1 + $7d0
call LoadCutTreeOAM
ld hl, $8fe0
ld hl, vChars1 + $7e0
call LoadCutTreeOAM
ld hl, $8ff0
ld hl, vChars1 + $7f0
call LoadCutTreeOAM
call asm_f055
ld hl, wOAMBuffer + $93

View file

@ -8,7 +8,7 @@ PrintEmotionBubble: ; 17c47 (5:7c47)
ld e, [hl]
inc hl
ld d, [hl]
ld hl, $8f80
ld hl, vChars1 + $780
ld bc, (BANK(EmotionBubblesPointerTable) << 8) + $04
call CopyVideoData
ld a, [wcfcb]
@ -65,4 +65,4 @@ EmotionBubblesOAM: ; 17cb5 (5:7cb5)
db $FA,$00,$FB,$00
EmotionBubbles: ; 17cbd (5:7cbd)
INCBIN "gfx/emotion_bubbles.w16.2bpp"
INCBIN "gfx/emotion_bubbles.2bpp"

View file

@ -1,6 +1,6 @@
AnimateHealingMachine: ; 70433 (1c:4433)
ld de, PokeCenterFlashingMonitorAndHealBall ; $44b7
ld hl, $87c0
ld hl, vChars0 + $7c0
ld bc, (BANK(PokeCenterFlashingMonitorAndHealBall) << 8) + $03
call CopyVideoData
ld hl, wcfcb

View file

@ -69,7 +69,7 @@ LedgeTiles: ; 1a6cf (6:66cf)
db $FF
LoadHoppingShadowOAM: ; 1a6f0 (6:66f0)
ld hl, $8ff0
ld hl, vChars1 + $7f0
ld de, LedgeHoppingShadow ; $6708
ld bc, (BANK(LedgeHoppingShadow) << 8) + $01
call CopyVideoDataDouble

View file

@ -126,7 +126,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
push af
push de
push bc
ld hl,$8000 ; VRAM base address
ld hl,vNPCSprites ; VRAM base address
ld bc,$c0 ; number of bytes per VRAM slot
ld a,[$ff8d]
cp a,11 ; is it a 4-tile sprite?
@ -141,12 +141,12 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
jr nz,.calculateVRAMAddrLoop
jr .loadStillTilePattern
.fourTileSpriteVRAMAddr
ld hl,$87c0 ; address for second 4-tile sprite
ld hl,vSprites + $7c0 ; address for second 4-tile sprite
ld a,[$ff8e] ; 4-tile sprite counter
and a ; is it the first 4-tile sprite?
jr nz,.loadStillTilePattern
; if it's the first 4-tile sprite
ld hl,$8780 ; address for first 4-tile sprite
ld hl,vSprites + $780 ; address for first 4-tile sprite
inc a
ld [$ff8e],a ; 4-tile sprite counter
.loadStillTilePattern

View file

@ -45,7 +45,7 @@ Func_70510: ; 70510 (1c:4510)
.asm_70568
pop hl
ld de, BirdSprite ; $4d80
ld hl, $8000
ld hl, vNPCSprites
ld bc, (BANK(BirdSprite) << 8) + $0c
call CopyVideoData
call Func_706d7
@ -244,11 +244,11 @@ Func_706ae: ; 706ae (1c:46ae)
Func_706d7: ; 706d7 (1c:46d7)
ld de, BirdSprite ; $4d80
ld hl, $8000
ld hl, vNPCSprites
ld bc, (BANK(BirdSprite) << 8) + $0c
call CopyVideoData
ld de, BirdSprite + $c0 ; $4e40 ; moving amination sprite
ld hl, $8800
ld hl, vNPCSprites2
ld bc, (BANK(BirdSprite) << 8) + $0c
jp CopyVideoData
@ -379,7 +379,7 @@ Func_707b6: ; 707b6 (1c:47b6)
ld hl, wd736
set 6, [hl]
ld de, RedSprite ; $4180
ld hl, $8000
ld hl, vNPCSprites
ld bc, (BANK(RedSprite) << 8) + $0c
call CopyVideoData
ld a, $4
@ -468,20 +468,20 @@ FishingRodGfxProperties: ; 70856 (1c:4856)
RedFishingTiles: ; 70866 (1c:4866)
dw RedFishingTilesFront
db $02, $1E
dw $8020
db 2, BANK(RedFishingTilesFront)
dw vNPCSprites + $20
dw RedFishingTilesBack
db $02, $1E
dw $8060
db 2, BANK(RedFishingTilesBack)
dw vNPCSprites + $60
dw RedFishingTilesSide
db $02, $1E
dw $80A0
db 2, BANK(RedFishingTilesSide)
dw vNPCSprites + $a0
dw RedFishingRodTiles
db $03, $1E
dw $8FD0
db 3, BANK(RedFishingRodTiles)
dw vNPCSprites2 + $7d0
_HandleMidJump: ; 7087e (1c:487e)
ld a, [wd714]

View file

@ -65,7 +65,7 @@ PointerTable_79fb0: ; 79fb0 (1e:5fb0)
dw Func_79337
LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
ld hl, $8fc0
ld hl, vChars1 + $7c0
ld c, $4
.loop
push bc

View file

@ -503,7 +503,7 @@ Func_7210b: ; 7210b (1c:610b)
call DisableLCD
ld a, $e4
ld [rBGP], a ; $ff47
ld de, $8800
ld de, vChars1
ld a, [wcf2d]
and a
jr z, .asm_72122
@ -513,7 +513,7 @@ Func_7210b: ; 7210b (1c:610b)
ld bc, $1000
call CopyData
.asm_72128
ld hl, $9800
ld hl, vBGMap0
ld de, $c
ld a, $80
ld c, $d

View file

@ -824,18 +824,18 @@ SlotMachine_37882: ; 37882 (d:7882)
LoadSlotMachineTiles: ; 378a8 (d:78a8)
call DisableLCD
ld hl, SlotMachineTiles2
ld de, $8000
ld bc, $01c0
ld de, vChars0
ld bc, $1c0
ld a, BANK(SlotMachineTiles2)
call FarCopyData2
ld hl, SlotMachineTiles1
ld de, $9000
ld bc, $0250
ld de, vChars2
ld bc, $250
ld a, BANK(SlotMachineTiles1)
call FarCopyData2
ld hl, SlotMachineTiles2
ld de, $9250
ld bc, $01c0
ld de, vChars2 + $250
ld bc, $1c0
ld a, BANK(SlotMachineTiles2)
call FarCopyData2
ld hl, SlotMachineMap

View file

@ -36,33 +36,33 @@ LoadTitlescreenGraphics: ; 42dd (1:42dd)
call DisableLCD
call LoadFontTilePatterns
ld hl, NintendoCopyrightLogoGraphics ; $60c8
ld de, $9410
ld de, vTitleLogo2 + $100
ld bc, $50
ld a, BANK(NintendoCopyrightLogoGraphics)
call FarCopyData2
ld hl, GamefreakLogoGraphics ; $61f8
ld de, $9460
ld de, vTitleLogo2 + $100 + $50
ld bc, $90
ld a, BANK(GamefreakLogoGraphics)
call FarCopyData2
ld hl, PokemonLogoGraphics ; $5380
ld de, $8800
ld de, vTitleLogo
ld bc, $600
ld a, BANK(PokemonLogoGraphics)
call FarCopyData2 ; first chunk
ld hl, PokemonLogoGraphics+$600 ; $5980
ld de, $9310
ld de, vTitleLogo2
ld bc, $100
ld a, BANK(PokemonLogoGraphics)
call FarCopyData2 ; second chunk
ld hl, Version_GFX ; $402f
IF _RED
ld de,$9600 ; where to put redgreenversion.2bpp in the VRAM
ld bc,$50 ; how big that file is
ld de,vChars2 + $600
ld bc,$50
ENDC
IF _BLUE
ld de,$9610 ; where to put blueversion.2bpp in the VRAM
ld bc,$40 ; how big that file is
ld de,vChars2 + $600 + $10
ld bc,$50 - $10
ENDC
ld a, BANK(Version_GFX)
@ -302,7 +302,7 @@ Func_44cf: ; 44cf (1:44cf)
Func_44dd: ; 44dd (1:44dd)
ld hl, PlayerCharacterTitleGraphics ; $66a8
ld de, $8000
ld de, vSprites
ld bc, $230
ld a, BANK(PlayerCharacterTitleGraphics)
call FarCopyData2
@ -338,7 +338,7 @@ Func_44dd: ; 44dd (1:44dd)
ret
Func_4519: ; 4519 (1:4519)
ld hl, $9800
ld hl, vBGMap0
ld bc, $800
ld a, $7f
jp FillMemory
@ -363,7 +363,7 @@ LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538)
LoadCopyrightTiles: ; 4541 (1:4541)
ld de, NintendoCopyrightLogoGraphics ; $60c8
ld hl, $9600
ld hl, vChars2 + $600
ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c
call CopyVideoData
FuncCoord 2, 7

View file

@ -19,7 +19,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
ld de, wTileMapBackup
ld bc, $10
call CopyData
ld hl, $8040
ld hl, vSprites + $40
ld de, TownMapCursor ; $4f40
ld bc, (BANK(TownMapCursor) << 8) + $04
call CopyVideoDataDouble
@ -143,11 +143,11 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
call LoadPlayerSpriteGraphics
call LoadFontTilePatterns
ld de, BirdSprite ; $4d80
ld hl, $8040
ld hl, vSprites + $40
ld bc, (BANK(BirdSprite) << 8) + $0c
call CopyVideoData
ld de, TownMapUpArrow ; $5093
ld hl, $8ed0
ld hl, vChars1 + $6d0
ld bc, (BANK(TownMapUpArrow) << 8) + $01
call CopyVideoDataDouble
call Func_71070
@ -294,12 +294,12 @@ LoadTownMap: ; 7109b (1c:509b)
call TextBoxBorder
call DisableLCD
ld hl, WorldMapTileGraphics ; $65a8
ld de, $9600
ld de, vChars2 + $600
ld bc, $100
ld a, BANK(WorldMapTileGraphics)
call FarCopyData2
ld hl, MonNestIcon ; $56be
ld de, $8040
ld de, vSprites + $40
ld bc, $8
ld a, BANK(MonNestIcon)
call FarCopyDataDouble

View file

@ -104,16 +104,16 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
call Func_41196
call DisableLCD
ld hl, TradingAnimationGraphics ; $69be
ld de, $9310
ld de, vChars2 + $310
ld bc, $310
ld a, BANK(TradingAnimationGraphics)
call FarCopyData2
ld hl, TradingAnimationGraphics2 ; $6cce
ld de, $87c0
ld de, vSprites + $7c0
ld bc, $40
ld a, BANK(TradingAnimationGraphics2)
call FarCopyData2
ld hl, $9800
ld hl, vBGMap0
ld bc, $800
ld a, $7f
call FillMemory
@ -220,7 +220,7 @@ Func_41298: ; 41298 (10:5298)
call CopyScreenTileBufferToVRAM
ld b, $8
call GoPAL_SET
ld hl, $9c8c
ld hl, vBGMap1 + $8c
call Func_414ae
ld a, $a0
ld [$ffae], a
@ -340,7 +340,7 @@ Func_41376: ; 41376 (10:5376)
call Func_4142d
call Func_41186
call Func_4149f
ld hl, $9c8c
ld hl, vBGMap1 + $8c
call Func_414ae
ld b, $6
call Func_414c5
@ -371,7 +371,7 @@ Func_413c6: ; 413c6 (10:53c6)
call Func_4145c
call Func_41186
call Func_4149f
ld hl, $9c94
ld hl, vBGMap1 + $94
call Func_414ae
call Func_41525
ld b, $6
@ -492,7 +492,7 @@ Func_414ae: ; 414ae (10:54ae)
call ScheduleRowRedrawHelper
pop hl
ld a, h
ld [$ffd2], a
ld [H_SCREENEDGEREDRAWADDR + 1], a
ld a, l
ld [H_SCREENEDGEREDRAWADDR], a ; $ffd1
ld a, $2

View file

Before

Width:  |  Height:  |  Size: 924 B

After

Width:  |  Height:  |  Size: 924 B

View file

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 136 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View file

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 149 B

View file

Before

Width:  |  Height:  |  Size: 719 B

After

Width:  |  Height:  |  Size: 719 B

View file

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 147 B

View file

Before

Width:  |  Height:  |  Size: 297 B

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

View file

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 926 B

View file

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 145 B

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 139 B

After

Width:  |  Height:  |  Size: 139 B

View file

Before

Width:  |  Height:  |  Size: 1,022 B

After

Width:  |  Height:  |  Size: 1,022 B

View file

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 928 B

View file

Before

Width:  |  Height:  |  Size: 899 B

After

Width:  |  Height:  |  Size: 899 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 966 B

After

Width:  |  Height:  |  Size: 966 B

View file

Before

Width:  |  Height:  |  Size: 960 B

After

Width:  |  Height:  |  Size: 960 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1,011 B

After

Width:  |  Height:  |  Size: 1,011 B

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 845 B

After

Width:  |  Height:  |  Size: 845 B

View file

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 865 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 272 B

View file

@ -1032,8 +1032,8 @@ LoadTilesetTilePatternData:: ; 09e8 (0:09e8)
ld l,a
ld a,[W_TILESETGFXPTR + 1]
ld h,a
ld de,$9000
ld bc,$0600
ld de,vTileset
ld bc,$600
ld a,[W_TILESETBANK]
jp FarCopyData2
@ -2165,17 +2165,17 @@ RunMapScript:: ; 101b (0:101b)
LoadWalkingPlayerSpriteGraphics:: ; 104d (0:104d)
ld de,RedSprite ; $4180
ld hl,$8000
ld hl,vNPCSprites
jr LoadPlayerSpriteGraphicsCommon
LoadSurfingPlayerSpriteGraphics:: ; 1055 (0:1055)
ld de,SeelSprite
ld hl,$8000
ld hl,vNPCSprites
jr LoadPlayerSpriteGraphicsCommon
LoadBikePlayerSpriteGraphics:: ; 105d (0:105d)
ld de,RedCyclingSprite
ld hl,$8000
ld hl,vNPCSprites
LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063)
push de
@ -2508,17 +2508,17 @@ LoadMapData:: ; 1241 (0:1241)
call LoadCurrentMapView
; copy current map view to VRAM
ld hl,wTileMap
ld de,$9800
ld b,$12
ld de,vBGMap0
ld b,18
.vramCopyLoop
ld c,$14
ld c,20
.vramCopyInnerLoop
ld a,[hli]
ld [de],a
inc e
dec c
jr nz,.vramCopyInnerLoop
ld a,$0c
ld a,32 - 20
add e
ld e,a
jr nc,.noCarry
@ -2749,7 +2749,7 @@ LoadFrontSpriteByMonIndex:: ; 1389 (0:1389)
ret
.validDexNumber
push hl
ld de, $9000
ld de, vFrontPic
call LoadMonFrontSprite
pop hl
ld a, [H_LOADEDROMBANK]
@ -4795,7 +4795,7 @@ UpdateMovingBgTiles::
cp 21
jr z, .flower
ld hl, $9140
ld hl, vTileset + $14 * $10
ld c, $10
ld a, [wd085]
@ -4839,7 +4839,7 @@ UpdateMovingBgTiles::
jr z, .copy
ld hl, FlowerTile3
.copy
ld de, $9030
ld de, vTileset + $3 * $10
ld c, $10
.loop
ld a, [hli]
@ -4938,9 +4938,9 @@ rLCDC_DEFAULT EQU %11100011
ld a, $ff
ld [$ffaa], a
ld h, $9800 / $100 ; bg map 0
ld h, vBGMap0 / $100
call ClearBgMap
ld h, $9c00 / $100 ; bg map 1
ld h, vBGMap1 / $100
call ClearBgMap
ld a, rLCDC_DEFAULT
@ -8471,13 +8471,13 @@ LoadFontTilePatterns:: ; 3680 (0:3680)
jr nz,.lcdEnabled
.lcdDisabled
ld hl,FontGraphics
ld de,$8800
ld de,vFont
ld bc,$400
ld a,BANK(FontGraphics)
jp FarCopyDataDouble ; if LCD is off, transfer all at once
.lcdEnabled
ld de,FontGraphics
ld hl,$8800
ld hl,vFont
ld bc,(BANK(FontGraphics) << 8 | $80)
jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank
@ -8488,13 +8488,13 @@ LoadTextBoxTilePatterns:: ; 36a0 (0:36a0)
jr nz,.lcdEnabled
.lcdDisabled
ld hl,TextBoxGraphics
ld de,$9600
ld bc,$0200
ld de,vChars2 + $600
ld bc,$200
ld a,BANK(TextBoxGraphics)
jp FarCopyData2 ; if LCD is off, transfer all at once
.lcdEnabled
ld de,TextBoxGraphics
ld hl,$9600
ld hl,vChars2 + $600
ld bc,(BANK(TextBoxGraphics) << 8 | $20)
jp CopyVideoData ; if LCD is on, transfer during V-blank
@ -8505,13 +8505,13 @@ LoadHpBarAndStatusTilePatterns:: ; 36c0 (0:36c0)
jr nz,.lcdEnabled
.lcdDisabled
ld hl,HpBarAndStatusGraphics
ld de,$9620
ld bc,$01e0
ld de,vChars2 + $620
ld bc,$1e0
ld a,BANK(HpBarAndStatusGraphics)
jp FarCopyData2 ; if LCD is off, transfer all at once
.lcdEnabled
ld de,HpBarAndStatusGraphics
ld hl,$9620
ld hl,vChars2 + $620
ld bc,(BANK(HpBarAndStatusGraphics) << 8 | $1e)
jp CopyVideoData ; if LCD is on, transfer during V-blank

View file

@ -500,7 +500,7 @@ INCLUDE "engine/cable_club.asm"
LoadTrainerInfoTextBoxTiles: ; 5ae6 (1:5ae6)
ld de, TrainerInfoTextBoxTileGraphics ; $7b98
ld hl, $9760
ld hl, vChars2 + $760
ld bc, (BANK(TrainerInfoTextBoxTileGraphics) << 8) +$09
jp CopyVideoData
@ -3044,7 +3044,7 @@ DrawBadges: ; ea03 (3:6a03)
db $20, $28, $30, $38, $40, $48, $50, $58
GymLeaderFaceAndBadgeTileGraphics: ; ea9e (3:6a9e)
INCBIN "gfx/badges.w16.2bpp"
INCBIN "gfx/badges.2bpp"
Func_ee9e: ; ee9e (3:6e9e)
call GetPredefRegisters
@ -4687,15 +4687,15 @@ SnorlaxSprite: INCBIN "gfx/sprites/snorlax.2bpp"
OldAmberSprite: INCBIN "gfx/sprites/old_amber.2bpp"
LyingOldManSprite: INCBIN "gfx/sprites/lying_old_man.2bpp"
PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.w128.2bpp"
FontGraphics: INCBIN "gfx/font.w128.1bpp"
PokemonLogoGraphics: INCBIN "gfx/pokemon_logo.2bpp"
FontGraphics: INCBIN "gfx/font.1bpp"
ABTiles: INCBIN "gfx/AB.2bpp"
HpBarAndStatusGraphics: INCBIN "gfx/hp_bar_and_status.2bpp"
BattleHudTiles1: INCBIN "gfx/battle_hud1.1bpp"
BattleHudTiles2: INCBIN "gfx/battle_hud2.1bpp"
BattleHudTiles3: INCBIN "gfx/battle_hud3.1bpp"
NintendoCopyrightLogoGraphics: INCBIN "gfx/copyright.h8.2bpp"
GamefreakLogoGraphics: INCBIN "gfx/gamefreak.h8.2bpp"
NintendoCopyrightLogoGraphics: INCBIN "gfx/copyright.2bpp"
GamefreakLogoGraphics: INCBIN "gfx/gamefreak.2bpp"
TextBoxGraphics: INCBIN "gfx/text_box.2bpp"
PokedexTileGraphics: INCBIN "gfx/pokedex.2bpp"
WorldMapTileGraphics: INCBIN "gfx/town_map.2bpp"
@ -6343,23 +6343,23 @@ INCLUDE "engine/hidden_object_functions18.asm"
SECTION "bank19",ROMX,BANK[$19]
Overworld_GFX: INCBIN "gfx/tilesets/overworld.w128.t2.2bpp"
Overworld_GFX: INCBIN "gfx/tilesets/overworld.t2.2bpp"
Overworld_Block: INCBIN "gfx/blocksets/overworld.bst"
RedsHouse1_GFX:
RedsHouse2_GFX: INCBIN "gfx/tilesets/reds_house.w128.t7.2bpp"
RedsHouse2_GFX: INCBIN "gfx/tilesets/reds_house.t7.2bpp"
RedsHouse1_Block:
RedsHouse2_Block: INCBIN "gfx/blocksets/reds_house.bst"
House_GFX: INCBIN "gfx/tilesets/house.w128.t2.2bpp"
House_GFX: INCBIN "gfx/tilesets/house.t2.2bpp"
House_Block: INCBIN "gfx/blocksets/house.bst"
Mansion_GFX: INCBIN "gfx/tilesets/mansion.w128.t2.2bpp"
Mansion_GFX: INCBIN "gfx/tilesets/mansion.t2.2bpp"
Mansion_Block: INCBIN "gfx/blocksets/mansion.bst"
ShipPort_GFX: INCBIN "gfx/tilesets/ship_port.w128.t2.2bpp"
ShipPort_GFX: INCBIN "gfx/tilesets/ship_port.t2.2bpp"
ShipPort_Block: INCBIN "gfx/blocksets/ship_port.bst"
Interior_GFX: INCBIN "gfx/tilesets/interior.w128.t1.2bpp"
Interior_GFX: INCBIN "gfx/tilesets/interior.t1.2bpp"
Interior_Block: INCBIN "gfx/blocksets/interior.bst"
Plateau_GFX: INCBIN "gfx/tilesets/plateau.w128.t10.2bpp"
Plateau_GFX: INCBIN "gfx/tilesets/plateau.t10.2bpp"
Plateau_Block: INCBIN "gfx/blocksets/plateau.bst"
@ -6369,50 +6369,50 @@ INCLUDE "engine/battle/1a.asm"
Version_GFX:
IF _RED
INCBIN "gfx/red/redgreenversion.h8.1bpp" ; 10 tiles
INCBIN "gfx/red/redgreenversion.1bpp" ; 10 tiles
ENDC
IF _BLUE
INCBIN "gfx/blue/blueversion.h8.1bpp" ; 8 tiles
INCBIN "gfx/blue/blueversion.1bpp" ; 8 tiles
ENDC
Dojo_GFX:
Gym_GFX: INCBIN "gfx/tilesets/gym.w128.2bpp"
Gym_GFX: INCBIN "gfx/tilesets/gym.2bpp"
Dojo_Block:
Gym_Block: INCBIN "gfx/blocksets/gym.bst"
Mart_GFX:
Pokecenter_GFX: INCBIN "gfx/tilesets/pokecenter.w128.2bpp"
Pokecenter_GFX: INCBIN "gfx/tilesets/pokecenter.2bpp"
Mart_Block:
Pokecenter_Block: INCBIN "gfx/blocksets/pokecenter.bst"
ForestGate_GFX:
Museum_GFX:
Gate_GFX: INCBIN "gfx/tilesets/gate.w128.t1.2bpp"
Gate_GFX: INCBIN "gfx/tilesets/gate.t1.2bpp"
ForestGate_Block:
Museum_Block:
Gate_Block: INCBIN "gfx/blocksets/gate.bst"
Forest_GFX: INCBIN "gfx/tilesets/forest.w128.2bpp"
Forest_GFX: INCBIN "gfx/tilesets/forest.2bpp"
Forest_Block: INCBIN "gfx/blocksets/forest.bst"
Facility_GFX: INCBIN "gfx/tilesets/facility.w128.2bpp"
Facility_GFX: INCBIN "gfx/tilesets/facility.2bpp"
Facility_Block: INCBIN "gfx/blocksets/facility.bst"
SECTION "bank1B",ROMX,BANK[$1B]
Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.w128.t4.2bpp"
Cemetery_GFX: INCBIN "gfx/tilesets/cemetery.t4.2bpp"
Cemetery_Block: INCBIN "gfx/blocksets/cemetery.bst"
Cavern_GFX: INCBIN "gfx/tilesets/cavern.w128.t14.2bpp"
Cavern_GFX: INCBIN "gfx/tilesets/cavern.t14.2bpp"
Cavern_Block: INCBIN "gfx/blocksets/cavern.bst"
Lobby_GFX: INCBIN "gfx/tilesets/lobby.w128.t2.2bpp"
Lobby_GFX: INCBIN "gfx/tilesets/lobby.t2.2bpp"
Lobby_Block: INCBIN "gfx/blocksets/lobby.bst"
Ship_GFX: INCBIN "gfx/tilesets/ship.w128.t6.2bpp"
Ship_GFX: INCBIN "gfx/tilesets/ship.t6.2bpp"
Ship_Block: INCBIN "gfx/blocksets/ship.bst"
Lab_GFX: INCBIN "gfx/tilesets/lab.w128.t4.2bpp"
Lab_GFX: INCBIN "gfx/tilesets/lab.t4.2bpp"
Lab_Block: INCBIN "gfx/blocksets/lab.bst"
Club_GFX: INCBIN "gfx/tilesets/club.w128.t5.2bpp"
Club_GFX: INCBIN "gfx/tilesets/club.t5.2bpp"
Club_Block: INCBIN "gfx/blocksets/club.bst"
Underground_GFX: INCBIN "gfx/tilesets/underground.w128.t7.2bpp"
Underground_GFX: INCBIN "gfx/tilesets/underground.t7.2bpp"
Underground_Block: INCBIN "gfx/blocksets/underground.bst"

2
red/text.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "red.asm"
INCLUDE "text.asm"

2
red/wram.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "red.asm"
INCLUDE "wram.asm"

View file

@ -329,9 +329,9 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7)
ld [wSpriteStateData1 + 2], a
ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET
cp FACILITY
ld hl, SpinnerArrowTilePointers1 ; $5023
ld hl, FacilitySpinnerArrows ; $5023
jr z, .asm_44ff6
ld hl, SpinnerArrowTilePointers2 ; $5053
ld hl, GymSpinnerArrows ; $5053
.asm_44ff6
ld a, [wcd38]
bit 0, a
@ -368,87 +368,41 @@ LoadSpinnerArrowTiles: ; 44fd7 (11:4fd7)
jr nz, .asm_45006
ret
SpinnerArrowTilePointers1: ; 45023 (11:5023)
dw SpinnerArrowAnimTiles ;address from within tileset graphics
db 1 ;number of tiles to copy?
db BANK(SpinnerArrowAnimTiles) ;bank of tileset graphics
dw $9200 ;where to load in VRAM
spinner: MACRO
; \1: source
; \2: offset (BANK() chokes on literals)
; \3: length
; \4: dest
dw \1 + \2
db \3, BANK(\1)
dw \4
ENDM
dw SpinnerArrowAnimTiles + $10
db 1
db BANK(SpinnerArrowAnimTiles)
dw $9210
FacilitySpinnerArrows:
FACILITY_SPINNER EQU $20 * $10
vFacilitySpinner EQU vTileset + FACILITY_SPINNER
dw SpinnerArrowAnimTiles + $20
db 1
db BANK(SpinnerArrowAnimTiles)
dw $9300
spinner SpinnerArrowAnimTiles, $00, 1, vFacilitySpinner
spinner SpinnerArrowAnimTiles, $10, 1, vFacilitySpinner + $10
spinner SpinnerArrowAnimTiles, $20, 1, vFacilitySpinner + $100
spinner SpinnerArrowAnimTiles, $30, 1, vFacilitySpinner + $110
spinner Facility_GFX, FACILITY_SPINNER + $000, 1, vFacilitySpinner
spinner Facility_GFX, FACILITY_SPINNER + $010, 1, vFacilitySpinner + $10
spinner Facility_GFX, FACILITY_SPINNER + $100, 1, vFacilitySpinner + $100
spinner Facility_GFX, FACILITY_SPINNER + $110, 1, vFacilitySpinner + $110
dw SpinnerArrowAnimTiles + $30
db 1
db BANK(SpinnerArrowAnimTiles)
dw $9310
GymSpinnerArrows:
GYM_SPINNER EQU $3c * $10
vGymSpinner EQU vTileset + GYM_SPINNER
dw Facility_GFX + $200
db 1
db BANK(Facility_GFX)
dw $9200
dw Facility_GFX + $210
db 1
db BANK(Facility_GFX)
dw $9210
dw Facility_GFX + $300
db 1
db BANK(Facility_GFX)
dw $9300
dw Facility_GFX + $310
db 1
db BANK(Facility_GFX)
dw $9310
SpinnerArrowTilePointers2: ; 45053 (11:5053)
dw SpinnerArrowAnimTiles + $10
db 1
db BANK(SpinnerArrowAnimTiles)
dw $93C0
dw SpinnerArrowAnimTiles + $30
db 1
db BANK(SpinnerArrowAnimTiles)
dw $93D0
dw SpinnerArrowAnimTiles
db 1
db BANK(SpinnerArrowAnimTiles)
dw $94C0
dw SpinnerArrowAnimTiles + $20
db 1
db BANK(SpinnerArrowAnimTiles)
dw $94D0
dw Gym_GFX + $3C0
db 1
db BANK(Facility_GFX)
dw $93C0
dw Gym_GFX + $3D0
db 1
db BANK(Facility_GFX)
dw $93D0
dw Gym_GFX + $4C0
db 1
db BANK(Facility_GFX)
dw $94C0
dw Gym_GFX + $4D0
db 1
db BANK(Facility_GFX)
dw $94D0
spinner SpinnerArrowAnimTiles, $10, 1, vGymSpinner
spinner SpinnerArrowAnimTiles, $30, 1, vGymSpinner + $10
spinner SpinnerArrowAnimTiles, $00, 1, vGymSpinner + $100
spinner SpinnerArrowAnimTiles, $20, 1, vGymSpinner + $110
spinner Gym_GFX, GYM_SPINNER + $000, 1, vGymSpinner
spinner Gym_GFX, GYM_SPINNER + $010, 1, vGymSpinner + $10
spinner Gym_GFX, GYM_SPINNER + $100, 1, vGymSpinner + $100
spinner Gym_GFX, GYM_SPINNER + $110, 1, vGymSpinner + $110
SpinnerPlayerFacingDirections: ; 45083 (11:5083)
; This isn't the order of the facing directions. Rather, it's a list of

View file

@ -184,7 +184,7 @@ VermilionDock_1dc94: ; 1dc94 (7:5c94)
ld bc, $00b4
ld a, $14
call FillMemory
ld hl, $9940
ld hl, vBGMap0 + 10 * 32
ld de, wcc5b
ld bc, $000c
call CopyVideoData

21
vram.asm Normal file
View file

@ -0,0 +1,21 @@
vChars0 EQU $8000
vChars1 EQU $8800
vChars2 EQU $9000
vBGMap0 EQU $9800
vBGMap1 EQU $9c00
; Battle/Menu
vSprites EQU vChars0
vFont EQU vChars1
vFrontPic EQU vChars2
vBackPic EQU vFrontPic + 7 * 7 * $10
; Overworld
vNPCSprites EQU vChars0
vNPCSprites2 EQU vChars1
vTileset EQU vChars2
; Title
vTitleLogo EQU vChars1
vTitleLogo2 EQU vFrontPic + 7 * 7 * $10

1
yellow.asm Normal file
View file

@ -0,0 +1 @@
_YELLOW EQU 1

2
yellow/audio.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "yellow.asm"
INCLUDE "audio.asm"

2
yellow/main.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "yellow.asm"
INCLUDE "main.asm"

2
yellow/text.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "yellow.asm"
INCLUDE "text.asm"

2
yellow/wram.asm Normal file
View file

@ -0,0 +1,2 @@
INCLUDE "yellow.asm"
INCLUDE "wram.asm"