TROGDOR Posted November 15, 2008 Share Posted November 15, 2008 (edited) Most emulators have a way to display the number of scanlines per frame. But do any emulators support the ability to flag a frame that goes over 262? I'd like to use that event as an interrupt trigger, so I can ensure that all the frames in my games never deviate from the expected 262 scanlines. Edited November 15, 2008 by TROGDOR Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted November 15, 2008 Share Posted November 15, 2008 But do any emulators support the ability to flag a frame that goes over 262? Stella's debugger can do that. Quote Link to comment Share on other sites More sharing options...
TROGDOR Posted November 15, 2008 Author Share Posted November 15, 2008 Thanks Thomas. After a little RTFM, I tried this: breakif _scan==#263 Which flagged a bad frame. This will detect if the frame goes over 262. How would I detect if the frame completes at less than 262 frames? Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted November 15, 2008 Share Posted November 15, 2008 breakif {_scan<#262} Quote Link to comment Share on other sites More sharing options...
+stephena Posted November 15, 2008 Share Posted November 15, 2008 breakif {_scan<#262} Unfortunately, that one won't work as you expect. Since all frames at some point have less than 262 frames, this will trigger a breakpoint after the first scanline. What needs to be done is combine that with some other thing that indicates an 'end-of-frame'. Perhaps something like the CPU cycle or frame cycle, or something like that. This latter part isn't in Stella yet, but will be for the next release. Quote Link to comment Share on other sites More sharing options...
TROGDOR Posted November 15, 2008 Author Share Posted November 15, 2008 I figured out a way to do it. I just create a label that marks the final JMP in my overscan code. When that jump is reached, it must be scanline 262, because the JMP is the last operation in the frame. So a check would look like: breakif { pc == LastFrameOp && _scan != #262 } 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 15, 2008 Share Posted November 15, 2008 I use breakif {_scan>#262} in an autoexec.stella file as stephena suggested which checks if you go over 262: http://www.atariage.com/forums/index.php?s...p;#entry1613146 Would { pc == LastFrameOp && _scan != #262 } work for all programs that might go over or under 262 or does it just work with your specific program? Quote Link to comment Share on other sites More sharing options...
TROGDOR Posted November 15, 2008 Author Share Posted November 15, 2008 It would only work in my specific program. However, it could be used by anyone as long as you add the label "LastFrameOp" in your source code, defined as the final JMP or RTS in your overscan procedure. I didn't realize the same discussion was happening in the topic right below mine. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 16, 2008 Share Posted November 16, 2008 It would only work in my specific program. However, it could be used by anyone as long as you add the label "LastFrameOp" in your source code, defined as the final JMP or RTS in your overscan procedure. I use batari Basic, so it looks like the best I can do is breakif {_scan>#262}. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.