118 lines
3.6 KiB
Plaintext
118 lines
3.6 KiB
Plaintext
|
CON
|
||
|
|
||
|
_CLKMODE = XTAL1 + PLL16X
|
||
|
_XINFREQ = 5_000_000
|
||
|
|
||
|
'signaldefinitionen regnatix
|
||
|
|
||
|
#0, D0,D1,D2,D3,D4,D5,D6,D7 'datenbus
|
||
|
#8, BEL_VGABASE 'vga-signale (8pin)
|
||
|
#16, BEL_KEYBC,BEL_KEYBD 'keyboard-signale
|
||
|
#18, BEL_MOUSEC,BEL_MOUSED 'maus-signale
|
||
|
#20, BEL_VIDBASE 'video-signale(3pin)
|
||
|
#23, BEL_SELECT 'belatrix-auswahlsignal
|
||
|
#24, HBEAT 'front-led
|
||
|
BUSCLK 'bustakt
|
||
|
BUS_WR '/wr - schreibsignal
|
||
|
BUS_HS ' '/hs - quittungssignal
|
||
|
|
||
|
|
||
|
VGA_BASPORT = 8 'vga startport
|
||
|
KEYB_DPORT = BEL_KEYBD 'tastatur datenport
|
||
|
KEYB_CPORT = BEL_KEYBC 'tastatur taktport
|
||
|
|
||
|
DB_WAIT = %00000001_00000000_00000000_00000000 'dira-wert f?r wait-status am bus
|
||
|
DB_IN = %00001001_00000000_00000000_00000000 'dira-wert f?r datenbuseingabe
|
||
|
DB_OUT = %00001001_00000000_00000000_11111111 'dira-wert f?r datenbusausgabe
|
||
|
CNT_HBEAT = 5_000_0000 'blinkgeschw. front-led
|
||
|
|
||
|
'512x384
|
||
|
|
||
|
tiles = vec#tiles
|
||
|
|
||
|
OBJ
|
||
|
|
||
|
vec : "vectron-1-asm"
|
||
|
key : "vectron-1-keyb"
|
||
|
|
||
|
PUB MainLoop|h,i,deg,x,y,mask,ii,char,j,k,n
|
||
|
|
||
|
vec.start
|
||
|
key.start(keyb_dport, keyb_cport) 'tastaturport starten
|
||
|
|
||
|
repeat i from 0 to tiles - 1 'init tile colors to white on black
|
||
|
vec.color(i,$0800)
|
||
|
'vec.color(i,$FF<<8+i) 'init tile colors "Nice view"
|
||
|
|
||
|
vec.pointcolor(1)
|
||
|
vec.text(0,0,string("Vektordemo"))
|
||
|
|
||
|
repeat
|
||
|
vec.pointcolor(1)
|
||
|
|
||
|
repeat 1
|
||
|
repeat j from 1 to 260 step 5
|
||
|
repeat i from 0 to 359 step 1
|
||
|
'vec.syncvid
|
||
|
n := vec.deg(i)
|
||
|
vec.shape(256,192,j,j,3,n)
|
||
|
keyreb
|
||
|
|
||
|
repeat 1
|
||
|
repeat j from 260 to 1 step 5
|
||
|
repeat i from 0 to 359 step 1
|
||
|
'vec.syncvid
|
||
|
n := vec.deg(i)
|
||
|
vec.shape(256,192,j,j,3,n)
|
||
|
keyreb
|
||
|
|
||
|
repeat 20
|
||
|
repeat i from 0 to 359
|
||
|
'vec.syncvid
|
||
|
n := vec.deg(i)
|
||
|
vec.shape(256,192,145,145,3,n)
|
||
|
keyreb
|
||
|
|
||
|
repeat 3
|
||
|
repeat i from 0 to 359
|
||
|
'vec.syncvid
|
||
|
n := vec.deg(i)
|
||
|
vec.shape(256,192,145,145,3,n)
|
||
|
vec.shape(256,192,70,70,4,vec.deg(359-i*2))
|
||
|
vec.shape(256,192,30,30,5,vec.deg(i*3))
|
||
|
keyreb
|
||
|
|
||
|
repeat 1
|
||
|
repeat i from 0 to 359
|
||
|
'vec.syncvid
|
||
|
n := vec.deg(i)
|
||
|
vec.shape(256,192,200,200,6,n)
|
||
|
vec.shape(256,192,190,190,6,n)
|
||
|
vec.shape(256,192,180,180,6,n)
|
||
|
vec.shape(256,192,170,170,6,n)
|
||
|
vec.shape(256,192,160,160,6,n)
|
||
|
|
||
|
vec.shape(256,192,150,150,6,n)
|
||
|
vec.shape(256,192,145,145,3,n)
|
||
|
vec.shape(256,192,70,70,4,vec.deg(359-i*2))
|
||
|
vec.shape(256,192,30,30,5,vec.deg(i*3))
|
||
|
keyreb
|
||
|
|
||
|
repeat 3
|
||
|
repeat i from 0 to 359 step 5
|
||
|
repeat x from 100 to 400 step 150
|
||
|
repeat y from 100 to 300 step 150
|
||
|
shapes1(x,y,i)
|
||
|
keyreb
|
||
|
|
||
|
PRI shapes1(x,y,i)
|
||
|
'vec.syncvid
|
||
|
vec.shape(x,y,145,145,3,vec.deg(i))
|
||
|
vec.shape(x,y,70,70,4,vec.deg(359-i*2))
|
||
|
vec.shape(x,y,30,30,5,vec.deg(i*3))
|
||
|
|
||
|
PRI keyreb 'bei teastendruck reboot
|
||
|
|
||
|
if key.key
|
||
|
reboot
|
||
|
|