Super Mario 3D All-Stars: Difference between revisions
(10 intermediate revisions by 2 users not shown) | |||
Line 56: | Line 56: | ||
*** "06_UNSMJ3.002.lua": This is the "ROMPATCH" Lua file referenced by the .meta. | *** "06_UNSMJ3.002.lua": This is the "ROMPATCH" Lua file referenced by the .meta. | ||
*** "07_UNSMJ3.002.ppl": This is the "PIPELINE" file referenced by the .meta. | *** "07_UNSMJ3.002.ppl": This is the "PIPELINE" file referenced by the .meta. | ||
== Emulation Notes == | |||
The generated-code runs from the main-thread. The following 4 threads are created: | |||
* Audio thread. | |||
* "g_trlRenderTaskThread". Calls funcptr/object-vfunc from a list of tasks (funcptr/object only used if set), where the tasks are sent by the main-thread. These tasks can be triggered by accessing various IO regs with Write32 (see below), etc. | |||
* A thread which basically does nothing, just uses a Semaphore and sleeps, while checking state. | |||
* An unknown thread. | |||
* <code>n64MemDefault{Read/Write}{bitsize}(...)</code>, where bitsize is {8, 16, 32, 64}: implements memory read/write, all read/written data is byte-swapped. First param is the u32 vaddr. For Write, the second param is the value. For Read, the returned u32 is the read value. | |||
* <code>n64MemDefaultReadSpecial{bitsize}(...)</code>, where bitsize is {8, 16, 32, 64}: same as <code>n64MemDefaultRead{bitsize}</code>, except this runs the additional Special functionality when accessing RAM. | |||
* <code>n64MemDefault{Read/Write}{bitsize}WithDestLog(...)</code>, where bitsize is {8, 16, 32, 64}: same as <code>n64MemDefault{Read/Write}{bitsize}</code>, except this calls an additional logging func when accessing RAM. | |||
* Read8/Write8 only implements access for RAM and SP_DMEM/SP_IMEM. 0 is returned for Read when the address is unrecognized. | |||
* Read16/Write16 only implements access for RAM. Read16WithDestLog/Write16WithDestLog will additionally call the logging func if the address is in the IO region (high byte is 0x04). 0 is returned for Read when the address is unrecognized. | |||
* Read32/Write32 implements RAM access and all supported non-RAM IO/memory access. 0 is returned for Read when the address is unrecognized. | |||
* Read64/Write64 are implemented the same as *16 above, except this is for 64bit. | |||
== EmuSystemJITPlugin == | == EmuSystemJITPlugin == | ||
Line 120: | Line 138: | ||
| 0x6D8 || 0x8 || Funcptr: <code>n64CPUGetRegisterCP0(int)</code> | | 0x6D8 || 0x8 || Funcptr: <code>n64CPUGetRegisterCP0(int)</code> | ||
|- | |- | ||
| 0x6E0 || 0x20 || Funcptrs for reading data: <code>n64MemDefaultRead{bitsize}(unsigned int)</code>, where bitsize is {8, 16, 32, 64} (32 uses <code>n64MemDefaultRead32WithDestLog</code>). | | 0x6E0 || 0x20 || Funcptrs for reading data: <code>n64MemDefaultRead{bitsize}(unsigned int)</code>, where bitsize is {8, 16, 32, 64} (32 uses <code>n64MemDefaultRead32WithDestLog</code>). Unused by the plugin. | ||
|- | |- | ||
| 0x700 || 0x20 || Funcptrs for reading Special data: <code>n64MemDefaultReadSpecial{bitsize}(unsigned int)</code>, where bitsize is {8, 16, 32, 64}. | | 0x700 || 0x20 || Funcptrs for reading Special data: <code>n64MemDefaultReadSpecial{bitsize}(unsigned int)</code>, where bitsize is {8, 16, 32, 64}. | ||
|- | |- | ||
| 0x720 || 0x20 || Funcptrs for writing data: <code>n64MemDefaultWrite{bitsize}(unsigned int, ...)</code>, where bitsize is {8, 16, 32, 64} (32 uses <code>n64MemDefaultWrite32WithDestLog</code>). | | 0x720 || 0x20 || Funcptrs for writing data: <code>n64MemDefaultWrite{bitsize}(unsigned int, ...)</code>, where bitsize is {8, 16, 32, 64} (32 uses <code>n64MemDefaultWrite32WithDestLog</code>). Unused by the plugin. | ||
|- | |- | ||
| 0x740 || 0x20 || Funcptrs for reading data via the WithDestLog version: <code>n64MemDefaultRead{bitsize}WithDestLog(unsigned int)</code>, where bitsize is {8, 16, 32, 64}. | | 0x740 || 0x20 || Funcptrs for reading data via the WithDestLog version: <code>n64MemDefaultRead{bitsize}WithDestLog(unsigned int)</code>, where bitsize is {8, 16, 32, 64}. | ||
Line 165: | Line 183: | ||
This emulator supports arguments with argc/argv, when launched officially zero [[Loader_services#SetProgramArgument|arguments]] are passed for this (unless [[Loader_services#SetProgramArgument|SetProgramArgument]] is used manually prior to launching). The emulator will also load arguments from RomFs "/default_cmd.txt" when argc==1, otherwise it loads arguments from a filepath loaded elsewhere. Hence, when not launched with arguments with an official launch, "/default_cmd.txt" is not used. Some of the supported arguments are: | This emulator supports arguments with argc/argv, when launched officially zero [[Loader_services#SetProgramArgument|arguments]] are passed for this (unless [[Loader_services#SetProgramArgument|SetProgramArgument]] is used manually prior to launching). The emulator will also load arguments from RomFs "/default_cmd.txt" when argc==1, otherwise it loads arguments from a filepath loaded elsewhere. Hence, when not launched with arguments with an official launch, "/default_cmd.txt" is not used. Some of the supported arguments are: | ||
* ... | {| class="wikitable" | ||
|- | |||
! Argument !! Description | |||
|- | |||
| --volume=<0..100> || Set sound volume (default: 100). | |||
|- | |||
| --disable-file-cache || Disable file cache if supported by the platform. | |||
|- | |||
| --no-dol-hash || Do not calculate DOL hash (unsafe) | |||
|- | |||
| --screenshot-period=<value>, -sp || Takes screenshots every n frame | |||
|- | |||
| --screenshot-write-queue-thread-count=<0..n> || Change the number of threads allocated to the screenshot write queue, 0 to disable (default: 1). | |||
|- | |||
| --delete-after-load || Delete save state after a successful load. | |||
|- | |||
| --listen-port=<port> || Specify the service port to listen to (default: 1234). | |||
|- | |||
| --card-uncompressed || Do not compress card. | |||
|- | |||
| --sync-guest-none || Don't synchronize emulation, run as fast as possible. | |||
|- | |||
| --gecko-patch=<name> || Apply Gecko patch <name> | |||
|- | |||
| --log=<file> || Log to file instead of stdout. Defaults to stdout | |||
|- | |||
| --rootdir=<path>, -r<path> || Set the root directory | |||
|- | |||
| --no-patch || Do not apply standard patch | |||
|- | |||
| --stop-failed-test[=<number>] || Stop subtests after <number> differences (default 10). | |||
|- | |||
| --exit=<value>, -e || Exit after n frames | |||
|- | |||
| --help, -h || Print usage and exit. | |||
|- | |||
| --mute || Start ROM with mute sound. | |||
|- | |||
| --sync-guest-with-wall || Synchronize emulation with wall time. | |||
|- | |||
| --sync-guest-with-host || Synchronize emulation with host. | |||
|- | |||
| --test=<filename>, -t || Starts emulator in unit test mode. | |||
|- | |||
| --no-pip || Don't use pipeline database. | |||
|- | |||
| --play-input || Play previously recorded input | |||
|- | |||
| --command=<file> || Use file as the contents of the command line (one arg per line). | |||
|- | |||
| --dim-screen-after=<s> || Dim screen after <s> seconds of inactivity. | |||
|- | |||
| --random-inputs-period=<0..n> || Change the random inputs period in number of frames (default: 10). | |||
|- | |||
| --config=<filename>, -cfg || Gives path to the config file | |||
|- | |||
| --ask, -a || Ask for a rom and execute it. | |||
|- | |||
| --load-state-slot=<index>, -lss<index> || Load save state by index. | |||
|- | |||
| --load-state-file=<filename>, -lsf<filename> || Load save state by filename. | |||
|- | |||
| --generatetest=<directory>, -gt || Starts emulator in unit test mode and generate output files inside the given directory. | |||
|- | |||
| --waitcontroller, -wc || Stop CPU until controller 0 has been detected | |||
|- | |||
| --card-format=<size_in_Mbits> || Format card using given size in MBits (default 4, possible 8, 16, 32, 64, 128). | |||
|- | |||
| --card-force-copy || Force card copy from read-only support to read-write support (on supported platforms). | |||
|- | |||
| --screenshot-output-format=[png|ppm] || Change the format of the screenshots when using the generic screenshot capture code (default: png). | |||
|- | |||
| --config-override || Use a specific config override filename. | |||
|- | |||
| --random-inputs || Use random inputs instead of values from physical controllers. | |||
|- | |||
| --log-unit-test || Enable log in unit test mode. | |||
|- | |||
| --break-on-start, -bos || Break at the start of the rom. | |||
|- | |||
| --record-input || Record input | |||
|- | |||
| --screenshot-write-queue-capacity=<1..n> || Change the capacity of the screenshot queue (default: thread-count * 2 + 1). | |||
|- | |||
| --random-inputs-seed=<0..n> || Change the random inputs seed value (default: 0). | |||
|- | |||
| --listen-address=<address> || Specify the service address to listen to (default: 0.0.0.0). | |||
|- | |||
| --gui, -gui || Use the GUI mode | |||
|- | |||
| --break-on-start-dsp, -bosd || Break at the start of the dsp program. | |||
|- | |||
| --no-db-config || Do not use the ROM DB config override. | |||
|- | |||
| --features || Print features and exit. | |||
|- | |||
|} | |||
This emulator uses various hashes, SHA-1 is used for this. | This emulator uses various hashes, SHA-1 is used for this. | ||
Line 244: | Line 358: | ||
** "/<language>/LayoutData/Font.arc": Updated. | ** "/<language>/LayoutData/Font.arc": Updated. | ||
** "/LayoutData/CameraInfo.arc", "/LayoutData/IconAButton.arc", "/StationedData/GDDR3.arc", "/StationedData/GDDR3.zst": Updated. | ** "/LayoutData/CameraInfo.arc", "/LayoutData/IconAButton.arc", "/StationedData/GDDR3.arc", "/StationedData/GDDR3.zst": Updated. | ||
== v1.1.0 == | |||
ExeFs: | |||
* Updated for using SDK 10.8.1.0, except for SuperMarioSunshine/SuperMarioGalaxy. | |||
* NPDMs for all Programs only had the usual update (see [[#v1.0.1]]). | |||
** Launcher: All files in ExeFs were updated. | |||
** SuperMario64: All files in ExeFs were updated, except subsdk*. | |||
** SuperMarioSunshine/SuperMarioGalaxy: Only main-codebin and the NPDM were updated. | |||
RomFs: | |||
* Launcher: The following was updated: | |||
** /Layout/CursorArrow.Nin_NX_NVN.blarc.zs | |||
** /Layout/DialogKeyButton.Nin_NX_NVN.blarc.zs | |||
** /Layout/DialogTwoButton.Nin_NX_NVN.blarc.zs | |||
** /Message/Msg_CNzh.d.sarc.zs | |||
** /Message/Msg_JPja.d.sarc.zs | |||
* SuperMario64: The following was updated: | |||
** /nro/05_UNSMJ3.002.nro | |||
** /nro/EmuSystemJITPlugin.nro | |||
*** This appears to be just a rebuild. A func called by _fini/etc was updated, nothing else specific to the plugin was changed in .text. The .nrs build filepath was also changed. | |||
** /nro/NROBuilder.nro | |||
** /.nrr/04_UNSMJ3.002.nrr | |||
** /.nrr/EmuAppNX64.nrr | |||
** /Pipeline.cache | |||
** "/rom/Stardust_JP/00_UNSMJ3.002.meta" Newlines now use LF instead of CRLF. | |||
** "/rom/Stardust_JP/02_UNSMJ3.002.cfg" Newlines now use LF instead of CRLF. The content of the "Comment" entries under "SpecialInst" had the string characters replaced with '*' (for redacting the string). The Lua hook entries were updated under "SpecialInst". The "Comment" entries under "VertexHack" were redacted the same way, nothing else changed under "VertexHack". | |||
** /rom/Stardust_JP/04_UNSMJ3.002.nrr | |||
** /rom/Stardust_JP/05_UNSMJ3.002.nro | |||
** "/rom/Stardust_JP/06_UNSMJ3.002.lua" Newlines now use LF instead of CRLF. Comments were redacted, see above. HookFunc_AfterInst was updated for handling the updated hooks mentioned above. | |||
* SuperMarioSunshine: | |||
** "/data/database/config/MarioSunshine.config" The config entries for "KeyPadAxisTriggerLeft"/"KeyPadAxisTriggerRight" were updated. | |||
** "/data/gekko/MarioSunshine/nx/MarioSunshine.nrolz" updated | |||
** The following files were added under "/data/lazy_texture_replace/MarioSunshine/": | |||
*** 5323227429978722713_lod1.png | |||
*** 5323227429978722713_lod2.png | |||
*** 5323227429978722713_lod3.png | |||
*** 5323227429978722713.png | |||
** "/hagi-override.config" Formatting was adjusted. | |||
** "/MarioSunshine/Super_Mario_Sunshine_Stardust-trimmed.gcm" updated | |||
** "/.nrr/Hagi.nrr" updated | |||
** "/rom.json" The DolHash was updated. | |||
* SuperMarioGalaxy: The only change was removing the following files from "/StationedData/": | |||
** DEBUG.arc | |||
** DEBUG.zst | |||
** GDDR3.arc | |||
** NAPA.zst | |||
The Manual RomFs for each game was also updated. | |||
DeltaFragment NCAs were also added. | |||
== v1.1.1 == | |||
ExeFs: | |||
* NPDMs for all Programs only had the usual update (see [[#v1.0.1]]). | |||
* The only other change was updating the main-codebin for SuperMario64. | |||
RomFs: ... | |||
== v1.1.2 == | |||
ExeFs: | |||
* NPDMs for all Programs only had the usual update. | |||
RomFs: ... | |||
= Savedata = | = Savedata = | ||
Line 257: | Line 434: | ||
** "B1317A6632265CF763766CF6339AC8D1.cache": This is probably graphics pipeline related?(RomFs has an identical file) | ** "B1317A6632265CF763766CF6339AC8D1.cache": This is probably graphics pipeline related?(RomFs has an identical file) | ||
* "/MarioGalaxy/GameData.bin": The savedata for SuperMarioGalaxy. | * "/MarioGalaxy/GameData.bin": The savedata for SuperMarioGalaxy. | ||
= Other Applications = | |||
See also [[Nintendo_64_-_Nintendo_Switch_Online|N64-NSO]]. | |||
hagi is also used by the following: | |||
* "Pikmin 1" and "Pikmin 2" (Wii emulation) |