-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
323 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Frame Dump File Structure: | ||
Note 1: Data can optionally be embedded into a png, if so, it should be done in a chunk with the name: "ndSf". (capitalization matters.) | ||
Note 2: All data fields should be formatted in little endian. | ||
arrays (tables?) should be formatted as data 0 > 1 > 2 > 3. (though individual entries in the array should still be little endian.) | ||
|
||
|
||
Header: | ||
Note: Header should remain uncompressed. | ||
|
||
5 bytes - magic number ---- should always be "NTRFD". (maybe we'll add TWLFD in the future if any key dsi specific quirks are discovered?) | ||
2 bytes - version --------- check main.h for CUR_FD_REV define. | ||
1 byte - compressiontype -- currently unused, should always be set to 0. (uncompressed) | ||
|
||
|
||
Global Variables: | ||
Should be saved when registers are latched. (ie. right before rendering.) | ||
|
||
2 bytes - disp3dcnt | ||
16 bytes - edge colors | ||
1 byte - alpha test ref | ||
4 bytes - clear color | ||
4 bytes - clear depth/offset (stored in one variable) | ||
4 bytes - fog color | ||
2 bytes - fog offset | ||
32 bytes - fog table | ||
64 bytes - toon table | ||
|
||
|
||
Initial State Variables: | ||
Should be saved before the first command in a frame is sent. | ||
(Should we only define the used bits of the command, or the full 32 bits?) | ||
|
||
2 bytes - zero dot display | ||
4 bytes - polygon attributes | ||
4 bytes - polygon attributes unset | ||
4 bytes - vertex color | ||
4 bytes - viewport | ||
64 bytes - projection stack | ||
2048 bytes - position stack | ||
2048 bytes - vector stack | ||
64 bytes - texture stack | ||
64 bytes - projection mtx | ||
64 bytes - position mtx | ||
64 bytes - vector mtx | ||
64 bytes - texture mtx | ||
4 bytes - matrix mode | ||
4 bytes - polygon | ||
4 bytes - vertex xy | ||
2 bytes - vertex z | ||
4 bytes - texture coordinates | ||
4 bytes - texture parameters | ||
4 bytes - texture palette | ||
4 bytes - diffuse/ambient | ||
4 bytes - specular/emissive | ||
128 bytes - shininess table | ||
16 bytes - light vectors | ||
16 bytes - light colors | ||
4 bytes - swap buffers params | ||
7 bytes - vram control regs - only 7 are actually saved/loaded/used. banks h and i are ignored | ||
|
||
|
||
Vram State: | ||
(Up to) 608 KiB of vram state | ||
Note: vram state is ONLY saved/loaded for ACTIVE vram banks that're being used for 3d textures/texture palettes | ||
(ie. Last bit of vramcnt must be set and the value of the mst must be 3). | ||
(Additionally banks H and I are ignored due to not being allocatable to the 3d engine). | ||
|
||
|
||
Param/Cmd Counts: | ||
|
||
4 bytes - number of cmds submitted | ||
4 bytes - number of params submitted | ||
|
||
Cmd/Param Data: | ||
only store a maximum of 500KB of param/cmd data | ||
all cmds should be stored in one consecutive block followed by a block of param data | ||
nops and vec/box tests should not be added to any of these trackers | ||
id 0x72 is repurposed to store zero dot disp reg writes | ||
|
||
1 byte per - cmd | ||
4 bytes per - param |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
A tool to replay frame dumps captured in emulator, supports playback on real hardware. | ||
- By Jakly | ||
|
||
Building: | ||
Use blocksds. | ||
Also make a folder called "fs" because i think it needs that to build without complaining. | ||
Frame dump data can be embedded into the romfs by building with it placed into a folder named "fs". | ||
|
||
Loading Frame Dumps: | ||
Frame dumps can be loaded from either root of sd, romfs, or flashcart. | ||
Frame dumps will be loaded from a folder in root called "framedumps", should it exist. (does not apply to romfs). | ||
|
||
Generating Frame Dumps: | ||
Frame dumps can be generated from certain emulators. | ||
Supported Emulators Include: | ||
melonDS (not merged yet) --- https://github.com/melonDS-emu/melonDS/actions?query=branch%3Aframedump |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ enum Cmd_IDs | |
Vtx10, | ||
VtxXY, | ||
VtxXZ, | ||
VTXYZ, | ||
VtxYZ, | ||
VtxDiff, | ||
PolyAttr, | ||
TexParam, | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.