d5368b0799
MBC3 write switches on a>>13, so the RTC register is 5 (0xA000-0xBFFF). Mask off upper bits of DH register when updating the timer. Only the lowest bit is part of the day counter. Use uint for x in timerforward() so that we don't set negative values for timer registers if it happens to overflow. Update timer and then latch rather than the other way around. Otherwise, timer remains static and will overflow after 512 days. |
||
---|---|---|
.. | ||
doc | ||
games/lib | ||
include | ||
lib | ||
man | ||
src |