summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-09-10 22:40:33 -0700
committerYamaArashi <shadow962@live.com>2016-09-10 22:40:33 -0700
commit0f2e0c96a733bbceb8ea8f0e1d40796695ecf2fa (patch)
tree98f7613d7eb9bc3265fe2f56625884edd70e8250
parente090eef838387bd8b3ebc78ddd9d6c97f249b84a (diff)
build revision 1 and 2
-rw-r--r--Makefile49
-rw-r--r--asm/rom5.s105
-rw-r--r--asm/rom_803D1FC.s57
-rw-r--r--asm/rom_header.s6
-rw-r--r--data/data2.s4
-rw-r--r--data/decorations.s4
-rw-r--r--data/event_scripts.s6
-rw-r--r--data/graphics.s8
-rw-r--r--data/pokedex_entries.s33
-rw-r--r--data/text/cable_club.s4
-rw-r--r--data/text/tv.s4
-rw-r--r--fonts.mk6
-rw-r--r--graphics/fonts/font3_lat_rev1.pngbin0 -> 3709 bytes
-rw-r--r--graphics/fonts/font4_lat_rev1.pngbin0 -> 2195 bytes
-rw-r--r--include/fonts/font0_widths.h22
-rw-r--r--include/fonts/font1_widths.h20
-rw-r--r--include/fonts/font3_widths.h22
-rw-r--r--include/fonts/font4_widths.h20
-rw-r--r--rom_rev1.sha12
-rw-r--r--rom_rev2.sha12
-rw-r--r--src/text.c4
21 files changed, 358 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 4c56371c7..45ccea20e 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,8 @@ SCANINC := tools/scaninc/scaninc
PREPROC := tools/preproc/preproc
+REVISION := 0
+
# Clear the default suffixes.
.SUFFIXES:
@@ -33,7 +35,9 @@ PREPROC := tools/preproc/preproc
.PRECIOUS: %.1bpp %.4bpp %.8bpp %.gbapal %.lz %.rl %.pcm %.bin
-.PHONY: all clean compare ruby sapphire
+.PHONY: all clean tidy compare ruby sapphire \
+rev1 ruby_rev1 sapphire_rev1 compare_rev1 \
+rev2 ruby_rev2 sapphire_rev2 compare_rev2
C_SRCS := $(wildcard src/*.c)
C_OBJS := $(C_SRCS:%.c=%.o)
@@ -64,10 +68,41 @@ ruby: pokeruby.gba
sapphire: pokesapphire.gba
@:
+rev1: REVISION := 1
+rev1: all
+ @:
+
+ruby_rev1: REVISION := 1
+ruby_rev1: ruby
+ @:
+
+sapphire_rev1: REVISION := 1
+sapphire_rev1: sapphire
+ @:
+
+rev2: REVISION := 2
+rev2: all
+ @:
+
+ruby_rev2: REVISION := 2
+ruby_rev2: ruby
+ @:
+
+sapphire_rev2: REVISION := 2
+sapphire_rev2: sapphire
+ @:
+
# For contributors to make sure a change didn't affect the contents of the ROM.
+
compare: all
@$(SHA1) rom.sha1
+compare_rev1: rev1
+ @$(SHA1) rom_rev1.sha1
+
+compare_rev2: rev2
+ @$(SHA1) rom_rev2.sha1
+
clean:
rm -f $(ROM) $(ELF) $(OBJS) $(pokeruby_OBJS) $(pokesapphire_OBJS) $(C_SRCS:%.c=%.i) pokeruby.map pokesapphire.map
rm -f sound/programmable_wave_samples/*.bin sound/direct_sound_samples/*.bin sound/**/*.pcm
@@ -112,12 +147,12 @@ src/text_ruby.o src/text_sapphire.o: src/text.c $(GEN_FONT_HEADERS)
src/link_ruby.o src/link_sapphire.o: src/link.c $(GEN_LINK_HEADERS)
src/%_ruby.o: src/%.c
- @$(CPP) $(CPPFLAGS) -D RUBY $< -o src/$*_ruby.i
+ @$(CPP) $(CPPFLAGS) -D RUBY -D REVISION=$(REVISION) $< -o src/$*_ruby.i
@$(PREPROC) src/$*_ruby.i charmap.txt | $(CC1) $(CFLAGS) -o src/$*_ruby.s
@printf ".text\n\t.align\t2, 0\n" >> src/$*_ruby.s
$(AS) $(ASFLAGS) -o $@ src/$*_ruby.s
src/%_sapphire.o: src/%.c
- @$(CPP) $(CPPFLAGS) -D SAPPHIRE $< -o src/$*_sapphire.i
+ @$(CPP) $(CPPFLAGS) -D SAPPHIRE -D REVISION=$(REVISION) $< -o src/$*_sapphire.i
@$(PREPROC) src/$*_sapphire.i charmap.txt | $(CC1) $(CFLAGS) -o src/$*_sapphire.s
@printf ".text\n\t.align\t2, 0\n" >> src/$*_sapphire.s
$(AS) $(ASFLAGS) -o $@ src/$*_sapphire.s
@@ -126,17 +161,17 @@ asm/%_ruby.o: dep = $(shell $(SCANINC) asm/$*.s)
asm/%_sapphire.o: dep = $(shell $(SCANINC) asm/$*.s)
asm/%_ruby.o: asm/%.s $$(dep)
- $(AS) $(ASFLAGS) --defsym RUBY=1 -o $@ $<
+ $(AS) $(ASFLAGS) --defsym RUBY=1 --defsym REVISION=$(REVISION) -o $@ $<
asm/%_sapphire.o: asm/%.s $$(dep)
- $(AS) $(ASFLAGS) --defsym SAPPHIRE=1 -o $@ $<
+ $(AS) $(ASFLAGS) --defsym SAPPHIRE=1 --defsym REVISION=$(REVISION) -o $@ $<
data/%_ruby.o: dep = $(shell $(SCANINC) data/$*.s)
data/%_sapphire.o: dep = $(shell $(SCANINC) data/$*.s)
data/%_ruby.o: data/%.s $$(dep)
- $(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym RUBY=1 -o $@
+ $(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym RUBY=1 --defsym REVISION=$(REVISION) -o $@
data/%_sapphire.o: data/%.s $$(dep)
- $(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym SAPPHIRE=1 -o $@
+ $(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym SAPPHIRE=1 --defsym REVISION=$(REVISION) -o $@
$(SONG_OBJS): %.o: %.s
$(AS) $(ASFLAGS) -I sound -o $@ $<
diff --git a/asm/rom5.s b/asm/rom5.s
index 3792b1948..7cf87e636 100644
--- a/asm/rom5.s
+++ b/asm/rom5.s
@@ -198128,15 +198128,15 @@ sub_80DB564: @ 80DB564
strh r1, [r0, 0x3A]
movs r1, 0x40
strh r1, [r0, 0x3C]
- ldr r1, sub_80DB574
+ ldr r1, _080DB574
str r1, [r0, 0x1C]
bx lr
+ .align 2, 0
+_080DB574: .4byte sub_80DB578
thumb_func_end sub_80DB564
- thumb_func_start sub_80DB574
-sub_80DB574: @ 80DB574
- push {r0,r3-r6,lr}
- lsrs r5, r1, 32
+ thumb_func_start sub_80DB578
+sub_80DB578: @ 80DB578
push {lr}
adds r3, r0, 0
movs r0, 0x2E
@@ -198192,7 +198192,7 @@ _080DB5D8:
_080DB5DE:
pop {r0}
bx r0
- thumb_func_end sub_80DB574
+ thumb_func_end sub_80DB578
thumb_func_start sub_80DB5E4
sub_80DB5E4: @ 80DB5E4
@@ -418750,19 +418750,38 @@ _08146E6C:
bl SetUpWindowConfig
ldr r0, _08146FF8
bl InitMenuWindow
+ .if REVISION >= 1
+ movs r0, 0xD
+ movs r1, 0x6
+ movs r2, 0x10
+ movs r3, 0x9
+ .else
movs r0, 0xD
movs r1, 0x8
movs r2, 0x10
movs r3, 0xB
+ .endif
bl MenuDrawTextWindow
+ .if REVISION >= 1
+ movs r0, 0x1
+ movs r1, 0xA
+ movs r2, 0x1C
+ movs r3, 0x13
+ .else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
+ .endif
bl MenuDrawTextWindow
ldr r0, _08146FFC
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
movs r0, 0x1
negs r0, r0
@@ -418874,14 +418893,26 @@ _0814705C:
lsls r0, 24
cmp r0, 0
bne _0814710C
+ .if REVISION >= 1
+ movs r0, 0x1
+ movs r1, 0xA
+ movs r2, 0x1C
+ movs r3, 0x13
+ .else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
+ .endif
bl MenuDrawTextWindow
ldr r0, _081470D0
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
ldr r0, _081470D4
ldrb r0, [r0]
@@ -418890,8 +418921,13 @@ _0814705C:
cmp r0, 0
beq _08147096
ldr r0, _081470D8
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
_08147096:
adds r0, r4, 0x1
@@ -418905,14 +418941,26 @@ _08147096:
_081470A6:
cmp r4, 0x3
bne _081470E4
+ .if REVISION >= 1
+ movs r0, 0x1
+ movs r1, 0xA
+ movs r2, 0x1C
+ movs r3, 0x13
+ .else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
+ .endif
bl MenuDrawTextWindow
ldr r0, _081470DC
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
ldr r0, _081470E0
bl SetMainCallback2
@@ -418926,32 +418974,56 @@ _081470D8: .4byte gUnknown_084115F9
_081470DC: .4byte gUnknown_0841164E
_081470E0: .4byte sub_81471A4
_081470E4:
+ .if REVISION >= 1
+ movs r0, 0x1
+ movs r1, 0xA
+ movs r2, 0x1C
+ movs r3, 0x13
+ .else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
+ .endif
bl MenuDrawTextWindow
ldr r0, _08147104
ldr r0, [r0]
cmp r0, 0
bne _08147134
ldr r0, _08147108
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
b _0814713E
.align 2, 0
_08147104: .4byte 0x03005ebc
_08147108: .4byte gUnknown_08411747
_0814710C:
+ .if REVISION >= 1
+ movs r0, 0x1
+ movs r1, 0xA
+ movs r2, 0x1C
+ movs r3, 0x13
+ .else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
+ .endif
bl MenuDrawTextWindow
ldr r0, _0814712C
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
ldr r0, _08147130
bl SetMainCallback2
@@ -418961,8 +419033,13 @@ _0814712C: .4byte gUnknown_0841164E
_08147130: .4byte sub_8147154
_08147134:
ldr r0, _0814714C
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
_0814713E:
ldr r0, _08147150
@@ -418988,14 +419065,26 @@ sub_8147154: @ 8147154
ands r0, r1
cmp r0, 0
beq _0814718A
+ .if REVISION >= 1
+ movs r0, 0x1
+ movs r1, 0xA
+ movs r2, 0x1C
+ movs r3, 0x13
+ .else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
+ .endif
bl MenuDrawTextWindow
ldr r0, _08147198
+ .if REVISION >= 1
+ movs r1, 0x2
+ movs r2, 0xB
+ .else
movs r1, 0x2
movs r2, 0xD
+ .endif
bl MenuPrint
ldr r0, _0814719C
bl SetVBlankCallback
@@ -419094,7 +419183,11 @@ sub_8147218: @ 8147218
strh r0, [r2, 0x3E]
mov r1, r12
adds r1, 0x3C
+ .if REVISION >= 1
+ movs r0, 0x38
+ .else
movs r0, 0x48
+ .endif
strb r0, [r1]
ldr r0, _0814729C
ldrh r0, [r0]
diff --git a/asm/rom_803D1FC.s b/asm/rom_803D1FC.s
index ed89d9d89..49009abf0 100644
--- a/asm/rom_803D1FC.s
+++ b/asm/rom_803D1FC.s
@@ -4411,6 +4411,62 @@ _0803FB56:
bx r0
thumb_func_end DrawSpindaSpots
+ .if REVISION >= 1
+ thumb_func_start sub_803FB68
+sub_803FB68: @ 803FB68
+ push {r4-r7,lr}
+ mov r7, r9
+ mov r6, r8
+ push {r6,r7}
+ sub sp, 0x4
+ adds r5, r0, 0
+ lsls r1, 16
+ lsrs r7, r1, 16
+ lsls r2, 16
+ lsrs r2, 16
+ mov r8, r2
+ ldr r0, =0x20231CC
+ mov r9, r0
+ adds r0, r5, 0
+ movs r1, 0x2
+ mov r2, r9
+ bl GetMonData
+ mov r4, sp
+ adds r0, r5, 0
+ movs r1, 0x3
+ mov r2, sp
+ bl GetMonData
+ strb r0, [r4, 0x0]
+ lsls r0, 24
+ lsrs r0, 24
+ cmp r0, 0x2
+ bne _0803FBC4
+ movs r6, 0xB
+ adds r0, r7, 0
+ muls r0, r6
+ ldr r4, =gSpeciesNames
+ adds r0, r4
+ mov r1, r9
+ bl StringCompareWithoutExtCtrlCodes
+ cmp r0, 0
+ bne _0803FBC4
+ mov r2, r8
+ muls r2, r6
+ adds r2, r4
+ adds r0, r5, 0
+ movs r1, 0x2
+ bl SetMonData
+_0803FBC4:
+ add sp, 0x4
+ pop {r3,r4}
+ mov r8, r3
+ mov r9, r4
+ pop {r4-r7}
+ pop {r0}
+ bx r0
+ .pool
+ thumb_func_end sub_803FB68
+ .else
thumb_func_start sub_803FB68
sub_803FB68: @ 803FB68
push {r4-r7,lr}
@@ -4452,6 +4508,7 @@ _0803FBA8:
_0803FBB4: .4byte 0x020231cc
_0803FBB8: .4byte gSpeciesNames
thumb_func_end sub_803FB68
+ .endif
thumb_func_start sub_803FBBC
sub_803FBBC: @ 803FBBC
diff --git a/asm/rom_header.s b/asm/rom_header.s
index e49b4fbee..a7348ad1f 100644
--- a/asm/rom_header.s
+++ b/asm/rom_header.s
@@ -51,13 +51,13 @@ RomHeaderReserved1:
.space 7
RomHeaderSoftwareVersion:
- .byte 0
+ .byte REVISION
RomHeaderChecksum:
.ifdef SAPPHIRE
- .byte 0x55
+ .byte 0x55 - REVISION
.else
- .byte 0x41
+ .byte 0x41 - REVISION
.endif
RomHeaderReserved2:
diff --git a/data/data2.s b/data/data2.s
index ff525aa82..a5258494f 100644
--- a/data/data2.s
+++ b/data/data2.s
@@ -28796,7 +28796,11 @@ OtherText_WontHaveAnyEffect:
gUnknown_0840EFA1:: @ 840EFA1
OtherText_CantUseItemOnPoke:
+ .if REVISION >= 1
+ .string "This can’t be used on\nthat POKéMON.{PAUSE_UNTIL_PRESS}$"
+ .else
.string "This item can’t be used on\nthat POKéMON.{PAUSE_UNTIL_PRESS}$"
+ .endif
gUnknown_0840EFCC:: @ 840EFCC
OtherText_CantBeSwitched:
diff --git a/data/decorations.s b/data/decorations.s
index 37c274389..268ebee9a 100644
--- a/data/decorations.s
+++ b/data/decorations.s
@@ -363,7 +363,11 @@ DecorDesc_MARILL_DOLL: @ 83EACF2
.string "or a desk.$"
DecorDesc_TOGEPI_DOLL: @ 83EAD1E
+ .if REVISION >= 1
+ .string "A TOGEPI doll.\n"
+ .else
.string "A TOPGEPI doll.\n"
+ .endif
.string "Place it on a mat\n"
.string "or a desk.$"
diff --git a/data/event_scripts.s b/data/event_scripts.s
index a8c897621..966e32ad2 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -4953,8 +4953,10 @@ Text_1C6C62: @ 81C6C62
.string "テストよう メッセージです!\n"
.string "ざひょう チェックの イベントです$"
-@ 81C6C83
- .string " $"
+@ 81C6C84
+@ object file boundary?
+ .align 2
+ .string "$"
.include "data/text/save.s"
.include "data/text/intro.s"
diff --git a/data/graphics.s b/data/graphics.s
index 39cfaf5d9..6dcd10041 100644
--- a/data/graphics.s
+++ b/data/graphics.s
@@ -4560,11 +4560,19 @@ gDecoration10000_Gfx:: @ 8EA2A44
.align 2
gFont3LatinGlyphs:: @ 8EA2C44
+ .if REVISION >= 1
+ .incbin "graphics/fonts/font3_lat_rev1.4bpp"
+ .else
.incbin "graphics/fonts/font3_lat.4bpp"
+ .endif
.align 2
gFont4LatinGlyphs:: @ 8EA6BC4
+ .if REVISION >= 1
+ .incbin "graphics/fonts/font4_lat_rev1.4bpp"
+ .else
.incbin "graphics/fonts/font4_lat.4bpp"
+ .endif
.align 2
gFont3JapaneseGlyphs:: @ 8EA8744
diff --git a/data/pokedex_entries.s b/data/pokedex_entries.s
index e9d9fd0ec..f1c206e3c 100644
--- a/data/pokedex_entries.s
+++ b/data/pokedex_entries.s
@@ -320,16 +320,34 @@ DexDescription_Vileplume_2:
.endif
.ifdef SAPPHIRE
+
+ .if REVISION >= 1
+DexDescription_Paras_1:
+ .string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from this$"
+DexDescription_Paras_2:
+ .string "BUG/GRASS POKéMON host. They are\nhighly valued as a medicine for\nextending life.$"
+ .else
DexDescription_Paras_1:
.string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from this$"
DexDescription_Paras_2:
.string "BUG POKéMON host. They are highly\nvalued as a medicine for extending life.$"
+ .endif @ REVISION >= 1
+
+ .else
+
+ .if REVISION >= 1
+DexDescription_Paras_1:
+ .string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from this$"
+DexDescription_Paras_2:
+ .string "BUG/GRASS POKéMON host. They are\nhighly valued as a medicine for\nextending life.$"
.else
DexDescription_Paras_1:
.string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from the BUG$"
DexDescription_Paras_2:
.string "POKéMON host. They are highly valued as\na medicine for extending life.$"
- .endif
+ .endif @ REVISION >= 1
+
+ .endif @ SAPPHIRE
DexDescription_Parasect_1:
.string "PARASECT is known to infest large trees\nen masse and drain nutrients from the\nlower trunk and roots.$"
@@ -2347,16 +2365,27 @@ DexDescription_Sableye_2:
.endif
.ifdef SAPPHIRE
+
DexDescription_Mawile_1:
.string "Don’t be taken in by this POKéMON’s\ncute face - it’s very dangerous. MAWILE\nfools the foe into letting down its$"
DexDescription_Mawile_2:
.string "guard, then chomps down with its\nmassive jaws. The steel jaws are really\nhorns that have been transformed.$"
+
+ .else
+
+ .if REVISION >= 1
+DexDescription_Mawile_1:
+ .string "MAWILE’s huge jaws are actually steel\nhorns that have been transformed.\nIts docile-looking face serves to lull$"
+DexDescription_Mawile_2:
+ .string "its foe into letting down its guard.\nWhen the foe least expects it, MAWILE\nchomps it with its gaping jaws.$"
.else
DexDescription_Mawile_1:
.string "MAWHILE’s huge jaws are actually steel\nhorns that have been transformed.\nIts docile-looking face serves to lull$"
DexDescription_Mawile_2:
.string "its foe into letting down its guard.\nWhen the foe least expects it, MAWHILE\nchomps it with its gaping jaws.$"
- .endif
+ .endif @ REVISION >= 1
+
+ .endif @ SAPPHIRE
.ifdef SAPPHIRE
DexDescription_Aron_1:
diff --git a/data/text/cable_club.s b/data/text/cable_club.s
index 54f9bda5a..1d3c7fd92 100644
--- a/data/text/cable_club.s
+++ b/data/text/cable_club.s
@@ -13,7 +13,11 @@ OldaleTown_PokemonCenter_2F_Text_1A457E:: @ 81A457E
OldaleTown_PokemonCenter_2F_Text_1A45FE:: @ 81A45FE
.string "Welcome to the POKéMON CABLE CLUB\n"
+ .if REVISION >= 1
+ .string "RECORD CORNER.\p"
+ .else
.string "RECORD CENTER.\p"
+ .endif
.string "You may mix your records as a TRAINER\n"
.string "with the records of your friends.\p"
.string "Would you like to mix records?$"
diff --git a/data/text/tv.s b/data/text/tv.s
index fc26766b1..d2cc1a6fa 100644
--- a/data/text/tv.s
+++ b/data/text/tv.s
@@ -906,7 +906,11 @@ UnknownString_81AB381:: @ 81AB381
.string "Hello!\p"
.string "It’s time for TODAY’S SMART SHOPPER.\p"
.string "INTERVIEWER: How are you, viewers?\p"
+ .if REVISION >= 1
+ .string "Today we’re visiting a shop\n"
+ .else
.string "Today we’re visiting the POKéMON MART\n"
+ .endif
.string "in {STR_VAR_2}.\p"
.string "Let’s check on what the hot sellers\n"
.string "have been recently.$"
diff --git a/fonts.mk b/fonts.mk
index 2295dce2b..86b7f4591 100644
--- a/fonts.mk
+++ b/fonts.mk
@@ -21,8 +21,14 @@ graphics/fonts/font1_lat.1bpp: graphics/fonts/font1_lat.png
graphics/fonts/font3_lat.4bpp: graphics/fonts/font3_lat.png
$(RSFONT) $< $@ 254 1
+graphics/fonts/font3_lat_rev1.4bpp: graphics/fonts/font3_lat_rev1.png
+ $(RSFONT) $< $@ 254 1
+
graphics/fonts/font4_lat.4bpp: graphics/fonts/font4_lat.png
$(RSFONT) $< $@ 220 0
+graphics/fonts/font4_lat_rev1.4bpp: graphics/fonts/font4_lat_rev1.png
+ $(RSFONT) $< $@ 220 0
+
graphics/fonts/font6_braille.1bpp: graphics/fonts/font6_braille.png
$(RSFONT) $< $@ 192 0
diff --git a/graphics/fonts/font3_lat_rev1.png b/graphics/fonts/font3_lat_rev1.png
new file mode 100644
index 000000000..cec24d76b
--- /dev/null
+++ b/graphics/fonts/font3_lat_rev1.png
Binary files differ
diff --git a/graphics/fonts/font4_lat_rev1.png b/graphics/fonts/font4_lat_rev1.png
new file mode 100644
index 000000000..4e4749a04
--- /dev/null
+++ b/graphics/fonts/font4_lat_rev1.png
Binary files differ
diff --git a/include/fonts/font0_widths.h b/include/fonts/font0_widths.h
index aade6a91d..77fcff3ee 100644
--- a/include/fonts/font0_widths.h
+++ b/include/fonts/font0_widths.h
@@ -1,3 +1,24 @@
+#if REVISION >= 1
+static const u8 sFont0Widths[] =
+{
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
+ 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#else
static const u8 sFont0Widths[] =
{
3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
@@ -17,3 +38,4 @@ static const u8 sFont0Widths[] =
3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
};
+#endif
diff --git a/include/fonts/font1_widths.h b/include/fonts/font1_widths.h
index a5c3dba50..454bbfaca 100644
--- a/include/fonts/font1_widths.h
+++ b/include/fonts/font1_widths.h
@@ -1,3 +1,22 @@
+#if REVISION >= 1
+static const u8 sFont1Widths[] =
+{
+ 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
+ 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 6,
+ 8, 7, 3, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
+ 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
+ 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
+ 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
+};
+#else
static const u8 sFont1Widths[] =
{
5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
@@ -15,3 +34,4 @@ static const u8 sFont1Widths[] =
7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
};
+#endif
diff --git a/include/fonts/font3_widths.h b/include/fonts/font3_widths.h
index 0f79260e4..45dc69c06 100644
--- a/include/fonts/font3_widths.h
+++ b/include/fonts/font3_widths.h
@@ -1,3 +1,24 @@
+#if REVISION >= 1
+static const u8 sFont3Widths[] =
+{
+ 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
+ 8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
+ 7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
+ 7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
+ 6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
+ 3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
+ 3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
+};
+#else
static const u8 sFont3Widths[] =
{
3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
@@ -17,3 +38,4 @@ static const u8 sFont3Widths[] =
3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
};
+#endif
diff --git a/include/fonts/font4_widths.h b/include/fonts/font4_widths.h
index a779eb0eb..63adf4921 100644
--- a/include/fonts/font4_widths.h
+++ b/include/fonts/font4_widths.h
@@ -1,3 +1,22 @@
+#if REVISION >= 1
+static const u8 sFont4Widths[] =
+{
+ 5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
+ 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 6,
+ 8, 7, 3, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
+ 5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
+ 7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
+ 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
+};
+#else
static const u8 sFont4Widths[] =
{
5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
@@ -15,3 +34,4 @@ static const u8 sFont4Widths[] =
7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
};
+#endif
diff --git a/rom_rev1.sha1 b/rom_rev1.sha1
new file mode 100644
index 000000000..c006e0de5
--- /dev/null
+++ b/rom_rev1.sha1
@@ -0,0 +1,2 @@
+610b96a9c9a7d03d2bafb655e7560ccff1a6d894 pokeruby.gba
+4722efb8cd45772ca32555b98fd3b9719f8e60a9 pokesapphire.gba
diff --git a/rom_rev2.sha1 b/rom_rev2.sha1
new file mode 100644
index 000000000..9e54bee6c
--- /dev/null
+++ b/rom_rev2.sha1
@@ -0,0 +1,2 @@
+5b64eacf892920518db4ec664e62a086dd5f5bc8 pokeruby.gba
+89b45fb172e6b55d51fc0e61989775187f6fe63c pokesapphire.gba
diff --git a/src/text.c b/src/text.c
index 64a302fed..25c7a9d79 100644
--- a/src/text.c
+++ b/src/text.c
@@ -3352,7 +3352,11 @@ static u8 GetGlyphWidth(struct Window *win, u32 glyph)
{
u8 width = 8;
+#if REVISION >= 1
+ if (win->charset != CHARSET_JAPANESE)
+#else
if (win->charset == CHARSET_LATIN)
+#endif
{
width = win->spacing;
if (!win->spacing)