Sunday, December 09, 2007

XeO3: Path debugging.

Almost there. My 1st pass of the Path Fast Forward is just about done, but it doesn't seem to quite match up. My timing appears to be out by a quite a few script cycles as paths are coming on too early. If you remember a while back I was talking a bit about my script engine, and each instruction was 0 or 1 cycles. Well I've built some code to skip over instructions and process PAUSE's by subtracting them from the number of pixels I have to scroll.

Anyway, while it appears to be roughly correct, its not perfect. If I skip $10 macro blocks (=384 pixels) then sprites are simply coming on too early. That said, its realy nice to be able to skip forwards like this.

There is a downside though. If you stop the scrolling, the FastForward will try and find the next one that starts it again (as you can't advance in pixels while the screen is paused). BUT if you stop the scroll and dont start it again, then keep the master path going with an infinite loop (using a pause and goto), then the FastForward will lockup as it never finds a restart. However, as long as this is know, it should be okay.....

Commands like PAUSE/NOP are the fastforward's bread and butter, since it simply subtracts the pause count from the number of pixels to move (1 PAUSE/NOP = 1 pixel scrolled). But for some reason they aren't matching up properly - yet.

No comments: