+Gemintronic Posted September 30, 2022 Share Posted September 30, 2022 dra600n of Second Dimension posted a small HBLANK example I'd like to share here. Basically, if you want to mess with the display on a certain scanline this is how you do it. In this example we're changing out a whole palette on a certain line. This is good if you want a status bar with a different set of palettes or a water effect like in Sonic 3. Note that you will most likely get artifacts like "CRAM dots" if you mess with hblank even a little. hBlank 111 On hInt GoSub hbl On vInt GoSub vbl Enable hInt Enable vInt hint_counter = 111 End vbl: Palettes pal1,0,0,16 j = JoyPad(0) If j.0 = 1 Or j.1 = 1 Then hint_counter+=j.1-j.0 hBlank hint_counter End If Return hbl: Palettes pal2,0,0,16 Return pal1: DataInt $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 DataInt $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 pal2: DataInt $0EEE,$0000,$0000,$0000,$0000,$0000,$0000,$0000 DataInt $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 Quote Link to comment https://forums.atariage.com/topic/341860-secondbasic-studio-hblank-example/ 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.