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.

Ao no Kanata no Four Rhythm (Vita) - issues repacking script.rom

Featured Replies

  • Author
  • Localization

tissue, posted Sun May 14, 2023 2:38 am (76764)


Hi, I've been interested in porting the PC translation of Aokana to the Vita but I've been having some issues with repacking. Unpacking isn't very complicated but for some reason when repacking with edited files, the game seems to skip over which ever "chapter" was edited (i edited prologue text, prologue is skipped and game jumps to chapter 1) but it still seems to be able access other parts of data from the file as the game instead continues from that portion (this I am not 100% sure of because it seems like the same dialogue text exists in multiple different files, though this may be because the sentence I was searching isn't exactly the most unique). Since I haven't written anything to repack the script, what I'm doing is simply just replacing the bytes of the previous data with the new data and editing the necessary fields (that I know of at least). I assume the issue stems from not editing a necessary field but I can't seem to find what exactly I'd be missing. For areas of data in the .rom file, the format is (header) (compressed size) (uncompressed size) (compressed zlib data). The only difference in my edited data is that the compressed size is different but because the data is padded to a multiple of 1024, no pointers or anything should have been moved and the original file is still the same size because there are a lot of excess padding bytes after pasting in the edited data. As for the uncompressed version of the file, I'm only replacing existing characters and not adding or deleting any new ones, so the size of the uncompressed file stays the same and all the old text should be in the same location.

Each .rom file seems to have it's corresponding .map file. Since I couldn't find anything in the .rom file, I assume the other field I would need to edit would lay in the .map file. The only useful piece of information that I have gathered from the .map file is that it contains the file size of the .rom file, the number of files, and also seems to contain the different directories which the .rom file should split into but otherwise I haven't found anything else of use. Something else that I have noticed are the at the actual script files seem to have the dialogue lines out of order which I'm not really sure how I would deal with, so if anyone knows what I would look for to fix that please let me know as there are still many things about reverse engineering that I am not knowledgeable at. Here are the files for the script.rom and it's corresponding .map file and the python script to extract. I've also added another .rom file that's much smaller in size as it may be easier to look at: https://drive.google.com/file/d/1N8gnamM-DO4ggl4PPpGDVOG8L3O9yYUf/view?usp=sharing
Any help is greatly appreciated!
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.