|
Post by C128Man on Jan 10, 2021 16:05:22 GMT
Hi, Just a little program to change the border color according to the raster register of the VIC-II. The idea is, the border color is black, except between lines 56 and 250, it is white. On every complete refresh of the screen, the start line for the white color is increase of one till 250.
. 00c00 a9 38 lda #$38 . 00c02 8d 30 0c sta $0c30
. 00c05 a9 00 lda #$00 . 00c07 8d 20 d0 sta $d020 Black border color . 00c0a ad 12 d0 lda $d012 . 00c0d cd 30 0c cmp $0c30 wait till the raster to $0C30 . 00c10 d0 f8 bne $0c0a
. 00c12 a9 01 lda #$01 . 00c14 8d 20 d0 sta $d020 White border color . 00c17 ad 12 d0 lda $d012 . 00c1a c9 fa cmp #$fa Wait till raster till $FA . 00c1c d0 f9 bne $0c17
. 00c1e ee 30 0c inc $0c30 $0c30=$0c30+1 . 00c21 ad 30 0c lda $0c30 . 00c24 c9 fa cmp #$fa Test if = $FA . 00c26 f0 d8 beq $0c00 . 00c28 4c 05 0c jmp $0c05
It works well, but, I'm surprise, the white color go down very slowly! Normally, it must go down on every screen refresh, thus 50 or 60 time a second, no?
What did I not understand
C128Man
|
|
|
Post by bjonte on Jan 10, 2021 16:13:07 GMT
It goes down one line per screen refresh. So moving 200 lines would take 4 seconds on a PAL machine for example.
|
|
|
Post by C128Man on Jan 10, 2021 17:48:58 GMT
Ah yes! For a PAL machine the entire screen will be refresh 50 times par second, thus, 50 lines/sec and then 4 sec for 200 lines :-)
Is it something special for the line above the 56th?
|
|
|
Post by bjonte on Jan 11, 2021 15:00:41 GMT
Is it something special for the line above the 56th? No, lines are just lines. What do you mean would be special?
|
|
|
Post by wsoft on May 28, 2022 1:46:48 GMT
This is VIC 101. When I first started to program in assembly, the raster interrupt was the sky.
|
|
|
Post by wsoft on May 28, 2022 1:49:53 GMT
Ah yes! For a PAL machine the entire screen will be refresh 50 times par second, thus, 50 lines/sec and then 4 sec for 200 lines :-) Is it something special for the line above the 56th? I lived in Germany and had a PAL machine. These had a lot more raster lines than an NTSC C64 and the CPU ran a bit slower as a result. That's why there are games that run on Pal machines that won't run on NTSC, and vice versa.
|
|