On machines with a realtime clock, these APIs let you set and get the current time of day. At present, only WPC is supported.
The WPC ASIC provides three registers for counting minutes, hours, and days. FreeWPC keeps the calendar time in persistent memory. About once per minute, it polls the RTC and updates the calendar time to reflect any changes. The battery provides power to the ASIC even when the game is off so the real-time clock remains updated.
Game code does not need to call the following APIs. The current date and time can simply be read from memory, in the variable current_date.
rtc_hw_read
rtc_hw_write