; Front-end for the load-time transforms (ROADMAP P1+P2), for the rig. ; ; It is to load.i what decode.s is to frame.i: a timing and control wrapper that ; does nothing the shipping player would not do, so that the bytes being ; measured are the bytes that will ship. The player's own boot path will call ; do_load once with the mode bits set to 3; this repeats it LITER times so a ; host clock with 1/56.69 s granularity (tools/bench/crtc_mode.lua) can time a ; job that takes milliseconds, ; and splits it by LMODE so the codebook expansion and the palette pack can be ; priced apart. A player calls do_load with mode 7 once at boot -- the three ; scratch tables describe the machine, not the scene -- and with mode 3 at every ; scene change after that. ; ; Repeating is honest here in a way it would not be for a frame: nothing in ; do_load is temporally recursive. Pass n writes exactly what pass n-1 wrote, ; over the top of it, out of the same source bytes. include "src/player/geom.i" org $10000 start: move.l LMODE.l,d1 move.l LITER.l,d3 move.l #1,LFLAG.l ; timer starts here loop: movem.l d1/d3,-(sp) movea.l LHDR.l,a0 bsr do_load movem.l (sp)+,d1/d3 tst.l d0 bne.s bad subq.l #1,d3 bne.s loop move.l #$FF,LFLAG.l ; timer stops here hold: bra.s hold bad: move.l #$EE,LFLAG.l bra.s hold include "src/player/load.i"