x.1sav.rtc.rtc4513
Owner: these specifications, under a reserved name · Applies to: the header of a save or state, or one of its parts · Status: normative schema, optional to carry
Tengai Makyou Zero has an Epson RTC-4513 beside the SPC7110 on its board. The two other SPC7110 games have no clock.
This key carries what the chip holds and the moment a producer took it.
x.1sav.rtc carries the reading.
The representation belongs to no one emulator, so the name sits in the
x tree, under x.1sav.rtc.
Schema
Section titled “Schema”; ============================================================================; x.1sav.rtc.rtc4513 - the Epson RTC-4513 on a Super Famicom SPC7110 board;; An extension key for the Universal Saves Format, defined by these; specifications under a name reserved in the Vendor Names registry because; the chip's registers belong to no one emulator.;; The root here is the value carried under the key, not a bundle. A bundle; validates against the format's own schema whatever this holds, since an; extension value is `any` there; this file is what makes the shape checkable.; ============================================================================
rtc-rtc4513 = { 0 => [16*16 nybble], ; registers - index 0 to F, as a read returns them ? 1 => #6.1(int), ; taken_at - the producer's clock when it took them}
; The flags share registers with the digits, in the bits the chip puts them; in: LOST beside the tens of seconds, PM beside the tens of hours, and the; control bits in D, E and F. None of them gets a field of its own.nybble = 0..15Key 0 is the chip’s 16 registers, four bits each, in index order. Each holds what a read of it returns. The digits are BCD, and the flags sit in the bits the chip gives them:
| Index | Holds |
|---|---|
| 0 | seconds, ones |
| 1 | seconds, tens in bits 0 to 2; LOST in bit 3 |
| 2 | minutes, ones |
| 3 | minutes, tens in bits 0 to 2; WRAP in bit 3 |
| 4 | hours, ones |
| 5 | hours, tens in bits 0 and 1; PM in bit 2; WRAP in bit 3 |
| 6 | day, ones |
| 7 | day, tens in bits 0 and 1; RAM in bit 2; WRAP in bit 3 |
| 8 | month, ones |
| 9 | month, tens in bit 0; RAM in bits 1 and 2; WRAP in bit 3 |
| A | year, ones |
| B | year, tens |
| C | weekday, 0 to 6, in bits 0 to 2; WRAP in bit 3 |
| D | HOLD in bit 0, CAL/HW in bit 1, IRQ-F in bit 2, 30ADJ in bit 3 |
| E | MASK in bit 0, DUTY in bit 1, RATE in bits 2 and 3 |
| F | RESET in bit 0, STOP in bit 1, 24/12 in bit 2, TEST in bit 3 |
Key 1 is the anchor: the producer’s clock at the moment it took the registers. It is the moment the producer advances the chip from when the save is next loaded. A producer that keeps one SHOULD carry it. bsnes, Snes9x and Mesen2 each write one, in files of three different layouts.
The reading
Section titled “The reading”The RTC-4513 is a dating clock. x.1sav.rtc reads its components as though
they were UTC, as it does for every dating clock.
- The year is two digits with no century, so a producer supplies one.
- With 24/12 clear the clock runs in 12-hour mode, and PM is what says the hour is after noon.
- With CAL/HW clear the day, month and year registers are user RAM rather than a date. A producer MUST omit
x.1sav.rtcthen, as that key requires of any reading a producer cannot compute.
Where it goes
Section titled “Where it goes”Wherever x.1sav.rtc goes, and nowhere else: the
header of a save or a
state, or one of its parts. A producer carrying this key
SHOULD carry x.1sav.rtc on the same map. The two describe one clock, and a consumer that wants only the time then
reads it without knowing the chip. They
may disagree without either being
wrong.
When to set it
Section titled “When to set it”Only for Tengai Makyou Zero, including its Shounen Jump no Shou edition. The other Super Famicom clock is the Sharp
S-RTC in Daikaijuu Monogatari II, which takes x.1sav.rtc.srtc.