Jump to content
IGNORED

Detecting screen roll in emulators


TROGDOR

Recommended Posts

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 by TROGDOR
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 }

  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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. :roll: :D

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...