+JAC! Posted May 16, 2016 Share Posted May 16, 2016 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 Quote Link to comment Share on other sites More sharing options...
Kylearan Posted May 16, 2016 Share Posted May 16, 2016 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. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted May 16, 2016 Share Posted May 16, 2016 Try running a trace in Z26? I do that for stubborn problems to discover precisely if and where cycle changes occur between frames. Quote Link to comment Share on other sites More sharing options...
Kylearan Posted May 16, 2016 Share Posted May 16, 2016 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...?!? Quote Link to comment Share on other sites More sharing options...
alex_79 Posted May 16, 2016 Share Posted May 16, 2016 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 2 Quote Link to comment Share on other sites More sharing options...
Kylearan Posted May 17, 2016 Share Posted May 17, 2016 Haha, thanks alex_79! I had forgotten about Stella's internal database *and* didn't know the music kit is in there. Good to know we haven't gone crazy... :-) Quote Link to comment Share on other sites More sharing options...
+JAC! Posted May 17, 2016 Author Share Posted May 17, 2016 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 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.