Commodore 128 Alive!

Commodore 128 => Tips & tricks => Topic started by: Blacklord on December 29, 2007, 11:04 AM

Title: Better video display
Post by: Blacklord on December 29, 2007, 11:04 AM
Register 9 of the VDC controls the number of raster lines used to display a character.

By addressing both locations that provide access to the VDC you can increase the number of raster lines per character. This POKE will place the characters closer together making for a cleaner view:

10 POKE 54784,9:POKE 54785,232
The value in the second POKE changes the number of raster lines per character - it's normally set at 231. You can increase it up to 235 but it may produce variable results depending on your monitor (use RUN/STOP RESTORE to put things back to normal).
Title: Better video display
Post by: BigDumbDinosaur on January 02, 2008, 04:24 AM
Quote from: adminRegister 9 of the VDC controls the number of raster lines used to display a character.

By addressing both locations that provide access to the VDC you can increase the number of raster lines per character. This POKE will place the characters closer together making for a cleaner view:

10 POKE 54784,9:POKE 54785,232
The value in the second POKE changes the number of raster lines per character - it's normally set at 231. You can increase it up to 235 but it may produce variable results depending on your monitor (use RUN/STOP RESTORE to put things back to normal).
Not a good idea!  The VDC should never be written by POKEs or read by PEEKs.  Both of these keywords use indirect indexed addressing, which is unreliable when the VDC is involved (per MOS Technology/CSG documentation).  The correct way to do this in 128 mode BASIC is:
bank 15 : sys dec("CDCC"),232,9
The assembly language equivalent would be:
       lda #232
        ldx #9
        stx $d600
loop  bit $d600
        bpl loop
        sta $d601

:-)
EhPortal 1.34 © 2025, WebDev