CasualPokePlayer

problem/solution towards gambatte's rtc

Mar 23rd, 2021
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. the problem:
  2.  
  3. Gmabatte's rtc code currently does not handle out of range rtc writes. This can't be fixed easily due to how rtc fundamentally works: Gambatte simply uses the amount of seconds of execution to construct the rtc registers. Since all the time goes off this, everything has to be handled as actual clocks and not just x-bit counters.
  4.  
  5. the solution:
  6.  
  7. Instead of just constructing the rtc registers out of the amount of seconds of execution, we should just add in the amount of seconds between rtc updates. This would require that rtc registers are saved within the rtc file though, but that's just an extra 5 bytes anyways. This could possibly fuck up previous version states I guess?
  8.  
  9. also to note some misc problems: rtc is fucked if it reaches to negatives (easily fixable), subseconds are not frozen during halt (weird to fix I guess?)
Add Comment
Please, Sign In to add comment