retrodeluxe / rlengine-msx

RetroDeluxe Game Engine for MSX computers
GNU General Public License v2.0
51 stars 3 forks source link

Feature request: Add sys_set_ticks or sys_reset_ticks #15

Open plattysoft opened 3 years ago

plattysoft commented 3 years ago

While we can read the clock and wait for it, the TIME value is just an integer and eventually overflows, which leads to undesirable situations once the program has run for long enough. It is much safer to reset the clock occasionally, for that we can have a sys_set_ticks or simply a sys_reset_ticks, which will be the equivalent to sys_set_ticks(0).

retrodeluxe commented 3 years ago

@plattysoft feel free to make pull requests to fix issues or add stuff you need.

plattysoft commented 3 years ago

I don't know enough assembly or the internals of the engine to be able to write that part, otherwise I would have gone for it straight away.