pjm@spuxll.UUCP (PJ Maioriello) (09/24/84)
The following is a short basic program that allows you to slightly modify the kernal (after copying to ram) so that you can get color memory to be handled in various different ways. But first, the problem: When the screen is cleared on the c64 there is a routine at $e4da that effects the color memory. There are three different ways that color memory is changed that correspond to three different kernal rom versions. In version one the screen clear caused color memory to be filled with 1s. This represents the color white. Therefore, any screen pokes will result in that cahacter appearing on the screen (it will be a white character). In version two roms the color memory is filled with the value in the backgraound color regester ($do21 i think). Here lies, the incompatability,, if you now poke to screen memory the character will be placed there but it will be the same color as the background. That makes it invisible. The third rom version places the value in the foreground color register into color memory so that you get something when you poke the screen unless your foreground and background colors are the same. The program below can be used to make version 2 roms act like version 1 roms. It should be easy to change so that you can emulate any of the three rom versions. (I have a version 2 machine and want to run software that takes advantage of version 1's color handling, so I can only vouch for the facrt that the program will handle this combination). Here is the program: 20 for j=40960 to 49151:rem copy basic 25 pokej,peek(j) 30 next 50 for i=57344 to 65535:rem copy kernal 55 pokei,peek(i) 60 next 70 poke1,peek(1) and 253:rem kernal out 80 poke 58586,169:poke58587,1:poke58588,234 90 print"background color now like version 1 roms" 100 end Line 80 replaces the lda $d021 at $e4da with a lda #$01 (and a nop since there is a byte left over). I believe that if someone disassembles their version 1 rom they will find the lda #$01 at #e4da. It would be nice if someone could verify this. Now, back to my scrolling music (it aint invisible any more)! Have fun, Paul Maioriello spuxll!pjm