modern: Fix decoration build, update rgbds for battle-e (#9)

* modern: Fix decoration build, update rgbds for battle-e

* ci: dedicated job
This commit is contained in:
FexCollects 2025-02-08 11:36:14 -07:00 committed by GitHub
parent e95e3d8b32
commit f668e5c843
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 113 additions and 91 deletions

View File

@ -6,6 +6,16 @@ on:
- master
jobs:
BuildDecoration:
runs-on: ubuntu-24.04
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Verify decoration
run: |
cd decoration && make
BuildBattleE:
runs-on: ubuntu-24.04
steps:

View File

@ -37,9 +37,9 @@ verify: series_1_z80 berries_z80 berries_2_z80 promo_en_z80 p_promo_z80 n_promo_
trainers/%-EN.tx: trainers/%.asm
python3 ../scripts/regionalize.py $< $@ EN EN
trainers/%.o: trainers/%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
trainers/%.gbc: trainers/%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
trainers/%.bin: trainers/%.gbc
python3 ../scripts/stripgbc.py $< $@
trainers/%.z80: trainers/%.gbc
@ -51,9 +51,9 @@ trainers/%.mev: trainers/%.bin
berries/%-EN.tx: berries/%.asm
python3 ../scripts/regionalize.py $< $@ EN EN
berries/%.o: berries/%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
berries/%.gbc: berries/%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
berries/%.bin: berries/%.gbc
python3 ../scripts/stripgbc.py $< $@
berries/%.z80: berries/%.gbc
@ -65,9 +65,9 @@ berries/%.mev: berries/%.bin
prologue-%.tx: prologue.asm
python3 ../scripts/regionalize.py $< $@ $* $*
prologue-%.o: prologue-%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
prologue-%.gbc: prologue-%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
prologue-%.bin: prologue-%.gbc
python3 ../scripts/stripgbc.py $< $@
@ -77,9 +77,9 @@ battletrainer-%.tx: battletrainer.asm prologue-%.bin
08-A%-EN.tx: 08-A%.asm battletrainer-EN.tx
python3 ../scripts/ereadertext.py $< $@ EN
08-A%.o: 08-A%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
08-A%.gbc: 08-A%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
08-A%.z80: 08-A%.gbc
python3 ../scripts/stripgbc.py $< $@
08-A%.vpk: 08-A%.z80
@ -90,9 +90,9 @@ battletrainer-%.tx: battletrainer.asm prologue-%.bin
08-B%-EN.tx: 08-B%.asm battletrainer-EN.tx
python3 ../scripts/ereadertext.py $< $@ EN
08-B%.o: 08-B%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
08-B%.gbc: 08-B%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
08-B%.z80: 08-B%.gbc
python3 ../scripts/stripgbc.py $< $@
08-B%.vpk: 08-B%.z80
@ -103,9 +103,9 @@ battletrainer-%.tx: battletrainer.asm prologue-%.bin
129-B%-EN.tx: 129-B%.asm battletrainer-EN.tx
python3 ../scripts/ereadertext.py $< $@ EN
129-B%.o: 129-B%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
129-B%.gbc: 129-B%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
129-B%.z80: 129-B%.gbc
python3 ../scripts/stripgbc.py $< $@
129-B%.vpk: 129-B%.z80
@ -118,9 +118,9 @@ enigmaberry-%.tx: enigmaberry.asm prologue-%.bin
08-K%-EN.tx: 08-K%.asm enigmaberry-EN.tx
python3 ../scripts/ereadertext.py $< $@ EN
08-K%.o: 08-K%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
08-K%.gbc: 08-K%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
08-K%.z80: 08-K%.gbc
python3 ../scripts/stripgbc.py $< $@
08-K%.vpk: 08-K%.z80
@ -131,9 +131,9 @@ enigmaberry-%.tx: enigmaberry.asm prologue-%.bin
08-N%-EN.tx: 08-N%.asm battletrainer-EN.tx
python3 ../scripts/ereadertext.py $< $@ EN
08-N%.o: 08-N%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
08-N%.gbc: 08-N%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
08-N%.z80: 08-N%.gbc
python3 ../scripts/stripgbc.py $< $@
08-N%.vpk: 08-N%.z80
@ -144,9 +144,9 @@ enigmaberry-%.tx: enigmaberry.asm prologue-%.bin
08-P%-EN.tx: 08-P%.asm battletrainer-EN.tx
python3 ../scripts/ereadertext.py $< $@ EN
08-P%.o: 08-P%.tx
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
../bin/rgbds/v0.5.0/rgbasm -o $@ $<
08-P%.gbc: 08-P%.o
../bin/rgbds/v0.2.0/rgblink -o $@ $<
../bin/rgbds/v0.5.0/rgblink -o $@ $<
08-P%.z80: 08-P%.gbc
python3 ../scripts/stripgbc.py $< $@
08-P%.vpk: 08-P%.z80

View File

@ -9,8 +9,8 @@ INCLUDE "trainers/macros.asm"
Text_JP "モモコ"8
OT_ID 00000, 00000
Intro_EN WE,ARE,READY,FOR,MORE,_GROWTH
Win_EN WE,WILL,TRY,MORE,FOR,_GROWTH
Intro_EN WE,ARE,READY,_FOR,MORE,_GROWTH
Win_EN WE,WILL,TRY,MORE,_FOR,_GROWTH
Loss_EN SORRY,PARTNER,I,WILL,_HARDEN,MYSELF
Intro_JP $120f, $1c25, $244a, $1621, $140f, $1034
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "ヨマワル"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -10,7 +10,7 @@ INCLUDE "trainers/macros.asm"
OT_ID 00000, 00000
Intro_EN I,CAN_T,WAIT,TO,BATTLE,_EX_EX
Win_EN _ICE_BEAM,WAS,TOO,COLD,FOR,YOU
Win_EN _ICE_BEAM,WAS,TOO,COLD,_FOR,YOU
Loss_EN _ICY_WIND,DIDN_T,BEAT,YOUR,HOT,SPIRIT
Intro_JP $1c28, $0618, $0e1d, $201a, $1041, $0c00
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "レジアイス"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -9,7 +9,7 @@ INCLUDE "trainers/macros.asm"
Text_JP "コシキ"8
OT_ID 00000, 00000
Intro_EN MY,POKEMON,THANKS,ME,FOR,CARE
Intro_EN MY,POKEMON,THANKS,ME,_FOR,CARE
Win_EN POKEMON,DON_T,TRUST,TRAINER,WITHOUT,CARE
Loss_EN IF_I_LOSE,MY,_FRUSTRATION,LEVEL,GOES,UP
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "レジスチル"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -10,7 +10,7 @@ INCLUDE "trainers/macros.asm"
OT_ID 00000, 00000
Intro_EN WHAT, _A, NICE, _SUNNY_DAY, IT, IS
Win_EN _A, _SUNNY_DAY, FOR, VICTORY, _EX_EX, $ffff
Win_EN _A, _SUNNY_DAY, _FOR, VICTORY, _EX_EX, $ffff
Loss_EN SEEMS, THE, _SUNNY_DAY, WASN_T, SO, NICE
Intro_JP $141f, $26f1, $0c00, $201f, $26f1, $0c00
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "バクーダ"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -11,7 +11,7 @@ INCLUDE "trainers/macros.asm"
Intro_EN LOOK,AT,MY,CUTE,POKEMON,_EX
Win_EN MY,POKEMON,ARE,SO,CUTE,_EX
Loss_EN YOU,BETTER,CARE,FOR,MY,POKEMON
Loss_EN YOU,BETTER,CARE,_FOR,MY,POKEMON
Intro_JP $1643, $0c00, $ffff, $0a48, $0418, $020e
Win_JP $0a45, $1034, $020e, $0418, $0418, $0c00
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "ピカチュウ"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -11,7 +11,7 @@ INCLUDE "trainers/macros.asm"
Intro_EN LOOK,_EX,MY,SKILLED,ATTACK,_EX_EX
Win_EN OH_,WHERE,WAS,YOUR,_LIGHT_SCREEN,_QU
Loss_EN I,WAS,NO_MATCH,FOR,YOU,_EX_EX
Loss_EN I,WAS,NO_MATCH,_FOR,YOU,_EX_EX
Intro_JP $1643, $0c00, $1e0b, $063e, $0617, $0c01
Win_JP $0c0c, $0c03, $2671, $142f, $1034, $0c03
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "ジュカイン"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -9,7 +9,7 @@ INCLUDE "trainers/macros.asm"
Text_JP "リョウ"8
OT_ID 00000, 00000
Intro_EN I, WILL, AIM, FOR, WEAK, POINTS
Intro_EN I, WILL, AIM, _FOR, WEAK, POINTS
Win_EN I, HIT, YOUR, WEAK, POINTS, _EX
Loss_EN I, COULDN_T, SEE, THE, WEAK, POINTS
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "ポリゴン2"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -15,7 +15,7 @@ INCLUDE "trainers/macros.asm"
Intro_EN MY, POWER, LEVEL, IS, MASTER, RANK
Win_EN SEE, THE, POWER, OF, _MIRROR_COAT, _QU
Loss_EN _MIRROR_COAT, WAS, NO_MATCH, FOR, YOU, _ELIP
Loss_EN _MIRROR_COAT, WAS, NO_MATCH, _FOR, YOU, _ELIP
Pokemon MILOTIC
Holds LEFTOVERS
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "ラグラージ"11
Friendship 255
End_Trainer
End_Trainer

View File

@ -13,7 +13,7 @@ INCLUDE "trainers/macros.asm"
Win_JP $1205, $0e08, $ffff, $140b, $2699, $0c01
Loss_JP $1217, $0e08, $ffff, $0a1f, $26c2, $0c01
Intro_EN HERE_I_COME, _EX_EX, TIME, FOR, BATTLE, _EX_EX
Intro_EN HERE_I_COME, _EX_EX, TIME, _FOR, BATTLE, _EX_EX
Win_EN DID, YOU, SEE, THAT, _EXPLOSION, _QU_EX
Loss_EN ALWAYS, _DESTINY_BOND, WITH, MY, POKEMON, _ELIP
@ -56,4 +56,4 @@ INCLUDE "trainers/macros.asm"
Text_JP "マタドガス"11
Friendship 255
End_Trainer
End_Trainer

BIN
bin/nedc/v1.4.1/nedcenc Executable file

Binary file not shown.

BIN
bin/nedc/v1.4.1/nedcmake Executable file

Binary file not shown.

BIN
bin/nedc/v1.4.1/nevpk Executable file

Binary file not shown.

BIN
bin/rgbds/v0.5.0/rgbasm Executable file

Binary file not shown.

BIN
bin/rgbds/v0.5.0/rgblink Executable file

Binary file not shown.

View File

@ -691,7 +691,7 @@ ABOUT EQU $1027
OVER EQU $1028
IT EQU $1029
ALL EQU $102A
FOR EQU $102B
_FOR EQU $102B ; rgbds keyword
ON EQU $102C
OFF EQU $102D
AS EQU $102E
@ -843,7 +843,7 @@ NATURAL EQU $1431
BECOMES EQU $1432
LUKEWARM EQU $1433
FAST EQU $1434
LOW EQU $1435
_LOW EQU $1435 ; rgbds keyword
AWFUL EQU $1436
ALONE EQU $1437
BORED EQU $1438
@ -1100,7 +1100,7 @@ THING EQU $1E05
BELOW EQU $1E06
ABOVE EQU $1E07
BACK EQU $1E08
HIGH EQU $1E09
_HIGH EQU $1E09 ; rgbds keyword
HERE EQU $1E0A
INSIDE EQU $1E0B
OUTSIDE EQU $1E0C
@ -1155,7 +1155,7 @@ THICK EQU $2010
SMOOTH EQU $2011
SLIMY EQU $2012
THIN EQU $2013
BREAK EQU $2014
_BREAK EQU $2014 ; rgbds keyword
VORACIOUS EQU $2015
SCATTER EQU $2016
AWESOME EQU $2017
@ -1836,4 +1836,4 @@ __LUGIA EQU $2AF9
__HO_OH EQU $2AFA
__CELEBI EQU $2AFB
BLANK EQU $FFFF
BLANK EQU $FFFF

View File

@ -2,63 +2,63 @@ all: 08-O001-EN.raw
.SECONDARY: 08-O002-EN.z80
decoration-%.tx: decoration.asm
python ../scripts/regionalize.py $< $@ $* $*
python3 ../scripts/regionalize.py $< $@ $* $*
decoration-%.o: decoration-%.tx
./rgbasm.exe -o $@ $<
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
decoration-%.gbc: decoration-%.o
./rgblink.exe -o $@ $<
../bin/rgbds/v0.2.0/rgblink -o $@ $<
decoration-%.bin: decoration-%.gbc
python ../scripts/stripgbc.py $< $@
python3 ../scripts/stripgbc.py $< $@
decoration-%.mev: decoration-%.bin
python ../scripts/checksum_regi.py $< $@
python3 ../scripts/checksum_regi.py $< $@
prologue-%.tx: prologue.asm
python ../scripts/regionalize.py $< $@ $* $*
python3 ../scripts/regionalize.py $< $@ $* $*
prologue-%.o: prologue-%.tx
./rgbasm.exe -o $@ $<
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
prologue-%.gbc: prologue-%.o
./rgblink.exe -o $@ $<
../bin/rgbds/v0.2.0/rgblink -o $@ $<
prologue-%.bin: prologue-%.gbc
python ../scripts/stripgbc.py $< $@
python3 ../scripts/stripgbc.py $< $@
08-O001-%.tx: 08-O001.asm decoration-%.mev prologue-%.bin
python ../scripts/ereadertext.py $< $@ $*
python3 ../scripts/ereadertext.py $< $@ $*
08-O001-%.o: 08-O001-%.tx
./rgbasm.exe -o $@ $<
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
08-O001-%.gbc: 08-O001-%.o
./rgblink.exe -o $@ $<
../bin/rgbds/v0.2.0/rgblink -o $@ $<
08-O001-%.z80: 08-O001-%.gbc
python ../scripts/stripgbc.py $< $@
python3 ../scripts/stripgbc.py $< $@
08-O001-%.vpk: 08-O001-%.z80
./nevpk.exe -c -i $< -o $@
../bin/nedc/v1.4.1/nevpk -c -i $< -o $@
08-O001-%.raw: 08-O001-%.vpk
./nedcmake.exe -i $< -o $@ -type 1 -region 1
../bin/nedc/v1.4.1/nedcmake -i $< -o $@ -type 1 -region 1
mv $@-01.raw $@
decoration-tickets-%.tx: decoration-tickets.asm
python ../scripts/regionalize.py $< $@ $* $*
python3 ../scripts/regionalize.py $< $@ $* $*
decoration-tickets-%.o: decoration-tickets-%.tx
./rgbasm.exe -o $@ $<
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
decoration-tickets-%.gbc: decoration-tickets-%.o
./rgblink.exe -o $@ $<
../bin/rgbds/v0.2.0/rgblink -o $@ $<
decoration-tickets-%.bin: decoration-tickets-%.gbc
python ../scripts/stripgbc.py $< $@
python3 ../scripts/stripgbc.py $< $@
decoration-tickets-%.mev: decoration-tickets-%.bin
python ../scripts/checksum_regi.py $< $@
python3 ../scripts/checksum_regi.py $< $@
08-O002-%.tx: 08-O002.asm decoration-tickets-%.mev prologue-%.bin
python ../scripts/ereadertext.py $< $@ $*
python3 ../scripts/ereadertext.py $< $@ $*
08-O002-%.o: 08-O002-%.tx
./rgbasm.exe -o $@ $<
../bin/rgbds/v0.2.0/rgbasm -o $@ $<
08-O002-%.gbc: 08-O002-%.o
./rgblink.exe -o $@ $<
../bin/rgbds/v0.2.0/rgblink -o $@ $<
08-O002-%.z80: 08-O002-%.gbc
python ../scripts/stripgbc.py $< $@
python3 ../scripts/stripgbc.py $< $@
08-O002-%.vpk: 08-O002-%.z80
./nevpk.exe -c -i $< -o $@
../bin/nedc/v1.4.1/nevpk -c -i $< -o $@
08-O002-%.raw: 08-O002-%.vpk
./nedcmake.exe -i $< -o $@ -type 1 -region 1
../bin/nedc/v1.4.1/nedcmake -i $< -o $@ -type 1 -region 1
mv $@-01.raw $@
clean:
rm -f *.tx *.o *.gbc *.z80 *.bin *.mev *.vpk *.raw
rm -f *.tx *.o *.gbc *.z80 *.bin *.mev *.vpk *.raw

View File

@ -30,7 +30,7 @@ pos=list(find_all(data,b'\x01\x00\x00\x00\x02\x02\x00\x02\x00\x00\x00\x04\x00\x8
for i in pos:
i=i+17
chunk_type = ord(data[i])
chunk_type = data[i]
if chunk_type == 0x02: # END_OF_CHUNKS
break
elif chunk_type == 0x07: # CUSTOM_BERRY
@ -73,7 +73,7 @@ for wordwise in wordwises:
for bytewise in bytewises:
sum = 0
for i in range(bytewise[1], bytewise[2]):
sum = (sum + ord(data[i])) & 0xFFFFFFFF
sum = (sum + data[i]) & 0xFFFFFFFF
bytewise_results.append(sum)
i = 0
for bytewise in bytewises:
@ -85,7 +85,7 @@ for bytewise in bytewises:
for crc in crcs:
sum = 0x1121
for i in range(crc[1], crc[2]):
sum ^= ord(data[i])
sum ^= data[i]
for j in range(8):
if(sum & 1):
sum = (sum >> 1) ^ 0x8408
@ -101,5 +101,5 @@ for crc in crcs:
# write the updated file
out = open(sys.argv[2], 'w')
out = open(sys.argv[2], 'wb')
out.write(data)

View File

@ -258,7 +258,7 @@ chars = {
#'⬅': '\xF9',
'\\l': '\xFA',
'\\p': '\xFB',
'\{FC}': '\xFC',
#'\{FC}': '\xFC',
'\\v1': '\xFD\x01',
'\\v2': '\xFD\x02',
'\\v3': '\xFD\x03',
@ -307,40 +307,40 @@ chars = {
'ñ': '\x29',
'º': '\x2A',
'ª': '\x2B',
'\{er}': '\x2C',
#'\{er}': '\x2C',
'&': '\x2D',
'+': '\x2E',
'\{L.}': '\x34', # Italian
'\{Lv}': '\x34', # English
'\{Lv.}': '\x34', # German
'\{N.}': '\x34', # French
'\{Nv}': '\x34', # Spanish
#'\{L.}': '\x34', # Italian
#'\{Lv}': '\x34', # English
#'\{Lv.}': '\x34', # German
#'\{N.}': '\x34', # French
#'\{Nv}': '\x34', # Spanish
'=': '\x35',
';': '\x36', # European
'¿': '\x51',
'¡': '\x52',
'\{PKMN}': '\x53\x54',
'\{POKé}': '\x55\x56',
'\{POKéBLOC}': '\x55\x56\x57\x58\x59', # French
'\{POKéBLOCK}': '\x55\x56\x57\x58\x59', # English
'\{POKéCUBO}': '\x55\x56\x57\x58\x59', # Spanish
'\{POKéRIEGEL}': '\x55\x56\x57\x58\x59', # German
#'\{PKMN}': '\x53\x54',
#'\{POKé}': '\x55\x56',
#'\{POKéBLOC}': '\x55\x56\x57\x58\x59', # French
#'\{POKéBLOCK}': '\x55\x56\x57\x58\x59', # English
#'\{POKéCUBO}': '\x55\x56\x57\x58\x59', # Spanish
#'\{POKéRIEGEL}': '\x55\x56\x57\x58\x59', # German
'Í': '\x5A',
'%': '\x5B',
'(': '\x5C',
')': '\x5D',
'\{POKéMELLA}': '\x5E\x5F\x60\x61\x62', # Italian
'\{POKéMELLE}': '\x5E\x5F\x60\x61\x63', # Italian
#'\{POKéMELLA}': '\x5E\x5F\x60\x61\x62', # Italian
#'\{POKéMELLE}': '\x5E\x5F\x60\x61\x63', # Italian
'â': '\x68',
'í': '\x6F',
'': '\x79',
'': '\x7A',
'': '\x7B',
'': '\x7C',
'\{e}': '\x84', # European
#'\{e}': '\x84', # European
'': '\x85', # European
'': '\x86', # European
'\{re}': '\xA0', # European
#'\{re}': '\xA0', # European
'0': '\xA1',
'1': '\xA2',
'2': '\xA3',
@ -428,6 +428,18 @@ def utf8ToRSText(t, region = ""):
chars[''] = '\xB2'
result = ""
key = ''
for char in t:
result += chars[char]
if key != '':
key += char
if key in chars:
result += chars[key]
key = ''
continue
if char not in chars:
key = char
continue
result += chars[char]
return result