- plexbusroutinen eingefügt
- sd_del - heartbeat-sound angepasst 

belflash
- per compilerflag wählbare monitorsettings eingefügt (57/60hz)

basic.mod (propforth)
- bei der installation von trios mit forth muss basic.mod nur noch eingefügt werden, damit wird automatisch geflasht und neu gestartet

lib:
- adm-enc28j60 eingefügt, treiber netzwerkchip
- adm-socket eingefügt, netzwerksocket
- adm-plx code ausgebaut
- bel-vga monitorsettings
- glob-con plexbus/lan-konstanten eingefügt
- glob-led-engine neue lib für hbeat-led-pwm
- gui-dlbox - redraw beschleunigt
- gui-wbox - warnbox ist jetzt auch mit tab & esc bedienbar
- m-glob-con - konstanten für sound und plexbus eingefügt

reg-ios:
- testfunktion für rtc
- lan funktionen eingefügt
- plexbus funktionen eingefügt
- printblk - stringausgabe mit längenangabe

system/administra:
- admnet eingefügt

system/regnatix:
- fm - optimierungen und detailverbesserungen
- perplex - plexbus tool zugefügt
- regime - sysinfo zeigt jetzt auch devices am plexbus an
- man - systemklänge angepasst, damit nicht ständig der heartbeat beim lesen läuft
- ramtest - anpassungen maske/farben

dokumentation: 
- neustrukturierung der texte
This commit is contained in:
drohne235@gmail.com 2014-06-22 09:10:49 +00:00
parent 199de85356
commit 1540a2c2de
83 changed files with 4206 additions and 1193 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -481,5 +481,9 @@ wvariable lcog \ nummer interaktiven cog
: _ob onboot ;
: onboot _ob start ;
saveforth
reboot

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/sdcard/system/ftp.bin Normal file

Binary file not shown.

39
bin/sdcard/system/ftp.man Normal file
View File

@ -0,0 +1,39 @@
/h <a.b.c.d> : FTP-Server-Adresse (Host)
(default: mit ipconfig gesetzter Boot-Server)
/d <verzeichnis>: in entferntes Verzeichnis wechseln
(default: /hive/sdcard/system)
/f <dateiname> : Download <dateiname>
/u <username> : Benutzername am FTP-Server
(default: anonymous)
/p <password> : Paßwort am FTP-Server
(default: anonymous@hive<Hive-Id>)
/s : Datei auf SD-Card speichern
Ein Beispiel:
Zum Download von
ftp://1.2.3.4/verzeichnis/unterverzeichnis/datei.txt
verwendet man folgende Befehlszeile:
ftp /h 1.2.3.4 /d /verzeichnis/unterverzeichnis /f datei.txt
Dabei erfolgt die Anmeldung wegen der fehlenden Parameter
/u und /p als "anonymous" mit dem Paßwort "anonymous@hivexxx"
(xxx: mit ipconfig gesetzte Hive-Id). Die Datei wird in
der RAM-Disk gespeichert (s. Kommando "xdir") und könnte
mittels "xsave" auf SD-Card gespeichert werden.
Mit Nutzung aller Default-Werte genügt die Eingabe des
folgenden Befehls:
ftp /s /f ipconfig.bin
Damit wird die Datei "ipconfig.bin" vom FTP-Server mit der
IP-Adresse des mittels "ipconfig" konfigurierten Boot-
Servers aus dem Verzeichnis "/hive/sdcard/system" geladen
und im aktuellen Verzeichnis auf der SD-Card
abgespeichert. Von dort könnte sie direkt gestartet werden.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/sdcard/system/irc.bin Normal file

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.

View File

@ -1,18 +1,18 @@
/? : Hilfe
/l : Konfiguration anzeigen
----------- Administra-Funktionen
/ah 0|1 : hss ab-/anschalten
/aw 0|1 : wav ab-/anschalten
/as 0|1 : systemklänge ab-/anschalten
/al 0..100 : wav-lautstärke links
/ar 0..100 : wav-lautstärke rechts
/ah 0..15 : hss-lautstärke
/af : administra reset, flash booten
/at : transfergeschwindigkeit messen
----------- Bellatrix-Funktionen
/ci : farbtabelle anzeigen
/cs datei : farbtabelle speichern
/cl datei : farbtabelle laden
----------- Port-Funktionen
/po nr anz : Impulse an port ausgeben
/pi : Status der Port abfragen
/? : Hilfe
/l : Konfiguration anzeigen
---------------- Administra-Funktionen
/ah 0|1 : hss ab-/anschalten
/aw 0|1 : wav ab-/anschalten
/as 0|1 : systemklänge ab-/anschalten
/al 0..100 : wav-lautstärke links
/ar 0..100 : wav-lautstärke rechts
/ah 0..15 : hss-lautstärke
/af : administra reset, flash booten
/at : transfergeschwindigkeit messen
---------------- Bellatrix-Funktionen
/ci : farbtabelle anzeigen
/cs datei : farbtabelle speichern
/cl datei : farbtabelle laden
---------------- Port-Funktionen
/po nr anz time : Impulse an port ausgeben
/pi : Status der Port abfragen

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,23 @@
Einfache Installation:
Eine einfache Installation ist sowohl mit dem Propeller Tool von Parallax, als auch mit Brat's Spin Tool (BST) möglich. Die aktuelle Version von TriOS ist auf der Webseite zum Hive-Projekt zu finden.
Downloadlink TriOS: http://hive-project.de/downloads
Downloadlink Propeller Tool: http://www.parallax.com/downloads/propeller-tool-software
Downloadlink BST: http://www.fnarfbargle.com/bst.html
Nach dem entpacken der TriOS-Archivdatei findet man alle nötigen Dateien für eine Grundinstallation im Unterverzeichnis "bin". Die Installation erfolgt in zwei Schritten:
1. Vorbereitung des TriOS-Datenträgers (SD-Card)
2. Flashen der drei Propellerchips im Hive
1. TriOS-Disk: Die SD-Card muss im Format FAT16 oder FAT32 formatiert werden. Alle Dateien aus dem Unterverzeichnis "bin\sdcard" werden auf die Karte kopiert - fertig!
2. Flashen: Im Unterverzeichnis "bin\flash" befinden sich die Binary-Dateien für die drei Chips. Bei korrekt installiertem Propellertool oder BST wird bei einem Doppelklick auf diese Dateien das entsprechende Tool zum flashen gestarten. Nicht vergessen, den DIP-Switch auf dem Hiveboard auf den entsprechenden Chip einzustellen!
Bei eingelegter SD-Card und nach dem Flashen der drei Chipcodes startet TriOS automatisch die Kommandozeile "Regime" und ist betriebsbereit.
Im Tutorial "010 - Lizenz zum Löten! - Lang lebe die Königin" kannst du dir die Grundinstallation auch als Video anschauen: http://hive-project.de/content/3651
Viel Spaß! :)

View File

@ -0,0 +1,66 @@
Installation des Grundsystems:
==============================
TriOS kann in zwei Versionen installiert werden: Mit oder ohne Forth als integrierte Programmiersprache. Als Standard wird das System ohne Forth installiert. Die Installation ist so für den Einsteiger einfacher. Möchte man auch PropForth installieren, muß nur eine Konfiguration geändert werden und ein Basiswortschatz im Forth selbst kompiliert werden - keine Panik, klingt komplizierter als es ist! ;)
WICHTIG: Das System kann nur mit Brat's Spin Tool - kurz BST - compiliert werden. In den Einstellungen des Compilers (Tools/Compiler Preferences/Search Paths) muss das lib-Verzeichnis eingetragen werden.
Downloadlink BST: http://www.fnarfbargle.com/bst.html
Installation ohne Forth (Standard):
-----------------------------------
1. Mikrocontroller flashen:
\flash\administra\admflash.spin --> Administra
\flash\bellatrix\belflash.spin --> Bellatrix
\flash\regnatix\regflash.spin --> Regnatix
Installation mit Forth:
-----------------------
1. Umstellung auf Forth
In der Datei \flash\regnatix\regflash.spin kann über zwei Compilervariablen eingestellt werden, ob TriOS während dem Bootvorgang die Kommandozeile Regime oder PropForth startet. Dafür ist am Anfang der Datei folgende Sequenz zu suchen:
#define forth ' forth + spin-loader
'#define regime ' spin-loader OHNE FORTH, reg.sys wird sofort automatisch gestartet
Einfach "#define forth" aktivieren und die Datei speichern.
2. Mikrocontroller flashen:
Nacheinander die drei BIOS-Dateien in den Flash des entsprechenden Chips flashen.
\flash\administra\admflash.spin --> Administra
\flash\bellatrix\belflash.spin --> Bellatrix
\flash\regnatix\regflash.spin --> Regnatix
3. Der Schalter bleibt ab jetzt auf Regnatix stehen. Ein Terminalprogramm (ich verwende Tera Term) starten und 57600 Baud auf die Schnittstelle vom Hive (DIP steht auf Regnatix!) einstellen. Nach einem Reset meldet sich das Propforth im Terminalprogramm auf dem Hostcomputer. Datei "forth\basics.mod" in einem Editor öffnen, alles markieren, kopieren und im Terminal einfügen. Der Quelltext wird jetzt im Forth compiliert. Sind alle Erweiterungen compiliert, wird automatisch das Forth in den Flash geschrieben.
Nach einem automatischen Reset sollte sich das Forth jetzt komplett mit seinem Prompt sowohl auf dem angeschlossenen VGA-Monitor, als auch im Terminal melden. Im Prinzip benötigen wir nun das Terminalprogramm nicht mehr und können direkt am Hive arbeiten. Später, wenn man in Forth programmiert, ist die vorhandene Terminalschnittstelle aber manchmal sehr nützlich.
Erstellen der SDCard:
---------------------
Im Prinzip kann jede normale FAT16/32 Karte verwendet werden. Lange Dateinamen werden nicht verwendet, Unterverzeichnisse sind kein Problem. Es ist sinnvoll, alle Dateien aus dem Verzeichnis "bin\sd-card\" auf die SD-Karte zu kopieren.
Das Verzeichnis "system" hat eine besondere Bedeutung: Hier sollten sich die Tools, Erweiterungen und Bibliotheken befinden. Im PropForth: Mit dem Kommando "sys name.f" kann aus jedem anderen Verzeichnis ohne Wechsel eine Datei name.f im Verzeichnis System geladen und compiliert werden.
Systemstart:
------------
Beim Systemstart wird immer das Forth aus dem EEPROM gestartet. So kann, wie mit den klassischen Homecomputern, sofort unkompliziert programmiert werden. Neben dem Forth gibt es im TriOS noch ein in Spin programmiertes Betriebssystem, welches sich dem Benutzer durch den Kommandointerpreter Regime präsentiert. Aus dem Forth kann diese mit dem Kommando "regime" gestartet werden. Im Gegenzug kann im laufenden Regime mit dem Kommando "forth" wieder zur integrierten Programmiersprache gewechselt werden.
Wurde TriOS ohne Forth installiert, wird der Loader aus dem EEPROM gestartet und sofort die Kommandozeile "Regime" aus der Datei reg.sys gestartet.

View File

@ -0,0 +1,100 @@
Regime im Überblick
===================
Da wir ja drei verschiedene Teilsystem in unserem Computer haben, muss Regime wissen, für welchen Chip eine ausführbare Datei bestimmt ist. Den Typ ausführbarer Dateien kann Regime automatisch anhand der Dateinamenserweiterung unterscheiden:
*.bin Regnatix-Code
*.bel Bellatrix-Code
*.adm Administra-Code
Dabei genügt es, den Namen ohne Erweiterung einzugeben. Dennoch kann es vorkommen, das man eine normale Spin-Datei mit einer beliebigen Erweiterung gespeichert hat. Diese Datei kann man dann mit den Kommandos rload, aload oder bload ganz gezielt in einen Chip laden.
<dateiname> - bin/adm/bel-datei wird gestartet
mount - SD-aufwerk mounten
unmount - SD-Laufwerk freigeben
dir wh - Verzeichnis anzeigen
type <sd:fn> - Anzeige einer Textdatei
aload <sd:fn> - Administra-Code laden
bload <sd:fn> - Bellatrix-Code laden
rload <sd:fn> - Regnatix-Code laden
del <sd:fn> - Datei löschen
cls - Bildschirm löschen
free - Anzeige des freien Speichers auf SD-Card
attrib <sd:fn> ashr - Dateiattribute ändern
cd <sd:dir> - Verzeichnis wechseln
mkdir <sd:dir> - Verzeichnis erstellen
rename <sd:fn1> <sd:fn2> - datei/verzeichnis umbenennen
format <volname> - SD-Laufwerk formatieren
reboot - Hive neu starten
sysinfo - Systeminformationen
color <0..7> - Farbe wählen
cogs - Belegung der COG's anzeigen
dmlist - Anzeige der Verzeichnis-Marker
dm <r/s/u/a/b/c> - Marker-Verzeichnis wechseln
dmset <r/s/u/a/b/c> - Marker setzen
dmclr <r/s/u/a/b/c> - Marker löschen
forth - Forth starten
Marker:
r - Marker für Root-Verzeichnis
s - Marker für System-Verzeichnis
u - Marker für User-Verzeichnis
a/b/c - Benutzerdefinierte Verzeichnismarker
Die r, s, u-Marker werden vom System automatisch gesetzt und intern verwendet.
RAMDISK:
xload <sd:fn> - Datei von SD-Laufwerk in RAM laden
xsave <x:fn> - Datei aus RAM auf SD-Laufwerk speichern
xdir - Verzeichnis im RAM anzeigen
xrename <x:fn1> <x:fn2> - Datei im RAM umbenennen
xdel <x:fn> - Datei im RAM löschen
xtype <x:fn> - Textdatei im RAM anzeigen
EXTERNE KOMMANDOS:
------------------
Die meisten Kommandozeilentools zeigen mit dem Parameter /? eine Liste der Optionen an.
beltest - Testprogramm für Bellatrix-Funktionen
charmap - Ausgabe des aktuellen nutzbaren Zeichensatzes
eram - Debugtool für eRAM/Ramdisk
flash - Flash-Tool für EEProms > 32 KByte
fm - [F]ile [M]anager
fterm - minimalstes Terminal für PropForth-Experimente
ftp - FTP-Downloadprogramm
g0test - Testprogramm der Grafikmodus 0 Funktionen (TV)
hplay - HSS-Player
ipconfig - Setup für Netzwerkparameter (IP/GW usw.)
irc - IRC-Client
keycode - Tastaturcodes anzeigen
m - Startcode für mental unter TriOS (sofern installiert)
man - Anzeige von Manual-Pages
perplex - PlexBus-Tool
ramtest - eRAM Testprogramm
rom - startet ein Image aus dem EEPROM > 32 KByte
sfxtool - HSS-Soundeffekte erstellen
splay - SID-Player
sysconf - Systemeinstellungen
tapecut - Tool um eine Containerdatei (Tape) für mental zu erzeugen
time - Zeit/Datum anzeigen bzw. im RTC setzen
wplay - WAV-Player
yplay - Yamaha-Soundchip-Player
Bellatrix-Codes:
vga - VGA 1024 x 768 Pixel, 64 x 24 Zeichen
htext - VGA 1024 x 768 Pixel, 128 x 48 Zeichen
tv - TV-Textmodus 40 x 13 Zeichen
Administra-Codes:
admay - Yamaha-Soundchip-Emulation
admnet - LAN + HSS-Light-Sound
admsid - SID-Chip-Emulation
admsys - HSS/WAV-Sound (Defaultcode)

View File

