Repository navigation
Conversation
The Phantom Menace and Metal Gear Solid save to a memory card in port 1: saves/tpm_card1.mcd and saves/mgs_card1.mcd, raw 128 KB card images as PC emulators use, made the first time the game looks. Unlike save states, which hold raw memory and load only into the build that wrote them, these survive firmware updates. - tpm-decomp fea7648..d51af21: libmcrd natively on the card image (tested on the desktop and the board: a save from one build loaded into another); recomp.py treats a jr to the function's own return address as a return (the save screen's bit packer returns through $a3) - psyz 3245d54: mcd, the card image and the BIOS's buXX: device - mgs_reversing 6d58e9f: the port's bu00: device and memcard.c on it (the game finds the card at boot) - Cart::get_memory_card_path names the image after the game's directory Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
ESP-IDF Size Report for 'Tab5 Emu'
FLASH uses app .bin size or json2 flash sum. RAM sums DRAM+IRAM via idf_size. Percentages shown when totals are available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Phantom Menace and Metal Gear Solid can now save to a memory card in port 1. Each card is a raw 128 KB image on the SD card:
saves/tpm_card1.mcdsaves/mgs_card1.mcdThese are the same files PC emulators like DuckStation and ePSXe use, and the game makes one the first time it looks for a card.
Save states hold raw memory full of addresses, so they only load into the firmware build that wrote them (TPM) or one with the same layout (MGS). Card saves are the game's own data, so they survive any rebuild.
Changes
fea7648,d51af21):recomp.pynow treats ajrto the function's own return address as a return. The save screen's bit packer (0x80054D44) keeps its return address in$a3, and that path ended in a fatal "not a function" error.--memcard FILEandRT_PRESS_HOLD; the menus need holds of about 20 vblanks.3245d54ontpm):mcd, a card image layer (format, list, create, delete, read, write) plus the BIOS'sbuXX:file device.6d58e9fonesp32p4):bu00:to the card.memcard.c's card hardware calls are answered at once, through the handlers the BIOS events would have called.Cart::get_memory_card_path()names the file after the game's folder.Testing
bu00:device in the waymemcard.cuses it.SCheader with the title "PM00:02:Trade Federation Ship".🤖 Generated with Claude Code
https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY