diff --git a/script/eng/events/041_00_1.TXT b/script/eng/events/041_00_1.TXT index 2b1da8e..c955724 100644 --- a/script/eng/events/041_00_1.TXT +++ b/script/eng/events/041_00_1.TXT @@ -63,9 +63,9 @@ 31| | 32| -Your Majesty, we're certain about it.A red-haired witch is in a cave on the southwest path to Amberstep.| +Your Majesty, if I remember correctly, a red-haired witch is in a cave at the end of the side path between this town and Amberstep, right?| 33| -This is certain.The cavern was said to be in the southwest.| +Yes, the cavern was said to be in the southwest.| 34| | 35| diff --git a/src/buildcd/_build.sh b/src/buildcd/_build.sh index 2f685b8..7eb3bb6 100644 --- a/src/buildcd/_build.sh +++ b/src/buildcd/_build.sh @@ -31,6 +31,7 @@ cp "Princess Crown (Japan) (1M) (Track 01).bin" "$PATCHED_IMAGE_FILE" # patch font, items and names -> alters 0.BIN, KANJI.BIN source _patch_items.sh +#WIP: source _patch_items_vwf.sh # patch events 7z e -y "Princess Crown (Japan) (1M) (Track 01).iso" '*.EVN' @@ -59,8 +60,10 @@ cd-replace "$PATCHED_IMAGE_FILE" 015_00_1.EVN 015_00_1.EVN.fixed xdelta3 -f -d -s 176_00_0.EVN 176_00_0.EVN.xdelta 176_00_0.EVN.fixed cd-replace "$PATCHED_IMAGE_FILE" 176_00_0.EVN 176_00_0.EVN.fixed # temp. fix for PEOPLE FULL bug in Cado Bado (add missing cmds) https://github.com/eadmaster/pcrown/issues/71 -xdelta3 -f -d -s 041_00_1.EVN 041_00_1.EVN.xdelta 041_00_1.EVN.fixed -cd-replace "$PATCHED_IMAGE_FILE" 041_00_1.EVN 041_00_1.EVN.fixed +#xdelta3 -f -d -s 041_00_1.EVN 041_00_1.EVN.xdelta 041_00_1.EVN.fixed +#cd-replace "$PATCHED_IMAGE_FILE" 041_00_1.EVN 041_00_1.EVN.fixed +sfk partcopy 041_00_1.EVN 0x3DD 190 041_00_1.EVN.eng 0x3DD -yes +cd-replace "$PATCHED_IMAGE_FILE" 041_00_1.EVN 041_00_1.EVN.eng # temp. fix for softlock at dialog with the wizard turned into a frog () https://github.com/eadmaster/pcrown/issues/89 sfk setbytes 061_00_2.EVN.eng 0x1002 0x0190 -yes sfk setbytes 061_00_1.EVN.eng 0x1002 0x0190 -yes # not sure if really needed diff --git a/src/buildcd/_patch_items_vwf.sh b/src/buildcd/_patch_items_vwf.sh new file mode 100644 index 0000000..15547ca --- /dev/null +++ b/src/buildcd/_patch_items_vwf.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +export CD_PATH=../../cd +export TRANSLATED_SCRIPT_PATH=../../script/eng +#export PATCHED_IMAGE_FILE="Princess Crown (Japan) (1M) (Track 01) (English).iso" +export PATCHED_IMAGE_FILE="Princess Crown (Japan) (1M) (Track 01) (patched).bin" + +7z e -y "Princess Crown (Japan) (1M) (Track 01).iso" KANJI.BIN +7z e -y "Princess Crown (Japan) (1M) (Track 01).iso" 0.BIN + +# unnecessary: +# fontgen -2 -b ${BMFONTGEN} ${FONTGEN_DIR}/pcrown.txt -o KANJI.BIN +# fontgen [options] [filename].txt -o [filename].bin +#wine prgutil.exe [options] [list of prg or text files] + +# inject VWF code https://github.com/eadmaster/pcrown/issues/99 +# satcode_insert.exe compiled_code.bin(patch file) target_file.bin +wine satcode_insert.exe ../satcode.old/satcode_patch.bin 0.BIN + +# patch the font +xdelta3 -f -d -s KANJI.BIN KANJI.BIN.xdelta KANJI_ENG.BIN # apply English font patch + +# patch items and names +iconv -f UTF-8 -t SHIFT-JIS ${TRANSLATED_SCRIPT_PATH}/items.txt -o ${TRANSLATED_SCRIPT_PATH}/items.txt.sjis +wine itemsutil.exe -i ${TRANSLATED_SCRIPT_PATH}/names.txt ${TRANSLATED_SCRIPT_PATH}/items.txt.sjis 0.BIN KANJI_ENG.BIN 0xEA0 # 0xEA0 = starting write offset in KANJI_ENG.BIN, ranges are in itemsutils/main.cpp + +# fix Engrish text in main program (opening, etc) https://github.com/eadmaster/pcrown/issues/94 +# "A LONG LONG AGO..." -> "LONG LONG AGO..." +sfk setbytes 0.BIN 0xACC85 "LONG LONG AGO... " -yes +# PROSERPINA RUN A WAY AT TOP SPEED -> PROSERPINA RAN AWAY AT FULL SPEED +sfk setbytes 0.BIN 0xACDFD "RAN AWAY AT FULL" -yes +# "PARSONS HAPPENED TO BE REAL PORTGUS" -> "PARSON HAPPENED TO BE PORTGUS " +sfk setbytes 0.BIN 0xACE35 "PARSON HAPPENED TO BE " 0x04 "PORTGUS " -yes +# "BUT THIS CAUSED THE GATE TO UNDERWORLD" -> "AND THIS OPENED THE DEMON REALM'S GATE" +sfk setbytes 0.BIN 0xACE91 "AND" -yes +sfk setbytes 0.BIN 0xACE9A "OPEN" -yes +sfk setbytes 0.BIN 0xACEA5 0x04 -yes +sfk setbytes 0.BIN 0xACEA6 "DEMON REALM'S GATE" -yes +# "GRADRIEL WENT TO FACE THE GREATERDEMONS" -> "GRADRIEL WENT TO FACE THE DEMON KING" +sfk setbytes 0.BIN 0xACED8 "DEMON KING " -yes +# "FALLDOWN FROM THE BOOKWORLD" (gameover screen) -> "FALLEN FROM THE BOOKWORLD" +sfk setbytes 0.BIN 0xACC3A "E" -yes +sfk setbytes 0.BIN 0xACC3C "N" -yes +sfk setbytes 0.BIN 0xACC3E " " -yes +sfk setbytes 0.BIN 0xACC40 " " -yes + +# fix Engrish in the save manager https://github.com/eadmaster/pcrown/issues/94 +# "The SAVE-FILE has crashed." -> "The SaveFile is corrupted" +sfk setbytes 0.BIN 0xA4099 "FILE is corrupt" -yes +# "BACK-UP RAM is lacking." -> "BACK-UP RAM is full. " +sfk setbytes 0.BIN 0xA40E0 "full. " -yes + +# statically enable debug mode (press Start on 2nd pad to navigate event files) https://web.archive.org/web/20200918203538/https://github.com/cyberwarriorx/pcrown/wiki/Debugging +#sfk setbytes 0.BIN 0x1EB7F 0x01 -yes + +# add splashscreen -> freezes with cheats enabled during boot https://github.com/eadmaster/pcrown/issues/96 +#mv 0.BIN 0_org.BIN +#wine mksplash.exe ../mksplash/splash_loader.bin ../mksplash/splash.bmp 0_org.BIN 0.BIN +#rm 0_org.BIN + +# add version number in title screen https://github.com/eadmaster/pcrown/issues/96 +# "@SEGA ENTERPRISES,LTD.& ATLUS,1997" -> "@SEGA & ATLUS,1997 T-ENG V0.8.1" +sfk setbytes 0.BIN 0xA4137 "& ATLUS,1997 T-ENG V0.8.2" -yes + +cd-replace "$PATCHED_IMAGE_FILE" 0.BIN 0.BIN +cd-replace "$PATCHED_IMAGE_FILE" KANJI.BIN KANJI_ENG.BIN diff --git a/src/buildcd/satcode_insert.exe b/src/buildcd/satcode_insert.exe new file mode 100755 index 0000000..4f5cd71 Binary files /dev/null and b/src/buildcd/satcode_insert.exe differ diff --git a/src/satcode-insert.old/CMakeLists.txt b/src/satcode-insert.old/CMakeLists.txt.old similarity index 100% rename from src/satcode-insert.old/CMakeLists.txt rename to src/satcode-insert.old/CMakeLists.txt.old diff --git a/src/satcode-insert.old/_build.sh b/src/satcode-insert.old/_build.sh new file mode 100644 index 0000000..02fde3a --- /dev/null +++ b/src/satcode-insert.old/_build.sh @@ -0,0 +1,3 @@ + + +x86_64-w64-mingw32-g++ -w -fpermissive *.c -lcomdlg32 -lmingw32 -o ../buildcd/satcode_insert.exe diff --git a/src/satcode.old/CMakeLists.txt b/src/satcode.old/CMakeLists.txt.old similarity index 100% rename from src/satcode.old/CMakeLists.txt rename to src/satcode.old/CMakeLists.txt.old diff --git a/src/satcode.old/_build.sh b/src/satcode.old/_build.sh new file mode 100644 index 0000000..a2ffddf --- /dev/null +++ b/src/satcode.old/_build.sh @@ -0,0 +1,11 @@ + +# PRE: install into $HOME/opt/sh2-elf-gcc https://github.com/kentosama/sh2-elf-gcc + +export PATH="${PATH}:$HOME/opt/sh2-elf-gcc/sh2-toolchain/bin" +export KPITOUTPUT=elf + +sh2-elf-gcc -o satcode_patch.elf patch.s -O2 -Wall -m2 -nostartfiles -Wl,--script,bart.lk -Wl,-Map,main.map +# --small + +# Generating stripped patch.bin +sh2-elf-strip satcode_patch.elf --strip-all --output-target=binary -o satcode_patch.bin