@ -0,0 +1,135 @@
Forth im Überblick:
===================
Einige nützliche Kommandos befinden sich in dem Modul tools.mod. In den meisten Fällen ist es sinnvoll dieses Modul mit der Befehlssequenz "sys tools.mod saveforth" fest im Forth einzubinden.
Wichtige Tastencodes:
---------------------
[ESC]-1 Screen 1, COG 1
[ESC]-2 Screen 2, COG 2
[ESC]-3 Screen 3, COG 3
[ESC]-b Break, Reset der aktuellen COG
[ESC]-r Reset, Neustart Regnatix
Wichtige Kommandos:
-------------------
load <name> - Datei laden und comilieren, Ausgabe Screen 3
dload <name> - wie load, aber Ausgabe aktueller Screen
sys <name> - Datei aus sys-Verzeichnis laden und compilieren
ls - Dateiliste
lsl - Dateiliste- Long-Format
cd <name> - in Verzeichniss wechseln
mount - SD-Card einbinden
unmount - SD-Card freigeben
words - Anzeige Wöterbuch
mod? - (tools.mod) Anzeige compilierter Erweiterungen
lib? - (tools.mod) Anzeige compilierter Bibliotheken
cog? - (tools.mod) Anzeige COG-Liste
cat <name> - (tools.mod) Ausgabe einer Textdatei
less <name> - (tools.mod) Zeilenweise Textausgabe
dm? - (tools.mod) Anzeige der Systemverzeichnisse
regime - CLI starten
aload <name> - Adminsitra-Code laden
bload <name> - Bellatrix-Code laden
spin <name> - Spin-Programm starten
Wichtige Dateien:
-----------------
Die Dateien *.mod und *.lib enthalten ganz normale Forth-Quelltexte. Damit hat man schnell eine Übersicht über die grobe Funktion dieser Quellen: Lib's sind halt reine Sammlungen von Worten zu einer bestimmten Funktionsgruppe und MOD's sind mehr oder weniger fertige und abgeschlossene Programme. Ein Beispiel:
Die Datei hss.lib enthält Worte um die HSS-Funktionen von Administra anzusprechen. Mit diesen Funktionen kann man nun ein Modul (Programm) wie einen HSS-Soundplayer schreiben.
Im Gegensatz dazu die Datei splay.mod: Mit diesem Modul wird ein HSS-Soundplayer ins System eingefügt, welcher Funktionen aus der hss.lib verwendet.
Die Datei benötigt man aber mehr oder weniger nur zur Entwicklung, ein fertiges Modul wie splay.mod enthält dann schon die die entsprechenden HSS-Worte die benötigt werden.
Die ifnot: ... Anweisung sorgt dabei dafür, dass keine Funktionen doppelt in das Wörterbuch compiliert werden. Das ist quasi ein verteiltes und fein granuliertes Konzept analog zu einer DLL. Die Forth-Version funktioniert dabei aber im Gegensatz zu DLL's nicht auf Bibliotheks-, sondern auf Funktionsebene.
*.mod Module, Forth-Erweiterungen für das System
*.lib Bibliotheken, grundlegende Wortsammlungen
*.adm Administra-Code (z.Bsp. admsid.adm für SIDCog-Code)
*.bel Bellatrix-Code
*.bin Spin-Code, im Normalfall zur Ausführung in Regnatix
basics.f - (mod:basics) Hive-Core für PropForth
ari.lib - (lib:ari) Zusätzliche arithmetische Funktionen
cog.lib - (lib:cog) Zusätzliche COG-Funktionen
adm.lib - (lib:adm) Administra-Chipmanagment-Funktionen
hss.lib - (lib:hss) Bibliothek für Hydra-Sound-System
sfx.lib - (lib:sfx) Soundeffekt-Bibliothek
wav.lib - (lib:wav) Wave-Soundbibliothek
bel.lib - (lib:bel) Bellatrix-Chipmanagment-Funktionen
key.lib - (lib:key) Tastatur-Bibliothek
scr.lib - (lib:scr) Screen-Bibliothek
sd0.lib - (lib:sd0) SD-Card-Bibliothek
debug.f - Nützliche Worte zur Fehlersuche und Entwicklung
rom.f - EEPROM-Dateisystem
tools.f - Nützliche Tools (cat, less, dm?...)
hplay.f - HSS-Player
wplay.f - WAV-Player
splay.f - SID-Player
Administra-Codedateien im SYS-Verzeichnis:
admled.adm Testprogramm - HBeat-LED blinken lassen
admsid.adm SidCog-Version (wird von splay benötigt)
admsys.adm Standardcode für ADM mit SD/HSS/WAV
admym.adm Yamaha-Soundchip-Version
aterm96.adm Mini-OS für Administra (Testzwecke)
Reset-Fehlercodes:
------------------
0011FFFF - stack overflow
0012FFFF - return stack overflow
0021FFFF - stack underflow
0022FFFF - return stack underflow
8100FFFF - no free cogs
8200FFFF - no free main memory
8400FFFF - fl no free main memory
8500FFFF - no free cog memory
8800FFFF - eeprom write error
9000FFFF - eeprom read error
.err-Fehlercodes:
-----------------
0 no error
1 fsys unmounted
2 fsys corrupted
3 fsys unsupported
4 not found
5 file not found
6 dir not found
7 file read only
8 end of file
9 end of directory
10 end of root
11 dir is full
12 dir is not empty
13 checksum error
14 reboot error
15 bpb corrupt
16 fsi corrupt
17 dir already exist
18 file already exist
19 out of disk free space
20 disk io error
21 command not found
22 timeout
23 parameter error

192
doku/5-lan.txt Normal file
View File

