does some one has a STEADY horizontal pixel scroll?
mine works BUT line1-7 seems build before line 0 and that three times!
i dont have a cloud yet, here is the WIP listing for a double-screen right ward pixel scroll
with an headache and epileptic warning !! its a "depth" thing
Code: Select all
; giga screen 2 pixel for one scroll
; two screen$ rotate pixel by pixel simultanious
; needs a giga viewer for correct view
; rotaline038
; pasmo -d --tap --name rotalin037 rotaline038.asm rotal038.tap rotal038.symbol
mbank equ 23388 ; rambank configuration byte
ramPage equ 32765 ; port to set switch with
org 33000
call setpage7 ;17t+tpage
scr0 ld hl,0 ;10t
ld de,16384 ;10t
ld bc,6144 ;10t
ldir ; 24*6144 -5
scr1 ld hl,0 ;10t
ld de,49152 ;10t
ld bc,6144 ;10t
ldir ; 24*6144 -5
ld de,0x0808 ;10t
line_x ld bc,0x1f ;10t
setline ld hl,0x4000 ;10t SCR0
res 7,h ; 8t scr0
add hl,bc ;11t end of pixel line
ld a,(hl) ; 7t last byte first line scr0
and a ; 4t reset flags
sbc hl,bc ;15t back to 16384
ex af,af' ; 4t scr1
set 7,h ; 8t SCR1 49152
add hl,bc ;11t end of pixel line
ld a,(hl) ; 7t last byte first line scr1
and a ; 4t reset flags
sbc hl,bc ;15t back to 49152
ex af,af' ; 4t scr0
ld b,0x20 ; 7t b=32
; hl=16384, de=49512
; a=scr0 , a'=scr1
rota0: rra ; 4t set scr0 start bit %7654321c >c
ex af,af' ; 4t go scr1
rra ; 4t set scr1 start bit %7654321c >c
rota_b: ex af,af' ; 4t back to scr0
res 7,h ; 8t go scr0
rr (hl) ;15t rotate scr0
ex af,af' ; 4t go scr1
set 7,h ; 8t go scr1
rr (hl) ;15t rotate scr1
inc l ; 4t
djnz rota_b ;13t rotate 32 bytes on 2 screens AT once
ld hl,setline+2 ;10t
inc (hl) ; 7t
dec e ; 4t
jr nz,dd0 ; 7t
ret nz ; 5t delay
deb0 equ 10+7+4+7+5
ld e,8 ; 7t
hl2 ld (hl),0x40 ; 7t 7+7
ld a,(setline+1) ;13t
add a,0x20 ; 7t
ld (setline+1),a ;13t
dec d ; 4t
jr nz,dd1 ; 7t 13+7+13+4+12
ret nz ; 5t delay
deb1 equ 7+7+13+7+13+4+7+5
ld d,8 ; 7t
ld a,(hl2+1) ;13t
add a,d ; 4t
ld (hl2+1),a ;13t
cp 0x58 ; 7t
jr c,dd2 ; 7t
ret c ; 5t delay
deb2 equ 7+13+4+13+7+7+5
ld a,0x40 ; 7t
ld (hl2+1),a ;13t
jr keys ;12t
deb3 equ 7+13+12
bub3 equ deb3+deb2+deb1+deb0
bub2 equ deb2+deb1+deb0
bub1 equ deb1+deb0
bub0 equ deb0
dubdel0 equ bub3-bub0 ;= delay 00097H ; 151-88=63
dubdel1 equ bub3-bub1 ;= delay 00058H ; 88-32=56
dubdel2 equ bub3-bub2 ;= delay 00020H ; 32
dd0 res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
ld a,(hl) ; 7t DELAY (8*7)+7=63
dd1 res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY 8*7=56
dd2 res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY
res 0,a ; 8t DELAY 8*4=32
keys in a,(254) ;11t
cpl ; 4t
and 0x1f ; 7t
key jp z,line_x ;10t
ei ; 4t
;-+-=-+-=_=-+-=-+-_-+
setpage0 ld hl,0xF000 ;10t h=11111000 l=00000000
jr setpage ;12t
setpage7 ld hl,0xF007 ;10t h=11110000 l=00001111
jr setpage ;12t delay
setpage ld bc,ramPage ;10t bc = 32765, port 0x7FFD
ld de,mbank ;10t de = 23388, sysvar
LD A,R ; 9t P/V flag=Interrupt status (Toni Baker et all)
PUSH AF ;11t Stack interrupt status.
di ; 4t
ld a,(de) ; 7t
and h ; 4t set rambank 0 SCREEN 0
or l ; 4t set rambank 7
ld (de),a ; 7t
out (c),a ;12t port 0x7FFD
POP de ; 10t P/V flag=Former interrupt status. (Toni Baker et all)
bit 2,e ; 8t FLAGregister = %SZ-H-PNC po/pe =bit2
; https://learn.cemetech.net/index.php/Z80:Flags_and_Bit-Level_Instructions#F_Register
; https://clrhome.org/table/#jp
; JP PO,NONEI ;10t Jump if interrupts were previously disabled.
jr nz,NONEI ; 7t
ret nz ; 5t delay
EI ;} 4t Re-enable interrupts.
jr doei ;} 12t
;] +5 jump
NONEI: nop ;] 4t
jr doei ;]12t
doei ret ; 10t
tpage equ 10+10 +9+11 +4 +7+4+4+7 +12+10+8 +(7+5) +(4+12) +10 ;=134
tsetp equ 10+12+tpage ;=152
;------------------------------------------------------------------------------
; 16384 = 0x4000h %01000000.00000000 , first pixel byte adres
; 22527 = 0x57ffh %01010111.11111111 , last pixel byte adres
;The display layout is easy to understand at the binary level:
;1. 16-bit Screen Memory Address in binary
; 010B BSSS LLLC CCCC (pixels)
; BB = block (0-2) indicates top third, middle third or bottom third of screen
; SSS = scan line (0-7) indicates the vertical pixel row within a character
; LLL = vertical character line (0-7) within a block
; CCCCC = horizontal character coordinate (0-31)
;2. 8-bit Pixel Coordinates
; (0,0) top left corner of screen, Maarten down left corner
; X : CCCC CTTT (0-255) > CCCCCxxx xxxxxTTT
; Y : BBLL LSSS (0-191) > BBxxxxxx xxLLLxxx xxxxxSSS
; TTT is 0-7 and indicates the pixel position within a byte. 0=bit 7, most left pixel position %01234567
;3. 8-bit Character Coordinates
; X : 000C CCCC (0-31)
; Y : 000B BLLL (0-23)
;4. 16-bit Attribute Address
; 0101 10BB LLLC CCCC
;------------------------------------------------------------------------------