class

Swanium::Core::Rtc

Inherits Reference < Object

Optional cartridge RTC. The core never reads wall-clock time: the device starts from a fixed epoch and advances only from emulated master cycles.

Constants

CYCLES_PER_SECOND = 3072000_u32
OPEN_BUS = 144_u8

Constructors

Instance methods

load_state(io : IO) : Nil
Source
read_command
Source
read_data
Source
save_state(io : IO) : Nil
Source
set_datetime(year : UInt8, month : UInt8, day : UInt8, weekday : UInt8, hour : UInt8, minute : UInt8, second : UInt8) : Nil

Decimal input keeps the platform boundary explicit while the device itself stores the same packed-BCD registers exposed to guest code.

Source
tick(cycles : UInt32) : Nil
Source
write_command(value : UInt8) : Nil
Source
write_data(value : UInt8) : Nil
Source