Updated GB_set_rtc_mode (markdown)

Lior Halphon 2024-11-30 20:57:01 +02:00
parent 50217b4142
commit f7c7e873e9
1 changed files with 9 additions and 2 deletions

@ -7,14 +7,21 @@ typedef enum {
} GB_rtc_mode_t; } GB_rtc_mode_t;
``` ```
<tt>void GB_set_rtc_mode([[GB_gameboy_t]] *gb, [[GB_rtc_mode_t]] mode);</tt> <tt>void GB_set_rtc_mode([[GB_gameboy_t]] *gb, GB_rtc_mode_t mode);</tt>
In `timing.h` In `timing.h`
## Description ## Description
TBD Specifies how the emulator instances emulates a Real Time Clock inside an emulated cartridge:
* `GB_RTC_MODE_SYNC_TO_HOST`: The RTC follows the time in the host's clock. Even when the emulator instance is [[overclocked, underclocked|GB_set_clock_multiplier]], set to [[turbo mode|GB_set_turbo_mode]], or paused, the in-game RTC will always advanced in one real-world-second intervals.
* `GB_RTC_MODE_ACCURATE`: The RTC timings are accurately emulated. Pausing or changing the speed of the instance will also pause or change the speed of the RTC.
## Thread Safety ## Thread Safety
`GB_set_rtc_mode` is thread-safe and can be called from any thread and context. `GB_set_rtc_mode` is thread-safe and can be called from any thread and context.
## See Also
* [[GB_set_rtc_multiplier]]