Hardware Scrolling

by Ben (no login)

 

DEFINT A-Z
DECLARE SUB modex ()
modex
OUT &H3C4, &H2
OUT &H3C5, &HFF
FOR i = 383 TO 550
k& = (i - 383) * 320&
DEF SEG = &HFFA6
x = PEEK(14 + i)
DEF SEG = &HA000
FOR j = 0 TO 16
d = ((x AND (2 ^ (16 - j))) <> 0) * -14
POKE k& + j, d
POKE k& + j + 80&, d
POKE k& + j + 160&, d
POKE k& + j + 240&, d
NEXT
NEXT
j = 1
i = 0
DO
i = i + 80 * j
j = j XOR 2 * ((i = 32000) XOR (i = 0))
OUT &H3D4, &HC
OUT &H3D5, i \ 256
OUT &H3D4, &HD
OUT &H3D5, i
WAIT &H3DA, 8
WAIT &H3DA, 8, 8
LOOP UNTIL INP(&H60) = 1
SYSTEM

SUB modex
SCREEN 13
OUT &H3C4, &H4: OUT &H3C5, &H6: OUT &H3C4, &H0
OUT &H3C5, &H1: OUT &H3C2, &HE3: OUT &H3C4, &H0
OUT &H3C5, &H3: OUT &H3D4, &H11: x = INP(&H3D5) AND &H7F
OUT &H3D5, x: OUT &H3D4, &H6: OUT &H3D5, &HD
OUT &H3D4, &H7: OUT &H3D5, &H3E: OUT &H3D4, &H9
OUT &H3D5, &H41: OUT &H3D4, &H10: OUT &H3D5, &HEA
OUT &H3D4, &H11: OUT &H3D5, &HAC: OUT &H3D4, &H12
OUT &H3D5, &HDF: OUT &H3D4, &H14: OUT &H3D5, &H0
OUT &H3D4, &H15: OUT &H3D5, &HE7: OUT &H3D4, &H16
OUT &H3D5, &H6: OUT &H3D4, &H17: OUT &H3D5, &HE3
END SUB

Posted on Jul 18, 2010, 2:35 PM

Respond to this message   

Return to Index

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement