However when we have a small game with just a few lines (like Chess or Bejeweled each 8 lines).
we still have 17 linefeeds to fill the screen. I was wondering if this could be less.
You can execute code on the screen, so why wouldn't you jump back to a newline earlier on the screen
and use a loop to fill the screen? Easier said than done. A jump back to latest Newline didn't do
in all cases. This routine shortens the screenmemory when 16 lines or less are used. When you use more
fill the screen with Newlines like normal.
Due to the jump the screenlayout is corrupted. This can be solved with more linefeeds on the last line.
This routine works in all cases. Sometimes less linefeeds work, but you need to try.
This screen is part of Bukster's BEJEWELED.
Code: Select all
ONEKDISPLAY:
DB $76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
DB $00,$00,$00,$00,$00,$00,$00,$00,$76
lives DB $80,$80,$80,$80
dispsc DB $9C,$9C,$9C,$9C
; end of visible screen
; Screenfiller, max size will work always less linefeed might work.
; Screen with less than 16 lines wil be shorter with this code.
lf db #76,#76,#76,#76,#76,#76
jp lf+#8000
; fill rest of screen by jumping back to lower part of screen intruptcounter will end in right way.