This commit is contained in:
parent
d3064c35d5
commit
5342abd7cb
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
doku/TriOS.ods
BIN
doku/TriOS.ods
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
vga-bildschirmtreiber-demo
|
||||
|
||||
- verwendet zwei cogs
|
||||
- auflösung 1024 x 768
|
||||
- 64 x 128 textzeichen
|
||||
- font ohne umlaute!
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
CON
|
||||
|
||||
_clkmode = xtal1 + pll16x
|
||||
_xinfreq = 5_000_000
|
||||
|
||||
VGABasePin = 8
|
||||
|
||||
OBJ
|
||||
|
||||
vga : "bel-vga1024"
|
||||
|
||||
VAR
|
||||
|
||||
long sync ' gets signal for vertical refresh sync
|
||||
byte VGACogStatus ' results of trying to start the VGA display cog
|
||||
|
||||
PUB main | i
|
||||
|
||||
VGACogStatus := vga.Start(VGABasePin,@sync)
|
||||
|
||||
vga.print_string(string("abcd"))
|
||||
vga.printchar(0)
|
||||
vga.newline
|
||||
|
||||
repeat
|
||||
repeat i from $20 to $ff
|
||||
vga.printchar(i)
|
||||
waitcnt(500_000 + cnt)
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
CON
|
||||
|
||||
cols = VGA#cols 'anzahl der spalten
|
||||
rows = VGA#rows 'anzahl der zeilen
|
||||
chrs = cols * rows 'anzahl der zeichen
|
||||
|
||||
OBJ
|
||||
VGA : "bel-vga1024-htext"
|
||||
|
||||
VAR
|
||||
|
||||
byte array[chrs] 'bildschirmspeicher
|
||||
byte VGACogStatus 'status des vga-treiber-cogs
|
||||
byte cx0, cy0, cm0 'x, y, mode von cursor 0
|
||||
byte cx1, cy1, cm1 'x, y, mode von cursor 1
|
||||
word colors[rows] 'zeilenfarbenspeicher
|
||||
long ScreenIndex 'index im bildschirmspeicher
|
||||
long RowIndex 'zeilenindex
|
||||
long ColumnIndex 'spaltenindex
|
||||
long color 'zeilenfarbe
|
||||
|
||||
PUB Start(BasePin,pSyncAddress)| ColorIndex
|
||||
stop 'stopt ein bereits laufenden vga-task
|
||||
cm0 := %000 'cursor 0 aus
|
||||
cm1 := %110 'cursor 1 unterstrich blinkend
|
||||
printchar($0E) 'bildschirm löschen
|
||||
|
||||
ColorIndex := 0 'graue balken auf scharzem grund
|
||||
repeat rows
|
||||
colors[ColorIndex++] := %00000100_01101000 'rrggbb00_rrggbb00
|
||||
|
||||
VGACogStatus := VGA.Start(BasePin,@array, @colors, @cx0, pSyncAddress) 'startet vga-treiber (2cogs)
|
||||
|
||||
return true
|
||||
|
||||
PUB Stop '' to stop specific running monitor cog
|
||||
VGA.stop ' stop any VGA cogs that were started
|
||||
|
||||
PUB home
|
||||
'' move writing place to upper left without clearing screen
|
||||
SetXY(0,0)
|
||||
|
||||
PUB SetXY(x,y)
|
||||
ColumnIndex := x <# cols 'setzt spalte mit begrenzung auf spaltenzahl
|
||||
RowIndex := y <# rows 'setzt zeile mit begrenzung auf zeilenzahl
|
||||
ScreenIndex := ColumnIndex + (RowIndex * cols) 'berechnet bildschirmindex
|
||||
|
||||
PUB print_string(ptr)
|
||||
repeat while byte[ptr]
|
||||
printchar(byte[ptr++])
|
||||
|
||||
PUB printchar(c) | i, k
|
||||
'' Print a character
|
||||
''
|
||||
'' $0D = new line
|
||||
'' $0E = clear screen
|
||||
'' $20..$FF = character
|
||||
|
||||
case c
|
||||
$0D: 'return?
|
||||
newline
|
||||
|
||||
$20..$FF: 'character?
|
||||
array[RowIndex * cols + ColumnIndex] := c
|
||||
if ++ColumnIndex == cols
|
||||
newline
|
||||
cx1 := ColumnIndex
|
||||
cy1 := RowIndex
|
||||
|
||||
$0E: 'clear screen?
|
||||
ScreenIndex := 0
|
||||
repeat chrs
|
||||
array[ScreenIndex++] := 32
|
||||
home
|
||||
|
||||
|
||||
PUB newline_test | i
|
||||
|
||||
ColumnIndex := 0
|
||||
if (RowIndex += 1) == rows
|
||||
RowIndex -= 1
|
||||
|
||||
'scroll lines
|
||||
ScreenIndex := 0
|
||||
repeat i from 0 to chrs - cols
|
||||
array[ScreenIndex + i] := array[ScreenIndex + i + cols]
|
||||
|
||||
'clear new line
|
||||
bytefill(@array[(rows-1)*cols], 32, cols) 'BYTEFILL (StartAddress, Value, Count)
|
||||
|
||||
PUB newline | i
|
||||
|
||||
ColumnIndex := 0
|
||||
if (RowIndex += 1) == rows
|
||||
RowIndex -= 1
|
||||
'scroll lines
|
||||
repeat i from 0 to rows-2
|
||||
bytemove(@array[i*cols], @array[(i+1)*cols], cols) 'BYTEMOVE (DestAddress, SrcAddress, Count)
|
||||
|
||||
'clear new line
|
||||
' bytefill(@array[(rows-1)*cols], 32, cols<<1) 'BYTEFILL (StartAddress, Value, Count)
|
||||
' code fehlerhaft, zähler ist falsch gesetzt!
|
||||
|
||||
bytefill(@array[(rows-1)*cols], 32, cols) 'BYTEFILL (StartAddress, Value, Count)
|
||||
|
||||
|
||||
{
|
||||
PUB newline | i
|
||||
|
||||
ColumnIndex := 0
|
||||
if (RowIndex += 1) == rows
|
||||
RowIndex -= 2
|
||||
'scroll lines
|
||||
repeat i from 0 to rows-3
|
||||
wordmove(@array.word[i*cols], @array.word[(i+2)*cols], cols)
|
||||
'clear new line
|
||||
wordfill(@array.word[(rows-2)*cols], 32, cols<<1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,19 @@
|
|||
|
||||
help - diese hilfe
|
||||
<dateiname> - bin-datei wird gestartet
|
||||
mount - sd-card mounten
|
||||
dir wbml - verzeichnis anzeigen
|
||||
type <dateiname> - anzeige einer textdatei
|
||||
load <dateiname> - startet bin-datei
|
||||
bload <dateiname> - bellatrix-treiber laden
|
||||
del <dateiname> - datei löschen
|
||||
cls - bildschirm löschen
|
||||
ver - regime Version anzeigen
|
||||
rbuffer - inhalt des ringpuffers anzeigen
|
||||
rem -
|
||||
echo - ausgabe
|
||||
cogs - zeigt freie/belegte cogs an
|
||||
color - Textfarbe ändern
|
||||
|
||||
reboot - hive neu starten
|
||||
copy <q> <z> <p> - datei kopieren
|
Loading…
Reference in New Issue