Character classes

File conventions

Notations:

Spaces

Following Unicode codepoints act as spaces:

Line feeds

Following Unicode codepoints act as line feeds:
These characters all end line and begin the next.

File structure

JRSR file consists of magic and number of sections.

Magic

The JRSR file magic is "JRSR" <linefeed>+. This magic must be first thing in the file, and there can't be anything (including spaces or line feeds before it). After magic, there is no open section.

Blank lines

Blank lines are allowed anywhere after magic. They are ignored.

Starting section

Section named $foo is opened with line of form "!BEGIN" <space>+ $foo. If there is previous section open, it is implicitly closed.

Section line

If there is section open, section content lines are prefixed with "+". Such lines may only occur when section is open.

Ending section

Section is closed with line of form "!END". This line can appear at any time there is open section.

End of file

End of file can appear anywhere there is no open section. The file must not end inside open section.

Line (component) format

Not all sections follow this format, but many do. Empty lines are skipped. The purpose is to encode non-empty array of non-empty strings into single line.
Characters:

Sections

"header" section

This section contains information about the whole movie. It is in component format. Of each line, first element in array gives its type. The rest are parameters.
Currently known header line types:

"initialization" section

This section gives parameters for PC initial poweron. It is in component format. Of each line, first element in array gives its type. The rest are parameters.
Mandatory lines, must be present exactly once:
Optional line types that can be present at most once:
May be present multiple times:

"savestate" and "manifest" sections

These are savestate data and not documented here.

"events" section

This section gives the actual movie input data and is in component format.
The base time is always 0 (even if movie begins from savestate), and time unit is nanoseconds.
Event format is: "$timestamp $class $parameters...?" and there is one event per line. If $class consists only of 'A-Z' and '0-9' (capital letters and numbers) then it is either special event or reserved (error). Valid $parameters... depend on event class. Some events may also have timing restrictions. Events must be in time order from first to last.
Timestamps must be nonnegative integers. By default they are relative to initial poweron. When computing movie length, it is customary to ignore all special events.
Following event types are defined:

"diskinfo-<id>" sections

These sections are optional. They give information about images used. Component encoding is used, first array element gives the type, rest are parameters. Emulator does not parse these. What is present depends on image.
Currently following lines/types can be written:

"output-info" section

Emulator does not parse this. This gives information about outputs used. Compoenent encoding is used, first array element gives the type, rest are parameters. Emulator does not parse these.
[1] PAUSE: Keyboard must be idle afterwards for 60 units (exception: If CTRL is held (codes 29 and 157), then only for 40 units). For keys with numbers <128, keyboard must be idle for 10 units afterwards. For keys with numbers >128, keyboard must be idle for 20 units afterwards (exception: number 183 if either ALT (codes 56 and 184) is held only takes 10).

EmulatorResources/JPC/JRSRFormat last edited by on 1/1/2022 6:13 PM
Page History Latest diff List referrers View Source