]> Chaos Git - corbenik/corbenik.git/commitdiff
Fix up langemu path (it changed) and make langemu data part of release builds rel3
authorchaoskagami <chaos.kagami@gmail.com>
Sun, 5 Jun 2016 05:18:22 +0000 (01:18 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Sun, 5 Jun 2016 05:34:30 +0000 (01:34 -0400)
Makefile
README.txt
external/loader/source/patcher.c
host/generate_langemu_conf.sh
host/symtab.sh [deleted file]

index 1cdd6c186185be9159b7755c5d36141dadfe7a8f..8414d4560015c982f2594f5bef5702dea75fb91d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,9 @@ objects_cfw = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \
 all: a9lh patch external
 
 .PHONY: full
-full: host/langemu.conf all
+full: all out/corbenik/locale
+       cp README.txt out/
+       cd out && zip -r9 release.zip *
 
 .PHONY: external
 external:
@@ -49,11 +51,9 @@ a9lh: $(dir_out)/arm9loaderhax.bin
 reformat:
        clang-format -i $(dir_source)/*.{c,h} $(dir_source)/*/*.{c,h} external/loader/source/*.{c,h}
 
-host/langemu.conf:
-       echo "Generating langemu.conf - may take a bit"
-       cd host && ./generate_langemu_conf.sh
-       mkdir -p $(dir_out)/corbenik/etc
-       cp host/langemu.conf $(dir_out)/corbenik/config/langemu.conf
+out/corbenik/locale: all
+       echo "Generating langemu data from 3dsdb - may take a bit"
+       cd out/corbenik && ../../host/generate_langemu_conf.sh
 
 .PHONY: clean
 clean:
index 657e2a91d1a1e3d6b17876d32dcb59fbfcce411c..f1df93adf18d6db0bf5208067724017d5fa16398 100644 (file)
@@ -29,16 +29,22 @@ Old 3DS (Native FIRM, 11.0):
 New 3DS (Native FIRM, 11.0):
   http://nus.cdn.c.shop.nintendowifi.net/ccs/download/0004013820000002/00000021
 
-You'll need the firmkey for it as well unless you have decrypted it, which should
-be placed at `/corbenik/keys/native.key`. I can't tell you how to get it
-obviously, but a good place to start may be an older version of Plailect's guide
-when it still had a section on Cakes.
+You'll need the firmkey for it as well unless you have decrypted your firmware,
+and it should be placed at `/corbenik/keys/native.key`. I can't tell you how to
+get it obviously, but a good place to start may be an older version of Plailect's
+guide when it still had a section on Cakes.
 
 On New3DS units, there's additional crypto on arm9loader which requires the 9.6
 key to decrypt. It usually is named ``Slot0x11Key96.bin`, and I also can't tell
 you where to find this, aside from "check Plailect's guide." Corbenik will
 attempt to read this from the root as well as `/corbenik/keys/11.key`.
 
+The folder `corbenik/locale` is automatically generated language emulation
+files from 3dbrew for games that only specify one region and one language.
+Games which support more than one language are not generated, because there's
+no 'correct' language. You can remove this if the number of files unnerves
+you. It isn't required.
+
 Setup
 -------------------------
 
@@ -67,9 +73,10 @@ You'll also want these patches, which are done by loader and therefore require i
 
 If you're on 11.0, you also want these:
 
- * Title Downgrade Fix
+ * Title Downgrade Fix (Only enable with 11.0 firmware - others will fail)
 
-If you're deliberately still running 10.4 or something, you'll want these:
+If you're deliberately still running older firmware on your NAND, you'll
+want these:
 
  * Fake Friends Version
 
index a6c6396988b5361fb1525b265a145a6a286409da..aa32f54df553f6f339c9e473f129867742e3447d 100644 (file)
@@ -96,8 +96,8 @@ loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageId)
 
     // This really does need a rewrite.
 
-    char path[] = "/corbenik/etc/locale/0000000000000000";
-    u32 i = 36;
+    char path[] = "/corbenik/locale/0000000000000000";
+    u32 i = 32;
     while (progId) {
         static const char hexDigits[] = "0123456789ABCDEF";
         path[i--] = hexDigits[(u32)(progId & 0xF)];
index 5354778d815e8dccb744317d980472fa64e19b1b..c03463611faa03ca9002300f9c6f3464c25f8d78 100755 (executable)
@@ -4,6 +4,8 @@
 # a langemu config for single-language single-region games, which can have langemu
 # without any ill consequences.
 
+rm -rf locale
+
 # Fetch XML.
 wget "http://3dsdb.com/xml.php" -O 3ds.tmp
 
@@ -27,12 +29,13 @@ while true; do
     if [ ! $R = 0 ]; then
       # Only one language found, since no comma.
       # Output an entry.
-      echo "$titleid $region $languages" | tr [:lower:] [:upper:] | sed -e 's|GER|EUR|g' -e 's|ITA|EUR|g' -e 's|FRA|EUR|g' -e 's|UKV|EUR|g' -e 's|NLD|EUR|g' -e 's|WLD|JPN|g' >> langemu.tmp
+      mkdir -p locale
+      echo "$region $languages" | tr [:lower:] [:upper:] | sed -e 's|GER|EUR|g' -e 's|ITA|EUR|g' -e 's|FRA|EUR|g' -e 's|UKV|EUR|g' -e 's|NLD|EUR|g' > "locale/$titleid"
       ENTS=$((ENTS + 1))
     fi
   fi
 done 3<titleid.tmp 4<region.tmp 5<languages.tmp
 
-echo "# Autogenerated - $(date) - $ENTS entries" > langemu.conf
-cat langemu.tmp | sort | uniq >> langemu.conf
-rm -f *.tmp
+echo "$(date) - $ENTS entries" > locale/info
+
+rm *.tmp
diff --git a/host/symtab.sh b/host/symtab.sh
deleted file mode 100755 (executable)
index 35e185d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-echo "// This file is automatically generated. Don't edit it."
-echo "#ifndef __SYMTAB_H"
-echo "#define __SYMTAB_H"
-grep '                0x00000000........                ' build/link.map | \
-       while read sym; do
-       declare -a dat
-       dat=($sym)
-       offs=${dat[0]}
-       name=${dat[1]}
-
-       offs="$(echo "$offs" | sed 's|00000000||g')"
-
-       if [ "$name" != "." ]; then
-               echo "  #define ${name}_offset ((void*)${offs})"
-       fi
-done
-echo "#endif"