Plexus 2.10
This commit is contained in:
parent
a2f6f2826d
commit
85cf23b0d3
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.
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.
|
@ -11,10 +11,12 @@ F8 Color-Settings
|
||||||
F9 Ram-Monitor
|
F9 Ram-Monitor
|
||||||
F10 Sid-Dmp-Player
|
F10 Sid-Dmp-Player
|
||||||
F11 Calendar
|
F11 Calendar
|
||||||
F12 Reboot
|
F12 Reboot Plexus
|
||||||
Alt+F1 About-Box
|
Alt+F1 About-Box
|
||||||
Alt+F2 System-Settings
|
Alt+F2 System-Settings
|
||||||
|
Alt+F3 extended Titlebar
|
||||||
Alt+F5 Baud-Select
|
Alt+F5 Baud-Select
|
||||||
|
Alt+F12 Reboot TRIOS
|
||||||
M Mount/Unmount
|
M Mount/Unmount
|
||||||
I SD-Card-Info
|
I SD-Card-Info
|
||||||
F Format SD-Card
|
F Format SD-Card
|
||||||
|
@ -35,7 +37,7 @@ C Copy File
|
||||||
P Paste File
|
P Paste File
|
||||||
Cursor Select File
|
Cursor Select File
|
||||||
Enter Start File(bin etc)
|
Enter Start File(bin etc)
|
||||||
Entf Delete File
|
Del Delete File
|
||||||
Y Send File(YMODEM)
|
Y Send File(YMODEM)
|
||||||
Z Receive File(YMODEM)
|
Z Receive File(YMODEM)
|
||||||
============================
|
============================
|
||||||
|
@ -84,4 +86,4 @@ D Use DCF-Receiver
|
||||||
B Use HC05-Bluetooth
|
B Use HC05-Bluetooth
|
||||||
============================
|
============================
|
||||||
Program Window
|
Program Window
|
||||||
1..3 Select Program
|
1..6 Select Program
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
PLEXUS for Hive 2.06
|
PLEXUS for Hive 2.1
|
||||||
|
|
||||||
Autor:R.Zielinski 04/2014
|
Autor:R.Zielinski 08/2014
|
||||||
Mail :Zille09@gmail.com
|
Mail :Zille09@gmail.com
|
||||||
Hive-Project.de
|
Hive-Project.de
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
data/REG.INI
BIN
data/REG.INI
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,9 @@
|
||||||
|
ymodem.dll
|
||||||
|
basrun.dll
|
||||||
|
sepia.dll
|
||||||
|
venatrix.dll
|
||||||
|
dos.dll
|
||||||
|
dcf.dll
|
||||||
|
bltooth.dll
|
||||||
|
font.dll
|
||||||
|
wave.dll
|
|
@ -76,3 +76,4 @@ No Response from Host
|
||||||
Transmission complete
|
Transmission complete
|
||||||
Send File...
|
Send File...
|
||||||
Timeout failure!
|
Timeout failure!
|
||||||
|
Reboot Hive whith TRIOS?
|
||||||
|
|
14
make.sh
14
make.sh
|
@ -17,9 +17,9 @@ BSTC="bstc"
|
||||||
# Alte Versionen löschen
|
# Alte Versionen löschen
|
||||||
|
|
||||||
rm -rf ${sdplex}
|
rm -rf ${sdplex}
|
||||||
##rm -rf ${sdsys}/xxxx
|
rm -rf ${sdsys}/goplexus.bin
|
||||||
mkdir -p ${sdplex}
|
mkdir -p ${sdplex}
|
||||||
##mkdir ${sdsys}
|
mkdir ${sdsys}
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
@ -58,6 +58,16 @@ mv dos-shell.binary ${sdplex}/dos.dll
|
||||||
${BSTC} -L ${libpath} ${D} -b -O a source/sepia-test.spin
|
${BSTC} -L ${libpath} ${D} -b -O a source/sepia-test.spin
|
||||||
mv sepia-test.binary ${sdplex}/sepia.dll
|
mv sepia-test.binary ${sdplex}/sepia.dll
|
||||||
|
|
||||||
|
${BSTC} -L ${libpath} ${D} -b -O a source/SignalGenerator.spin
|
||||||
|
mv SignalGenerator.binary ${sdplex}/Wave.dll
|
||||||
|
|
||||||
|
${BSTC} -L ${libpath} ${D} -b -O a source/font-draw.spin
|
||||||
|
mv font-draw.binary ${sdplex}/font.dll
|
||||||
|
|
||||||
|
${BSTC} -L ${libpath} ${D} -b -O a source/Switch_Plexus.spin
|
||||||
|
mv Switch_Plexus.binary ${sdsys}/goplexus.bin
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
# Daten kopieren
|
# Daten kopieren
|
||||||
|
|
||||||
|
|
|
@ -534,7 +534,7 @@ PRI time|s 'Zeitanzeige in der Statusleiste
|
||||||
if timezaehler>150
|
if timezaehler>150
|
||||||
timezaehler:=0
|
timezaehler:=0
|
||||||
s:=ios.getminutes
|
s:=ios.getminutes
|
||||||
Status_extern(ios.dcf_sync,dcf_on,170,27,0,colors[titeltextcol],black) 'Anzeige des aktuellen Status in der Titelzeile
|
Status_extern(ios.dcf_sync,dcf_on,170,34,29,green,black) 'Anzeige des aktuellen Status in der Titelzeile
|
||||||
if s<>tmptime
|
if s<>tmptime
|
||||||
displaytime
|
displaytime
|
||||||
|
|
||||||
|
@ -543,10 +543,10 @@ PRI displaytime|h,m
|
||||||
h:=ios.gethours
|
h:=ios.gethours
|
||||||
m:=ios.getminutes
|
m:=ios.getminutes
|
||||||
|
|
||||||
print_zehner(h,29,34,colors[hcolstatus],colors[statustextcol])
|
print_zehner(h,29,35,colors[hcolstatus],colors[statustextcol])
|
||||||
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,36)
|
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,37)
|
||||||
|
|
||||||
print_zehner(m,29,37,colors[hcolstatus],colors[statustextcol])
|
print_zehner(m,29,38,colors[hcolstatus],colors[statustextcol])
|
||||||
tmptime:=m
|
tmptime:=m
|
||||||
date
|
date
|
||||||
|
|
||||||
|
@ -569,12 +569,12 @@ pri print_zehner(wert,y,x,hin,vor)|a
|
||||||
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
||||||
|
|
||||||
if wert1==1
|
if wert1==1
|
||||||
ios.displaytile(tnr_act,colors[Titelhcol],col,f3,y,x) 'Status ok-anzeigen
|
ios.displaytile(tnr_act,colors[hcolstatus],col,f3,y,x) 'Status ok-anzeigen
|
||||||
else
|
else
|
||||||
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
||||||
ios.displaytile(tnr_act,colors[titelhcol],grey,0,y,x) 'Symbol grau
|
ios.displaytile(tnr_act,colors[hcolstatus],grey,0,y,x) 'Symbol grau
|
||||||
else
|
else
|
||||||
ios.displaytile(16,colors[Titelhcol],colors[titeltextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
ios.displaytile(16,colors[hcolstatus],colors[statustextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
||||||
|
|
||||||
con'
|
con'
|
||||||
PRI doppelklick:click 'pseudo-doppelklick
|
PRI doppelklick:click 'pseudo-doppelklick
|
||||||
|
@ -647,6 +647,8 @@ PRI printfont(str1,a,b,c,d,e)|f
|
||||||
|
|
||||||
repeat strsize(str1)
|
repeat strsize(str1)
|
||||||
f:= byte[str1++]
|
f:= byte[str1++]
|
||||||
|
if f >96
|
||||||
|
f^=32
|
||||||
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
||||||
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
||||||
d:=0
|
d:=0
|
||||||
|
@ -677,13 +679,16 @@ con '************************************************** Button-Funktionen ******
|
||||||
|
|
||||||
PRI buttonpress(n)
|
PRI buttonpress(n)
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),250,0,0,0,29)
|
1:printfont(string("Start "),250,0,0,0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],250,colors[shellhcol],29,7)
|
||||||
|
|
||||||
2:printfont(@Abbr,250,0,0,buttonx[n],buttony[n])
|
2:printfont(@Abbr,250,0,0,buttonx[n],buttony[n])
|
||||||
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
||||||
|
|
||||||
Mouse_Release
|
Mouse_Release
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),colors[hcolstatus],0,colors[statustextcol],0,29)
|
1:printfont(string("Start "),colors[hcolstatus],0,colors[statustextcol],0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],colors[hcolstatus],colors[shellhcol],29,7)
|
||||||
2:printfont(@Abbr,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
2:printfont(@Abbr,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
||||||
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
||||||
|
|
||||||
|
|
|
@ -183,9 +183,9 @@ PRI os_cmdinput | x,y ,i,dk,key,sync,dcferror,bit_tmp,lvl_tmp,bit_num,bit_lvl,gt
|
||||||
printdec(gt_act,15,18,colors[winhcol],colors[act_color])
|
printdec(gt_act,15,18,colors[winhcol],colors[act_color])
|
||||||
'####################### DCF-Empfangssymbol in der Titelleiste #########################################################
|
'####################### DCF-Empfangssymbol in der Titelleiste #########################################################
|
||||||
if sync==1
|
if sync==1
|
||||||
ios.displaytile(170,colors[Titelhcol],colors[titeltextcol],0,0,27)
|
ios.displaytile(170,colors[hcolstatus],green,0,29,34)
|
||||||
else
|
else
|
||||||
ios.displaytile(170,colors[titelhcol],grey,0,0,27) 'dcf-Symbol grau
|
ios.displaytile(170,colors[hcolstatus],grey,0,29,34) 'dcf-Symbol grau
|
||||||
|
|
||||||
'####################### DCF-Zeit anzeigen #############################################################################
|
'####################### DCF-Zeit anzeigen #############################################################################
|
||||||
dcf_time
|
dcf_time
|
||||||
|
@ -349,10 +349,10 @@ PRI displaytime|h,m,x,y
|
||||||
h:=ios.gethours
|
h:=ios.gethours
|
||||||
m:=ios.getminutes
|
m:=ios.getminutes
|
||||||
|
|
||||||
print_zehner(h,29,34,colors[hcolstatus],colors[statustextcol])
|
print_zehner(h,29,35,colors[hcolstatus],colors[statustextcol])
|
||||||
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,36)
|
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,37)
|
||||||
|
|
||||||
print_zehner(m,29,37,colors[hcolstatus],colors[statustextcol])
|
print_zehner(m,29,38,colors[hcolstatus],colors[statustextcol])
|
||||||
tmptime:=m
|
tmptime:=m
|
||||||
date
|
date
|
||||||
|
|
||||||
|
@ -463,6 +463,8 @@ PRI printfont(str1,a,b,c,d,e)|f
|
||||||
|
|
||||||
repeat strsize(str1)
|
repeat strsize(str1)
|
||||||
f:= byte[str1++]
|
f:= byte[str1++]
|
||||||
|
if f >96
|
||||||
|
f^=32
|
||||||
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
||||||
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
||||||
d:=0
|
d:=0
|
||||||
|
@ -494,14 +496,14 @@ con '************************************************** Button-Funktionen ******
|
||||||
PRI buttonpress(n)
|
PRI buttonpress(n)
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start "),250,0,0,0,29)
|
1:printfont(string("Start "),250,0,0,0,29)
|
||||||
ios.displaytile(164,0,colors[shellhcol],250,29,7)
|
ios.displaytile(144,colors[shellhcol],250,colors[shellhcol],29,7)
|
||||||
|
|
||||||
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
||||||
|
|
||||||
Mouse_Release
|
Mouse_Release
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start "),colors[hcolstatus],0,colors[statustextcol],0,29)
|
1:printfont(string("Start "),colors[hcolstatus],0,colors[statustextcol],0,29)
|
||||||
ios.displaytile(164,0,colors[shellhcol],colors[hcolstatus],29,7)
|
ios.displaytile(144,colors[shellhcol],colors[hcolstatus],colors[shellhcol],29,7)
|
||||||
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -51,6 +51,8 @@ sndnfo = $21200
|
||||||
prgnfo = $21400
|
prgnfo = $21400
|
||||||
Verz_RAM = $21800
|
Verz_RAM = $21800
|
||||||
MENU_RAM = $22000
|
MENU_RAM = $22000
|
||||||
|
'-------- Speicher für DLL-Namen ----------------
|
||||||
|
DLL_RAM = $30000
|
||||||
'-------- Speicher für Titelliste ---------------
|
'-------- Speicher für Titelliste ---------------
|
||||||
DMP_RAM = $40000
|
DMP_RAM = $40000
|
||||||
'-------- Speicher für Screensaver --------------
|
'-------- Speicher für Screensaver --------------
|
||||||
|
@ -59,10 +61,10 @@ SCREEN_SV = $63000
|
||||||
SYS_FONT = $66800 '....$693FF ' ab hier liegt der System-Font 11kb
|
SYS_FONT = $66800 '....$693FF ' ab hier liegt der System-Font 11kb
|
||||||
|
|
||||||
|
|
||||||
|
MOUSE_RAM = $69400 '....$6943F ' User-Mouse-Pointer 64byte
|
||||||
|
|
||||||
'-------- Speicher für Dateiliste ---------------
|
'-------- Speicher für Dateiliste ---------------
|
||||||
DIR_RAM = $69440 '....$6AFFF
|
DIR_RAM = $69440 '....$6AFFF
|
||||||
MOUSE_RAM = $69400 '....$6943F ' User-Mouse-Pointer 64byte
|
|
||||||
'-------- YMODEM Temp-Speicher ------------------
|
'-------- YMODEM Temp-Speicher ------------------
|
||||||
YMODEM_RAM= $7E400 '... $7E417 Name, der zu sendenden Datei, Was soll gemacht werden(0Empfang,1Senden)+Dirmarker
|
YMODEM_RAM= $7E400 '... $7E417 Name, der zu sendenden Datei, Was soll gemacht werden(0Empfang,1Senden)+Dirmarker
|
||||||
|
|
||||||
|
@ -89,19 +91,20 @@ obj gc:"glob-con"
|
||||||
VAR
|
VAR
|
||||||
'systemvariablen
|
'systemvariablen
|
||||||
byte font[25] 'Hilfsstring für Strings aus dem Ram
|
byte font[25] 'Hilfsstring für Strings aus dem Ram
|
||||||
byte colors[14]
|
byte colors[15]
|
||||||
long systemdir 'Systemverzeichnis-Marker
|
long systemdir 'Systemverzeichnis-Marker
|
||||||
|
|
||||||
dat
|
dat
|
||||||
ini byte "reg.ini",0 'Ini-Datei für Farbwerte, Dateiverknüpfungen und Systemeinstellungen
|
ini byte "reg.ini",0 'Ini-Datei für Farbwerte, Dateiverknüpfungen und Systemeinstellungen
|
||||||
errortxt byte "reg.err",0
|
errortxt byte "reg.err",0
|
||||||
' Trash byte "TRASH ",0
|
' Trash byte "TRASH ",0
|
||||||
video_inf byte "VIDEO.NFO",0
|
video_inf byte "VIDEO.NFO",0 'Grafikinfo
|
||||||
prg_inf byte "prg.nfo",0
|
prg_inf byte "prg.nfo",0 'Programminfo
|
||||||
sound_nfo byte "sound.nfo",0
|
sound_nfo byte "sound.nfo",0 'Soundinfo
|
||||||
plexus byte "plexus.dll",0
|
dll_lst byte "dll.lst",0 'Dll-Namensliste
|
||||||
|
plexus byte "plexus.dll",0 'Plexus-Hauptprogramm
|
||||||
SYSTEM Byte "PLEXUS ",0 'Plexus-Systemverzeichnis
|
SYSTEM Byte "PLEXUS ",0 'Plexus-Systemverzeichnis
|
||||||
Version byte "Version 2.06",0
|
Version byte "Version 2.1",0
|
||||||
|
|
||||||
sysfont byte "reg.fnt",0
|
sysfont byte "reg.fnt",0
|
||||||
scrsaver byte "plexus.dat",0
|
scrsaver byte "plexus.dat",0
|
||||||
|
@ -110,40 +113,43 @@ dat
|
||||||
PUB main | i,a
|
PUB main | i,a
|
||||||
|
|
||||||
ios.start
|
ios.start
|
||||||
ios.sdmount 'sd-card mounten
|
ios.sdmount 'sd-card mounten
|
||||||
activate_dirmarker(0)
|
activate_dirmarker(0)
|
||||||
ios.sdchdir(@system) 'in's System-Verzeichnis springen
|
ios.sdchdir(@system) 'in's System-Verzeichnis springen
|
||||||
systemdir:=get_dirmarker 'System-Dirmarker lesen
|
systemdir:=get_dirmarker 'System-Dirmarker lesen
|
||||||
'activate_dirmarker(0)
|
'activate_dirmarker(0)
|
||||||
|
|
||||||
if ios.admgetspec<>ADM_SPEC
|
if ios.admgetspec<>ADM_SPEC
|
||||||
ios.admload(string("plexus.adm")) 'Administracode laden
|
ios.admload(string("plexus.adm")) 'Administracode laden
|
||||||
|
|
||||||
activate_dirmarker(systemdir) 'nach dem Neustart von Administra wieder ins Systemverzeichnis springen
|
activate_dirmarker(systemdir) 'nach dem Neustart von Administra wieder ins Systemverzeichnis springen
|
||||||
|
|
||||||
if ios.bel_get<>88
|
if ios.bel_get<>88
|
||||||
ios.belload(string("plexus.bel")) 'Bellatrixcode laden
|
ios.belload(string("plexus.bel")) 'Bellatrixcode laden
|
||||||
|
|
||||||
|
|
||||||
ios.ram_fill(DIR_RAM,$1BFF,0) 'Dir-Speicher löschen
|
ios.ram_fill(DIR_RAM,$1BFF,0) 'Dir-Speicher löschen
|
||||||
ios.ram_fill(DMP_RAM,$1FFF,0) 'Dmp-File-Speicher löschen
|
ios.ram_fill(DMP_RAM,$1FFF,0) 'Dmp-File-Speicher löschen
|
||||||
ios.ram_fill(TXT_RAM,$2000,0) 'Error-Text-Speicher löschen
|
ios.ram_fill(TXT_RAM,$2000,0) 'Error-Text-Speicher löschen
|
||||||
ios.ram_fill(LINK_RAM,$ff,0) 'Link-Speicher löschen
|
ios.ram_fill(LINK_RAM,$ff,0) 'Link-Speicher löschen
|
||||||
ios.ram_fill(MENU_RAM,$500,0) 'Menue-Text-Speicher löschen
|
ios.ram_fill(MENU_RAM,$500,0) 'Menue-Text-Speicher löschen
|
||||||
ios.ram_fill(YMODEM_RAM,$30,0) 'YMODEM-RAM löschen
|
ios.ram_fill(dll_RAM,$300,0) 'Dll-Namen löschen
|
||||||
|
ios.ram_fill(YMODEM_RAM,$30,0) 'YMODEM-RAM löschen
|
||||||
'--------------------------------------------------------------------------------------
|
'--------------------------------------------------------------------------------------
|
||||||
activate_dirmarker(systemdir) 'nach dem Neustart von Administra wieder ins Systemverzeichnis springen
|
activate_dirmarker(systemdir) 'nach dem Neustart von Administra wieder ins Systemverzeichnis springen
|
||||||
|
|
||||||
ios.sdopen("R",@errortxt)
|
ios.sdopen("R",@errortxt)
|
||||||
fileload_err(TXT_RAM) 'Fehler-Texte laden
|
fileload_err(TXT_RAM,25) 'Fehler-Texte laden
|
||||||
ios.sdopen("R",@video_inf)
|
ios.sdopen("R",@video_inf)
|
||||||
fileload(vidnfo) 'Video-Info laden
|
fileload(vidnfo) 'Video-Info laden
|
||||||
ios.sdopen("R",@sound_nfo)
|
ios.sdopen("R",@sound_nfo)
|
||||||
fileload(sndnfo) 'Sound-Info laden
|
fileload(sndnfo) 'Sound-Info laden
|
||||||
ios.sdopen("R",@prg_inf)
|
ios.sdopen("R",@prg_inf)
|
||||||
fileload(prgnfo) 'Programm-Info laden
|
fileload(prgnfo) 'Programm-Info laden
|
||||||
|
ios.sdopen("R",@dll_lst)
|
||||||
|
fileload_err(DLL_RAM,16) 'dll-namen laden
|
||||||
'***************** Initialisierung ohne Ini-Datei ****************************
|
'***************** Initialisierung ohne Ini-Datei ****************************
|
||||||
if iniload 'wenn keine Ini da ist, standardwerte setzen
|
if iniload 'wenn keine Ini da ist, standardwerte setzen
|
||||||
colors[0]:=light_blue
|
colors[0]:=light_blue
|
||||||
colors[1]:=white
|
colors[1]:=white
|
||||||
colors[2]:=light_blue
|
colors[2]:=light_blue
|
||||||
|
@ -202,7 +208,7 @@ PUB main | i,a
|
||||||
ios.setpos(21,12)
|
ios.setpos(21,12)
|
||||||
ios.print(string("for Hive-Computer"))
|
ios.print(string("for Hive-Computer"))
|
||||||
ios.printBoxcolor(0,orange,light_red,95)
|
ios.printBoxcolor(0,orange,light_red,95)
|
||||||
ios.setpos(24,14)
|
ios.setpos(24,15)
|
||||||
ios.print(@version)
|
ios.print(@version)
|
||||||
ios.printBoxcolor(0,orange,light_orange,95)
|
ios.printBoxcolor(0,orange,light_orange,95)
|
||||||
|
|
||||||
|
@ -214,7 +220,7 @@ PUB main | i,a
|
||||||
|
|
||||||
ios.sdopen("R",@plexus) 'Plexus.Dll öffnen
|
ios.sdopen("R",@plexus) 'Plexus.Dll öffnen
|
||||||
ios.ldbin(@plexus) 'Plexus laden
|
ios.ldbin(@plexus) 'Plexus laden
|
||||||
ios.stop
|
|
||||||
{
|
{
|
||||||
#$FC, Light_Grey, #$A8, Grey, #$54, Dark_Grey
|
#$FC, Light_Grey, #$A8, Grey, #$54, Dark_Grey
|
||||||
#$C0, Light_Red, #$80, Red, #$40, Dark_Red
|
#$C0, Light_Red, #$80, Red, #$40, Dark_Red
|
||||||
|
@ -233,7 +239,7 @@ PRI fileload(adr)|cont
|
||||||
ios.sdxgetblk(adr,cont)
|
ios.sdxgetblk(adr,cont)
|
||||||
ios.sdclose
|
ios.sdclose
|
||||||
|
|
||||||
PRI fileload_err(adr)| cont,c,b,a,i
|
PRI fileload_err(adr,st)| cont,c,b,a,i
|
||||||
i:=adr
|
i:=adr
|
||||||
|
|
||||||
b:=0
|
b:=0
|
||||||
|
@ -242,7 +248,7 @@ PRI fileload_err(adr)| cont,c,b,a,i
|
||||||
|
|
||||||
if a==$0A
|
if a==$0A
|
||||||
b++
|
b++
|
||||||
i:=adr+(25*b)
|
i:=adr+(st*b)
|
||||||
next
|
next
|
||||||
else
|
else
|
||||||
ios.ram_wrbyte(a,i++)
|
ios.ram_wrbyte(a,i++)
|
||||||
|
@ -303,6 +309,8 @@ PRI iniload:err|i,tmp
|
||||||
ios.ram_wrbyte(ios.sdgetc,tmp++)
|
ios.ram_wrbyte(ios.sdgetc,tmp++)
|
||||||
'---- HC05-Bluetooth-Modul -------------------------
|
'---- HC05-Bluetooth-Modul -------------------------
|
||||||
ios.ram_wrbyte(ios.sdgetc,tmp++)
|
ios.ram_wrbyte(ios.sdgetc,tmp++)
|
||||||
|
'---- Extended Titlebar-Anzeige --------------------
|
||||||
|
ios.ram_wrbyte(ios.sdgetc,tmp++)
|
||||||
|
|
||||||
ios.sdclose
|
ios.sdclose
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,66 @@
|
||||||
|
{{
|
||||||
|
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
│ Autor: Reinhard Zielinski │
|
||||||
|
│ Copyright (c) 2013 Reinhard Zielinski │
|
||||||
|
│ See end of file for terms of use. │
|
||||||
|
│ Die Nutzungsbedingungen befinden sich am Ende der Datei │
|
||||||
|
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||||
|
|
||||||
|
Informationen : hive-project.de
|
||||||
|
Kontakt : zille09@gmail.com
|
||||||
|
System : TriOS
|
||||||
|
Name : PLEXUS - Zentrale Kommunikationseinheit der Borg
|
||||||
|
Chip : Regnatix
|
||||||
|
Typ : Programm
|
||||||
|
Version : 01
|
||||||
|
Subversion : 00
|
||||||
|
|
||||||
|
Funktion : "Programm schaltet von TRIOS zu Plexus um
|
||||||
|
|
||||||
|
Logbuch :
|
||||||
|
################################################### Version 1.00 ################################################################################################################
|
||||||
|
}}
|
||||||
|
OBJ
|
||||||
|
ios: "reg-ios"
|
||||||
|
|
||||||
|
CON
|
||||||
|
|
||||||
|
_CLKMODE = XTAL1 + PLL16X
|
||||||
|
_XINFREQ = 5_000_000
|
||||||
|
|
||||||
|
VAR
|
||||||
|
'----------- Verzeichnismarker --------------------------------
|
||||||
|
long rootdir 'root-Dirmarker
|
||||||
|
long systemdir 'system-Dirmarker
|
||||||
|
|
||||||
|
DAT
|
||||||
|
sys_file byte "reg.sys",0 'Plexus oder Trios-Startdatei
|
||||||
|
sys_tmp byte "reg.tmp",0 'temporäre Plexus-Startdatei
|
||||||
|
sys_trs byte "reg.trs",0 'temporäre TRIOS-Startdatei
|
||||||
|
|
||||||
|
PUB Main|e,err
|
||||||
|
|
||||||
|
activate_dirmarker(0)
|
||||||
|
ios.sdrename(@sys_file,@sys_trs)
|
||||||
|
e:=ios.os_error(ios.sdrename(@sys_tmp,@sys_file))
|
||||||
|
if e 'keine TRIOS-Startdatei vorhanden
|
||||||
|
ios.sdrename(@sys_trs,@sys_file) 'Tmp-Datei zurück in Sys
|
||||||
|
else
|
||||||
|
ios.admreset 'alle chips resetten
|
||||||
|
ios.belreset
|
||||||
|
|
||||||
|
waitcnt(cnt+clkfreq*3)
|
||||||
|
reboot
|
||||||
|
|
||||||
|
|
||||||
|
PRI activate_dirmarker(mark) 'USER-Marker setzen
|
||||||
|
|
||||||
|
ios.sddmput(ios#DM_USER,mark) 'usermarker wieder in administra setzen
|
||||||
|
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
|
||||||
|
|
||||||
|
PRI get_dirmarker:dm 'USER-Marker lesen
|
||||||
|
|
||||||
|
ios.sddmset(ios#DM_USER)
|
||||||
|
dm:=ios.sddmget(ios#DM_USER)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
'' ===========================================================================
|
||||||
|
'' VGA High-Res Text UI Elements Base UI Support Functions v1.2
|
||||||
|
''
|
||||||
|
'' FILE: Timer.spin
|
||||||
|
'' Author: Allen Marincak
|
||||||
|
'' Copyright (c) 2009 Allen MArincak
|
||||||
|
'' See end of file for terms of use
|
||||||
|
'' ===========================================================================
|
||||||
|
''
|
||||||
|
'' ============================================================================
|
||||||
|
'' Timer function
|
||||||
|
'' ============================================================================
|
||||||
|
''
|
||||||
|
'' Starts a new cog to provide timing functionality.
|
||||||
|
''
|
||||||
|
'' There are 8 timers available, the code running on the new cog simply
|
||||||
|
'' decrements each timer value at the rate specified in the start() call.
|
||||||
|
''
|
||||||
|
'' Only the first object to create this needs to call the START method. That
|
||||||
|
'' will launch it on a new COG, other objects can reference it in the OBJ
|
||||||
|
'' section but do not need to start it, just call the public methods.
|
||||||
|
'' ============================================================================
|
||||||
|
|
||||||
|
_CLKMODE = XTAL1 + PLL16X
|
||||||
|
_XINFREQ = 5_000_000
|
||||||
|
|
||||||
|
DAT
|
||||||
|
' stack size determined StackLengthAJM.spin
|
||||||
|
cog long 0 'cog execute is running on
|
||||||
|
stack long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
timers long 0,0,0,0,0,0,0,0,0,0,0,0 'timer values (16 bit)
|
||||||
|
|
||||||
|
|
||||||
|
PUB start( period ) : okay1|okay2
|
||||||
|
''
|
||||||
|
'' Launches TIMER TASK on new cog, returns 0 on error, else the cog that was
|
||||||
|
'' started up.
|
||||||
|
'' - period is the fractional part of a second to operate at
|
||||||
|
'' example: 10 = 1/10th of a second
|
||||||
|
'' 30 = 1/30th of a second
|
||||||
|
'' 100 = 1/100th of a second
|
||||||
|
|
||||||
|
longfill( @timers, 0, 12 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cog := cognew( execute( period, @timers ), @stack ) + 1
|
||||||
|
okay1 := cog
|
||||||
|
|
||||||
|
Pub Stop
|
||||||
|
if Cog==-1
|
||||||
|
return
|
||||||
|
cogstop(Cog)
|
||||||
|
Cog:=-1
|
||||||
|
|
||||||
|
PUB set( tmrid, val )
|
||||||
|
'' Sets a registered timer with a 16 bit value.
|
||||||
|
|
||||||
|
timers[tmrid] := val
|
||||||
|
|
||||||
|
|
||||||
|
PUB isClr( tmrid ): clr
|
||||||
|
'' Checks the status of the registered timer.
|
||||||
|
'' returns 1 if it has expired (zeroed)
|
||||||
|
'' 0 if is still running
|
||||||
|
|
||||||
|
if timers[tmrid] == 0
|
||||||
|
clr:= 1
|
||||||
|
|
||||||
|
PUB read( tmrid )
|
||||||
|
'' returns the current count of a registered timer.
|
||||||
|
|
||||||
|
return timers[tmrid]
|
||||||
|
|
||||||
|
PRI execute( period, ptr_tmrs ) | idx
|
||||||
|
'' new cog executes this, it just decrements the timers
|
||||||
|
' __________________ Korrekturwert
|
||||||
|
repeat '|
|
||||||
|
waitcnt( cnt + clkfreq / (period))' + 655))
|
||||||
|
repeat idx from 0 to 11
|
||||||
|
if idx<8
|
||||||
|
if long[ptr_tmrs][idx] <> 0
|
||||||
|
long[ptr_tmrs][idx] -= 1
|
||||||
|
else
|
||||||
|
long[ptr_tmrs][idx]+=1
|
||||||
|
|
||||||
|
|
||||||
|
{{
|
||||||
|
┌────────────────────────────────────────────────────────────────────────────┐
|
||||||
|
│ TERMS OF USE: MIT License │
|
||||||
|
├────────────────────────────────────────────────────────────────────────────┤
|
||||||
|
│Permission is hereby granted, free of charge, to any person obtaining a copy│
|
||||||
|
│of this software and associated documentation files (the "Software"), to │
|
||||||
|
│deal in the Software without restriction, including without limitation the │
|
||||||
|
│rights to use, copy, modify, merge, publish, distribute, sublicense, and/or │
|
||||||
|
│sell copies of the Software, and to permit persons to whom the Software is │
|
||||||
|
│furnished to do so, subject to the following conditions: │
|
||||||
|
│ │
|
||||||
|
│The above copyright notice and this permission notice shall be included in │
|
||||||
|
│all copies or substantial portions of the Software. │
|
||||||
|
│ │
|
||||||
|
│THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR │
|
||||||
|
│IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, │
|
||||||
|
│FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE │
|
||||||
|
│AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER │
|
||||||
|
│LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING │
|
||||||
|
│FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS│
|
||||||
|
│IN THE SOFTWARE. │
|
||||||
|
└────────────────────────────────────────────────────────────────────────────┘
|
||||||
|
}}
|
|
@ -1,252 +0,0 @@
|
||||||
{{
|
|
||||||
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
||||||
│ Autor: Ingo Kripahle Anpassungen:Reinhard Zielinski │
|
|
||||||
│ Copyright (c) 2013 Ingo Kripahle │
|
|
||||||
│ See end of file for terms of use. │
|
|
||||||
│ Die Nutzungsbedingungen befinden sich am Ende der Datei │
|
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
||||||
|
|
||||||
Informationen : hive-project.de
|
|
||||||
Kontakt : zille9@googlemail.com
|
|
||||||
System : Hive
|
|
||||||
Name : Bus-Erweiterung für Hive-Computer
|
|
||||||
Chip : Venatrix-Bus-Protokoll
|
|
||||||
Typ : EEProm-Urfile
|
|
||||||
Version : 00
|
|
||||||
Subversion : 01
|
|
||||||
Funktion : Bus-System für Erweiterungsmodule
|
|
||||||
|
|
||||||
Der integrierte Loader kann Venatrix mit einem beliebigen Code versorgen
|
|
||||||
|
|
||||||
|
|
||||||
COG's : MANAGMENT 1 COG
|
|
||||||
-------------------
|
|
||||||
1 COG
|
|
||||||
|
|
||||||
}}
|
|
||||||
CON
|
|
||||||
_CLKMODE = XTAL1 + PLL16X
|
|
||||||
_XINFREQ = 5_000_000
|
|
||||||
|
|
||||||
' /cs --------+
|
|
||||||
' clk -------+|
|
|
||||||
' /wr ------+||
|
|
||||||
' /hs -----+||| +------------------------- /cs ->bei Venatrix P24 statt P23
|
|
||||||
' |||| | -------- d0..d7
|
|
||||||
DB_IN = %00001000_00000000_00000000_00000000 'maske: dbus-eingabe
|
|
||||||
DB_OUT = %00001000_00000000_00000000_11111111 'maske: dbus-ausgabe
|
|
||||||
|
|
||||||
M1 = %00000010_00000000_00000000_00000000 'busclk=1? & /cs=0?
|
|
||||||
M2 = %00000011_00000000_00000000_00000000 'maske: busclk & /cs (/prop4)
|
|
||||||
|
|
||||||
M3 = %00000000_00000000_00000000_00000000 'busclk=0?
|
|
||||||
M4 = %00000010_00000000_00000000_00000000 'maske busclk
|
|
||||||
|
|
||||||
|
|
||||||
#24, BUS_CS 'Chip-Select
|
|
||||||
BUSCLK 'bustakt
|
|
||||||
BUS_WR '/wr - schreibsignal
|
|
||||||
BUS_HS ' '/hs - quittungssignal
|
|
||||||
|
|
||||||
STRCOUNT =64 'Größe des Stringpuffers
|
|
||||||
|
|
||||||
Var
|
|
||||||
byte proghdr[16] 'puffer für objektkopf
|
|
||||||
long plen 'länge datenblock loader
|
|
||||||
byte strpuffer[STRCOUNT] 'stringpuffer
|
|
||||||
|
|
||||||
PUB bus_init 'bus: initialisiert bussystem
|
|
||||||
{{bus_init - bus: initialisierung aller bussignale }}
|
|
||||||
|
|
||||||
dira:= db_in ' datenbus auf eingabe schalten
|
|
||||||
outa[bus_hs] := 1 ' handshake inaktiv ,frida
|
|
||||||
'outa[23..8] := 0 ' Port 2 und 3 Null setzen
|
|
||||||
|
|
||||||
PUB bus_putchar(zeichen) 'chip: ein byte über bus ausgeben
|
|
||||||
''funktionsgruppe : chip
|
|
||||||
''funktion : senderoutine für ein byte zu regnatix über den systembus
|
|
||||||
''eingabe : byte zeichen
|
|
||||||
''ausgabe : -
|
|
||||||
|
|
||||||
waitpeq(M1,M2,0) 'busclk=1? & /prop1=0?
|
|
||||||
dira := db_out 'datenbus auf ausgabe stellen
|
|
||||||
outa[7..0] := zeichen 'daten ausgeben
|
|
||||||
outa[bus_hs] := 0 'daten gültig
|
|
||||||
waitpeq(M3,M4,0) 'busclk=0?
|
|
||||||
dira := db_in
|
|
||||||
outa[bus_hs] := 1 'daten ungültig
|
|
||||||
|
|
||||||
PUB bus_getchar : zeichen 'chip: ein byte über bus empfangen
|
|
||||||
''funktionsgruppe : chip
|
|
||||||
''funktion : emfangsroutine für ein byte von regnatix über den systembus
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : byte zeichen
|
|
||||||
waitpeq(M1,M2,0) 'busclk=1? & prop4=0?
|
|
||||||
zeichen := ina[7..0] 'daten einlesen
|
|
||||||
outa[bus_hs] := 0 'daten quittieren
|
|
||||||
waitpeq(M3,M4,0) 'busclk=0?
|
|
||||||
outa[bus_hs] := 1
|
|
||||||
|
|
||||||
PUB bus_putstr(stradr) | len,i 'bus: string zu administra senden
|
|
||||||
|
|
||||||
len := strsize(stradr)
|
|
||||||
bus_putchar(len)
|
|
||||||
repeat i from 0 to len - 1
|
|
||||||
bus_putchar(byte[stradr++])
|
|
||||||
|
|
||||||
PUB bus_getstr: stradr | len,i 'bus: string von administra empfangen
|
|
||||||
|
|
||||||
len := bus_getchar 'längenbyte empfangen
|
|
||||||
repeat i from 0 to len - 1 '20 zeichen dateinamen empfangen
|
|
||||||
strpuffer[i] := bus_getchar
|
|
||||||
strpuffer[i] := 0
|
|
||||||
return @strpuffer
|
|
||||||
|
|
||||||
PUB bus_getword: wert 'bus: 16 bit von bellatrix empfangen hsb/lsb
|
|
||||||
|
|
||||||
wert := bus_getchar << 8
|
|
||||||
wert := wert + bus_getchar
|
|
||||||
|
|
||||||
PUB bus_putword(wert) 'bus: 16 bit an bellatrix senden hsb/lsb
|
|
||||||
|
|
||||||
bus_putchar(wert >> 8)
|
|
||||||
bus_putchar(wert)
|
|
||||||
|
|
||||||
PUB bus_getlong: wert 'bus: long von bellatrix empfangen hsb/lsb
|
|
||||||
|
|
||||||
wert := bus_getchar << 24 '32 bit empfangen hsb/lsb
|
|
||||||
wert := wert + bus_getchar << 16
|
|
||||||
wert := wert + bus_getchar << 8
|
|
||||||
wert := wert + bus_getchar
|
|
||||||
|
|
||||||
PUB bus_putlong(wert) 'bus: long an bellatrix senden hsb/lsb
|
|
||||||
|
|
||||||
bus_putchar(wert >> 24) '32bit wert senden hsb/lsb
|
|
||||||
bus_putchar(wert >> 16)
|
|
||||||
bus_putchar(wert >> 8)
|
|
||||||
bus_putchar(wert)
|
|
||||||
|
|
||||||
con'------------------------------------------------ Chiploader -------------------------------------------------------------------------------------------------------------------
|
|
||||||
PUB mgr_getcogs: cogs |i,c,cog[8] 'cmgr: abfragen wie viele cogs in benutzung sind
|
|
||||||
''funktionsgruppe : cmgr
|
|
||||||
''funktion : abfrage wie viele cogs in benutzung sind
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : cogs - anzahl der cogs
|
|
||||||
''busprotokoll : [097][put.cogs]
|
|
||||||
'' : cogs - anzahl der belegten cogs
|
|
||||||
|
|
||||||
cogs := i := 0
|
|
||||||
repeat 'loads as many cogs as possible and stores their cog numbers
|
|
||||||
c := cog[i] := cognew(@entry, 0)
|
|
||||||
if c=>0
|
|
||||||
i++
|
|
||||||
while c => 0
|
|
||||||
cogs := i
|
|
||||||
repeat 'unloads the cogs and updates the string
|
|
||||||
i--
|
|
||||||
if i=>0
|
|
||||||
cogstop(cog[i])
|
|
||||||
while i=>0
|
|
||||||
|
|
||||||
|
|
||||||
PUB mgr_load|i 'cmgr: venatrix-loader
|
|
||||||
''funktionsgruppe : cmgr
|
|
||||||
''funktion : funktion um einen neuen code in bellatrix zu laden
|
|
||||||
''
|
|
||||||
|
|
||||||
' kopf der bin-datei einlesen ------------------------------------------------------
|
|
||||||
repeat i from 0 to 15 '16 bytes --> proghdr
|
|
||||||
byte[@proghdr][i] := bus_getchar
|
|
||||||
|
|
||||||
plen := 0
|
|
||||||
plen := byte[@proghdr + $0B] << 8
|
|
||||||
plen := plen + byte[@proghdr + $0A]
|
|
||||||
plen := plen - 8
|
|
||||||
|
|
||||||
' objektlänge an regnatix senden
|
|
||||||
bus_putchar(plen >> 8) 'hsb senden
|
|
||||||
bus_putchar(plen & $FF) 'lsb senden
|
|
||||||
|
|
||||||
repeat i from 0 to 7 'alle anderen cogs anhalten
|
|
||||||
ifnot i == cogid
|
|
||||||
cogstop(i)
|
|
||||||
|
|
||||||
dira := 0 'diese cog vom bus trennen
|
|
||||||
cognew(@loader, plen)
|
|
||||||
|
|
||||||
cogstop(cogid) 'cog 0 anhalten
|
|
||||||
|
|
||||||
DAT
|
|
||||||
org 0
|
|
||||||
|
|
||||||
loader
|
|
||||||
mov outa, M_0 'bus inaktiv
|
|
||||||
mov dira, DINP 'bus auf eingabe schalten
|
|
||||||
mov reg_a, PAR 'parameter = plen
|
|
||||||
mov reg_b, #0 'adresse ab 0
|
|
||||||
|
|
||||||
' datenblock empfangen
|
|
||||||
loop
|
|
||||||
call #get 'wert einlesen
|
|
||||||
wrbyte in, reg_b 'wert --> hubram
|
|
||||||
add reg_b, #1 'adresse + 1
|
|
||||||
djnz reg_a, #loop
|
|
||||||
|
|
||||||
' neuen code starten
|
|
||||||
|
|
||||||
rdword reg_a, #$A ' Setup the stack markers.
|
|
||||||
sub reg_a, #4 '
|
|
||||||
wrlong SMARK, reg_a '
|
|
||||||
sub reg_a, #4 '
|
|
||||||
wrlong SMARK, reg_a '
|
|
||||||
|
|
||||||
rdbyte reg_a, #$4 ' Switch to new clock mode.
|
|
||||||
clkset reg_a '
|
|
||||||
|
|
||||||
coginit SINT ' Restart running new code.
|
|
||||||
|
|
||||||
|
|
||||||
cogid reg_a
|
|
||||||
cogstop reg_a 'cog hält sich selbst an
|
|
||||||
|
|
||||||
|
|
||||||
get
|
|
||||||
waitpeq M_1, M_2 'busclk=1? & /cs=0?
|
|
||||||
mov in, ina 'daten einlesen
|
|
||||||
and in, DMASK 'wert maskieren
|
|
||||||
mov outa, M_3 'hs=0
|
|
||||||
waitpeq M_3, M_4 'busclk=0?
|
|
||||||
mov outa, M_0 'hs=1
|
|
||||||
get_ret ret
|
|
||||||
|
|
||||||
|
|
||||||
' /cs --------+
|
|
||||||
' clk -------+|
|
|
||||||
' /wr ------+||
|
|
||||||
' /hs -----+|||+------------------------- /cs ->geändert auf 24
|
|
||||||
' ||||| -------- d0..d7
|
|
||||||
DINP long %00001000000000000000000000000000 'constant dinp hex \ bus input
|
|
||||||
DOUT long %00001000000000000000000011111111 'constant dout hex \ bus output
|
|
||||||
|
|
||||||
M_0 long %00001000000000000000000000000000 'bus inaktiv
|
|
||||||
|
|
||||||
M_1 long %00000010000000000000000000000000
|
|
||||||
M_2 long %00000011000000000000000000000000 'busclk=1? & /cs=0?
|
|
||||||
|
|
||||||
M_3 long %00000000000000000000000000000000
|
|
||||||
M_4 long %00000010000000000000000000000000 'busclk=0?
|
|
||||||
|
|
||||||
|
|
||||||
DMASK long %00000000000000000000000011111111 'datenmaske
|
|
||||||
|
|
||||||
SINT long ($0001 << 18) | ($3C01 << 4) ' Spin interpreter boot information.
|
|
||||||
SMARK long $FFF9FFFF ' Stack mark used for spin code.
|
|
||||||
|
|
||||||
in res 1
|
|
||||||
reg_a res 1
|
|
||||||
reg_b res 1
|
|
||||||
Dat
|
|
||||||
|
|
||||||
' Entry: dummy-assemblercode fuer cogtest
|
|
||||||
'
|
|
||||||
entry jmp entry 'just loops
|
|
|
@ -329,7 +329,7 @@ PRI time|s 'Zeitanzeige in der Statusleiste
|
||||||
if timezaehler>150
|
if timezaehler>150
|
||||||
timezaehler:=0
|
timezaehler:=0
|
||||||
s:=ios.getminutes
|
s:=ios.getminutes
|
||||||
Status_extern(ios.dcf_sync,dcf_on,170,27,0,colors[titeltextcol],black) 'Anzeige des aktuellen Status in der Titelzeile
|
Status_extern(ios.dcf_sync,dcf_on,170,34,29,green,black) 'Anzeige des aktuellen Status in der Titelzeile
|
||||||
if s<>tmptime
|
if s<>tmptime
|
||||||
displaytime
|
displaytime
|
||||||
|
|
||||||
|
@ -338,10 +338,10 @@ PRI displaytime|h,m
|
||||||
h:=ios.gethours
|
h:=ios.gethours
|
||||||
m:=ios.getminutes
|
m:=ios.getminutes
|
||||||
|
|
||||||
print_zehner(h,29,34,colors[hcolstatus],colors[statustextcol])
|
print_zehner(h,29,35,colors[hcolstatus],colors[statustextcol])
|
||||||
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,36)
|
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,37)
|
||||||
|
|
||||||
print_zehner(m,29,37,colors[hcolstatus],colors[statustextcol])
|
print_zehner(m,29,38,colors[hcolstatus],colors[statustextcol])
|
||||||
tmptime:=m
|
tmptime:=m
|
||||||
date
|
date
|
||||||
|
|
||||||
|
@ -364,12 +364,12 @@ pri print_zehner(wert,y,x,hin,vor)|a
|
||||||
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
||||||
|
|
||||||
if wert1==1
|
if wert1==1
|
||||||
ios.displaytile(tnr_act,colors[Titelhcol],col,f3,y,x) 'Status ok-anzeigen
|
ios.displaytile(tnr_act,colors[hcolstatus],col,f3,y,x) 'Status ok-anzeigen
|
||||||
else
|
else
|
||||||
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
||||||
ios.displaytile(tnr_act,colors[titelhcol],grey,0,y,x) 'Symbol grau
|
ios.displaytile(tnr_act,colors[hcolstatus],grey,0,y,x) 'Symbol grau
|
||||||
else
|
else
|
||||||
ios.displaytile(16,colors[Titelhcol],colors[titeltextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
ios.displaytile(16,colors[hcolstatus],colors[statustextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
||||||
'printdec(dcf_on,1,1,colors[winhcol],colors[act_color])
|
'printdec(dcf_on,1,1,colors[winhcol],colors[act_color])
|
||||||
con'
|
con'
|
||||||
PRI doppelklick:click 'pseudo-doppelklick
|
PRI doppelklick:click 'pseudo-doppelklick
|
||||||
|
@ -431,6 +431,8 @@ PRI printfont(str1,a,b,c,d,e)|f
|
||||||
|
|
||||||
repeat strsize(str1)
|
repeat strsize(str1)
|
||||||
f:= byte[str1++]
|
f:= byte[str1++]
|
||||||
|
if f >96
|
||||||
|
f^=32
|
||||||
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
||||||
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
||||||
d:=0
|
d:=0
|
||||||
|
@ -461,12 +463,14 @@ con '************************************************** Button-Funktionen ******
|
||||||
|
|
||||||
PRI buttonpress(n)
|
PRI buttonpress(n)
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),250,0,0,0,29)
|
1:printfont(string("Start "),250,0,0,0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],250,colors[shellhcol],29,7)
|
||||||
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
||||||
|
|
||||||
Mouse_Release
|
Mouse_Release
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),colors[hcolstatus],0,colors[statustextcol],0,29)
|
1:printfont(string("Start "),colors[hcolstatus],0,colors[statustextcol],0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],colors[hcolstatus],colors[shellhcol],29,7)
|
||||||
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,452 +0,0 @@
|
||||||
{{
|
|
||||||
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
|
|
||||||
│ Autor: Reinhard Zielinski -> Original-Code: Ingo Kripahle │
|
|
||||||
│ Copyright (c) 2013 Ingo Kripahle │
|
|
||||||
│ See end of file for terms of use. │
|
|
||||||
│ Die Nutzungsbedingungen befinden sich am Ende der Datei │
|
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
|
||||||
|
|
||||||
Informationen : hive-project.de
|
|
||||||
Kontakt : zille9@googlemail.com
|
|
||||||
System : Hive
|
|
||||||
Name : Bus-Erweiterung für Hive-Computer
|
|
||||||
Chip : Venatrix
|
|
||||||
Typ : Treiber
|
|
||||||
Version : 01
|
|
||||||
Subversion : 00
|
|
||||||
Funktion : Bus-System für Erweiterungsmodule
|
|
||||||
|
|
||||||
Der integrierte Loader kann Venatrix mit einem beliebigen Code versorgen
|
|
||||||
|
|
||||||
20-11-2013 -I2C-Slave Funktion hinzugefügt, damit die Bus-Karte vom Hive (Plexus) erkannt werden kann (Adresse 5)
|
|
||||||
|
|
||||||
22-03-2014 -HC05-Bluetoothmodul-Statuspin-Abfrage an Portpin 16 hinzugefügt
|
|
||||||
-IP-Stack von Joerg angefangen zu integrieren
|
|
||||||
-
|
|
||||||
COG's : MANAGMENT 1 COG
|
|
||||||
I2C-Slave 1 COG
|
|
||||||
IP-Stack 1 COG
|
|
||||||
-------------------
|
|
||||||
3 COG's
|
|
||||||
|
|
||||||
}}
|
|
||||||
CON
|
|
||||||
_CLKMODE = XTAL1 + PLL16X
|
|
||||||
_XINFREQ = 5_000_000
|
|
||||||
Treiberversion= %00010001
|
|
||||||
'Treiberdatum = 20122013
|
|
||||||
|
|
||||||
|
|
||||||
' /cs --------+
|
|
||||||
' clk -------+|
|
|
||||||
' /wr ------+||
|
|
||||||
' /hs -----+||| +------------------------- /cs ->bei Venatrix P24 statt P23
|
|
||||||
' |||| | -------- d0..d7
|
|
||||||
DB_IN = %00001000_00000000_00000000_00000000 'maske: dbus-eingabe
|
|
||||||
DB_OUT = %00001000_00000000_00000000_11111111 'maske: dbus-ausgabe
|
|
||||||
|
|
||||||
M1 = %00000010_00000000_00000000_00000000 'busclk=1? & /cs=0?
|
|
||||||
M2 = %00000011_00000000_00000000_00000000 'maske: busclk & /cs (/prop4)
|
|
||||||
|
|
||||||
M3 = %00000000_00000000_00000000_00000000 'busclk=0?
|
|
||||||
M4 = %00000010_00000000_00000000_00000000 'maske busclk
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#0, D0,D1,D2,D3,D4,D5,D6,D7 'datenbus (Port A)
|
|
||||||
#8, B0,B1,B2,B3,B4,B5,B6,B7 'Port B
|
|
||||||
#16, C0,C1,C2,C3,C4,C5,C6,C7 'Port C
|
|
||||||
#24, BUS_CS 'Chip-Select
|
|
||||||
BUSCLK 'bustakt
|
|
||||||
BUS_WR '/wr - schreibsignal
|
|
||||||
BUS_HS ' '/hs - quittungssignal
|
|
||||||
|
|
||||||
SDA_PIN = 29
|
|
||||||
SCL_PIN = 28
|
|
||||||
'Netzwerk-Puffergrößen (müssen Vielfaches von 2 sein!)
|
|
||||||
rxlen = 2048
|
|
||||||
txlen = 128
|
|
||||||
CON 'Signaldefinitionen --------------------------------------------------------------------------
|
|
||||||
|
|
||||||
'signaldefinitionen administra (todo: nach glob-con.spin auslagern!!!)
|
|
||||||
|
|
||||||
'#20, A_NETCS,A_NETSCK,A_NETSI,A_NETSO 'Pins zum ENC28J60
|
|
||||||
|
|
||||||
CON 'NVRAM Konstanten --------------------------------------------------------------------------
|
|
||||||
|
|
||||||
' todo: nach glob-con.spin auslagern!!!
|
|
||||||
{
|
|
||||||
#4, NVRAM_IPADDR
|
|
||||||
#8, NVRAM_IPMASK
|
|
||||||
#12, NVRAM_IPGW
|
|
||||||
#16, NVRAM_IPDNS
|
|
||||||
#20, NVRAM_IPBOOT
|
|
||||||
#24, NVRAM_HIVE ' 4 Bytes
|
|
||||||
}
|
|
||||||
txpin = 9
|
|
||||||
rxpin = 8
|
|
||||||
Ack = 6
|
|
||||||
Error =15
|
|
||||||
obj
|
|
||||||
bus : "Venatrix-Bus" 'allgemeine Bus-Funktionen
|
|
||||||
i2c_slave: "i2c_slave_Venatrix"
|
|
||||||
' sock : "driver_socket" 'LAN
|
|
||||||
'gc : "glob-con" 'globale konstanten
|
|
||||||
' num : "glob-numbers" 'Number Engine
|
|
||||||
' ser : "FullDuplexSerialExtended"
|
|
||||||
|
|
||||||
Var
|
|
||||||
byte proghdr[16] 'puffer für objektkopf
|
|
||||||
long plen 'länge datenblock loader
|
|
||||||
' byte lan_started 'LAN gestartet?
|
|
||||||
' long sockhandle[sock#sNumSockets] 'Handle für mit sock.connect/sock.listen erstellten Socket
|
|
||||||
' byte bufidx[sock#sNumSockets] 'zum Handle-Index gehörender Puffer-abschnitt
|
|
||||||
'(zum Socket mit dem Handle 2 gehört der Pufferabschnitt aus bufidx[2])
|
|
||||||
' byte bufrx[rxlen*sock#sNumSockets] 'LAN Empfangspuffer
|
|
||||||
' byte buftx[txlen*sock#sNumSockets] 'LAN Sendepuffer
|
|
||||||
|
|
||||||
PUB main | zeichen,i 'chip: kommandointerpreter
|
|
||||||
''funktionsgruppe : chip
|
|
||||||
''funktion : kommandointerpreter
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
|
|
||||||
bus.bus_init
|
|
||||||
'LAN
|
|
||||||
' lan_started := false 'LAN noch nicht gestartet
|
|
||||||
i2c_Slave.Start( SCL_PIN, SDA_PIN, $5)
|
|
||||||
' ser.start(rxpin, txpin, 0, 9600)
|
|
||||||
|
|
||||||
repeat
|
|
||||||
zeichen := bus.bus_getchar 'kommandocode empfangen
|
|
||||||
'if zeichen
|
|
||||||
'else
|
|
||||||
' zeichen:=bus.bus_getchar
|
|
||||||
case zeichen
|
|
||||||
|
|
||||||
10: bus.bus_putchar(Port2_In) 'Sende Port-Zustand 2
|
|
||||||
20: bus.bus_putchar(Port3_In) 'Sende Portzustand 3
|
|
||||||
30: Port2_Out(bus.bus_getchar) 'Setze Port 2
|
|
||||||
40: Port3_Out(bus.bus_getchar) 'Setze Port 3
|
|
||||||
50: bus.bus_putchar(HC05_Status) 'Status des HC05-Bluetooth-Moduls
|
|
||||||
|
|
||||||
' ---------------------------------------------- LAN-FUNKTIONEN
|
|
||||||
{ 71: lan_start 'Start Network
|
|
||||||
72: lan_stop 'Stop Network
|
|
||||||
73: lan_connect 'ausgehende TCP-Verbindung öffnen
|
|
||||||
74: lan_listen 'auf eingehende TCP-Verbindung lauschen
|
|
||||||
75: lan_waitconntimeout 'bestimmte Zeit auf Verbindung warten
|
|
||||||
76: lan_close 'TCP-Verbindung schließen
|
|
||||||
77: lan_rxtime 'bestimmte Zeit warten auf Byte aus Empfangspuffer
|
|
||||||
78: lan_rxdata 'Daten aus Empfangspuffer lesen
|
|
||||||
79: lan_txdata 'Daten senden
|
|
||||||
80: lan_rxbyte 'wenn vorhanden, Byte aus Empfangspuffer lesen
|
|
||||||
81: lan_isconnected 'TRUE, wenn Socket verbunden, sonst FALSE
|
|
||||||
}
|
|
||||||
' ---------------------------------------------- CHIP-MANAGMENT
|
|
||||||
96: bus.bus_putchar(bus.mgr_getcogs) 'freie cogs abfragen
|
|
||||||
97: bus.mgr_load 'neuen Venatrix-code laden
|
|
||||||
98: bus.bus_putlong(Treiberversion) 'Rückgabe Testwert (Version des Venatrix-Treibers)
|
|
||||||
|
|
||||||
99: reboot 'Venatrix neu starten
|
|
||||||
|
|
||||||
pri Port2_In:c
|
|
||||||
|
|
||||||
dira[8..15]~
|
|
||||||
c:=ina[15..8]
|
|
||||||
dira:=db_in
|
|
||||||
|
|
||||||
pri Port3_In:c
|
|
||||||
dira[16..23]~
|
|
||||||
c:=ina[23..16]
|
|
||||||
dira:=db_in
|
|
||||||
|
|
||||||
pri Port2_Out(char)
|
|
||||||
|
|
||||||
dira[8..15]~~
|
|
||||||
outa[8..15]:=char
|
|
||||||
dira:=db_in
|
|
||||||
|
|
||||||
pri Port3_Out(char)
|
|
||||||
|
|
||||||
dira[16..23]~~
|
|
||||||
outa[16..23]:=char
|
|
||||||
dira:=db_in
|
|
||||||
|
|
||||||
pri HC05_Status:c 'Rueckgabewert des HC05-Statuspin
|
|
||||||
dira[16]~
|
|
||||||
c:=ina[16]
|
|
||||||
dira:=db_in
|
|
||||||
|
|
||||||
CON ''------------------------------------------------- LAN-FUNKTIONEN
|
|
||||||
|
|
||||||
{PRI lan_start | hiveid, hivestr, strpos, macpos, i, a
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : Netzwerk starten
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [071]
|
|
||||||
|
|
||||||
if (not lan_started)
|
|
||||||
|
|
||||||
'Pufferindex zurücksetzen
|
|
||||||
i := 0
|
|
||||||
repeat sock#sNumSockets
|
|
||||||
bufidx[i++] := $FF '0xFF: nicht zugewiesen
|
|
||||||
'######################### Das hier muss nach Administra ################################
|
|
||||||
get_ip 'diese funktionen ersetzen den auskommentierten Teil
|
|
||||||
hiveid:=bus.bus_putchar(72) 'in Administra hiveid ermitteln und übertragen
|
|
||||||
{
|
|
||||||
'IP-Parameter setzen
|
|
||||||
if probeRTC
|
|
||||||
repeat a from 0 to 15
|
|
||||||
ip_addr[a] := rtc.getNVSRAM(NVRAM_IPADDR+a) ' fill addresses
|
|
||||||
hiveid := rtc.getNVSRAM(NVRAM_HIVE)
|
|
||||||
hiveid += rtc.getNVSRAM(NVRAM_HIVE+1) << 8
|
|
||||||
hiveid += rtc.getNVSRAM(NVRAM_HIVE+2) << 16
|
|
||||||
hiveid += rtc.getNVSRAM(NVRAM_HIVE+3) << 24
|
|
||||||
else
|
|
||||||
dmarker[UMARKER] := sdfat.getDirCluster 'u-marker setzen
|
|
||||||
ifnot dmarker[SMARKER] == TRUE 's-marker aktivieren
|
|
||||||
sdfat.setDirCluster(dmarker[SMARKER])
|
|
||||||
ifnot \sdfat.openFile(@strNVRAMFile, "R")
|
|
||||||
\sdfat.setCharacterPosition(NVRAM_IPADDR)
|
|
||||||
repeat a from 0 to 15
|
|
||||||
ip_addr[a] := \sdfat.readCharacter 'fill addresses
|
|
||||||
\sdfat.setCharacterPosition(NVRAM_HIVE)
|
|
||||||
hiveid := \sdfat.readCharacter
|
|
||||||
hiveid += \sdfat.readCharacter << 8
|
|
||||||
hiveid += \sdfat.readCharacter << 16
|
|
||||||
hiveid += \sdfat.readCharacter << 24
|
|
||||||
\sdfat.closeFile
|
|
||||||
ifnot dmarker[UMARKER] == TRUE 'U-marker aktivieren
|
|
||||||
sdfat.setDirCluster(dmarker[UMARKER])
|
|
||||||
|
|
||||||
nach Venatrix senden: ip_addr[0]..[15], hiveid
|
|
||||||
}
|
|
||||||
'########################################################################################
|
|
||||||
hivestr := num.ToStr(hiveid, num#DEC)
|
|
||||||
strpos := strsize(hivestr)
|
|
||||||
macpos := 5
|
|
||||||
repeat while (strpos AND macpos)
|
|
||||||
strpos--
|
|
||||||
if(strpos)
|
|
||||||
strpos--
|
|
||||||
mac_addr[macpos] := num.FromStr(hivestr+strpos, num#HEX)
|
|
||||||
byte[hivestr+strpos] := 0
|
|
||||||
macpos--
|
|
||||||
|
|
||||||
sock.start(A_NETCS,A_NETSCK,A_NETSI,A_NETSO, -1, @mac_addr, @ip_addr)
|
|
||||||
lan_started := true
|
|
||||||
|
|
||||||
PRI get_ip|i
|
|
||||||
bus.bus_putchar(71) 'ip-adresse von Administra empfangen
|
|
||||||
repeat i from 0 to 15
|
|
||||||
ip_addr[i]:=bus.bus_getchar
|
|
||||||
|
|
||||||
PRI lan_stop
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : Netzwerk anhalten
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [072]
|
|
||||||
|
|
||||||
if lan_started
|
|
||||||
sock.stop
|
|
||||||
lan_started := false
|
|
||||||
|
|
||||||
PRI lan_connect | ipaddr, remoteport, handle, handleidx, i
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : ausgehende TCP-Verbindung öffnen (mit Server verbinden)
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [073][sub_getlong.ipaddr][sub_getword.remoteport][put.handleidx]
|
|
||||||
'' : ipaddr - ipv4 address packed into a long (ie: 1.2.3.4 => $01_02_03_04)
|
|
||||||
'' : remoteport - port number to connect to
|
|
||||||
'' : handleidx - lfd. Nr. der Verbindung (index des kompletten handle)
|
|
||||||
|
|
||||||
ipaddr := bus.bus_getlong
|
|
||||||
remoteport := bus.bus_getword
|
|
||||||
|
|
||||||
'freien Pufferabschnitt suchen
|
|
||||||
i := 0
|
|
||||||
repeat sock#sNumSockets
|
|
||||||
if bufidx[i] == $FF '0xFF: nicht zugewiesen
|
|
||||||
quit
|
|
||||||
i++
|
|
||||||
|
|
||||||
ifnot (handle := sock.connect(ipaddr, remoteport, @bufrx[i*rxlen], rxlen, @buftx[i*txlen], txlen)) == -102
|
|
||||||
sock.resetBuffers(handle)
|
|
||||||
handleidx := handle.byte[0] 'extract the handle index from the lower 8 bits
|
|
||||||
sockhandle[handleidx] := handle 'komplettes handle zu handle index speichern
|
|
||||||
bufidx[i] :=handleidx
|
|
||||||
bus.bus_putchar(handleidx) 'handleidx senden
|
|
||||||
else
|
|
||||||
bus.bus_putchar($FF)
|
|
||||||
|
|
||||||
PRI lan_listen | port, handle, handleidx, i
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : Port für eingehende TCP-Verbindung öffnen
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [074][sub_getword.port][put.handleidx]
|
|
||||||
'' : port - zu öffnende Portnummer
|
|
||||||
'' : handleidx - lfd. Nr. der Verbindung (index des kompletten handle)
|
|
||||||
|
|
||||||
port := bus.bus_getword
|
|
||||||
|
|
||||||
'freien Pufferabschnitt suchen
|
|
||||||
i := 0
|
|
||||||
repeat sock#sNumSockets
|
|
||||||
if bufidx[i] == $FF '0xFF: nicht zugewiesen
|
|
||||||
quit
|
|
||||||
i++
|
|
||||||
|
|
||||||
ifnot (handle := sock.listen(port, @bufrx[i*rxlen], rxlen, @buftx[i*txlen], txlen)) == -102
|
|
||||||
handleidx := handle.byte[0] 'extract the handle index from the lower 8 bits
|
|
||||||
sockhandle[handleidx] := handle 'komplettes handle zu handle index speichern
|
|
||||||
bufidx[i] :=handleidx
|
|
||||||
bus.bus_putchar(handleidx) 'handleidx senden
|
|
||||||
else
|
|
||||||
bus.bus_putchar($FF)
|
|
||||||
|
|
||||||
PRI lan_waitconntimeout | handleidx, timeout, t, connected
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : bestimmte Zeit auf Verbindung warten
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [075][get.handleidx][sub_getword.timeout][put.connected]
|
|
||||||
'' : handleidx - lfd. Nr. der zu testenden Verbindung
|
|
||||||
'' : timeout - Timeout in Millisekunden
|
|
||||||
'' : connected - True, if connected
|
|
||||||
|
|
||||||
handleidx := bus.bus_getchar
|
|
||||||
timeout := bus.bus_getword
|
|
||||||
|
|
||||||
t := cnt
|
|
||||||
repeat until (connected := sock.isConnected(sockhandle[handleidx])) or (((cnt - t) / (clkfreq / 1000)) > timeout)
|
|
||||||
|
|
||||||
bus.bus_putchar(connected)
|
|
||||||
|
|
||||||
PRI lan_close | handleidx, i
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : TCP-Verbindung (ein- oder ausgehend) schließen
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [076][get.handleidx]
|
|
||||||
'' : handleidx - lfd. Nr. der zu schließenden Verbindung
|
|
||||||
|
|
||||||
handleidx := bus.bus_getchar
|
|
||||||
|
|
||||||
sock.close(sockhandle[handleidx])
|
|
||||||
|
|
||||||
'reservierten Pufferabschnitt freigeben
|
|
||||||
i := 0
|
|
||||||
repeat sock#sNumSockets
|
|
||||||
if bufidx[i++] == handleidx '0xFF: nicht zugewiesen
|
|
||||||
bufidx[i++] := $FF
|
|
||||||
quit
|
|
||||||
|
|
||||||
|
|
||||||
PRI lan_rxtime | handleidx, timeout, t, rxbyte
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : angegebene Zeit auf ASCII-Zeichen warten
|
|
||||||
'' : nicht verwenden, wenn anderes als ASCII (0 - 127) empfangen wird
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [077][get.handleidx][sub_getword.timeout][put.rxbyte]
|
|
||||||
'' : handleidx - lfd. Nr. der Verbindung
|
|
||||||
'' : timeout - Timeout in Millisekunden
|
|
||||||
'' : rxbyte - empfangenes Zeichen (0 - 127) oder
|
|
||||||
'' : sock#RETBUFFEREMPTY (-1) wenn Timeout oder keine Verbindung mehr
|
|
||||||
|
|
||||||
handleidx := bus.bus_getchar
|
|
||||||
timeout := bus.bus_getword
|
|
||||||
|
|
||||||
t := cnt
|
|
||||||
repeat until (rxbyte := sock.readByteNonBlocking(sockhandle[handleidx])) => 0 or (not sock.isConnected(sockhandle[handleidx])) or (cnt - t) / (clkfreq / 1000) > timeout
|
|
||||||
|
|
||||||
bus.bus_putchar(rxbyte)
|
|
||||||
|
|
||||||
PRI lan_rxdata | handleidx, len, rxbyte, error
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : bei bestehender Verbindung die angegebene Datenmenge empfangen
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [078][get.handleidx][sub_getlong.len][put.byte1][put.byte<len>][put.error]
|
|
||||||
'' : handleidx - lfd. Nr. der Verbindung
|
|
||||||
'' : len - Anzahl zu empfangender Bytes
|
|
||||||
'' : error - ungleich Null bei Fehler
|
|
||||||
|
|
||||||
error := FALSE
|
|
||||||
handleidx := bus.bus_getchar
|
|
||||||
len := bus.bus_getlong
|
|
||||||
|
|
||||||
repeat len
|
|
||||||
ifnot error
|
|
||||||
repeat while (rxbyte := sock.readByteNonBlocking(sockhandle[handleidx])) < 0
|
|
||||||
ifnot sock.isConnected(sockhandle[handleidx])
|
|
||||||
error := sock#ERRSOCKETCLOSED
|
|
||||||
quit
|
|
||||||
bus.bus_putchar(rxbyte)
|
|
||||||
|
|
||||||
bus.bus_putchar(error)
|
|
||||||
|
|
||||||
PRI lan_txdata | handleidx, len, txbyte, error
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : bei bestehender Verbindung die angegebene Datenmenge senden
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [079][get.handleidx][sub_getlong.len][get.byte1][get.byte<len>][put.error]
|
|
||||||
'' : handleidx - lfd. Nr. der Verbindung
|
|
||||||
'' : len - Anzahl zu sendender Bytes
|
|
||||||
'' : error - ungleich Null bei Fehler
|
|
||||||
|
|
||||||
error := FALSE
|
|
||||||
handleidx := bus.bus_getchar
|
|
||||||
len := bus.bus_getlong
|
|
||||||
|
|
||||||
repeat len
|
|
||||||
txbyte := bus.bus_getchar
|
|
||||||
ifnot error
|
|
||||||
repeat while sock.writeByteNonBlocking(sockhandle[handleidx], txbyte) < 0
|
|
||||||
ifnot sock.isConnected(sockhandle[handleidx])
|
|
||||||
error := sock#ERRSOCKETCLOSED
|
|
||||||
quit
|
|
||||||
|
|
||||||
bus.bus_putchar(error)
|
|
||||||
|
|
||||||
PRI lan_rxbyte
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : wenn vorhanden, ein empfangenes Byte lesen
|
|
||||||
'' : nicht verwenden, wenn auch $FF empfangen werden kann
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [080][get.handleidx][put.rxbyte]
|
|
||||||
'' : handleidx - lfd. Nr. der Verbindung
|
|
||||||
'' : rxbyte - empfangenes Zeichen oder
|
|
||||||
'' : sock#RETBUFFEREMPTY (-1) wenn kein Zeichen vorhanden
|
|
||||||
|
|
||||||
bus.bus_putchar(sock.readByteNonBlocking(sockhandle[bus.bus_getchar]))
|
|
||||||
|
|
||||||
PRI lan_isconnected
|
|
||||||
''funktionsgruppe : lan
|
|
||||||
''funktion : Returns true if the socket is connected, false otherwise
|
|
||||||
''eingabe : -
|
|
||||||
''ausgabe : -
|
|
||||||
''busprotokoll : [081][get.handleidx][put.connected]
|
|
||||||
'' : handleidx - lfd. Nr. der Verbindung
|
|
||||||
'' : connected - TRUE wenn verbunden, sonst FALSE
|
|
||||||
|
|
||||||
bus.bus_putchar(sock.isConnected(sockhandle[bus.bus_getchar]))
|
|
||||||
|
|
||||||
DAT
|
|
||||||
long ' long alignment for addresses
|
|
||||||
ip_addr byte 10, 1, 1, 1 'ip
|
|
||||||
ip_subnet byte 255, 255, 255, 0 'subnet-maske
|
|
||||||
ip_gateway byte 10, 1, 1, 254 'gateway
|
|
||||||
ip_dns byte 10, 1, 1, 254 'dns
|
|
||||||
ip_boot long 0 'boot-server (IP address in long)
|
|
||||||
mac_addr byte $c0, $de, $ba, $be, $00, $00 'mac-adresse
|
|
||||||
}
|
|
|
@ -537,7 +537,6 @@ pri Empfang_file|key,i,packet,crc,j,k,timer,bytes,done,zaehler,tmp,position
|
||||||
ios.sertx(ACK)
|
ios.sertx(ACK)
|
||||||
ios.sdclose
|
ios.sdclose
|
||||||
print_win(@fertig,10,14)
|
print_win(@fertig,10,14)
|
||||||
'waitcnt(cnt+clkfreq)
|
|
||||||
ausstieg
|
ausstieg
|
||||||
|
|
||||||
PRI UpdateCRC(data,crc):newcrc|i
|
PRI UpdateCRC(data,crc):newcrc|i
|
||||||
|
@ -585,8 +584,6 @@ PRI Mouse_Release
|
||||||
repeat while ios.mouse_button(0) 'warten bis Maustaste losgelassen wird
|
repeat while ios.mouse_button(0) 'warten bis Maustaste losgelassen wird
|
||||||
|
|
||||||
pri ausstieg
|
pri ausstieg
|
||||||
'ios.restore_Area(8,7,32,15,BRAM)
|
|
||||||
'ios.display2dbox(colors[shellhcol], 1,1, 25,34,0)
|
|
||||||
ios.Mousepointer(hour_glass)
|
ios.Mousepointer(hour_glass)
|
||||||
cmd_mount
|
cmd_mount
|
||||||
activate_dirmarker(systemdir)
|
activate_dirmarker(systemdir)
|
||||||
|
@ -665,6 +662,8 @@ PRI printfont(str1,a,b,c,d,e)|f
|
||||||
|
|
||||||
repeat strsize(str1)
|
repeat strsize(str1)
|
||||||
f:= byte[str1++]
|
f:= byte[str1++]
|
||||||
|
if f >96
|
||||||
|
f^=32
|
||||||
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
||||||
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
||||||
d:=0
|
d:=0
|
||||||
|
|
|
@ -263,6 +263,8 @@ PRI printfont(str1,a,b,c,d,e)|f
|
||||||
|
|
||||||
repeat strsize(str1)
|
repeat strsize(str1)
|
||||||
f:= byte[str1++]
|
f:= byte[str1++]
|
||||||
|
if f >96
|
||||||
|
f^=32
|
||||||
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
||||||
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
||||||
d:=0
|
d:=0
|
||||||
|
@ -325,12 +327,19 @@ con '************************************************** Button-Funktionen ******
|
||||||
|
|
||||||
PRI buttonpress(n)
|
PRI buttonpress(n)
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),250,0,0,0,29)
|
1:printfont(string("Start "),250,0,0,0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],250,colors[shellhcol],29,7)
|
||||||
|
|
||||||
|
'ios.displaytile(164,0,colors[shellhcol],250,29,7)
|
||||||
|
|
||||||
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
||||||
|
|
||||||
Mouse_Release
|
Mouse_Release
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),colors[hcolstatus],0,colors[statustextcol],0,29)
|
1:printfont(string("Start "),colors[hcolstatus],0,colors[statustextcol],0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],colors[hcolstatus],colors[shellhcol],29,7)
|
||||||
|
|
||||||
|
'ios.displaytile(164,0,colors[shellhcol],colors[hcolstatus],29,7)
|
||||||
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
||||||
|
|
||||||
|
|
||||||
|
@ -531,7 +540,7 @@ PRI time|s 'Zeitanzeige in der Statusleiste
|
||||||
|
|
||||||
pri show_time |s
|
pri show_time |s
|
||||||
s:=ios.getminutes
|
s:=ios.getminutes
|
||||||
Status_extern(ios.dcf_sync,dcf_on,170,27,0,colors[titeltextcol],black) 'Anzeige des aktuellen Status in der Titelzeile
|
Status_extern(ios.dcf_sync,dcf_on,170,34,29,green,black) 'Anzeige des aktuellen Status in der Titelzeile
|
||||||
if s<>tmptime
|
if s<>tmptime
|
||||||
displaytime
|
displaytime
|
||||||
|
|
||||||
|
@ -540,10 +549,10 @@ PRI displaytime|h,m
|
||||||
h:=ios.gethours
|
h:=ios.gethours
|
||||||
m:=ios.getminutes
|
m:=ios.getminutes
|
||||||
|
|
||||||
print_zehner(h,29,34,colors[hcolstatus],colors[statustextcol])
|
print_zehner(h,29,35,colors[hcolstatus],colors[statustextcol])
|
||||||
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,36)
|
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,37)
|
||||||
|
|
||||||
print_zehner(m,29,37,colors[hcolstatus],colors[statustextcol])
|
print_zehner(m,29,38,colors[hcolstatus],colors[statustextcol])
|
||||||
tmptime:=m
|
tmptime:=m
|
||||||
date
|
date
|
||||||
|
|
||||||
|
@ -566,12 +575,12 @@ pri print_zehner(wert,y,x,hin,vor)|a
|
||||||
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
||||||
|
|
||||||
if wert1==1
|
if wert1==1
|
||||||
ios.displaytile(tnr_act,colors[Titelhcol],col,f3,y,x) 'Status ok-anzeigen
|
ios.displaytile(tnr_act,colors[hcolstatus],col,f3,y,x) 'Status ok-anzeigen
|
||||||
else
|
else
|
||||||
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
||||||
ios.displaytile(tnr_act,colors[titelhcol],grey,0,y,x) 'Symbol grau
|
ios.displaytile(tnr_act,colors[hcolstatus],grey,0,y,x) 'Symbol grau
|
||||||
else
|
else
|
||||||
ios.displaytile(16,colors[Titelhcol],colors[titeltextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
ios.displaytile(16,colors[hcolstatus],colors[statustextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
||||||
|
|
||||||
con'****************************************************** Perplex-Funktionen *************************************************************************************************
|
con'****************************************************** Perplex-Funktionen *************************************************************************************************
|
||||||
PRI plx_map|ack,adr,n,i
|
PRI plx_map|ack,adr,n,i
|
||||||
|
@ -1090,18 +1099,7 @@ PUB os_testbas(stradr): flag | status,i,len 'sys: test ob kommando a
|
||||||
ios.ldbin(@BAS_RT)
|
ios.ldbin(@BAS_RT)
|
||||||
else 'datei nicht gefunden
|
else 'datei nicht gefunden
|
||||||
ios.sdclose
|
ios.sdclose
|
||||||
{
|
|
||||||
'im system-dir suchen
|
|
||||||
ios.sddmset(ios#DM_USER) 'u-marker setzen
|
|
||||||
ios.sddmact(ios#DM_SYSTEM) 's-marker aktivieren
|
|
||||||
status := ios.sdopen("r",stradr) 'datei vorhanden?
|
|
||||||
if status == 0 'datei gefunden
|
|
||||||
flag := TRUE
|
|
||||||
ios.belload(stradr) 'bellatrix-code laden
|
|
||||||
'ios.screeninit(0,1) 'systemmeldung
|
|
||||||
else 'datei nicht gefunden
|
|
||||||
ios.sdclose
|
|
||||||
}
|
|
||||||
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
|
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
|
||||||
|
|
||||||
byte[stradr][len] := 0 'extender wieder abschneiden
|
byte[stradr][len] := 0 'extender wieder abschneiden
|
||||||
|
|
|
@ -0,0 +1,582 @@
|
||||||
|
{{
|
||||||
|
Template für externe Programme unter Plexus-Shell
|
||||||
|
}}
|
||||||
|
|
||||||
|
obj ios: "reg-ios-64"
|
||||||
|
|
||||||
|
con
|
||||||
|
'------------- Shell-Farben -----------------------------------------------------
|
||||||
|
shellhcol =0 'Hauptfensterfarbe
|
||||||
|
act_color =1 'Schriftfarbe
|
||||||
|
winhcol =2 'Fensterhintergrundfarbe
|
||||||
|
winframecol =3 'Fensterrandfarbe
|
||||||
|
Titelhcol =4 'Titelleistenfarbe
|
||||||
|
titeltextcol =5 'Titelleistentextfarbe
|
||||||
|
hcolstatus =6 'statusleiste hintergrundfarbe
|
||||||
|
statustextcol =7 'Statustextfarbe
|
||||||
|
buttonhcol =8 'Buttonhintergrundfarbe
|
||||||
|
buttontextcol =9 'Buttontextfarbe
|
||||||
|
messagehcol =10 'Messagebox-Hintergrundfarbe
|
||||||
|
messagetextcol =11 'Messagebox-Textfarbe
|
||||||
|
selectcol =12 'selektionsfarbe
|
||||||
|
mousecol =13 'Mauszeigerfarbe
|
||||||
|
panelcol =14 'Farbe des Utility-Panels
|
||||||
|
|
||||||
|
ADM_SPEC = %00000000_00000000_00000000_01010011
|
||||||
|
SETTING_RAM = $7FF00 'Hier stehen die System-Settings
|
||||||
|
|
||||||
|
'******************Farben ********************************************************
|
||||||
|
#$FC, Light_Grey, #$A8, Grey, #$54, Dark_Grey
|
||||||
|
#$C0, Light_Red, #$80, Red, #$40, Dark_Red
|
||||||
|
#$30, Light_Green, #$20, Green, #$10, Dark_Green
|
||||||
|
#$1F, Light_Blue, #$09, Blue, #$04, Dark_Blue
|
||||||
|
#$F0, Light_Orange, #$E6, Orange, #$92, Dark_Orange
|
||||||
|
#$CC, Light_Purple, #$88, Purple, #$44, Dark_Purple
|
||||||
|
#$3C, Light_Teal, #$28, Teal, #$14, Dark_Teal
|
||||||
|
#$FF, White, #$00, Black
|
||||||
|
'----Icon-Nummern----------------------------------------------------------------
|
||||||
|
BEL_PIC =14
|
||||||
|
ADM_PIC =15
|
||||||
|
BIN_PIC =9
|
||||||
|
BAS_PIC =107
|
||||||
|
DIR_PIC =7
|
||||||
|
ALL_PIC =8
|
||||||
|
DMP_PIC =120
|
||||||
|
TXT_PIC =121
|
||||||
|
SYS_PIC =122
|
||||||
|
COG_PIC =75
|
||||||
|
BACK_PIC =124
|
||||||
|
VOR_PIC =123
|
||||||
|
PLAY_PIC =125
|
||||||
|
STOP_PIC =141
|
||||||
|
CLR_PIC =155
|
||||||
|
'--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
var
|
||||||
|
|
||||||
|
byte mountmarker,tmptime
|
||||||
|
long rootdir 'root-Dirmarker
|
||||||
|
long userdir 'user-Dirmarker
|
||||||
|
byte colors[15] 'Farbwerte
|
||||||
|
byte ma,mb,mz 'Maus-Tasten und Scrollrad
|
||||||
|
|
||||||
|
byte buttonx[8] 'Knöpfe
|
||||||
|
byte buttony[8]
|
||||||
|
byte windownum[8] 'Arbeits-Windows
|
||||||
|
byte windowx[8]
|
||||||
|
byte windowy[8]
|
||||||
|
byte windowxx[8]
|
||||||
|
byte windowyy[8]
|
||||||
|
byte messagex 'x-Position der Messagebox
|
||||||
|
byte tag,monat,stunde,minute sekunde 'Datum -und Zeit
|
||||||
|
word jahr
|
||||||
|
byte menuemarker 'Marker für Startmenue
|
||||||
|
byte menuey[10] 'y-Koordinate für Start-Menue-Einträge
|
||||||
|
byte popupx 'x und
|
||||||
|
byte popupy 'y-Koordinaten des Popupmenues
|
||||||
|
byte popupmarker 'Marker für Popupmenue
|
||||||
|
byte menue_nr 'nr des gerade angezeigten Menues
|
||||||
|
byte infomarker
|
||||||
|
dat
|
||||||
|
' ini byte "reg.ini",0 'Ini-Datei für Farbwerte
|
||||||
|
regsys byte "plexus.dll",0 'Reg.sys für Rückkehr aus externem Programm
|
||||||
|
butOK byte " OK ",0
|
||||||
|
Abbr byte "Cancel",0
|
||||||
|
|
||||||
|
PUB main
|
||||||
|
|
||||||
|
ios.start
|
||||||
|
ios.sdmount 'sd-card mounten
|
||||||
|
mountmarker:=1 'mount-marker
|
||||||
|
if ios.admgetspec<>ADM_SPEC 'ADM-Spezifikation SID?
|
||||||
|
ios.admreset'ios.admload(@adm) 'Administracode wird im EEPROM erwartet
|
||||||
|
if ios.bel_get<>64 'BEL-Treiber 64 farben Tile ?
|
||||||
|
ios.belreset 'Bellatrixcode wird im EEPROM erwartet
|
||||||
|
'--------------------------------------------------------------------------------------
|
||||||
|
rootdir:=get_dirmarker 'Dir-Marker für root Verzeichnis lesen
|
||||||
|
userdir:=rootdir 'User-Dir-Marker erst mal mit root vorbelegen
|
||||||
|
ios.sdunmount
|
||||||
|
'--------------------------------------------------------------------------------------
|
||||||
|
ios.sdmount
|
||||||
|
iniload 'Ini-Datei mit Farbwerten laden
|
||||||
|
buttonweg
|
||||||
|
testfenster
|
||||||
|
repeat
|
||||||
|
|
||||||
|
os_cmdinput 'Hauptprogrammschleife
|
||||||
|
|
||||||
|
PRI os_cmdinput | x,y ,i,dk,util
|
||||||
|
|
||||||
|
repeat
|
||||||
|
time 'Zeit und Datum anzeigen
|
||||||
|
|
||||||
|
ma:=ios.mouse_button(0) 'linke Maustaste
|
||||||
|
mb:=ios.mouse_button(1) 'rechte Maustaste
|
||||||
|
mz:=ios.mousez 'scrollrad
|
||||||
|
|
||||||
|
|
||||||
|
'***************************** linke Maustaste **********************************************************************
|
||||||
|
if ma==255
|
||||||
|
dk:=0
|
||||||
|
x:=ios.mousex
|
||||||
|
y:=ios.mousey
|
||||||
|
|
||||||
|
repeat i from 1 to 7 'Abfrage auf Fensterloeschen
|
||||||
|
if windownum[i]==1
|
||||||
|
if (x==windowxx[i]) and (y==windowy[i])
|
||||||
|
windowloesch(i)
|
||||||
|
ios.sdopen("r",@regsys)
|
||||||
|
ios.ldbin(@regsys)
|
||||||
|
|
||||||
|
|
||||||
|
if (x==windowx[i]) and (y==windowy[i])
|
||||||
|
dk:=doppelklick
|
||||||
|
if dk>1
|
||||||
|
windowloesch(i)
|
||||||
|
ios.sdopen("r",@regsys)
|
||||||
|
ios.ldbin(@regsys)
|
||||||
|
|
||||||
|
|
||||||
|
'****************************** Startmenue anzeigen ************************************************************
|
||||||
|
if menuemarker==1
|
||||||
|
if x>10 or y<14 'Menue loeschen, wenn man woanders hinklickt
|
||||||
|
menueweg
|
||||||
|
testfenster
|
||||||
|
if x=>0 and x=<10 and y=>14 and y=<28
|
||||||
|
repeat i from 0 to 5
|
||||||
|
if menuey[i]==y
|
||||||
|
util:=0 'eventuelle Utilitie-Fenster deaktivieren
|
||||||
|
case i
|
||||||
|
0:menueselect(string(" -EXIT- "),menuey[i])
|
||||||
|
windowloesch(7)
|
||||||
|
ios.sdopen("r",@regsys)
|
||||||
|
ios.ldbin(@regsys)
|
||||||
|
'windowloesch(7)
|
||||||
|
|
||||||
|
'****************************** IO-Port-Fenster ****************************************************************
|
||||||
|
if y==4
|
||||||
|
if x==3 or x==20
|
||||||
|
toogle_board(x)
|
||||||
|
'****************************** Globale Funktionstasten ********************************************************
|
||||||
|
|
||||||
|
if (x==39) and (y==0) 'Beenden-Knopf
|
||||||
|
|
||||||
|
ios.sdopen("r",@regsys)
|
||||||
|
ios.ldbin(@regsys)
|
||||||
|
|
||||||
|
if (x==0) and (y==0) 'Beenden bei Doppelklick auf linke obere Ecke
|
||||||
|
dk:=doppelklick
|
||||||
|
if dk>1
|
||||||
|
ios.sdopen("r",@regsys)
|
||||||
|
ios.ldbin(@regsys)
|
||||||
|
|
||||||
|
if ((x=>0) and (x=<5)) and (y==29) 'Start-Knopf
|
||||||
|
buttonpress(3)
|
||||||
|
if menuemarker==1
|
||||||
|
'fensterweg
|
||||||
|
Menueweg
|
||||||
|
testfenster
|
||||||
|
|
||||||
|
else
|
||||||
|
fensterweg
|
||||||
|
startmenue
|
||||||
|
menuemarker:=1
|
||||||
|
|
||||||
|
'****************************** Globale Abfrage OK und Cancel-Button *****************************
|
||||||
|
if(x=>buttonx[1]) and (x=<buttonx[1]+5) and (y==buttony[1]) 'ok
|
||||||
|
buttonpress(1)
|
||||||
|
if windownum[2]==1
|
||||||
|
ios.restore(windowx[2],windowy[2],windowxx[2],windowyy[2])
|
||||||
|
popup_info_weg
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(x=>buttonx[2]) and (x=<(buttonx[2]+6)) and (y==buttony[2]) 'cancel
|
||||||
|
buttonpress(2)
|
||||||
|
fensterweg
|
||||||
|
testfenster
|
||||||
|
|
||||||
|
pri toogle_board(tg)
|
||||||
|
case tg
|
||||||
|
3:ios.displaytile(138,colors[winhcol],colors[winhcol],255,4,3)
|
||||||
|
ios.displaytile(Cog_pic,colors[winhcol],colors[winhcol],255,4,20)
|
||||||
|
20:ios.displaytile(Cog_pic,colors[winhcol],colors[winhcol],255,4,3)
|
||||||
|
ios.displaytile(138,colors[winhcol],colors[winhcol],255,4,20)
|
||||||
|
|
||||||
|
pri testfenster|i
|
||||||
|
'dira[24]~
|
||||||
|
'i:=ina[24]
|
||||||
|
window(7,4,1,27,38,string("I/O-Card-Test"))
|
||||||
|
rahmen (1,6,37,25)
|
||||||
|
rahmen (1,3,37,5)
|
||||||
|
rahmen (3,8,18,18)
|
||||||
|
'ios.displaytile(COG_PIC,winhcol,red,0,8+i+i,19+cogs-1)
|
||||||
|
ios.displaytile(138,colors[winhcol],colors[winhcol],255,4,3)
|
||||||
|
printfont(string("Sepia-Card"),colors[winhcol],0,colors[act_color],4,4)
|
||||||
|
'printdec(i,20,20,colors[hcolstatus],colors[statustextcol])
|
||||||
|
ios.displaytile(Cog_pic,colors[winhcol],colors[winhcol],255,4,20)
|
||||||
|
printfont(string("Venatrix-Card"),colors[winhcol],0,colors[act_color],21,4)
|
||||||
|
'y,x
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,10,6)
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,11,5)
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,11,7)
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,12,6)
|
||||||
|
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,14,6)
|
||||||
|
|
||||||
|
printfont(string("Port 1"),colors[winhcol],0,colors[act_color],4,16)
|
||||||
|
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,10,14)
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,11,13)
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,11,15)
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,12,14)
|
||||||
|
|
||||||
|
ios.displaytile(COG_PIC,colors[winhcol],green,0,14,14)
|
||||||
|
|
||||||
|
printfont(string("Port 2"),colors[winhcol],0,colors[act_color],12,16)
|
||||||
|
|
||||||
|
printfont(string("Joystick-Test"),colors[winhcol],0,colors[act_color],4,8)
|
||||||
|
|
||||||
|
'printfont(string("eingebettetes Programm"),colors[winhcol],0,colors[act_color],3,5)
|
||||||
|
|
||||||
|
con'****************************************************** Datum und Zeitanzeige *************************************************************************************************
|
||||||
|
|
||||||
|
PRI time|s 'Zeitanzeige in der Statusleiste
|
||||||
|
|
||||||
|
s:=ios.getminutes
|
||||||
|
if s<>tmptime
|
||||||
|
displaytime
|
||||||
|
|
||||||
|
PRI displaytime|h,m,x,y
|
||||||
|
|
||||||
|
h:=ios.gethours
|
||||||
|
m:=ios.getminutes
|
||||||
|
if h<10
|
||||||
|
printdec(0,29,34,colors[hcolstatus],colors[statustextcol])
|
||||||
|
y:=1
|
||||||
|
else
|
||||||
|
y:=0
|
||||||
|
printdec(h,29,34+y,colors[hcolstatus],colors[statustextcol])
|
||||||
|
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,36)
|
||||||
|
if m<10
|
||||||
|
printdec(0,29,37,colors[hcolstatus],colors[statustextcol])
|
||||||
|
x:=1
|
||||||
|
else
|
||||||
|
x:=0
|
||||||
|
printdec(m,29,37+x,colors[hcolstatus],colors[statustextcol])
|
||||||
|
tmptime:=m
|
||||||
|
date
|
||||||
|
|
||||||
|
PRI date|t,m,j,y,x
|
||||||
|
t:=ios.getdate
|
||||||
|
m:=ios.getmonth
|
||||||
|
j:=ios.getyear
|
||||||
|
|
||||||
|
if t<10
|
||||||
|
printdec(0,0,29,colors[titelhcol],colors[titeltextcol])
|
||||||
|
y:=1
|
||||||
|
else
|
||||||
|
y:=0
|
||||||
|
printdec(t,0,29+y,colors[titelhcol],colors[titeltextcol])
|
||||||
|
ios.displaytile(30,colors[titelhcol],0,colors[titeltextcol],0,31)
|
||||||
|
if m<10
|
||||||
|
printdec(0,0,32,colors[titelhcol],colors[titeltextcol])
|
||||||
|
x:=1
|
||||||
|
else
|
||||||
|
x:=0
|
||||||
|
printdec(m,0,32+x,colors[titelhcol],colors[titeltextcol])
|
||||||
|
ios.displaytile(30,colors[titelhcol],0,colors[titeltextcol],0,34)
|
||||||
|
printdec(j,0,35,colors[titelhcol],colors[titeltextcol])
|
||||||
|
|
||||||
|
|
||||||
|
con '*********************************************** Fenster-Lösch-Funktionen ****************************************************************************************************
|
||||||
|
PRI windowloesch(num) 'einzelnes Fenster löschen
|
||||||
|
ios.display2dbox(colors[shellhcol], windowy[num], windowx[num], windowyy[num], windowxx[num]) 'Fenster loeschen
|
||||||
|
'regal(colors[shellhcol],colors[panelcol],0,26,11)
|
||||||
|
if menuemarker==1
|
||||||
|
menueweg
|
||||||
|
win_paraloesch(num)
|
||||||
|
|
||||||
|
'muelleimer:=0
|
||||||
|
'util:=0
|
||||||
|
|
||||||
|
PRI win_paraloesch(num) 'Fensterparameter löschen
|
||||||
|
|
||||||
|
windownum[num]:=windowx[num]:=windowy[num]:=windowxx[num]:=windowyy[num]:=-1 'Windowwerte loeschen
|
||||||
|
|
||||||
|
|
||||||
|
PRI fensterweg|i 'alle gesetzten Fenster loeschen
|
||||||
|
repeat i from 1 to 7
|
||||||
|
if windownum[i]==1
|
||||||
|
windowloesch(i)
|
||||||
|
|
||||||
|
repeat i from 0 to 7
|
||||||
|
buttonx[i]:=-1
|
||||||
|
buttony[i]:=-1
|
||||||
|
con'
|
||||||
|
PRI doppelklick:click 'pseudo-doppelklick
|
||||||
|
click:=0
|
||||||
|
repeat while ios.mouse_button(0)>0
|
||||||
|
|
||||||
|
repeat 500
|
||||||
|
if ios.mouse_button(0)==255
|
||||||
|
click++
|
||||||
|
con'
|
||||||
|
PRI iniload|i,a
|
||||||
|
a:=SETTING_RAM
|
||||||
|
repeat i from 0 to 14
|
||||||
|
colors[i]:=ios.ram_rdbyte(0,a++)
|
||||||
|
' repeat i from 0 to 4
|
||||||
|
' sys_set[i]:=ios.ram_rdbyte(0,a++)
|
||||||
|
|
||||||
|
PRI activate_dirmarker(mark) 'USER-Marker setzen
|
||||||
|
|
||||||
|
ios.sddmput(ios#DM_USER,mark) 'usermarker wieder in administra setzen
|
||||||
|
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
|
||||||
|
|
||||||
|
PRI get_dirmarker:dm 'USER-Marker lesen
|
||||||
|
|
||||||
|
ios.sddmset(ios#DM_USER)
|
||||||
|
dm:=ios.sddmget(ios#DM_USER)
|
||||||
|
PRI cmd_mount :err 'cmd: mount
|
||||||
|
|
||||||
|
repeat 16
|
||||||
|
err:=ios.sdmount
|
||||||
|
ifnot err
|
||||||
|
mountmarker:=1
|
||||||
|
quit
|
||||||
|
else
|
||||||
|
' display_error(err)
|
||||||
|
quit
|
||||||
|
|
||||||
|
PRI cmd_unmount|err 'cmd: unmount
|
||||||
|
err:=ios.sdunmount
|
||||||
|
ifnot err
|
||||||
|
mountmarker:=0
|
||||||
|
else
|
||||||
|
'display_error(err)
|
||||||
|
PRI window(num,y,x,yy,xx,strg)|i 'ein Fenster erstellen
|
||||||
|
windowx[num]:=x-1
|
||||||
|
windowy[num]:=y-2
|
||||||
|
windowxx[num]:=xx+1
|
||||||
|
windowyy[num]:=yy+1
|
||||||
|
|
||||||
|
ios.displaytile(0,colors[winhcol],0,colors[winframecol],y-2,x-1)
|
||||||
|
repeat i from x to xx
|
||||||
|
ios.displaytile(16,colors[Titelhcol],$ff,$ff,y-2,i)
|
||||||
|
ios.displaytile(1,colors[winhcol],0,colors[winframecol],y-2,xx+1)
|
||||||
|
repeat i from y-1 to yy
|
||||||
|
ios.displaytile(2,colors[winhcol],0,colors[winframecol],i,x-1)
|
||||||
|
ios.displaytile(77,colors[winhcol],0,colors[winframecol],i,xx+1)
|
||||||
|
repeat i from x-1 to xx
|
||||||
|
ios.displaytile(6,colors[winhcol],0,colors[winframecol],yy+1,i)
|
||||||
|
|
||||||
|
ios.displaytile(4,colors[winhcol],0,colors[winframecol],yy+1,x-1)
|
||||||
|
ios.displaytile(5,colors[winhcol],0,colors[winframecol],y-1,xx+1)
|
||||||
|
ios.displaytile(3,colors[winhcol],0,colors[winframecol],yy+1,xx+1)
|
||||||
|
|
||||||
|
ios.printBoxSize(num,y-1, x, yy, xx)
|
||||||
|
ios.printBoxColor(num,colors[act_color],colors[winhcol],0)
|
||||||
|
ios.printcursorrate(0)
|
||||||
|
ios.printchar(12) 'cls
|
||||||
|
windownum[num]:=1
|
||||||
|
printfont(strg,colors[titelhcol],0,colors[titeltextcol],x+1,y-2)
|
||||||
|
|
||||||
|
|
||||||
|
PRI printfont(str1,a,b,c,d,e)|f
|
||||||
|
|
||||||
|
repeat strsize(str1)
|
||||||
|
f:= byte[str1++]
|
||||||
|
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
||||||
|
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
||||||
|
d:=0
|
||||||
|
e++
|
||||||
|
ios.displayTile(f,a,b,c,e,d) 'einzelnes Tile anzeigen ('displayTile(tnr,pcol,scol,tcol, row, column))
|
||||||
|
|
||||||
|
d++
|
||||||
|
PRI printdec(value,y,xx,hint,vor) | i ,c ,x 'screen: dezimalen zahlenwert auf bildschirm ausgeben
|
||||||
|
{{printdec(value) - screen: dezimale bildschirmausgabe zahlenwertes}}
|
||||||
|
' if value < 0 'negativer zahlenwert
|
||||||
|
' -value
|
||||||
|
'printchar("-")
|
||||||
|
|
||||||
|
i := 1_000_000_000
|
||||||
|
repeat 10 'zahl zerlegen
|
||||||
|
if value => i
|
||||||
|
x:=value / i + "0"
|
||||||
|
ios.displayTile(x-16,hint,0,vor,y,xx) 'printchar(x)
|
||||||
|
xx++
|
||||||
|
c:=value / i + "0"
|
||||||
|
value //= i
|
||||||
|
result~~
|
||||||
|
elseif result or i == 1
|
||||||
|
printfont(string("0"),hint,0,vor,xx,y) 'printchar("0")
|
||||||
|
xx++
|
||||||
|
i /= 10 'nächste stelle
|
||||||
|
con '************************************************** Button-Funktionen ********************************************************************************************************
|
||||||
|
|
||||||
|
PRI button(n,btext,x,y)
|
||||||
|
printfont(btext,colors[buttonhcol],0,colors[buttontextcol],x,y)
|
||||||
|
buttonx[n]:=x
|
||||||
|
buttony[n]:=y
|
||||||
|
|
||||||
|
|
||||||
|
PRI buttonpress(n)|s
|
||||||
|
s:=0
|
||||||
|
case n
|
||||||
|
1: printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
||||||
|
2: printfont(@Abbr,250,0,0,buttonx[n],buttony[n])
|
||||||
|
3: printfont(string("START"),250,0,0,0,29)
|
||||||
|
s:=1
|
||||||
|
4: printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
||||||
|
{
|
||||||
|
5,6,7,8:ios.displaytile(144,colors[winhcol],250,0,taby[n-4],tabx[n-4])
|
||||||
|
printfont(@buttontext[n*6],250,0,0,buttonx[n],buttony[n])
|
||||||
|
ios.displaytile(145,colors[winhcol],250,0,taby[n-4],tabl[n-4])
|
||||||
|
s:=2
|
||||||
|
}
|
||||||
|
repeat while ios.mouse_button(0)>0
|
||||||
|
case s
|
||||||
|
1:printfont(string("START"),colors[hcolstatus],0,colors[statustextcol],0,29)
|
||||||
|
' 2:ios.displaytile(144,colors[winhcol],colors[buttonhcol],0,taby[n-4],tabx[n-4]) 'tab wiederherstellen
|
||||||
|
' printfont(@buttontext[n*6],colors[buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
||||||
|
' ios.displaytile(145,colors[winhcol],colors[buttonhcol],0,taby[n-4],tabl[n-4])
|
||||||
|
|
||||||
|
PRI abfrage:taste|a,x,y
|
||||||
|
repeat
|
||||||
|
a:=ios.mouse_button(0)
|
||||||
|
if a==255
|
||||||
|
x:=ios.mousex
|
||||||
|
y:=ios.mousey
|
||||||
|
|
||||||
|
if(x=>buttonx[1]) and (x=<buttonx[1]+5) and (y==buttony[1]) 'ok
|
||||||
|
buttonpress(1)
|
||||||
|
taste:=1
|
||||||
|
quit
|
||||||
|
if(x=>buttonx[2]) and (x=<(buttonx[2]+6)) and (y==buttony[2]) 'cancel
|
||||||
|
buttonpress(2)
|
||||||
|
taste:=2
|
||||||
|
quit
|
||||||
|
fensterweg
|
||||||
|
ios.display2dbox(colors[shellhcol], 10, 7, 17, messagex)
|
||||||
|
con '*************************************************** Start-Menue *************************************************************************************************************
|
||||||
|
PRI Menue(x,y,xx,yy)|i
|
||||||
|
popup(x,y,xx,yy)
|
||||||
|
repeat i from x to xx
|
||||||
|
ios.displaytile(16,colors[Titelhcol],$ff,$ff,y-1,i)
|
||||||
|
|
||||||
|
PRI menueweg
|
||||||
|
ios.display2dbox(colors[shellhcol],14,0,28,9)
|
||||||
|
menuemarker:=0
|
||||||
|
|
||||||
|
PRI separator(x,y,xx)|i
|
||||||
|
repeat i from x to xx
|
||||||
|
ios.displaytile(6,colors[Messagehcol],0,colors[winframecol],y,i)
|
||||||
|
|
||||||
|
PRI menueselect(stri,y)
|
||||||
|
printfont(stri,colors[messagetextcol],0,colors[messagehcol],0,y)
|
||||||
|
repeat while ios.mouse_button(0)>0
|
||||||
|
printfont(stri,colors[messagehcol],0,colors[messagetextcol],0,y)
|
||||||
|
menueweg
|
||||||
|
|
||||||
|
PRI Startmenue
|
||||||
|
menue(0,26,9,28)
|
||||||
|
menuemarker:=1
|
||||||
|
printfont(string("Startmenue"),colors[titelhcol],0,colors[titeltextcol],0,25)
|
||||||
|
separator(0,26,9)
|
||||||
|
' printfont(string("Files"),messagehcol,0,messagetextcol,0,16)
|
||||||
|
' menuey[0]:=16
|
||||||
|
' separator(0,17,9)
|
||||||
|
' printfont(string("Baud"),messagehcol,0,messagetextcol,0,18)
|
||||||
|
' menuey[1]:=18
|
||||||
|
' separator(0,19,9)
|
||||||
|
' printfont(string("Settings"),messagehcol,0,messagetextcol,0,20)
|
||||||
|
' menuey[2]:=20
|
||||||
|
' separator(0,21,9)
|
||||||
|
' printfont(string("Programs"),messagehcol,0,messagetextcol,0,22)
|
||||||
|
' menuey[3]:=22
|
||||||
|
' separator(0,23,9)
|
||||||
|
' printfont(string("About"),messagehcol,0,messagetextcol,0,24)
|
||||||
|
' menuey[4]:=24
|
||||||
|
' separator(0,25,9)
|
||||||
|
printfont(string(" -EXIT- "),colors[messagehcol],0,colors[messagetextcol],0,27)
|
||||||
|
menuey[0]:=27
|
||||||
|
con '*************************************************** Popup-Menue *************************************************************************************************************
|
||||||
|
|
||||||
|
PRI popup(x,y,xx,yy)
|
||||||
|
ios.display2dbox(colors[messagehcol],y,x,yy,xx)
|
||||||
|
popupx:=x
|
||||||
|
popupy:=y
|
||||||
|
|
||||||
|
PRI popup_entry(num,strg,sep)
|
||||||
|
if sep==1
|
||||||
|
separator(popupx,popupy+num,popupx+6)
|
||||||
|
num+=1
|
||||||
|
printfont(strg,colors[messagehcol],0,colors[messagetextcol],popupx,popupy+num)
|
||||||
|
printfont(strg,colors[messagehcol],0,colors[messagetextcol],popupx,popupy+num)
|
||||||
|
'popentry[num]:=num
|
||||||
|
|
||||||
|
PRI Popup_Info_weg
|
||||||
|
if infomarker==1 'Infofenster sichtbar?
|
||||||
|
ios.restore(windowx[2],windowy[2],windowxx[2],windowyy[2]) 'Hintergrund wiederherstellen
|
||||||
|
'win_paraloesch(2) 'Info-Fenster-Parameter loeschen
|
||||||
|
infomarker:=0 'Marker loeschen
|
||||||
|
if popupmarker==1 'Popupmenue sichtbar?
|
||||||
|
ios.restore(popupx,popupy,popupx+6,popupy+7) 'Hintergrund wiederherstellen
|
||||||
|
popupmarker:=0 'Popupmarker loeschen
|
||||||
|
|
||||||
|
PRI popupselect(stri,x,y)
|
||||||
|
printfont(stri,colors[messagetextcol],0,colors[messagehcol],x,y)
|
||||||
|
repeat while ios.mouse_button(0)>0
|
||||||
|
printfont(stri,colors[messagehcol],0,colors[messagetextcol],x,y)
|
||||||
|
'popupmarker:=0
|
||||||
|
pri Buttonweg|i
|
||||||
|
repeat i from 0 to 7
|
||||||
|
buttonx[i]:=-1
|
||||||
|
buttony[i]:=-1
|
||||||
|
PRI rahmen(x,y,xx,yy)|i
|
||||||
|
win_tile(137,y,x)
|
||||||
|
win_tile(136,yy,x)
|
||||||
|
win_tile(157,y,xx)
|
||||||
|
win_tile(119,yy,xx)
|
||||||
|
repeat i from y+1 to yy-1
|
||||||
|
win_tile(2,i,x)
|
||||||
|
win_tile(114,i,xx)
|
||||||
|
line(x+1,y,xx-1)
|
||||||
|
line(x+1,yy,xx-1)
|
||||||
|
|
||||||
|
PRI line(x,y,xx)|i
|
||||||
|
repeat i from x to xx
|
||||||
|
win_tile(130,y,i)
|
||||||
|
|
||||||
|
con '---------------------------------------------- Ausgaberoutinen ---------------------------------------------------------------------------------------------------------------
|
||||||
|
PRI Win_Tile(nu,ty,tx)
|
||||||
|
ios.displaytile(nu,colors[winhcol],0,colors[act_color],ty,tx)
|
||||||
|
|
||||||
|
PRI FRAME_TILE(nu,ty,tx)
|
||||||
|
ios.displaytile(nu,colors[winhcol],0,colors[winframecol],ty,tx)
|
||||||
|
|
||||||
|
PRI TITEL_TILE(nu,ty,tx)
|
||||||
|
ios.displaytile(nu,colors[titelhcol],0,colors[titeltextcol],ty,tx)
|
||||||
|
|
||||||
|
PRI print_win(stradr,x,y)
|
||||||
|
printfont(stradr,colors[winhcol],0,colors[act_color],x,y)
|
||||||
|
|
||||||
|
PRI print_titel(stradr,x,y)
|
||||||
|
printfont(stradr,colors[titelhcol],0,colors[titeltextcol],x,y)
|
||||||
|
|
||||||
|
PRI Print_button(stradr,x,y)
|
||||||
|
printfont(stradr,colors[buttonhcol],0,colors[buttontextcol],x,y)
|
||||||
|
|
||||||
|
PRI print_status(stradr,x,y)
|
||||||
|
printfont(stradr,colors[hcolstatus],0,colors[statustextcol],x,y)
|
||||||
|
|
||||||
|
PRI print_message(stradr,x,y)
|
||||||
|
printfont(stradr,colors[messagehcol],0,colors[messagetextcol],x,y)
|
||||||
|
|
||||||
|
PRI printdec_win(n,y,x)
|
||||||
|
printdec(n,y,x,colors[winhcol],colors[act_color])
|
||||||
|
|
||||||
|
PRI printdec_titel(n,y,x)
|
||||||
|
printdec(n,y,x,colors[titelhcol],colors[titeltextcol])
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -338,8 +338,6 @@ PUB start: wflag 'system: ios initialisieren
|
||||||
|
|
||||||
serial:=0 'serielle Schnittstelle geschlossen
|
serial:=0 'serielle Schnittstelle geschlossen
|
||||||
|
|
||||||
ram_wrlong($7f54,$FFFFB)
|
|
||||||
'ram_wrbyte(0,$7f,$FFFFC)
|
|
||||||
sddmact(DM_USER) 'wieder in userverzeichnis wechseln
|
sddmact(DM_USER) 'wieder in userverzeichnis wechseln
|
||||||
lflagadr := ram_rdlong(LOADERPTR) 'adresse der loader-register setzen
|
lflagadr := ram_rdlong(LOADERPTR) 'adresse der loader-register setzen
|
||||||
|
|
||||||
|
@ -480,7 +478,7 @@ PUB ldbin(stradr) | len,i,stradr2 'loader: startet bin-datei über
|
||||||
len := strsize(stradr)
|
len := strsize(stradr)
|
||||||
stradr2 := lflagadr + 1 'adr = flag, adr + 1 = string
|
stradr2 := lflagadr + 1 'adr = flag, adr + 1 = string
|
||||||
repeat i from 0 to len - 1 'string in loadervariable kopieren
|
repeat i from 0 to len - 1 'string in loadervariable kopieren
|
||||||
byte[stradr2][i] := byte[stradr][i]
|
byte[stradr2][i] := byte[stradr][i]
|
||||||
byte[stradr2][++i] := 0 'string abschließen
|
byte[stradr2][++i] := 0 'string abschließen
|
||||||
byte[lflagadr][0] := 1 'loader starten
|
byte[lflagadr][0] := 1 'loader starten
|
||||||
|
|
||||||
|
@ -809,16 +807,8 @@ PUB sdxgetblk(adr,count)|i 'sd-card: block lesen --
|
||||||
bus_putchar1(gc#a_SDGETBLK)
|
bus_putchar1(gc#a_SDGETBLK)
|
||||||
bus_putlong1(count) 'laenge der Datei in byte
|
bus_putlong1(count) 'laenge der Datei in byte
|
||||||
repeat count
|
repeat count
|
||||||
'rd_put(fnr,bus_getchar1)
|
|
||||||
ram_wrbyte(bus_getchar1,adr++)
|
ram_wrbyte(bus_getchar1,adr++)
|
||||||
|
|
||||||
'PUB rd_put(adr,wert) | adr,fix 'ramdisk: nächstes byte in datei schreiben
|
|
||||||
'********** muss modifiziert werden ********************
|
|
||||||
'fix := fnr * FTCNT
|
|
||||||
'adr := ftab[fix+0] + ftab[fix+2]
|
|
||||||
' ram_wrbyte(0,wert,adr)
|
|
||||||
'rd_seek(fnr,ftab[fix+2]+1)
|
|
||||||
|
|
||||||
con '*********************************************** Blocktransfer test **************************************************************************************************
|
con '*********************************************** Blocktransfer test **************************************************************************************************
|
||||||
PUB sdxputblk(adr,count) 'sd-card: block schreiben <-- eRAM
|
PUB sdxputblk(adr,count) 'sd-card: block schreiben <-- eRAM
|
||||||
''funktionsgruppe : sdcard
|
''funktionsgruppe : sdcard
|
||||||
|
@ -1124,7 +1114,33 @@ pub Set_Bluetooth_Command_Mode
|
||||||
bus_putchar1(gc#a_bl_Command_On)
|
bus_putchar1(gc#a_bl_Command_On)
|
||||||
pub Clear_Bluetooth_Command_Mode
|
pub Clear_Bluetooth_Command_Mode
|
||||||
bus_putchar1(gc#a_bl_Command_Off)
|
bus_putchar1(gc#a_bl_Command_Off)
|
||||||
|
con'--------------------------------------------------- Funktionsgenerator --------------------------------------------------------------------------------------------------------
|
||||||
|
PUB Gen_Start_FunctionGenerator
|
||||||
|
bus_putchar1(gc#a_startFunctionGenerator)
|
||||||
|
PUB GEN_Stop_FunctionGenerator
|
||||||
|
bus_putchar1(gc#a_stopFunctionGenerator)
|
||||||
|
|
||||||
|
PUB Gen_SetPulseWidth(n)
|
||||||
|
bus_putchar1(gc#a_PulseWidth)
|
||||||
|
bus_putlong1(n)
|
||||||
|
PUB Gen_Frequency(n)
|
||||||
|
bus_putchar1(gc#a_Frequency_HZ)
|
||||||
|
bus_putlong1(n)
|
||||||
|
PUB Gen_DeziFrequency(n)
|
||||||
|
bus_putchar1(gc#a_Frequency_Centihz)
|
||||||
|
bus_putlong1(n)
|
||||||
|
PUB Gen_Waveform(n)
|
||||||
|
bus_putchar1(gc#a_SetWaveform)
|
||||||
|
bus_putchar1(n)
|
||||||
|
PUB Gen_DampLevel(n)
|
||||||
|
bus_putchar1(gc#a_SetDampLevel)
|
||||||
|
bus_putlong1(n)
|
||||||
|
PUB Gen_SetParameter(WaveformType, frequencyInHertz, dampLev, pulseWidthValue)
|
||||||
|
bus_putchar1(gc#a_setParameter)
|
||||||
|
bus_putchar1(WaveformType)
|
||||||
|
bus_putlong1(frequencyInHertz)
|
||||||
|
bus_putlong1(dampLev)
|
||||||
|
bus_putlong1(pulseWidthValue)
|
||||||
CON ''------------------------------------------------- LAN_FUNKTIONEN
|
CON ''------------------------------------------------- LAN_FUNKTIONEN
|
||||||
|
|
||||||
PUB lanstart 'LAN starten
|
PUB lanstart 'LAN starten
|
||||||
|
@ -2423,10 +2439,8 @@ PUB bus_getlong1: wert 'bus: long von administr
|
||||||
|
|
||||||
PUB bus_putlong1(wert) 'bus: long zu administra senden hsb/lsb
|
PUB bus_putlong1(wert) 'bus: long zu administra senden hsb/lsb
|
||||||
|
|
||||||
bus_putchar1(wert >> 24) '32bit wert senden hsb/lsb
|
repeat 4
|
||||||
bus_putchar1(wert >> 16)
|
bus_putchar1(wert <-= 8) '32bit wert senden hsb/lsb
|
||||||
bus_putchar1(wert >> 8)
|
|
||||||
bus_putchar1(wert)
|
|
||||||
|
|
||||||
PUB bus_getstr1: stradr | len,i 'bus: string von administra empfangen
|
PUB bus_getstr1: stradr | len,i 'bus: string von administra empfangen
|
||||||
|
|
||||||
|
@ -2537,11 +2551,14 @@ PUB bus_getlong2: wert 'bus: long von bellatrix
|
||||||
wert := wert + bus_getchar2
|
wert := wert + bus_getchar2
|
||||||
|
|
||||||
PUB bus_putlong2(wert) 'bus: long an bellatrix senden hsb/lsb
|
PUB bus_putlong2(wert) 'bus: long an bellatrix senden hsb/lsb
|
||||||
|
repeat 4
|
||||||
|
bus_putchar2(wert <-= 8) '32bit wert senden hsb/lsb
|
||||||
|
{
|
||||||
bus_putchar2(wert >> 24) '32bit wert senden hsb/lsb
|
bus_putchar2(wert >> 24) '32bit wert senden hsb/lsb
|
||||||
bus_putchar2(wert >> 16)
|
bus_putchar2(wert >> 16)
|
||||||
bus_putchar2(wert >> 8)
|
bus_putchar2(wert >> 8)
|
||||||
bus_putchar2(wert)
|
bus_putchar2(wert)
|
||||||
|
}
|
||||||
PUB bus_getword3: wert 'bus: 16 bit von venatrix empfangen hsb/lsb
|
PUB bus_getword3: wert 'bus: 16 bit von venatrix empfangen hsb/lsb
|
||||||
|
|
||||||
wert := bus_getchar3 << 8
|
wert := bus_getchar3 << 8
|
||||||
|
@ -2560,11 +2577,14 @@ PUB bus_getlong3: wert 'bus: long von venatrix
|
||||||
wert := wert + bus_getchar3
|
wert := wert + bus_getchar3
|
||||||
|
|
||||||
PUB bus_putlong3(wert) 'bus: long an venatrix senden hsb/lsb
|
PUB bus_putlong3(wert) 'bus: long an venatrix senden hsb/lsb
|
||||||
|
repeat 4
|
||||||
|
bus_putchar3(wert <-= 8) '32bit wert senden hsb/lsb
|
||||||
|
{
|
||||||
bus_putchar3(wert >> 24) '32bit wert senden hsb/lsb
|
bus_putchar3(wert >> 24) '32bit wert senden hsb/lsb
|
||||||
bus_putchar3(wert >> 16)
|
bus_putchar3(wert >> 16)
|
||||||
bus_putchar3(wert >> 8)
|
bus_putchar3(wert >> 8)
|
||||||
bus_putchar3(wert)
|
bus_putchar3(wert)
|
||||||
|
}
|
||||||
PUB bus_getstr3: stradr | len,i 'bus: string von administra empfangen
|
PUB bus_getstr3: stradr | len,i 'bus: string von administra empfangen
|
||||||
|
|
||||||
len := bus_getchar3 'längenbyte empfangen
|
len := bus_getchar3 'längenbyte empfangen
|
||||||
|
|
|
@ -591,7 +591,7 @@ PRI time|s 'Zeitanzeige in der Statusleiste
|
||||||
if timezaehler>50
|
if timezaehler>50
|
||||||
timezaehler:=0
|
timezaehler:=0
|
||||||
s:=ios.getminutes
|
s:=ios.getminutes
|
||||||
Status_extern(ios.dcf_sync,dcf_on,170,27,0,colors[titeltextcol],black) 'Anzeige des aktuellen Status in der Titelzeile
|
Status_extern(ios.dcf_sync,dcf_on,170,34,29,green,black) 'Anzeige des aktuellen Status in der Titelzeile
|
||||||
if s<>tmptime
|
if s<>tmptime
|
||||||
displaytime
|
displaytime
|
||||||
|
|
||||||
|
@ -600,10 +600,10 @@ PRI displaytime|h,m
|
||||||
h:=ios.gethours
|
h:=ios.gethours
|
||||||
m:=ios.getminutes
|
m:=ios.getminutes
|
||||||
|
|
||||||
print_zehner(h,29,34,colors[hcolstatus],colors[statustextcol])
|
print_zehner(h,29,35,colors[hcolstatus],colors[statustextcol])
|
||||||
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,36)
|
ios.displaytile(42,colors[hcolstatus],0,colors[statustextcol],29,37)
|
||||||
|
|
||||||
print_zehner(m,29,37,colors[hcolstatus],colors[statustextcol])
|
print_zehner(m,29,38,colors[hcolstatus],colors[statustextcol])
|
||||||
tmptime:=m
|
tmptime:=m
|
||||||
date
|
date
|
||||||
|
|
||||||
|
@ -626,12 +626,12 @@ pri print_zehner(wert,y,x,hin,vor)|a
|
||||||
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
pri Status_extern(wert1,wert2,tnr_act,x,y,col,f3)
|
||||||
|
|
||||||
if wert1==1
|
if wert1==1
|
||||||
ios.displaytile(tnr_act,colors[Titelhcol],col,f3,y,x) 'Status ok-anzeigen
|
ios.displaytile(tnr_act,colors[hcolstatus],col,f3,y,x) 'Status ok-anzeigen
|
||||||
else
|
else
|
||||||
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
if wert2 'Externe Komponente in Settingmenue ausgewählt?
|
||||||
ios.displaytile(tnr_act,colors[titelhcol],grey,0,y,x) 'Symbol grau
|
ios.displaytile(tnr_act,colors[hcolstatus],grey,0,y,x) 'Symbol grau
|
||||||
else
|
else
|
||||||
ios.displaytile(16,colors[Titelhcol],colors[titeltextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
ios.displaytile(16,colors[hcolstatus],colors[statustextcol],0,y,x) 'Ohne externe Komponente arbeiten (kein Symbol)
|
||||||
|
|
||||||
con'
|
con'
|
||||||
PRI doppelklick:click 'pseudo-doppelklick
|
PRI doppelklick:click 'pseudo-doppelklick
|
||||||
|
@ -692,6 +692,8 @@ PRI printfont(str1,a,b,c,d,e)|f
|
||||||
|
|
||||||
repeat strsize(str1)
|
repeat strsize(str1)
|
||||||
f:= byte[str1++]
|
f:= byte[str1++]
|
||||||
|
if f >96
|
||||||
|
f^=32
|
||||||
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
f-=16 'anderer Zeichensatz, Zeichen um -16 Positionen versetzt
|
||||||
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
if d>39 'wenn Bildschirmrand erreicht, neue Zeile
|
||||||
d:=0
|
d:=0
|
||||||
|
@ -722,12 +724,14 @@ con '************************************************** Button-Funktionen ******
|
||||||
|
|
||||||
PRI buttonpress(n)
|
PRI buttonpress(n)
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),250,0,0,0,29)
|
1:printfont(string("Start "),250,0,0,0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],250,colors[shellhcol],29,7)
|
||||||
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
4:printfont(@butOK,250,0,0,buttonx[n],buttony[n])
|
||||||
|
|
||||||
Mouse_Release
|
Mouse_Release
|
||||||
case n
|
case n
|
||||||
1:printfont(string("Start"),colors[hcolstatus],0,colors[statustextcol],0,29)
|
1:printfont(string("Start "),colors[hcolstatus],0,colors[statustextcol],0,29)
|
||||||
|
ios.displaytile(144,colors[shellhcol],colors[hcolstatus],colors[shellhcol],29,7)
|
||||||
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
4:printfont(@butOK,colors[Buttonhcol],0,colors[buttontextcol],buttonx[n],buttony[n])
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue