benilla-re systems structs docs

s_playTimeNextLine

global · ui

Address
0xb4e364 · 4 bytes, up to 0xb4e367
Type
uint32_t
Meaning
Holds the clock value from which the next warning line is due, 0 before the first poll
Confidence
verified, proof one
Finding
ui/billing#the-play-time-poll

Finding: The play-time poll in ui: play time and the billing rest time

Each tick, while the deadline D is nonzero, the poll reads left and the minutes m above, and the flag byte's bit 3 (IGR). The steps run in this order:

stepwheneffect
first pollline clock N is 0IGR: event 0x206 if m <= 600; else event 0x205 with m if m <= 30; either sets the latch L (L is not tested); N = now
lineN not 0, now - N >= 0 (signed), not IGRa line if m <= 30; then D = 0 if now - D >= 0 (signed), else N = now + left % step, step 60000 when m <= 5, else 300000
dialogafter the step above, every pollIGR: event 0x206 if m <= 600 and L = 0; else event 0x205 with m if m <= 30 and L = 0; either sets L

After its first poll an IGR plan never takes the line step, so its D and N stay as they are. The first poll never tests D.

The derivation is in the doc.