update to TriOS R57 changes
This commit is contained in:
parent
43d016e23e
commit
8374973638
44
README.md
44
README.md
|
@ -1,25 +1,33 @@
|
||||||
INHALT
|
INHALT
|
||||||
======
|
======
|
||||||
|
|
||||||
1. Installation des Grundsystems
|
1. Installations-Varianten
|
||||||
2. Regime im Überblick
|
2. Installation des Grundsystems
|
||||||
3. Forth im Überblick
|
3. Regime im Überblick
|
||||||
|
4. Forth im Überblick
|
||||||
|
|
||||||
|
|
||||||
|
1. Installations-Varianten
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Zur Installation von TriOS auf dem Hive stehen 3 verschiedene Varianten zur
|
||||||
|
Verfügung, welche am Ende aber dasselbe Ergebnis erzielen:
|
||||||
|
|
||||||
1. Installation des Grundsystems:
|
Binäres Archiv: HIVE-TriOS-Rxx-bin.zip
|
||||||
=================================
|
Source-Archiv: HIVE-TriOS-Rxx-src.zip
|
||||||
|
Git Repository: https://dev.bitquell.de/summary/HIVE/TriOS.git
|
||||||
|
|
||||||
TriOS kann in zwei Versionen installiert werden: Mit oder ohne Forth als
|
Das binäre Archiv kann sofort installiert werden. Wer selbst an den Quellen
|
||||||
integrierte Programmiersprache. Als Standard wird das System ohne Forth
|
Änderungen vornehmen, sollte stattdessen das Source-Archiv nutzen oder gleich
|
||||||
installiert. Die Installation ist so für den Einsteiger einfacher. Möchte
|
das top-aktuelle Git Repository nutzen.
|
||||||
man auch PropForth installieren, muß nur eine Konfiguration geändert werden
|
|
||||||
und ein Basiswortschatz im Forth selbst kompiliert werden.
|
Bei Nutzung des Source-Archives oder des Git-Repository müssen die Quellen vor
|
||||||
|
der Installation noch compiliert werden.
|
||||||
|
|
||||||
WICHTIG: Das System kann nur mit Brat's Spin Tool - kurz BST - compiliert
|
WICHTIG: Das System kann nur mit Brat's Spin Tool - kurz BST - compiliert
|
||||||
werden. In den Einstellungen des Compilers (Tools/Compiler
|
werden. In den Einstellungen des Compilers
|
||||||
Preferences/Search Paths) muss das lib-Verzeichnis eingetragen werden.
|
(Tools/Compiler Preferences/Search Paths) muss das lib-Verzeichnis eingetragen
|
||||||
|
werden.
|
||||||
|
|
||||||
Downloadlink BST: http://www.fnarfbargle.com/bst.html
|
Downloadlink BST: http://www.fnarfbargle.com/bst.html
|
||||||
|
|
||||||
|
@ -30,6 +38,16 @@ Pfad befindet.
|
||||||
Downloadlink BSTC: http://www.fnarfbargle.com/bst/bstc/Latest/
|
Downloadlink BSTC: http://www.fnarfbargle.com/bst/bstc/Latest/
|
||||||
|
|
||||||
|
|
||||||
|
2. Installation des Grundsystems:
|
||||||
|
=================================
|
||||||
|
|
||||||
|
TriOS kann in zwei Versionen installiert werden: Mit oder ohne Forth als
|
||||||
|
integrierte Programmiersprache. Als Standard wird das System ohne Forth
|
||||||
|
installiert. Die Installation ist so für den Einsteiger einfacher. Möchte
|
||||||
|
man auch PropForth installieren, muß nur ein Basiswortschatz im Forth selbst
|
||||||
|
kompiliert werden.
|
||||||
|
|
||||||
|
|
||||||
Installation ohne Forth (Standard):
|
Installation ohne Forth (Standard):
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
@ -185,7 +203,7 @@ tv.bin - TV-Textmodus 40 x 13 Zeichen
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2. Forth im Überblick:
|
4. Forth im Überblick:
|
||||||
======================
|
======================
|
||||||
|
|
||||||
Einige nützliche Kommandos befinden sich in dem Modul tools.mod. In den meisten
|
Einige nützliche Kommandos befinden sich in dem Modul tools.mod. In den meisten
|
||||||
|
|
|
@ -269,14 +269,14 @@ CHIP_SPEC = CHIP_SPEC_FAT|CHIP_SPEC_LDR|CHIP_SPEC_HSS|CHIP_SPEC_WAV|CHIP_SPEC_SI
|
||||||
' clk -------+|
|
' clk -------+|
|
||||||
' /wr ------+||
|
' /wr ------+||
|
||||||
' /hs -----+||| +------------------------- /cs
|
' /hs -----+||| +------------------------- /cs
|
||||||
' |||| |+------------------------ adm-p22
|
' |||| |+------------------------ adm-p22 (int2 - port 1/2)
|
||||||
' |||| ||+----------------------- adm-p21 (io)
|
' |||| ||+----------------------- adm-p21 (int1 - port 3)
|
||||||
' |||| |||+---------------------- adm-p20 (rx)
|
' |||| |||+---------------------- adm-p20 (scl)
|
||||||
' |||| ||||+--------------------- adm-p19 (tx)
|
' |||| ||||+--------------------- adm-p19 (sda)
|
||||||
' |||| ||||| +------+ d0..d7
|
' |||| ||||| +------+ d0..d7
|
||||||
' |||| ||||| | |
|
' |||| ||||| | |
|
||||||
DB_IN = %00001001_00100000_00000000_00000000 'dira-wert für datenbuseingabe
|
DB_IN = %00001001_00000000_00000000_00000000 'dira-wert für datenbuseingabe
|
||||||
DB_OUT = %00001001_00100000_00000000_11111111 'dira-wert für datenbusausgabe
|
DB_OUT = %00001001_00000000_00000000_11111111 'dira-wert für datenbusausgabe
|
||||||
|
|
||||||
M1 = %00000010_00000000_00000000_00000000 'busclk=1? & /prop1=0?
|
M1 = %00000010_00000000_00000000_00000000 'busclk=1? & /prop1=0?
|
||||||
M2 = %00000010_10000000_00000000_00000000 'maske: busclk & /cs (/prop1)
|
M2 = %00000010_10000000_00000000_00000000 'maske: busclk & /cs (/prop1)
|
||||||
|
@ -347,7 +347,7 @@ OBJ
|
||||||
com : "adm-com" 'serielle schnittstelle
|
com : "adm-com" 'serielle schnittstelle
|
||||||
#endif
|
#endif
|
||||||
#ifdef __ADM_LAN
|
#ifdef __ADM_LAN
|
||||||
sock : "driver_socket" 'LAN
|
sock : "adm-socket" 'LAN
|
||||||
num : "glob-numbers" 'Number Engine
|
num : "glob-numbers" 'Number Engine
|
||||||
#endif
|
#endif
|
||||||
#ifdef __ADM_PLX
|
#ifdef __ADM_PLX
|
||||||
|
@ -497,7 +497,7 @@ PUB main | cmd,err 'chip: kommandointerpret
|
||||||
' ---------------------------------------------- LAN-FUNKTIONEN
|
' ---------------------------------------------- LAN-FUNKTIONEN
|
||||||
#ifdef __ADM_LAN
|
#ifdef __ADM_LAN
|
||||||
gc#a_lanStart: lan_start 'Start Network
|
gc#a_lanStart: lan_start 'Start Network
|
||||||
gc#a_lanStop:lan_stop 'Stop Network
|
gc#a_lanStop: lan_stop 'Stop Network
|
||||||
gc#a_lanConnect: lan_connect 'ausgehende TCP-Verbindung öffnen
|
gc#a_lanConnect: lan_connect 'ausgehende TCP-Verbindung öffnen
|
||||||
gc#a_lanListen: lan_listen 'auf eingehende TCP-Verbindung lauschen
|
gc#a_lanListen: lan_listen 'auf eingehende TCP-Verbindung lauschen
|
||||||
gc#a_lanWaitConnTimeout: lan_waitconntimeout 'bestimmte Zeit auf Verbindung warten
|
gc#a_lanWaitConnTimeout: lan_waitconntimeout 'bestimmte Zeit auf Verbindung warten
|
||||||
|
@ -553,7 +553,12 @@ PUB main | cmd,err 'chip: kommandointerpret
|
||||||
gc#a_plxPing: plx_ping 'abfrage ob device vorhanden ist
|
gc#a_plxPing: plx_ping 'abfrage ob device vorhanden ist
|
||||||
gc#a_plxSetAdr: plx_setAddr 'adressen adda/ports für poller setzen
|
gc#a_plxSetAdr: plx_setAddr 'adressen adda/ports für poller setzen
|
||||||
' ---------------------------------------------- GAMEDEVICES
|
' ---------------------------------------------- GAMEDEVICES
|
||||||
gc#a_Joy: joy_get 'Joystick abfragen (1 x 8bit Port)
|
gc#a_Joy: plx_get_joy 'Joystick abfragen (1 x 8bit Port)
|
||||||
|
gc#a_Paddle: plx_get_paddle 'Paddle abfragen (1 x 8bit Port 1 x Analog)
|
||||||
|
gc#a_Pad: plx_get_pad 'Pad abfragen (1 x 8bit Port 2 x Analog)
|
||||||
|
' ---------------------------------------------- Venatrix-Plexus
|
||||||
|
gc#a_VexPut: plx_put_vex 'Register im Venatrix-Plexus schreiben
|
||||||
|
gc#a_VexGet: plx_get_vex 'Register im Venatrix-Plexus lesen
|
||||||
#endif '__ADM_PLX
|
#endif '__ADM_PLX
|
||||||
|
|
||||||
' ---------------------------------------------- WAV-FUNKTIONEN
|
' ---------------------------------------------- WAV-FUNKTIONEN
|
||||||
|
@ -655,7 +660,7 @@ PRI init_chip | err,i,j 'chip: initialisierung d
|
||||||
clr_dmarker 'dir-marker löschen
|
clr_dmarker 'dir-marker löschen
|
||||||
sdfat.FATEngine
|
sdfat.FATEngine
|
||||||
repeat
|
repeat
|
||||||
waitcnt(cnt + clkfreq/10)
|
waitcnt(cnt + clkfreq)
|
||||||
until sd_mount("B") == 0
|
until sd_mount("B") == 0
|
||||||
'err := sd_mount("B")
|
'err := sd_mount("B")
|
||||||
'siglow(err)
|
'siglow(err)
|
||||||
|
@ -694,6 +699,7 @@ PRI init_chip | err,i,j 'chip: initialisierung d
|
||||||
#endif '__ADM_COM
|
#endif '__ADM_COM
|
||||||
|
|
||||||
#ifdef __ADM_PLX
|
#ifdef __ADM_PLX
|
||||||
|
'plx-bus initialisieren
|
||||||
plx.init 'defaultwerte setzen, poller-cog starten
|
plx.init 'defaultwerte setzen, poller-cog starten
|
||||||
plx.run 'plexbus freigeben (poller läuft)
|
plx.run 'plexbus freigeben (poller läuft)
|
||||||
#endif '__ADM_PLX
|
#endif '__ADM_PLX
|
||||||
|
@ -1378,7 +1384,7 @@ PRI sd_del | err 'sdcard: eine datei oder
|
||||||
|
|
||||||
sub_getstr
|
sub_getstr
|
||||||
err := \sdfat.deleteEntry(@tbuf)
|
err := \sdfat.deleteEntry(@tbuf)
|
||||||
sighigh(err) 'fehleranzeige
|
siglow(err) 'fehleranzeige
|
||||||
bus_putchar(err) 'ergebnis der operation senden
|
bus_putchar(err) 'ergebnis der operation senden
|
||||||
|
|
||||||
PRI sd_rename | err 'sdcard: datei oder verzeichnis umbenennen
|
PRI sd_rename | err 'sdcard: datei oder verzeichnis umbenennen
|
||||||
|
@ -2426,13 +2432,34 @@ PRI plx_setAddr | adda, ports 'adressen adda/ports fü
|
||||||
ports := bus_getchar 'address ports
|
ports := bus_getchar 'address ports
|
||||||
plx.setadr(adda,ports)
|
plx.setadr(adda,ports)
|
||||||
|
|
||||||
PRI joy_get | reg 'Joystick abfragen (1 x 8bit Port)
|
PRI plx_get_joy 'Joystick abfragen (1 x 8bit Port)
|
||||||
|
|
||||||
|
bus_putchar(!plx.getreg(plx#R_INP0))
|
||||||
|
|
||||||
|
PRI plx_get_paddle 'Paddle abfragen (1 x 8bit Port 1 x Analog)
|
||||||
|
|
||||||
|
bus_putchar(!plx.getreg(plx#R_INP0))
|
||||||
|
bus_putchar(plx.getreg(plx#R_PAD0))
|
||||||
|
|
||||||
|
PRI plx_get_pad 'Pad abfragen (1 x 8bit Port 2 x Analog)
|
||||||
|
|
||||||
|
bus_putchar(!plx.getreg(plx#R_INP0))
|
||||||
|
bus_putchar(plx.getreg(plx#R_PAD0))
|
||||||
|
bus_putchar(plx.getreg(plx#R_PAD1))
|
||||||
|
|
||||||
|
PRI plx_put_vex | data, reg, addr 'Register im Venatrix-Plexus schreiben
|
||||||
|
|
||||||
|
data := bus_getchar 'datum empfangen
|
||||||
|
reg := bus_getchar 'registernummer empfangen
|
||||||
|
addr := bus_getchar 'device-adresse ampfangen
|
||||||
|
plx.vexput(data,reg,addr)
|
||||||
|
|
||||||
|
PRI plx_get_vex | reg, addr 'Register im Venatrix-Plexus lesen
|
||||||
|
|
||||||
|
reg := bus_getchar 'registernummer empfangen
|
||||||
|
addr := bus_getchar 'device-adresse empfangen
|
||||||
|
bus_putchar(plx.vexget(reg,addr))
|
||||||
|
|
||||||
reg:=bus_getchar '0-6
|
|
||||||
if reg>3 and reg<7
|
|
||||||
bus_putchar(!plx.getreg(reg))
|
|
||||||
else
|
|
||||||
bus_putchar(plx.getreg(reg))
|
|
||||||
|
|
||||||
CON ''------------------------------------------------- End of DCF77 FUNCTIONS
|
CON ''------------------------------------------------- End of DCF77 FUNCTIONS
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ Logbuch :
|
||||||
21-10-2012-uheld - Window-Funktionen
|
21-10-2012-uheld - Window-Funktionen
|
||||||
28-11-2012-uheld - wahlweise Einbindung von VGA- oder TV-Treiber über #define
|
28-11-2012-uheld - wahlweise Einbindung von VGA- oder TV-Treiber über #define
|
||||||
15-04-2013-dr235 - konstanten für bellatrix-funktionen komplett ausgelagert
|
15-04-2013-dr235 - konstanten für bellatrix-funktionen komplett ausgelagert
|
||||||
|
22.02.2014-dr235 - per compilerflag wählbare monitorsettings eingefügt (57/60hz)
|
||||||
|
|
||||||
Notizen:
|
Notizen:
|
||||||
- setheader
|
- setheader
|
||||||
|
@ -132,6 +133,14 @@ $0A..FF CHAR Zeichenausgabe
|
||||||
'#define __TV
|
'#define __TV
|
||||||
'#define __VGA
|
'#define __VGA
|
||||||
|
|
||||||
|
'Hier sind verschiedene Timings für den Monitor wählbar.
|
||||||
|
'Die Settings selbst befinden sich in der Datei /lib/bel-vga.spin und
|
||||||
|
'können dort auch um weitere Optionen erweitert werden.
|
||||||
|
|
||||||
|
#define __VGA_MONSET1 '60Hz
|
||||||
|
'#define __VGA_MONSET2 '57Hz
|
||||||
|
|
||||||
|
|
||||||
CON
|
CON
|
||||||
|
|
||||||
_CLKMODE = XTAL1 + PLL16X
|
_CLKMODE = XTAL1 + PLL16X
|
||||||
|
|
|
@ -55,9 +55,9 @@ word[7] - DCURR - Stack pointer. This is the initial value of the stack pointer.
|
||||||
|
|
||||||
|
|
||||||
CON ' KONFIGURATION
|
CON ' KONFIGURATION
|
||||||
{
|
|
||||||
Achtung: Nur eine Konfiguration wählen! Beim Bauen mittels Makefiles keines aktivieren"
|
|
||||||
}
|
'Achtung: Nur eine Konfiguration wählen! Beim Bauen mittels Makefiles keines aktivieren!
|
||||||
|
|
||||||
'#define forth ' forth + spin-loader
|
'#define forth ' forth + spin-loader
|
||||||
'#define regime ' spin-loader OHNE FORTH, reg.sys wird sofort automatisch gestartet
|
'#define regime ' spin-loader OHNE FORTH, reg.sys wird sofort automatisch gestartet
|
||||||
|
|
|
@ -481,5 +481,9 @@ wvariable lcog \ nummer interaktiven cog
|
||||||
: _ob onboot ;
|
: _ob onboot ;
|
||||||
: onboot _ob start ;
|
: onboot _ob start ;
|
||||||
|
|
||||||
|
saveforth
|
||||||
|
|
||||||
|
reboot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,26 +28,26 @@ Notizen :
|
||||||
|
|
||||||
|
|
||||||
OBJ
|
OBJ
|
||||||
gc : "m-glob-con"
|
gc : "glob-con"
|
||||||
|
|
||||||
|
|
||||||
CON
|
CON
|
||||||
|
|
||||||
SCL = gc#adm_scl
|
SCL = gc#adm_scl
|
||||||
SDA = gc#adm_sda
|
SDA = gc#adm_sda
|
||||||
' VNX = gc#adm_int1
|
|
||||||
' portadressen sepia
|
' portadressen sepia
|
||||||
|
|
||||||
'pcf8574 %0100_ABC_0
|
'pcf8574 %0100_ABC_0
|
||||||
PORT1 = %0100_000 '$20
|
PORT1 = %0100_000 '$20
|
||||||
PORT2 = %0100_001 '$21
|
PORT2 = %0100_001 '$21
|
||||||
PORT3 = %0100_010 '$22
|
PORT3 = %0100_010 '$22
|
||||||
{
|
|
||||||
'pcf8574a %0111_ABC_0
|
'pcf8574a %0111_ABC_0
|
||||||
PORT1 = %0111_000 '$38
|
' PORT1 = %0111_000 '$38
|
||||||
PORT2 = %0111_001 '$39
|
' PORT2 = %0111_001 '$39
|
||||||
PORT3 = %0111_010 '$3A
|
' PORT3 = %0111_010 '$3A
|
||||||
}
|
|
||||||
' ad/da-wandler-adresse
|
' ad/da-wandler-adresse
|
||||||
|
|
||||||
'pcf8591 %1001_ABC_R
|
'pcf8591 %1001_ABC_R
|
||||||
|
@ -84,7 +84,7 @@ CON
|
||||||
R_INP0 = 4
|
R_INP0 = 4
|
||||||
R_INP1 = 5
|
R_INP1 = 5
|
||||||
R_INP2 = 6
|
R_INP2 = 6
|
||||||
' R_VNX = 7
|
|
||||||
|
|
||||||
|
|
||||||
VAR
|
VAR
|
||||||
|
@ -120,11 +120,7 @@ PUB init 'plx: io-system initiali
|
||||||
|
|
||||||
'pollcog starten
|
'pollcog starten
|
||||||
plxcogid := cognew(poller,@plxstack)
|
plxcogid := cognew(poller,@plxstack)
|
||||||
pub plxstop
|
|
||||||
|
|
||||||
if(plxcogid)
|
|
||||||
cogstop(plxcogid~ - 1)
|
|
||||||
lockret(-1 + plxlock~)
|
|
||||||
PRI poller 'plx: pollcog
|
PRI poller 'plx: pollcog
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
|
@ -134,18 +130,14 @@ PRI poller 'plx: pollcog
|
||||||
'analoge eingänge pollen
|
'analoge eingänge pollen
|
||||||
plxreg[R_PAD0] := ad_ch(adr_adda,0)
|
plxreg[R_PAD0] := ad_ch(adr_adda,0)
|
||||||
plxreg[R_PAD1] := ad_ch(adr_adda,1)
|
plxreg[R_PAD1] := ad_ch(adr_adda,1)
|
||||||
lockclr(plxlock) 'bus freigeben
|
|
||||||
|
|
||||||
repeat until not lockset(plxlock) 'auf freien bus warten
|
|
||||||
plxreg[R_PAD2] := ad_ch(adr_adda,2)
|
plxreg[R_PAD2] := ad_ch(adr_adda,2)
|
||||||
plxreg[R_PAD3] := ad_ch(adr_adda,3)
|
plxreg[R_PAD3] := ad_ch(adr_adda,3)
|
||||||
lockclr(plxlock) 'bus freigeben
|
|
||||||
|
|
||||||
repeat until not lockset(plxlock) 'auf freien bus warten
|
|
||||||
'digitale eingabeports pollen
|
'digitale eingabeports pollen
|
||||||
plxreg[R_INP0] := in(adr_port )
|
plxreg[R_INP0] := in(adr_port )
|
||||||
plxreg[R_INP1] := in(adr_port+1)
|
plxreg[R_INP1] := in(adr_port+1)
|
||||||
plxreg[R_INP2] := in(adr_port+2)
|
plxreg[R_INP2] := in(adr_port+2)
|
||||||
|
|
||||||
'semaphore freigeben
|
'semaphore freigeben
|
||||||
lockclr(plxlock) 'bus freigeben
|
lockclr(plxlock) 'bus freigeben
|
||||||
|
|
||||||
|
@ -211,11 +203,27 @@ PUB ping(adr):ack 'plx: device anpingen
|
||||||
|
|
||||||
PUB setadr(adradda,adrport)
|
PUB setadr(adradda,adrport)
|
||||||
|
|
||||||
'halt
|
halt
|
||||||
adr_adda := adradda
|
adr_adda := adradda
|
||||||
adr_port := adrport
|
adr_port := adrport
|
||||||
ad_init(adr_adda)
|
ad_init(adr_adda)
|
||||||
'run
|
run
|
||||||
|
|
||||||
|
PUB vexput(data,regnr,adr):ack 'plx: register in venatrix-plexus setzen
|
||||||
|
|
||||||
|
start
|
||||||
|
ack := write(adr << 1)
|
||||||
|
ack := (ack << 1) | write(regnr)
|
||||||
|
ack := (ack << 1) | write(data)
|
||||||
|
stop
|
||||||
|
|
||||||
|
PUB vexget(regnr,adr):data|ack 'plx: regsiter aus venatrix-plexus auslesen
|
||||||
|
|
||||||
|
start
|
||||||
|
write((adr << 1) + 1)
|
||||||
|
write(regnr)
|
||||||
|
data := read(0)
|
||||||
|
stop
|
||||||
|
|
||||||
CON 'I2C-FUNKTIONEN
|
CON 'I2C-FUNKTIONEN
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ CON
|
||||||
ERRSOCKETCLOSED = ERR - 3 ' socket closed, could not perform operation
|
ERRSOCKETCLOSED = ERR - 3 ' socket closed, could not perform operation
|
||||||
|
|
||||||
OBJ
|
OBJ
|
||||||
nic : "driver_enc28j60"
|
nic : "adm-enc28j60"
|
||||||
|
|
||||||
'ser : "SerialMirror"
|
'ser : "SerialMirror"
|
||||||
'stk : "Stack Length"
|
'stk : "Stack Length"
|
|
@ -20,8 +20,9 @@
|
||||||
|
|
||||||
CON
|
CON
|
||||||
|
|
||||||
' 1024 x 768 @ 60Hz settings
|
|
||||||
|
|
||||||
|
' 1024 x 768 @ H:48KHz V:60Hz settings
|
||||||
|
#ifdef __VGA_MONSET1
|
||||||
hp = 1024 'horizontal pixels
|
hp = 1024 'horizontal pixels
|
||||||
vp = 768 'vertical pixels
|
vp = 768 'vertical pixels
|
||||||
hf = 24 'horizontal front porch pixels
|
hf = 24 'horizontal front porch pixels
|
||||||
|
@ -31,6 +32,20 @@ CON
|
||||||
vs = 6 'vertical sync lines
|
vs = 6 'vertical sync lines
|
||||||
vb = 29 'vertical back porch lines
|
vb = 29 'vertical back porch lines
|
||||||
pr = 65 'pixel rate in MHz at 80MHz system clock (5MHz granularity)
|
pr = 65 'pixel rate in MHz at 80MHz system clock (5MHz granularity)
|
||||||
|
#endif __VGA_MONSET1
|
||||||
|
|
||||||
|
' 1024 x 768 @ H:45KHz V:57Hz settings
|
||||||
|
#ifdef __VGA_MONSET2
|
||||||
|
hp = 1024 'horizontal pixels
|
||||||
|
vp = 768 'vertical pixels
|
||||||
|
hf = 16 'horizontal front porch pixels
|
||||||
|
hs = 96 'horizontal sync pixels
|
||||||
|
hb = 176 'horizontal back porch pixels
|
||||||
|
vf = 1 'vertical front porch lines
|
||||||
|
vs = 3 'vertical sync lines
|
||||||
|
vb = 28 'vertical back porch lines
|
||||||
|
pr = 60 'pixel rate in MHz at 80MHz system clock (5MHz granularity)
|
||||||
|
#endif __VGA_MONSET2
|
||||||
|
|
||||||
ht = hp + hf + hs + hb 'total scan line pixels
|
ht = hp + hf + hs + hb 'total scan line pixels
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,6 @@ FL_SEL = %0000_0001 'eintrag ist selektiert
|
||||||
|
|
||||||
FL_FOCUS = %0000_0001 'box ist selektiert
|
FL_FOCUS = %0000_0001 'box ist selektiert
|
||||||
|
|
||||||
DR_SD = 0
|
|
||||||
DR_RAM = 1
|
|
||||||
DR_BLK = 2
|
|
||||||
|
|
||||||
PUB dummy
|
PUB dummy
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,12 @@ CON 'Signaldefinitionen --------------------------------------------------------
|
||||||
#21, A_Bluetooth_Line 'Key-Line des HC05-Bluetooth-Moduls
|
#21, A_Bluetooth_Line 'Key-Line des HC05-Bluetooth-Moduls
|
||||||
#23, A_SELECT 'administra-auswahlsignal
|
#23, A_SELECT 'administra-auswahlsignal
|
||||||
|
|
||||||
|
'plexbus
|
||||||
|
adm_sda = 19 'i2c-datenpin
|
||||||
|
adm_scl = 20 'i2c-clockpin
|
||||||
|
adm_int1 = 21 'interrupt port 1&2
|
||||||
|
adm_int2 = 22 'interrupt port 3
|
||||||
|
|
||||||
CON 'KEY_CODES -------------------------------------------------------------------------------------
|
CON 'KEY_CODES -------------------------------------------------------------------------------------
|
||||||
|
|
||||||
KEY_CTRL = 2
|
KEY_CTRL = 2
|
||||||
|
@ -253,6 +259,14 @@ A_BLT = %00000000_00000000_00001000_00000000
|
||||||
a_Pad 'Pad abfragen (1 x 8bit Port 2 x Analog)
|
a_Pad 'Pad abfragen (1 x 8bit Port 2 x Analog)
|
||||||
a_SetJoy 'Port für Joystick setzen
|
a_SetJoy 'Port für Joystick setzen
|
||||||
a_SetPad '137 'Chan für Pad setzen
|
a_SetPad '137 'Chan für Pad setzen
|
||||||
|
' ---------------------------------------------- Venatrix-Propeller-Slave
|
||||||
|
a_VexPut 'Register im Venatrix-Plexus schreiben
|
||||||
|
a_VexGet '139 'Register im Venatrix-Plexus lesen
|
||||||
|
|
||||||
|
' ---------------------------------------------- AY-SOUNDFUNKTIONEN
|
||||||
|
#147, a_ayStart
|
||||||
|
a_ayStop
|
||||||
|
a_ayUpdateRegisters '149
|
||||||
|
|
||||||
' ---------------------------------------------- WAV-FUNKTIONEN
|
' ---------------------------------------------- WAV-FUNKTIONEN
|
||||||
#150, a_sdwStart 'spielt wav-datei direkt von sd-card ab
|
#150, a_sdwStart 'spielt wav-datei direkt von sd-card ab
|
||||||
|
@ -314,10 +328,8 @@ A_BLT = %00000000_00000000_00001000_00000000
|
||||||
a_s_beep
|
a_s_beep
|
||||||
a_s_dmpreg '199 'soundinformationen senden
|
a_s_dmpreg '199 'soundinformationen senden
|
||||||
|
|
||||||
' ---------------------------------------------- AY-SOUNDFUNKTIONEN
|
' ---------------------------------------------- Eigene Erweiterungen
|
||||||
#200, a_ayStart
|
' 200 ... 254 frei für eigene Erweiterungen
|
||||||
a_ayStop
|
|
||||||
a_ayUpdateRegisters
|
|
||||||
|
|
||||||
CON 'BELLATRIX-FUNKTIONEN --------------------------------------------------------------------------
|
CON 'BELLATRIX-FUNKTIONEN --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ Chip : Regnatix
|
||||||
Typ : Programm
|
Typ : Programm
|
||||||
Version :
|
Version :
|
||||||
Subversion :
|
Subversion :
|
||||||
Funktion :
|
Funktion : Fenster mit Dateiliste
|
||||||
Komponenten : -
|
Komponenten : -
|
||||||
COG's : -
|
COG's : -
|
||||||
Logbuch :
|
Logbuch :
|
||||||
|
@ -79,10 +79,28 @@ PUB redraw | i
|
||||||
i++
|
i++
|
||||||
ios.printnl
|
ios.printnl
|
||||||
|
|
||||||
PUB setpos(pos)
|
PUB setpos(npos)|opos,i,col,row
|
||||||
|
|
||||||
box_pos := pos
|
opos := box_pos
|
||||||
redraw
|
box_pos := npos
|
||||||
|
|
||||||
|
' redrawx(npos,opos)
|
||||||
|
|
||||||
|
ios.winset(box_win)
|
||||||
|
|
||||||
|
'alte position neu zeichnen
|
||||||
|
row := opos / box_cols
|
||||||
|
col := (opos - (row * box_cols)) * (fm#MAX_LEN + 2)
|
||||||
|
ios.wincursety(row)
|
||||||
|
ios.wincursetx(col)
|
||||||
|
print_file(box_view + opos, opos)
|
||||||
|
|
||||||
|
'neue position neu zeichnen
|
||||||
|
row := npos / box_cols
|
||||||
|
col := (npos - (row * box_cols)) * (fm#MAX_LEN + 2)
|
||||||
|
ios.wincursety(row)
|
||||||
|
ios.wincursetx(col)
|
||||||
|
print_file(box_view + npos, npos)
|
||||||
|
|
||||||
PUB setview(view)
|
PUB setview(view)
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ Chip : Regnatix
|
||||||
Typ : Programm
|
Typ : Programm
|
||||||
Version :
|
Version :
|
||||||
Subversion :
|
Subversion :
|
||||||
Funktion :
|
Funktion : Eingabedialog String
|
||||||
Komponenten : -
|
Komponenten : -
|
||||||
COG's : -
|
COG's : -
|
||||||
Logbuch :
|
Logbuch :
|
||||||
|
|
|
@ -14,7 +14,7 @@ Chip : Regnatix
|
||||||
Typ : Programm
|
Typ : Programm
|
||||||
Version :
|
Version :
|
||||||
Subversion :
|
Subversion :
|
||||||
Funktion :
|
Funktion : Infodialog mit Fortschrittsbalken
|
||||||
Komponenten : -
|
Komponenten : -
|
||||||
COG's : -
|
COG's : -
|
||||||
Logbuch :
|
Logbuch :
|
||||||
|
|
|
@ -14,7 +14,7 @@ Chip : Regnatix
|
||||||
Typ : Programm
|
Typ : Programm
|
||||||
Version :
|
Version :
|
||||||
Subversion :
|
Subversion :
|
||||||
Funktion :
|
Funktion : Warndialog mit zwei Buttons
|
||||||
Komponenten : -
|
Komponenten : -
|
||||||
COG's : -
|
COG's : -
|
||||||
Logbuch :
|
Logbuch :
|
||||||
|
@ -66,8 +66,12 @@ PUB draw(stradr1,stradr2,stradr3):button | key,bnr
|
||||||
case key
|
case key
|
||||||
gc#KEY_CURLEFT: bnr := 1
|
gc#KEY_CURLEFT: bnr := 1
|
||||||
gc#KEY_CURRIGHT: bnr := 2
|
gc#KEY_CURRIGHT: bnr := 2
|
||||||
|
gc#KEY_TAB: case bnr
|
||||||
|
1: bnr := 2
|
||||||
|
2: bnr := 1
|
||||||
|
gc#KEY_ESC: bnr := 0
|
||||||
|
|
||||||
until key == gc#KEY_RETURN
|
until (key == gc#KEY_RETURN) or (key == gc#KEY_ESC)
|
||||||
return bnr
|
return bnr
|
||||||
|
|
||||||
PRI draw_buttons(stradr2,stradr3,bnr)
|
PRI draw_buttons(stradr2,stradr3,bnr)
|
||||||
|
|
|
@ -46,6 +46,12 @@ con ' signaldefinitionen
|
||||||
#10, ADM_SDD0,ADM_SDCLK,ADM_SDCMD,ADM_SDD3 'sd-cardreader (4 pin)
|
#10, ADM_SDD0,ADM_SDCLK,ADM_SDCMD,ADM_SDD3 'sd-cardreader (4 pin)
|
||||||
#23, ADM_SELECT 'administra-auswahlsignal
|
#23, ADM_SELECT 'administra-auswahlsignal
|
||||||
|
|
||||||
|
'plexbus
|
||||||
|
adm_sda = 19 'i2c-datenpin
|
||||||
|
adm_scl = 20 'i2c-clockpin
|
||||||
|
adm_int1 = 21 'interrupt port 1&2
|
||||||
|
adm_int2 = 22 'interrupt port 3
|
||||||
|
|
||||||
con ' administra-funktionen
|
con ' administra-funktionen
|
||||||
|
|
||||||
ADM_OPT = 0
|
ADM_OPT = 0
|
||||||
|
@ -85,32 +91,44 @@ ADM_COM_RX = 41 'com: zeichen empfangen
|
||||||
|
|
||||||
adm_m_run = 50 'plx: polling aktivieren
|
adm_m_run = 50 'plx: polling aktivieren
|
||||||
adm_m_halt = 51 'plx: polling anhalten
|
adm_m_halt = 51 'plx: polling anhalten
|
||||||
adm_m_setctrl = 52
|
adm_m_in = 52
|
||||||
adm_m_in = 53
|
adm_m_out = 53
|
||||||
adm_m_out = 54
|
adm_m_adch = 54
|
||||||
adm_m_ad_ch = 55
|
adm_m_getreg = 55
|
||||||
adm_m_getreg = 56
|
adm_m_setreg = 56
|
||||||
adm_m_setreg = 57
|
adm_m_start = 57
|
||||||
adm_m_start = 58
|
adm_m_stop = 58
|
||||||
adm_m_stop = 59
|
adm_m_write = 59
|
||||||
adm_m_write = 60
|
adm_m_read = 60
|
||||||
adm_m_read = 61
|
adm_m_ping = 61
|
||||||
adm_m_ping = 62
|
adm_m_setadr = 62
|
||||||
adm_m_joy = 63
|
adm_m_joy = 63
|
||||||
adm_m_paddle = 64
|
adm_m_paddle = 64
|
||||||
adm_m_pad = 65
|
adm_m_pad = 65
|
||||||
adm_m_setjoy = 66
|
adm_m_setjoy = 66
|
||||||
adm_m_setpad = 67
|
adm_m_setpad = 67
|
||||||
|
|
||||||
|
adm_m_chan = 70
|
||||||
|
adm_m_regclr = 71
|
||||||
|
adm_m_setvol = 72
|
||||||
|
adm_m_play = 73
|
||||||
|
adm_m_noteon = 74
|
||||||
|
adm_m_noteoff = 75
|
||||||
|
adm_m_setfreq = 76
|
||||||
|
adm_m_setwave = 77
|
||||||
|
adm_m_setpw = 78
|
||||||
|
adm_m_setadsr = 79
|
||||||
|
adm_m_setres = 80
|
||||||
|
adm_m_setcoff = 81
|
||||||
|
adm_m_setfmask = 82
|
||||||
|
adm_m_setftype = 83
|
||||||
|
adm_m_ringmod = 84
|
||||||
|
adm_m_sync = 85
|
||||||
|
|
||||||
adm_m_getspec = 97 'spezifikation abfragen
|
adm_m_getspec = 97 'spezifikation abfragen
|
||||||
adm_m_getver = 98 'codeversion abfragen
|
adm_m_getver = 98 'codeversion abfragen
|
||||||
adm_m_reboot = 99 'neu starten
|
adm_m_reboot = 99 'neu starten
|
||||||
|
|
||||||
'plexbus
|
|
||||||
adm_sda = 19 'i2c-datenpin
|
|
||||||
adm_scl = 20 'i2c-clockpin
|
|
||||||
adm_int1 = 21 'interrupt port 1&2
|
|
||||||
adm_int2 = 22 'interrupt port 3
|
|
||||||
|
|
||||||
|
|
||||||
con ' bellatrix-funktionen
|
con ' bellatrix-funktionen
|
||||||
|
|
109
lib/reg-ios.spin
109
lib/reg-ios.spin
|
@ -28,6 +28,7 @@ Administra
|
||||||
scr : Screeninterface
|
scr : Screeninterface
|
||||||
hss : Hydra-Soundsystem
|
hss : Hydra-Soundsystem
|
||||||
sfx : Sound-FX
|
sfx : Sound-FX
|
||||||
|
plx : Gamedevices & Plexbus
|
||||||
|
|
||||||
Bellatrix
|
Bellatrix
|
||||||
key : Keyboardroutinen
|
key : Keyboardroutinen
|
||||||
|
@ -484,7 +485,7 @@ PUB admload(stradr)|dmu 'chip-mgr: neuen adminis
|
||||||
''busprotokoll : [096][sub_putstr.fn]
|
''busprotokoll : [096][sub_putstr.fn]
|
||||||
'' : fn - dateiname des neuen administra-codes
|
'' : fn - dateiname des neuen administra-codes
|
||||||
|
|
||||||
bus_putchar1(gc#a_mgrALoad) 'aktuelles userdir retten
|
bus_putchar1(gc#a_mgrALoad)
|
||||||
bus_putstr1(stradr)
|
bus_putstr1(stradr)
|
||||||
waitcnt(cnt + clkfreq*3) 'warte bis administra fertig ist
|
waitcnt(cnt + clkfreq*3) 'warte bis administra fertig ist
|
||||||
|
|
||||||
|
@ -1493,22 +1494,22 @@ PUB sid_sdmpplay(stradr): err 'sid: dmp-datei stereo a
|
||||||
bus_putstr1(stradr)
|
bus_putstr1(stradr)
|
||||||
err := bus_getchar1
|
err := bus_getchar1
|
||||||
|
|
||||||
PUB sid_dmpstop
|
PUB sid_dmpstop 'sid: dmp-player anhalten
|
||||||
bus_putchar1(gc#a_s_dmpstop)
|
bus_putchar1(gc#a_s_dmpstop)
|
||||||
|
|
||||||
PUB sid_dmppause
|
PUB sid_dmppause 'sid: dmp-player pausieren
|
||||||
bus_putchar1(gc#a_s_dmppause)
|
bus_putchar1(gc#a_s_dmppause)
|
||||||
|
|
||||||
PUB sid_dmpstatus: status
|
PUB sid_dmpstatus: status 'sid: dmp-player status abfragen
|
||||||
bus_putchar1(gc#a_s_dmpstatus)
|
bus_putchar1(gc#a_s_dmpstatus)
|
||||||
status := bus_getchar1
|
status := bus_getchar1
|
||||||
|
|
||||||
PUB sid_dmppos: wert
|
PUB sid_dmppos: wert 'sid: dmp-player playposition abfragen
|
||||||
bus_putchar1(gc#a_s_dmppos)
|
bus_putchar1(gc#a_s_dmppos)
|
||||||
wert := bus_getlong1
|
wert := bus_getlong1
|
||||||
bus_getlong1
|
bus_getlong1
|
||||||
|
|
||||||
PUB sid_dmplen: wert
|
PUB sid_dmplen: wert 'sid: dmp-datei länge abfragen
|
||||||
bus_putchar1(gc#a_s_dmppos)
|
bus_putchar1(gc#a_s_dmppos)
|
||||||
bus_getlong1
|
bus_getlong1
|
||||||
wert := bus_getlong1
|
wert := bus_getlong1
|
||||||
|
@ -1726,6 +1727,98 @@ PUB com_rx:char 'com: zeichen empfangen
|
||||||
bus_putchar1(gc#a_comRx)
|
bus_putchar1(gc#a_comRx)
|
||||||
char := bus_getchar1
|
char := bus_getchar1
|
||||||
|
|
||||||
|
CON ''------------------------------------------------- Plexbus und Gamedevices
|
||||||
|
|
||||||
|
PUB plxrun 'plx: bus freigeben, poller starten
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxRun)
|
||||||
|
|
||||||
|
PUB plxhalt 'plx: bus anfordern, poller anhalten
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxHalt)
|
||||||
|
|
||||||
|
PUB plxin(adr):wert 'plx: port einlesen
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxIn)
|
||||||
|
bus_putchar1(adr)
|
||||||
|
wert := bus_getchar1
|
||||||
|
|
||||||
|
PUB plxout(adr,wert) 'plx: port ausgeben
|
||||||
|
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxOut)
|
||||||
|
bus_putchar1(adr)
|
||||||
|
bus_putchar1(wert)
|
||||||
|
|
||||||
|
PUB plxch(adr,chan):wert 'plx: ad-wandlerkanal abfragen
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxCh)
|
||||||
|
bus_putchar1(adr)
|
||||||
|
bus_putchar1(chan)
|
||||||
|
wert := bus_getchar1
|
||||||
|
|
||||||
|
PUB plxgetreg(regnr):wert 'plx: poller-register lesen
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxGetReg)
|
||||||
|
bus_putchar1(regnr)
|
||||||
|
wert := bus_getchar1
|
||||||
|
|
||||||
|
PUB plxsetreg(regnr,wert) 'plx: poller-register schreiben
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxSetReg)
|
||||||
|
bus_putchar1(regnr)
|
||||||
|
bus_putchar1(wert)
|
||||||
|
|
||||||
|
PUB plxstart 'plx: i2c-dialog starten
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxStart)
|
||||||
|
|
||||||
|
PUB plxstop 'plx: i2c-dialog beenden
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxStop)
|
||||||
|
|
||||||
|
PUB plxwrite(wert):ack 'plx: i2c byte schreiben
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxWrite)
|
||||||
|
bus_putchar1(wert)
|
||||||
|
ack := bus_getchar1
|
||||||
|
|
||||||
|
PUB plxread(ack):wert 'plx: i2c byte lesen
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxRead)
|
||||||
|
bus_putchar1(ack)
|
||||||
|
wert := bus_getchar1
|
||||||
|
|
||||||
|
PUB plxping(adr):ack 'plx: device abfragen
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxPing)
|
||||||
|
bus_putchar1(adr)
|
||||||
|
ack := bus_getchar1
|
||||||
|
|
||||||
|
PUB plxsetadr(adradda,adrport) 'plx: adressen adda/port für poller setzen
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_plxSetAdr)
|
||||||
|
bus_putchar1(adradda)
|
||||||
|
bus_putchar1(adrport)
|
||||||
|
|
||||||
|
PUB joy:wert 'game: joystick abfragen
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_Joy)
|
||||||
|
wert := bus_getchar1
|
||||||
|
|
||||||
|
PUB paddle:wert 'game: paddle abfrage
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_Paddle)
|
||||||
|
wert := wert + bus_getchar1 << 8
|
||||||
|
wert := wert + bus_getchar1
|
||||||
|
|
||||||
|
PUB pad:wert 'game: pad abfrage
|
||||||
|
|
||||||
|
bus_putchar1(gc#a_Pad)
|
||||||
|
wert := wert + bus_getchar1 << 16
|
||||||
|
wert := wert + bus_getchar1 << 8
|
||||||
|
wert := wert + bus_getchar1
|
||||||
|
|
||||||
OBJ '' B E L L A T R I X
|
OBJ '' B E L L A T R I X
|
||||||
|
|
||||||
CON ''------------------------------------------------- CHIP-MANAGMENT
|
CON ''------------------------------------------------- CHIP-MANAGMENT
|
||||||
|
@ -1950,6 +2043,10 @@ PUB printcstr(eadr) | i,len 'screen: bildschirmausga
|
||||||
eadr++
|
eadr++
|
||||||
bus_putchar2(ram_rdbyte(1,eadr))
|
bus_putchar2(ram_rdbyte(1,eadr))
|
||||||
|
|
||||||
|
PUB printblk(stringptr,strlen) 'screen: bildschirmausgabe eines strings definierter länge
|
||||||
|
|
||||||
|
repeat strlen
|
||||||
|
bus_putchar2(byte[stringptr++])
|
||||||
|
|
||||||
PUB printdec(value) | i 'screen: dezimalen zahlenwert auf bildschirm ausgeben
|
PUB printdec(value) | i 'screen: dezimalen zahlenwert auf bildschirm ausgeben
|
||||||
{{printdec(value) - screen: dezimale bildschirmausgabe zahlenwertes}}
|
{{printdec(value) - screen: dezimale bildschirmausgabe zahlenwertes}}
|
||||||
|
|
2
make.bat
2
make.bat
|
@ -28,7 +28,7 @@ REM ----------------------------------------------------------------
|
||||||
REM Flashdateien erzeugen
|
REM Flashdateien erzeugen
|
||||||
REM --> \bin\flash
|
REM --> \bin\flash
|
||||||
|
|
||||||
%BSTC% -L %libpath% %D% -D __ADM_FAT -D __ADM_HSS -D __ADM_HSS_PLAY -D __ADM_WAV -D __ADM_RTC -D __ADM_COM -b -O a .\flash\administra\admflash.spin
|
%BSTC% -L %libpath% %D% -D __ADM_FAT -D __ADM_HSS -D __ADM_HSS_PLAY -D __ADM_WAV -D __ADM_RTC -D __ADM_COM -D __ADM_PLX -b -O a .\flash\administra\admflash.spin
|
||||||
copy admflash.binary %flash%
|
copy admflash.binary %flash%
|
||||||
move admflash.binary %sdsys%\admsys.adm
|
move admflash.binary %sdsys%\admsys.adm
|
||||||
|
|
||||||
|
|
2
make.sh
2
make.sh
|
@ -25,7 +25,7 @@ mkdir ${flash}
|
||||||
# Flashdateien erzeugen
|
# Flashdateien erzeugen
|
||||||
# --> bin/flash
|
# --> bin/flash
|
||||||
|
|
||||||
${BSTC} -L ${libpath} ${D} -D __ADM_FAT -D __ADM_HSS -D __ADM_HSS_PLAY -D __ADM_WAV -D __ADM_RTC -D __ADM_COM -b -O a flash/administra/admflash.spin
|
${BSTC} -L ${libpath} ${D} -D __ADM_FAT -D __ADM_HSS -D __ADM_HSS_PLAY -D __ADM_WAV -D __ADM_RTC -D __ADM_COM -D __ADM_PLX -b -O a flash/administra/admflash.spin
|
||||||
cp admflash.binary ${flash}
|
cp admflash.binary ${flash}
|
||||||
mv admflash.binary ${sdsys}/admsys.adm
|
mv admflash.binary ${sdsys}/admsys.adm
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Definitionen
|
||||||
|
VERSION="57"
|
||||||
|
|
||||||
|
# Pfade
|
||||||
|
ARCHIV="HIVE-TriOS-R${VERSION}"
|
||||||
|
MAKE="./make.sh"
|
||||||
|
BIN="Bin"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# Alte Versionen löschen
|
||||||
|
|
||||||
|
rm -rf ../${BIN}
|
||||||
|
rm -f "../${ARCHIV}-bin.zip"
|
||||||
|
rm -f "../${ARCHIV}-src.zip"
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# Binaries erstellen
|
||||||
|
|
||||||
|
${MAKE}
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# Archive erstellen
|
||||||
|
|
||||||
|
mkdir .tmp
|
||||||
|
for file in *.md ; do cp "$file" .tmp/"${file/.md}".txt ; done
|
||||||
|
cd .tmp
|
||||||
|
zip -r9 ../../${ARCHIV}-bin.zip *
|
||||||
|
zip -r9 ../../${ARCHIV}-src.zip *
|
||||||
|
cd ..
|
||||||
|
rm -rf .tmp
|
||||||
|
|
||||||
|
zip -r9 ../${ARCHIV}-src.zip flash forth lib system make*
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
zip -r9 ${ARCHIV}-bin.zip ${BIN}
|
|
@ -18,21 +18,23 @@ Funktion :
|
||||||
Komponenten : -
|
Komponenten : -
|
||||||
COG's : -
|
COG's : -
|
||||||
Logbuch :
|
Logbuch :
|
||||||
|
|
||||||
|
27-04-2013-dr235 - erste version
|
||||||
|
01-11-2013-dr235 - redraw/geschwindigkeit verbessert
|
||||||
|
- div. kleine Optimierungen und Detailverbesserungen
|
||||||
|
|
||||||
Kommandoliste :
|
Kommandoliste :
|
||||||
Notizen :
|
Notizen :
|
||||||
|
|
||||||
- view nach f9
|
|
||||||
- tab in wbox
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
OBJ
|
OBJ
|
||||||
|
|
||||||
ios : "reg-ios"
|
ios : "reg-ios"
|
||||||
dlbox[2] : "gui-dlbox"
|
dlbox[2] : "gui-dlbox" 'die beiden dateifenster
|
||||||
pbar : "gui-pbar"
|
pbar : "gui-pbar" 'progress-bar
|
||||||
wbox : "gui-wbox"
|
wbox : "gui-wbox" 'warnbox
|
||||||
input : "gui-input"
|
input : "gui-input" 'eingabedialog
|
||||||
fm : "fm-con"
|
fm : "fm-con"
|
||||||
gc : "glob-con"
|
gc : "glob-con"
|
||||||
str : "glob-string"
|
str : "glob-string"
|
||||||
|
@ -53,26 +55,20 @@ VAR
|
||||||
byte w_pos[2] 'positionen im fenster
|
byte w_pos[2] 'positionen im fenster
|
||||||
byte w_view[2] 'startposition des fensters
|
byte w_view[2] 'startposition des fensters
|
||||||
byte w_cols[2] 'anzahl der spalten im fenster
|
byte w_cols[2] 'anzahl der spalten im fenster
|
||||||
byte w_drives[2] 'zugeordnete drives
|
|
||||||
|
|
||||||
byte w0_list[fm#MAX_BUFFER] 'aktuelles verzeichnis
|
byte w0_list[fm#MAX_BUFFER] 'verzeichnisliste sdcard
|
||||||
byte w0_flags[fm#MAX_FILES] 'selected, directory usw.
|
byte w0_flags[fm#MAX_FILES] 'flags (selktiert, typ)
|
||||||
long w0_len[fm#MAX_FILES] 'dateilängen
|
long w0_len[fm#MAX_FILES] 'dateilängen
|
||||||
byte w0_number 'anzahl der files
|
byte w0_number 'anzahl der dateien
|
||||||
|
|
||||||
byte w1_list[fm#MAX_BUFFER]
|
byte w1_list[fm#MAX_BUFFER] 'verzeichnisliste ramdrive
|
||||||
byte w1_flags[fm#MAX_FILES]
|
byte w1_flags[fm#MAX_FILES] 'flags
|
||||||
long w1_len[fm#MAX_FILES]
|
long w1_len[fm#MAX_FILES] 'dateilängen
|
||||||
byte w1_number
|
byte w1_number 'anzahl der dateien
|
||||||
|
|
||||||
PUB main | key
|
PUB main | key
|
||||||
|
|
||||||
init
|
init
|
||||||
dlbox[0].focus
|
|
||||||
dlbox[0].draw
|
|
||||||
dlbox[1].draw
|
|
||||||
info_print
|
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
key := ios.keywait
|
key := ios.keywait
|
||||||
case key
|
case key
|
||||||
|
@ -85,7 +81,7 @@ PUB main | key
|
||||||
gc#KEY_RETURN: f_open
|
gc#KEY_RETURN: f_open
|
||||||
gc#KEY_BS: f_back
|
gc#KEY_BS: f_back
|
||||||
gc#KEY_SPACE: f_select
|
gc#KEY_SPACE: f_select
|
||||||
gc#KEY_ESC:
|
gc#KEY_ESC: f_menu
|
||||||
gc#KEY_TAB: f_focus
|
gc#KEY_TAB: f_focus
|
||||||
gc#KEY_POS1: f_pos1
|
gc#KEY_POS1: f_pos1
|
||||||
gc#KEY_F01: f_view
|
gc#KEY_F01: f_view
|
||||||
|
@ -98,6 +94,9 @@ PUB main | key
|
||||||
gc#KEY_F08: f_selall
|
gc#KEY_F08: f_selall
|
||||||
gc#KEY_F09: f_full
|
gc#KEY_F09: f_full
|
||||||
gc#KEY_F10: f_quit
|
gc#KEY_F10: f_quit
|
||||||
|
"m": f_menu
|
||||||
|
"q": f_quit
|
||||||
|
|
||||||
|
|
||||||
PRI init
|
PRI init
|
||||||
|
|
||||||
|
@ -112,8 +111,6 @@ PRI init
|
||||||
w_view[0] := w_view[1] := 0
|
w_view[0] := w_view[1] := 0
|
||||||
w_cols[0] := (fm#W1X2-fm#W1X1)/(fm#MAX_LEN+2)
|
w_cols[0] := (fm#W1X2-fm#W1X1)/(fm#MAX_LEN+2)
|
||||||
w_cols[1] := (fm#W2X2-fm#W2X1)/(fm#MAX_LEN+2)
|
w_cols[1] := (fm#W2X2-fm#W2X1)/(fm#MAX_LEN+2)
|
||||||
w_drives[0] := fm#DR_SD
|
|
||||||
w_drives[1] := fm#DR_RAM
|
|
||||||
fname[0] := 0
|
fname[0] := 0
|
||||||
|
|
||||||
frame_draw
|
frame_draw
|
||||||
|
@ -128,19 +125,24 @@ PRI init
|
||||||
wbox.define(5,fm#W4X1,fm#W4Y1,fm#W4X2,fm#W4Y2)
|
wbox.define(5,fm#W4X1,fm#W4Y1,fm#W4X2,fm#W4Y2)
|
||||||
input.define(6,fm#W4X1,fm#W4Y1,fm#W4X2,fm#W4Y2,12)
|
input.define(6,fm#W4X1,fm#W4Y1,fm#W4X2,fm#W4Y2,12)
|
||||||
|
|
||||||
|
dlbox[0].focus
|
||||||
|
dlbox[0].draw
|
||||||
|
dlbox[1].draw
|
||||||
|
info_print
|
||||||
|
|
||||||
PRI f_mount
|
|
||||||
|
PRI f_mount 'fkt: mount/unmount sd-card
|
||||||
|
|
||||||
if fl_mounted
|
if fl_mounted
|
||||||
ios.sdunmount
|
ios.sdunmount
|
||||||
repeat
|
repeat
|
||||||
wbox.draw(@str5,@str2,@str3) == 1
|
wbox.draw(@str5,@str2,@str6)
|
||||||
while ios.sdmount
|
while ios.sdmount
|
||||||
dlbox[0].draw
|
dlbox[0].draw
|
||||||
dlbox[1].draw
|
dlbox[1].draw
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
PRI f_mkdir
|
PRI f_mkdir 'fkt: verzeichnis erstellen
|
||||||
|
|
||||||
ios.sdnewdir(input.draw(string("Name eingeben : ")))
|
ios.sdnewdir(input.draw(string("Name eingeben : ")))
|
||||||
w0_clrlist
|
w0_clrlist
|
||||||
|
@ -149,22 +151,24 @@ PRI f_mkdir
|
||||||
dlbox[1].draw
|
dlbox[1].draw
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
PRI f_selall | i
|
PRI f_selall | i 'fkt: alle dateien im verzeichnis selektieren
|
||||||
|
|
||||||
i := 0
|
i := 0
|
||||||
case w_sel
|
case w_sel
|
||||||
0: repeat w0_number
|
0: i := 2 'std-einträge . .. auslassen
|
||||||
|
repeat w0_number
|
||||||
w0_flags[i++] ^= fm#FL_SEL
|
w0_flags[i++] ^= fm#FL_SEL
|
||||||
1: repeat w1_number
|
1: i := 0
|
||||||
|
repeat w1_number
|
||||||
w1_flags[i++] ^= fm#FL_SEL
|
w1_flags[i++] ^= fm#FL_SEL
|
||||||
dlbox[w_sel].redraw
|
dlbox[w_sel].redraw
|
||||||
|
|
||||||
PRI f_pos1
|
PRI f_pos1 'fkt: homeposition im fenster
|
||||||
|
|
||||||
w_pos[w_sel] := 0
|
w_pos[w_sel] := 0
|
||||||
dlbox[w_sel].setpos(w_pos[w_sel])
|
dlbox[w_sel].setpos(w_pos[w_sel])
|
||||||
|
|
||||||
PRI f_full
|
PRI f_full 'fkt: fenster maximieren
|
||||||
|
|
||||||
if w_sel
|
if w_sel
|
||||||
dlbox[1].defocus
|
dlbox[1].defocus
|
||||||
|
@ -181,7 +185,7 @@ PRI f_full
|
||||||
dlbox[1].draw
|
dlbox[1].draw
|
||||||
w_sel := 0
|
w_sel := 0
|
||||||
|
|
||||||
PRI f_open
|
PRI f_open 'fkt: verzeichnis öffnen
|
||||||
|
|
||||||
'nur fenster 1 und verzeichnisse
|
'nur fenster 1 und verzeichnisse
|
||||||
if (w_sel == 0) & (w0_flags[w_view[w_sel] + w_pos[w_sel]] & fm#FL_DIR)
|
if (w_sel == 0) & (w0_flags[w_view[w_sel] + w_pos[w_sel]] & fm#FL_DIR)
|
||||||
|
@ -191,7 +195,7 @@ PRI f_open
|
||||||
dlbox[w_sel].draw
|
dlbox[w_sel].draw
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
PRI f_back
|
PRI f_back 'fkt: verzeichnisebene zurück
|
||||||
|
|
||||||
ios.sdchdir(string(".."))
|
ios.sdchdir(string(".."))
|
||||||
w0_clrlist
|
w0_clrlist
|
||||||
|
@ -199,7 +203,7 @@ PRI f_back
|
||||||
dlbox[w_sel].redraw
|
dlbox[w_sel].redraw
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
PRI f_curup
|
PRI f_curup 'fkt: cursor hoch
|
||||||
|
|
||||||
if w_pos[w_sel] > 1
|
if w_pos[w_sel] > 1
|
||||||
w_pos[w_sel] -= dlbox[w_sel].getcols
|
w_pos[w_sel] -= dlbox[w_sel].getcols
|
||||||
|
@ -207,7 +211,7 @@ PRI f_curup
|
||||||
info_print
|
info_print
|
||||||
dir := 0
|
dir := 0
|
||||||
|
|
||||||
PRI f_curdown
|
PRI f_curdown 'fkt: cursor runter
|
||||||
|
|
||||||
if w_pos[w_sel] < (fm#WROWS * w_cols[w_sel] - dlbox[w_sel].getcols)
|
if w_pos[w_sel] < (fm#WROWS * w_cols[w_sel] - dlbox[w_sel].getcols)
|
||||||
w_pos[w_sel] += dlbox[w_sel].getcols
|
w_pos[w_sel] += dlbox[w_sel].getcols
|
||||||
|
@ -215,7 +219,7 @@ PRI f_curdown
|
||||||
info_print
|
info_print
|
||||||
dir := 1
|
dir := 1
|
||||||
|
|
||||||
PRI f_curleft
|
PRI f_curleft 'fkt: cursor links
|
||||||
|
|
||||||
if w_pos[w_sel]
|
if w_pos[w_sel]
|
||||||
w_pos[w_sel]--
|
w_pos[w_sel]--
|
||||||
|
@ -223,7 +227,7 @@ PRI f_curleft
|
||||||
info_print
|
info_print
|
||||||
dir := 0
|
dir := 0
|
||||||
|
|
||||||
PRI f_curright
|
PRI f_curright 'fkt: cursor rechts
|
||||||
|
|
||||||
if w_pos[w_sel] < (fm#WROWS * w_cols[w_sel] - 1)
|
if w_pos[w_sel] < (fm#WROWS * w_cols[w_sel] - 1)
|
||||||
w_pos[w_sel]++
|
w_pos[w_sel]++
|
||||||
|
@ -231,7 +235,7 @@ PRI f_curright
|
||||||
info_print
|
info_print
|
||||||
dir := 1
|
dir := 1
|
||||||
|
|
||||||
PRI f_pageup
|
PRI f_pageup 'fkt: seite zurück
|
||||||
|
|
||||||
if (w_view[w_sel] - fm#WROWS * w_cols[w_sel]) => 0
|
if (w_view[w_sel] - fm#WROWS * w_cols[w_sel]) => 0
|
||||||
w_view[w_sel] -= fm#WROWS * w_cols[w_sel]
|
w_view[w_sel] -= fm#WROWS * w_cols[w_sel]
|
||||||
|
@ -240,7 +244,7 @@ PRI f_pageup
|
||||||
w_pos[w_sel] := fm#WROWS * w_cols[w_sel] - 1
|
w_pos[w_sel] := fm#WROWS * w_cols[w_sel] - 1
|
||||||
dlbox[w_sel].setpos(w_pos[w_sel])
|
dlbox[w_sel].setpos(w_pos[w_sel])
|
||||||
|
|
||||||
PRI f_pagedown | number
|
PRI f_pagedown | number 'fkt: seite weiter
|
||||||
|
|
||||||
case w_sel
|
case w_sel
|
||||||
0: number := w0_number
|
0: number := w0_number
|
||||||
|
@ -252,18 +256,22 @@ PRI f_pagedown | number
|
||||||
w_pos[w_sel] := 0
|
w_pos[w_sel] := 0
|
||||||
dlbox[w_sel].setpos(w_pos[w_sel])
|
dlbox[w_sel].setpos(w_pos[w_sel])
|
||||||
|
|
||||||
PRI f_select | i
|
PRI f_select | i 'fkt: datei selektieren
|
||||||
|
|
||||||
i := w_view[w_sel] + w_pos[w_sel]
|
i := w_view[w_sel] + w_pos[w_sel]
|
||||||
|
'flag in liste setzen
|
||||||
case w_sel
|
case w_sel
|
||||||
0: w0_flags[i] ^= fm#FL_SEL
|
0: w0_flags[i] ^= fm#FL_SEL
|
||||||
1: w1_flags[i] ^= fm#FL_SEL
|
1: w1_flags[i] ^= fm#FL_SEL
|
||||||
dlbox[w_sel].redraw
|
'aktuelle position neu zeichnen
|
||||||
|
dlbox[w_sel].setpos(w_pos[w_sel])
|
||||||
|
'cursor bewegen
|
||||||
case dir
|
case dir
|
||||||
0: f_curleft
|
0: f_curleft
|
||||||
1: f_curright
|
1: f_curright
|
||||||
|
dlbox[w_sel].setpos(w_pos[w_sel])
|
||||||
|
|
||||||
PRI f_focus
|
PRI f_focus 'fkt: fokus auf anderes fenster
|
||||||
|
|
||||||
ifnot fl_full
|
ifnot fl_full
|
||||||
dlbox[w_sel].defocus
|
dlbox[w_sel].defocus
|
||||||
|
@ -274,14 +282,27 @@ ifnot fl_full
|
||||||
dlbox[w_sel].focus
|
dlbox[w_sel].focus
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
PRI f_quit
|
PRI f_quit 'fkt: fm beenden
|
||||||
|
|
||||||
|
if wbox.draw(@str7,@str3,@str2) == 2
|
||||||
ios.sddmset(ios#DM_USER) 'regime soll in diesem verzeichnis landen
|
ios.sddmset(ios#DM_USER) 'regime soll in diesem verzeichnis landen
|
||||||
ios.winset(0)
|
ios.winset(0)
|
||||||
ios.screeninit
|
ios.screeninit
|
||||||
ios.stop
|
ios.stop
|
||||||
|
else
|
||||||
|
dlbox[0].draw
|
||||||
|
dlbox[1].draw
|
||||||
|
info_print
|
||||||
|
|
||||||
PRI f_load | i
|
PRI f_menu 'fkt: extra-menü aufrufen
|
||||||
|
|
||||||
|
wbox.draw(string("Menü: Nicht implementiert!"),string("ok"),@str6)
|
||||||
|
dlbox[0].draw
|
||||||
|
dlbox[1].draw
|
||||||
|
info_print
|
||||||
|
|
||||||
|
|
||||||
|
PRI f_load | i 'fkt: sdcard --> ramdrive
|
||||||
|
|
||||||
pbar.setmaxbar(w0_number)
|
pbar.setmaxbar(w0_number)
|
||||||
i := 0
|
i := 0
|
||||||
|
@ -297,7 +318,7 @@ PRI f_load | i
|
||||||
dlbox[0].draw
|
dlbox[0].draw
|
||||||
dlbox[1].draw
|
dlbox[1].draw
|
||||||
|
|
||||||
PRI f_save | i
|
PRI f_save | i 'fkt: ramdrive --> sdcard
|
||||||
|
|
||||||
pbar.setmaxbar(w1_number)
|
pbar.setmaxbar(w1_number)
|
||||||
i := 0
|
i := 0
|
||||||
|
@ -313,7 +334,7 @@ PRI f_save | i
|
||||||
dlbox[0].draw
|
dlbox[0].draw
|
||||||
dlbox[1].draw
|
dlbox[1].draw
|
||||||
|
|
||||||
PRI f_del | i
|
PRI f_del | i 'fkt: dateien löschen
|
||||||
|
|
||||||
if wbox.draw(@str1,@str2,@str3) == 1
|
if wbox.draw(@str1,@str2,@str3) == 1
|
||||||
pbar.setmaxbar(w0_number)
|
pbar.setmaxbar(w0_number)
|
||||||
|
@ -331,7 +352,7 @@ dlbox[0].draw
|
||||||
dlbox[1].draw
|
dlbox[1].draw
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
PRI f_empty
|
PRI f_empty 'fkt: ramdrive löschen
|
||||||
|
|
||||||
if wbox.draw(@str4,@str2,@str3) == 1
|
if wbox.draw(@str4,@str2,@str3) == 1
|
||||||
ios.ram_wrlong(ios#sysmod,ios#SYSVAR,ios#RAMEND) 'Zeiger auf letzte freie Speicherzelle setzen
|
ios.ram_wrlong(ios#sysmod,ios#SYSVAR,ios#RAMEND) 'Zeiger auf letzte freie Speicherzelle setzen
|
||||||
|
@ -348,7 +369,13 @@ dlbox[w_sel].setview(w_view[1])
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
|
|
||||||
PRI f_view | n,stradr,ch,lch
|
PRI f_view 'fkt: textdatei anzeigen
|
||||||
|
|
||||||
|
case w_sel
|
||||||
|
0: f_view0
|
||||||
|
1: f_view1
|
||||||
|
|
||||||
|
PRI f_view0 | n,stradr,ch,lch 'fkt: texdatei von sd anzeigen
|
||||||
|
|
||||||
ios.winset(3)
|
ios.winset(3)
|
||||||
ios.curoff
|
ios.curoff
|
||||||
|
@ -370,6 +397,7 @@ PRI f_view | n,stradr,ch,lch
|
||||||
ios.sdclose
|
ios.sdclose
|
||||||
ios.printcls
|
ios.printcls
|
||||||
dlbox[0].redraw
|
dlbox[0].redraw
|
||||||
|
ifnot fl_full
|
||||||
dlbox[1].redraw
|
dlbox[1].redraw
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
@ -387,7 +415,49 @@ PRI f_view | n,stradr,ch,lch
|
||||||
dlbox[1].draw
|
dlbox[1].draw
|
||||||
info_print
|
info_print
|
||||||
|
|
||||||
PRI w0_clrlist | i
|
|
||||||
|
PRI f_view1 | n,stradr,fn,len,ch,lch 'fkt: textdatei von ramdrive anzeigen
|
||||||
|
|
||||||
|
ios.winset(3)
|
||||||
|
ios.curoff
|
||||||
|
ios.printcls
|
||||||
|
|
||||||
|
stradr := get_fname(w_view[w_sel] + w_pos[w_sel])
|
||||||
|
n := 1
|
||||||
|
lch := 0
|
||||||
|
fn := ios.rd_open(stradr) 'datei öffnen
|
||||||
|
ifnot fn == -1
|
||||||
|
len := ios.rd_len(fn)
|
||||||
|
repeat len 'text ausgeben
|
||||||
|
ch := ios.printchar(ios.rd_get(fn))
|
||||||
|
if ch == ios#CHAR_NL OR ch == $0a 'CR or NL
|
||||||
|
if ch == lch OR (lch <> ios#CHAR_NL AND lch <> $0a)
|
||||||
|
ios.printnl
|
||||||
|
lch := ch
|
||||||
|
if ++n == (fm#W3Y2 - 2)
|
||||||
|
n := 1
|
||||||
|
if ios.keywait == "q"
|
||||||
|
ios.rd_close(fn)
|
||||||
|
ios.printcls
|
||||||
|
dlbox[0].redraw
|
||||||
|
ifnot fl_full
|
||||||
|
dlbox[1].redraw
|
||||||
|
return
|
||||||
|
else
|
||||||
|
lch := 0
|
||||||
|
else
|
||||||
|
ios.printchar(ch)
|
||||||
|
lch := ch
|
||||||
|
ios.print(string(13,"[EOF]"))
|
||||||
|
ios.keywait
|
||||||
|
ios.sdclose 'datei schließen
|
||||||
|
|
||||||
|
ios.printcls
|
||||||
|
dlbox[0].draw
|
||||||
|
dlbox[1].draw
|
||||||
|
info_print
|
||||||
|
|
||||||
|
PRI w0_clrlist | i 'fenster 0: dateiliste löschen
|
||||||
|
|
||||||
i := 0
|
i := 0
|
||||||
repeat fm#MAX_FILES
|
repeat fm#MAX_FILES
|
||||||
|
@ -400,7 +470,7 @@ PRI w0_clrlist | i
|
||||||
i++
|
i++
|
||||||
|
|
||||||
|
|
||||||
PRI w1_clrlist | i
|
PRI w1_clrlist | i 'fenster 1: dateiliste löschen
|
||||||
|
|
||||||
i := 0
|
i := 0
|
||||||
repeat fm#MAX_FILES
|
repeat fm#MAX_FILES
|
||||||
|
@ -412,7 +482,7 @@ PRI w1_clrlist | i
|
||||||
w1_list[i] := " "
|
w1_list[i] := " "
|
||||||
i++
|
i++
|
||||||
|
|
||||||
PRI w0_readdir | stradr,i,j
|
PRI w0_readdir | stradr,i,j 'fenster 0: dateiliste einlesen
|
||||||
|
|
||||||
i := 0
|
i := 0
|
||||||
ios.sddir
|
ios.sddir
|
||||||
|
@ -429,10 +499,11 @@ PRI w0_readdir | stradr,i,j
|
||||||
|
|
||||||
w0_number := i
|
w0_number := i
|
||||||
|
|
||||||
PRI w1_readdir | stradr,i,j
|
PRI w1_readdir | stradr,i,j 'fenster 1: dateiliste einlesen
|
||||||
|
|
||||||
i := 0
|
i := 0
|
||||||
ios.rd_dir
|
ios.rd_dir
|
||||||
|
ios.rd_next 'ramdrive-label überspringen
|
||||||
repeat while (stradr := ios.rd_next)
|
repeat while (stradr := ios.rd_next)
|
||||||
j := 0
|
j := 0
|
||||||
repeat fm#MAX_LEN
|
repeat fm#MAX_LEN
|
||||||
|
@ -442,7 +513,7 @@ PRI w1_readdir | stradr,i,j
|
||||||
w1_len[i] := ios.rd_dlen
|
w1_len[i] := ios.rd_dlen
|
||||||
w1_number := i
|
w1_number := i
|
||||||
|
|
||||||
PRI get_fname(fnr):adrdat | i,stradr
|
PRI get_fname(fnr):adrdat | i,stradr 'datei: dateinamen aus liste holrn
|
||||||
|
|
||||||
i := fm#MAX_LEN * fnr
|
i := fm#MAX_LEN * fnr
|
||||||
case w_sel
|
case w_sel
|
||||||
|
@ -456,7 +527,7 @@ PRI get_fname(fnr):adrdat | i,stradr
|
||||||
fname[i] := 0
|
fname[i] := 0
|
||||||
return @fname
|
return @fname
|
||||||
|
|
||||||
PRI load(stradr) | len,fnr,i
|
PRI load(stradr) | len,fnr,i 'datei: datei --> ramdrive
|
||||||
|
|
||||||
ifnot ios.sdopen("r",stradr) 'datei öffnen
|
ifnot ios.sdopen("r",stradr) 'datei öffnen
|
||||||
len := ios.sdfattrib(ios#F_SIZE)
|
len := ios.sdfattrib(ios#F_SIZE)
|
||||||
|
@ -468,7 +539,7 @@ PRI load(stradr) | len,fnr,i
|
||||||
ios.sdclose
|
ios.sdclose
|
||||||
ios.rd_close(fnr)
|
ios.rd_close(fnr)
|
||||||
|
|
||||||
PRI save(stradr) | fnr,len,i
|
PRI save(stradr) | fnr,len,i 'datei: ramdrive --> datei
|
||||||
|
|
||||||
fnr := ios.rd_open(stradr)
|
fnr := ios.rd_open(stradr)
|
||||||
ifnot fnr == -1
|
ifnot fnr == -1
|
||||||
|
@ -481,7 +552,7 @@ PRI save(stradr) | fnr,len,i
|
||||||
ios.rd_close(fnr)
|
ios.rd_close(fnr)
|
||||||
|
|
||||||
|
|
||||||
PRI frame_draw
|
PRI frame_draw 'screen: bildschirmmaske ausgeben
|
||||||
|
|
||||||
ios.winset(0)
|
ios.winset(0)
|
||||||
ios.curoff
|
ios.curoff
|
||||||
|
@ -498,7 +569,7 @@ PRI frame_draw
|
||||||
ios.printq(string(" 1: View | 2: Del | 3: SD>>RAM ◀▶ 4: SD<<RAM | 5: RAM Clear "))
|
ios.printq(string(" 1: View | 2: Del | 3: SD>>RAM ◀▶ 4: SD<<RAM | 5: RAM Clear "))
|
||||||
ios.setcolor(fm#COL_DEFAULT)
|
ios.setcolor(fm#COL_DEFAULT)
|
||||||
|
|
||||||
PRI info_print | pos,len
|
PRI info_print | pos,len 'screen: infozeile ausgeben
|
||||||
|
|
||||||
pos := w_view[w_sel] + w_pos[w_sel]
|
pos := w_view[w_sel] + w_pos[w_sel]
|
||||||
case w_sel
|
case w_sel
|
||||||
|
@ -521,7 +592,7 @@ PRI info_print | pos,len
|
||||||
ios.printdec(ios.ram_getfree)
|
ios.printdec(ios.ram_getfree)
|
||||||
ios.print(string(" Bytes free"))
|
ios.print(string(" Bytes free"))
|
||||||
|
|
||||||
PRI testvideo 'passt div. variablen an videomodus an
|
PRI testvideo 'screen: passt div. variablen an videomodus an
|
||||||
|
|
||||||
vidmod := ios.belgetspec & 1
|
vidmod := ios.belgetspec & 1
|
||||||
rows := ios.belgetrows 'zeilenzahl bei bella abfragen
|
rows := ios.belgetrows 'zeilenzahl bei bella abfragen
|
||||||
|
@ -531,13 +602,15 @@ PRI pause(sec)
|
||||||
|
|
||||||
waitcnt(cnt+clkfreq*sec)
|
waitcnt(cnt+clkfreq*sec)
|
||||||
|
|
||||||
DAT
|
DAT 'strings
|
||||||
|
|
||||||
str1 byte "Dateien löschen?",0
|
str1 byte "Dateien löschen?",0
|
||||||
str2 byte "Ja",0
|
str2 byte "Ja",0
|
||||||
str3 byte "Nein",0
|
str3 byte "Nein",0
|
||||||
str4 byte "RAMDrive löschen?",0
|
str4 byte "RAMDrive löschen?",0
|
||||||
str5 byte "SD-Card mounten?",0
|
str5 byte "SD-Card mounten?",0
|
||||||
|
str6 byte 0
|
||||||
|
str7 byte "Programm beenden?",0
|
||||||
|
|
||||||
DAT
|
DAT
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ OBJ
|
||||||
str: "glob-string"
|
str: "glob-string"
|
||||||
num: "glob-numbers" 'Number Engine
|
num: "glob-numbers" 'Number Engine
|
||||||
gc : "glob-con"
|
gc : "glob-con"
|
||||||
led: "led-engine"
|
led: "glob-led-engine"
|
||||||
|
|
||||||
CON
|
CON
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ PUB main | i,n,len,ch,lch
|
||||||
repeat i from 0 to 3 'extender anhängen
|
repeat i from 0 to 3 'extender anhängen
|
||||||
byte[@parastr][len + i] := byte[@ext1][i]
|
byte[@parastr][len + i] := byte[@ext1][i]
|
||||||
byte[@parastr][len + i] := 0
|
byte[@parastr][len + i] := 0
|
||||||
|
ios.admsetsyssnd(0) 'systemklänge aus (nervt!)
|
||||||
ifnot ios.sdopen("r",@parastr)
|
ifnot ios.sdopen("r",@parastr)
|
||||||
repeat 'text ausgeben
|
repeat 'text ausgeben
|
||||||
ch := ios.sdgetc
|
ch := ios.sdgetc
|
||||||
|
@ -78,6 +79,7 @@ PUB main | i,n,len,ch,lch
|
||||||
'ios.print(string("Hilfetexte : ",$0d))
|
'ios.print(string("Hilfetexte : ",$0d))
|
||||||
cmd_dir_w(1)
|
cmd_dir_w(1)
|
||||||
ios.sdclose 'datei schließen
|
ios.sdclose 'datei schließen
|
||||||
|
ios.admsetsyssnd(1) 'systemklänge wieder ein
|
||||||
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
|
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
|
||||||
ios.stop
|
ios.stop
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,495 @@
|
||||||
|
{{
|
||||||
|
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
│ Autor: Ingo Kripahle │
|
||||||
|
│ Copyright (c) 2010 Ingo Kripahle │
|
||||||
|
│ See end of file for terms of use. │
|
||||||
|
│ Die Nutzungsbedingungen befinden sich am Ende der Datei │
|
||||||
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
|
|
||||||
|
Informationen : hive-project.de
|
||||||
|
Kontakt : drohne235@googlemail.com
|
||||||
|
System : TriOS
|
||||||
|
Name : blexbus-tool
|
||||||
|
Chip : Regnatix
|
||||||
|
Typ : Programm
|
||||||
|
Version :
|
||||||
|
Subversion :
|
||||||
|
|
||||||
|
Logbuch :
|
||||||
|
|
||||||
|
31-10-2013-dr235 - erste version
|
||||||
|
|
||||||
|
Kommandoliste:
|
||||||
|
|
||||||
|
Notizen:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
OBJ
|
||||||
|
ios: "reg-ios"
|
||||||
|
num: "glob-numbers"
|
||||||
|
|
||||||
|
CON
|
||||||
|
|
||||||
|
_CLKMODE = XTAL1 + PLL16X
|
||||||
|
_XINFREQ = 5_000_000
|
||||||
|
|
||||||
|
OS_TIBLEN = 64 'gr??e des inputbuffers
|
||||||
|
|
||||||
|
|
||||||
|
VAR
|
||||||
|
'systemvariablen
|
||||||
|
byte tib[OS_TIBLEN] 'tastatur-input-buffer
|
||||||
|
byte cmdstr[OS_TIBLEN] 'kommandostring f?r interpreter
|
||||||
|
byte token1[OS_TIBLEN] 'parameterstring 1 für interpreter
|
||||||
|
byte token2[OS_TIBLEN] 'parameterstring 2 für interpreter
|
||||||
|
byte tibpos 'aktuelle position im tib
|
||||||
|
long ppos 'puffer für adresse
|
||||||
|
long pcnt 'puffer für zeilenzahl
|
||||||
|
|
||||||
|
byte device 'adresse des geöffneten devices
|
||||||
|
byte polling 'status polling
|
||||||
|
byte open 'status device
|
||||||
|
|
||||||
|
PUB main | wflag
|
||||||
|
|
||||||
|
ios.start 'ios initialisieren
|
||||||
|
polling := 1
|
||||||
|
ios.plxRun
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
' ios.print(string("Perplex - PlexBus-Tool - DR235",$0d,$0d))
|
||||||
|
|
||||||
|
repeat
|
||||||
|
os_cmdinput 'kommandoeingabe
|
||||||
|
os_cmdint 'kommandozeileninterpreter
|
||||||
|
|
||||||
|
PUB os_cmdinput | charc 'sys: stringeingabe eine zeile
|
||||||
|
''funktionsgruppe : sys
|
||||||
|
''funktion : stringeingabe eine zeile
|
||||||
|
''eingabe : -
|
||||||
|
''ausgabe : -
|
||||||
|
''variablen : tib - eingabepuffer zur string
|
||||||
|
'' : tibpos - aktuelle position im tib
|
||||||
|
|
||||||
|
ios.print(@prompt2)
|
||||||
|
tibpos := 0 'tibposition auf anfang setzen
|
||||||
|
repeat until (charc := ios.keywait) == $0D 'tasten einlesen bis return
|
||||||
|
if (tibpos + 1) < OS_TIBLEN 'zeile noch nicht zu lang?
|
||||||
|
case charc
|
||||||
|
ios#CHAR_BS: 'backspace
|
||||||
|
if tibpos > 0 'noch nicht anfang der zeile erreeicht?
|
||||||
|
tib[tibpos--] := 0 'ein zeichen aus puffer entfernen
|
||||||
|
ios.printbs 'backspace an terminal senden
|
||||||
|
other: 'zeicheneingabe
|
||||||
|
tib[tibpos++] := charc 'zeichen speichern
|
||||||
|
ios.printchar(charc) 'zeichen ausgeben
|
||||||
|
ios.printnl
|
||||||
|
tib[tibpos] := 0 'string abschließen
|
||||||
|
tibpos := charc := 0 'werte rücksetzen
|
||||||
|
|
||||||
|
PUB os_nxtoken1: stradr 'sys: token 1 von tib einlesen
|
||||||
|
''funktionsgruppe : sys
|
||||||
|
''funktion : nächsten token im eingabestring suchen und stringzeiger übergeben
|
||||||
|
''eingabe : -
|
||||||
|
''ausgabe : stradr - adresse auf einen string mit dem gefundenen token
|
||||||
|
''variablen : tib - eingabepuffer zur string
|
||||||
|
'' : tibpos - aktuelle position im tib
|
||||||
|
'' : token - tokenstring
|
||||||
|
|
||||||
|
stradr := os_tokenize(@token1)
|
||||||
|
|
||||||
|
PUB os_nxtoken2: stradr 'sys: token 2 von tib einlesen
|
||||||
|
''funktionsgruppe : sys
|
||||||
|
''funktion : nächsten token im eingabestring suchen und stringzeiger übergeben
|
||||||
|
''eingabe : -
|
||||||
|
''ausgabe : stradr - adresse auf einen string mit dem gefundenen token
|
||||||
|
''variablen : tib - eingabepuffer zur string
|
||||||
|
'' : tibpos - aktuelle position im tib
|
||||||
|
'' : token - tokenstring
|
||||||
|
|
||||||
|
stradr := os_tokenize(@token2)
|
||||||
|
|
||||||
|
PUB os_tokenize(token):stradr | i 'sys: liest nächsten token aus tib
|
||||||
|
|
||||||
|
i := 0
|
||||||
|
if tib[tibpos] <> 0 'abbruch bei leerem string
|
||||||
|
repeat until tib[tibpos] > ios#CHAR_SPACE 'führende leerzeichen ausbenden
|
||||||
|
tibpos++
|
||||||
|
repeat until (tib[tibpos] == ios#CHAR_SPACE) or (tib[tibpos] == 0) 'wiederholen bis leerzeichen oder stringende
|
||||||
|
byte[token][i] := tib[tibpos]
|
||||||
|
tibpos++
|
||||||
|
i++
|
||||||
|
else
|
||||||
|
token := 0
|
||||||
|
byte[token][i] := 0
|
||||||
|
stradr := token
|
||||||
|
|
||||||
|
PUB os_nextpos: tibpos2 'sys: setzt zeiger auf nächste position
|
||||||
|
''funktionsgruppe : sys
|
||||||
|
''funktion : tibpos auf nächstes token setzen
|
||||||
|
''eingabe : -
|
||||||
|
''ausgabe : tibpos2 - position des nächsten tokens in tib
|
||||||
|
''variablen : tib - eingabepuffer zur string
|
||||||
|
'' : tibpos - aktuelle position im tib
|
||||||
|
|
||||||
|
if tib[tibpos] <> 0
|
||||||
|
repeat until tib[tibpos] > ios#CHAR_SPACE 'führende leerzeichen ausbenden
|
||||||
|
tibpos++
|
||||||
|
return tibpos
|
||||||
|
|
||||||
|
PUB os_cmdint 'sys: kommandointerpreter
|
||||||
|
''funktionsgruppe : sys
|
||||||
|
''funktion : kommandointerpreter; zeichenkette ab tibpos wird als kommando interpretiert
|
||||||
|
'' : tibpos wird auf position hinter token gesetzt
|
||||||
|
''eingabe : -
|
||||||
|
''ausgabe : -
|
||||||
|
''variablen : tib - eingabepuffer zur string
|
||||||
|
'' : tibpos - aktuelle position im tib
|
||||||
|
|
||||||
|
repeat 'kommandostring kopieren
|
||||||
|
cmdstr[tibpos] := tib[tibpos]
|
||||||
|
tibpos++
|
||||||
|
until (tib[tibpos] == ios#CHAR_SPACE) or (tib[tibpos] == 0) 'wiederholen bis leerzeichen oder stringende
|
||||||
|
cmdstr[tibpos] := 0 'kommandostring abschließen
|
||||||
|
os_cmdexec(@cmdstr) 'interpreter aufrufen
|
||||||
|
tibpos := 0 'tastaturpuffer zurücksetzen
|
||||||
|
tib[0] := 0
|
||||||
|
|
||||||
|
PUB os_cmdexec(stradr) 'sys: kommando im ?bergebenen string wird als kommando interpretiert
|
||||||
|
{{os_smdexec - das kommando im ?bergebenen string wird als kommando interpretiert
|
||||||
|
stradr: adresse einer stringvariable die ein kommando enth?lt}}
|
||||||
|
if strcomp(stradr,string("help")) 'help
|
||||||
|
ios.print(@help1)
|
||||||
|
elseif strcomp(stradr,string("open"))
|
||||||
|
plx_open
|
||||||
|
elseif strcomp(stradr,string("close"))
|
||||||
|
plx_close
|
||||||
|
elseif strcomp(stradr,string("put"))
|
||||||
|
plx_put
|
||||||
|
elseif strcomp(stradr,string("get"))
|
||||||
|
plx_get
|
||||||
|
elseif strcomp(stradr,string("map"))
|
||||||
|
plx_map
|
||||||
|
elseif strcomp(stradr,string("scan"))
|
||||||
|
plx_scan
|
||||||
|
elseif strcomp(stradr,string("test"))
|
||||||
|
plx_test
|
||||||
|
elseif strcomp(stradr,string("test#"))
|
||||||
|
plx_testnr
|
||||||
|
elseif strcomp(stradr,string("game"))
|
||||||
|
plx_game
|
||||||
|
elseif strcomp(stradr,string("setgame"))
|
||||||
|
plx_setgame
|
||||||
|
elseif strcomp(stradr,string("polloff"))
|
||||||
|
plx_polloff
|
||||||
|
elseif strcomp(stradr,string("pollon"))
|
||||||
|
plx_pollon
|
||||||
|
elseif strcomp(stradr,string("debug"))
|
||||||
|
plx_debug
|
||||||
|
elseif strcomp(stradr,string("status"))
|
||||||
|
plx_status
|
||||||
|
elseif strcomp(stradr,string("plexuswr"))
|
||||||
|
plx_plexuswr
|
||||||
|
elseif strcomp(stradr,string("bye"))
|
||||||
|
ios.stop
|
||||||
|
else 'kommando nicht gefunden
|
||||||
|
ios.print(stradr)
|
||||||
|
ios.print(@prompt3)
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI plx_debug|wert,i
|
||||||
|
|
||||||
|
' ios.plxOut($22,cnt)
|
||||||
|
|
||||||
|
' irgendwie funktionieren die direkten i2c-operationen noch nicht
|
||||||
|
' von administra aus funktioniert das gleiche konstrukt
|
||||||
|
' ???
|
||||||
|
|
||||||
|
ios.plxHalt
|
||||||
|
repeat
|
||||||
|
ios.plxStart
|
||||||
|
ios.plxWrite($22 << 1)
|
||||||
|
ios.plxWrite(i++)
|
||||||
|
ios.plxStop
|
||||||
|
waitcnt(cnt+clkfreq/3)
|
||||||
|
ios.printhex(i,2)
|
||||||
|
ios.printchar(" ")
|
||||||
|
|
||||||
|
PRI plx_plexuswr|regadr,regval
|
||||||
|
|
||||||
|
device := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
regadr := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
regval := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
|
||||||
|
ios.plxHalt
|
||||||
|
waitcnt(cnt+clkfreq)
|
||||||
|
|
||||||
|
ios.plxStart
|
||||||
|
ios.plxWrite(device << 1)
|
||||||
|
ios.plxWrite(regadr)
|
||||||
|
ios.plxWrite(regval)
|
||||||
|
ios.plxStop
|
||||||
|
|
||||||
|
waitcnt(cnt+clkfreq)
|
||||||
|
ios.plxRun
|
||||||
|
|
||||||
|
PRI plx_status
|
||||||
|
|
||||||
|
ios.printnl
|
||||||
|
ios.print(string("Device : "))
|
||||||
|
ios.printhex(device,2)
|
||||||
|
if open
|
||||||
|
ios.print(string(" open"))
|
||||||
|
else
|
||||||
|
ios.print(string(" close"))
|
||||||
|
ios.printnl
|
||||||
|
ios.print(string("Polling : "))
|
||||||
|
if polling
|
||||||
|
ios.print(string("ON"))
|
||||||
|
else
|
||||||
|
ios.print(string("OFF"))
|
||||||
|
ios.printnl
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
|
||||||
|
PRI plx_polloff
|
||||||
|
|
||||||
|
ios.plxHalt
|
||||||
|
ios.print(string("Poller wurde angehalten!",$0d))
|
||||||
|
polling := 0
|
||||||
|
|
||||||
|
PRI plx_pollon
|
||||||
|
|
||||||
|
ios.plxRun
|
||||||
|
ios.print(string("Poller wurde gestartet!",$0d))
|
||||||
|
polling := 1
|
||||||
|
open := 0
|
||||||
|
|
||||||
|
PRI plx_game|dev,i
|
||||||
|
|
||||||
|
i := 0
|
||||||
|
ios.curoff
|
||||||
|
ios.printcls
|
||||||
|
repeat
|
||||||
|
dev := ios.pad
|
||||||
|
ios.curhome
|
||||||
|
ios.printnl
|
||||||
|
ios.print(string("Scan : "))
|
||||||
|
ios.printdec(i++)
|
||||||
|
ios.printnl
|
||||||
|
ios.print(string("Input : ["))
|
||||||
|
ios.printbin(dev,24)
|
||||||
|
ios.printchar("]")
|
||||||
|
ios.printnl
|
||||||
|
ios.printnl
|
||||||
|
print_joystick(dev >> 16 & $FF)
|
||||||
|
ios.printnl
|
||||||
|
print_paddle(0,dev >> 8 & $FF)
|
||||||
|
print_paddle(1,dev & $FF)
|
||||||
|
until ios.key
|
||||||
|
ios.printnl
|
||||||
|
ios.curon
|
||||||
|
|
||||||
|
PRI plx_setgame|adradda,adrport
|
||||||
|
|
||||||
|
adradda := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
adrport := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
ios.plxsetadr(adradda,adrport)
|
||||||
|
|
||||||
|
PRI plx_test
|
||||||
|
|
||||||
|
testsepia($48,$20)
|
||||||
|
|
||||||
|
PRI plx_testnr|adradda,adrport
|
||||||
|
|
||||||
|
adradda := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
adrport := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
testsepia(adradda,adrport)
|
||||||
|
|
||||||
|
PRI plx_map|ack,adr,n,i
|
||||||
|
|
||||||
|
ios.plxHalt
|
||||||
|
n := 0
|
||||||
|
i := 0
|
||||||
|
ios.curoff
|
||||||
|
ios.printcls
|
||||||
|
repeat
|
||||||
|
ios.curhome
|
||||||
|
ios.printnl
|
||||||
|
ios.print(string(" 0123456789ABCDEF"))
|
||||||
|
ios.printnl
|
||||||
|
repeat adr from 0 to 127
|
||||||
|
|
||||||
|
ack := ios.plxping(adr)
|
||||||
|
if n == 0
|
||||||
|
ios.printhex(adr,2)
|
||||||
|
ios.printchar(" ")
|
||||||
|
if ack
|
||||||
|
ios.printqchar("┼")
|
||||||
|
else
|
||||||
|
ios.printqchar("•")
|
||||||
|
if n++ == 15
|
||||||
|
ios.printnl
|
||||||
|
n := 0
|
||||||
|
ios.printnl
|
||||||
|
ios.print(string("Scan : "))
|
||||||
|
ios.printdec(i++)
|
||||||
|
until ios.key
|
||||||
|
ios.printnl
|
||||||
|
ios.curon
|
||||||
|
ios.plxRun
|
||||||
|
|
||||||
|
PRI plx_scan|ack,adr
|
||||||
|
|
||||||
|
ios.plxHalt
|
||||||
|
ios.printnl
|
||||||
|
repeat adr from 0 to 127
|
||||||
|
ack := ios.plxping(adr)
|
||||||
|
ifnot ack
|
||||||
|
ios.print(string("Ping : $"))
|
||||||
|
ios.printhex(adr,2)
|
||||||
|
ios.print(string(" : "))
|
||||||
|
ios.printdec(adr)
|
||||||
|
ios.printnl
|
||||||
|
ios.printnl
|
||||||
|
ios.plxRun
|
||||||
|
|
||||||
|
PRI plx_open|ack
|
||||||
|
|
||||||
|
device := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
ios.plxHalt
|
||||||
|
ios.plxStart
|
||||||
|
ifnot ios.plxWrite(device << 1)
|
||||||
|
ios.print(string("Device geöffnet, Polling aus!"))
|
||||||
|
polling := 0
|
||||||
|
open := 1
|
||||||
|
else
|
||||||
|
ios.print(string("Device nicht vorhanden!"))
|
||||||
|
ios.plxRun
|
||||||
|
polling := 1
|
||||||
|
open := 0
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI plx_close
|
||||||
|
|
||||||
|
ios.plxRun
|
||||||
|
ios.print(string("Device geschlossen, Polling an!"))
|
||||||
|
ios.printnl
|
||||||
|
polling := 1
|
||||||
|
open := 0
|
||||||
|
|
||||||
|
PRI plx_put|wert
|
||||||
|
|
||||||
|
if open
|
||||||
|
wert := num.FromStr(os_nxtoken1,num#HEX)
|
||||||
|
ios.plxOut(device,wert)
|
||||||
|
else
|
||||||
|
ios.print(string("Kein Device geöffnet!"))
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI plx_get
|
||||||
|
|
||||||
|
if open
|
||||||
|
ios.print(string("Get : "))
|
||||||
|
ios.printhex(ios.plxIn(device),2)
|
||||||
|
ios.printnl
|
||||||
|
else
|
||||||
|
ios.print(string("Kein Device geöffnet!"))
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI print_chan(cnr,wert)
|
||||||
|
|
||||||
|
ios.print(string("A/D "))
|
||||||
|
ios.printdec(cnr)
|
||||||
|
ios.printchar(" ")
|
||||||
|
ios.printhex(wert,2)
|
||||||
|
ios.printchar(" ")
|
||||||
|
ios.printchar("[")
|
||||||
|
repeat wert>>3
|
||||||
|
ios.printqchar("‣")
|
||||||
|
repeat (255-wert)>>3
|
||||||
|
ios.printqchar(" ")
|
||||||
|
ios.printchar("]")
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI print_port(pnr,wert)
|
||||||
|
|
||||||
|
ios.print(string("Port "))
|
||||||
|
ios.printdec(pnr)
|
||||||
|
ios.print(string(" ["))
|
||||||
|
|
||||||
|
repeat 8
|
||||||
|
if wert & 1
|
||||||
|
ios.printqchar("‣")
|
||||||
|
else
|
||||||
|
ios.printqchar(" ")
|
||||||
|
wert := wert >> 1
|
||||||
|
ios.printchar("]")
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI print_paddle(cnr,wert)
|
||||||
|
|
||||||
|
ios.print(string("Paddle "))
|
||||||
|
ios.printdec(cnr)
|
||||||
|
ios.printchar(" ")
|
||||||
|
ios.printhex(wert,2)
|
||||||
|
ios.printchar(" ")
|
||||||
|
ios.printchar("[")
|
||||||
|
repeat wert>>3
|
||||||
|
ios.printqchar("‣")
|
||||||
|
repeat (255-wert)>>3
|
||||||
|
ios.printqchar(" ")
|
||||||
|
ios.printchar("]")
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI print_joystick(wert)
|
||||||
|
|
||||||
|
ios.print(string("Joystick "))
|
||||||
|
ios.print(string(" ["))
|
||||||
|
|
||||||
|
repeat 8
|
||||||
|
if wert & 1
|
||||||
|
ios.printqchar("‣")
|
||||||
|
else
|
||||||
|
ios.printqchar(" ")
|
||||||
|
wert := wert >> 1
|
||||||
|
ios.printchar("]")
|
||||||
|
ios.printnl
|
||||||
|
|
||||||
|
PRI testsepia(adda,port)
|
||||||
|
|
||||||
|
ios.plxHalt
|
||||||
|
ios.curoff
|
||||||
|
ios.printcls
|
||||||
|
repeat
|
||||||
|
ios.curhome
|
||||||
|
ios.printnl
|
||||||
|
print_port(1,ios.plxIn(port ))
|
||||||
|
print_port(2,ios.plxIn(port+1))
|
||||||
|
print_port(3,ios.plxIn(port+2))
|
||||||
|
ios.printnl
|
||||||
|
print_chan(0,ios.plxch(adda,0))
|
||||||
|
print_chan(1,ios.plxch(adda,1))
|
||||||
|
print_chan(2,ios.plxch(adda,2))
|
||||||
|
print_chan(3,ios.plxch(adda,3))
|
||||||
|
ios.plxout(port+2,!(cnt>>23))
|
||||||
|
until ios.key
|
||||||
|
ios.printnl
|
||||||
|
ios.curon
|
||||||
|
ios.plxRun
|
||||||
|
|
||||||
|
|
||||||
|
DAT
|
||||||
|
prompt1 byte "ok ", $0d, 0
|
||||||
|
prompt2 byte "plx: ", 0
|
||||||
|
prompt3 byte "? ",0
|
||||||
|
wait1 byte "<WEITER? */q:>",0
|
||||||
|
|
||||||
|
help1 file "perplex.txt"
|
||||||
|
byte $0d,0
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
openwr <adr> - slave schreibend öffnen
|
||||||
|
openrd <adr> - slave lesend öffnen
|
||||||
|
close - slave schließen
|
||||||
|
put <wert> - zeichen zu plexus senden
|
||||||
|
get - zeichen von plexus empfangen
|
||||||
|
map - slavemap anzeigen
|
||||||
|
scan - anzeige aller slaveadressen
|
||||||
|
test - test für interne sepia-karte
|
||||||
|
test# adda port - test für spezifische sepia-karte
|
||||||
|
game - gamedevice abfragen (pollregister)
|
||||||
|
setgame adda port - adressen für poller setzen adda/port
|
||||||
|
polloff - polling anhalten
|
||||||
|
pollon - polling starten
|
||||||
|
bye - programm beenden
|
||||||
|
|
||||||
|
Parameter hexadezimal!
|
|
@ -79,13 +79,15 @@ PUB main | tast
|
||||||
PUB statistik 'ausgabe der fehlerstatistik
|
PUB statistik 'ausgabe der fehlerstatistik
|
||||||
|
|
||||||
cnt_err := cnt_err + cnt_test1 + cnt_test2 + cnt_test3 + cnt_testx
|
cnt_err := cnt_err + cnt_test1 + cnt_test2 + cnt_test3 + cnt_testx
|
||||||
ios.setcolor(4)
|
ios.setcolor(0)
|
||||||
ios.printcls
|
ios.printcls
|
||||||
ios.printnl
|
ios.printnl
|
||||||
ios.print(string("Statistik eRAM-Test:", $0d, $0d))
|
ios.print(string("Statistik eRAM-Test:", $0d, $0d))
|
||||||
ios.print(string("Testdurchläufe : "))
|
ios.print(string("Testdurchläufe : "))
|
||||||
ios.printdec(cnt_loop)
|
ios.printdec(cnt_loop)
|
||||||
ios.printnl
|
ios.printnl
|
||||||
|
ios.printnl
|
||||||
|
ios.setcolor(4)
|
||||||
ios.print(string("Fehler Gesamt : "))
|
ios.print(string("Fehler Gesamt : "))
|
||||||
ios.printdec(cnt_err)
|
ios.printdec(cnt_err)
|
||||||
ios.printnl
|
ios.printnl
|
||||||
|
@ -102,9 +104,6 @@ PUB statistik 'ausgabe der fehlerstati
|
||||||
ios.printdec(cnt_testx)
|
ios.printdec(cnt_testx)
|
||||||
ios.printnl
|
ios.printnl
|
||||||
ios.printnl
|
ios.printnl
|
||||||
ios.print(string("Aktueller Test:", $0d))
|
|
||||||
ios.printnl
|
|
||||||
ios.printnl
|
|
||||||
cnt_test1 := 0
|
cnt_test1 := 0
|
||||||
cnt_test2 := 0
|
cnt_test2 := 0
|
||||||
cnt_test3 := 0
|
cnt_test3 := 0
|
||||||
|
|
|
@ -687,7 +687,7 @@ PRI cmd_color 'cmd: zeichenfarbe wähl
|
||||||
|
|
||||||
ios.setcolor(str.decimalToNumber(act_color := os_nxtoken1))
|
ios.setcolor(str.decimalToNumber(act_color := os_nxtoken1))
|
||||||
|
|
||||||
PRI cmd_sysinfo 'cmd: systeminformationen anzeigen
|
PRI cmd_sysinfo|ack,adr 'cmd: systeminformationen anzeigen
|
||||||
|
|
||||||
ios.printnl
|
ios.printnl
|
||||||
os_printstr(@msg22,@syst)
|
os_printstr(@msg22,@syst)
|
||||||
|
@ -716,6 +716,18 @@ PRI cmd_sysinfo 'cmd: systeminformatione
|
||||||
else
|
else
|
||||||
os_printstr(@msg36,@msg38)
|
os_printstr(@msg36,@msg38)
|
||||||
|
|
||||||
|
ios.printnl
|
||||||
|
ios.print(@msg39)
|
||||||
|
ios.plxHalt
|
||||||
|
repeat adr from 0 to 127
|
||||||
|
ack := ios.plxping(adr)
|
||||||
|
ifnot ack
|
||||||
|
ios.print(string(" ["))
|
||||||
|
ios.printhex(adr,2)
|
||||||
|
ios.print(string("]"))
|
||||||
|
ios.printnl
|
||||||
|
ios.plxRun
|
||||||
|
|
||||||
PRI cmd_mount | err 'cmd: mount
|
PRI cmd_mount | err 'cmd: mount
|
||||||
|
|
||||||
repeat 16
|
repeat 16
|
||||||
|
@ -873,7 +885,7 @@ PRI cmd_dir|fcnt,stradr,hflag 'cmd: verzeichnis anzeig
|
||||||
ios.print(@msg10)
|
ios.print(@msg10)
|
||||||
ios.print(@msg5)
|
ios.print(@msg5)
|
||||||
ios.print(ios.sdvolname)
|
ios.print(ios.sdvolname)
|
||||||
ifnot ios.os_error(ios.sddir) 'verzeichnis öffnen
|
ios.sddir 'verzeichnis öffnen
|
||||||
if str.findCharacter(stradr,"h")
|
if str.findCharacter(stradr,"h")
|
||||||
hflag := 0
|
hflag := 0
|
||||||
if str.findCharacter(stradr,"w")
|
if str.findCharacter(stradr,"w")
|
||||||
|
@ -1076,6 +1088,7 @@ msg35 byte "Bellatrix Auflösung Y :",0
|
||||||
msg36 byte "Bellatrix Videomodus : ",0
|
msg36 byte "Bellatrix Videomodus : ",0
|
||||||
msg37 byte "VGA",0
|
msg37 byte "VGA",0
|
||||||
msg38 byte "TV",0
|
msg38 byte "TV",0
|
||||||
|
msg39 byte "PlexBus Devices : ",0
|
||||||
|
|
||||||
ext1 byte ".BIN",0
|
ext1 byte ".BIN",0
|
||||||
ext2 byte ".ADM",0
|
ext2 byte ".ADM",0
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
/? : Hilfe
|
/? : Hilfe
|
||||||
/l : Konfiguration anzeigen
|
/l : Konfiguration anzeigen
|
||||||
----------- Administra-Funktionen
|
---------------- Administra-Funktionen
|
||||||
/ah 0|1 : hss ab-/anschalten
|
/ah 0|1 : hss ab-/anschalten
|
||||||
/aw 0|1 : wav ab-/anschalten
|
/aw 0|1 : wav ab-/anschalten
|
||||||
/as 0|1 : systemklänge ab-/anschalten
|
/as 0|1 : systemklänge ab-/anschalten
|
||||||
|
@ -10,10 +10,10 @@
|
||||||
/ah 0..15 : hss-lautstärke
|
/ah 0..15 : hss-lautstärke
|
||||||
/af : administra reset, flash booten
|
/af : administra reset, flash booten
|
||||||
/at : transfergeschwindigkeit messen
|
/at : transfergeschwindigkeit messen
|
||||||
----------- Bellatrix-Funktionen
|
---------------- Bellatrix-Funktionen
|
||||||
/ci : farbtabelle anzeigen
|
/ci : farbtabelle anzeigen
|
||||||
/cs datei : farbtabelle speichern
|
/cs datei : farbtabelle speichern
|
||||||
/cl datei : farbtabelle laden
|
/cl datei : farbtabelle laden
|
||||||
----------- Port-Funktionen
|
---------------- Port-Funktionen
|
||||||
/po nr anz : Impulse an port ausgeben
|
/po nr anz time : Impulse an port ausgeben
|
||||||
/pi : Status der Port abfragen
|
/pi : Status der Port abfragen
|
Loading…
Reference in New Issue