258 lines
9.4 KiB
Plaintext
258 lines
9.4 KiB
Plaintext
{{
|
|
|
|
Hive-Computer-Projekt
|
|
|
|
Name : Vektron VGA-Vektorgrafik-Engine
|
|
Chip : Bellatrix-Code (bios)
|
|
Version : 0
|
|
Dateien :
|
|
|
|
23.10.2008 - idee und frame
|
|
|
|
}}
|
|
|
|
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 : "bel-keyb"
|
|
|
|
PUB MainLoop|h,i,deg,x,y,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
|
|
'' hintergrund vordergrund
|
|
'' "1" "0" "1" "0"
|
|
'' %RRGGBB00_RRGGBB00_RRGGBB00_RRGGBB00
|
|
vec.color(i,%00000000_00000000_11000000_00000000) 'rot auf schwarz
|
|
' vec.color(i,%00000000_00000000_11000000_10100000) 'rot auf gold
|
|
' vec.color(i,$FF<<8+i) 'init tile colors "Nice view"
|
|
|
|
vec.pointcolor(1)
|
|
|
|
repeat
|
|
vec.pointcolor(1)
|
|
|
|
back1 'rot auf schwarz
|
|
|
|
repeat 1 'dreieck größer
|
|
repeat j from 10 to 280 step 8
|
|
ifexit
|
|
repeat i from 0 to 359 step 1
|
|
n := vec.deg(i)
|
|
vec.shape(256,192,j,j,3,n)
|
|
|
|
repeat 2 'dreiecke hive blinkt
|
|
repeat i from 0 to 359 step 1
|
|
ifexit
|
|
'vec.syncvid
|
|
n := vec.deg(i)
|
|
vec.shape(256,192,280,280,3,n)
|
|
n := vec.deg(i<<2)
|
|
vec.shape(256,192,280,280,3,n)
|
|
n := i & i>>3
|
|
ifnot n
|
|
vec.text(195,175,string("◀ Hive ▶"))
|
|
|
|
repeat 5 'dreiecke hive
|
|
repeat i from 0 to 359 step 1
|
|
ifexit
|
|
'vec.syncvid
|
|
n := vec.deg(i)
|
|
vec.shape(256,192,280,280,3,n)
|
|
n := vec.deg(i<<2)
|
|
vec.shape(256,192,280,280,3,n)
|
|
vec.text(195,175,string("◀ Hive ▶"))
|
|
|
|
repeat 2 'dreiecke hive blinkt
|
|
repeat i from 0 to 359 step 1
|
|
ifexit
|
|
'vec.syncvid
|
|
n := vec.deg(i)
|
|
vec.shape(256,192,280,280,3,n)
|
|
n := vec.deg(i<<2)
|
|
vec.shape(256,192,280,280,3,n)
|
|
n := i & i>>3
|
|
ifnot n
|
|
vec.text(195,175,string("◀ Hive ▶"))
|
|
|
|
repeat 1 'dreieck kleiner
|
|
repeat j from 280 to 10 step 8
|
|
ifexit
|
|
repeat i from 0 to 359 step 1
|
|
'vec.syncvid
|
|
n := vec.deg(i)
|
|
vec.shape(256,192,j,j,3,n)
|
|
|
|
repeat j from 0 to 900 'gittertext
|
|
ifexit
|
|
vec.shape(140+(j>>2),90+(j>>3),140,140,3,n<<3)
|
|
vec.shape(130+(j>>2),80+(j>>3),120,120,3,n<<3)
|
|
vec.shape(120+(j>>2),70+(j>>3),100,100,3,n<<3)
|
|
vec.shape(110+(j>>2),60+(j>>3), 80, 80,3,n<<3)
|
|
vec.shape(100+(j>>2),50+(j>>3), 60, 60,3,n<<3)
|
|
|
|
vec.character(1+k,350,"▶")
|
|
vec.character(512-k,350,"◀")
|
|
if k++ > 512
|
|
k := 0
|
|
|
|
vec.text(50+j>>3+n>>2,50+j>>3+n>>2,string("◀ Hive: Vectron ▶"))
|
|
repeat i from 1 to 90 step 5
|
|
n := (vec.sine(vec.deg(i+j)) >> 7)
|
|
vec.line(n,0,n,384)
|
|
repeat i from 1 to 90 step 5
|
|
n := (vec.sine(vec.deg(i+j)) >> 7)
|
|
vec.line(0,n,512,n)
|
|
|
|
repeat j from 0 to 200 'gitter
|
|
ifexit
|
|
repeat i from 1 to 90 step 5
|
|
n := (vec.sine(vec.deg(i+j)) >> 7)
|
|
vec.line(n,0,n,384)
|
|
repeat i from 1 to 90 step 5
|
|
n := (vec.sine(vec.deg(i+j)) >> 7)
|
|
vec.line(0,n,512,n)
|
|
|
|
back2 'hintergrund farbig
|
|
repeat 150 'scroller
|
|
ifexit
|
|
repeat i from 0 to 359 step 5
|
|
'vec.syncvid
|
|
vec.text(195,0,string("◀ Vectron ▶"))
|
|
n := vec.deg(i)
|
|
k := vec.sine(vec.deg(i/2))>>9
|
|
vec.shape(256-150,240-k,100,100,3,n)
|
|
vec.shape(256 ,240-k,100,100,3,n)
|
|
vec.shape(256+150,240-k,100,100,3,n)
|
|
case y
|
|
0: vec.text(600-x,350,string("◀ Vectron: "))
|
|
1: vec.text(512-x,350,string("• Vektor-Koprozessor •"))
|
|
2: vec.text(512-x,350,string("• Objekt-Koprozessor •"))
|
|
3: vec.text(512-x,350,string("• VGA-Signal •"))
|
|
4: vec.text(512-x,350,string("• 512 x 384 Pixel •"))
|
|
5: vec.text(512-x,350,string("• 64 Farben •"))
|
|
6: vec.text(512-x,350,string("• 1 Farben pro 32x32 Tile •"))
|
|
7: vec.text(512-x,350,string("• Vectrex-Retro-Style •"))
|
|
8: vec.text(512-x,350,string("• Hive-Project: "))
|
|
9: vec.text(512-x,350,string("• hive-project.de ▶"))
|
|
if x++ > 800
|
|
x := 0
|
|
if y++ > 9
|
|
y := 0
|
|
|
|
PRI ifexit
|
|
|
|
if key.key == key#Esc
|
|
reboot
|
|
|
|
PRI back1 | i
|
|
repeat i from 0 to tiles - 1 'init tile colors to white on black
|
|
'' hintergrund vordergrund
|
|
'' "1" "0" "1" "0"
|
|
'' %RRGGBB00_RRGGBB00_RRGGBB00_RRGGBB00
|
|
vec.color(i,%00000000_00000000_11000000_00000000) 'rot auf schwarz
|
|
|
|
PRI back2 | i
|
|
''tiles := xtiles=16 * ytiles=12
|
|
i := 0
|
|
repeat 2
|
|
repeat 16
|
|
'' hintergrund vordergrund
|
|
'' "1" "0" "1" "0"
|
|
'' %RRGGBB00_RRGGBB00_RRGGBB00_RRGGBB00
|
|
vec.color(i++,%00000000_00000000_01010000_00000000) 'rot auf schwarz
|
|
|
|
repeat 8
|
|
repeat 5
|
|
'' hintergrund vordergrund
|
|
'' "1" "0" "1" "0"
|
|
'' %RRGGBB00_RRGGBB00_RRGGBB00_RRGGBB00
|
|
vec.color(i++,%00000000_00000000_11000000_00000000) 'rot auf schwarz
|
|
repeat 6
|
|
'' hintergrund vordergrund
|
|
'' "1" "0" "1" "0"
|
|
'' %RRGGBB00_RRGGBB00_RRGGBB00_RRGGBB00
|
|
vec.color(i++,%00000000_00000000_00110000_00000000) 'rot auf schwarz
|
|
repeat 5
|
|
'' hintergrund vordergrund
|
|
'' "1" "0" "1" "0"
|
|
'' %RRGGBB00_RRGGBB00_RRGGBB00_RRGGBB00
|
|
vec.color(i++,%00000000_00000000_00001100_00000000) 'rot auf schwarz
|
|
|
|
repeat 2
|
|
repeat 16
|
|
'' hintergrund vordergrund
|
|
'' "1" "0" "1" "0"
|
|
'' %RRGGBB00_RRGGBB00_RRGGBB00_RRGGBB00
|
|
vec.color(i++,%00000000_00000000_01010000_00000000) 'rot auf schwarz
|
|
|
|
PRI rest |x,y,i,n
|
|
|
|
repeat 20 'dreieck
|
|
repeat i from 0 to 359
|
|
'vec.syncvid
|
|
n := vec.deg(i)
|
|
vec.shape(256,192,145,145,3,n)
|
|
|
|
repeat 3 '3 x shape
|
|
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))
|
|
|
|
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)
|
|
|
|
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
|
|
|
|
DAT
|