Hm, call me stupid for discovering information by myself that most likely is known by just about everyone here, but I'm learning best by experimenting with bits of infos and doing the rest.
I've been throwing some code pieces together to get (some facts are quite obvious):
org #8000
di
im 1
ld hl,#c9fb
ld (#0038), hl
ei
;ld b,#f5
;vsync:
;in a,(c)
;rra
;jp nc, vsync
ld bc,#7f00
; #46 cyan
ld d,#55 ; bright blue
ld e,#4d ; bright magenta
ld h,#4e ; orange
ld l,#56 ; green
; #4c red
out (c),c
loop:
halt
ld a,#46
out (c),a
halt
out (c),d
halt
out (c),e
halt
out (c),h
halt
out (c),l
halt
ld a,#4c
out (c),a
jp loop
Then I inserted a bunch of nops to see where the ray goes and done some calculations.
The result for the standard crtc screen is:
- one line including left and right border and the horizontal flyback equals 256 cycles (= 64 nops)
- the borders (left and right) are 16 cycles each (4 nops x 2)
- the line itself takes 160 cycles (40 nops)
- the horizontal flyback equals 64 cycles (16 nops)
The time the ray takes to completely go through the 200 lines of the screen:
- 256 cycles times 200 lines = 51200 (12800 nops)
The CPC executes at 4MHz, the screen is updated 50 times/second. That's 80000 cycles per screen (20000 nops).
Consequently the upper and lower border plus the frame flyback take 80000-51200 = 28800 cycles (7200 nops); I've yet to figure out the relation of frame flyback to upper and lower border.
Further rambling:
Execution of the interrupt routine after the halt takes place exactly at the beginning of the left side border. The processor starts with the jump to the interrupt routine (IM 1 mode) which takes 16 cycles, then executes the interrupt routine (16 cycles in the code example, ei + ret). If you then like to change the color with out (c), n the first position that will be affected is the 14th byte of this line.