303 lines
9.8 KiB
Text
303 lines
9.8 KiB
Text
|
Memory map:
|
||
|
===========
|
||
|
(all addresses in hex)
|
||
|
|
||
|
Address range Size SRAM id Word Description
|
||
|
00000000-0000FFFF 64K (volatile) 1 APURAM (Sound processor RAM).
|
||
|
00010000-0001FFFF 64K (volatile) 1 VRAM (Video RAM).
|
||
|
00020000-0002021F 544 (volatile) 1 OAM (Video Object Attribute Memory).
|
||
|
00021000-000211FF 512 (volatile) 1 CGRAM (Video Palette).
|
||
|
00022000-00022013 20 rtc 1 RTC (If present on cart).
|
||
|
00023000-00023FFF 4K nec 2 DSP RAM (if present on cart).
|
||
|
007E0000-007FFFFF 128K (volatile) 1 WRAM (Main system RAM).
|
||
|
10000000-1XXXXXXX (variable) srm 1 SRAM.
|
||
|
20000000-2XXXXXXX (variable) bss/slota.sts 1 BSX RAM / Sufami Turbo slot A SRAM.
|
||
|
30000000-3XXXXXXX (variable) bsp/slotb.sts 1 BSX PRAM / Sufami Turbo slot B SRAM.
|
||
|
80000000-8XXXXXXX (variable) (rom) 1 Main ROM.
|
||
|
90000000-9XXXXXXX (variable) (rom) 1 BSX Flash / Sufami Turbo slot A ROM / Gameboy ROM
|
||
|
A0000000-AXXXXXXX (variable) (rom) 1 Sufami Turbo slot B ROM (amount depends on cart).
|
||
|
F0000000-F000FFFF 64K (rom) 4 DSP program ROM (if present on cart).
|
||
|
F0010000-F0010FFF 4K (rom) 2 DSP data ROM (if present on cart).
|
||
|
|
||
|
|
||
|
Framerate:
|
||
|
==========
|
||
|
NTSC: 10738636/178683 fps (60.09881186234840471673fps)
|
||
|
PAL: 322445/6448 fps (50.00697890818858560794fps)
|
||
|
|
||
|
|
||
|
Savestate/Movie format (.lsmv):
|
||
|
===============================
|
||
|
Movies/Savestates are ZIP archives. All members must either be stored or deflated. Encryption nor patching is
|
||
|
not allowed. Max version to decompress can be at most 20 (PKZIP 2.0).
|
||
|
|
||
|
Member 'systemid' (required):
|
||
|
-----------------------------
|
||
|
One line containing "lsnes-rr"<rr_version> (e.g. "lsnes-rr1").
|
||
|
|
||
|
Member 'controlsversion' (required):
|
||
|
------------------------------------
|
||
|
One line containing controls version.
|
||
|
|
||
|
This version is "0". WARNING: Don't try to decode movies with unknown controls version, you can encounter who knows
|
||
|
what.
|
||
|
|
||
|
Member 'coreversion' (required):
|
||
|
--------------------------------
|
||
|
One line containing raw bsnes version string (e.g. "bsnes v079").
|
||
|
|
||
|
On movie/savestate load, this is checked against the core emulator is using. If these mismatch, warning is issued.
|
||
|
|
||
|
Member 'port1' (optional):
|
||
|
--------------------------
|
||
|
One line containg type of port #1.
|
||
|
|
||
|
The valid values are:
|
||
|
* "none"
|
||
|
* "joypad" (the default if member is absent)
|
||
|
* "multitap"
|
||
|
* "mouse"
|
||
|
|
||
|
Member 'port2' (optional):
|
||
|
--------------------------
|
||
|
One line containg type of port #2.
|
||
|
|
||
|
The valid values are:
|
||
|
* "none" (the default if member is absent)
|
||
|
* "joypad"
|
||
|
* "multitap"
|
||
|
* "mouse"
|
||
|
* "superscope"
|
||
|
* "justifier"
|
||
|
* "justifiers"
|
||
|
|
||
|
Member 'project' (required):
|
||
|
----------------------------
|
||
|
One line containing project ID. Opaque string.
|
||
|
|
||
|
Member 'rerecords' (required):
|
||
|
------------------------------
|
||
|
One line containing rerecord count.
|
||
|
|
||
|
The rerecord count is given as ASCII base-10 nonnegative integer.
|
||
|
|
||
|
Note: Leading zeroes are not allowed (but 0 rerecords is still stored as "0").
|
||
|
|
||
|
Member 'authors' (required):
|
||
|
----------------------------
|
||
|
Authors of the run, one per line (empty lines are skipped).
|
||
|
|
||
|
* If only full name is available, line is of form <full_name> (e.g. "John Doe").
|
||
|
* If only nickname is available, line is of form "|"<nickname> (e.g. "|Ilari")
|
||
|
* If both full name and nickname are available, line is of form <full_name>"|"<nickname> (e.g. "Jane Doe|jdoe").
|
||
|
|
||
|
Member 'gametype' (required):
|
||
|
-----------------------------
|
||
|
One line, giving ROM type.
|
||
|
|
||
|
Valid values are:
|
||
|
* "snes_ntsc" (NTSC SNES)
|
||
|
* "snes_pal" (PAL SNES)
|
||
|
* "bsxslotted" (BS-X slotted; NTSC)
|
||
|
* "bsx" (BS-X; NTSC)
|
||
|
* "sufamiturbo" (Sufami Turbo; NTSC)
|
||
|
* "sgb_ntsc" (NTSC SGB)
|
||
|
* "sgb_pal" (PAL SGB)
|
||
|
|
||
|
Member 'gamename' (optional):
|
||
|
-----------------------------
|
||
|
One line giving the game name.
|
||
|
|
||
|
Member 'rom.sha256' (optional):
|
||
|
-------------------------------
|
||
|
One line, giving SHA-256 of ROM as hex string (lowercase a-f).
|
||
|
|
||
|
If there is no ROM, this member is absent.
|
||
|
|
||
|
Member 'romxml.sha256' (optional):
|
||
|
----------------------------------
|
||
|
One line, giving SHA-256 of ROM XML as hex string (lowercase a-f).
|
||
|
|
||
|
If there is no ROM XML (use emulator defaults), this member is absent.
|
||
|
|
||
|
Member 'slota.sha256' (optional):
|
||
|
----------------------------------
|
||
|
One line, giving SHA-256 of SLOT A ROM as hex string (lowercase a-f).
|
||
|
|
||
|
If there is no SLOT A ROM, this member is absent.
|
||
|
|
||
|
SNES games do not have slot A, and thus shouldn't have this member.
|
||
|
|
||
|
Member 'slotaxml.sha256' (optional):
|
||
|
------------------------------------
|
||
|
One line, giving SHA-256 of SLOT A XML as hex string (lowercase a-f).
|
||
|
|
||
|
If there is no SLOT A XML (use emulator defaults), this member is absent.
|
||
|
|
||
|
SNES games do not have slot A, and thus shouldn't have this member.
|
||
|
|
||
|
Member 'slotb.sha256' (optional):
|
||
|
---------------------------------
|
||
|
One line, giving SHA-256 of SLOT B ROM as hex string (lowercase a-f).
|
||
|
|
||
|
If there is no SLOT B ROM, this member is absent.
|
||
|
|
||
|
SNES, BS-X (slotted or not) and SGB games do not have slot B, and thus shouldn't have this member.
|
||
|
|
||
|
Member 'slotbxml.sha256' (optional):
|
||
|
------------------------------------
|
||
|
One line, giving SHA-256 of SLOT B XML as hex string (lowercase a-f).
|
||
|
|
||
|
If there is no SLOT B XML (use emulator defaults), this member is absent.
|
||
|
|
||
|
SNES, BS-X (slotted or not) and SGB games do not have slot B, and thus shouldn't have this member.
|
||
|
|
||
|
Member 'sram.<id>' (optional, only present in savestates):
|
||
|
----------------------------------------------------------
|
||
|
Raw binary contents of SRAM with identifier '<id>'.
|
||
|
|
||
|
Current SRAM identifiers (based on bsnes v079 core):
|
||
|
* 'srm': Main cart SRAM.
|
||
|
* 'nec': DSP RAM on the cart (some DSP versions only).
|
||
|
* 'rtc': Cart Realtime Clock (if present on cart).
|
||
|
* 'bss': BS-X SRAM.
|
||
|
* 'bsp': BS-X PSRAM.
|
||
|
* 'slota.sts': Sufami Turbo Slot A Cart SRAM.
|
||
|
* 'slotb.sts': Sufami Turbo Slot B Cart SRAM.
|
||
|
|
||
|
Member 'moviesram.<id>' (required for SRAM start, otherwise must be absent):
|
||
|
----------------------------------------------------------------------------
|
||
|
Raw binary contents of SRAM with identifier '<id>'. To be loaded at start of movie.
|
||
|
|
||
|
|
||
|
Member 'savestate' (required for savestate, must be absent otherwise):
|
||
|
----------------------------------------------------------------------
|
||
|
Raw binary bsnes savestate.
|
||
|
|
||
|
Member 'moviestate' (required for savestate, must be absent otherwise):
|
||
|
-----------------------------------------------------------------------
|
||
|
Raw binary movie subsystem savestate.
|
||
|
|
||
|
Member 'hostmemory' (optional for savestate, must be absent otherwise):
|
||
|
-----------------------------------------------------------------------
|
||
|
Raw binary host memory contents.
|
||
|
|
||
|
Member 'input' (required):
|
||
|
--------------------------
|
||
|
Input track. One subframe per line (empty lines are skipped).
|
||
|
|
||
|
Each line consists of fields, split by '|' (no '|' at start of line unless first field is empty!).
|
||
|
|
||
|
The fields are in following order:
|
||
|
* Zero or more system fields
|
||
|
* Zero or more fields for port #1
|
||
|
* Zero or more fields for port #2
|
||
|
|
||
|
Inside each field, each button appears first in order. Then axis values appear, again in order. Each axis value must be
|
||
|
preceeded by at least one space/tab character. If reading button or axis value would go outside field, then the value
|
||
|
reads as released (for buttons) or as 0 (for axis).
|
||
|
|
||
|
For buttons, ' ', <tab> or '.' reads as released, anything else reads as pressed. Axis values are presented as signed
|
||
|
base-10 ASCII values (e.g. "-55" or "126"). If last encoded button/axis ends before field, the rest is ignored.
|
||
|
|
||
|
Note that axis values are after all button values regardless of ordering according to normal numeric order. E.g.
|
||
|
justifier, which has values 0 and 1 of type axis and values 2 and 3 of type button encodes the input in order 2, 3,
|
||
|
0, 1.
|
||
|
|
||
|
Fields for system:
|
||
|
------------------
|
||
|
One field:
|
||
|
* Button #0: Frame sync flag. Indicates that this is first subframe of frame. The length of movie in frames is the
|
||
|
number of subframes with frame sync flag set.
|
||
|
* Button #1: Reset flag. Ignored if frame sync flag is not set.
|
||
|
* Axis #2: Reset counter major: This value is multiplied by 10000 and added to reset counter.
|
||
|
* Axis #3: Reset counter minor: This value is added to reset counter.
|
||
|
|
||
|
If both reset and frame sync flags are set, then emulator starts a counter from reset counter value. While the
|
||
|
counter is nonzero and new frame hasn't started, CPU instruction is stepped and counter is decremented by 1. If
|
||
|
the counter reaches zero, RESET is issued.
|
||
|
|
||
|
Examples:
|
||
|
"..|" (subframe)
|
||
|
"F.|" (No reset, new frame)
|
||
|
"FR|" (reset instantly)
|
||
|
"FR 5 -1000|" (reset after 49000 cycles)
|
||
|
|
||
|
Fields for port of type 'none':
|
||
|
-------------------------------
|
||
|
No fields.
|
||
|
|
||
|
Example:
|
||
|
""
|
||
|
|
||
|
Fields for port of type 'gamepad':
|
||
|
----------------------------------
|
||
|
One field:
|
||
|
* Button #0: B
|
||
|
* Button #1: Y
|
||
|
* Button #2: Select
|
||
|
* Button #3: Start
|
||
|
* Button #4: Up
|
||
|
* Button #5: Down
|
||
|
* Button #6: Left
|
||
|
* Button #7: Right
|
||
|
* Button #8: A
|
||
|
* Button #9: X
|
||
|
* Button #10: L
|
||
|
* Button #11: R
|
||
|
|
||
|
Example:
|
||
|
"......lrA.LR|" (left+right, A, L+R).
|
||
|
|
||
|
Fields for port of type 'multitap':
|
||
|
-----------------------------------
|
||
|
Four fields, each field like gamepad field.
|
||
|
|
||
|
Example:
|
||
|
"........A|B|.........X|.Y|" (A on first controller, B on second, X on third and Y on fourth).
|
||
|
|
||
|
|
||
|
Fields for port of type 'mouse':
|
||
|
--------------------------------
|
||
|
One field:
|
||
|
* Axis #0: Relative X motion
|
||
|
* Axis #1: Relative Y motion
|
||
|
* Button #2: Left button
|
||
|
* Button #3: Right button
|
||
|
|
||
|
Example:
|
||
|
"L. -14|" (Mouse delta (-14,0), clicking left button).
|
||
|
|
||
|
Fields for port of type 'superscope':
|
||
|
-------------------------------------
|
||
|
One field:
|
||
|
* Axis #0: Absolute X position
|
||
|
* Axis #1: Absolute Y position
|
||
|
* Button #2: Trigger
|
||
|
* Button #3: Cursor
|
||
|
* Button #4: Turbo
|
||
|
* Button #5: Pause
|
||
|
|
||
|
Example:
|
||
|
"T... 32 54|" (firing at 32,54).
|
||
|
|
||
|
Fields for port of type 'justifier':
|
||
|
------------------------------------
|
||
|
One field:
|
||
|
* Axis #0: Absolute X position
|
||
|
* Axis #1: Absolute Y position
|
||
|
* Button #2: Trigger
|
||
|
* Button #3: Start
|
||
|
|
||
|
Example:
|
||
|
"T.. 64 125|" (firing at 64, 125).
|
||
|
|
||
|
|
||
|
Fields for port of type 'justfiers':
|
||
|
------------------------------------
|
||
|
Two fields of same type as in justifier.
|
||
|
|
||
|
Example:
|
||
|
"T. 64 125|.. 220 140" (firing at 64, 125 with first justifier and the second one is at 220, 140).
|
||
|
|