marienbad Posted March 20, 2021 Share Posted March 20, 2021 I tried to write some code to display a playfield. I used the framework from the Taswegian tutorial, and nicked a bit of code from the Spiceware tutorial (by Mr Spice - having seen Dune, I need to ask, should I be worried? Are giant sandworms going to come after me? ;) ) to display a playfield. Each "line" should be 8 scanlines high, which is generally the case, but the top two lines are missing and I cannot see why. All the data is there, and the rest of it is displayed correctly. I am running it on Stella and other things seem to run fine, so I don't think I have done anything to Stella to mess it up. I did wonder if it was something to do with the arena height being different in the collect tutorial, but I am using ldy #192 as the line counter. test_kernel.zip Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted March 20, 2021 Share Posted March 20, 2021 You have not initialised "x" for the VerticalBlank delay loop. Since it exits at the bottom of frame with x=30, that loop probably only gives you 6 scanlines instead of the expected 36. You can use cmd-L to show scanline count in stella (or the windows equivalent). Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted March 20, 2021 Share Posted March 20, 2021 Also, the following are (or should be) invalid lines... #lda #0 #sta COLUBK Lines are commented-out/disabled with a ";". I'm surprised dasm didn't flag these as errors. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 20, 2021 Share Posted March 20, 2021 3 hours ago, marienbad said: I need to ask, should I be worried? The Spice must flow Quote Link to comment Share on other sites More sharing options...
marienbad Posted March 20, 2021 Author Share Posted March 20, 2021 6 hours ago, Andrew Davie said: You have not initialised "x" for the VerticalBlank delay loop. Since it exits at the bottom of frame with x=30, that loop probably only gives you 6 scanlines instead of the expected 36. You can use cmd-L to show scanline count in stella (or the windows equivalent). Thank you so much, so obvious when it is pointed out! Quote Link to comment Share on other sites More sharing options...
marienbad Posted March 20, 2021 Author Share Posted March 20, 2021 4 hours ago, SpiceWare said: The Spice must flow Class - Old Skool FTW! Can't beat a bit of Rave. Charly says: "Always tell your mummy before you go off somewhere" 1 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.