Jump to content
IGNORED

Stella: Flickering due to unused byte?


JAC!

Recommended Posts

Last night I was playing around modifying the Slocum Tracker and running it in Stella. Suddenly the measure display started flicking. "Ups, I cross a page boundary" was my first thought but after 1h I gave up. I have reduced the effect to changing 1 byte in ROM from $ff to $00. What? Kylearan also had fun and we both think it's an emulator issue. Maybe somebody here can shed some light on it. Appears in Stella 4.0, also in 4.7.2

 

JAC!

 

 

SlocumTracker.zip

Link to comment
Share on other sites

To elaborate a bit more on JAC!'s findings:

 

You can compile the example yourself by downloading the original Slocum music kit 2 and inserting a "dc.b 0" in songmain.asm after the "include songplay.h". Now the measure display flickers. Change it to a "dc.b 255", and it no longer flickes. In fact, it flickers for anything other than 255.

 

Due to the "org $FA00" after the dc.b, the code and data locations and sizes are exactly the same for both binaries. The only difference is that byte at memory location $F1F6, which will never be accessed (verify with a "trap f1f6" in the debugger). With the original musik kit, the contents of this memory location defaults to $ff (=no flicker).

 

In addition, if you set the zoom position to the measure display and step through the binaries frame by frame, you will see that both generate exactly the same pixels each frame. And yet, running at full speed the $00 binary flickers and the $ff binary does not. What gives?!?

 

That's on Windows, Stella 4.6.1 here.

Link to comment
Share on other sites

Try running a trace in Z26? I do that for stubborn problems to discover precisely if and where cycle changes occur between frames.

 

Since code and data are exactly the same between both binaries (except for that one byte that never gets accessed), including memory locations, the trace would be the same. That's why we think it's an emulator issue and not a VCS code problem.

 

Plus, as I said, take a look at a zoom of the "M=..." screen area at the top in both binaries: At full speed, one flickers and one not, but if you step through frame by frame, both output exactly the same pixels (as expected given that code and data are the same).

 

...or what do we miss here...?!? :?

Link to comment
Share on other sites

Try the ALT-P key combination to toggle the phosphor mode. Stella has an internal database which allows to set some specific options for each game. Specifically, Paul Slocum's music kit has the "phosphor mode" enabled to avoid the flicker. When you change the rom, the md5sum doesn't correspond anymore with the one in stella database, so the default settings are applied (that is, the phoshor mode is off). If you want the phosphor mode active during development without having to set it on each new version, just use the command line option (-pp yes).

 

http://stella.sourceforge.net/docs/#CommandLine

  • Like 2
Link to comment
Share on other sites

Unbelievable - simply unbelievable. It took hours looking at the code - but I guess I deserve it ... nobody told me I should code for dead platforms where the emulator ... aaagh ;-)

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...