10 rem any sixteen colors: redefine the c64 palette 20 poke 53359,86:poke 53359,88:poke 53359,33 30 if peek(53312)<>86 or peek(53313)<>88 then print "no vic-x here":end 40 poke 53320,8:rem ctrl bit 3: vic-ii colors go through the palette 50 rem palette entry n is 4 bytes (r,g,b,spare) at $20000+4*n = 131072+4*n 60 c=6:r=0:g=56:b=40:gosub 100:rem background blue becomes dark green 70 c=14:r=255:g=200:b=64:gosub 100:rem light blue becomes amber 80 print "the same 16 color numbers, new colors" 90 end 100 a=131072+4*c:v=r:gosub 1000:v=g:gosub 1000:v=b:gosub 1000:return 1000 rem --- write v at port address a, then a=a+1 1010 h=int(a/65536):m=int((a-h*65536)/256) 1020 poke 53324,a-h*65536-m*256:poke 53325,m:poke 53326,h 1030 poke 53327,v:a=a+1:return