Browse files

th16 v0.01a: Add safe sprintf (and translation) for high score and re…

…play menus.

We did it! TH16 thcrap support, 100% done on Day 1. Total time:
12 hours, 25 minutes, and 24 seconds. Including breaks and a fair amount
of general fooling around.

While this was the first time we pulled this of, this *was* kind of
slow. ZUN's change to Visual Studio 2015 meant that basically all of the
binary hacks and breakpoints had to be done from scratch.

Notable changes in difficulty as far as thcrap support is concerned:

* Safe sprintf, although it required a new build to be released today,
  has now become as easy as it can possibly be, requiring only two
  instructions to be modified.

* The dialog textbox width calculation now no longer includes absolute
  addresses, which means it's likely to be only one hack for every
  version of a game. (Which is pretty great, as it is one of the more
  complicated hacks.)

* Proper Ruby support got a little bit harder and now requires a custom
  binary hack for each game version.
  • Loading branch information...
nmlgc committed May 7, 2017
1 parent 3320fbc commit c267373834c7ea57bce50a0e06449c1ced8cce48
Showing with 10 additions and 2 deletions.
  1. +2 −2 base_tsa/files.js
  2. +4 −0 base_tsa/th16.js
  3. +4 −0 base_tsa/th16.v0.01a.js
@@ -136,8 +136,8 @@
"th15_custom/dialog_103.js": 2438523396,
"th15_custom/dialog_3.js": 2438523396,
"th15_custom/stringlocs.v1.00a.js": 1503611542,
"th16.js": 1391088844,
"th16.v0.01a.js": 1341428642,
"th16.js": 3676119430,
"th16.v0.01a.js": 1510182467,
"th16/ascii/ascii_960.png": 2497078814,
"th16/dialog_203.js": 2545567094,
"th16/dialog_204.js": 2545567094,
@@ -13,6 +13,10 @@
"title": "Safe Visual Studio 2015-style sprintf (esp+3c)",
"code": "e8[strings_vsprintf_msvcrt14]8944243c"
"sprintf_msvcrt14_ebp-10c": {
"title": "Safe Visual Studio 2015-style sprintf (ebp-10c)",
"code": "e8[strings_vsprintf_msvcrt14]8985f4feffff"
"music_title_prepare": {
"code": "8b4c241c 51 31c0 50 50 50"
@@ -9,8 +9,12 @@
"sprintf_msvcrt14_esp+3c": {
"addr": "Rx67509"
"sprintf_msvcrt14_ebp-10c": {
"addr": "Rx0824f"
"sprintf_rep": {
"addr": [

0 comments on commit c267373

Please sign in to comment.