@ -0,0 +1,192 @@
####################
# TriOS R56 Netzwerk
####################
Einleitung
==========
Dies ist eine Implementierung von Netzwerk-Funktionen in die aktuelle Version
von TriOS (R56). Als erste Anwendungen sind enthalten:
- Ein FTP-Client, welcher Dateien von einem FTP-Server downloaden und in der
RAM-Disk im eRAM oder auf SD-Card abspeichern kann.
- Ein vollständiger IRC-Client
Zukünftige Erweiterungen, wie die Integration in Regime und direktes Starten
von Programmen aus dem Netzwerk sind geplant.
Implementierung
===============
Es wurde ein neuer Administra-Code erstellt, welcher direkt geflasht werden
kann oder zur Laufzeit geladen wird. Grundlage ist das originale admflash.spin.
Aus diesem wurden aus Platzgründen alle Soundfunktionen entfernt und dafür
die unveränderten Netzwerk-Treiber von Harrison Pham integriert.
Für die Kommunikation über den Hive-Bus wurden die wesentlichen Funktionen
des Netzwerk-Treibers zur Verfügung gestellt. Die Implementierung weiterer
Funktionen des Original-Treibers ist bei Bedarf möglich.
Die IP-Konfiguration des Hive wird im NVRAM des RTC gespeichert. Das hat
den Vorteil, daß der Hive zukünftig auch ganz ohne SD-Card arbeiten kann,
also quasi aus dem Netzwerk bootet. Ist kein RTC vorhanden (wird automatisch
erkannt), erfolgt das Speichern der Konfiguration auf der SD-Card unter
/system/nvram.sav.
Installation
============
Binär:
------
Voraussetzung ist die Installation eines aktuellen TriOS im Flash von
Administra, Bellatrix und Regnatix sowie auf der zugehörigen SD-Card. In das
Verzeichnis "/system" auf der SD-Card werden die Dateien des Verzeichnisses
"system" des vorliegenden Installations-Archives kopiert:
admnet.adm: Administra mit Netzwerk-Funktionen, ohne Sound
ipconfig.bin: IP-Konfigurationsprogramm
ftp.bin: FTP-Client
irc.bin: IRC-Client
Quellen:
--------
Das Verzeichniss "src" des vorliegenden Archives wird in die vorhandene TriOS-
Struktur (R56) kopiert. Damit werden die folgenden Dateien durch geänderte
Versionen ersetzt:
lib/glob-con.spin
lib/reg-ios.spin
Wer dort eigene Änderungen vorgenommen hat, sollte sich die Änderungen in den
beiliegenden Patches (glob-con.spin.diff und reg-ios.spin.diff) ansehen und
selbst einpflegen.
Folgende SPIN-Dateien können dann mittels BST übersetzt werden:
system/administra/admnet/admnet.spin
system/regnatix/ipconfig.spin
system/regnatix/ftp.spin
system/regnatix/irc.spin
Das übersetzte admnet.spin kann direkt in Administra geflasht oder als
"system/admnet.adm" auf die SD-Card kopiert werden. ipconfig.bin und ftp.bin
gehören dann ebenfalls auf die SD-Card ins system-Verzeichnis.
Wer die make.bat benutzt: Damit sollte ipconfig.spin, ftp.spin und irc.spin
automatisch mit übersetzt werden, admnet.spin müßte man noch ergänzen.
TriOS-R56-Network-src.tar.bz2 enthält die zur Entwicklung genutzten kompletten
Sourcen. Hier wurden alle SPIN-Dateien nach UTF-8 gewandelt und auf Linux-
Zeilenumbruch (LF) konvertiert. Außerdem ist ein Build-Script (make.sh) für
Linux enthalten. In diesem können #defines für Debugging-Ausgaben und
alternative Locales (z.Z. Englisch) gesetzt werden.
Nutzung
=======
Allgemeines
-----------
Der Netzwerk-Stack in Administra wird erst gestartet, wenn er benötigt wird.
Auch danach sollte man sich nicht wundern, daß der Hive nicht per Ping
angesprochen werden kann: Aus Platzgründen enthält der Netzwerk-Stack keinen
ICMP-Code. Dieser könnte auf Wunsch aber recht einfach hinzugefügt werden.
Administra
----------
Voraussetzung ist, daß Administra mit dem Netzwerk-Code läuft. Das geschieht
entweder durch direktes Flashen von admnet.spin oder durch Eingabe von
"admnet" am Regime-Prompt.
IP-Konfiguration
----------------
Mittels "ipconfig" wird die IP-Konfiguration im NVRAM oder als Datei abgelegt.
Folgende Parameter kennt ipconfig:
/? : Hilfe
/l : Konfiguration anzeigen
/a <a.b.c.d> : IP-Adresse setzen
/m <x.x.x.x> : Netzwerk-Maske setzen
/g <e.f.g.h> : Gateway setzen
/d <i.j.k.l> : DNS-Server setzen
/b <m.n.o.p> : Boot-Server setzen
/i <Id> : Hive-Id setzen
Aus der Hive-Id wird eine eindeutige Mac-Adresse erzeugt.
DNS-Abfragen werden noch nicht unterstützt, deswegen muß man den DNS-Server
nicht konfigurieren. Der Boot-Server wird derzeit vom FTP-Client als Default-
Server genutzt (s.u.).
FTP-Client
----------
Der FTP-Client ist aktuell eine sehr einfache Implementierung und dient primär
zum Testen der Funktion des Netzwerk-Stacks.
Der Download funktioniert nur, wenn der FTP-Server das Kommando "SIZE"
versteht. Obwohl das kein Standard-Kommando ist, wird es von den meisten
FTP-Servern unterstützt. Außerdem wird nur passives FTP verwendet.
Folgende Parameter kennt der FTP-Client:
/h <a.b.c.d> : FTP-Server-Adresse (Host)
(default: mit ipconfig gesetzter Boot-Server)
/d <verzeichnis>: in entferntes Verzeichnis wechseln
(default: /hive/sdcard/system)
/f <dateiname> : Download <dateiname>
/u <username> : Benutzername am FTP-Server
(default: anonymous)
/p <password> : Paßwort am FTP-Server
(default: anonymous@hive<Hive-Id>)
/s : Datei auf SD-Card speichern
Dabei ist zu beachten, daß auf Grund der fehlenden Namensauflösung die IP-
Adresse und nicht der Host-Name des Servers angegeben wird. Weitere
Einschränkungen ergeben sich durch die maximale Parameter-Länge von 64
Zeichen in Regime und maximal 12 Zeichen lange Dateinamen in der RAM-Disk.
Ein Beispiel:
Zum Download von ftp://1.2.3.4/verzeichnis/unterverzeichnis/datei.txt
verwendet man folgende Befehlszeile:
ftp /h 1.2.3.4 /d /verzeichnis/unterverzeichnis /f datei.txt
Dabei erfolgt die Anmeldung wegen der fehlenden Parameter /u und /p als
"anonymous" mit dem Paßwort "anonymous@hivexxx" (xxx: mit ipconfig gesetzte
Hive-Id). Die Datei wird in der RAM-Disk gespeichert (s. Kommando "xdir")
und könnte mittels "xsave" auf SD-Card gespeichert werden.
Mit Nutzung aller Default-Werte genügt die Eingabe des folgenden Befehls:
ftp /s /f ipconfig.bin
Damit wird die Datei "ipconfig.bin" vom FTP-Server mit der IP-Adresse
des mittels "ipconfig" konfigurierten Boot-Servers aus dem Verzeichnis
"/hive/sdcard/system" geladen und im aktuellen Verzeichnis auf der SD-Card
abgespeichert. Von dort könnte sie direkt gestartet werden.
Getestet wurde mit einer lokalen Installation von "pure-ftpd" und den FTP-
Servern der TU Chemnitz sowie des GnuPG-Projektes.
IRC-Client
----------
siehe IRC.README.txt
Schlußbemerkung
===============
Fragen können im Hive-Forum (http://hive-project.de/board/) gestellt werden
oder direkt an joergd@bitquell.de
Viel Spaß - Jörg

149
doku/6-irc-client.txt Normal file
View File

@ -0,0 +1,149 @@
IRC
IRC-Client für den Hive
Author: Jörg Deckert (joergd@bitquell.de)
===============================================================================
Einleitung
==========
Dies ist ein IRC-Client für den Hive (http://hive-project.de). Er sollte auf
jedem Hive mit bestücktem Netzwerk-Interface funktionieren.
Die Idee des IRC-Clients stammt von PropIRC, einem Projekt von Harrison Pham,
welches aus einer Propeller-basierten Hardware ausschließlich für diesen Zweck
besteht (http://classic.parallax.com/tabid/701/Default.aspx). Der Administra-
Netzwerk-Stack nutzt darüber hinaus die Treiber von Harrison Pham.
Der vorliegende IRC-Client hat mit PropIRC ansonsten nicht viel gemein, sondern
stellt einen ausgewachsenen IRC-Client mit den meisten der üblichen
Funktionalitäten dar.
Installation
============
Der Hive IRC-Client ist Bestandteil des TriOS Netzwerk-Paketes. Die aktuellste
Version steht immer im ersten Beitrag des zugehörigen Forum-Threads unter
http://hive-project.de/board/viewtopic.php?f=7&t=968 zur Verfügung.
Die Installation ist wie im Download-Archiv beschrieben vorzunehmen. Dabei wird
auch der IRC-Client in das System-Verzeichnis der TriOS SD-Card kopiert und
kann von dort gestartet werden.
Testserver
==========
Für erste Versuche mit IRC steht ein eigener Server zur Verfügung. Dieser kann
wie folgt erreicht werden:
IRC-Server (IP-Adresse:Port): 88.198.147.76:6667
nutzbarer Channel: #hive
Nutzung
=======
Start
-----
Der IRC-Client benötigt den Netzwerk-Code in Administra. Dieser kann direkt in
Administra geflasht oder durch Eingabe von "admnet" geladen werden. Beim Start
prüft der IRC-Client das Vorhandensein der Netzwerk-Funktionalitäten. Sind
diese nicht vorhanden, wird automatisch versucht, "/system/admnet.adm" von der
SD-Card zu laden.
Außerdem muß der Hive natürlich an ein Netzwerk mit Internet-Verbindung
angeschlossen sein und mittels "ipconfig" entsprechend konfiguriert werden.
Der Start erfolgt dann einfach durch Eingabe von "irc" am Regime-Prompt. Beim
ersten Start wird automatisch die Konfiguration aufgerufen. Nach Eingabe der
erforderlichen Parameter (s.u.) werden diese gespeichert. Nun kann mittels
Drücken von "F3" die Verbindung zum Server aufgebaut werden.
Bedienung
---------
Der IRC-Client besteht aus 3 Fenstern. Im großen oberen werden die Chat-
Mitteilungen ausgegeben. Im mittleren erscheinen verschiedene Statusmeldungen.
Im untersten Fenster werden die Mitteilungen und Befehle eingegeben.
Das aktive Fenster wird jeweils hervorgehoben und kann mittels Tabulator-Taste
umgeschalten werden. Im aktiven Fenster kann mittels Cursor hoch/runter
gescrollt werden (außer im Eingabefenster).
Die Bedienung erfolgt durch Betätigung der Funktionstasten oder die Eingabe
von Befehlen im EingabeFenster (s.u.). Alle Befehle beginnen mit einem
Schrägstrich (/).
Beim Erscheinen einer neuen Mitteilung im aktuellen Kanal blinkt die Regnatix-
LED so lange, bis eine beliebige Taste gedrückt wird. Außerdem wird ein Sound
abgespielt.
Befehlsübersicht
----------------
Funktionstaste Eingabe
--------------+-------+-------------------------------------------------
F1 Hilfe
F2 /set Alle Einstellungen bearbeiten und abspeichern
F3 Mit Server verbinden, anmelden und Kanal betreten
F4 /join Kanal betreten (/join #<Kanal>)
F5 /part Aktuellen Kanal verlassen (/part <Mitteilung>)
F6 /nick Nicknamen ändern (/nick <neuer Nick>)
F7 /user Username ändern
F8 /pass Paßwort ändern
F9 /quit Verbindung zu Server trennen
F10 Programm beenden
/msg Private Mitteilung (/msg <Empfänger> <Text>)
/srv Mit Server verbinden und anmelden (srv <IP:Port>)
/save Einstellungen speichern
Tab Fenster umschalten, Scrollen mit Cursor hoch/runter
Alle anderen mit '/' beginnenden Eingaben sind Befehle an den Server. Alle
Eingaben, welche nicht mit '/' beginnen, sind eine öffentliche Mitteilung an
den aktuellen Kanal.
Einstellungen
-------------
Durch Drücken von "F2" oder Eingabe von "/set" werden alle notwendigen
Einstellungen (Server, Paßwort, Nickname, Username, Channel) abgefragt und
gespeichert. Zur Erstkonfiguration sollten in jedem Fall alle Parameter
mittels "F2" oder "/set" gesetzt werden.
Die Einstellungen sind auch einzeln über die in der Befehls-Übersicht
angegebenen Funktionstasten bzw. Befehle erreichbar. Mittel Eingabe
über Befehle kann die gewünschte Einstellung meist auch als Parameter
mitgegeben werden. Im Gegensatz zu "F2" bzw. "/set" werden hier teilweise
auch gleich online die entsprechenden Änderungen vorgenommen ("F6" bzw. "/nick"
ändert z.B. sofort den aktuellen Nicknamen).
Da der Hive derzeit keine Namensauflösung unterstützt, muß der Server mit IP-
Adresse und Port angegeben werden. Die IP-Adresse kann an einem PC mittels
Ping oder NSLookup ermittelt werden, der Port ist meist 6667.
Der Nickname ist der Name, unter welchem man aktuell seine Mitteilungen
schreibt. Dieser kann jederzeit geändert werden. Demgegenüber ist der Username
der Name, mit welchem man sich beim Server anmeldet. Dessen Änderung wirkt sich
nur bei einer erneuten Anmeldung aus. Nickname und Username können auch
identisch sein.
Bei der Anmeldung am Server wird auch ein vollständiger Name übertragen. Da es
unüblich ist, hier seinen richtigen Namen anzugeben, wird stattdessen ein Name
in der Form "Hive #<HiveId>" generiert. <HiveId> ist der mittels "ipconfig /i"
definierte Wert.
TODO
====
- offene Eingabefenster blockieren nicht den IRC-Empfang
- Support für mehrere gleichzeitige Channel

View File

@ -1,797 +0,0 @@
{\rtf1\ansi\ansicpg1252\cocoartf949
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Verdana;}
{\colortbl;\red255\green255\blue255;\red0\green5\blue50;\red238\green238\blue238;}
\margl1440\margr1440\vieww12580\viewh18760\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\f0\b\fs24 \cf0 \ul \ulc0 FemtoBasic Manual - Version 3.006
\b0 \ulnone \
\
Program lines consist of a line number from 1 to 65535, then a space,\
then one or more statements separated by a colon (":"). Most statements\
can be given without a line number and will be executed immediately if so.\
\
If a line is entered with the same line number as that of an existing line in\
the current program, the existing line is deleted and the new line is stored.\
\
A line number by itself may be entered. Any existing line in the current\
program with the same line number will be deleted. No new line will be\
stored.\
\
When FemtoBasic is first started after a Propeller reset, if an SD card is\
provided and it has a file "autoexec.bas" in its root directory, then the\
line 'LOAD "autoexec.bas" : RUN' is automatically executed.\
\
The ESC key is a "break key". If it is entered, the running program will\
stop after the current statement finishes executing. PAUSE and IRBRECV\
are handled specially so the "break key" can interrupt their execution.\
\
Pre-compiled binaries are provided for both a VGA display and a TV\
display and for either the Propeller Demo Board, Propeller Proto Board,\
or a Hydra. The Hydra version cannot use an SD card with a VGA\
display because the SD card interface uses the same I/O pins as the\
VGA display. The names of the binary files indicate which display and\
board they are intended for.\
\
The basic SD card wiring is shown below. "Pull-up" refers to a 20K\
pull up resistor from the pin indicated to +3.3V. For the Demo Board\
version, the pins are as indicated below. For the Proto Board version,\
P0 = I/O pin 8, P1 = I/O pin 9, P2 = I/O pin 10, and P3 = I/O pin 11. For\
the Hydra version, P0 = I/O pin 16, P1 = I/O pin 17, P2 = I/O pin 18, and\
P3 = I/O pin 19.\
\
\pard\pardeftab720\ql\qnatural
\f1 \cf2 \cb3 SD CARD Socket Pin-out:\
\'a0\
PIN\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 SD CARD\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 Propeller\
-----------------------------------------------------\
\'a01\'a0(NC)\
\'a02\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-9) DAT2\'a0\'a0\'a0 Pull-up\
\'a03\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0(PIN-1) CS\'a0\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0 P3\
\'a04\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-2) DI\'a0\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0\'a0 P2\
\'a05\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-3) GND\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 GND\
\'a06\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-4) +3.3\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 VCC\
\'a07\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-5) CLK\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0\'a0 P1\
\'a08\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-6) GND\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 GND\'a0\'a0\'a0\'a0\'a0 \
\'a09\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-7) DO\'a0\'a0\'a0\'a0\'a0 Pull-up\'a0\'a0\'a0\'a0 P0\
10\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0 (PIN-8) DAT1\'a0\'a0 Pull-up\
11\'a0(CD SW)\
\f0 \cf0 \cb1 \
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\b \cf0 \ul Expressions\
\b0 \ulnone \
Expressions consist of variables, constants, and "pseudo-variables"\
that function like variables, but may have complex actions like FILE or\
EEPROM[5]. Constants may be decimal, hexadecimal (prefixed with "$"),\
or binary (prefixed with "%"). All expressions use 32-bit integer values.\
\
<var>\
\
There are 26 variables designated by the letters A through Z.\
Upper and lower case letters are equivalent.\
\
INA [ <expr> \{.. <expr>\} ]\
\
This has the value of the specified input pin or pins. If two pin values are\
given, the first is the most significant bit number and the second is the\
least significant bit number of the value. The pin or pins specified are\
changed to input mode (the default).\
\
BYTE [ <expr> ]\
\
This has the value of the main memory byte at the address provided.\
\
WORD [ <expr> ]\
\
This has the value of the main memory word at the address provided.\
The least significant bit of the address is ignored.\
\
LONG [ <expr> ]\
\
This has the value of the main memory long word at the address provided.\
The least significant two bits of the address are ignored.\
\
EEPROM [ <expr> \{, <expr>\} ]\
\
This has the value of the byte in the EEPROM attached to the boot I2C bus\
(on pins 28-29) at the address specified. If two expressions are provided,\
the first gives the pin number of the SCL line of the EEPROM while the\
second expression is the address. The address may be any value from\
zero to $7FFFF and the upper 3 bits are used to form the device select code.\
\
FILE\
\
This has the value of the next byte in the currently open SD card file or -1\
at the end of the file. The file must be open for reading.\
\
MEM\
\
This has the value of the amount of space available for program storage.\
\
CNT\
\
The current system clock value.\
\
PHSA\
\
The cog counter phase register A value.\
\
PHSB\
\
The cog counter phase register B value.\
\
FRQA\
\
The cog counter frequency register A value.\
\
FRQB\
\
The cog counter frequency register B value.\
\
CTRA\
\
The cog counter control register A value.\
\
CTRB\
\
The cog counter control register B value.\
\
KEYCODE\
\
The value of the next keyboard key value or zero if the keyboard buffer\
is empty.\
\
RND <expr>\
\
The value is a pseudo-random number in the range zero to one less than\
that of the expression given.\
\
- <expr>\
! <expr>\
\
"-" is negate. "!" is bit-wise logical not.\
\
<9> SHL <9>\
<9> SHR <9>\
<9> ROL <9>\
<9> ROR <9>\
<9> SAR <9>\
<9> REV <9>\
\
"SHL" is logical shift left. "SHR" is logical shift right. "ROL" is rotate left.\
"ROR" is rotate right. "SAR" is arithmetic shift right. "REV" is bit reverse.\
In all cases, the value to be shifted is the left operand and the shift count\
is the right operand. "REV" reverses the order of the specified number of\
least significant bits with the most significant bits set to zero.\
\
<8> & <8>\
\
"&" is bit-wise logical and.\
\
<7> | <7>\
\
"|" is bit-wise logical or\
\
<6> *<6>\
<6> / <6>\
<6> // <6>\
\
"*" is a 32 bit unsigned multiplication. "/" is the quotient of a 32 bit unsigned\
division. "//" is the remainder of a 32 bit unsigned division.\
\
<5> + <5>\
<5> - <5>\
\
"+" is a 32 bit addition. "-" is a 32 bit subtraction\
\
<4> = <4>\
<4> < <4>\
<4> > <4>\
<4> <= <4>\
<4> >= <4>\
<4> <> <4>\
\
"=" is equal to. "<" is less than. ">" is greater than.\
"<=" is less than or equal to. ">=" is greater or equal to.\
"<>" is not equal to.\
\
NOT <3>\
\
"NOT" is logical not.\
\
<2> AND <2>\
\
"AND" is logical and.\
\
<1> OR <1>\
\
"OR" is logical or.\
\
Note that the numbers in the brackets (<n>) are used to\
indicate the operator precedence.\
\
\b \ul Statements
\b0 \ulnone \
\
Note that multiple statements may be given on a line separated by\
a colon (":"). There are some restrictions on what can be combined on\
a line. These are described in the individual statements' descriptions.\
\
\{LET\} <var> = <expr>\
\
Set the variable <var> to the value of the expression <expr>.\
\
INPUT \{ "<prompt>";\} <var> \{,<var>\}\
\
If given, the <prompt> is displayed and an input line may be entered.\
For each variable given, an expression is evaluated from the input line.\
The expressions may be separated by commas (",") or, if unambiguous,\
by spaces. These expressions may contain variable names, operators,\
or "pseudo-variables". If more expressions are given than variables,\
the excess are ignored. An error is treated as if it occurred on the line\
where the INPUT statement is given.\
\
PRINT \{\{"<string>" | <expr> \} \{, | ;\}\}\
\
A series of expressions or string constants are given, separated by\
commas (",") or semicolons (";"). If a comma is used, enough spaces\
are inserted to display the next item at the next display column divisible\
by 8. If a semicolon is used, the next item begins at the next column.\
If the statement ends with a comma or semicolon, an end of line is not\
inserted. A PRINT statement by itself causes an end of line to be displayed\
\
GOTO <expr>\
\
Go to the label whose value is equal to the expression\
\
GOSUB <expr>\
\
Call (as a subroutine) the label whose value is equal to the expression.\
Note that a GOSUB must be the only or last statement on a line.\
\
RETURN\
\
Return from a GOSUB call\
\
REM <comment>\
\
The rest of the line in the program is considered part of the comment and\
is otherwise ignored.\
\
NEW\
\
Erase the current program and clear all the variables.\
\
LIST \{<expr> \{,<expr>\}\}\
\
List the current program. If no expressions are given, the whole program\
is listed. If one expression is given, that line is listed. If two expressions\
are given, all lines between those two values are listed.\
\
RUN\
\
Clear all the variables (to zero) and start executing the current program\
from the first line.\
\
OPEN "<file>", \{R | W | A \}\
\
Open the specified file on the SD card in the mode requested (R - read,\
W - write, A - append). If a file is already open, it is closed first. Only one\
file may be open at a time.\
\
READ <var> \{,<var>\}\
\
Read a line from the currently opened SD card file and set the variables\
specified to the expressions supplied on that line. The expressions may\
be separated by commas or, if unambiguous, may be separated by spaces.\
These expressions may be any expression including operators, variables,\
pseudo-variables (like CNT). Effectively, this is as if "<var> = <expr>" were\
executed for each variable given and each expression in the SD card file.\
\
WRITE \{\{"<string>" | <expr> \} \{, | ;\}\}\
\
This works just like the PRINT statement except that the characters produced\
are written to the currently opened SD card file. An end of line is written as\
a carriage return / line feed pair (ASCII CR/LF ... 13, 10).\
\
CLOSE\
\
Close the currently opened SD card file, if any.\
\
DELETE "<file>"\
\
Delete the specified SD card file. Any opened SD card file will be closed.\
\
RENAME "<file>", "<file>"\
\
Rename the specified SD card file. Any opened SD card file will be closed.\
This is not currently implemented and will produce an error message.\
\
FILES\
\
List all files on the SD card (at the root level). Neither subdirectories nor the files\
within them are included in this listing. Any opened SD card file will be closed.\
\
SAVE\
\
Save the current program to an otherwise unused area in the boot EEPROM.\
Note that downloading a program to the EEPROM using the Propeller Tool or\
an equivalent downloading program will erase any saved program.\
\
SAVE [ <expr> \{, <expr>\} ]\
\
This saves the current program in the EEPROM attached to the boot I2C bus\
(on pins 28-29) at the address specified. If two expressions are provided,\
the first gives the pin number of the SCL line of the EEPROM while the\
second expression is the address. The address may be any value from\
zero to $7FFFF and the upper 3 bits are used to form the device select code.\
The address is adjusted to 2 bytes below the next 64 byte boundary and the\
total program length is stored in those two bytes followed by the program itself.\
If the address is adjusted upwards, only the last two bytes of that 64 byte block\
are changed.\
\
SAVE "<file>"\
\
Save the current program to the specified file on a SD card. Any existing file\
by that name will be overwritten with the program which will be saved in text\
file format, as if they were displayed with the LIST statement.\
\
LOAD\
\
Erase the current program and load in a program previously saved with the\
SAVE statement.\
\
LOAD [ <expr> \{, <expr>\} ]\
\
Erase the current program and load in a program previously saved with the\
SAVE [ <expr> \{, <expr>\} ] statement.\
\
LOAD "<file>"\
\
Erase the current program and load in a program from an SD card file. This\
program must be in text format, just as if it were to be typed in. All lines must\
be numbered (with a line number) except lines that are completely blank.\
\
FOR <var> = <expr> TO <expr> \{STEP <expr>\}\
\
This sets up a standard Basic FOR/NEXT loop. The variable is set to the value\
of the first expression and tested against the limit given by the value of the\
second expression (which is evaluated only once). The optional step size\
may be positive or negative. If negative, the limit test is appropriately changed.\
The FOR statement must be the last statement on a multi-statement line and\
improperly nested FOR/NEXT statement pairs may cause incorrect execution\
without an error message. Default STEP value is +1.\
\
NEXT <var>\
\
This terminates a standard Basic FOR/NEXT loop. The STEP value is added\
to the variable and the result is tested against the limit value. If still within the\
limit, program execution continues with the statement after the matching FOR\
statement. If not, execution continues with the next statement.\
\
OUTA [ <expr> \{.. <expr>\} ] = <expr>\
\
This sets the specified output pin or pins to the expression to the right of the\
assignment. If one pin value is given, that is the pin to be changed. If two\
pin values are given, the first is the most significant bit number and the\
second is the least significant bit number of the value. The pin or pins\
specified are changed to output mode.\
\
PAUSE <expr> \{, <expr>\}\
\
The program is paused for the number of milliseconds given by the first\
(or only) value given. If two values are given, the first is in milliseconds\
while the second is in microseconds and they're added together for the\
total pause time. The minimum pause time is 50us. If the pause time is\
more than 10ms, The pause statement is interrupted after 10ms and\
reexecuted with a 10ms shorter pause time. This is to allow for the\
interruption of the program using a "break key". The PAUSE statement\
must be the first or only statement on a line.\
\
BYTE [ <expr> ] = <expr>\
\
This sets the value of the main memory byte at the address provided to\
the expression on the right side of the assignment.\
\
WORD [ <expr> ] = <expr>\
\
This sets the value of the main memory word at the address provided to\
the expression on the right side of the assignment. The least significant\
bit of the address is ignored.\
\
LONG [ <expr> ] = <expr>\
\
This sets the value of the main memory long word at the address provided\
to the expression on the right side of the assignment. The least significant\
two bits of the address are ignored.\
\
PHSA = <expr>\
\
Set the cog counter phase register A to the expression.\
\
PHSB = <expr>\
\
Set the cog counter phase register B to the expression.\
\
FRQA = <expr>\
\
Set the cog counter frequency register A to the expression.\
\
FRQB = <expr>\
\
Set the cog counter frequency register B to the expression.\
\
CTRA = <expr>\
\
Set the cog counter control register A to the expression.\
\
CTRB = <expr>\
\
Set the cog counter control register B to the expression.\
\
DISPLAY <expr> \{, <expr> \}\
\
Send the specified byte values to the display driver. The specific control\
codes, their parameters, and their meaning depend on the display driver.\
See the display driver documentation for descriptions.\
\
STOP\
\
Stop execution of the program.\
\
END\
\
Stop execution of the program (works like STOP).\
\
EEPROM [ <expr> \{, <expr>\} ] = <expr>\
\
This sets the value of the byte in the EEPROM attached to the boot I2C bus\
(on pins 28-29) at the address specified. If two expressions are provided,\
the first gives the pin number of the SCL line of the EEPROM while the\
second expression is the address. The address may be any value from\
zero to $7FFFF and the upper 3 bits are used to form the device select code.\
\
FILE = <expr>\
\
This sets the value of the next byte in the currently open SD card file.\
The file must be open for writing or appending.\
\
SPIN [ <expr> \{, <expr> \} ]\
\
This causes a Spin program to be loaded into the Propeller's main memory\
from a 32K EEPROM "page". If only one expression is provided, it is the\
starting address in a 512K byte address space made up of one or more\
EEPROMs attached to the I2C bus on Propeller pins 28 (SCL) and 29 (SDA).\
The boot EEPROM is the first 32K of this address space. The lower order\
15 bits of the address are ignored so the loading process always begins on\
a 32K byte boundary. If two expressions are provided, the first gives the\
pin number of the SCL line of the EEPROM while the second expression\
gives the starting address. The address may be any value from zero to\
$7FFFF and the upper 3 bits are used to form the device select code.\
Once the Spin program has been successfully loaded, it begins execution.\
The loaded Spin program completely replaces the running FemtoBasic.\
\
SPIN "<file>"\
\
This causes a Spin program to be loaded into the Propeller's main memory\
from a specified file on an attached SD card. This file should be a copy of\
the binary form of a Spin program as saved from the Propeller Tool.\
Once the Spin program has been successfully loaded, it begins execution.\
The loaded Spin program completely replaces the running FemtoBasic.\
\
DUMP <expr> , <expr>\
\
This displays a portion of the Propeller's main memory. The first expression\
gives the starting address and the second expression gives the number\
of bytes to be displayed. The information is formatted 8 bytes per line with\
both hexadecimal and ASCII displayed.\
\
DUMP [ <expr> \{, <expr> \} ] , <expr>\
\
This displays a portion of the EEPROM. The last expression gives the number\
of bytes to be displayed. The first portion describes a starting address in EEPROM.\
See the SPIN statement for a description of the values.\
\
COPY [ <expr> \{, <expr>\} ] , [ <expr> \{, <expr>\}]\
\
This copies a Spin program from the first 32K byte EEPROM "page" specified\
to the second. As with the SPIN statement, if only one expression is supplied,\
it provides the starting EEPROM address. If two are supplied, the first is the\
pin number of the SCL line while the seconds is the EEPROM address.\
The amount of data copied is taken from the beginning of the Spin program\
binary file.\
\
COPY "<file>" , [ <expr> \{, <expr>\}]\
\
This copies a Spin program from an SD card file to a 32K byte EEPROM "page".\
\
COPY [ <expr> \{, <expr>\} ] , "<file>"\
\
This copies a Spin program from a 32K byte EEPROM "page" to an SD card file.\
\
\b \ul BOE-BOT Extensions
\b0 \ulnone \
\
The BOE-BOT version of FemtoBasic is similar to the regular version\
except that it uses a full duplex serial port for its keyboard input and\
display output and several "pseudo-variables" and statements have\
been added to control servos, a PING distance sensor, IR distance\
sensors, and an HM55B compass connected via a PCA9554 I2C\
I/O Expander. A Propeller Proto Board or equivalent is assumed.\
\
The left servo is connected to I/O pin 0, the right servo to pin 1, and the\
PING bracket servo to pin 2. An IR detector is connected to pin 3 and\
an IR LED is connected to pin 4. The PING control signal is connected\
to pin 5. The "console" receive line is pin 6 and the transmit line is pin 7.\
This "console" is implemented using a configured xBee transceiver.\
A PCA9554 I2C I/O Expander is connected to the boot EEPROM bus\
using I/O pins 28 (SCL) and 29 (SDA).\
\
The HM55B Ena pin is connected to PCA9554 I/O pin 0. The Clk pin\
is connected to pin1. DI is connected to pin 2 and DO to pin 3.\
\
Two different binary versions are provided. One uses the programming\
serial port for the "console" (BoeBotBasicUS.binary) and the other uses\
pins 6 and 7 for wireless operation via an xBee transceiver\
(BoeBotBasicXB.binary).\
\
\b \ul Expressions
\b0 \ulnone \
\
PING\
\
This value is the distance in mm of the last PING reading (one-way). It\
will be zero if a new reading has been initiated, but a value isn't ready yet.\
\
IRZONE [ <expr> , <expr> , <expr> ]\
\
The first expression is the center frequency (in Hz). The second expression\
is the number of zones. The third expression is the width of a zone (in Hz).\
The IR emitter frequency is swept from the last zone to the center frequency\
with about 200 cycles of each frequency emitted per zone. This value is the\
number of the first zone where a response is detected (#zones-1 to 0) or -1\
to indicate that no response was detected.\
\
EXPAND [ <expr> ]\
\
This is the value of the PCA9554 I2C I/O Expander's register whose address\
is supplied.\
\
COMPASS\
\
This value is the compass heading in brads (0 to 359 degrees is the same\
as 0-255).\
\
\b \ul Statements
\b0 \ulnone \
\
SRVLEFT \{[ <expr> ]\} = <expr>\
SRVRIGHT \{[ <expr> ]\} = <expr>\
SRVPING \{[ <expr> ]\} = <expr>\
\
Send a pulse stream to the specified servo with a width (in us) given by the\
expression on the right side of the assignment. If a square bracketed\
expression is provided, this is the number of pulses to send (at 20ms intervals).\
If no pulse count is provided, the pulse train continues indefinitely. If either the\
pulse count is zero or the pulse width is zero, the pulse train will stop. The\
pulse width must lie between 500us and 2500us.\
\
PING\
\
Initiates a new PING cycle. The one-way path length will be zero until the new\
reading is complete.\
\
COMPASS <var> , <var>\
\
Reads the raw x and y values of the HM55B compass and assign them to the\
first and second variables specified respectively.\
\
EXPAND [ <expr> ] = <expr>\
\
The PCA9554 I2C I/O Expander's register whose address is supplied is set\
to the value on the right side of the assignment.\
\
\b \ul IR Buddy Extensions
\b0 \ulnone \
\
The IR Buddy version of FemtoBasic is identical to the regular version\
except that statements have been added to control one or more IR Buddy\
devices. These may be connected to any otherwise available I/O pin.\
\
\b \ul Statements
\b0 \ulnone \
\
IRBSEND <expr>\
\
The expression is the I/O pin number to be used. This resets the IR Buddy.\
\
IRBSEND <expr> , <expr> \{, <expr>\}\
\
The first expression is the I/O pin to be used. The remaining expressions\
are byte values to be sent to the IR Buddy (at 9600 Baud).\
\
IRBRECV <expr> , <expr> , <var> \{, <var>\}\
\
The first expression is the I/O pin to be used. The second expression is\
an initial timeout (in ms) to use. Subsequent timeouts are 10ms. The\
number of bytes specified are received, one in each variable. If a timeout\
occurs, that variable and all subsequent ones are set to -1.\
\
\b \ul uOLED-96-Prop Extensions
\b0 \ulnone \
\
UOLED SETUP\
\
Initialize the uOLED-96-Prop. This must be done before any other operations are done.\
\
UOLED START\
\
Power up the screen electronics and display any data previously written to graphics RAM.\
\
UOLED STOP\
\
Power down the screen electronics without disturbing any data in graphics RAM.\
\
UOLED LEVEL <expr>\
\
Set the master contrast setting (range 0-15).\
\
UOLED COLOR <R> , <G> , <B>\
\
Set the individual color contrast values (range 0-255).\
\
UOLED DIM <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt>\
\
Dim a designated screen window given the coordinates of the left upper corner and the\
right lower corner.\
\
UOLED PIXEL <X> , <Y> , <R> , <G> , <B>\
\
Writes 2 bytes of color data to the pixel at the coordinate specified. The color information\
range is 0-255.\
\
UOLED SCROLL SETUP <X> , <Y> , <Address> , <# Lines> , <Interval>\
\
X is he number of columns of horizontal offset. Y is the number of lines of vertical offset.\
Address is the starting line address. # Lines is the number of lines to be scrolled\
horizontally. Interval is the time interval between scroll steps. 0 = 6 frames, 1 = 10 frames,\
2 = 100 frames, and 3 = 200 frames.\
\
UOLED SCROLL START\
\
Activate the scrolling function as set up previously\
\
UOLED SCROLL STOP\
\
Deactivate the scrolling function\
\
UOLED LINE <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt> , <R> , <G> , <B>\
\
Display a line from the specified left upper corner to the specified right lower corner in the color\
specified.\
\
UOLED RECT <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt> , <R> , <G> , <B> \{, <R> , <G> , <B>\}\
\
Display a rectangle from the specified left upper corner to the specified right lower corner of the\
display. The first set of color values is used for the outline color. If the second set of color values\
is given, it's used for the fill color. If not, the outline color is used for the fill color as well.\
\
UOLED COPY <X Up Lt> , <Y Up Lt> , <X Lo Rt> , <Y Lo Rt> , <X Up Lt Dest> , <Y Up Lt Dest>\
\
Copy one area of the display screen to another. The left upper corner and the right lower corner\
of the source area is supplied followed by the left upper corner of the destination area.\
\
UOLED TEXT <X> , <Y> , <R> , <G> , <B> , " ... "\
UOLED TEXT <X> , <Y> , <R> , <G> , <B> , <expr>\
\
Display text using the current font starting at the coordinates provided. These are in terms of character\
positions, not pixels (range X: 0-11/15, Y: 0-7). Wraparound occurs at the right and bottom of the display.\
The first form displays the contents of the string while the second form displays the decimally\
formatted value of the expression given with a leading minus sign if negative. With the 5x7 font, there\
are 16 characters per line. With the 8x8 font, there are 12 characters per line.\
\
UOLED TEXT <R> , <G> , <B>\
\
Set the default background color for text. It's set to black during the initialization of FemtoBasic.\
\
UOLED TEXT <Font>\
\
Set the current font. 0 - 5x7 font. 1 - 8x8 font (default).\
\
UOLED ERASE\
\
Erase the screen (to black).\
\
UOLED RESET\
\
Resets the display. You must do a UOLED SETUP afterwards.\
\
UOLED CIRCLE <X> , <Y> , <Rad> , <R> , <G> , <B>\
\
Display a circle whose center is at X,Y and whose radius is Rad using the color specified. If Rad\
is negative, the circle is filled with the color specified and the radius is the absolute value of Rad.\
\
UOLED CIRCLE <X> , <Y> , <Rad> , <Arc> , <R> , <G> , <B>\
\
Display a one eighth circle arc whose center is at X,Y and whose radius is Rad using the color\
specified. If Rad is negative, the one eighth circle pie slice is filled with the color specified and\
the radius is the absolute value of Rad. Arc indicates which one eighth circle is to be displayed.\
1 - 0 to 45 degrees, 2 - 45 to 90 degrees, 3 - 90 to 135 degrees, 4 - 135 to 180 degrees.\
\
\b \ul HC-OSD Extensions
\b0 \ulnone \
\
The Hitt Consulting's Overlay Screen Display version uses the PS/2 keyboard for input and the\
overlay screen driver for output. None of the commands that use SD card files are present.\
\
\b \ul Expressions
\b0 \ulnone \
\
SERIAL [ <timeout> ]\
\
The parameter is a timeout in milliseconds. This returns the character received from the 19.2Kbps\
serial interface or a -1 if the timeout occurs.\
\
SERCHK [ <break> ]\
\
The parameter is a character. This searches the entire buffered serial input stream for the speciied\
character and returns true (-1) if the character is present and false (0) otherwise. The serial buffer\
is not changed.\
\
TIME [ <expr> ]\
\
If the value is between 0 and 6, this returns the binary value of the most recently read time unit\
(0 - Seconds, 1 - Minutes, 2 - Hours, 3 - Day of Week, 4 - Day, 5 - Month, 6 - Year). If the value\
is 7, this returns the control register value read from the DS1307. For values from 8 to 63, this\
returns the value stored in the DS1307's RAM at that address.\
\
GPS [ <expr> ]\
\
If the value is negative, this returns the next character from the GPS serial buffer with the absolute\
value of the expression used as a timeout in milliseconds. It returns a -1 if the timeout is exceeded.\
If the value is positive, this returns a character from the saved GPS phrase whose index is the\
value provided. It returns a -1 if the value is out of range or if there's no saved GPS phrase.\
\
\b \ul Statements
\b0 \ulnone \
\
TIME\
\
This reads the current time from the DS1307 into an internal buffer used by TIME [ <expr> ].\
\
TIME [ <address> ] = <expr>\
\
This writes the expression on the right side of the "=" into the control register or RAM whose address\
is given. Addresses less than 7 or greater than 63 are not allowed.\
\
TIME <Sec> , <Min> , <Hrs> , <DOW> , <Day> , <Mth> , <Yr>\
\
This writes the time / date indicated to the appropriate locations in the DS1307 clock. The values are\
given in binary and are translated to BCD. The BCD values are also stored in the internal buffer\
used by TIME [ <expr> ]. The BCD values are written to the DS1307 in a single operation.\
\
GPS\
\
This starts up a background routine (in a cog) that discards any buffered GPS phrase, then begins\
discarding any buffered serial input up to the first "$" character which begins the next GPS phrase.\
Characters are then stored in the internal GPS phrase buffer (used by GPS [ <expr> ]) until a "*" is\
seen. The next two characters must be hexadecimal values which are used as a checksum for the\
phrase. If the checksum is invalid, the phrase is discarded and the routine begins searching for the\
next phrase. If this background routine is already active, it is stopped and any saved information\
is discarded before starting it again. Once this background routine successfully finds a complete\
GPS phrase, it stops itself.\
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,3 +1,49 @@
r57
admflash
- plexbusroutinen eingefügt
- sd_del - heartbeat-sound angepasst
belflash
- per compilerflag wählbare monitorsettings eingefügt (57/60hz)
basic.mod (propforth)
- bei der installation von trios mit forth muss basic.mod nur noch eingefügt werden, damit wird automatisch geflasht und neu gestartet
lib:
- adm-enc28j60 eingefügt, treiber netzwerkchip
- adm-socket eingefügt, netzwerksocket
- adm-plx code ausgebaut
- bel-vga monitorsettings
- glob-con plexbus/lan-konstanten eingefügt
- glob-led-engine neue lib für hbeat-led-pwm
- gui-dlbox - redraw beschleunigt
- gui-wbox - warnbox ist jetzt auch mit tab & esc bedienbar
- m-glob-con - konstanten für sound und plexbus eingefügt
reg-ios:
- testfunktion für rtc
- lan funktionen eingefügt
- plexbus funktionen eingefügt
- printblk - stringausgabe mit längenangabe
system/administra:
- admnet eingefügt
system/regnatix:
- fm - optimierungen und detailverbesserungen
- perplex - plexbus tool zugefügt
- regime - sysinfo zeigt jetzt auch devices am plexbus an
- man - systemklänge angepasst, damit nicht ständig der heartbeat beim lesen läuft
- ramtest - anpassungen maske/farben
dokumentation:
- neustrukturierung der texte
r56 - 11-05-2013-dr235
und weiter gehts mit dem frühjahresputz:

View File

@ -17,7 +17,6 @@ Informationen zum Projekt
-------------------------------------------------------------------------
http://hive-project.de
Urheberrechtsangabe
-------------------------------------------------------------------------
Copyright (c) 2009 Ingo Kripahle
Copyright (c) 2009 Ingo Kripahle

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -481,5 +481,9 @@ wvariable lcog \ nummer interaktiven cog
: _ob onboot ;
: onboot _ob start ;
saveforth
reboot

View File

@ -1,275 +0,0 @@

1. Installation des Grundsystems
2. Regime im Überblick
3. Forth im Überblick
1. Installation des Grundsystems:
=================================
TriOS kann in zwei Versionen installiert werden: Mit oder ohne Forth als integrierte Programmiersprache. Als Standard wird das System ohne Forth installiert. Die Installation ist so für den Einsteiger einfacher. Möchte man auch PropForth installieren, muß nur eine Konfiguration geändert werden und ein Basiswortschatz im Forth selbst kompiliert werden.
WICHTIG: Das System kann nur mit Brat's Spin Tool - kurz BST - compiliert werden. In den Einstellungen des Compilers (Tools/Compiler Preferences/Search Paths) muss das lib-Verzeichnis eingetragen werden.
Downloadlink BST: http://www.fnarfbargle.com/bst.html
Installation ohne Forth (Standard):
-----------------------------------
1. Mikrocontroller flashen:
\flash\administra\admflash.spin --> Administra
\flash\bellatrix\belflash.spin --> Bellatrix
\flash\regnatix\regflash.spin --> Regnatix
Installation mit Forth:
-----------------------
1. Mikrocontroller flashen:
\flash\administra\admflash.spin --> Administra
\flash\bellatrix\belflash.spin --> Bellatrix
\flash\regnatix\regflash.spin --> Regnatix
2. Der Schalter bleibt ab jetzt auf Regnatix stehen. Ein Terminalprogramm (ich verwende Tera Term) starten und 57600 Baud auf die Schnittstelle vom Hive (DIP steht auf Regnatix!) einstellen. Nach einem Reset meldet sich das Propforth im Terminalprogramm auf dem Hostcomputer. Datei "forth\basics.mod" in einem Editor öffnen, alles markieren, kopieren und im Terminal einfügen. Der Quelltext wird jetzt im Forth compiliert.
3. Im Terminalfenster, also im Forth, dass Kommendo "saveforth" eingeben. Damit wird das gesamte Forthsystem mit der gerade neu compilierten Erweiterungen wieder im EEPROM als Image gespeichert.
Nach einem Reset sollte sich das Forth jetzt komplett mit seinem Prompt sowohl auf dem angeschlossenen VGA-Monitor, als auch im Terminal melden. Im Prinzip benötigen wir nun das Terminalprogramm nicht mehr und können direkt am Hive arbeiten. Später, wenn man in Forth programmiert, ist die vorhandene Terminalschnittstelle aber manchmal sehr nützlich.
Erstellen der SDCard:
---------------------
Im Prinzip kann jede normale FAT16/32 Karte verwendet werden. Lange Dateinamen werden nicht verwendet, Unterverzeichnisse sind kein Problem. Es ist sinnvoll, alle Dateien aus dem Verzeichnis "bin\sd-card\" auf die SD-Karte zu kopieren.
Das Verzeichnis "system" hat eine besondere Bedeutung: Hier sollten sich die Tools, Erweiterungen und Bibliotheken befinden. Im PropForth: Mit dem Kommando "sys name.f" kann aus jedem anderen Verzeichnis ohne Wechsel eine Datei name.f im Verzeichnis System geladen und compiliert werden.
Systemstart:
------------
Beim Systemstart wird immer das Forth aus dem EEPROM gestartet. So kann, wie mit den klassischen Homecomputern, sofort unkompliziert programmiert werden. Neben dem Forth gibt es im TriOS noch ein in Spin programmiertes Betriebssystem, welches sich dem Benutzer durch den Kommandointerpreter Regime präsentiert. Aus dem Forth kann diese mit dem Kommando "regime" gestartet werden. Im Gegenzug kann im laufenden Regime mit dem Kommando "forth" wieder zur integrierten Programmiersprache gewechselt werden.
Wurde TriOS ohne Forth installiert, wird der Loader aus dem EEPROM gestartet und sofort die Kommandozeile "Regime" aus der Datei reg.sys gestartet.
3. Regime im Überblick
======================
Da wir ja drei verschiedene Teilsystem in unserem Computer haben, muss Regime wissen, für welchen Chip eine ausführbare Datei bestimmt ist. Den Typ ausführbarer Dateien kann Regime automatisch anhand der Dateinamenserweiterung unterscheiden:
*.bin Regnatix-Code
*.bel Bellatrix-Code
*.adm Administra-Code
Dabei genügt es, den Namen ohne Erweiterung einzugeben. Dennoch kann es vorkommen, das man eine normale Spin-Datei mit einer beliebigen Erweiterung gespeichert hat. Diese Datei kann man dann mit den Kommandos rload, aload oder bload ganz gezielt in einen Chip laden.
<dateiname> - bin/adm/bel-datei wird gestartet
mount - SD-aufwerk mounten
unmount - SD-Laufwerk freigeben
dir wh - Verzeichnis anzeigen
type <sd:fn> - Anzeige einer Textdatei
aload <sd:fn> - Administra-Code laden
bload <sd:fn> - Bellatrix-Code laden
rload <sd:fn> - Regnatix-Code laden
del <sd:fn> - Datei löschen
cls - Bildschirm löschen
free - Anzeige des freien Speichers auf SD-Card
attrib <sd:fn> ashr - Dateiattribute ändern
cd <sd:dir> - Verzeichnis wechseln
mkdir <sd:dir> - Verzeichnis erstellen
rename <sd:fn1> <sd:fn2> - datei/verzeichnis umbenennen
format <volname> - SD-Laufwerk formatieren
reboot - Hive neu starten
sysinfo - Systeminformationen
color <0..7> - Farbe wählen
cogs - Belegung der COG's anzeigen
dmlist - Anzeige der Verzeichnis-Marker
dm <r/s/u/a/b/c> - Marker-Verzeichnis wechseln
dmset <r/s/u/a/b/c> - Marker setzen
dmclr <r/s/u/a/b/c> - Marker löschen
forth - Forth starten
Marker:
r - Marker für Root-Verzeichnis
s - Marker für System-Verzeichnis
u - Marker für User-Verzeichnis
a/b/c - Benutzerdefinierte Verzeichnismarker
Die r, s, u-Marker werden vom System automatisch gesetzt und intern verwendet.
RAMDISK:
xload <sd:fn> - Datei von SD-Laufwerk in RAM laden
xsave <x:fn> - Datei aus RAM auf SD-Laufwerk speichern
xdir - Verzeichnis im RAM anzeigen
xrename <x:fn1> <x:fn2> - Datei im RAM umbenennen
xdel <x:fn> - Datei im RAM löschen
xtype <x:fn> - Textdatei im RAM anzeigen
EXTERNE KOMMANDOS:
------------------
Die meisten Kommandozeilentools zeigen mit dem Parameter /? eine Liste der Optionen an.
sysconf - Systemeinstellungen
hplay - HSS-Player
wplay - WAV-Player
splay - SID-Player
yplay - Yamaha-Soundchip-Player
sfxtool - HSS-Soundeffekte erstellen
vga.bin - VGA 1024 x 768 Pixel, 64 x 24 Zeichen
htext.bin - VGA 1024 x 768 Pixel, 128 x 48 Zeichen
tv.bin - TV-Textmodus 40 x 13 Zeichen
2. Forth im Überblick:
======================
Einige nützliche Kommandos befinden sich in dem Modul tools.mod. In den meisten Fällen ist es sinnvoll dieses Modul mit der Befehlssequenz "sys tools.mod saveforth" fest im Forth einzubinden.
Wichtige Tastencodes:
---------------------
[ESC]-1 Screen 1, COG 1
[ESC]-2 Screen 2, COG 2
[ESC]-3 Screen 3, COG 3
[ESC]-b Break, Reset der aktuellen COG
[ESC]-r Reset, Neustart Regnatix
Wichtige Kommandos:
-------------------
load <name> - Datei laden und comilieren, Ausgabe Screen 3
dload <name> - wie load, aber Ausgabe aktueller Screen
sys <name> - Datei aus sys-Verzeichnis laden und compilieren
ls - Dateiliste
lsl - Dateiliste- Long-Format
cd <name> - in Verzeichniss wechseln
mount - SD-Card einbinden
unmount - SD-Card freigeben
words - Anzeige Wöterbuch
mod? - (tools.mod) Anzeige compilierter Erweiterungen
lib? - (tools.mod) Anzeige compilierter Bibliotheken
cog? - (tools.mod) Anzeige COG-Liste
cat <name> - (tools.mod) Ausgabe einer Textdatei
less <name> - (tools.mod) Zeilenweise Textausgabe
dm? - (tools.mod) Anzeige der Systemverzeichnisse
regime - CLI starten
aload <name> - Adminsitra-Code laden
bload <name> - Bellatrix-Code laden
spin <name> - Spin-Programm starten
Wichtige Dateien:
-----------------
Die Dateien *.mod und *.lib enthalten ganz normale Forth-Quelltexte. Damit hat man schnell eine Übersicht über die grobe Funktion dieser Quellen: Lib's sind halt reine Sammlungen von Worten zu einer bestimmten Funktionsgruppe und MOD's sind mehr oder weniger fertige und abgeschlossene Programme. Ein Beispiel:
Die Datei hss.lib enthält Worte um die HSS-Funktionen von Administra anzusprechen. Mit diesen Funktionen kann man nun ein Modul (Programm) wie einen HSS-Soundplayer schreiben.
Im Gegensatz dazu die Datei splay.mod: Mit diesem Modul wird ein HSS-Soundplayer ins System eingefügt, welcher Funktionen aus der hss.lib verwendet.
Die Datei benötigt man aber mehr oder weniger nur zur Entwicklung, ein fertiges Modul wie splay.mod enthält dann schon die die entsprechenden HSS-Worte die benötigt werden.
Die ifnot: ... Anweisung sorgt dabei dafür, dass keine Funktionen doppelt in das Wörterbuch compiliert werden. Das ist quasi ein verteiltes und fein granuliertes Konzept analog zu einer DLL. Die Forth-Version funktioniert dabei aber im Gegensatz zu DLL's nicht auf Bibliotheks-, sondern auf Funktionsebene.
*.mod Module, Forth-Erweiterungen für das System
*.lib Bibliotheken, grundlegende Wortsammlungen
*.adm Administra-Code (z.Bsp. admsid.adm für SIDCog-Code)
*.bel Bellatrix-Code
*.bin Spin-Code, im Normalfall zur Ausführung in Regnatix
basics.f - (mod:basics) Hive-Core für PropForth
ari.lib - (lib:ari) Zusätzliche arithmetische Funktionen
cog.lib - (lib:cog) Zusätzliche COG-Funktionen
adm.lib - (lib:adm) Administra-Chipmanagment-Funktionen
hss.lib - (lib:hss) Bibliothek für Hydra-Sound-System
sfx.lib - (lib:sfx) Soundeffekt-Bibliothek
wav.lib - (lib:wav) Wave-Soundbibliothek
bel.lib - (lib:bel) Bellatrix-Chipmanagment-Funktionen
key.lib - (lib:key) Tastatur-Bibliothek
scr.lib - (lib:scr) Screen-Bibliothek
sd0.lib - (lib:sd0) SD-Card-Bibliothek
debug.f - Nützliche Worte zur Fehlersuche und Entwicklung
rom.f - EEPROM-Dateisystem
tools.f - Nützliche Tools (cat, less, dm?...)
hplay.f - HSS-Player
wplay.f - WAV-Player
splay.f - SID-Player
Administra-Codedateien im SYS-Verzeichnis:
admled.adm Testprogramm - HBeat-LED blinken lassen
admsid.adm SidCog-Version (wird von splay benötigt)
admsys.adm Standardcode für ADM mit SD/HSS/WAV
admym.adm Yamaha-Soundchip-Version
aterm96.adm Mini-OS für Administra (Testzwecke)
Reset-Fehlercodes:
------------------
0011FFFF - stack overflow
0012FFFF - return stack overflow
0021FFFF - stack underflow
0022FFFF - return stack underflow
8100FFFF - no free cogs
8200FFFF - no free main memory
8400FFFF - fl no free main memory
8500FFFF - no free cog memory
8800FFFF - eeprom write error
9000FFFF - eeprom read error
.err-Fehlercodes:
-----------------
0 no error
1 fsys unmounted
2 fsys corrupted
3 fsys unsupported
4 not found
5 file not found
6 dir not found
7 file read only
8 end of file
9 end of directory
10 end of root
11 dir is full
12 dir is not empty
13 checksum error
14 reboot error
15 bpb corrupt
16 fsi corrupt
17 dir already exist
18 file already exist
19 out of disk free space
20 disk io error
21 command not found
22 timeout
23 parameter error

1042
lib/adm-enc28j60.spin Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

1221
lib/adm-socket.spin Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -52,9 +52,6 @@ FL_SEL = %0000_0001 'eintrag ist selektiert
FL_FOCUS = %0000_0001 'box ist selektiert
DR_SD = 0
DR_RAM = 1
DR_BLK = 2
PUB dummy

Binary file not shown.

100
lib/glob-led-engine.spin Normal file
View File

@ -0,0 +1,100 @@
{{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// E555 Light Emitting Diode Engine
//
// Author: Kwabena W. Agyeman
// Updated: 7/27/2010
// Designed For: P8X32A
// Version: 1.1
//
// Copyright (c) 2010 Kwabena W. Agyeman
// See end of file for terms of use.
//
// Update History:
//
// v1.0 - Original release - 1/26/2010.
// v1.1 - Added support for variable pin assignments - 7/27/2010.
//
// For each included copy of this object only one spin interpreter should access it at a time.
//
// Nyamekye,
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// LED Circuit:
//
// LEDPinNumber --- LED Driver (Active High).
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}}
PUB LEDFrequency(newFrequency, LEDPinNumber) '' 11 Stack Longs
'' ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
'' // Changes the light emitting diode frequency using the SPIN interpreter's counters. Brightness will be set to zero.
'' //
'' // NewFrequency - The new frequency. Between 0 Hz and 80MHz @ 80MHz. -1 to reset the pin and counter modules.
'' // LEDPinNumber - Pin to use to drive the LED circuit. Between 0 and 31.
'' ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
LEDSetup((newFrequency <> -1), LEDPinNumber, true)
newFrequency := ((newFrequency <# clkfreq) #> 0)
result := 1
repeat 32
newFrequency <<= 1
result <-= 1
if(newFrequency => clkfreq)
newFrequency -= clkfreq
result += 1
frqa := result~
PUB LEDBrightness(newBrightness, LEDPinNumber) '' 11 Stack Longs
'' ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
'' // Changes the light emitting diode brightness using the SPIN interpreter's counters. Frequency will be set to zero.
'' //
'' // NewBrightness - The new brightness. Between 0% and 100%. -1 to reset the pin and counter modules.
'' // LEDPinNumber - Pin to use to drive the LED circuit. Between 0 and 31.
'' ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
LEDSetup((newBrightness <> -1), LEDPinNumber, false)
frqb := (((newBrightness <# 100) #> 0) * constant(posx / 50))
PRI LEDSetup(activeOrInactive, LEDPinNumber, frequencyOrBrightness) ' 6 Stack Longs
LEDPinNumber := ((LEDPinNumber <# 31) #> 0)
dira[LEDPinNumber] := activeOrInactive
outa[LEDPinNumber] := false
ctra := (((constant(%0_0100 << 26) + LEDPinNumber) & activeOrInactive) & frequencyOrBrightness)
ctrb := (((constant(%0_0110 << 26) + LEDPinNumber) & activeOrInactive) & (not(frequencyOrBrightness)))
spr[2 - frequencyOrBrightness] := 0
spr[10 - frequencyOrBrightness] := 0
spr[12 - frequencyOrBrightness] := 0
{{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 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.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -54,6 +54,7 @@ REM htxt, g0key
%BSTC% -L %libpath% -b -O a .\system\administra\admsid\admsid.spin
%BSTC% -L %libpath% -b -O a .\system\administra\admay\admay.spin
%BSTC% -L %libpath% -b -O a .\system\administra\admnet\admnet.spin
rename *.binary *.adm
%BSTC% -L %libpath% -b -O a .\system\bellatrix\bel-htext\htext.spin

232
make.log
View File

@ -1,9 +1,9 @@
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>date /T
10.05.2013
21.06.2014
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>time /T
20:53
18:38
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>REM Pfade
@ -43,10 +43,11 @@ Loading Object adm-hss
Loading Object adm-wav
Loading Object adm-rtc
Loading Object adm-com
Loading Object adm-plx
Loading Object glob-con
Program size is 13400 longs
Program size is 14352 longs
2 Constants folded
Compiled 2950 Lines of Code in 0,275 Seconds
Compiled 3179 Lines of Code in 1,759 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>copy admflash.binary ".\bin\flash"
1 Datei(en) kopiert.
@ -67,7 +68,7 @@ Loading Object bel-bus
Loading Object glob-con
Program size is 7620 longs
25 Constants folded
Compiled 1589 Lines of Code in 0,153 Seconds
Compiled 1625 Lines of Code in 0,679 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>copy belflash.binary ".\bin\flash"
1 Datei(en) kopiert.
@ -88,7 +89,7 @@ Loading Object bel-bus
Loading Object glob-con
Program size is 7660 longs
27 Constants folded
Compiled 1644 Lines of Code in 0,124 Seconds
Compiled 1680 Lines of Code in 0,669 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>rename belflash.binary tv.bel
@ -100,7 +101,7 @@ Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object regflash
Program size is 32580 longs
Compiled 694 Lines of Code in 0,174 Seconds
Compiled 693 Lines of Code in 0,179 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>move regflash.binary ".\bin\flash"
1 Datei(en) verschoben.
@ -120,9 +121,9 @@ Loading Object regime
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Program size is 9736 longs
Program size is 9868 longs
2 Constants folded
Compiled 2694 Lines of Code in 0,152 Seconds
Compiled 2868 Lines of Code in 0,739 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>rename regime.binary reg.sys
@ -146,7 +147,7 @@ Loading Object adm-rtc.spin
Loading Object adm-sid
Loading Object glob-con
Program size is 12112 longs
Compiled 2486 Lines of Code in 0,19 Seconds
Compiled 2522 Lines of Code in 1,519 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\administra\admay\admay.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -157,7 +158,24 @@ Loading Object adm-rtc.spin
Loading Object adm-ay
Loading Object glob-con
Program size is 8344 longs
Compiled 1975 Lines of Code in 0,129 Seconds
Compiled 2011 Lines of Code in 0,82 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\administra\admnet\admnet.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object admnet
Loading Object adm-fat
Loading Object adm-rtc.spin
Loading Object adm-hss
Loading Object adm-rtc
Loading Object adm-com
Loading Object adm-socket
Loading Object adm-enc28j60
Loading Object glob-con
Loading Object glob-numbers
Program size is 21952 longs
4 Constants folded
Compiled 4722 Lines of Code in 1,789 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>rename *.binary *.adm
@ -169,7 +187,7 @@ Loading Object bel-htext
Loading Object bel-keyb
Program size is 6656 longs
12 Constants folded
Compiled 958 Lines of Code in 0,098 Seconds
Compiled 958 Lines of Code in 0,119 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\bellatrix\bel-g0\g0key.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -179,14 +197,15 @@ Loading Object bel-tv
Loading Object glob-con
Program size is 7156 longs
1 Constants folded
Compiled 2130 Lines of Code in 0,105 Seconds
Compiled 2166 Lines of Code in 0,529 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>rename *.binary *.bel
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>move *.adm ".\bin\sdcard\system"
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\admay.adm
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\admnet.adm
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\admsid.adm
2 Datei(en) verschoben.
3 Datei(en) verschoben.
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>move *.bel ".\bin\sdcard\system"
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\g0key.bel
@ -212,9 +231,9 @@ Loading Object admtest
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Program size is 8204 longs
1 Constants folded
Compiled 2504 Lines of Code in 0,119 Seconds
Program size is 8616 longs
2 Constants folded
Compiled 2666 Lines of Code in 0,139 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\beltest.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -223,9 +242,9 @@ Loading Object beltest
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Program size is 6380 longs
5 Constants folded
Compiled 2384 Lines of Code in 0,105 Seconds
Program size is 6792 longs
6 Constants folded
Compiled 2546 Lines of Code in 0,74 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\charmap.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -233,9 +252,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object charmap
Loading Object reg-ios
Loading Object glob-con
Program size is 2252 longs
1 Constants folded
Compiled 1813 Lines of Code in 0,061 Seconds
Program size is 2664 longs
2 Constants folded
Compiled 1975 Lines of Code in 0,5 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\eram.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -244,9 +263,9 @@ Loading Object eram
Loading Object glob-numbers
Loading Object reg-ios
Loading Object glob-con
Program size is 7348 longs
Program size is 7364 longs
2 Constants folded
Compiled 2775 Lines of Code in 0,129 Seconds
Compiled 2937 Lines of Code in 0,23 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\flash.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -256,9 +275,9 @@ Loading Object reg-ios
Loading Object glob-con
Loading Object glob-sdspi
Loading Object glob-numbers
Program size is 7144 longs
7 Constants folded
Compiled 3188 Lines of Code in 0,131 Seconds
Program size is 7556 longs
8 Constants folded
Compiled 3350 Lines of Code in 0,889 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\fm.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -272,9 +291,9 @@ Loading Object gui-pbar
Loading Object gui-wbox
Loading Object gui-input
Loading Object glob-string
Program size is 7640 longs
19 Constants folded
Compiled 2612 Lines of Code in 0,177 Seconds
Program size is 8276 longs
22 Constants folded
Compiled 2833 Lines of Code in 0,79 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\fterm.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -283,9 +302,21 @@ Loading Object fterm
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-fds
Program size is 2656 longs
1 Constants folded
Compiled 1993 Lines of Code in 0,08 Seconds
Program size is 3068 longs
2 Constants folded
Compiled 2155 Lines of Code in 0,719 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\ftp.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object ftp
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Loading Object glob-numbers
Program size is 7444 longs
8 Constants folded
Compiled 2900 Lines of Code in 0,839 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\g0test.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -293,9 +324,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object g0test
Loading Object reg-ios
Loading Object glob-con
Program size is 5984 longs
39 Constants folded
Compiled 2302 Lines of Code in 0,091 Seconds
Program size is 6396 longs
40 Constants folded
Compiled 2464 Lines of Code in 0,32 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\hplay.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -303,9 +334,34 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object hplay
Loading Object reg-ios
Loading Object glob-con
Program size is 3992 longs
9 Constants folded
Compiled 2054 Lines of Code in 0,08 Seconds
Program size is 4404 longs
10 Constants folded
Compiled 2216 Lines of Code in 0,44 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\ipconfig.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object ipconfig
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Loading Object glob-numbers
Program size is 4992 longs
8 Constants folded
Compiled 2742 Lines of Code in 0,86 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\irc.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object irc
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Loading Object glob-numbers
Loading Object glob-led-engine
Program size is 13840 longs
14 Constants folded
Compiled 3777 Lines of Code in 1,02 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\keycode.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -313,9 +369,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object keycode
Loading Object reg-ios
Loading Object glob-con
Program size is 2180 longs
1 Constants folded
Compiled 1816 Lines of Code in 0,062 Seconds
Program size is 2592 longs
2 Constants folded
Compiled 1978 Lines of Code in 0,52 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\m.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -324,9 +380,9 @@ Loading Object m
Loading Object reg-ios
Loading Object glob-con
Loading Object m-glob-con
Program size is 3360 longs
1 Constants folded
Compiled 2133 Lines of Code in 0,089 Seconds
Program size is 3772 longs
2 Constants folded
Compiled 2311 Lines of Code in 0,109 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\man.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -335,9 +391,20 @@ Loading Object man
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Program size is 2716 longs
1 Constants folded
Compiled 1997 Lines of Code in 0,078 Seconds
Program size is 3152 longs
2 Constants folded
Compiled 2161 Lines of Code in 0,73 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\perplex.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object perplex
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-numbers
Program size is 6160 longs
3 Constants folded
Compiled 2771 Lines of Code in 0,809 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\ramtest.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -345,9 +412,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object ramtest
Loading Object reg-ios
Loading Object glob-con
Program size is 4272 longs
35 Constants folded
Compiled 2069 Lines of Code in 0,08 Seconds
Program size is 4664 longs
36 Constants folded
Compiled 2230 Lines of Code in 0,52 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\regime.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -356,9 +423,9 @@ Loading Object regime
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Program size is 9736 longs
Program size is 9868 longs
2 Constants folded
Compiled 2694 Lines of Code in 0,122 Seconds
Compiled 2868 Lines of Code in 0,579 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\rom.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -367,9 +434,9 @@ Loading Object rom
Loading Object reg-ios
Loading Object glob-con
Loading Object glob-sdspi
Program size is 4364 longs
4 Constants folded
Compiled 2429 Lines of Code in 0,088 Seconds
Program size is 4776 longs
5 Constants folded
Compiled 2591 Lines of Code in 0,5 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\sfxtool.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -379,9 +446,9 @@ Loading Object reg-ios
Loading Object glob-con
Loading Object glob-numbers
Loading Object glob-string
Program size is 6644 longs
1 Constants folded
Compiled 2756 Lines of Code in 0,119 Seconds
Program size is 7056 longs
2 Constants folded
Compiled 2918 Lines of Code in 0,809 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\splay.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -389,9 +456,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object splay
Loading Object reg-ios
Loading Object glob-con
Program size is 3064 longs
1 Constants folded
Compiled 1925 Lines of Code in 0,071 Seconds
Program size is 3476 longs
2 Constants folded
Compiled 2087 Lines of Code in 0,529 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\sysconf.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -399,9 +466,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object sysconf
Loading Object reg-ios
Loading Object glob-con
Program size is 4228 longs
2 Constants folded
Compiled 2046 Lines of Code in 0,078 Seconds
Program size is 4640 longs
3 Constants folded
Compiled 2208 Lines of Code in 0,17 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\tapecut.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -411,9 +478,9 @@ Loading Object reg-ios
Loading Object glob-con
Loading Object glob-numbers
Loading Object m-glob-con
Program size is 3560 longs
1 Constants folded
Compiled 2516 Lines of Code in 0,096 Seconds
Program size is 3972 longs
2 Constants folded
Compiled 2694 Lines of Code in 0,8 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\time.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -423,9 +490,9 @@ Loading Object reg-ios
Loading Object glob-con
Loading Object glob-string
Loading Object glob-numbers
Program size is 5804 longs
1 Constants folded
Compiled 2591 Lines of Code in 0,112 Seconds
Program size is 6216 longs
2 Constants folded
Compiled 2753 Lines of Code in 0,639 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\wplay.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -433,9 +500,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object wplay
Loading Object reg-ios
Loading Object glob-con
Program size is 3348 longs
1 Constants folded
Compiled 1947 Lines of Code in 0,074 Seconds
Program size is 3760 longs
2 Constants folded
Compiled 2109 Lines of Code in 0,52 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>bstc.exe -L ".\lib" -b -O a .\system\regnatix\yplay.spin
Brads Spin Tool Compiler v0.15.3 - Copyright 2008,2009 All rights reserved
@ -443,9 +510,9 @@ Compiled for i386 Win32 at 08:17:48 on 2009/07/20
Loading Object yplay
Loading Object reg-ios
Loading Object glob-con
Program size is 3348 longs
1 Constants folded
Compiled 1995 Lines of Code in 0,082 Seconds
Program size is 3760 longs
2 Constants folded
Compiled 2157 Lines of Code in 0,52 Seconds
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>rename *.binary *.bin
@ -457,11 +524,15 @@ H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\eram.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\flash.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\fm.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\fterm.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\ftp.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\g0test.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\hplay.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\ipconfig.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\irc.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\keycode.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\m.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\man.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\perplex.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\ramtest.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\regime.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\rom.bin
@ -472,7 +543,7 @@ H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\tapecut.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\time.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\wplay.bin
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios\yplay.bin
22 Datei(en) verschoben.
26 Datei(en) verschoben.
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>copy .\forth\*.* ".\bin\sdcard\system"
.\forth\adm.lib
@ -509,6 +580,7 @@ H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>copy .\system\son
.\system\sonstiges\error.man
.\system\sonstiges\flash.man
.\system\sonstiges\fm.man
.\system\sonstiges\ftp.man
.\system\sonstiges\GREEN.COL
.\system\sonstiges\hplay.man
.\system\sonstiges\PAR.COL
@ -519,6 +591,6 @@ H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>copy .\system\son
.\system\sonstiges\test2.txt
.\system\sonstiges\wplay.man
.\system\sonstiges\yplay.man
18 Datei(en) kopiert.
19 Datei(en) kopiert.
H:\Projekte\Technik\hive 1\software\TriOS\TriOS-SVN\hive-trios>echo off

4
readme.txt Normal file
View File

@ -0,0 +1,4 @@
Informationen zum System und zur Installation im Verzeichnis "doku".
Informationen zum Projekt: hive-project.de

Binary file not shown.

Binary file not shown.

540
system/regnatix/ftp.spin Normal file
View File

@ -0,0 +1,540 @@
{{
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Autor: Jörg Deckert │
│ Copyright (c) 2013 Jörg Deckert │
│ See end of file for terms of use. │
│ Die Nutzungsbedingungen befinden sich am Ende der Datei │
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
Informationen : hive-project.de
Kontakt : joergd@bitquell.de
System : TriOS
Name : flash
Chip : Regnatix
Typ : Programm
Version :
Subversion :
Funktion : FTP-Client
Komponenten : -
COG's : -
Logbuch :
22.12.2013-joergd - erste Version
05.01.2014-joergd - Defaultwerte gesetzt
- Speichern auf SD-Card
- Parameter für Benutzer und Paßwort
Kommandoliste :
Notizen :
}}
OBJ
ios: "reg-ios"
str: "glob-string"
num: "glob-numbers" 'Number Engine
CON
_CLKMODE = XTAL1 + PLL16X
_XINFREQ = 5_000_000
LANMASK = %00000000_00000000_00000000_00100000
CON 'NVRAM Konstanten --------------------------------------------------------------------------
#4, NVRAM_IPADDR
#8, NVRAM_IPMASK
#12, NVRAM_IPGW
#16, NVRAM_IPDNS
#20, NVRAM_IPBOOT
#24, NVRAM_HIVE ' 4 Bytes
DAT
strNVRAMFile byte "nvram.sav",0 'contains the 56 bytes of NVRAM, if RTC is not available
VAR
long ip_addr
byte parastr[64]
byte remdir[64]
byte filename[64]
byte username[64]
byte password[64]
byte strTemp[128]
byte addrset
byte save2card
byte handleidx_control 'Handle FTP Control Verbindung
byte handleidx_data 'Handle FTP Data Verbindung
PUB main
ip_addr := 0
save2card := FALSE
remdir[0] := 0
filename[0] := 0
username[0] := 0
password[0] := 0
ios.start
ifnot (ios.admgetspec & LANMASK)
ios.print(@strNoNetwork)
ios.stop
ios.printnl
ios.parastart 'parameterübergabe starten
repeat while ios.paranext(@parastr) 'parameter einlesen
if byte[@parastr][0] == "/" 'option?
case byte[@parastr][1]
"?": ios.print(@help)
"h": if ios.paranext(@parastr)
setaddr(@parastr)
"d": ios.paranext(@remdir)
"f": ios.paranext(@filename)
"u": ios.paranext(@username)
"p": ios.paranext(@password)
"s": save2card := TRUE
other: ios.print(@help)
ifnot byte[@filename][0] == 0
ifnot ftpconnect
ifnot ftplogin
ifnot ftpcwd
if ftppasv
ftpretr
else
ios.print(@strNoFile)
ftpclose
ios.stop
PRI ftpconnect
ifnot (ip_addr) ' Adresse 0.0.0.0
ios.print(@strNoHost)
if ios.rtcTest 'RTC chip available?
ip_addr := ios.getNVSRAM(NVRAM_IPBOOT) << 24
ip_addr += ios.getNVSRAM(NVRAM_IPBOOT+1) << 16
ip_addr += ios.getNVSRAM(NVRAM_IPBOOT+2) << 8
ip_addr += ios.getNVSRAM(NVRAM_IPBOOT+3)
else
ios.sddmset(ios#DM_USER) 'u-marker setzen
ios.sddmact(ios#DM_SYSTEM) 's-marker aktivieren
ifnot ios.sdopen("R",@strNVRAMFile)
ios.sdseek(NVRAM_IPBOOT)
ip_addr := ios.sdgetc << 24
ip_addr += ios.sdgetc << 16
ip_addr += ios.sdgetc << 8
ip_addr += ios.sdgetc
ios.sdclose
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
if (ip_addr)
ios.print(@strUseBoot)
else
return(-1)
#ifdef __DEBUG
ios.print(@strStartLAN)
#endif
ios.lanstart
ios.print(@strConnect)
if (handleidx_control := ios.lan_connect(ip_addr, 21)) == $FF
ios.print(@strErrorNoSock)
return(-1)
ifnot (ios.lan_waitconntimeout(handleidx_control, 2000))
ios.print(@strErrorConnect)
return(-1)
#ifdef __DEBUG
ios.print(@strConnected)
#endif
ifnot getResponse(string("220 "))
ios.print(@strError220)
return(-1)
return(0)
PRI ftpclose
ifnot handleidx_control == $FF
ios.lan_close(handleidx_control)
handleidx_control := $FF
ifnot handleidx_data == $FF
ios.lan_close(handleidx_data)
handleidx_data := $FF
PRI ftplogin | pwreq, respOK, hiveid
pwreq := FALSE
respOK := FALSE
sendStr(string("USER "))
if strsize(@username)
sendStr(@username)
sendStr(string(13,10))
else
sendStr(string("anonymous",13,10))
repeat until readLine == -1
#ifdef __DEBUG
ios.print(string(" < "))
ios.print(@strTemp)
ios.printnl
#endif
strTemp[4] := 0
if strcomp(@strTemp, string("230 "))
respOk := TRUE
quit
elseif strcomp(@strTemp, string("331 "))
pwreq := TRUE
respOk := TRUE
quit
ifnot respOK
ios.print(@strErrorLogin)
return(-1)
ifnot pwreq
return(0)
sendStr(string("PASS "))
if strsize(@password)
sendStr(@password)
sendStr(string(13,10))
else
if ios.rtcTest 'RTC chip available?
hiveid := ios.getNVSRAM(NVRAM_HIVE)
hiveid += ios.getNVSRAM(NVRAM_HIVE+1) << 8
hiveid += ios.getNVSRAM(NVRAM_HIVE+2) << 16
hiveid += ios.getNVSRAM(NVRAM_HIVE+3) << 24
else
ios.sddmset(ios#DM_USER) 'u-marker setzen
ios.sddmact(ios#DM_SYSTEM) 's-marker aktivieren
ifnot ios.sdopen("R",@strNVRAMFile)
ios.sdseek(NVRAM_HIVE)
hiveid := ios.sdgetc
hiveid += ios.sdgetc << 8
hiveid += ios.sdgetc << 16
hiveid += ios.sdgetc << 24
ios.sdclose
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
sendStr(string("anonymous@hive"))
sendStr(str.trimCharacters(num.ToStr(hiveid, num#DEC)))
sendStr(string(13,10))
ifnot getResponse(string("230 "))
ios.print(@strErrorPass)
return(-1)
return(0)
PRI ftpcwd | i
if byte[@remdir][0] == 0
i := sendStr(string("CWD ")) || sendStr(@defdir) || sendStr(string(13,10))
else
i := sendStr(string("CWD ")) || sendStr(@remdir) || sendStr(string(13,10))
if i
ios.print(@strErrorCWD)
return(-1)
ifnot getResponse(string("250 "))
ios.print(@strError250)
ios.printchar("(")
ios.print(@strTemp+4)
ios.print(string(")",13))
return(-1)
return(0)
PRI ftppasv : port | i, k, port256, port1
port := 0
port256 := 0
port1 := 0
k := 0
if sendStr(string("PASV",13,10))
return(0)
repeat until readLine == -1
#ifdef __DEBUG
ios.print(string(" < "))
ios.print(@strTemp)
ios.printnl
#endif
strTemp[4] := 0
if strcomp(@strTemp, string("227 "))
repeat i from 5 to 126
if (strTemp[i] == 0) OR (strTemp[i] == 13) OR (strTemp[i] == 10)
quit
if strTemp[i] == 44 'Komma
strTemp[i] := 0
k++
if k == 4 '4. Komma, Port Teil 1 folgt
port256 := i + 1
if k == 5 '5. Komma, Port Teil 2 folgt
port1 := i + 1
if strTemp[i] == 41 'Klammer zu
strTemp[i] := 0
if (port256 & port1)
port := (num.FromStr(@strTemp+port256, num#DEC) * 256) + num.FromStr(@strTemp+port1, num#DEC)
quit
if (port == 0)
ios.print(@strErrorPasvPort)
return(0)
#ifdef __DEBUG
ios.print(@strOpenPasv)
ios.print(num.ToStr(port, num#DEC))
ios.printnl
#endif
if (handleidx_data := ios.lan_connect(ip_addr, port)) == $FF
ios.print(@strErrorSockPasv)
return(0)
ifnot (ios.lan_waitconntimeout(handleidx_data, 2000))
ios.print(@strErrorPasvConn)
return(0)
PRI ftpretr | len, respOK
if sendStr(string("TYPE I",13,10))
ios.print(@strErrorSendType)
return(-1)
ifnot getResponse(string("200 "))
ios.print(@strErrorChType)
return(-1)
if sendStr(string("SIZE ")) || sendStr(@filename) || sendStr(string(13,10))
ios.print(@strErrorSendSize)
return(-1)
ifnot getResponse(string("213"))
ios.print(@strErrorSize)
ios.printchar("(")
ios.print(@strTemp+4)
ios.print(string(")",13))
return(-1)
ifnot(len := num.FromStr(@strTemp+4, num#DEC))
ios.print(@strErrorGetSize)
return(-1)
ios.print(@strGetFile)
if sendStr(string("RETR ")) || sendStr(@filename) || sendStr(string(13,10))
ios.print(@strErrorSendFN)
return -1
respOK := FALSE
repeat until readLine == -1
#ifdef __DEBUG
ios.print(string(" < "))
ios.print(@strTemp)
ios.printnl
#endif
strTemp[4] := 0
if strcomp(@strTemp, string("150 "))
respOk := TRUE
quit
elseif strcomp(@strTemp, string("125 "))
respOk := TRUE
quit
ifnot respOK
ios.print(@strErrorRetr)
ios.printchar("(")
ios.print(@strTemp+4)
ios.print(string(")",13))
return(-1)
if ios.lan_rxdata(handleidx_data, @filename, len)
ios.print(@strErrorRXData)
return(-1)
ifnot getResponse(string("226 "))
ios.print(@strErrorRetrOK)
return(-1)
if save2card
ios.print(@strWrite2SD)
writeToSDCard
PRI writeToSDCard | fnr, len, i
fnr := ios.rd_open(@filename)
ifnot fnr == -1
len := ios.rd_len(fnr)
ios.sddel(@filename) 'falls alte Datei auf SD-Card vorhanden, diese löschen
ifnot ios.sdnewfile(@filename)
ifnot ios.sdopen("W",@filename)
i := 0
ios.sdxputblk(fnr,len) 'Daten als Block schreiben
ios.sdclose
ios.rd_del(@filename)
ios.rd_close(fnr)
PRI setaddr (ipaddr) | pos, count 'IP-Adresse in Variable schreiben
count := 3
repeat while ipaddr
pos := str.findCharacter(ipaddr, ".")
if(pos)
byte[pos++] := 0
ip_addr += num.FromStr(ipaddr, num#DEC) << (8*count--)
ipaddr := pos
if(count == -1)
quit
PRI getResponse (strOk) : respOk | len
respOk := FALSE
repeat until readLine == -1
#ifdef __DEBUG
ios.print(string(" < "))
ios.print(@strTemp)
ios.printnl
#endif
strTemp[strsize(strOk)] := 0
if strcomp(@strTemp, strOk)
respOk := TRUE
quit
return respOk
PRI readLine | i, ch
repeat i from 0 to 126
ch := ios.lan_rxtime(handleidx_control, 2000)
if ch == 13
ch := ios.lan_rxtime(handleidx_control, 2000)
if ch == -1 or ch == 10
quit
strTemp[i] := ch
strTemp[i] := 0
return ch 'letztes Zeichen oder -1, wenn keins mehr empfangen
PRI sendStr (strSend) : error
#ifdef __DEBUG
ios.print(string(" > "))
ios.print(strSend)
ios.printnl
#endif
error := ios.lan_txdata(handleidx_control, strSend, strsize(strSend))
DAT ' Locale
#ifdef __LANG_EN
'locale: english
defdir byte "/hive/sdcard/system",0
strNoNetwork byte 13,"Administra doesn't provide network functions!",13,"Please load admnet.",13,0
strNoFile byte "No file to download specified, exit...",13,0
strNoHost byte "No host (ftp server) specified (parameter /h)",13,0
strUseBoot byte "Using boot server (set with ipconfig).",13,0
strStartLAN byte "Starting LAN...",13,0
strConnect byte "Connecting to ftp server...",13,0
strErrorNoSock byte "No free socket.",13,0
strErrorConnect byte "Couldn't connect to ftp server.",13,0
strConnected byte "Connected to ftp server, waiting for answer...",13,0
strError220 byte "Ftp server doesn't acknowledge the connection (220).",13,0
strErrorLogin byte "Ftp server doesn't acknowledge the login (230/331)",13,0
strErrorPass byte "Ftp server doesn't acknowledge the password (230)",13,0
strErrorCWD byte "Error sendig remote directory",13,0
strError250 byte "Ftp server doesn't acknowledge the directory change (250).",13,0
strErrorPasvPort byte "Couldn't get the passive port.",13,0
strOpenPasv byte "Open Connection to passive port ",0
strErrorSockPasv byte "No free socket fpr passive connection.",13,0
strErrorPasvConn byte "Couldn't connect to passive port.",13,0
strErrorSendType byte "Error sending file type",13,0
strErrorChType byte "Ftp serve couldn't change file type (200).",13,0
strErrorSendSize byte "Error sending SIZE command",13,0
strErrorSize byte "Ftp server couldn't send file size (213).",13,"File not found? SIZE not supported?",13,0
strErrorGetSize byte "Couldn't get file size.",13,0
strGetFile byte "Retrieve file, please wait...",13,0
strErrorSendFN byte "Error sending file name.",13,0
strErrorRetr byte "Ftp server couldn't send file (150/125).",13,0
strErrorRXData byte "Error retrieving file.",13,0
strErrorRetrOK byte "Ftp server doesn't acknowledge sending of file (226).",13,0
strWrite2SD byte "Saving to sd card...",13,0
help byte "/? : Help",13
byte "/h <a.b.c.d> : host ip address (ftp server)",13
byte " (default: boot server from ipconfig)",13
byte "/d <directory>: change to remote directory",13
byte " (default: /hive/sdcard/system)",13
byte "/f <filename> : download <filename>",13
byte "/u <username> : Username at ftp server",13
byte " (default: anonymous)",13
byte "/p <password> : password at ftp server",13
byte " (default: anonymous@hive<hive id>)",13
byte "/s : save file to sd card",13
byte 0
#else
'default locale: german
defdir byte "/hive/sdcard/system",0
strNoNetwork byte 13,"Administra stellt keine Netzwerk-Funktionen zur Verfügung!",13,"Bitte admnet laden.",13,0
strNoFile byte "Keine Datei zum Downloaden angegeben, beende...",13,0
strNoHost byte "FTP-Server nicht angegeben (Parameter /h)",13,0
strUseBoot byte "Verwende Boot-Server (mit ipconfig gesetzt).",13,0
strStartLAN byte "Starte LAN...",13,0
strConnect byte "Verbinde mit FTP-Server...",13,0
strErrorNoSock byte "Kein Socket frei...",13,0
strErrorConnect byte "Verbindung mit FTP-Server konnte nicht aufgebaut werden.",13,0
strConnected byte "Verbindung mit FTP-Server hergestellt, warte auf Antwort...",13,0
strError220 byte "FTP-Server bestätigt den Verbindungsaufbau nicht (220).",13,0
strErrorLogin byte "FTP-Server hat Login nicht bestätigt (230/331)",13,0
strErrorPass byte "FTP-Server hat das Paßwort nicht bestätigt (230)",13,0
strErrorCWD byte "Fehler beim Senden des Verzeichnisses",13,0
strError250 byte "FTP-Server hat den Verzeichniswechsel nicht bestätigt (250).",13,0
strErrorPasvPort byte "Konnte zu öffnenden Passiv-Port nicht ermitteln.",13,0
strOpenPasv byte "Öffne Verbindung zu Passiv-Port ",0
strErrorSockPasv byte "Kein Socket für Passiv-Verbindung frei...",13,0
strErrorPasvConn byte "Passiv-Verbindung mit FTP-Server konnte nicht aufgebaut werden.",13,0
strErrorSendType byte "Fehler beim Senden des Types",13,0
strErrorChType byte "FTP-Server konnte Übertragungs-Typ nicht ändern (200).",13,0
strErrorSendSize byte "Fehler beim Senden des SIZE-Kommandos",13,0
strErrorSize byte "FTP-Server kann die Datei-Größe nicht übermitteln (213).",13,"Datei nicht vorhanden? SIZE nicht unterstützt?",13,0
strErrorGetSize byte "Konnte Filegröße nicht ermitteln.",13,0
strGetFile byte "Empfange Datei, bitte warten...",13,0
strErrorSendFN byte "Fehler beim Senden des Filenamens.",13,0
strErrorRetr byte "FTP-Server kann die Datei nicht senden (150/125).",13,0
strErrorRXData byte "Fehler beim Empfang der Datei.",13,0
strErrorRetrOK byte "FTP-Server hat den Empfang durch den Client nicht bestätigt (226).",13,0
strWrite2SD byte "Speichere auf SD-Card...",13,0
help byte "/? : Hilfe",13
byte "/h <a.b.c.d> : FTP-Server-Adresse (Host)",13
byte " (default: mit ipconfig gesetzter Boot-Server)",13
byte "/d <verzeichnis>: in entferntes Verzeichnis wechseln",13
byte " (default: /hive/sdcard/system)",13
byte "/f <dateiname> : Download <dateiname>",13
byte "/u <username> : Benutzername am FTP-Server",13
byte " (default: anonymous)",13
byte "/p <password> : Paßwort am FTP-Server",13
byte " (default: anonymous@hive<Hive-Id>)",13
byte "/s : Datei auf SD-Card speichern",13
byte 0
#endif
DAT 'lizenz
{{
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 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. │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
}}

View File

@ -0,0 +1,295 @@
{{
┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Autor: Jörg Deckert │
│ Copyright (c) 2013 Jörg Deckert │
│ See end of file for terms of use. │
│ Die Nutzungsbedingungen befinden sich am Ende der Datei │
└──────────────────────────────────────────────────────────────────────────────────────────────────────┘
Informationen : hive-project.de
Kontakt : joergd@bitquell.de
System : TriOS
Name : flash
Chip : Regnatix
Typ : Programm
Version :
Subversion :
Funktion : IP-Konfiguration in NVRAM ablegen
Komponenten : -
COG's : -
Logbuch :
11.06.2013-joergd - erste Version, basierend auf time.spin
05.01.2014-joergd - kleine Verbesserungen im Parameter-Handling
Kommandoliste :
Notizen :
}}
OBJ
ios: "reg-ios"
str: "glob-string"
num: "glob-numbers"
CON
_CLKMODE = XTAL1 + PLL16X
_XINFREQ = 5_000_000
LANMASK = %00000000_00000000_00000000_00100000
CON 'NVRAM Konstanten --------------------------------------------------------------------------
#4, NVRAM_IPADDR
#8, NVRAM_IPMASK
#12, NVRAM_IPGW
#16, NVRAM_IPDNS
#20, NVRAM_IPBOOT
#24, NVRAM_HIVE ' 4 Bytes
DAT
strNVRAMFile byte "nvram.sav",0 'contains the 56 bytes of NVRAM, if RTC is not available
VAR
byte parastr[64]
byte rtcAvailable
PUB main | i
ios.start 'ios initialisieren
ios.printnl
ifnot (ios.admgetspec & LANMASK)
ios.print(@strNoNetwork)
ios.stop
if ios.rtcTest 'RTC chip available?
rtcAvailable := TRUE
else 'use configfile
rtcAvailable := FALSE
ios.print(@strNoRTC)
ios.sddmset(ios#DM_USER) 'u-marker setzen
ios.sddmact(ios#DM_SYSTEM) 's-marker aktivieren
if ios.sdopen("R",@strNVRAMFile) 'config file available
ios.sdnewfile(@strNVRAMFile) 'no, create it
if ios.sdopen("W",@strNVRAMFile)
ios.print(@strErrorOpen)
ios.stop
else
repeat i from 0 to 55 'set default value for pseudo NVRAM Bytes 0 - 55
ios.sdputc(0)
ios.sdclose
else
ios.sdclose
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
ios.parastart 'parameterübergabe starten
repeat while ios.paranext(@parastr) 'parameter einlesen
if byte[@parastr][0] == "/" 'option?
case byte[@parastr][1]
"?": ios.print(@help)
"l": cmd_listcfg
"a": if ios.paranext(@parastr)
cmd_setaddr(NVRAM_IPADDR, @parastr)
"m": if ios.paranext(@parastr)
cmd_setaddr(NVRAM_IPMASK, @parastr)
"g": if ios.paranext(@parastr)
cmd_setaddr(NVRAM_IPGW, @parastr)
"d": if ios.paranext(@parastr)
cmd_setaddr(NVRAM_IPDNS, @parastr)
"b": if ios.paranext(@parastr)
cmd_setaddr(NVRAM_IPBOOT, @parastr)
"i": if ios.paranext(@parastr)
cmd_sethive(num.FromStr(@parastr, num#DEC))
other: ios.print(@help)
ios.stop
PRI cmd_listcfg | hiveid 'nvram: IP-Konfiguration anzeigen
ifnot rtcAvailable
ios.sddmset(ios#DM_USER) 'u-marker setzen
ios.sddmact(ios#DM_SYSTEM) 's-marker aktivieren
if ios.sdopen("R",@strNVRAMFile)
ios.print(@strErrorOpen)
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
return
ios.print(@strAddr)
listaddr(NVRAM_IPADDR)
ios.print(string("/"))
listaddr(NVRAM_IPMASK)
ios.printnl
ios.print(@strGw)
listaddr(NVRAM_IPGW)
ios.printnl
ios.print(@strDNS)
listaddr(NVRAM_IPDNS)
ios.printnl
ios.print(@strBoot)
listaddr(NVRAM_IPBOOT)
ios.printnl
ios.print(@strHive)
if rtcAvailable
hiveid := ios.getNVSRAM(NVRAM_HIVE)
hiveid += ios.getNVSRAM(NVRAM_HIVE+1) << 8
hiveid += ios.getNVSRAM(NVRAM_HIVE+2) << 16
hiveid += ios.getNVSRAM(NVRAM_HIVE+3) << 24
else
ios.sdseek(NVRAM_HIVE)
hiveid := ios.sdgetc
hiveid += ios.sdgetc << 8
hiveid += ios.sdgetc << 16
hiveid += ios.sdgetc << 24
ios.print(str.trimCharacters(num.ToStr(hiveid, num#DEC)))
ios.printnl
ifnot rtcAvailable
ios.sdclose
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
PRI listaddr (nvidx) | count 'IP-Adresse anzeigen
ifnot rtcAvailable
ios.sdseek(nvidx)
repeat count from 0 to 3
if(count)
ios.print(string("."))
if rtcAvailable
ios.print(str.trimCharacters(num.ToStr(ios.getNVSRAM(nvidx+count), num#DEC)))
else
ios.print(str.trimCharacters(num.ToStr(ios.sdgetc, num#DEC)))
PRI cmd_setaddr (nvidx, ipaddr) | pos, count 'IP-Adresse setzen
ifnot rtcAvailable
ios.sddmset(ios#DM_USER) 'u-marker setzen
ios.sddmact(ios#DM_SYSTEM) 's-marker aktivieren
if ios.sdopen("W",@strNVRAMFile)
ios.print(@strErrorOpen)
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
return
else
ios.sdseek(nvidx)
count := 0
repeat while ipaddr
pos := str.findCharacter(ipaddr, ".")
if(pos)
byte[pos++] := 0
if rtcAvailable
ios.setNVSRAM(nvidx+count++, num.FromStr(ipaddr, num#DEC))
else
ios.sdputc(num.FromStr(ipaddr, num#DEC))
ipaddr := pos
if(count == 4)
quit
ifnot rtcAvailable
ios.sdclose
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
ios.lanstop
ios.lanstart
PRI cmd_sethive (hiveid) 'Hive-Id setzen
if rtcAvailable
ios.setNVSRAM(NVRAM_HIVE, hiveid & $FF)
ios.setNVSRAM(NVRAM_HIVE+1, (hiveid >> 8) & $FF)
ios.setNVSRAM(NVRAM_HIVE+2, (hiveid >> 16) & $FF)
ios.setNVSRAM(NVRAM_HIVE+3, (hiveid >> 24) & $FF)
else
ios.sddmset(ios#DM_USER) 'u-marker setzen
ios.sddmact(ios#DM_SYSTEM) 's-marker aktivieren
if ios.sdopen("W",@strNVRAMFile)
ios.print(@strErrorOpen)
else
ios.sdseek(NVRAM_HIVE)
ios.sdputc(hiveid & $FF)
ios.sdputc((hiveid >> 8) & $FF)
ios.sdputc((hiveid >> 16) & $FF)
ios.sdputc((hiveid >> 24) & $FF)
ios.sdclose
ios.sddmact(ios#DM_USER) 'u-marker aktivieren
ios.lanstop
ios.lanstart
DAT 'sys: helptext
#ifdef __LANG_EN
'locale: english
strNoNetwork byte "Administra doesn't provide network functions!",13,"Please load admnet.",13,0
strNoRTC byte "RTC/NVRAM not found",13,"using configuration in /system/nvram.sav",13,0
strAddr byte " Ip address: ",0
strGw byte " Gateway: ",0
strDNS byte " DNS server: ",0
strBoot byte " Boot server: ",0
strHive byte " Hive ID: ",0
strErrorOpen byte "Can't open configuration file",13,0
help byte "/? : Help",13
byte "/l : List configuration",13
byte "/a <a.b.c.d> : Set ip address",13
byte "/m <x.x.x.x> : Set network mask",13
byte "/g <e.f.g.h> : Set default gateway",13
byte "/d <i.j.k.l> : Set DNS server",13
byte "/b <m.n.o.p> : Set boot server",13
byte "/i <Id> : Set Hive ID",13
byte 0
#else
'default locale: german
strNoNetwork byte "Administra stellt keine Netzwerk-Funktionen zur Verfügung!",13,"Bitte admnet laden.",13,0
strNoRTC byte "RTC/NVRAM nicht vorhanden",13,"nutze Konfiguration in /system/nvram.sav",13,0
strAddr byte " IP-Adresse: ",0
strGw byte " Gateway: ",0
strDNS byte " DNS-Server: ",0
strBoot byte " Boot-Server: ",0
strHive byte " Hive-Id: ",0
strErrorOpen byte "Kann Konfigurationsdatei nicht öffnen.",13,0
help byte "/? : Hilfe",13
byte "/l : Konfiguration anzeigen",13
byte "/a <a.b.c.d> : IP-Adresse setzen",13
byte "/m <x.x.x.x> : Netzwerk-Maske setzen",13
byte "/g <e.f.g.h> : Gateway setzen",13
byte "/d <i.j.k.l> : DNS-Server setzen",13
byte "/b <m.n.o.p> : Boot-Server setzen",13
byte "/i <Id> : Hive-Id setzen",13
byte 0
#endif
DAT 'lizenz
{{
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ 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. │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
}}

BIN
system/regnatix/irc.spin Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,17 @@
openwr <adr> - slave schreibend öffnen
openrd <adr> - slave lesend öffnen
close - slave schließen
put <wert> - zeichen zu plexus senden
get - zeichen von plexus empfangen
map - slavemap anzeigen
scan - anzeige aller slaveadressen
test - test für interne sepia-karte
test# adda port - test für spezifische sepia-karte
game - gamedevice abfragen (pollregister)
setgame adda port - adressen für poller setzen adda/port
polloff - polling anhalten
pollon - polling starten
bye - programm beenden
Parameter hexadezimal!

Binary file not shown.

Binary file not shown.

39
system/sonstiges/ftp.man Normal file
View File

@ -0,0 +1,39 @@
/h <a.b.c.d> : FTP-Server-Adresse (Host)
(default: mit ipconfig gesetzter Boot-Server)
/d <verzeichnis>: in entferntes Verzeichnis wechseln
(default: /hive/sdcard/system)
/f <dateiname> : Download <dateiname>
/u <username> : Benutzername am FTP-Server
(default: anonymous)
/p <password> : Paßwort am FTP-Server
(default: anonymous@hive<Hive-Id>)
/s : Datei auf SD-Card speichern
Ein Beispiel:
Zum Download von
ftp://1.2.3.4/verzeichnis/unterverzeichnis/datei.txt
verwendet man folgende Befehlszeile:
ftp /h 1.2.3.4 /d /verzeichnis/unterverzeichnis /f datei.txt
Dabei erfolgt die Anmeldung wegen der fehlenden Parameter
/u und /p als "anonymous" mit dem Paßwort "anonymous@hivexxx"
(xxx: mit ipconfig gesetzte Hive-Id). Die Datei wird in
der RAM-Disk gespeichert (s. Kommando "xdir") und könnte
mittels "xsave" auf SD-Card gespeichert werden.
Mit Nutzung aller Default-Werte genügt die Eingabe des
folgenden Befehls:
ftp /s /f ipconfig.bin
Damit wird die Datei "ipconfig.bin" vom FTP-Server mit der
IP-Adresse des mittels "ipconfig" konfigurierten Boot-
Servers aus dem Verzeichnis "/hive/sdcard/system" geladen
und im aktuellen Verzeichnis auf der SD-Card
abgespeichert. Von dort könnte sie direkt gestartet werden.

View File

@ -1,18 +1,18 @@
/? : Hilfe
/l : Konfiguration anzeigen
----------- Administra-Funktionen
/ah 0|1 : hss ab-/anschalten
/aw 0|1 : wav ab-/anschalten
/as 0|1 : systemklänge ab-/anschalten
/al 0..100 : wav-lautstärke links
/ar 0..100 : wav-lautstärke rechts
/ah 0..15 : hss-lautstärke
/af : administra reset, flash booten
/at : transfergeschwindigkeit messen
----------- Bellatrix-Funktionen
/ci : farbtabelle anzeigen
/cs datei : farbtabelle speichern
/cl datei : farbtabelle laden
----------- Port-Funktionen
/po nr anz : Impulse an port ausgeben
/pi : Status der Port abfragen
/? : Hilfe
/l : Konfiguration anzeigen
---------------- Administra-Funktionen
/ah 0|1 : hss ab-/anschalten
/aw 0|1 : wav ab-/anschalten
/as 0|1 : systemklänge ab-/anschalten
/al 0..100 : wav-lautstärke links
/ar 0..100 : wav-lautstärke rechts
/ah 0..15 : hss-lautstärke
/af : administra reset, flash booten
/at : transfergeschwindigkeit messen
---------------- Bellatrix-Funktionen
/ci : farbtabelle anzeigen
/cs datei : farbtabelle speichern
/cl datei : farbtabelle laden
---------------- Port-Funktionen
/po nr anz time : Impulse an port ausgeben
/pi : Status der Port abfragen