Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Convert Rune Factory 4 save file from 3DS to Switch

Featured Replies

  • Author
  • Localization

HenryEx, posted Wed Sep 23, 2020 10:57 pm (58840)


This is a first draft to convert a save file from Rune Factory 4 for the 3DS to a working save file for Rune Factory 4 Special for the Nintendo Switch.
The save format seems to have stayed mostly the same, but the Special save files are 128 bytes larger. I've tried to identify where this additional space is and adjust the data.

It's a bit wonky, and i haven't dissected the thousands of bitflags in the save file (the RF4 devs LOOOVE their tightly packed bitfields, nothing like seeing an array of 1000 unpadded 30-bit numbers), so i just kludge the memory a bit and hope that it works. The nature of constructing and comparing a 100kb save file for a 100 hour game across three different hardwares makes it a bit, uh...

Anyways, this script takes a 3DS RF4 save file (rf4a.sav, rf4b.sav, rf4c.sav) and converts it to an afaik mostly functional Switch RF4S save file (named rf4_sXX.sav, substitute your own slot number from 01-20).

I might expand the script to do the reverse eventually, but tbh, i highly doubt there's any practical demand for that. :lol:

https://pastebin.com/uNNGqtpv
  • Author
  • Localization

HenryEx, posted Wed Sep 23, 2020 10:59 pm (58841)


Here's version 1 of the script in full:

edit: small 0-day patch because i messed up the CRC calculation for the finished save file, of all things. It's fixed now.

Code:
# Rune Factory 4 (Special)
# Script to convert save files from RF4 to RF4S
# Version 1
#
# Written by HenryEx
#
# script for QuickBMS http://quickbms.aluigi.org
# See also: http://aluigi.altervista.org/bms/quickbms_crc_engine.txt

set PAD long 0xE0
set JANK long 0
get NAME filename
get FILESIZE asize

if FILESIZE != 0x22400  # RF4 file
  print "Filesize incorrect! Is: %FILESIZE|h%! Should be: 0x22400. Exiting..."
  CleanExit
endif

get FILECRC long
SavePos OFFSET
xmath SIZE "FILESIZE - OFFSET - PAD"

# check if the save is valid
encryption CRC 0xEDB88320 "32 -1 -1 0 0 1"
log MEMORY_FILE OFFSET SIZE
set NEWCRC long QUICKBMS_CRC

if FILECRC != NEWCRC
  print "CRC check failed! Script will only work on a valid save file! Exiting..."
  CleanExit
endif

encryption "" ""
log MEMORY_FILE 0 0
math SIZE 0x80

################################
# Assemble save file

append  # Append ON
log MEMORY_FILE 0 0x1E5D9
log MEMORY_FILE 0x1E55C 0x7D
log MEMORY_FILE 0x1E5D9 0x50  # we lose a byte here, i hope it wasn't important
log MEMORY_FILE 0x1E62A 0x20B6
goto 0x2075C MEMORY_FILE
put JANK long MEMORY_FILE # maybe this won't even horribly break eventually? let's just pray
log MEMORY_FILE 0x206E0 0x1D20
append  # Append OFF

encryption CRC 0xEDB88320 "32 -1 -1 0 0 1"
log MEMORY_FILE2 OFFSET SIZE MEMORY_FILE
encryption "" ""
set NEWCRC long QUICKBMS_CRC

goto 0 MEMORY_FILE
put NEWCRC long MEMORY_FILE

log "rf4_sXX.sav" 0 0x22480 MEMORY_FILE
CleanExit
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.