Skyhigh 13 ch17 Coders versus Colours

From C64 Diskmag Wiki
Jump to: navigation, search
          coders versus colours




well, it seems like many of the coders
don't know how to set the colors right.

1:st depeh tried to teach the "new guys"
     to set the colors right.

     he said that:

     lda col
     sta $d021
     jsr $e544 (clear screen)

     was the right way of setting colors
     but he was wrong!

2:nd raz wrote in a previous issue of
     this mag that:
     (i'm not sure wich colors he used)

     lda #$00
     sta $d020     ;border color black
     lda #$0b
     sta $d021     ;screen color d.grey
     lda #$07
     sta $0286     ;char color yellow
     jsr $e544     ;clear screen

     this is not correct either.

     the thing is that the gfx chip
     workes different on old and new
     64's. the OLD gfx chip uses $d021
     to set the char color, while the
     NEW one uses $0286 to set char
     color (when using $e544) so the
     right way of doing it is to use
     BOTH addys.

     lda col
     sta $d021
     sta $0286
     jsr $e544

     this however works on all of them.

     but don't worry, everyone misses
     sumtimes. oxyron has missed at some
     point, and i'm sure that i have to.


     /devil of noice 1994-09-15
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox