diff --git a/bin/flash/admflash.binary b/bin/flash/admflash.binary new file mode 100644 index 0000000..2ca35bd Binary files /dev/null and b/bin/flash/admflash.binary differ diff --git a/bin/flash/belflash.binary b/bin/flash/belflash.binary new file mode 100644 index 0000000..52c4064 Binary files /dev/null and b/bin/flash/belflash.binary differ diff --git a/bin/flash/regflash.binary b/bin/flash/regflash.binary new file mode 100644 index 0000000..2ecefd4 Binary files /dev/null and b/bin/flash/regflash.binary differ diff --git a/bin/sdcard/bel.sys b/bin/sdcard/bel.sys new file mode 100644 index 0000000..52c4064 Binary files /dev/null and b/bin/sdcard/bel.sys differ diff --git a/bin/sdcard/reg.sys b/bin/sdcard/reg.sys new file mode 100644 index 0000000..e098428 Binary files /dev/null and b/bin/sdcard/reg.sys differ diff --git a/bin/sdcard/system/BLUE.COL b/bin/sdcard/system/BLUE.COL new file mode 100644 index 0000000..0d8d9d8 --- /dev/null +++ b/bin/sdcard/system/BLUE.COL @@ -0,0 +1 @@ +<<<<ððððÀÀÀÀ0000<<<<üüüüÿ€ÿ€ÿÿ€€ˆˆˆˆ \ No newline at end of file diff --git a/bin/sdcard/system/BW.COL b/bin/sdcard/system/BW.COL new file mode 100644 index 0000000..ecbace2 Binary files /dev/null and b/bin/sdcard/system/BW.COL differ diff --git a/bin/sdcard/system/BWHALF.COL b/bin/sdcard/system/BWHALF.COL new file mode 100644 index 0000000..d23a6fe Binary files /dev/null and b/bin/sdcard/system/BWHALF.COL differ diff --git a/bin/sdcard/system/CHESS.COL b/bin/sdcard/system/CHESS.COL new file mode 100644 index 0000000..1bd21ce Binary files /dev/null and b/bin/sdcard/system/CHESS.COL differ diff --git a/bin/sdcard/system/PAR.COL b/bin/sdcard/system/PAR.COL new file mode 100644 index 0000000..6ead846 Binary files /dev/null and b/bin/sdcard/system/PAR.COL differ diff --git a/bin/sdcard/system/adm.lib b/bin/sdcard/system/adm.lib new file mode 100644 index 0000000..11b7154 --- /dev/null +++ b/bin/sdcard/system/adm.lib @@ -0,0 +1,90 @@ + +hex + +ifnot: lib:adm +: lib:adm ; + +\ kommandoformen + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ 0 [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!l@ \ ( fkt -- l ) +: adm:fkt!l@ b[ [a!] [a.l@] ]b ; + +ifnot: adm:fkt!s! \ ( s fkt -- ) +: adm:fkt!s! b[ [a!] [a.s!] ]b ; + +\ administra-chipmanagment-funktionen + +\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten +\ sfkt: +\ 0: hss-engine abschalten +\ 1: hss-engine anschalten +\ 2: dac-engine abschalten +\ 3: dac-engine anschalten +\ sstat - status/cognr startvorgang +ifnot: adm:setsound +: adm:setsound + 5C adm:fkt!b!b@ ; + +\ adm:getspec ( -- spec ) - chipspezifikation abfragen +\ +\ +---------- com +\ | +-------- i2c +\ | |+------- rtc +\ | ||+------ lan +\ | |||+----- sid +\ | ||||+---- wav +\ | |||||+--- hss +\ | ||||||+-- bootfähig +\ | |||||||+- dateisystem +\ %00000000_00000000_00000000_01001111 +ifnot: adm:getspec +: adm:getspec + 5D adm:fkt!l@ ; + +\ adm:setsyssound ( syssnd -- ) - systemklänge +\ syssnd = 0 - systemklänge aus +\ syssnd = 1 - systemklänge an +ifnot: adm:setsyssound +: adm:setsyssound + 5E adm:fkt!b! ; + +\ adm:getsoundsys ( -- sndsys ) - abfrage aktives soundsystem +\ 0 - sound aus +\ 1 - hss +\ 2 - wav +ifnot: adm:getsoundsys +: adm:getsoundsys + 5F adm:fkt!b@ ; + +\ adm:load ( cstr -- ) - neuen administra-code laden +ifnot: adm:aload +: adm:aload + 60 adm:fkt!s! ; + +\ adm:getcogs ( -- cogs ) - anzahl der belegten cogs +ifnot: adm:getcogs +: adm:getcogs + 61 adm:fkt!b@ ; + +\ adm:getver ( -- ver ) - abfrage der codeversion +ifnot: adm:getver +: adm:getver + 62 adm:fkt!l@ ; + +\ adm:reset ( -- ) - reset administra +ifnot: adm:reset +: adm:reset + 63 adm:fkt! ; + diff --git a/bin/sdcard/system/admay.adm b/bin/sdcard/system/admay.adm new file mode 100644 index 0000000..12cfa5b Binary files /dev/null and b/bin/sdcard/system/admay.adm differ diff --git a/bin/sdcard/system/admsid.adm b/bin/sdcard/system/admsid.adm new file mode 100644 index 0000000..efe33c8 Binary files /dev/null and b/bin/sdcard/system/admsid.adm differ diff --git a/bin/sdcard/system/admtest.bin b/bin/sdcard/system/admtest.bin new file mode 100644 index 0000000..64a43db Binary files /dev/null and b/bin/sdcard/system/admtest.bin differ diff --git a/bin/sdcard/system/ari.lib b/bin/sdcard/system/ari.lib new file mode 100644 index 0000000..bca39ba --- /dev/null +++ b/bin/sdcard/system/ari.lib @@ -0,0 +1,55 @@ + +hex + +ifnot: lib:ari +: lib:ari ; + +\ abs ( n1 -- abs_n1 ) absolute value of n1 +ifnot: abs +: abs _execasm1>1 151 _cnip ; + +\ u*/mod ( u1 u2 u3 -- u4 u5 ) u5 = (u1*u2)/u3, u4 is the +\ remainder. Uses a 64bit intermediate result. +ifnot: u*/mod +: u*/mod rot2 um* rot um/mod ; + +\ u*/ ( u1 u2 u3 -- u4 ) u4 = (u1*u2)/u3 Uses a 64bit +\ intermediate result. +ifnot: u*/ +: u*/ rot2 um* rot um/mod nip ; + +\ sign ( n1 n2 -- n3 ) n3 is the xor of the sign bits of +\ n1 and n2 +ifnot: sign +: sign xor 80000000 and ; + +\ */mod ( n1 n2 n3 -- n4 n5 ) n5 = (n1*n2)/n3, n4 is the +\ remainder. Uses a 64bit intermediate result. +ifnot: */mod +: */mod 2dup sign >r abs rot dup r> sign >r abs rot abs + um* rot um/mod r> if negate swap negate swap then ; + +\ */ ( n1 n2 n3 -- n4 ) n4 = (n1*n2)/n3. Uses a 64bit +\ intermediate result. +ifnot: */ +: */ */mod nip ; + +\ /mod ( n1 n2 -- n3 n4 ) \ signed divide & mod n4 = n1/n2, +\ n3 is the remainder +ifnot: /mod +: /mod 2dup sign >r abs swap abs swap u/mod r> if negate swap + negate swap then ; + +\ * ( n1 n2 -- n1*n2) n1 multiplied by n2 +ifnot: * +: * um* drop ; + +\ / ( n1 n2 -- n1/n2) n1 divided by n2 +ifnot: / +: / /mod nip ; + +\ rnd ( -- n1 ) n1 is a random number from 00 - FF +ifnot: rnd +: rnd cnt COG@ 8 rshift cnt COG@ xor FF and ; + + diff --git a/bin/sdcard/system/aterm.adm b/bin/sdcard/system/aterm.adm new file mode 100644 index 0000000..e1950e7 Binary files /dev/null and b/bin/sdcard/system/aterm.adm differ diff --git a/bin/sdcard/system/basic.bin b/bin/sdcard/system/basic.bin new file mode 100644 index 0000000..e9f5b2d Binary files /dev/null and b/bin/sdcard/system/basic.bin differ diff --git a/bin/sdcard/system/basics.mod b/bin/sdcard/system/basics.mod new file mode 100644 index 0000000..aa7be0a --- /dev/null +++ b/bin/sdcard/system/basics.mod @@ -0,0 +1,485 @@ +fl + +hex + +: mod:basics ; + +\ Copyright (c) 2010 Sal Sanci +\ Anpassung für Hive-System 2011 dr235 + +\ ------------------------------------------------------ BASICS + +\ this words needs to align with the assembler code +: _stptr 5 _cv ; +: _sttop 2e _cv ; + +\ _words ( cstr -- ) +: _words lastnfa + begin + 2dup swap dup if npfx else 2drop -1 then + if dup .strname space then + nfa>next dup 0= + until 2drop cr ; + +\ words name ( -- ) prints the words in the forth dictionary +: words parsenw _words ; + +\ .long ( n -- ) emit 8 hex digits +: .long dup 10 rshift .word .word ; + +\ st? ( -- ) prints out the stack +: st? ." ST: " _stptr COG@ 2+ dup _sttop < + if _sttop swap - 0 + do _sttop 2- i - COG@ .long space loop + else drop + then cr ; + +\ variable ( -- ) skip blanks parse the next word and create +\ a variable, allocate a long, 4 bytes +: variable + lockdict create $C_a_dovarl w, 0 l, forthentry freedict ; + +\ constant ( x -- ) skip blanks parse the next word and create +\ a constant, allocate a long, 4 bytes +: constant + lockdict create $C_a_doconl w, l, forthentry freedict ; + +\ waitpeq ( n1 n2 -- ) \ wait until state n1 is equal to +\ ina anded with n2 +: waitpeq _execasm2>0 1E0 _cnip ; + +\ locknew ( -- n2 ) allocate a lock, result is in n2, -1 +\ if unsuccessful +: locknew -1 4 hubop -1 = if drop -1 then ; + +\ (forget) ( cstr -- ) wind the dictionary back to the word +\ which follows - caution +: (forget) dup +if + find if + pfa>nfa nfa>lfa dup here W! W@ wlastnfa W! + else .cstr 3f emit cr then +else drop then ; + +\ forget ( -- ) wind the dictionary back to the word which +\ follows - caution +: forget parsenw (forget) ; + +\ free ( -- ) display free main bytes and current cog longs +: free dictend W@ here W@ - . ." bytes free - " par + coghere W@ - . ." cog longs free" cr ; + +\ ifnot: name ( -- ) - bedingte compilierung; wenn name schon +\ im wörterbuch vorhanden, wird bis zum nächsten semikolon +\ der eingabestrom ignoriert +: ifnot: parsenw nip find if begin key 3B = until + key drop then ; +\ bei konstrukte, die keine doppelpunkdefinition sind, muss der +\ block mit diesem Wort abgeschlossen werden +: :; ; + +\ --------------------------------------------------------- BUS + +\ bin ( -- ) - umschaltung auf duales zahlensystem +\ : bin 2 base W! ; +\ +---------------------------- /hs +\ |+--------------------------- /wr +\ ||+-------------------------- busclk +\ |||+------------------------- hbeat +\ ||||+------------------------ al +\ |||||+----------------------- /bel +\ ||||||+---------------------- /adm +\ |||||||+--------------------- /ram2 +\ ||||||||+-------------------- /ram1 +\ ||||||||| +--------- a0..10 +\ ||||||||| | +\ ||||||||| | +- d0..7 +\ |||||||||+---------++------+ +\ 00000000000000000000000000000000 +\ bin 00000111111111111111111100000000 constant dinp hex +\ bin 00000111111111111111111111111111 constant dout hex +\ bin 00000010000000000000000000000000 constant boff hex +\ bin 00000100011110000000000000000000 constant _s1 hex +\ bin 00000000001110000000000000000000 constant _b1 hex +\ bin 00000010001110000000000000000000 constant _b2 hex +\ bin 00000110001110000000000000000000 constant _b3 hex +\ bin 00000000010110000000000000000000 constant _a1 hex +\ bin 00000010010110000000000000000000 constant _a2 hex +\ bin 00000110010110000000000000000000 constant _a3 hex +\ bin 00001000000000000000000000000000 constant ?hs hex + +8000000 constant ?hs + +: [inp] \ ( -- ) bus eingabe + 7FFFF00 dira COG! ; \ dinp + +: [out] \ ( -- ) bus ausgabe + 7FFFFFF dira COG! ; \ dout + +: [off] \ ( -- ) bus aus + 2000000 dira COG! 0 outa COG! ; \ boff + +: [end] \ ( -- ) buskommunikation beendet + 4780000 outa COG! [inp] ; \ _s1 + +: [hs=1] \ ( -- ) wartet auf hs = 1 + ?hs dup waitpeq ; + +: [hs=0] \ ( -- ) warten auf hs = 0 + 0 ?hs waitpeq ; + +: [s!] \ ( c ctrl -- ) sende 8 bit an einen slave + [out] [hs=1] swap ff and or outa COG! [hs=0] [end] ; + +: [s@] \ ( ctrl -- c ) empfängt 8 bit von einem slave + [inp] [hs=1] outa COG! [hs=0] ina COG@ ff and [end] ; + +: [b!] \ ( c -- ) sende 8 bit an bellatrix + 2380000 [s!] ; \ _b2 + +: [a!] \ ( c -- ) sende 8 bit an administra + 2580000 [s!] ; \ _a2 + +: [b@] \ ( -- c ) empfängt 8 bit von bellatrix + 6380000 [s@] ; \ _b3 + +: [a@] \ ( -- c ) empfängt 8 bit von administra + 6580000 [s@] ; \ _a3 + +: <8 \ ( -- ) + 8 lshift ; + +\ [b.l!] ( 32b -- ) - long an bellatrix senden +: [b.l!] + dup 18 rshift [b!] + dup 10 rshift [b!] + dup 8 rshift [b!] + [b!] ; + +\ [b.l@] ( -- 32b ) - long von bellatrix einlesen +: [b.l@] + [b@] <8 + [b@] or <8 + [b@] or <8 + [b@] or ; + +\ [a.s@] ( -- ) - einen cstring von administra empfangen +\ und im pad speichern +: [a.s@] + [a@] pad 2dup C! 1+ swap + 0 do dup [a@] swap C! 1+ loop drop ; + +\ [a.s!] ( cstr -- ) - einen cstring an administra senden +: [a.s!] + dup C@ dup [a!] \ ( -- cstr len ) len senden + 0 do \ ( cstr len -- cstr ) + 1+ dup C@ [a!] \ ( cstr -- cstr+1 ) zeichen senden + loop drop ; \ ( cstr -- ) + +\ [a.w@] ( -- 16b ) - 16bit-wert von administra einlesen +: [a.w@] + [a@] <8 [a@] or ; + +\ [a.l!] ( 32b -- ) - long an administra senden +: [a.l!] + dup 18 rshift [a!] + dup 10 rshift [a!] + dup 8 rshift [a!] + [a!] ; + +\ [a.l@] ( -- 32b ) - long von administra einlesen +: [a.l@] + [a@] <8 + [a@] or <8 + [a@] or <8 + [a@] or ; + +wvariable b[lock] \ nummer der semaphore für den + \ zugriff auf die bus-hardware + +\ b[ ( -- ) bus belegen; wartet bis semaphore freigegeben ist +: b[ begin b[lock] W@ lockset -1 <> until [inp] ; + +\ ]b ( -- ) bus freigeben +\ ! busclk bleibt auf ausgabe, da dieses signal sonst +\ kein definierten pegel besitzt ! +: ]b [off] b[lock] W@ lockclr drop ; + +\ administra-kommandoformate + +: b[a! b[ [a!] ; +: b[a!a! b[ [a!] [a!] ; +: adm:fkt! b[a! ]b ; \ ( fkt -- ) +: adm:fkt!b@ b[a! [a@] ]b ; \ ( fkt -- b ) +: adm:fkt!b! b[a!a! ]b ; \ ( b fkt -- ) +: adm:fkt!b!b@ b[a!a! [a@] ]b ; \ ( b fkt -- b ) +: adm:fkt!s@ b[a! [a.s@] ]b ; \ ( fkt -- ) +: adm:fkt!s!b@ b[a! [a.s!] [a@] ]b ; \ ( s fkt -- b ) +: adm:fkt!b!l@ b[a!a! [a.l@] ]b ; \ ( b fkt -- l ) + +\ ----------------------------------------------------- SD0.LIB + +\ marker-funktionen + +\ adm:dmact ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ drop ; + +\ adm:dmset ( dmnr -- ) - marker setzen +: adm:dmset 1A adm:fkt!b! ; + +\ dateisystem-funktionen + +\ adm:volname ( -- ) - name des volumes im pad ablegen +: adm:volname 0C adm:fkt!s@ ; + +\ adm:mount ( -- err ) - medium mounten +: adm:mount 01 adm:fkt!b@ ; + +\ adm:unmount ( -- err ) - medium unmounten +: adm:unmount 18 adm:fkt!b@ ; + +\ adm:checkmounted ( -- t/f ) +: adm:checkmounted 0D adm:fkt!b@ ; + +\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren +: adm:diropen 02 adm:fkt! ; + +\ adm:nextfile ( -- st ) +\ st = 0 - keine gültige datei +\ st = 1 - dateiname im pad gültig +\ bei gültigem eintrag befindet sich der dateiname im pad +: adm:nextfile b[ 3 [a!] [a@] dup if [a.s@] then ]b ; + +\ adm:fattrib ( nr -- attrib ) - dateiattribut abfragen +: adm:fattrib 0B adm:fkt!b!l@ ; + +\ adm:chdir ( cstr -- err ) - verzeichnis öffnen +: adm:chdir 16 adm:fkt!s!b@ ; + +\ adm:getc ( -- c ) - ein zeichen aus der geöffneten datei lesen +: adm:getc 06 adm:fkt!b@ ; + +\ adm:eof ( -- eof ) - abfrage ob end of file erreicht ist +: adm:eof 1E adm:fkt!b@ ; + +\ adm:open ( cstr modus -- err ) - datei öffnen +\ modus "R" $52 - Read +\ modus "W" $57 - Write +\ modus "A" $41 - Append +: adm:open b[ 4 [a!] [a!] [a.s!] [a@] ]b ; + +\ adm:close ( -- ) - datei schließen +: adm:close 05 adm:fkt!b@ ; + +\ ----------------------------------------------------- SCR.LIB + +\ [dscr] ( scrnr -- ) display-screen setzen +: [dscr] 0 [b!] 59 [b!] [b!] ; + +\ [wscr] ( scrnr -- ) schreib-screen setzen +: [wscr] 0 [b!] 58 [b!] [b!] ; + +\ [key?] ( -- c ) - ungekapselte tastaturstatusabfrage +: [key?] 0 [b!] 1 [b!] [b@] ; + +\ [key] ( -- c ) - ungekapselte tastaturabfrage +: [key] 0 [b!] 2 [b!] [b@] ; + +\ [emit] ( c -- ) - ungekapselte zeichenausgabe +: [emit] emit? if emit then ; + +\ ----------------------------------------------------- TOOLS + +\ cls ( -- ) - screen löschen +: cls 01 emit ; + +\ .tab ( -- ) - tabulator +: .tab 09 emit ; + +\ .err ( err -- ) - fehlermeldung ausgeben +\ 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 +: .err dup if ERR then drop ; + +\ .pad ( -- ) - ausgabe eines strings im pad +: .pad pad .cstr ; + +\ .vname ( -- ) - ausgabe des namens der eingelegten sd-card +: .vname adm:volname .pad ; + +\ mount ( -- ) - sd-card mounten +: mount adm:mount .err ." Medium : " .vname cr ; + +\ unmount ( -- ) - sd-card unmounten +: unmount adm:unmount .err ; + +\ mount? ( -- ) - test ob medium mounted ist +\ wird als exception gewertet +: mount? adm:checkmounted 0= if 1 .err then ; + +\ padbl ( -- ) fills this cogs pad with blanks +: padbl pad padsize bl fill ; + +\ .entry ( -- st ) - einen verzeichniseintrag ausgeben +: .entry + adm:nextfile 13 adm:fattrib if 0F emit else space then + dup if .pad .tab then ; + +\ .len ( st -- st ) - dateilänge ausgeben +: .len dup if 0 adm:fattrib . then ; + +\ lscnt ( cnt1 st -- cnt2 st ) - spaltenformatierung für ls +\ cnt - spaltenzähler, st - flag verzeichnisende +: lscnt + swap 1+ dup 4 = if cr drop 0 else .tab then swap ; + +\ lsl ( -- ) - verzeichnis anzeigen, long-format +: lsl mount? + adm:diropen begin .entry .len cr 0= until padbl ; + +\ ls ( -- ) - verzeichnis in spalten anzeigen +: ls mount? + adm:diropen 0 begin .entry lscnt 0= until drop padbl cr ; + +\ cd name ( -- ) - verzeichnis wechseln +: cd mount? parsenw adm:chdir .err ; + +\ open name ( -- ) - datei lesend öffnen und auf fehler prüfen +: open + mount? parsenw dup + if 52 adm:open else drop 23 then .err ; + +\ close ( -- ) - geöffnete datei schließen +: close adm:close .err ; + +\ dload name - datei compilieren; log im gleichen screen +\ load name - datei compilieren; log screen 3 +\ sys name - datei aus sys compilieren; log screen 3 +\ die datei wird in der nächsten freien cog compiliert +\ fl ist für load nicht nötig und bringt in dem kontext +\ die cog-zuordnung durcheinander + +: (load) + begin adm:getc emit adm:eof until ; + +: (dload) + open cogid nfcog iolink + (load) + cogid iounlink close ; + +: (sload) + open cogid 3 dup b[ [wscr] ]b iolink + (load) + cogid dup b[ [wscr] ]b iounlink close ; + +: load + ." Loading... " (sload) ; + +: dload + (dload) ; + +: sys + 2 adm:dmset 1 adm:dmact ." Loading... " (sload) 2 adm:dmact ; + +\ ------------------------------------------------- SPIN-LOADER + +\ (spin) ( cstr -- ) - c" reg.sys" (spin) +: (spin) + dup C@ 1+ + 0 do + dup i + C@ + ldvar 1+ i + C! + loop drop + 1 ldvar C! +; + +\ spin name ( -- ) - spinobjekt "name" starten +: spin + parsenw (spin) ; + +\ regime ( -- ) - startet dir trios-cli "regime" +: regime + 0 adm:dmact + c" reg.sys" (spin) ; + +\ ----------------------------------------------------- DRV:INT + + +wvariable icog \ nummer der drv:int-cog +wvariable lcog \ nummer interaktiven cog + +\ xint ( n -- ) io von cog n auf drv:int umschalten +: xint icog W@ ioconn ; + +\ [cogscr] ( nr -- ) - umschaltung screen + cog +: [cogscr] + dup 2dup lcog W! xint [dscr] [wscr] ; + +\ =n ( n1 n2 -- n1 n1=n2 ) +: =n 2dup = swap drop ; + +\ [esc] ( -- ) - manager für esc-funktionen im drv:int +: [esc] + begin [key?] until [key] + 71 =n if 1b [emit] then \ esc - q : esc-char/quit + 31 =n if 1 [cogscr] then \ esc - 1 : cog-screen 0 + 32 =n if 2 [cogscr] then \ esc - 2 : cog-screen 1 + 33 =n if 3 [cogscr] then \ esc - 3 : cog-screen 2 + 62 =n if lcog W@ cogreset then \ esc - b : break (cog) + 72 =n if reboot then \ esc - r : reset (chip) + drop ; \ esc - esc : pause + +\ drv:int ( -- ) treiber für bellatrix-terminal +\ diese cog fragt in einer endlosschleife ab, ob zeichen +\ versendet oder empfangen werden sollen. um die zeichenausgabe +\ zu beschleunigen, findet ausgabe und eingabe in einem +\ verhältnis von 512:1 statt. per esc-code können spezielle +\ funktionen im driver ausgelöst werden. +: drv:int + \ name und typ der cog einstellen + cogid dup cogstate 10 swap C! c" drv:int" over + cognumpad ccopy + 20 delms 0D emit \ verzögertes cr für prompt + begin + \ input --> vga/video + 200 0 do key? \ eingabezeichen vorhanden? + if key b[ [b!] ]b then loop \ cog ---> bel.vga + \ output <-- keyboard + b[ [key?] \ tastenstatus bellatrix? + if [key] dup 1b = if drop [esc] else [emit] thens ]b + 0 until ; + +\ ----------------------------------------------------- SYSINIT + +: start \ ( -- ) initialisierung hive + locknew b[lock] W! \ b-semaphore + 0 dup cogstate 10 swap C! c" drv:ldr" over + cognumpad ccopy + 5 dup icog W! c" drv:int" swap cogx 1 b[ [cogscr] ]b ; +: _ob onboot ; +: onboot _ob start ; + + + diff --git a/bin/sdcard/system/bel.lib b/bin/sdcard/system/bel.lib new file mode 100644 index 0000000..0034988 --- /dev/null +++ b/bin/sdcard/system/bel.lib @@ -0,0 +1,77 @@ + +hex + +ifnot: lib:bel +: lib:bel ; + +\ kommandoformate + +ifnot: bel:fkt! \ ( fkt -- ) +: bel:fkt! b[ 0 [b!] [b!] ]b ; + +ifnot: bel:fkt!b! \ ( b fkt -- ) +: bel:fkt!b! b[ 0 [b!] [b!] [b!] ]b ; + +ifnot: bel:fkt!b!l@ \ ( b fkt -- l ) +: bel:fkt!b!l@ b[ 0 [b!] [b!] [b!] [b.l@] ]b ; + +ifnot: bel:fkt!b!l! \ ( l b fkt -- ) +: bel:fkt!b!l! b[ 0 [b!] [b!] [b!] [b.l!] ]b ; + +ifnot: bel:fkt!l@ \ ( fkt -- l ) +: bel:fkt!l@ b[ 0 [b!] [b!] [b.l@] ]b ; + +ifnot: bel:fkt!b@ \ ( fkt -- b ) +: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ; + +\ chipmanagment-funktionen + +ifnot: bel:wscr \ ( scrnr -- ) - schreibscreen setzen +: bel:wscr 58 bel:fkt!b! ; + +ifnot: bel:dscr \ ( scrnr -- ) - displayscreen setzen +: bel:dscr 59 bel:fkt!b! ; + +ifnot: bel:getcol \ ( colnr -- col ) - farbe abfragen +: bel:getcol 5A bel:fkt!b!l@ ; + +ifnot: bel:setcol \ ( col colnr -- ) - farbe setzen +: bel:setcol 5B bel:fkt!b!l! ; + +ifnot: bel:getresx \ ( -- resx ) - abfrage x-auflösung +: bel:getresx 5C bel:fkt!l@ ; + +ifnot: bel:getresy \ ( -- resy ) - abfrage y-auflösung +: bel:getresy 5D bel:fkt!l@ ; + +ifnot: bel:getcols \ ( -- cols ) - abfrage textspalten +: bel:getcols 5E bel:fkt!b@ ; + +ifnot: bel:getrows \ ( -- rows ) - abfrage textzeilen +: bel:getrows 5F bel:fkt!b@ ; + +ifnot: bel:getcogs \ ( -- cogs ) - abfrage belegte cogs +: bel:getcogs 60 bel:fkt!b@ ; + +ifnot: bel:getspec \ ( -- spec ) - abfrage codespezifikation +: bel:getspec 61 bel:fkt!l@ ; + +ifnot: bel:getver \ ( -- ver ) - abfrage codeversion +: bel:getver 62 bel:fkt!l@ ; + +ifnot: bel:load \ ( cstr -- ) - bellatrix-code laden +: bel:load + 52 adm:open .err \ datei öffnen + b[ + 0 [b!] 63 [b!] \ bella-loader starten + 10 0 do 06 [a!] [a@] [b!] loop \ header einlesen + 0A [a!] 0 [a.l!] \ 0 adm:seek + [b@] <8 [b@] or \ dateilänge empfangen + 0 do 06 [a!] [a@] [b!] loop \ datei senden + ]b + adm:close .err \ datei schließen +; + + + + diff --git a/bin/sdcard/system/beltest.bin b/bin/sdcard/system/beltest.bin new file mode 100644 index 0000000..2c18506 Binary files /dev/null and b/bin/sdcard/system/beltest.bin differ diff --git a/bin/sdcard/system/charmap.bin b/bin/sdcard/system/charmap.bin new file mode 100644 index 0000000..60406b8 Binary files /dev/null and b/bin/sdcard/system/charmap.bin differ diff --git a/bin/sdcard/system/cog.lib b/bin/sdcard/system/cog.lib new file mode 100644 index 0000000..14c242e --- /dev/null +++ b/bin/sdcard/system/cog.lib @@ -0,0 +1,74 @@ + +hex + +ifnot: lib:cog +: lib:cog ; + +\ cog special register + +ifnot: ctra 1F8 wconstant ctra :; +ifnot: ctrb 1F9 wconstant ctrb :; +ifnot: frqa 1FA wconstant frqa :; +ifnot: frqb 1FB wconstant frqb :; +ifnot: phsa 1FC wconstant phsa :; +ifnot: phsb 1FD wconstant phsb :; +ifnot: vcfg 1FE wconstant vcfg :; +ifnot: vscl 1FF wconstant vscl :; + +\ this words needs to align with the assembler code + +ifnot: _faddrmask : _faddrmask 1 _cv ; +ifnot: _flongmask : _flongmask 2 _cv ; +ifnot: _stptr : _stptr 5 _cv ; +ifnot: _sttos : _sttos 7 _cv ; +ifnot: _treg1 : _treg1 8 _cv ; +ifnot: _treg2 : _treg2 9 _cv ; +ifnot: _treg3 : _treg3 a _cv ; +ifnot: _treg4 : _treg4 b _cv ; +ifnot: _treg5 : _treg5 c _cv ; +ifnot: _treg6 : _treg6 d _cv ; +ifnot: _stbot : _stbot e _cv ; +ifnot: _sttop : _sttop 2e _cv ; +ifnot: _rsbot : _rsbot _sttop ; + +\ waitcnt ( n1 n2 -- n1 ) \ wait until n1, add n2 to n1 +ifnot: waitcnt +: waitcnt _execasm2>1 1F1 _cnip ; + +\ waitpeq ( n1 n2 -- ) \ wait until state n1 is equal to +\ ina anded with n2 +ifnot: waitpeq +: waitpeq _execasm2>0 1E0 _cnip ; + +\ waitpne ( n1 n2 -- ) \ wait until state n1 is not equal +\ to ina anded with n2 +ifnot: waitpne +: waitpne _execasm2>0 1E8 _cnip ; + +\ lockret ( n1 -- ) deallocate a lock, previously allocated +\ via locknew +ifnot: lockret +: lockret 5 hubop 2drop ; + +\ locknew ( -- n2 ) allocate a lock, result is in n2, -1 +\ if unsuccessful +ifnot: locknew +: locknew -1 4 hubop -1 = if drop -1 then ; + +\ cog+ ( -- ) add a forth cog +ifnot: cog+ +: cog+ (cog+) ; + +\ (cog-) ( -- ) stop first forth cog, cannot be executed form +\ the first forth cog +ifnot: (cog-) +: (cog-) nfcog cogstop ; + +\ cog- ( -- ) stop first forth cog, cannot be executed form +\ the first forth cog +ifnot: cog- +: cog- (cog-) ; + + + + diff --git a/bin/sdcard/system/debug.mod b/bin/sdcard/system/debug.mod new file mode 100644 index 0000000..937129d --- /dev/null +++ b/bin/sdcard/system/debug.mod @@ -0,0 +1,65 @@ + +hex + +ifnot: mod:debug +: mod:debug ; + +\ keycode ( -- ) - anzeige der tastaturcodes +ifnot: keycode +: keycode + begin + 0 key? if + drop key dup dup ." code : " emit ." : " . cr 1B = + then until ; + +\ +\ Noisy reset messages +\ +\ print out a reset message to the console +\ (rsm) ( n -- ) n is the last status +\ 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 + +: (rsm) state W@ 2 and 0= swap +\ process the last status + dup 0= if c" ok" else + dup FF11 = if c" DST OVER" else + dup FF12 = if c" RST OVER" else + dup FF21 = if c" DST LOW" else + dup FF22 = if c" RST LOW" else + dup 8001 = if c" COGs OUT" else + dup 8002 = if c" hMEM OUT" else + dup 8003 = if c" ROM WR" else + dup 8004 = if c" FL" else + dup 8005 = if c" cMEM OUT" else + dup 8006 = if c" ROM RD" else + c" ?" + thens + rot if + lockdict cr c" ERR : " .cstr swap . .cstr cr freedict + else 2drop then ; +: onreset (rsm) 4 state orC! ; + +\ .byte ( n1 -- ) +: .byte <# # # #> .cstr ; + +\ [if (dumpb) +: (dumpb) cr over .addr space dup .addr _ecs bounds ; ] + +\ [if (dumpm) +: (dumpm) cr .word _ecs ; ] + +\ [if (dumpe) +: (dumpe) tbuf 8 bounds do i C@ .byte space loop 2 spaces tbuf 8 bounds do i C@ dup bl < if drop 2e then emit loop ; ] + +\ dump ( adr cnt -- ) uses tbuf +[if dump +: dump (dumpb) do i (dumpm) i tbuf 8 cmove (dumpe) 8 +loop cr ; ] diff --git a/bin/sdcard/system/eram.bin b/bin/sdcard/system/eram.bin new file mode 100644 index 0000000..7b637aa Binary files /dev/null and b/bin/sdcard/system/eram.bin differ diff --git a/bin/sdcard/system/error.txt b/bin/sdcard/system/error.txt new file mode 100644 index 0000000..17013b3 --- /dev/null +++ b/bin/sdcard/system/error.txt @@ -0,0 +1,40 @@ + +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 diff --git a/bin/sdcard/system/flash.bin b/bin/sdcard/system/flash.bin new file mode 100644 index 0000000..cf566e5 Binary files /dev/null and b/bin/sdcard/system/flash.bin differ diff --git a/bin/sdcard/system/fterm.bin b/bin/sdcard/system/fterm.bin new file mode 100644 index 0000000..51166a8 Binary files /dev/null and b/bin/sdcard/system/fterm.bin differ diff --git a/bin/sdcard/system/hplay.bin b/bin/sdcard/system/hplay.bin new file mode 100644 index 0000000..3164350 Binary files /dev/null and b/bin/sdcard/system/hplay.bin differ diff --git a/bin/sdcard/system/hplay.mod b/bin/sdcard/system/hplay.mod new file mode 100644 index 0000000..2916ebe --- /dev/null +++ b/bin/sdcard/system/hplay.mod @@ -0,0 +1,155 @@ + +hex + +ifnot: mod:hplay +: mod:hplay ; + +\ kommandoformate + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!w@ \ ( b fkt -- w ) +: adm:fkt!b!w@ b[ [a!] [a!] [a.w@] ]b ; + +ifnot: adm:fkt!s!b@ \ ( cstr fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: bel:fkt!b@ \ ( fkt -- b ) +: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ; + +ifnot: bel:char \ ( b -- ) +: bel:char b[ [b!] ]b ; + +\ hss-funktionen + +ifnot: hss:load \ ( cstr -- err ) - hss-datei laden +: hss:load dup if 64 adm:fkt!s!b@ then ; + +ifnot: hss:play \ ( -- ) - datei im puffer abspielen +: hss:play 65 adm:fkt! ; + +ifnot: hss:stop \ ( -- ) - player stop +: hss:stop 66 adm:fkt! ; + +ifnot: hss:reg \ hreg ( regnr -- 16b ) +: hss:reg 69 b[ [a!] [a!] [a.w@] ]b ; + +ifnot: hss:vol \ hvol ( vol -- ) - lautstärke 0..15 +: hss:vol 6A adm:fkt!b! ; + +\ keyboard-funktionen + +ifnot: key:stat \ ( -- stat ) - tastenstatus abfragen +: key:stat 1 bel:fkt!b@ ; + +\ steuerzeichen + +ifnot: scr:cls \ ( -- ) - screen löschen +: scr:cls 01 bel:char ; + +ifnot: scr:home \ ( -- ) - cursor oben links +: scr:home 02 bel:char ; + +ifnot: scr:curon \ ( -- ) - cursor anschalten +: scr:curon 04 bel:char ; + +ifnot: scr:curoff \ ( -- ) - cursor abschalten +: scr:curoff 05 bel:char ; + +\ sd0-funktionen + +\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren +ifnot: adm:diropen +: adm:diropen + 02 adm:fkt! ; + +\ adm:nextfile ( -- st ) +\ st = 0 - keine gültige datei +\ st = 1 - dateiname im pad gültig +\ bei gültigem eintrag befindet sich der dateiname im pad +ifnot: adm:nextfile +: adm:nextfile + b[ 03 [a!] [a@] dup if [a.s@] then ]b ; + +\ metafunktionen + +\ hload name ( -- ) - hss-datei in player laden + +ifnot: hload +: hload mount? parsenw hss:load .err ; + +ifnot: .hset +: .hset \ ( shift -- ) - eine registersatz ausgeben + 5 0 do dup i + hss:reg .word space loop drop ; + +ifnot: .hreg +: .hreg \ ( -- ) - register ausgeben + 14 0 do i .hset cr 5 +loop ; + +ifnot: fadeout +: fadeout \ ( -- ) - sound langsam ausblenden + f 0 do e i - hss:vol 50 delms loop ; + +ifnot: end? +: end? \ ( cnt -- flag ) - abfrage nach cnt wiederholungen + 4 hss:reg = ; + +ifnot: hwait +: hwait \ ( -- flag ) - wartet auf songende oder taste + begin 50 delms key? 2 end? or until key drop ; + +ifnot: hreg.. +: hreg.. \ ( -- ) - fortlaufende anzeige register + scr:curoff scr:cls begin scr:home .hreg 2 end? until + scr:curon fadeout hss:stop ; + +ifnot: (hplay) +: (hplay) \ ( cstr -- ) + ." Datei : " dup .cstr hss:load .err f hss:vol hss:play + hwait fadeout hss:stop 100 delms cr ; + +\ hplay name ( -- ) - datei abspielen +ifnot: hplay +: hplay + hload hss:play ; + +\ files? ( -- cnt ) - anzahl dateien im dir +ifnot: files? +: files? + adm:diropen + 0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ; + +\ filenr? ( nr -- ) +ifnot: filenr? +: filenr? + adm:diropen + 0 do adm:nextfile drop loop ; + +\ hdirplay ( -- ) - gesamtes verzeichnis abspielen +\ im verzeichnis dürfen nur hss-dateien sein! +ifnot: hdirplay +: hdirplay + decimal files? dup ." Dateien : " . cr + 0 do i dup 1 + . 3 + filenr? pad (hplay) loop padbl hex ; + +: (hp) ." play : " dup .cstr hss:load .err ; + +ifnot: playliste +: playliste + c" kw.hss" (hplay) + c" genes.hss" (hplay) + c" greenpuz.hss" (hplay) + c" hssintro.hss" (hplay) + c" kali766.hss" (hplay) + c" machine.hss" (hplay) + c" metroid.hss" (hplay) + c" mrboss.hss" (hplay) + c" mrevil.hss" (hplay) + c" raind.hss" (hplay) + c" sytrus.hss" (hplay) + c" tbellsp1.hss" (hplay) ; + diff --git a/bin/sdcard/system/hss.lib b/bin/sdcard/system/hss.lib new file mode 100644 index 0000000..33db039 --- /dev/null +++ b/bin/sdcard/system/hss.lib @@ -0,0 +1,60 @@ + +hex + +ifnot: lib:hss +: lib:hss ; + +\ kommandoformate + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!b! \ ( b b fkt -- ) +: adm:fkt!b!b! b[ [a!] [a!] [a!] ]b ; + +ifnot: adm:fkt!b!w@ \ ( b fkt -- w ) +: adm:fkt!b!w@ b[ [a!] [a!] [a.w@] ]b ; + +ifnot: adm:fkt!s!b@ \ ( cstr fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +\ hss-funktionen + +\ ( cstr -- err ) - hss-datei laden +ifnot: hss:load +: hss:load dup if 64 adm:fkt!s!b@ then ; + +\ ( -- ) - datei im puffer abspielen +ifnot: hss:play +: hss:play 65 adm:fkt! ; + +\ ( -- ) - player stop +ifnot: hss:stop +: hss:stop 66 adm:fkt! ; + +\ ( -- ) - player pause +ifnot: hss:pause +: hss:pause 67 adm:fkt! ; + +\ hreg ( regnr -- 16b ) +\ 0 iEndFlag iRowFlag iEngineC iBeatC iRepeat Player +\ 5 iNote iOktave iVolume iEffekt iInstrument Kanal 1 +\ 10 iNote iOktave iVolume iEffekt iInstrument Kanal 2 +\ 15 iNote iOktave iVolume iEffekt iInstrument Kanal 3 +\ 20 iNote iOktave iVolume iEffekt iInstrument Kanal 4 +\ +\ iEndFlag Repeat oder Ende wurde erreicht +\ iRowFlag Trackerzeile (Row) ist fertig +\ iEngineC Patternzähler +\ iBeatC Beatzähler (Anzahl der Rows) +\ iRepeat Zähler für Loops +ifnot: hss:reg +: hss:reg 69 b[ [a!] [a!] [a.w@] ]b ; + +\ hvol ( vol -- ) - lautstärke 0..15 +ifnot: hss:vol +: hss:vol 6A adm:fkt!b! ; + diff --git a/bin/sdcard/system/htext.bel b/bin/sdcard/system/htext.bel new file mode 100644 index 0000000..786c0bb Binary files /dev/null and b/bin/sdcard/system/htext.bel differ diff --git a/bin/sdcard/system/key.lib b/bin/sdcard/system/key.lib new file mode 100644 index 0000000..45204a5 --- /dev/null +++ b/bin/sdcard/system/key.lib @@ -0,0 +1,17 @@ + +hex + +ifnot: lib:key +: lib:key ; + +\ kommandoformate +ifnot: bel:fkt!b@ \ ( fkt -- b ) +: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ; + +\ keyboard-funktionen +ifnot: key:stat \ ( -- stat ) - tastenstatus abfragen +: key:stat 1 bel:fkt!b@ ; +ifnot: key:code \ ( -- code ) - tastencode abfragen +: key:code 2 bel:fkt!b@ ; +ifnot: key:spec \ ( -- spec ) - spezialtasten abfragen +: key:spec 4 bel:fkt!b@ ; diff --git a/bin/sdcard/system/keycode.bin b/bin/sdcard/system/keycode.bin new file mode 100644 index 0000000..9ffd612 Binary files /dev/null and b/bin/sdcard/system/keycode.bin differ diff --git a/bin/sdcard/system/perplex.bin b/bin/sdcard/system/perplex.bin new file mode 100644 index 0000000..6921df1 Binary files /dev/null and b/bin/sdcard/system/perplex.bin differ diff --git a/bin/sdcard/system/ramtest.bin b/bin/sdcard/system/ramtest.bin new file mode 100644 index 0000000..576fcda Binary files /dev/null and b/bin/sdcard/system/ramtest.bin differ diff --git a/bin/sdcard/system/regime.bin b/bin/sdcard/system/regime.bin new file mode 100644 index 0000000..e098428 Binary files /dev/null and b/bin/sdcard/system/regime.bin differ diff --git a/bin/sdcard/system/regime.txt b/bin/sdcard/system/regime.txt new file mode 100644 index 0000000..d2a673b --- /dev/null +++ b/bin/sdcard/system/regime.txt @@ -0,0 +1,56 @@ +help - diese hilfe + - bin/adm/bel-datei wird gestartet +mount - sd-card mounten +unmount - sd-card abmelden +dir wh - verzeichnis anzeigen +type - anzeige einer textdatei +aload - administra-code laden +bload - bellatrix-treiber laden +rload - regnatix-code laden +del - datei l?schen +cls - bildschirm l?schen +free - freier speicher auf sd-card +attrib ashr - attribute ?ndern +cd - verzeichnis wechseln +mkdir - verzeichnis erstellen +rename - datei/verzeichnis umbenennen +format - sd-card formatieren +reboot - hive neu starten +sysinfo - systeminformationen +color <0..7> - farbe w?hlen +cogs - belegung der cogs anzeigen +dmlist - anzeige der verzeichnis-marker +dm - in das entsprechende marker- + verzeichnis wechseln +dmset - setzt den entsprechenden marker + auf das aktuelle verzeichnis +dmclr - marker l”schen + +marker: +r - root-verzeichnis +s - system-verzeichnis +u - user-verzeichnis +a/b/c - benutzerdefinierte verzeichnismarker +r, s, u-marker werden vom system automatisch gesetzt und +intern verwendet. + +RAMDISK: + +xload - datei in ram laden +xsave - datei aus ram speichern +xdir - verzeichnis im ram anzeigen +xrename - datei im ram umbenennen +xdel - datei im ram l”schen +xtype - text im ram anzeigen + +EXTERNE KOMMANDOS: + +sysconf - systemeinstellungen +hplay - hss-player +wplay - wav-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 + diff --git a/bin/sdcard/system/rom.bin b/bin/sdcard/system/rom.bin new file mode 100644 index 0000000..3db8d05 Binary files /dev/null and b/bin/sdcard/system/rom.bin differ diff --git a/bin/sdcard/system/rom.mod b/bin/sdcard/system/rom.mod new file mode 100644 index 0000000..9a91eda --- /dev/null +++ b/bin/sdcard/system/rom.mod @@ -0,0 +1,206 @@ + +\ ACHTUNG: Diese Modifikation nicht bei einer Installation im +\ HI-EEPROM verwenden! + +hex +[if mod:rom +: mod:rom ; ] + +\ constant ( x -- ) skip blanks parse the next word and create a constant, allocate a long, 4 bytes +[if constant +: constant lockdict create $C_a_doconl w, l, forthentry freedict ; ] + +\ +\ CONFIG PARAMETERS BEGIN +\ +40 wconstant fsps \ a page size which works with 32kx8 & 64kx8 eeproms + \ and should work with larger as well. + + +8000 constant fsbot \ file-system bottom: the start adress in eeprom for the file system + + \ file system top: the end address of the file system + \ uncomment the line for your comfiguration +\ 8000 constant fstop \ the end address for the file system with one 24LC256 32k eeprom +10000 constant fstop \ the end address for the file system with one 24LC512 64k eeprom +\ 20000 constant fstop \ the end address for the file system with two 24LC512 64k eeprom +\ 30000 constant fstop \ the end address for the file system with 3 24LC512 64k eeprom +\ 40000 constant fstop \ the end address for the file system with 4 24LC512 64k eeprom +\ 50000 constant fstop \ the end address for the file system with 5 24LC512 64k eeprom +\ 60000 constant fstop \ the end address for the file system with 6 24LC512 64k eeprom +\ 70000 constant fstop \ the end address for the file system with 7 24LC512 64k eeprom + +\ NOTE IF you have DEMOBOARD or any system with 32K EEPROM, you will step on your spin image +\ when you write to the EEPROM. You can still use it (if you are tricky), but KNOW WHAT YOUR DOING!!! + +\ +\ CONFIG PARAMETERS END +\ + + +\ lasti? ( -- t/f ) true if this is the last value of i in this loop +[if lasti? +: lasti? _rsptr COG@ 2+ COG@ 1- _rsptr COG@ 3 + COG@ = ; ] + +\ padbl ( -- ) fills this cogs pad with blanks +[if padbl +: padbl pad padsize bl fill ; ] +\ _eeread ( t/f -- c1 ) read a byte from the eeprom, ackbit in, byte out +[if _eeread : _eeread _sdai 0 8 0 do 1 lshift _sclh _sda? _scll if 1 or then loop +swap if _sdah else _sdal then _sdao _sclh _scll _sdal ; ] + +\ the eereadpage and eewritePage words assume the eeprom are 64kx8 and will address up to +\ 8 sequential eeproms +\ eereadpage ( eeAddr addr u -- t/f ) return true if there was an error, use lock 1 +[if eereadpage : eereadpage begin 1 lockset 0= until +1 max rot dup ff and swap dup 8 rshift ff and swap 10 rshift 7 and 1 lshift dup >r +_eestart A0 or _eewrite swap _eewrite or swap _eewrite or +_eestart r> A1 or _eewrite or +rot2 bounds +do lasti? _eeread i C! loop _eestop 1 lockclr drop ; ] + +\ _eeread ( t/f -- c1 ) read a byte from the eeprom, ackbit in, byte out +[if _eeread : _eeread _sdai 0 8 0 do 1 lshift _sclh _sda? _scll if 1 or then loop +swap if _sdah else _sdal then _sdao _sclh _scll _sdal ; ] + +\ the eereadpage and eewritePage words assume the eeprom are 64kx8 and will address up to +\ 8 sequential eeproms +\ eereadpage ( eeAddr addr u -- t/f ) return true if there was an error, use lock 1 +[if eereadpage : eereadpage begin 1 lockset 0= until +1 max rot dup ff and swap dup 8 rshift ff and swap 10 rshift 7 and 1 lshift dup >r +_eestart A0 or _eewrite swap _eewrite or swap _eewrite or +_eestart r> A1 or _eewrite or +rot2 bounds +do lasti? _eeread i C! loop _eestop 1 lockclr drop ; ] + +\ EW@ ( eeAddr -- n1 ) +[if EW@ +: EW@ t0 2 eereadpage if 8006 ERR then t0 W@ ; ] + +\ EC@ ( eeAddr -- c1 ) +[if EC@ +: EC@ EW@ FF and ; ] + +\ (fspa) ( addr1 -- addr2) addr2 is the next page aligned address after addr1 +: (fspa) fsps 1- + fsps 1- andn ; + +\ (fsnext) ( addr1 -- addr2 t/f) addr - the current file address, addr2 - the next addr, t/f - true if we have +\ gone past the end of the eeprom. t0 -length of the current file +\ t1 - length of the file name (char) +: (fsnext) t0 W@ t1 C@ + 2+ 1+ + (fspa) dup fstop >= ; + + +\ (fswr) ( addr1 addr2 n1 -- ) addr1 - the eepropm address to write, addr2 - the address to write from +\ n1 - the number of bytes to write +: (fswr) dup >r rot dup r> + fstop 1- > if A0 ERR then rot2 eewritepage if 88 ERR then ; + +\ (fsrd) ( addr1 addr2 n1 -- ) addr1 - the eepropm address to read, addr2 - the address of the read buffer +\ n1 - the number of bytes to read +: (fsrd) dup >r rot dup r> + fstop 1- > if C0 ERR then rot2 eereadpage if 90 ERR then ; + +\ (fsfree) ( -- n1 ) n1 is the first location in the file system, -1 if there are none +: (fsfree) -1 fsbot begin +\ read 3 bytes into t0, t1 and process + dup t0 3 (fsrd) t0 W@ FFFF = if nip dup -1 else (fsnext) then +until drop ; + +\ (fsfind) ( cstr -- addr ) find the last file named cstr, addr is the eeprom address, 0 if not found +: (fsfind) fsbot 0 >r begin +\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf + dup t0 22 (fsrd) t0 W@ FFFF = if -1 else + over t1 cstr= if r> drop dup >r then + (fsnext) + then +until 2drop r> ; + +\ (fslast) ( -- addr ) find the last file, 0 if not found +: (fslast) 0 fsbot begin +\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf + dup t0 22 (fsrd) t0 W@ FFFF = if -1 else + nip dup + (fsnext) + then +until drop ; + +\ fsclear ( -- ) +: fsclr padbl fsbot 400 + fsbot do i pad fsps (fswr) 2e emit fsps +loop -1 fsbot EW! ; +: fsclear -1 fsbot EW! ; + +\ fsfree ( -- ) +: fsfree (fsfree) dup -1 = if 0 else fstop swap - then . ." bytes free in fs" cr ; + +\ fsls ( -- ) list the files +: fsls cr fsbot begin +\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf + dup t0 22 (fsrd) t0 W@ FFFF = if -1 else + dup .addr space t0 W@ .addr space t1 .cstr cr + (fsnext) + then +until fstop swap - cr . ." bytes free in files system" cr cr ; + +\ (fsread) ( cstr -- ) +: (fsread) (fsfind) dup if +\ read 3 bytes into t0, t1 and process + dup t0 3 (fsrd) + t1 C@ + 2+ 1+ t0 W@ bounds do + ibound i - fsps >= if + i pad fsps (fsrd) pad fsps bounds + do i C@ emit loop i fsps 1- + seti + else + i EC@ emit + then + loop +else drop then padbl ; + +\ fsread ( -- ) filename +: fsread parsenw dup if (fsread) else drop then ; + +\ (fsload) ( ctsr -- ) +: (fsload) cogid nfcog iolink (fsread) d emit d emit cogid iounlink ; + +\ fsload filename ( -- ) send the file to the next free forth cog +: fsload parsenw dup if (fsload) else drop then ; + +\ (fsk) ( n1 -- n2) +: (fsk) 8 lshift key or ; + +\ fswrite filename ( -- ) writes a file until ... followed immediately by a cr is encountered +: fswrite (fsfree) dup -1 <> parsenw dup rot and if +\ set the file length to 0, copy in the file name + 0 pad W! dup C@ 2+ 1+ pad + swap pad 2+ ccopy +\ find the first free page + 0 swap key (fsk) (fsk) (fsk) +\ ( eaddr1 n1 addr2 n2 ) eaddr - start of file in the eeprom, n1 - bytes written so far, addr2 - next addr in the pad, +\ n2 - a 4 byte key buffer + begin +\ check to see if we have a ... at the end of a line + 2E2E2E0D over = if + -1 + else +\ get a key from the key buffer, write it the the pad + swap over 18 rshift dup dup d = if drop cr else emit then over C! 1+ tuck pad - fsps = if +\ we have a page worth of data, write it out + nip rot2 2dup + pad fsps (fswr) fsps + rot pad swap + then +\ get another key + (fsk) 0 + then + until +\ any keys left? + drop pad - dup 0> if +\ write the leftover, not a full page + >r 2dup + pad r> dup >r (fswr) r> + + else + drop + then +\ write the length of FFFF for the next file + 2dup + FFFF swap (fspa) dup fstop 1- < if EW! else 2drop then +\ subtract the length of the filename +1, and the 2 bytes which are the length of the file, and update the length of the file + over 2+ EC@ 2+ 1+ - swap EW! +else 2drop clearkeys then padbl +; + +\ fsdrop ( -- ) deletes last file +: fsdrop (fslast) dup -1 = if drop else FFFF swap EW! then ; + + diff --git a/bin/sdcard/system/scr.lib b/bin/sdcard/system/scr.lib new file mode 100644 index 0000000..a879692 --- /dev/null +++ b/bin/sdcard/system/scr.lib @@ -0,0 +1,69 @@ + +hex + +ifnot: lib:scr +: lib:scr ; + +\ kommandoformate +ifnot: bel:char \ ( b -- ) +: bel:char b[ [b!] ]b ; +ifnot: bel:fkt!b! \ ( b fkt -- ) +: bel:fkt!b! b[ 0 [b!] [b!] [b!] ]b ; +ifnot: bel:fkt!b!b! \ ( b b fkt -- ) +: bel:fkt!b!b! b[ 0 [b!] [b!] [b!] [b!] ]b ; +ifnot: bel:ctrl! \ ( ctrl -- ) +: bel:ctrl! b[ 0 [b!] 3 [b!] [b!] ]b ; +ifnot: bel:ctrl!b! \ ( b ctrl -- ) +: bel:ctrl!b! b[ 0 [b!] 3 [b!] [b!] [b!] ]b ; +ifnot: bel:ctrl!b@ \ ( ctrl -- b@ ) +: bel:ctrl!b@ b[ 0 [b!] 3 [b!] [b!] [b@] ]b ; +ifnot: bel:ctrl!b!b! \ ( b b ctrl -- ) +: bel:ctrl!b!b! b[ 0 [b!] 3 [b!] [b!] [b!] [b!] [b!] ]b ; + +\ einfache steuerzeichen +ifnot: scr:cls \ ( -- ) - screen löschen +: scr:cls 01 bel:char ; +ifnot: scr:home \ ( -- ) - cursor oben links +: scr:home 02 bel:char ; +ifnot: scr:pos1 \ ( -- ) - cursor an zeilenanfang +: scr:pos1 03 bel:char ; +ifnot: scr:curon \ ( -- ) - cursor anschalten +: scr:curon 04 bel:char ; +ifnot: scr:curoff \ ( -- ) - cursor abschalten +: scr:curoff 05 bel:char ; +ifnot: scr:scrlu \ ( -- ) - screen nach oben scrollen +: scr:scrlu 06 bel:char ; +ifnot: scr:scrld \ ( -- ) - screen nach unten scrollen +: scr:scrld 07 bel:char ; +ifnot: scr:bs \ ( -- ) - backspace +: scr:bs 08 bel:char ; +ifnot: scr:tab \ ( -- ) - tabulator +: scr:tab 09 bel:char ; + +\ screen-funktionen +ifnot: scr:logo \ ( y x -- ) - hive logo +: scr:logo 5 bel:fkt!b!b! ; +ifnot: scr:char \ ( char -- ) - zeichensatz direkt ausgeben +: scr:char 6 bel:fkt!b! ; + +\ parametrisierte steuerzeichen +ifnot: scr:setcur \ ( cur -- ) - cursorzeichen setzen +: scr:setcur 01 bel:ctrl!b! ; +ifnot: scr:setx \ ( x -- ) - cursor position x setzen +: scr:setx 02 bel:ctrl!b! ; +ifnot: scr:sety \ ( y -- ) - cursor position y setzen +: scr:sety 03 bel:ctrl!b! ; +ifnot: scr:getx \ ( -- x ) - cursor position x abfragen +: scr:getx 04 bel:ctrl!b@ ; +ifnot: scr:gety \ ( -- y ) - cursor position y abfragen +: scr:gety 05 bel:ctrl!b@ ; +ifnot: scr:setcol \ ( colnr -- ) - farbe wählen 0..15 +: scr:setcol 06 bel:ctrl!b! ; +ifnot: scr:sline \ ( row -- ) - anfangszeile scrollbereich +: scr:sline 07 bel:ctrl!b! ; +ifnot: scr:eline \ ( row -- ) - endzeile scrollbereich +: scr:eline 08 bel:ctrl!b! ; +ifnot: scr:sinit \ ( -- ) - +: scr:sinit 09 bel:ctrl! ; +ifnot: scr:tabset \ ( pos nr -- ) - tabulatorposition setzen 0..7 +: scr:tabset 0A bel:ctrl!b!b! ; diff --git a/bin/sdcard/system/sd0.lib b/bin/sdcard/system/sd0.lib new file mode 100644 index 0000000..8cf2e49 --- /dev/null +++ b/bin/sdcard/system/sd0.lib @@ -0,0 +1,176 @@ + +hex + +ifnot: lib:sd0 +: lib:sd0 ; + +\ ------------------------------------ lib:sd0 + +\ kommandoformate + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!b!l@ \ ( b fkt -- l ) +: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ; + +ifnot: adm:fkt!l! \ ( l fkt -- ) +: adm:fkt!l! b[ [a!] [a.l!] ]b ; + +ifnot: adm:fkt!l@ \ ( fkt -- l ) +: adm:fkt!l@ b[ [a!] [a.l@] ]b ; + +ifnot: adm:fkt!b!l! \ ( l b fkt -- ) +: adm:fkt!b!l! b[ [a!] [a!] [a.l!] ]b ; + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!b!s!b@ \ ( s b fkt -- b ) +: adm:fkt!b!s!b@ b[ [a!] [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!s!s!b@ \ ( s s fkt -- b ) +: adm:fkt!s!s!b@ b[ [a!] [a.s!] [a.s!] [a@] ]b ; + +\ dateisystem-funktionen + +\ adm:mount ( -- err ) - medium mounten +ifnot: adm:mount +: adm:mount + 01 adm:fkt!b@ ; + +\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren +ifnot: adm:diropen +: adm:diropen + 02 adm:fkt! ; + +\ adm:nextfile ( -- st ) +\ st = 0 - keine gültige datei +\ st = 1 - dateiname im pad gültig +\ bei gültigem eintrag befindet sich der dateiname im pad +ifnot: adm:nextfile +: adm:nextfile + b[ 03 [a!] [a@] dup if [a.s@] then ]b ; + +\ adm:open ( cstr modus -- err ) - datei öffnen +\ modus "R" $52 - Read +\ modus "W" $57 - Write +\ modus "A" $41 - Append +ifnot: adm:open +: adm:open + 04 adm:fkt!b!s!b@ ; + +\ adm:close ( -- ) - datei schließen +ifnot: adm:close +: adm:close + 05 adm:fkt!b@ ; + +\ adm:getc ( -- c ) - ein zeichen aus datei lesen +ifnot: adm:getc +: adm:getc + 06 adm:fkt!b@ ; + +\ adm:putc ( c -- ) - ein zeichen in datei schreiben +ifnot: adm:putc +: adm:putc + 07 adm:fkt!b! ; + +\ adm:eof ( -- eof ) - abfrage ob end of file erreicht ist +ifnot: adm:eof +: adm:eof + 1E adm:fkt!b@ ; + +\ adm:getblk ( adr cnt -- ) - datenblock aus datei lesen + +\ adm:putblk ( adr cnt -- ) - datenblock in datei schreiben + +\ adm:seek ( pos -- ) - position in datei setzen +: adm:seek + 0A adm:fkt!l! ; + +\ adm:fattrib ( nr -- attrib ) - dateiattribut abfragen +ifnot: adm:fattrib +: adm:fattrib + 0B adm:fkt!b!l@ ; + +\ adm:volname ( -- ) - name des volumes im pad ablegen +ifnot: adm:volname +: adm:volname + 0C adm:fkt!s@ ; + +\ adm:checkmounted ( -- t/f ) +ifnot: adm:checkmounted +: adm:checkmounted + 0D adm:fkt!b@ ; + +\ adm:checkopen ( -- t/f ) +ifnot: adm:checkopen +: adm:checkopen + 0E adm:fkt!b@ ; + +\ adm:checkused ( -- used ) - anzahl benutzte sektoren +ifnot: adm:checkused +: adm:checkused + 0F adm:fkt!l@ ; + +\ adm:checkfree ( -- free ) - anzahl freie sektoren +ifnot: adm:checkfree +: adm:checkfree + 10 adm:fkt!l@ ; + +\ adm:newfile ( cstr -- ) - neue datei erstellen +ifnot: adm:newfile +: adm:newfile + 11 adm:fkt!s!b@ ; + +\ adm:newdir ( cstr -- ) - neues verzeichnis erstellen +ifnot: adm:newdir +: adm:newdir + 12 adm:fkt!s!b@ ; + +\ adm:del ( cstr -- ) - datei/verzeichnis löschen +ifnot: adm:del +: adm:del + 13 adm:fkt!s!b@ ; + +\ adm:rename ( cstr1.fn1 cstr2.fn2 -- ) +ifnot: adm:rename +: adm:rename + 14 adm:fkt!s!s!b@ ; + +\ adm:chattrib ( cstr1.fn cstr2.attrib -- ) +ifnot: adm:chattrib +: adm:chattrib + 15 adm:fkt!s!s!b@ ; + +\ adm:chdir ( cstr -- err ) - verzeichnis öffnen +ifnot: adm:chdir +: adm:chdir + 16 adm:fkt!s!b@ ; + +\ adm:format ( cstr.label -- ) - medium formatieren +ifnot: adm:format +: adm:format + 17 adm:fkt!s!b@ ; + +\ adm:unmount ( -- err ) - medium unmounten +ifnot: adm:unmount +: adm:unmount + 18 adm:fkt!b@ ; + +\ marker-funktionen + +ifnot: adm:dmact \ ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ .err ; +ifnot: adm:dmset \ ( dmnr -- ) - marker setzen +: adm:dmset 1A adm:fkt!b! ; +ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen +: adm:dmget 1B adm:fkt!b!l@ ; +ifnot: adm:dmclr \ ( dmnr -- ) - marker löschen +: adm:dmclr 1C adm:fkt!b! ; +ifnot: adm:dmput \ ( dm dmnr -- ) - marker schreiben +: adm:dmput 1D adm:fkt!b!l! ; + diff --git a/bin/sdcard/system/sfx.lib b/bin/sdcard/system/sfx.lib new file mode 100644 index 0000000..3c01222 --- /dev/null +++ b/bin/sdcard/system/sfx.lib @@ -0,0 +1,93 @@ + +hex + +ifnot: lib:sfx +: lib:sfx ; + +\ kommandoformen + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!b! \ ( b b fkt -- ) +: adm:fkt!b!b! b[ [a!] [a!] [a!] ]b ; + +ifnot: adm:fkt!b!64b! \ ( ptr b fkt -- ) +: adm:fkt!b!64b! b[ [a!] [a!] + 31 0 do dup i + C@ [a!] loop drop ]b ; + +\ sfx-funktionen + +\ sfx:fire( chan slot -- ) - sfx abspielen +\ slot - $00..$0f nummer der freien effektpuffer +\ slot - $f0..f5 vordefinierte effektslots +\ chan - 0/1 stereokanal +\ vordefinierte effekte +\ &f0 - warnton +\ $f1 - signalton +\ $f2 - herzschlag schnell +\ $f3 - herzschlag langsam +\ $f4 - telefon +\ $f5 - phaser :) +\ $f6 - pling +\ $f7 - on +\ $f8 - off +ifnot: sfx:fire +: sfx:fire 6B adm:fkt!b!b! ; + +\ ( ptr slot -- ) - sfx setzen +\ slot - $00..$0f nummer der freien effektpuffer +\ ptr - zeiger auf 32 byte effektdaten +\ +\ struktur der effektdaten: +\ +\ [wav ][len ][freq][vol ] grundschwingung +\ [lfo ][lfw ][fma ][ama ] modulation +\ [att ][dec ][sus ][rel ] hüllkurve +\ [seq ] (optional) +\ +\ [wav] wellenform +\ 0 sinus (0..500hz) +\ 1 schneller sinus (0..1khz) +\ 2 dreieck (0..500hz) +\ 3 rechteck (0..1khz) +\ 4 schnelles rechteck (0..4khz) +\ 5 impulse (0..1,333hz) +\ 6 rauschen +\ [len] tonlänge $0..$fe, $ff endlos +\ [freq] frequenz $00..$ff +\ [vol] lautstärke $00..$0f +\ +\ [lfo] low frequency oscillator $ff..$01 +\ [lfw] low frequency waveform +\ $00 sinus (0..8hz) +\ $01 fast sine (0..16hz) +\ $02 ramp up (0..8hz) +\ $03 ramp down (0..8hz) +\ $04 square (0..32hz) +\ $05 random +\ $ff sequencer data (es folgt eine sequenzfolge [seq]) +\ [fma] frequency modulation amount +\ $00 no modulation +\ $01..$ff +\ [ama] amplitude modulation amount +\ $00 no modulation +\ $01..$ff +\ [att] attack $00..$ff +\ [dec] decay $00..$ff +\ [sus] sustain $00..$ff +\ [rel] release $00..$ff +ifnot: sfx:setslot +: sfx:setslot + 6C adm:fkt!b!64b! ; + +\ sfx:keyoff ( chan -- ) - release-phase einleiten +ifnot: sfx:keyoff +: sfx:keyoff + 6D adm:fkt!b! ; + +\ sfx:stop ( chan -- ) +ifnot: sfx:stop +: sfx:stop + 6E adm:fkt!b! ; + diff --git a/bin/sdcard/system/sfxtool.bin b/bin/sdcard/system/sfxtool.bin new file mode 100644 index 0000000..4bb86b0 Binary files /dev/null and b/bin/sdcard/system/sfxtool.bin differ diff --git a/bin/sdcard/system/splay.bin b/bin/sdcard/system/splay.bin new file mode 100644 index 0000000..ebdce7c Binary files /dev/null and b/bin/sdcard/system/splay.bin differ diff --git a/bin/sdcard/system/splay.mod b/bin/sdcard/system/splay.mod new file mode 100644 index 0000000..eb6e485 --- /dev/null +++ b/bin/sdcard/system/splay.mod @@ -0,0 +1,116 @@ + +\ achtung: vor verwendung muss der administra-code mit sidcog +\ geladen werden: +\ sys tools.f +\ sys splay.f <--- sid-player laden +\ aload admsid.adm <--- administra-code mit sidcog laden +\ splay xyz.dmp <--- sid-datei abspielen + + +hex + +ifnot: mod:splay +: mod:splay ; + +\ kommandoformen + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ 0 [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!s! \ ( s fkt -- ) +: adm:fkt!s! b[ [a!] [a.s!] ]b ; + +ifnot: adm:fkt!s!b@ \ ( s fkt -- err ) +: adm:fkt!s! b[ [a!] [a.s!] [b@] ]b ; + +ifnot: adm:fkt!b!l@ \ ( b fkt -- l ) +: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ; + +\ dm-funktionen +ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen +: adm:dmget 1B adm:fkt!b!l@ ; + +\ adm:dmact ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ drop ; + +\ adm-funktionen + +\ adm:aload ( cstr -- ) - neuen administra-code laden +ifnot: adm:aload +: adm:aload + 60 adm:fkt!s! ; + +\ tools + +ifnot: aload +: aload + mount? parsenw dup + if 1 adm:dmact adm:aload 0 else drop 23 then .err ; + +\ sid-funktionen + +ifnot: sid:play +: sid:play \ ( cstr -- err ) + 9E adm:fkt!s!b@ ; + +ifnot: sid:stop +: sid:stop \ ( -- ) + 9F adm:fkt! ; + +ifnot: sid:status +: sid:status \ ( -- status ) + A1 adm:fkt!b@ ; + +ifnot: sid:mute +\ 1 - sid1 +\ 2 - sid2 +\ 3 - sid1 & sid2 +: sid:mute \ ( sidnr -- ) + A3 adm:fkt!b! ; + +\ send? ( -- t/f ) +ifnot: send? +: send? + begin 50 delms key? dup if key drop then sid:status 0= or + until ; + +\ (splay) ( cstr -- ) +ifnot: (splay) +: (splay) \ ( cstr -- ) + ." Datei : " dup .cstr cr sid:play .err + send? sid:stop 3 sid:mute adm:close drop ; + +\ files? ( -- cnt ) - anzahl dateien im dir +ifnot: files? +: files? + adm:diropen + 0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ; + +\ filenr? ( nr -- ) +ifnot: filenr? +: filenr? + adm:diropen + 0 do adm:nextfile drop loop ; + +\ splay name.dmp ( -- ) - sid-datei abspielen +ifnot: splay +: splay + parsenw (splay) ; + +\ sdirplay ( -- ) - gesamtes verzeichnis abspielen +\ im verzeichnis dürfen nur sid-dateien sein! +ifnot: sdirplay +: sdirplay + files? dup ." Dateien : " . cr + 0 do i dup 1 + . 3 + filenr? pad (splay) loop padbl ; + +ifnot: smute +: smute + sid:stop 3 sid:mute ; + \ No newline at end of file diff --git a/bin/sdcard/system/sysconf.bin b/bin/sdcard/system/sysconf.bin new file mode 100644 index 0000000..5f6be0f Binary files /dev/null and b/bin/sdcard/system/sysconf.bin differ diff --git a/bin/sdcard/system/test1.txt b/bin/sdcard/system/test1.txt new file mode 100644 index 0000000..15d01ca --- /dev/null +++ b/bin/sdcard/system/test1.txt @@ -0,0 +1,7 @@ + +"Die Blütenträume +Von Faltern, wie ich hörte, +So lautlos wie sie -" +Reikan + + diff --git a/bin/sdcard/system/test2.txt b/bin/sdcard/system/test2.txt new file mode 100644 index 0000000..72e62d4 --- /dev/null +++ b/bin/sdcard/system/test2.txt @@ -0,0 +1,115 @@ +Johann Wolfgang Goethe + +Der Zauberlehrling + +Hat der alte Hexenmeister +Sich doch einmal wegbegeben! +Und nun sollen seine Geister +Auch nach meinem Willen leben! +Seine Wort' und Werke +Merkt' ich und den Brauch, +Und mit Geistesstärke +Tu' ich Wunder auch. + +Walle! Walle +Manche Strecke, +Dass, zum Zwecke, +Wasser fließe +Und mit reichem, vollem Schwalle +Zu dem Bade sich ergieße. + +Und nun komm, du alter Besen! +Nimm die schlechten Lumpenhüllen! +Bist schon lange Knecht gewesen; +Nun erfülle meinen Willen! +Auf zwei Beinen stehe, +Oben sei ein Kopf, +Eile nun und gehe +Mit dem Wassertopf! + +Walle! Walle +Manche Strecke, +Dass, zum Zwecke, +Wasser fließe +Und mit reichem, vollem Schwalle +Zu dem Bade sich ergieße. + +Seht, er läuft zum Ufer nieder; +Wahrlich! ist schon an dem Flusse, +Und mit Blitzesschnelle wieder +Ist er hier mit raschem Gusse. +Schon zum zweiten Male! +Wie das Becken schwillt! +Wie sich jede Schale +Voll mit Wasser füllt! + +Stehe! Stehe! +Denn wir haben +Deiner Gaben +Voll gemessen! +Ach, ich merk' es! Wehe! Wehe! +Hab' ich doch das Wort vergessen! + +Ach, das Wort, worauf am Ende +Er das wird, was er gewesen. +Ach, er läuft und bringt behände! +Wärst du doch der alte Besen! +Immer neue Güsse +Bringt er schnell herein, +Ach! und hundert Flüsse +Stürzen auf mich ein. + +Nein, nicht länger +Kann ich's lassen; +Will ihn fassen. +Das ist Tücke! +Ach! nun wird mir immer bänger! +Welche Miene! Welche Blicke! + +Oh, du Ausgeburt der Hölle! +Soll das ganze Haus ersaufen? +Seh' ich über jede Schwelle +Doch schon Wasserströme laufen. +Ein verruchter Besen, +Der nicht hören will! +Stock, der du gewesen, +Steh doch wieder still! + +Willst's am Ende +Gar nicht lassen? +Will dich fassen, +Will dich halten +Und das alte Holz behände +Mit dem scharfen Beile spalten. + +Seht, da kommt er schleppend wieder! +Wie ich mich nun auf dich werfe, +Gleich, o Kobold, liegst du nieder; +Krachend trifft die glatte Schärfe! +Wahrlich, brav getroffen! +Seht, er ist entzwei! +Und nun kann ich hoffen +Und ich atme frei! + +Wehe! Wehe! +Beide Teile +Stehn in Eile +Schon als Knechte +Völlig fertig in die Höhe! +Helft mir, ach! ihr hohen Mächte! + +Und sie laufen! Nass und nässer +Wird's im Saal und auf den Stufen. +Welch entsetzliches Gewässer! +Herr und Meister! Hör' mich rufen! - +Ach, da kommt der Meister! +Herr, die Not ist groß! +Die ich rief, die Geister, +Werd' ich nun nicht los. + +In die Ecke, +Besen! Besen! +Seid's gewesen! +Denn als Geister +Ruft euch nur, zu seinem Zwecke, +Erst hervor der alte Meister." \ No newline at end of file diff --git a/bin/sdcard/system/time.bin b/bin/sdcard/system/time.bin new file mode 100644 index 0000000..cdd7736 Binary files /dev/null and b/bin/sdcard/system/time.bin differ diff --git a/bin/sdcard/system/tools.mod b/bin/sdcard/system/tools.mod new file mode 100644 index 0000000..4d74e6f --- /dev/null +++ b/bin/sdcard/system/tools.mod @@ -0,0 +1,152 @@ + +hex + +ifnot: mod:tools +: mod:tools ; + +\ kommandoformen +ifnot: adm:fkt!b!l@ \ ( b fkt -- l ) +: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ; +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; +ifnot: adm:fkt!s! \ ( s fkt -- ) +: adm:fkt!s! b[ [a!] [a.s!] ]b ; + +\ dm-funktionen +ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen +: adm:dmget 1B adm:fkt!b!l@ ; + +ifnot: adm:dmact \ adm:dmact ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ drop ; + +\ adm-funktionen + +\ adm:aload ( cstr -- ) - neuen administra-code laden +ifnot: adm:load +: adm:load + 60 adm:fkt!s! ; + +\ bel-funktionen + +\ bel:load ( cstr -- ) - bellatrix-code laden +\ achtung: die gesamte loader-operation ist eine atomare +\ operation über alle drei propellerchips, kann also auch +\ nicht aufgetrennt werden! +ifnot: bel:load +: bel:load + 52 adm:open .err \ datei öffnen + b[ + 0 [b!] 63 [b!] \ bella-loader starten + 10 0 do 06 [a!] [a@] [b!] loop \ header einlesen + 0A [a!] 0 [a.l!] \ 0 adm:seek + [b@] <8 [b@] or \ dateilänge empfangen + 0 do 06 [a!] [a@] [b!] loop \ datei senden + ]b + adm:close .err \ datei schließen +; + +\ ------------------------------------ mod:tools + +ifnot: aload +: aload \ name ( -- ) - administra-code laden + mount? parsenw dup + if adm:load 0 else drop 23 then .err ; + +ifnot: bload +: bload \ name ( -- ) - bellatrix-code laden + mount? parsenw dup + if bel:load 0 else drop 23 then .err ; + +ifnot: .dmstatus \ ( dm -- ) - ausgabe marker-status +: .dmstatus -1 = if ." frei" else ." gesetzt" then cr ; + +ifnot: dm? +: dm? + ." [root] : " 0 adm:dmget .dmstatus + ." [sys ] : " 1 adm:dmget .dmstatus + ." [usr ] : " 2 adm:dmget .dmstatus + ." [ A ] : " 3 adm:dmget .dmstatus + ." [ B ] : " 4 adm:dmget .dmstatus + ." [ C ] : " 5 adm:dmget .dmstatus ; + +\ open name ( -- ) - datei lesend öffnen und auf fehler prüfen +ifnot: open +: open + mount? parsenw dup + if 52 adm:open else drop 23 then .err ; + +\ close ( -- ) - geöffnete datei schließen +ifnot: close +: close + adm:close .err ; + +\ (cat) ( -- ) - alle zeichen der geöffneten datei ab +\ lesemarke auf ausgabekanal bis zum eof ausgeben +ifnot: (cat) +: (cat) begin adm:getc emit adm:eof until ; + +\ cat name ( -- ) - datei "name" komplett ausgeben +ifnot: cat +: cat open (cat) close ; + +\ nextline ( -- ) - ausgabe der nächsten textzeile aus der +\ geöffneten datei +ifnot: nextline +: nextline + begin adm:getc dup emit 0d = adm:eof or until ; + +\ nextlines ( n -- ) - ausgabe von n zeilen +ifnot: nextlines +: nextlines + 0 do adm:eof 0= if nextline then loop ; + +\ less name ( -- ) - zeilenweise ausgabe der datei +ifnot: less +: less + open begin 10 nextlines key 71 = adm:eof or until close ; + +\ #C ( c1 -- ) prepend the character c1 to the number +\ currently being formatted +ifnot: #C +: #C -1 >out W+! pad>out C! ; + +\ .cogch ( n1 n2 -- ) print as x(y) +ifnot: .cogch +: .cogch <# 29 #C # 28 #C drop # #> .cstr ; + +\ j ( -- n1 ) the second most current loop counter +ifnot: j +: j _rsptr COG@ 5 + COG@ ; + +\ cog? ( -- ) +ifnot: cog? +: cog? + 8 0 do ." Cog:" i dup . ." #io chan:" + dup cognchan . cogstate C@ + dup 4 and if version W@ .cstr then + dup 10 and if i cognumpad version W@ C@ over C@ - + spaces .cstr then + 14 and if i cogio i cognchan 0 do + i 4* over + 2+ W@ dup 0= if drop else + space space j i .cogch ." ->" io>cogchan .cogch + then + loop +drop then cr loop ; + +\ jede erweiterung legt ein wort als startmarke +\ nmit folgendem namen an: +\ mod:xxx - softwaremodule +\ drv:xxx - treiber +\ lib:xxx - bibliotheken +\ so kann mit den folgenden kommandos eine schnelle liste der +\ vorhandenen erweiterungen abgerufen und mit forget +\ aus dem system entfernt werden + +\ mod? ( -- ) - anzeige der module +ifnot: mod? +: mod? c" mod:" _words ; + +\ lib? ( -- ) - anzeige der bibliotheken +ifnot: lib? +: lib? c" lib:" _words ; + diff --git a/bin/sdcard/system/tv.bel b/bin/sdcard/system/tv.bel new file mode 100644 index 0000000..d0624cd Binary files /dev/null and b/bin/sdcard/system/tv.bel differ diff --git a/bin/sdcard/system/v1.mod b/bin/sdcard/system/v1.mod new file mode 100644 index 0000000..7b0b8cd --- /dev/null +++ b/bin/sdcard/system/v1.mod @@ -0,0 +1,325 @@ + +: mod:vortrag ; + +24 constant rows +64 constant cols + +wvariable lcol 7 lcol W! + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ [a!] [a@] ]b ; + +ifnot: bel:char \ ( b -- ) +: bel:char b[ [b!] ]b ; +ifnot: bel:ctrl!b! \ ( b ctrl -- ) +: bel:ctrl!b! b[ 0 [b!] 3 [b!] [b!] [b!] ]b ; +ifnot: bel:fkt!b!b! \ ( b b fkt -- ) +: bel:fkt!b!b! b[ 0 [b!] [b!] [b!] [b!] ]b ; + +ifnot: scr:bs \ ( -- ) - backspace +: scr:bs 08 bel:char ; +ifnot: scr:tab \ ( -- ) - tabulator +: scr:tab 09 bel:char ; +ifnot: scr:pos1 \ ( -- ) - cursor an zeilenanfang +: scr:pos1 03 bel:char ; +ifnot: scr:setcol \ ( colnr -- ) - farbe wählen 0..15 +: scr:setcol 06 bel:ctrl!b! ; +ifnot: scr:sline \ ( row -- ) - anfangszeile scrollbereich +: scr:sline 07 bel:ctrl!b! ; +ifnot: scr:setx \ ( x -- ) - cursor position x setzen +: scr:setx 02 bel:ctrl!b! ; +ifnot: scr:sety \ ( y -- ) - cursor position y setzen +: scr:sety 03 bel:ctrl!b! ; +ifnot: scr:curon \ ( -- ) - cursor anschalten +: scr:curon 04 bel:char ; +ifnot: scr:curoff \ ( -- ) - cursor abschalten +: scr:curoff 05 bel:char ; +ifnot: scr:logo \ ( y x -- ) - hive logo +: scr:logo 5 bel:fkt!b!b! ; + +\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten +\ sfkt: +\ 0: hss-engine abschalten +\ 1: hss-engine anschalten +\ 2: dac-engine abschalten +\ 3: dac-engine anschalten +\ sstat - status/cognr startvorgang +ifnot: adm:setsound +: adm:setsound + 5C adm:fkt!b!b@ ; + +\ wav:start ( cstr -- err ) +ifnot: wav:start +: wav:start + 96 adm:fkt!s!b@ ; + +\ wav:stop ( -- ) +ifnot: wav:stop +: wav:stop + 97 adm:fkt!b@ drop ; + +\ won +ifnot: won +: won + 0 adm:setsound 3 adm:setsound 2drop ; + +\ woff +ifnot: woff +: woff + 2 adm:setsound 1 adm:setsound 2drop ; + +: lcol@ lcol W@ ; \ ( -- col ) + +: lines \ ( n -- ) + 0 do cr loop ; + +: waitkey + scr:curoff cr key drop scr:bs scr:bs scr:bs scr:curon ; + +: nextpage + scr:curoff scr:pos1 lcol@ spaces ." -->" key drop scr:bs scr:bs scr:bs scr:curon ; + +: .head \ ( -- ) + 4 scr:setcol scr:pos1 lcol@ spaces ; + +: .bullet \ ( -- ) + 0 scr:setcol scr:pos1 lcol@ spaces 0f emit space ; + +: .number \ ( n -- n ) + 0 scr:setcol scr:pos1 lcol@ spaces dup . 1+ + 2e emit space ; + +: .line \ ( -- ) + cr 0 scr:setcol scr:pos1 lcol@ 2+ spaces ; + +: .sub \ ( -- ) + 0 scr:setcol scr:pos1 lcol@ 2+ spaces ; + +wvariable xpos 1 xpos W! +wvariable ypos 1 ypos W! + +: pos! \ ( x y -- ) + ypos W! xpos W! ; + +: pos@ \ ( -- x y ) + xpos W@ ypos W@ ; + +: nextline + ypos W@ 1+ ypos W! ; + +: move \ ( x y -- ) + 1 delms pos@ scr:sety scr:setx ; + + +: btop0 \ ( -- ) + move 9f emit 6 0 do 90 emit loop 9e emit nextline ; + +: bbot0 \ ( -- ) + move 9d emit 6 0 do 90 emit loop 9c emit nextline ; + +: btop1 \ ( -- ) + move 2 spaces 9f emit 6 0 do 90 emit loop 9e emit nextline ; + +: bbot1 \ ( -- ) + move 2 spaces 9d emit 6 0 do 90 emit loop 9c emit nextline ; + +: bmid0 \ ( -- ) + move 91 emit ." COG " 95 emit 90 emit bb emit nextline + move 91 emit ." " 95 emit 90 emit aa emit nextline ; + +: bmid1 \ ( -- ) + move a9 emit 90 emit 94 emit ." COG " 91 emit nextline + move ba emit 90 emit 94 emit ." " 91 emit nextline ; + +: bmid2 \ ( -- ) + move a9 emit 90 emit 94 emit ." SER " + 95 emit 90 emit bb emit ." [TERMINAL]" nextline + move ba emit 90 emit 94 emit ." " 91 emit nextline ; + +: bmid3 \ ( -- ) + move a9 emit 90 emit 94 emit ." VGA " + 95 emit 90 emit bb emit ." [BELLATRIX]" nextline + move ba emit 90 emit 94 emit ." KBD " 91 emit nextline ; + +: bmid4 \ ( -- ) + move 91 emit ." COG " 95 emit 90 emit bb emit + ." Zeichenausgabekanal (emit)" nextline + move 91 emit ." " 95 emit 90 emit aa emit + ." Zeicheneingabekanal (key)" nextline ; + +: cog0 \ ( x y -- ) + 0 scr:setcol pos! btop0 bmid0 bbot0 ; + +: cog1 \ ( x y -- ) + 0 scr:setcol pos! btop1 bmid1 bbot1 ; + +: cog3 \ ( x y -- ) + 0 scr:setcol pos! btop0 bmid4 bbot0 ; + +: cogext \ ( x y -- ) + 0 scr:setcol pos! btop1 bmid2 bbot1 ; + +: cogint \ ( x y -- ) + 0 scr:setcol pos! btop1 bmid3 bbot1 ; + +: drvser + 0 scr:setcol 2dup cog0 swap a + swap cogext ; + +: drvint + 0 scr:setcol 2dup cog0 swap a + swap cogint ; + +: p0 + 0 scr:sline cls 5 lines + 14 1c scr:curoff scr:logo won c" woodz.wav" wav:start drop + key drop scr:curon wav:stop woff ; + +: i1 + 0 scr:sline cls 3 lines + .head ." Implementierungsvarianten" cr waitkey + .bullet ." Forth-Diamond: Master & Slaves = PropForth" waitkey cr + .sub ." Nachteil: Programmierung aller Treiber in Forth" waitkey cr + .bullet ." Forth-Spin: Forth mit SPIN-Interface" waitkey cr + .sub ." Vorteil: Nutzung fertiger Treiber" waitkey + .sub ." Nachteil: hoher Ressourcenverbrauch" waitkey cr + .bullet ." Forth-Funktionskomplexe: " cr cr + .sub ." Master = Forth" cr + .sub ." Slaves = Spin-Funktionsbibliotheken" cr + .sub ." Interface Forth <--> Spin = 8Bit-Bus" cr cr + nextpage ; + +: i2 + 0 scr:sline cls 3 lines + .head ." Implementierungsvarianten" cr cr + .bullet ." Forth-Funktionskomplexe: " cr cr + .sub ." Master = Forth" cr + .sub ." Slaves = Spin-Funktionsbibliotheken" cr + .sub ." Interface Forth <--> Spin = 8Bit-Bus" cr waitkey + .bullet ." Nachteile:" cr cr + .sub ." Spin --> Compiler noch auf Host" cr waitkey + .bullet ." Vorteile:" cr cr + .sub ." Code ist schon vorhanden (TriOS)" waitkey + .sub ." Gegenseitige Befruchtung von Forth & TriOS" waitkey + .sub ." Maximale Ressourcen für Forth im Master" waitkey + .sub ." Spin-Code kann später auch durch Forth ersetzt werden" cr + nextpage ; + +: i3 + 0 scr:sline cls 3 lines + .head ." Ablauf der Implementierung" cr waitkey + .bullet ." Ausgangslage: " cr cr + .sub ." Forth mit Terminalzugriff" cr waitkey + .bullet ." Plan:" cr cr + .sub ." 1. Busroutine um auf Slaves zuzugreifen" waitkey + .sub ." 2. Integration VGA/Keyboard/SD-Card" waitkey + .sub ." 3. Autostart" cr cr + nextpage ; + + +: p1 + 0 scr:sline cls 1 lines + .head ." Buszugriff" cr cr + .bullet ." ! ( n adr -- ) store - Wert im RAM speichern" cr + .bullet ." @ ( adr -- n ) fetch - Wert aus RAM lesen" cr waitkey + .bullet ." c! c@ p! p@ - Abwandlungen der Grundform" cr waitkey + .bullet ." s! ( c adr -- ) - Byte an Slave senden" cr + .bullet ." s@ ( adr -- c ) - Byte von Slave empfangen" cr waitkey + .bullet ." b! ( c -- ) - Byte an Bellatrix senden" cr + .bullet ." b@ ( -- c ) - Byte von Bellatrix empfangen" cr + .bullet ." a! ( c -- ) - Byte an Administra senden" cr + .bullet ." a@ ( -- c ) - Byte von Administra empfangen" cr cr + .head ." Beispiele :" cr cr + .bullet ." 01 b! - Bildschirm löschen" waitkey + .bullet ." : cls 01 b! ; " waitkey + .bullet ." : bel:key 0 b! 2 b! b@ ; \ ( -- key )" cr + nextpage ; + +: p2 + 0 scr:sline cls 5 lines + .head ." IO-Kanäle/Pipes" cr waitkey + 9 8 cog3 key drop + 9 c cog3 + .line ." ..." + 9 11 cog3 + cr cr + nextpage ; + +: p3 + 0 scr:sline cls 5 lines + .head ." Serieller Treiber" cr cr + 9 8 drvser + 9 c cog3 + .line ." ..." + 9 11 cog3 + cr cr + nextpage ; + +: p4 + 0 scr:sline cls 5 lines + .head ." VGA/Keyboard-Treiber" cr cr + 9 8 drvser + 9 c drvint + .line ." ..." + 9 11 cog3 + cr cr + nextpage ; + +: p5 + 0 scr:sline cls 5 lines + .head ." Treiber: VGA" cr cr + 9 8 drvint cr + .line ." : drv-vga " + .line ." begin" + .line ." key?" + .line ." if key b! then" + .line ." 0 until ;" + cr cr + nextpage ; + +: p6 + 0 scr:sline cls 5 lines + .head ." Treiber: Keyboard" cr cr + 9 8 drvint cr + .line ." : drv-key" + .line ." begin" + .line ." bel:keystat" + .line ." if bel:key emit then" + .line ." 0 until ;" + cr cr + nextpage ; + +: p7 + 0 scr:sline cls 5 lines + .head ." Treiber: Gesamt" cr cr + 9 8 drvint cr + .line ." : drv:int" + .line ." begin" + .line ." \ input --> vga/video" + .line ." 200 0 do key?" + .line ." if key b[ [b!] ]b then loop" + .line ." \ output <-- keyboard" + .line ." b[ [key?]" + .line ." if [key] [emit] then ]b" + .line ." 0 until ;" + cr cr + nextpage ; + +: p8 + 0 scr:sline cls 5 lines + .head ." Semaphoren" cr waitkey + .bullet ." : bel:key 0 b! 2 b! b@ ; \ ( -- key )" cr waitkey + .bullet ." : bel:key bon 0 b! 2 b! b@ boff ;" cr waitkey + .bullet ." [ ... ]" cr waitkey + .bullet ." b[ ... ]b" cr waitkey + .bullet ." : bel:key b[ 0 b! 2 b! b@ ]b ;" cr waitkey + .bullet ." : bel:key b[ 0 [b!] 2 [b!] [b@] ]b ;" cr waitkey + .bullet ." : bel:key 2 0 b[ [b!] [b!] [b@] ]b ;" cr cr + cr cr + nextpage ; + +: run + begin p0 i1 i2 i3 p1 p2 p3 p4 p5 p6 p7 p8 0 until ; + diff --git a/bin/sdcard/system/vga.bel b/bin/sdcard/system/vga.bel new file mode 100644 index 0000000..52c4064 Binary files /dev/null and b/bin/sdcard/system/vga.bel differ diff --git a/bin/sdcard/system/wav.lib b/bin/sdcard/system/wav.lib new file mode 100644 index 0000000..4198e23 --- /dev/null +++ b/bin/sdcard/system/wav.lib @@ -0,0 +1,54 @@ + +hex + +ifnot: lib:wav +: lib:wav ; + +\ kommandoformen + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ [a!] [a@] ]b ; + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!l@l@ \ ( fkt -- l l ) +: adm:fkt!l@l@ b[ [a!] [a.l@] [a.l@] ]b ; + +\ wave-funktionen + +\ wav:start ( cstr -- err ) +ifnot: wav:start +: wav:start + 96 adm:fkt!s!b@ ; + +\ wav:stop ( -- ) +ifnot: wav:stop +: wav:stop + 97 adm:fkt!b@ drop ; + +\ wav:status ( -- status ) +ifnot: wav:status +: wav:status + 98 adm:fkt!b@ ; + +\ wav:leftvol ( vol -- ) +ifnot: wav:leftvol +: wav:leftvol + 99 adm:fkt!b! ; + +\ wav:rightvol ( vol -- ) +ifnot: wav:rightvol +: wav:rightvol + 9A adm:fkt!b! ; + +\ wav:pause ( -- ) +ifnot: wav:pause +: wav:pause + 9B adm:fkt!b@ drop ; + +\ wav:position ( -- len pos ) +ifnot: wav:position +: wav:position + 9C adm:fkt!l@l@ ; + diff --git a/bin/sdcard/system/words.mod b/bin/sdcard/system/words.mod new file mode 100644 index 0000000..c0165f3 --- /dev/null +++ b/bin/sdcard/system/words.mod @@ -0,0 +1,16 @@ + +fl + +\ _words ( cstr -- ) prints the words in the forth dictionary starting with cstr, 0 prints all +: _words lastnfa +begin + 2dup swap dup if npfx else 2drop -1 then + if dup .strname space then + nfa>next dup 0= +until 2drop cr ; + +\ words ( -- ) prints the words in the forth dictionary, if the pad has another string following, with that prefix +: words parsenw _xwords ; + +: t1 1000 0 do i . loop ; +: t2 1000 0 do ." test " loop ; diff --git a/bin/sdcard/system/wplay.bin b/bin/sdcard/system/wplay.bin new file mode 100644 index 0000000..8f21c84 Binary files /dev/null and b/bin/sdcard/system/wplay.bin differ diff --git a/bin/sdcard/system/wplay.mod b/bin/sdcard/system/wplay.mod new file mode 100644 index 0000000..faf878f --- /dev/null +++ b/bin/sdcard/system/wplay.mod @@ -0,0 +1,93 @@ + +hex + +ifnot: mod:wplay +: mod:wplay ; + +\ kommandoformate + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ [a!] [a@] ]b ; + +\ wave-funktionen + +\ wav:start ( cstr -- err ) +ifnot: wav:start +: wav:start + 96 adm:fkt!s!b@ ; + +\ wav:stop ( -- ) +ifnot: wav:stop +: wav:stop + 97 adm:fkt!b@ drop ; + +\ wav:status ( -- status ) +ifnot: wav:status +: wav:status + 98 adm:fkt!b@ ; + +\ adm-funktionen + +\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten +\ sfkt: +\ 0: hss-engine abschalten +\ 1: hss-engine anschalten +\ 2: dac-engine abschalten +\ 3: dac-engine anschalten +\ sstat - status/cognr startvorgang +ifnot: adm:setsound +: adm:setsound + 5C adm:fkt!b!b@ ; + + +\ metafunktionen + +\ won +ifnot: won +: won + 0 adm:setsound 3 adm:setsound 2drop ; + +\ woff +ifnot: woff +: woff + 2 adm:setsound 1 adm:setsound 2drop ; + +\ wend? ( -- t/f ) +ifnot: wend? +: wend? + begin 50 delms key? dup if key drop then wav:status 0= or until ; + +\ (wplay) ( cstr -- ) +ifnot: (wplay) +: (wplay) \ ( cstr -- ) + ." Datei : " dup .cstr cr wav:start .err wend? wav:stop ; + +\ wplay name ( -- ) +ifnot: wplay +: wplay + won parsenw (wplay) woff ; + +\ files? ( -- cnt ) - anzahl dateien im dir +ifnot: files? +: files? + adm:diropen + 0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ; + +\ filenr? ( nr -- ) +ifnot: filenr? +: filenr? + adm:diropen + 0 do adm:nextfile drop loop ; + +\ wdirplay ( -- ) - gesamtes verzeichnis abspielen +\ im verzeichnis dürfen nur wav-dateien sein! +ifnot: wdirplay +: wdirplay + won files? dup ." Dateien : " . cr + 0 do i dup 1 + . 3 + filenr? pad (wplay) loop padbl woff ; diff --git a/bin/sdcard/system/yplay.bin b/bin/sdcard/system/yplay.bin new file mode 100644 index 0000000..5a68c77 Binary files /dev/null and b/bin/sdcard/system/yplay.bin differ diff --git a/doku/FemtoBasic Manual.rtf b/doku/FemtoBasic Manual.rtf new file mode 100644 index 0000000..5f43836 --- /dev/null +++ b/doku/FemtoBasic Manual.rtf @@ -0,0 +1,797 @@ +{\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.\ +\ +\ +\ +There are 26 variables designated by the letters A through Z.\ +Upper and lower case letters are equivalent.\ +\ +INA [ \{.. \} ]\ +\ +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 [ ]\ +\ +This has the value of the main memory byte at the address provided.\ +\ +WORD [ ]\ +\ +This has the value of the main memory word at the address provided.\ +The least significant bit of the address is ignored.\ +\ +LONG [ ]\ +\ +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 [ \{, \} ]\ +\ +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 \ +\ +The value is a pseudo-random number in the range zero to one less than\ +that of the expression given.\ +\ +- \ +! \ +\ +"-" 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 () 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\} = \ +\ +Set the variable to the value of the expression .\ +\ +INPUT \{ "";\} \{,\}\ +\ +If given, the 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 \{\{"" | \} \{, | ;\}\}\ +\ +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 \ +\ +Go to the label whose value is equal to the expression\ +\ +GOSUB \ +\ +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 \ +\ +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 \{ \{,\}\}\ +\ +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 "", \{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 \{,\}\ +\ +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 " = " were\ +executed for each variable given and each expression in the SD card file.\ +\ +WRITE \{\{"" | \} \{, | ;\}\}\ +\ +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 ""\ +\ +Delete the specified SD card file. Any opened SD card file will be closed.\ +\ +RENAME "", ""\ +\ +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 [ \{, \} ]\ +\ +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 ""\ +\ +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 [ \{, \} ]\ +\ +Erase the current program and load in a program previously saved with the\ +SAVE [ \{, \} ] statement.\ +\ +LOAD ""\ +\ +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 = TO \{STEP \}\ +\ +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 \ +\ +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 [ \{.. \} ] = \ +\ +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 \{, \}\ +\ +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 [ ] = \ +\ +This sets the value of the main memory byte at the address provided to\ +the expression on the right side of the assignment.\ +\ +WORD [ ] = \ +\ +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 [ ] = \ +\ +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 = \ +\ +Set the cog counter phase register A to the expression.\ +\ +PHSB = \ +\ +Set the cog counter phase register B to the expression.\ +\ +FRQA = \ +\ +Set the cog counter frequency register A to the expression.\ +\ +FRQB = \ +\ +Set the cog counter frequency register B to the expression.\ +\ +CTRA = \ +\ +Set the cog counter control register A to the expression.\ +\ +CTRB = \ +\ +Set the cog counter control register B to the expression.\ +\ +DISPLAY \{, \}\ +\ +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 [ \{, \} ] = \ +\ +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 = \ +\ +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 [ \{, \} ]\ +\ +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 ""\ +\ +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 , \ +\ +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 [ \{, \} ] , \ +\ +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 [ \{, \} ] , [ \{, \}]\ +\ +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 "" , [ \{, \}]\ +\ +This copies a Spin program from an SD card file to a 32K byte EEPROM "page".\ +\ +COPY [ \{, \} ] , ""\ +\ +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 [ , , ]\ +\ +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 [ ]\ +\ +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 \{[ ]\} = \ +SRVRIGHT \{[ ]\} = \ +SRVPING \{[ ]\} = \ +\ +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 , \ +\ +Reads the raw x and y values of the HM55B compass and assign them to the\ +first and second variables specified respectively.\ +\ +EXPAND [ ] = \ +\ +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 \ +\ +The expression is the I/O pin number to be used. This resets the IR Buddy.\ +\ +IRBSEND , \{, \}\ +\ +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 , , \{, \}\ +\ +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 \ +\ +Set the master contrast setting (range 0-15).\ +\ +UOLED COLOR , , \ +\ +Set the individual color contrast values (range 0-255).\ +\ +UOLED DIM , , , \ +\ +Dim a designated screen window given the coordinates of the left upper corner and the\ +right lower corner.\ +\ +UOLED PIXEL , , , , \ +\ +Writes 2 bytes of color data to the pixel at the coordinate specified. The color information\ +range is 0-255.\ +\ +UOLED SCROLL SETUP , ,
, <# Lines> , \ +\ +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 , , , , , , \ +\ +Display a line from the specified left upper corner to the specified right lower corner in the color\ +specified.\ +\ +UOLED RECT , , , , , , \{, , , \}\ +\ +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 , , , , , \ +\ +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 , , , , , " ... "\ +UOLED TEXT , , , , , \ +\ +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 , , \ +\ +Set the default background color for text. It's set to black during the initialization of FemtoBasic.\ +\ +UOLED TEXT \ +\ +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 , , , , , \ +\ +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 , , , , , , \ +\ +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 [ ]\ +\ +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 [ ]\ +\ +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 [ ]\ +\ +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 [ ]\ +\ +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 [ ].\ +\ +TIME [
] = \ +\ +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 , , , , , , \ +\ +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 [ ]. 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 [ ]) 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.\ +} \ No newline at end of file diff --git a/doku/Thumbs.db b/doku/Thumbs.db new file mode 100644 index 0000000..b9bbb83 Binary files /dev/null and b/doku/Thumbs.db differ diff --git a/doku/TriOS - Logo 1.jpg b/doku/TriOS - Logo 1.jpg new file mode 100644 index 0000000..82b891e Binary files /dev/null and b/doku/TriOS - Logo 1.jpg differ diff --git a/doku/TriOS - Logo 2.jpg b/doku/TriOS - Logo 2.jpg new file mode 100644 index 0000000..44ee962 Binary files /dev/null and b/doku/TriOS - Logo 2.jpg differ diff --git a/doku/TriOS-1.jpg b/doku/TriOS-1.jpg new file mode 100644 index 0000000..aa72063 Binary files /dev/null and b/doku/TriOS-1.jpg differ diff --git a/doku/TriOS.ods b/doku/TriOS.ods new file mode 100644 index 0000000..5424920 Binary files /dev/null and b/doku/TriOS.ods differ diff --git a/flash/administra/admflash.spin b/flash/administra/admflash.spin new file mode 100644 index 0000000..a48f802 Binary files /dev/null and b/flash/administra/admflash.spin differ diff --git a/flash/bellatrix/belflash.spin b/flash/bellatrix/belflash.spin new file mode 100644 index 0000000..3a75241 Binary files /dev/null and b/flash/bellatrix/belflash.spin differ diff --git a/flash/bellatrix/logo-hive-8x2.dat b/flash/bellatrix/logo-hive-8x2.dat new file mode 100644 index 0000000..109ef59 Binary files /dev/null and b/flash/bellatrix/logo-hive-8x2.dat differ diff --git a/flash/bellatrix/logo-hive-8x2/dat.rtf b/flash/bellatrix/logo-hive-8x2/dat.rtf new file mode 100644 index 0000000..e758f9d --- /dev/null +++ b/flash/bellatrix/logo-hive-8x2/dat.rtf @@ -0,0 +1,275 @@ +{\rtf1\ansi\deff0{\fonttbl{\f0\fswiss\fcharset0 Arial;}} +{\*\generator Msftedit 5.41.15.1515;}\viewkind4\uc1\pard\lang1031\f0\fs20 char y=0, x=0 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=0, x=1 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0003_3333_3300_0000\par + LONG %%0033_3000_3330_0000\par + LONG %%0330_0000_0033_0000\par + LONG %%3300_0000_0003_3000\par + LONG %%3300_0000_0000_3000\par + LONG %%3000_0000_0000_3300\par + LONG %%3000_0000_0000_3300\par + LONG %%3300_0000_0000_3000\par + LONG %%3300_0000_0003_3000\par + LONG %%0330_0000_0033_0000\par + LONG %%0033_3000_0333_0000\par + LONG %%0033_3333_3330_0000\par + LONG %%0333_0000_0333_0000\par +char y=0, x=2 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=0, x=3 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3003_3330_0333_3300\par + LONG %%3033_3333_0333_3300\par + LONG %%3033_3333_0333_3300\par +char y=0, x=4 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%3000_3333_0000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%3000_3333_0000_3333\par + LONG %%3000_0000_0000_3333\par + LONG %%3000_0000_0000_3333\par +char y=0, x=5 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par +char y=0, x=6 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%3333_3000_0000_0033\par + LONG %%3333_3333_0000_0033\par + LONG %%3333_3333_3000_0033\par + LONG %%3333_3333_3300_0033\par + LONG %%3333_3333_3330_0033\par + LONG %%0000_3333_3330_0033\par + LONG %%0000_0033_3333_0033\par + LONG %%3333_0003_3333_0033\par +char y=0, x=7 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=0 \par + LONG %%0000_0000_0000_0000\par + LONG %%3330_0000_0000_0000\par + LONG %%0033_3000_0000_0000\par + LONG %%0000_3300_0000_0000\par + LONG %%0000_3300_0000_0000\par + LONG %%0000_0330_0000_0000\par + LONG %%0000_0330_0000_0000\par + LONG %%0000_0330_0000_0000\par + LONG %%0000_0330_0000_0000\par + LONG %%0000_3300_0000_0000\par + LONG %%0003_3000_0000_0000\par + LONG %%0333_0000_0000_0000\par + LONG %%3330_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=1 \par + LONG %%3330_0000_0033_3000\par + LONG %%3300_0000_0003_3333\par + LONG %%3300_0000_0003_3300\par + LONG %%0330_0000_0033_0000\par + LONG %%0033_0000_0030_0000\par + LONG %%0033_0000_0330_0000\par + LONG %%0003_3333_3330_0000\par + LONG %%0003_3333_3330_0000\par + LONG %%0033_0000_0330_0000\par + LONG %%0033_0000_0030_0000\par + LONG %%0330_0000_0033_0000\par + LONG %%3300_0000_0003_3330\par + LONG %%0000_0000_0000_0333\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=2 \par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0033_3333\par + LONG %%0000_0000_3330_0000\par + LONG %%0000_0000_3300_0000\par + LONG %%0000_0003_3000_0000\par + LONG %%0000_0003_0000_0000\par + LONG %%0000_0033_0000_0000\par + LONG %%0000_0003_0000_0000\par + LONG %%0000_0003_0000_0000\par + LONG %%0000_0003_3000_0000\par + LONG %%0000_0000_3300_0000\par + LONG %%0000_0000_0333_3033\par + LONG %%0000_0000_0003_3333\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=3 \par + LONG %%3033_3333_0333_3300\par + LONG %%3033_3333_0333_3300\par + LONG %%3003_3330_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%3000_0000_0333_3300\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=4 \par + LONG %%3003_3333_3000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%3003_3333_3000_3333\par + LONG %%0003_3333_3000_3333\par + LONG %%0003_3333_3000_3333\par + LONG %%0003_3333_3000_3333\par + LONG %%0003_3333_3000_3333\par + LONG %%0003_3333_3000_3333\par + LONG %%0003_3333_3000_3333\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=5 \par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0000_3333\par + LONG %%3330_0000_0003_3333\par + LONG %%3330_0000_0003_3333\par + LONG %%3330_0000_0033_3333\par + LONG %%3333_3333_3333_3333\par + LONG %%3333_3333_3333_3330\par + LONG %%3333_3333_3333_3300\par + LONG %%3333_3333_3333_3000\par + LONG %%3333_3333_3330_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=6 \par + LONG %%3333_3003_3333_0033\par + LONG %%3333_3003_3333_0033\par + LONG %%3333_3003_3333_0033\par + LONG %%3333_3003_3333_0033\par + LONG %%3333_0033_3333_0033\par + LONG %%0000_3333_3330_0033\par + LONG %%3333_3333_3330_0033\par + LONG %%3333_3333_3300_0033\par + LONG %%3333_3333_3000_0033\par + LONG %%3333_3333_0000_0033\par + LONG %%3333_3000_0000_0033\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +char y=1, x=7 \par + LONG %%0000_0000_0000_0003\par + LONG %%0000_0000_0000_0003\par + LONG %%0000_0000_0000_0003\par + LONG %%0000_0000_0000_0003\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_3333\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par + LONG %%0000_0000_0000_0000\par +} + \ No newline at end of file diff --git a/flash/bellatrix/logo-hive-8x2/logo-hive-8x2.dat b/flash/bellatrix/logo-hive-8x2/logo-hive-8x2.dat new file mode 100644 index 0000000..109ef59 Binary files /dev/null and b/flash/bellatrix/logo-hive-8x2/logo-hive-8x2.dat differ diff --git a/flash/regnatix/regflash.spin b/flash/regnatix/regflash.spin new file mode 100644 index 0000000..6ad1db6 Binary files /dev/null and b/flash/regnatix/regflash.spin differ diff --git a/forth/adm.lib b/forth/adm.lib new file mode 100644 index 0000000..11b7154 --- /dev/null +++ b/forth/adm.lib @@ -0,0 +1,90 @@ + +hex + +ifnot: lib:adm +: lib:adm ; + +\ kommandoformen + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ 0 [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!l@ \ ( fkt -- l ) +: adm:fkt!l@ b[ [a!] [a.l@] ]b ; + +ifnot: adm:fkt!s! \ ( s fkt -- ) +: adm:fkt!s! b[ [a!] [a.s!] ]b ; + +\ administra-chipmanagment-funktionen + +\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten +\ sfkt: +\ 0: hss-engine abschalten +\ 1: hss-engine anschalten +\ 2: dac-engine abschalten +\ 3: dac-engine anschalten +\ sstat - status/cognr startvorgang +ifnot: adm:setsound +: adm:setsound + 5C adm:fkt!b!b@ ; + +\ adm:getspec ( -- spec ) - chipspezifikation abfragen +\ +\ +---------- com +\ | +-------- i2c +\ | |+------- rtc +\ | ||+------ lan +\ | |||+----- sid +\ | ||||+---- wav +\ | |||||+--- hss +\ | ||||||+-- bootfähig +\ | |||||||+- dateisystem +\ %00000000_00000000_00000000_01001111 +ifnot: adm:getspec +: adm:getspec + 5D adm:fkt!l@ ; + +\ adm:setsyssound ( syssnd -- ) - systemklänge +\ syssnd = 0 - systemklänge aus +\ syssnd = 1 - systemklänge an +ifnot: adm:setsyssound +: adm:setsyssound + 5E adm:fkt!b! ; + +\ adm:getsoundsys ( -- sndsys ) - abfrage aktives soundsystem +\ 0 - sound aus +\ 1 - hss +\ 2 - wav +ifnot: adm:getsoundsys +: adm:getsoundsys + 5F adm:fkt!b@ ; + +\ adm:load ( cstr -- ) - neuen administra-code laden +ifnot: adm:aload +: adm:aload + 60 adm:fkt!s! ; + +\ adm:getcogs ( -- cogs ) - anzahl der belegten cogs +ifnot: adm:getcogs +: adm:getcogs + 61 adm:fkt!b@ ; + +\ adm:getver ( -- ver ) - abfrage der codeversion +ifnot: adm:getver +: adm:getver + 62 adm:fkt!l@ ; + +\ adm:reset ( -- ) - reset administra +ifnot: adm:reset +: adm:reset + 63 adm:fkt! ; + diff --git a/forth/ari.lib b/forth/ari.lib new file mode 100644 index 0000000..bca39ba --- /dev/null +++ b/forth/ari.lib @@ -0,0 +1,55 @@ + +hex + +ifnot: lib:ari +: lib:ari ; + +\ abs ( n1 -- abs_n1 ) absolute value of n1 +ifnot: abs +: abs _execasm1>1 151 _cnip ; + +\ u*/mod ( u1 u2 u3 -- u4 u5 ) u5 = (u1*u2)/u3, u4 is the +\ remainder. Uses a 64bit intermediate result. +ifnot: u*/mod +: u*/mod rot2 um* rot um/mod ; + +\ u*/ ( u1 u2 u3 -- u4 ) u4 = (u1*u2)/u3 Uses a 64bit +\ intermediate result. +ifnot: u*/ +: u*/ rot2 um* rot um/mod nip ; + +\ sign ( n1 n2 -- n3 ) n3 is the xor of the sign bits of +\ n1 and n2 +ifnot: sign +: sign xor 80000000 and ; + +\ */mod ( n1 n2 n3 -- n4 n5 ) n5 = (n1*n2)/n3, n4 is the +\ remainder. Uses a 64bit intermediate result. +ifnot: */mod +: */mod 2dup sign >r abs rot dup r> sign >r abs rot abs + um* rot um/mod r> if negate swap negate swap then ; + +\ */ ( n1 n2 n3 -- n4 ) n4 = (n1*n2)/n3. Uses a 64bit +\ intermediate result. +ifnot: */ +: */ */mod nip ; + +\ /mod ( n1 n2 -- n3 n4 ) \ signed divide & mod n4 = n1/n2, +\ n3 is the remainder +ifnot: /mod +: /mod 2dup sign >r abs swap abs swap u/mod r> if negate swap + negate swap then ; + +\ * ( n1 n2 -- n1*n2) n1 multiplied by n2 +ifnot: * +: * um* drop ; + +\ / ( n1 n2 -- n1/n2) n1 divided by n2 +ifnot: / +: / /mod nip ; + +\ rnd ( -- n1 ) n1 is a random number from 00 - FF +ifnot: rnd +: rnd cnt COG@ 8 rshift cnt COG@ xor FF and ; + + diff --git a/forth/basics.mod b/forth/basics.mod new file mode 100644 index 0000000..aa7be0a --- /dev/null +++ b/forth/basics.mod @@ -0,0 +1,485 @@ +fl + +hex + +: mod:basics ; + +\ Copyright (c) 2010 Sal Sanci +\ Anpassung für Hive-System 2011 dr235 + +\ ------------------------------------------------------ BASICS + +\ this words needs to align with the assembler code +: _stptr 5 _cv ; +: _sttop 2e _cv ; + +\ _words ( cstr -- ) +: _words lastnfa + begin + 2dup swap dup if npfx else 2drop -1 then + if dup .strname space then + nfa>next dup 0= + until 2drop cr ; + +\ words name ( -- ) prints the words in the forth dictionary +: words parsenw _words ; + +\ .long ( n -- ) emit 8 hex digits +: .long dup 10 rshift .word .word ; + +\ st? ( -- ) prints out the stack +: st? ." ST: " _stptr COG@ 2+ dup _sttop < + if _sttop swap - 0 + do _sttop 2- i - COG@ .long space loop + else drop + then cr ; + +\ variable ( -- ) skip blanks parse the next word and create +\ a variable, allocate a long, 4 bytes +: variable + lockdict create $C_a_dovarl w, 0 l, forthentry freedict ; + +\ constant ( x -- ) skip blanks parse the next word and create +\ a constant, allocate a long, 4 bytes +: constant + lockdict create $C_a_doconl w, l, forthentry freedict ; + +\ waitpeq ( n1 n2 -- ) \ wait until state n1 is equal to +\ ina anded with n2 +: waitpeq _execasm2>0 1E0 _cnip ; + +\ locknew ( -- n2 ) allocate a lock, result is in n2, -1 +\ if unsuccessful +: locknew -1 4 hubop -1 = if drop -1 then ; + +\ (forget) ( cstr -- ) wind the dictionary back to the word +\ which follows - caution +: (forget) dup +if + find if + pfa>nfa nfa>lfa dup here W! W@ wlastnfa W! + else .cstr 3f emit cr then +else drop then ; + +\ forget ( -- ) wind the dictionary back to the word which +\ follows - caution +: forget parsenw (forget) ; + +\ free ( -- ) display free main bytes and current cog longs +: free dictend W@ here W@ - . ." bytes free - " par + coghere W@ - . ." cog longs free" cr ; + +\ ifnot: name ( -- ) - bedingte compilierung; wenn name schon +\ im wörterbuch vorhanden, wird bis zum nächsten semikolon +\ der eingabestrom ignoriert +: ifnot: parsenw nip find if begin key 3B = until + key drop then ; +\ bei konstrukte, die keine doppelpunkdefinition sind, muss der +\ block mit diesem Wort abgeschlossen werden +: :; ; + +\ --------------------------------------------------------- BUS + +\ bin ( -- ) - umschaltung auf duales zahlensystem +\ : bin 2 base W! ; +\ +---------------------------- /hs +\ |+--------------------------- /wr +\ ||+-------------------------- busclk +\ |||+------------------------- hbeat +\ ||||+------------------------ al +\ |||||+----------------------- /bel +\ ||||||+---------------------- /adm +\ |||||||+--------------------- /ram2 +\ ||||||||+-------------------- /ram1 +\ ||||||||| +--------- a0..10 +\ ||||||||| | +\ ||||||||| | +- d0..7 +\ |||||||||+---------++------+ +\ 00000000000000000000000000000000 +\ bin 00000111111111111111111100000000 constant dinp hex +\ bin 00000111111111111111111111111111 constant dout hex +\ bin 00000010000000000000000000000000 constant boff hex +\ bin 00000100011110000000000000000000 constant _s1 hex +\ bin 00000000001110000000000000000000 constant _b1 hex +\ bin 00000010001110000000000000000000 constant _b2 hex +\ bin 00000110001110000000000000000000 constant _b3 hex +\ bin 00000000010110000000000000000000 constant _a1 hex +\ bin 00000010010110000000000000000000 constant _a2 hex +\ bin 00000110010110000000000000000000 constant _a3 hex +\ bin 00001000000000000000000000000000 constant ?hs hex + +8000000 constant ?hs + +: [inp] \ ( -- ) bus eingabe + 7FFFF00 dira COG! ; \ dinp + +: [out] \ ( -- ) bus ausgabe + 7FFFFFF dira COG! ; \ dout + +: [off] \ ( -- ) bus aus + 2000000 dira COG! 0 outa COG! ; \ boff + +: [end] \ ( -- ) buskommunikation beendet + 4780000 outa COG! [inp] ; \ _s1 + +: [hs=1] \ ( -- ) wartet auf hs = 1 + ?hs dup waitpeq ; + +: [hs=0] \ ( -- ) warten auf hs = 0 + 0 ?hs waitpeq ; + +: [s!] \ ( c ctrl -- ) sende 8 bit an einen slave + [out] [hs=1] swap ff and or outa COG! [hs=0] [end] ; + +: [s@] \ ( ctrl -- c ) empfängt 8 bit von einem slave + [inp] [hs=1] outa COG! [hs=0] ina COG@ ff and [end] ; + +: [b!] \ ( c -- ) sende 8 bit an bellatrix + 2380000 [s!] ; \ _b2 + +: [a!] \ ( c -- ) sende 8 bit an administra + 2580000 [s!] ; \ _a2 + +: [b@] \ ( -- c ) empfängt 8 bit von bellatrix + 6380000 [s@] ; \ _b3 + +: [a@] \ ( -- c ) empfängt 8 bit von administra + 6580000 [s@] ; \ _a3 + +: <8 \ ( -- ) + 8 lshift ; + +\ [b.l!] ( 32b -- ) - long an bellatrix senden +: [b.l!] + dup 18 rshift [b!] + dup 10 rshift [b!] + dup 8 rshift [b!] + [b!] ; + +\ [b.l@] ( -- 32b ) - long von bellatrix einlesen +: [b.l@] + [b@] <8 + [b@] or <8 + [b@] or <8 + [b@] or ; + +\ [a.s@] ( -- ) - einen cstring von administra empfangen +\ und im pad speichern +: [a.s@] + [a@] pad 2dup C! 1+ swap + 0 do dup [a@] swap C! 1+ loop drop ; + +\ [a.s!] ( cstr -- ) - einen cstring an administra senden +: [a.s!] + dup C@ dup [a!] \ ( -- cstr len ) len senden + 0 do \ ( cstr len -- cstr ) + 1+ dup C@ [a!] \ ( cstr -- cstr+1 ) zeichen senden + loop drop ; \ ( cstr -- ) + +\ [a.w@] ( -- 16b ) - 16bit-wert von administra einlesen +: [a.w@] + [a@] <8 [a@] or ; + +\ [a.l!] ( 32b -- ) - long an administra senden +: [a.l!] + dup 18 rshift [a!] + dup 10 rshift [a!] + dup 8 rshift [a!] + [a!] ; + +\ [a.l@] ( -- 32b ) - long von administra einlesen +: [a.l@] + [a@] <8 + [a@] or <8 + [a@] or <8 + [a@] or ; + +wvariable b[lock] \ nummer der semaphore für den + \ zugriff auf die bus-hardware + +\ b[ ( -- ) bus belegen; wartet bis semaphore freigegeben ist +: b[ begin b[lock] W@ lockset -1 <> until [inp] ; + +\ ]b ( -- ) bus freigeben +\ ! busclk bleibt auf ausgabe, da dieses signal sonst +\ kein definierten pegel besitzt ! +: ]b [off] b[lock] W@ lockclr drop ; + +\ administra-kommandoformate + +: b[a! b[ [a!] ; +: b[a!a! b[ [a!] [a!] ; +: adm:fkt! b[a! ]b ; \ ( fkt -- ) +: adm:fkt!b@ b[a! [a@] ]b ; \ ( fkt -- b ) +: adm:fkt!b! b[a!a! ]b ; \ ( b fkt -- ) +: adm:fkt!b!b@ b[a!a! [a@] ]b ; \ ( b fkt -- b ) +: adm:fkt!s@ b[a! [a.s@] ]b ; \ ( fkt -- ) +: adm:fkt!s!b@ b[a! [a.s!] [a@] ]b ; \ ( s fkt -- b ) +: adm:fkt!b!l@ b[a!a! [a.l@] ]b ; \ ( b fkt -- l ) + +\ ----------------------------------------------------- SD0.LIB + +\ marker-funktionen + +\ adm:dmact ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ drop ; + +\ adm:dmset ( dmnr -- ) - marker setzen +: adm:dmset 1A adm:fkt!b! ; + +\ dateisystem-funktionen + +\ adm:volname ( -- ) - name des volumes im pad ablegen +: adm:volname 0C adm:fkt!s@ ; + +\ adm:mount ( -- err ) - medium mounten +: adm:mount 01 adm:fkt!b@ ; + +\ adm:unmount ( -- err ) - medium unmounten +: adm:unmount 18 adm:fkt!b@ ; + +\ adm:checkmounted ( -- t/f ) +: adm:checkmounted 0D adm:fkt!b@ ; + +\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren +: adm:diropen 02 adm:fkt! ; + +\ adm:nextfile ( -- st ) +\ st = 0 - keine gültige datei +\ st = 1 - dateiname im pad gültig +\ bei gültigem eintrag befindet sich der dateiname im pad +: adm:nextfile b[ 3 [a!] [a@] dup if [a.s@] then ]b ; + +\ adm:fattrib ( nr -- attrib ) - dateiattribut abfragen +: adm:fattrib 0B adm:fkt!b!l@ ; + +\ adm:chdir ( cstr -- err ) - verzeichnis öffnen +: adm:chdir 16 adm:fkt!s!b@ ; + +\ adm:getc ( -- c ) - ein zeichen aus der geöffneten datei lesen +: adm:getc 06 adm:fkt!b@ ; + +\ adm:eof ( -- eof ) - abfrage ob end of file erreicht ist +: adm:eof 1E adm:fkt!b@ ; + +\ adm:open ( cstr modus -- err ) - datei öffnen +\ modus "R" $52 - Read +\ modus "W" $57 - Write +\ modus "A" $41 - Append +: adm:open b[ 4 [a!] [a!] [a.s!] [a@] ]b ; + +\ adm:close ( -- ) - datei schließen +: adm:close 05 adm:fkt!b@ ; + +\ ----------------------------------------------------- SCR.LIB + +\ [dscr] ( scrnr -- ) display-screen setzen +: [dscr] 0 [b!] 59 [b!] [b!] ; + +\ [wscr] ( scrnr -- ) schreib-screen setzen +: [wscr] 0 [b!] 58 [b!] [b!] ; + +\ [key?] ( -- c ) - ungekapselte tastaturstatusabfrage +: [key?] 0 [b!] 1 [b!] [b@] ; + +\ [key] ( -- c ) - ungekapselte tastaturabfrage +: [key] 0 [b!] 2 [b!] [b@] ; + +\ [emit] ( c -- ) - ungekapselte zeichenausgabe +: [emit] emit? if emit then ; + +\ ----------------------------------------------------- TOOLS + +\ cls ( -- ) - screen löschen +: cls 01 emit ; + +\ .tab ( -- ) - tabulator +: .tab 09 emit ; + +\ .err ( err -- ) - fehlermeldung ausgeben +\ 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 +: .err dup if ERR then drop ; + +\ .pad ( -- ) - ausgabe eines strings im pad +: .pad pad .cstr ; + +\ .vname ( -- ) - ausgabe des namens der eingelegten sd-card +: .vname adm:volname .pad ; + +\ mount ( -- ) - sd-card mounten +: mount adm:mount .err ." Medium : " .vname cr ; + +\ unmount ( -- ) - sd-card unmounten +: unmount adm:unmount .err ; + +\ mount? ( -- ) - test ob medium mounted ist +\ wird als exception gewertet +: mount? adm:checkmounted 0= if 1 .err then ; + +\ padbl ( -- ) fills this cogs pad with blanks +: padbl pad padsize bl fill ; + +\ .entry ( -- st ) - einen verzeichniseintrag ausgeben +: .entry + adm:nextfile 13 adm:fattrib if 0F emit else space then + dup if .pad .tab then ; + +\ .len ( st -- st ) - dateilänge ausgeben +: .len dup if 0 adm:fattrib . then ; + +\ lscnt ( cnt1 st -- cnt2 st ) - spaltenformatierung für ls +\ cnt - spaltenzähler, st - flag verzeichnisende +: lscnt + swap 1+ dup 4 = if cr drop 0 else .tab then swap ; + +\ lsl ( -- ) - verzeichnis anzeigen, long-format +: lsl mount? + adm:diropen begin .entry .len cr 0= until padbl ; + +\ ls ( -- ) - verzeichnis in spalten anzeigen +: ls mount? + adm:diropen 0 begin .entry lscnt 0= until drop padbl cr ; + +\ cd name ( -- ) - verzeichnis wechseln +: cd mount? parsenw adm:chdir .err ; + +\ open name ( -- ) - datei lesend öffnen und auf fehler prüfen +: open + mount? parsenw dup + if 52 adm:open else drop 23 then .err ; + +\ close ( -- ) - geöffnete datei schließen +: close adm:close .err ; + +\ dload name - datei compilieren; log im gleichen screen +\ load name - datei compilieren; log screen 3 +\ sys name - datei aus sys compilieren; log screen 3 +\ die datei wird in der nächsten freien cog compiliert +\ fl ist für load nicht nötig und bringt in dem kontext +\ die cog-zuordnung durcheinander + +: (load) + begin adm:getc emit adm:eof until ; + +: (dload) + open cogid nfcog iolink + (load) + cogid iounlink close ; + +: (sload) + open cogid 3 dup b[ [wscr] ]b iolink + (load) + cogid dup b[ [wscr] ]b iounlink close ; + +: load + ." Loading... " (sload) ; + +: dload + (dload) ; + +: sys + 2 adm:dmset 1 adm:dmact ." Loading... " (sload) 2 adm:dmact ; + +\ ------------------------------------------------- SPIN-LOADER + +\ (spin) ( cstr -- ) - c" reg.sys" (spin) +: (spin) + dup C@ 1+ + 0 do + dup i + C@ + ldvar 1+ i + C! + loop drop + 1 ldvar C! +; + +\ spin name ( -- ) - spinobjekt "name" starten +: spin + parsenw (spin) ; + +\ regime ( -- ) - startet dir trios-cli "regime" +: regime + 0 adm:dmact + c" reg.sys" (spin) ; + +\ ----------------------------------------------------- DRV:INT + + +wvariable icog \ nummer der drv:int-cog +wvariable lcog \ nummer interaktiven cog + +\ xint ( n -- ) io von cog n auf drv:int umschalten +: xint icog W@ ioconn ; + +\ [cogscr] ( nr -- ) - umschaltung screen + cog +: [cogscr] + dup 2dup lcog W! xint [dscr] [wscr] ; + +\ =n ( n1 n2 -- n1 n1=n2 ) +: =n 2dup = swap drop ; + +\ [esc] ( -- ) - manager für esc-funktionen im drv:int +: [esc] + begin [key?] until [key] + 71 =n if 1b [emit] then \ esc - q : esc-char/quit + 31 =n if 1 [cogscr] then \ esc - 1 : cog-screen 0 + 32 =n if 2 [cogscr] then \ esc - 2 : cog-screen 1 + 33 =n if 3 [cogscr] then \ esc - 3 : cog-screen 2 + 62 =n if lcog W@ cogreset then \ esc - b : break (cog) + 72 =n if reboot then \ esc - r : reset (chip) + drop ; \ esc - esc : pause + +\ drv:int ( -- ) treiber für bellatrix-terminal +\ diese cog fragt in einer endlosschleife ab, ob zeichen +\ versendet oder empfangen werden sollen. um die zeichenausgabe +\ zu beschleunigen, findet ausgabe und eingabe in einem +\ verhältnis von 512:1 statt. per esc-code können spezielle +\ funktionen im driver ausgelöst werden. +: drv:int + \ name und typ der cog einstellen + cogid dup cogstate 10 swap C! c" drv:int" over + cognumpad ccopy + 20 delms 0D emit \ verzögertes cr für prompt + begin + \ input --> vga/video + 200 0 do key? \ eingabezeichen vorhanden? + if key b[ [b!] ]b then loop \ cog ---> bel.vga + \ output <-- keyboard + b[ [key?] \ tastenstatus bellatrix? + if [key] dup 1b = if drop [esc] else [emit] thens ]b + 0 until ; + +\ ----------------------------------------------------- SYSINIT + +: start \ ( -- ) initialisierung hive + locknew b[lock] W! \ b-semaphore + 0 dup cogstate 10 swap C! c" drv:ldr" over + cognumpad ccopy + 5 dup icog W! c" drv:int" swap cogx 1 b[ [cogscr] ]b ; +: _ob onboot ; +: onboot _ob start ; + + + diff --git a/forth/bel.lib b/forth/bel.lib new file mode 100644 index 0000000..0034988 --- /dev/null +++ b/forth/bel.lib @@ -0,0 +1,77 @@ + +hex + +ifnot: lib:bel +: lib:bel ; + +\ kommandoformate + +ifnot: bel:fkt! \ ( fkt -- ) +: bel:fkt! b[ 0 [b!] [b!] ]b ; + +ifnot: bel:fkt!b! \ ( b fkt -- ) +: bel:fkt!b! b[ 0 [b!] [b!] [b!] ]b ; + +ifnot: bel:fkt!b!l@ \ ( b fkt -- l ) +: bel:fkt!b!l@ b[ 0 [b!] [b!] [b!] [b.l@] ]b ; + +ifnot: bel:fkt!b!l! \ ( l b fkt -- ) +: bel:fkt!b!l! b[ 0 [b!] [b!] [b!] [b.l!] ]b ; + +ifnot: bel:fkt!l@ \ ( fkt -- l ) +: bel:fkt!l@ b[ 0 [b!] [b!] [b.l@] ]b ; + +ifnot: bel:fkt!b@ \ ( fkt -- b ) +: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ; + +\ chipmanagment-funktionen + +ifnot: bel:wscr \ ( scrnr -- ) - schreibscreen setzen +: bel:wscr 58 bel:fkt!b! ; + +ifnot: bel:dscr \ ( scrnr -- ) - displayscreen setzen +: bel:dscr 59 bel:fkt!b! ; + +ifnot: bel:getcol \ ( colnr -- col ) - farbe abfragen +: bel:getcol 5A bel:fkt!b!l@ ; + +ifnot: bel:setcol \ ( col colnr -- ) - farbe setzen +: bel:setcol 5B bel:fkt!b!l! ; + +ifnot: bel:getresx \ ( -- resx ) - abfrage x-auflösung +: bel:getresx 5C bel:fkt!l@ ; + +ifnot: bel:getresy \ ( -- resy ) - abfrage y-auflösung +: bel:getresy 5D bel:fkt!l@ ; + +ifnot: bel:getcols \ ( -- cols ) - abfrage textspalten +: bel:getcols 5E bel:fkt!b@ ; + +ifnot: bel:getrows \ ( -- rows ) - abfrage textzeilen +: bel:getrows 5F bel:fkt!b@ ; + +ifnot: bel:getcogs \ ( -- cogs ) - abfrage belegte cogs +: bel:getcogs 60 bel:fkt!b@ ; + +ifnot: bel:getspec \ ( -- spec ) - abfrage codespezifikation +: bel:getspec 61 bel:fkt!l@ ; + +ifnot: bel:getver \ ( -- ver ) - abfrage codeversion +: bel:getver 62 bel:fkt!l@ ; + +ifnot: bel:load \ ( cstr -- ) - bellatrix-code laden +: bel:load + 52 adm:open .err \ datei öffnen + b[ + 0 [b!] 63 [b!] \ bella-loader starten + 10 0 do 06 [a!] [a@] [b!] loop \ header einlesen + 0A [a!] 0 [a.l!] \ 0 adm:seek + [b@] <8 [b@] or \ dateilänge empfangen + 0 do 06 [a!] [a@] [b!] loop \ datei senden + ]b + adm:close .err \ datei schließen +; + + + + diff --git a/forth/cog.lib b/forth/cog.lib new file mode 100644 index 0000000..14c242e --- /dev/null +++ b/forth/cog.lib @@ -0,0 +1,74 @@ + +hex + +ifnot: lib:cog +: lib:cog ; + +\ cog special register + +ifnot: ctra 1F8 wconstant ctra :; +ifnot: ctrb 1F9 wconstant ctrb :; +ifnot: frqa 1FA wconstant frqa :; +ifnot: frqb 1FB wconstant frqb :; +ifnot: phsa 1FC wconstant phsa :; +ifnot: phsb 1FD wconstant phsb :; +ifnot: vcfg 1FE wconstant vcfg :; +ifnot: vscl 1FF wconstant vscl :; + +\ this words needs to align with the assembler code + +ifnot: _faddrmask : _faddrmask 1 _cv ; +ifnot: _flongmask : _flongmask 2 _cv ; +ifnot: _stptr : _stptr 5 _cv ; +ifnot: _sttos : _sttos 7 _cv ; +ifnot: _treg1 : _treg1 8 _cv ; +ifnot: _treg2 : _treg2 9 _cv ; +ifnot: _treg3 : _treg3 a _cv ; +ifnot: _treg4 : _treg4 b _cv ; +ifnot: _treg5 : _treg5 c _cv ; +ifnot: _treg6 : _treg6 d _cv ; +ifnot: _stbot : _stbot e _cv ; +ifnot: _sttop : _sttop 2e _cv ; +ifnot: _rsbot : _rsbot _sttop ; + +\ waitcnt ( n1 n2 -- n1 ) \ wait until n1, add n2 to n1 +ifnot: waitcnt +: waitcnt _execasm2>1 1F1 _cnip ; + +\ waitpeq ( n1 n2 -- ) \ wait until state n1 is equal to +\ ina anded with n2 +ifnot: waitpeq +: waitpeq _execasm2>0 1E0 _cnip ; + +\ waitpne ( n1 n2 -- ) \ wait until state n1 is not equal +\ to ina anded with n2 +ifnot: waitpne +: waitpne _execasm2>0 1E8 _cnip ; + +\ lockret ( n1 -- ) deallocate a lock, previously allocated +\ via locknew +ifnot: lockret +: lockret 5 hubop 2drop ; + +\ locknew ( -- n2 ) allocate a lock, result is in n2, -1 +\ if unsuccessful +ifnot: locknew +: locknew -1 4 hubop -1 = if drop -1 then ; + +\ cog+ ( -- ) add a forth cog +ifnot: cog+ +: cog+ (cog+) ; + +\ (cog-) ( -- ) stop first forth cog, cannot be executed form +\ the first forth cog +ifnot: (cog-) +: (cog-) nfcog cogstop ; + +\ cog- ( -- ) stop first forth cog, cannot be executed form +\ the first forth cog +ifnot: cog- +: cog- (cog-) ; + + + + diff --git a/forth/debug.mod b/forth/debug.mod new file mode 100644 index 0000000..937129d --- /dev/null +++ b/forth/debug.mod @@ -0,0 +1,65 @@ + +hex + +ifnot: mod:debug +: mod:debug ; + +\ keycode ( -- ) - anzeige der tastaturcodes +ifnot: keycode +: keycode + begin + 0 key? if + drop key dup dup ." code : " emit ." : " . cr 1B = + then until ; + +\ +\ Noisy reset messages +\ +\ print out a reset message to the console +\ (rsm) ( n -- ) n is the last status +\ 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 + +: (rsm) state W@ 2 and 0= swap +\ process the last status + dup 0= if c" ok" else + dup FF11 = if c" DST OVER" else + dup FF12 = if c" RST OVER" else + dup FF21 = if c" DST LOW" else + dup FF22 = if c" RST LOW" else + dup 8001 = if c" COGs OUT" else + dup 8002 = if c" hMEM OUT" else + dup 8003 = if c" ROM WR" else + dup 8004 = if c" FL" else + dup 8005 = if c" cMEM OUT" else + dup 8006 = if c" ROM RD" else + c" ?" + thens + rot if + lockdict cr c" ERR : " .cstr swap . .cstr cr freedict + else 2drop then ; +: onreset (rsm) 4 state orC! ; + +\ .byte ( n1 -- ) +: .byte <# # # #> .cstr ; + +\ [if (dumpb) +: (dumpb) cr over .addr space dup .addr _ecs bounds ; ] + +\ [if (dumpm) +: (dumpm) cr .word _ecs ; ] + +\ [if (dumpe) +: (dumpe) tbuf 8 bounds do i C@ .byte space loop 2 spaces tbuf 8 bounds do i C@ dup bl < if drop 2e then emit loop ; ] + +\ dump ( adr cnt -- ) uses tbuf +[if dump +: dump (dumpb) do i (dumpm) i tbuf 8 cmove (dumpe) 8 +loop cr ; ] diff --git a/forth/error.txt b/forth/error.txt new file mode 100644 index 0000000..17013b3 --- /dev/null +++ b/forth/error.txt @@ -0,0 +1,40 @@ + +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 diff --git a/forth/hplay.mod b/forth/hplay.mod new file mode 100644 index 0000000..2916ebe --- /dev/null +++ b/forth/hplay.mod @@ -0,0 +1,155 @@ + +hex + +ifnot: mod:hplay +: mod:hplay ; + +\ kommandoformate + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!w@ \ ( b fkt -- w ) +: adm:fkt!b!w@ b[ [a!] [a!] [a.w@] ]b ; + +ifnot: adm:fkt!s!b@ \ ( cstr fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: bel:fkt!b@ \ ( fkt -- b ) +: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ; + +ifnot: bel:char \ ( b -- ) +: bel:char b[ [b!] ]b ; + +\ hss-funktionen + +ifnot: hss:load \ ( cstr -- err ) - hss-datei laden +: hss:load dup if 64 adm:fkt!s!b@ then ; + +ifnot: hss:play \ ( -- ) - datei im puffer abspielen +: hss:play 65 adm:fkt! ; + +ifnot: hss:stop \ ( -- ) - player stop +: hss:stop 66 adm:fkt! ; + +ifnot: hss:reg \ hreg ( regnr -- 16b ) +: hss:reg 69 b[ [a!] [a!] [a.w@] ]b ; + +ifnot: hss:vol \ hvol ( vol -- ) - lautstärke 0..15 +: hss:vol 6A adm:fkt!b! ; + +\ keyboard-funktionen + +ifnot: key:stat \ ( -- stat ) - tastenstatus abfragen +: key:stat 1 bel:fkt!b@ ; + +\ steuerzeichen + +ifnot: scr:cls \ ( -- ) - screen löschen +: scr:cls 01 bel:char ; + +ifnot: scr:home \ ( -- ) - cursor oben links +: scr:home 02 bel:char ; + +ifnot: scr:curon \ ( -- ) - cursor anschalten +: scr:curon 04 bel:char ; + +ifnot: scr:curoff \ ( -- ) - cursor abschalten +: scr:curoff 05 bel:char ; + +\ sd0-funktionen + +\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren +ifnot: adm:diropen +: adm:diropen + 02 adm:fkt! ; + +\ adm:nextfile ( -- st ) +\ st = 0 - keine gültige datei +\ st = 1 - dateiname im pad gültig +\ bei gültigem eintrag befindet sich der dateiname im pad +ifnot: adm:nextfile +: adm:nextfile + b[ 03 [a!] [a@] dup if [a.s@] then ]b ; + +\ metafunktionen + +\ hload name ( -- ) - hss-datei in player laden + +ifnot: hload +: hload mount? parsenw hss:load .err ; + +ifnot: .hset +: .hset \ ( shift -- ) - eine registersatz ausgeben + 5 0 do dup i + hss:reg .word space loop drop ; + +ifnot: .hreg +: .hreg \ ( -- ) - register ausgeben + 14 0 do i .hset cr 5 +loop ; + +ifnot: fadeout +: fadeout \ ( -- ) - sound langsam ausblenden + f 0 do e i - hss:vol 50 delms loop ; + +ifnot: end? +: end? \ ( cnt -- flag ) - abfrage nach cnt wiederholungen + 4 hss:reg = ; + +ifnot: hwait +: hwait \ ( -- flag ) - wartet auf songende oder taste + begin 50 delms key? 2 end? or until key drop ; + +ifnot: hreg.. +: hreg.. \ ( -- ) - fortlaufende anzeige register + scr:curoff scr:cls begin scr:home .hreg 2 end? until + scr:curon fadeout hss:stop ; + +ifnot: (hplay) +: (hplay) \ ( cstr -- ) + ." Datei : " dup .cstr hss:load .err f hss:vol hss:play + hwait fadeout hss:stop 100 delms cr ; + +\ hplay name ( -- ) - datei abspielen +ifnot: hplay +: hplay + hload hss:play ; + +\ files? ( -- cnt ) - anzahl dateien im dir +ifnot: files? +: files? + adm:diropen + 0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ; + +\ filenr? ( nr -- ) +ifnot: filenr? +: filenr? + adm:diropen + 0 do adm:nextfile drop loop ; + +\ hdirplay ( -- ) - gesamtes verzeichnis abspielen +\ im verzeichnis dürfen nur hss-dateien sein! +ifnot: hdirplay +: hdirplay + decimal files? dup ." Dateien : " . cr + 0 do i dup 1 + . 3 + filenr? pad (hplay) loop padbl hex ; + +: (hp) ." play : " dup .cstr hss:load .err ; + +ifnot: playliste +: playliste + c" kw.hss" (hplay) + c" genes.hss" (hplay) + c" greenpuz.hss" (hplay) + c" hssintro.hss" (hplay) + c" kali766.hss" (hplay) + c" machine.hss" (hplay) + c" metroid.hss" (hplay) + c" mrboss.hss" (hplay) + c" mrevil.hss" (hplay) + c" raind.hss" (hplay) + c" sytrus.hss" (hplay) + c" tbellsp1.hss" (hplay) ; + diff --git a/forth/hss.lib b/forth/hss.lib new file mode 100644 index 0000000..33db039 --- /dev/null +++ b/forth/hss.lib @@ -0,0 +1,60 @@ + +hex + +ifnot: lib:hss +: lib:hss ; + +\ kommandoformate + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!b! \ ( b b fkt -- ) +: adm:fkt!b!b! b[ [a!] [a!] [a!] ]b ; + +ifnot: adm:fkt!b!w@ \ ( b fkt -- w ) +: adm:fkt!b!w@ b[ [a!] [a!] [a.w@] ]b ; + +ifnot: adm:fkt!s!b@ \ ( cstr fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +\ hss-funktionen + +\ ( cstr -- err ) - hss-datei laden +ifnot: hss:load +: hss:load dup if 64 adm:fkt!s!b@ then ; + +\ ( -- ) - datei im puffer abspielen +ifnot: hss:play +: hss:play 65 adm:fkt! ; + +\ ( -- ) - player stop +ifnot: hss:stop +: hss:stop 66 adm:fkt! ; + +\ ( -- ) - player pause +ifnot: hss:pause +: hss:pause 67 adm:fkt! ; + +\ hreg ( regnr -- 16b ) +\ 0 iEndFlag iRowFlag iEngineC iBeatC iRepeat Player +\ 5 iNote iOktave iVolume iEffekt iInstrument Kanal 1 +\ 10 iNote iOktave iVolume iEffekt iInstrument Kanal 2 +\ 15 iNote iOktave iVolume iEffekt iInstrument Kanal 3 +\ 20 iNote iOktave iVolume iEffekt iInstrument Kanal 4 +\ +\ iEndFlag Repeat oder Ende wurde erreicht +\ iRowFlag Trackerzeile (Row) ist fertig +\ iEngineC Patternzähler +\ iBeatC Beatzähler (Anzahl der Rows) +\ iRepeat Zähler für Loops +ifnot: hss:reg +: hss:reg 69 b[ [a!] [a!] [a.w@] ]b ; + +\ hvol ( vol -- ) - lautstärke 0..15 +ifnot: hss:vol +: hss:vol 6A adm:fkt!b! ; + diff --git a/forth/key.lib b/forth/key.lib new file mode 100644 index 0000000..45204a5 --- /dev/null +++ b/forth/key.lib @@ -0,0 +1,17 @@ + +hex + +ifnot: lib:key +: lib:key ; + +\ kommandoformate +ifnot: bel:fkt!b@ \ ( fkt -- b ) +: bel:fkt!b@ b[ 0 [b!] [b!] [b@] ]b ; + +\ keyboard-funktionen +ifnot: key:stat \ ( -- stat ) - tastenstatus abfragen +: key:stat 1 bel:fkt!b@ ; +ifnot: key:code \ ( -- code ) - tastencode abfragen +: key:code 2 bel:fkt!b@ ; +ifnot: key:spec \ ( -- spec ) - spezialtasten abfragen +: key:spec 4 bel:fkt!b@ ; diff --git a/forth/rom.mod b/forth/rom.mod new file mode 100644 index 0000000..9a91eda --- /dev/null +++ b/forth/rom.mod @@ -0,0 +1,206 @@ + +\ ACHTUNG: Diese Modifikation nicht bei einer Installation im +\ HI-EEPROM verwenden! + +hex +[if mod:rom +: mod:rom ; ] + +\ constant ( x -- ) skip blanks parse the next word and create a constant, allocate a long, 4 bytes +[if constant +: constant lockdict create $C_a_doconl w, l, forthentry freedict ; ] + +\ +\ CONFIG PARAMETERS BEGIN +\ +40 wconstant fsps \ a page size which works with 32kx8 & 64kx8 eeproms + \ and should work with larger as well. + + +8000 constant fsbot \ file-system bottom: the start adress in eeprom for the file system + + \ file system top: the end address of the file system + \ uncomment the line for your comfiguration +\ 8000 constant fstop \ the end address for the file system with one 24LC256 32k eeprom +10000 constant fstop \ the end address for the file system with one 24LC512 64k eeprom +\ 20000 constant fstop \ the end address for the file system with two 24LC512 64k eeprom +\ 30000 constant fstop \ the end address for the file system with 3 24LC512 64k eeprom +\ 40000 constant fstop \ the end address for the file system with 4 24LC512 64k eeprom +\ 50000 constant fstop \ the end address for the file system with 5 24LC512 64k eeprom +\ 60000 constant fstop \ the end address for the file system with 6 24LC512 64k eeprom +\ 70000 constant fstop \ the end address for the file system with 7 24LC512 64k eeprom + +\ NOTE IF you have DEMOBOARD or any system with 32K EEPROM, you will step on your spin image +\ when you write to the EEPROM. You can still use it (if you are tricky), but KNOW WHAT YOUR DOING!!! + +\ +\ CONFIG PARAMETERS END +\ + + +\ lasti? ( -- t/f ) true if this is the last value of i in this loop +[if lasti? +: lasti? _rsptr COG@ 2+ COG@ 1- _rsptr COG@ 3 + COG@ = ; ] + +\ padbl ( -- ) fills this cogs pad with blanks +[if padbl +: padbl pad padsize bl fill ; ] +\ _eeread ( t/f -- c1 ) read a byte from the eeprom, ackbit in, byte out +[if _eeread : _eeread _sdai 0 8 0 do 1 lshift _sclh _sda? _scll if 1 or then loop +swap if _sdah else _sdal then _sdao _sclh _scll _sdal ; ] + +\ the eereadpage and eewritePage words assume the eeprom are 64kx8 and will address up to +\ 8 sequential eeproms +\ eereadpage ( eeAddr addr u -- t/f ) return true if there was an error, use lock 1 +[if eereadpage : eereadpage begin 1 lockset 0= until +1 max rot dup ff and swap dup 8 rshift ff and swap 10 rshift 7 and 1 lshift dup >r +_eestart A0 or _eewrite swap _eewrite or swap _eewrite or +_eestart r> A1 or _eewrite or +rot2 bounds +do lasti? _eeread i C! loop _eestop 1 lockclr drop ; ] + +\ _eeread ( t/f -- c1 ) read a byte from the eeprom, ackbit in, byte out +[if _eeread : _eeread _sdai 0 8 0 do 1 lshift _sclh _sda? _scll if 1 or then loop +swap if _sdah else _sdal then _sdao _sclh _scll _sdal ; ] + +\ the eereadpage and eewritePage words assume the eeprom are 64kx8 and will address up to +\ 8 sequential eeproms +\ eereadpage ( eeAddr addr u -- t/f ) return true if there was an error, use lock 1 +[if eereadpage : eereadpage begin 1 lockset 0= until +1 max rot dup ff and swap dup 8 rshift ff and swap 10 rshift 7 and 1 lshift dup >r +_eestart A0 or _eewrite swap _eewrite or swap _eewrite or +_eestart r> A1 or _eewrite or +rot2 bounds +do lasti? _eeread i C! loop _eestop 1 lockclr drop ; ] + +\ EW@ ( eeAddr -- n1 ) +[if EW@ +: EW@ t0 2 eereadpage if 8006 ERR then t0 W@ ; ] + +\ EC@ ( eeAddr -- c1 ) +[if EC@ +: EC@ EW@ FF and ; ] + +\ (fspa) ( addr1 -- addr2) addr2 is the next page aligned address after addr1 +: (fspa) fsps 1- + fsps 1- andn ; + +\ (fsnext) ( addr1 -- addr2 t/f) addr - the current file address, addr2 - the next addr, t/f - true if we have +\ gone past the end of the eeprom. t0 -length of the current file +\ t1 - length of the file name (char) +: (fsnext) t0 W@ t1 C@ + 2+ 1+ + (fspa) dup fstop >= ; + + +\ (fswr) ( addr1 addr2 n1 -- ) addr1 - the eepropm address to write, addr2 - the address to write from +\ n1 - the number of bytes to write +: (fswr) dup >r rot dup r> + fstop 1- > if A0 ERR then rot2 eewritepage if 88 ERR then ; + +\ (fsrd) ( addr1 addr2 n1 -- ) addr1 - the eepropm address to read, addr2 - the address of the read buffer +\ n1 - the number of bytes to read +: (fsrd) dup >r rot dup r> + fstop 1- > if C0 ERR then rot2 eereadpage if 90 ERR then ; + +\ (fsfree) ( -- n1 ) n1 is the first location in the file system, -1 if there are none +: (fsfree) -1 fsbot begin +\ read 3 bytes into t0, t1 and process + dup t0 3 (fsrd) t0 W@ FFFF = if nip dup -1 else (fsnext) then +until drop ; + +\ (fsfind) ( cstr -- addr ) find the last file named cstr, addr is the eeprom address, 0 if not found +: (fsfind) fsbot 0 >r begin +\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf + dup t0 22 (fsrd) t0 W@ FFFF = if -1 else + over t1 cstr= if r> drop dup >r then + (fsnext) + then +until 2drop r> ; + +\ (fslast) ( -- addr ) find the last file, 0 if not found +: (fslast) 0 fsbot begin +\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf + dup t0 22 (fsrd) t0 W@ FFFF = if -1 else + nip dup + (fsnext) + then +until drop ; + +\ fsclear ( -- ) +: fsclr padbl fsbot 400 + fsbot do i pad fsps (fswr) 2e emit fsps +loop -1 fsbot EW! ; +: fsclear -1 fsbot EW! ; + +\ fsfree ( -- ) +: fsfree (fsfree) dup -1 = if 0 else fstop swap - then . ." bytes free in fs" cr ; + +\ fsls ( -- ) list the files +: fsls cr fsbot begin +\ read namesizemax 1F + 3 bytes into t0, t1, and tbuf + dup t0 22 (fsrd) t0 W@ FFFF = if -1 else + dup .addr space t0 W@ .addr space t1 .cstr cr + (fsnext) + then +until fstop swap - cr . ." bytes free in files system" cr cr ; + +\ (fsread) ( cstr -- ) +: (fsread) (fsfind) dup if +\ read 3 bytes into t0, t1 and process + dup t0 3 (fsrd) + t1 C@ + 2+ 1+ t0 W@ bounds do + ibound i - fsps >= if + i pad fsps (fsrd) pad fsps bounds + do i C@ emit loop i fsps 1- + seti + else + i EC@ emit + then + loop +else drop then padbl ; + +\ fsread ( -- ) filename +: fsread parsenw dup if (fsread) else drop then ; + +\ (fsload) ( ctsr -- ) +: (fsload) cogid nfcog iolink (fsread) d emit d emit cogid iounlink ; + +\ fsload filename ( -- ) send the file to the next free forth cog +: fsload parsenw dup if (fsload) else drop then ; + +\ (fsk) ( n1 -- n2) +: (fsk) 8 lshift key or ; + +\ fswrite filename ( -- ) writes a file until ... followed immediately by a cr is encountered +: fswrite (fsfree) dup -1 <> parsenw dup rot and if +\ set the file length to 0, copy in the file name + 0 pad W! dup C@ 2+ 1+ pad + swap pad 2+ ccopy +\ find the first free page + 0 swap key (fsk) (fsk) (fsk) +\ ( eaddr1 n1 addr2 n2 ) eaddr - start of file in the eeprom, n1 - bytes written so far, addr2 - next addr in the pad, +\ n2 - a 4 byte key buffer + begin +\ check to see if we have a ... at the end of a line + 2E2E2E0D over = if + -1 + else +\ get a key from the key buffer, write it the the pad + swap over 18 rshift dup dup d = if drop cr else emit then over C! 1+ tuck pad - fsps = if +\ we have a page worth of data, write it out + nip rot2 2dup + pad fsps (fswr) fsps + rot pad swap + then +\ get another key + (fsk) 0 + then + until +\ any keys left? + drop pad - dup 0> if +\ write the leftover, not a full page + >r 2dup + pad r> dup >r (fswr) r> + + else + drop + then +\ write the length of FFFF for the next file + 2dup + FFFF swap (fspa) dup fstop 1- < if EW! else 2drop then +\ subtract the length of the filename +1, and the 2 bytes which are the length of the file, and update the length of the file + over 2+ EC@ 2+ 1+ - swap EW! +else 2drop clearkeys then padbl +; + +\ fsdrop ( -- ) deletes last file +: fsdrop (fslast) dup -1 = if drop else FFFF swap EW! then ; + + diff --git a/forth/scr.lib b/forth/scr.lib new file mode 100644 index 0000000..a879692 --- /dev/null +++ b/forth/scr.lib @@ -0,0 +1,69 @@ + +hex + +ifnot: lib:scr +: lib:scr ; + +\ kommandoformate +ifnot: bel:char \ ( b -- ) +: bel:char b[ [b!] ]b ; +ifnot: bel:fkt!b! \ ( b fkt -- ) +: bel:fkt!b! b[ 0 [b!] [b!] [b!] ]b ; +ifnot: bel:fkt!b!b! \ ( b b fkt -- ) +: bel:fkt!b!b! b[ 0 [b!] [b!] [b!] [b!] ]b ; +ifnot: bel:ctrl! \ ( ctrl -- ) +: bel:ctrl! b[ 0 [b!] 3 [b!] [b!] ]b ; +ifnot: bel:ctrl!b! \ ( b ctrl -- ) +: bel:ctrl!b! b[ 0 [b!] 3 [b!] [b!] [b!] ]b ; +ifnot: bel:ctrl!b@ \ ( ctrl -- b@ ) +: bel:ctrl!b@ b[ 0 [b!] 3 [b!] [b!] [b@] ]b ; +ifnot: bel:ctrl!b!b! \ ( b b ctrl -- ) +: bel:ctrl!b!b! b[ 0 [b!] 3 [b!] [b!] [b!] [b!] [b!] ]b ; + +\ einfache steuerzeichen +ifnot: scr:cls \ ( -- ) - screen löschen +: scr:cls 01 bel:char ; +ifnot: scr:home \ ( -- ) - cursor oben links +: scr:home 02 bel:char ; +ifnot: scr:pos1 \ ( -- ) - cursor an zeilenanfang +: scr:pos1 03 bel:char ; +ifnot: scr:curon \ ( -- ) - cursor anschalten +: scr:curon 04 bel:char ; +ifnot: scr:curoff \ ( -- ) - cursor abschalten +: scr:curoff 05 bel:char ; +ifnot: scr:scrlu \ ( -- ) - screen nach oben scrollen +: scr:scrlu 06 bel:char ; +ifnot: scr:scrld \ ( -- ) - screen nach unten scrollen +: scr:scrld 07 bel:char ; +ifnot: scr:bs \ ( -- ) - backspace +: scr:bs 08 bel:char ; +ifnot: scr:tab \ ( -- ) - tabulator +: scr:tab 09 bel:char ; + +\ screen-funktionen +ifnot: scr:logo \ ( y x -- ) - hive logo +: scr:logo 5 bel:fkt!b!b! ; +ifnot: scr:char \ ( char -- ) - zeichensatz direkt ausgeben +: scr:char 6 bel:fkt!b! ; + +\ parametrisierte steuerzeichen +ifnot: scr:setcur \ ( cur -- ) - cursorzeichen setzen +: scr:setcur 01 bel:ctrl!b! ; +ifnot: scr:setx \ ( x -- ) - cursor position x setzen +: scr:setx 02 bel:ctrl!b! ; +ifnot: scr:sety \ ( y -- ) - cursor position y setzen +: scr:sety 03 bel:ctrl!b! ; +ifnot: scr:getx \ ( -- x ) - cursor position x abfragen +: scr:getx 04 bel:ctrl!b@ ; +ifnot: scr:gety \ ( -- y ) - cursor position y abfragen +: scr:gety 05 bel:ctrl!b@ ; +ifnot: scr:setcol \ ( colnr -- ) - farbe wählen 0..15 +: scr:setcol 06 bel:ctrl!b! ; +ifnot: scr:sline \ ( row -- ) - anfangszeile scrollbereich +: scr:sline 07 bel:ctrl!b! ; +ifnot: scr:eline \ ( row -- ) - endzeile scrollbereich +: scr:eline 08 bel:ctrl!b! ; +ifnot: scr:sinit \ ( -- ) - +: scr:sinit 09 bel:ctrl! ; +ifnot: scr:tabset \ ( pos nr -- ) - tabulatorposition setzen 0..7 +: scr:tabset 0A bel:ctrl!b!b! ; diff --git a/forth/sd0.lib b/forth/sd0.lib new file mode 100644 index 0000000..8cf2e49 --- /dev/null +++ b/forth/sd0.lib @@ -0,0 +1,176 @@ + +hex + +ifnot: lib:sd0 +: lib:sd0 ; + +\ ------------------------------------ lib:sd0 + +\ kommandoformate + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!b!l@ \ ( b fkt -- l ) +: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ; + +ifnot: adm:fkt!l! \ ( l fkt -- ) +: adm:fkt!l! b[ [a!] [a.l!] ]b ; + +ifnot: adm:fkt!l@ \ ( fkt -- l ) +: adm:fkt!l@ b[ [a!] [a.l@] ]b ; + +ifnot: adm:fkt!b!l! \ ( l b fkt -- ) +: adm:fkt!b!l! b[ [a!] [a!] [a.l!] ]b ; + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!b!s!b@ \ ( s b fkt -- b ) +: adm:fkt!b!s!b@ b[ [a!] [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!s!s!b@ \ ( s s fkt -- b ) +: adm:fkt!s!s!b@ b[ [a!] [a.s!] [a.s!] [a@] ]b ; + +\ dateisystem-funktionen + +\ adm:mount ( -- err ) - medium mounten +ifnot: adm:mount +: adm:mount + 01 adm:fkt!b@ ; + +\ adm:diropen ( -- ) - verzeichnisabfrage initialisieren +ifnot: adm:diropen +: adm:diropen + 02 adm:fkt! ; + +\ adm:nextfile ( -- st ) +\ st = 0 - keine gültige datei +\ st = 1 - dateiname im pad gültig +\ bei gültigem eintrag befindet sich der dateiname im pad +ifnot: adm:nextfile +: adm:nextfile + b[ 03 [a!] [a@] dup if [a.s@] then ]b ; + +\ adm:open ( cstr modus -- err ) - datei öffnen +\ modus "R" $52 - Read +\ modus "W" $57 - Write +\ modus "A" $41 - Append +ifnot: adm:open +: adm:open + 04 adm:fkt!b!s!b@ ; + +\ adm:close ( -- ) - datei schließen +ifnot: adm:close +: adm:close + 05 adm:fkt!b@ ; + +\ adm:getc ( -- c ) - ein zeichen aus datei lesen +ifnot: adm:getc +: adm:getc + 06 adm:fkt!b@ ; + +\ adm:putc ( c -- ) - ein zeichen in datei schreiben +ifnot: adm:putc +: adm:putc + 07 adm:fkt!b! ; + +\ adm:eof ( -- eof ) - abfrage ob end of file erreicht ist +ifnot: adm:eof +: adm:eof + 1E adm:fkt!b@ ; + +\ adm:getblk ( adr cnt -- ) - datenblock aus datei lesen + +\ adm:putblk ( adr cnt -- ) - datenblock in datei schreiben + +\ adm:seek ( pos -- ) - position in datei setzen +: adm:seek + 0A adm:fkt!l! ; + +\ adm:fattrib ( nr -- attrib ) - dateiattribut abfragen +ifnot: adm:fattrib +: adm:fattrib + 0B adm:fkt!b!l@ ; + +\ adm:volname ( -- ) - name des volumes im pad ablegen +ifnot: adm:volname +: adm:volname + 0C adm:fkt!s@ ; + +\ adm:checkmounted ( -- t/f ) +ifnot: adm:checkmounted +: adm:checkmounted + 0D adm:fkt!b@ ; + +\ adm:checkopen ( -- t/f ) +ifnot: adm:checkopen +: adm:checkopen + 0E adm:fkt!b@ ; + +\ adm:checkused ( -- used ) - anzahl benutzte sektoren +ifnot: adm:checkused +: adm:checkused + 0F adm:fkt!l@ ; + +\ adm:checkfree ( -- free ) - anzahl freie sektoren +ifnot: adm:checkfree +: adm:checkfree + 10 adm:fkt!l@ ; + +\ adm:newfile ( cstr -- ) - neue datei erstellen +ifnot: adm:newfile +: adm:newfile + 11 adm:fkt!s!b@ ; + +\ adm:newdir ( cstr -- ) - neues verzeichnis erstellen +ifnot: adm:newdir +: adm:newdir + 12 adm:fkt!s!b@ ; + +\ adm:del ( cstr -- ) - datei/verzeichnis löschen +ifnot: adm:del +: adm:del + 13 adm:fkt!s!b@ ; + +\ adm:rename ( cstr1.fn1 cstr2.fn2 -- ) +ifnot: adm:rename +: adm:rename + 14 adm:fkt!s!s!b@ ; + +\ adm:chattrib ( cstr1.fn cstr2.attrib -- ) +ifnot: adm:chattrib +: adm:chattrib + 15 adm:fkt!s!s!b@ ; + +\ adm:chdir ( cstr -- err ) - verzeichnis öffnen +ifnot: adm:chdir +: adm:chdir + 16 adm:fkt!s!b@ ; + +\ adm:format ( cstr.label -- ) - medium formatieren +ifnot: adm:format +: adm:format + 17 adm:fkt!s!b@ ; + +\ adm:unmount ( -- err ) - medium unmounten +ifnot: adm:unmount +: adm:unmount + 18 adm:fkt!b@ ; + +\ marker-funktionen + +ifnot: adm:dmact \ ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ .err ; +ifnot: adm:dmset \ ( dmnr -- ) - marker setzen +: adm:dmset 1A adm:fkt!b! ; +ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen +: adm:dmget 1B adm:fkt!b!l@ ; +ifnot: adm:dmclr \ ( dmnr -- ) - marker löschen +: adm:dmclr 1C adm:fkt!b! ; +ifnot: adm:dmput \ ( dm dmnr -- ) - marker schreiben +: adm:dmput 1D adm:fkt!b!l! ; + diff --git a/forth/sfx.lib b/forth/sfx.lib new file mode 100644 index 0000000..3c01222 --- /dev/null +++ b/forth/sfx.lib @@ -0,0 +1,93 @@ + +hex + +ifnot: lib:sfx +: lib:sfx ; + +\ kommandoformen + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b!b! \ ( b b fkt -- ) +: adm:fkt!b!b! b[ [a!] [a!] [a!] ]b ; + +ifnot: adm:fkt!b!64b! \ ( ptr b fkt -- ) +: adm:fkt!b!64b! b[ [a!] [a!] + 31 0 do dup i + C@ [a!] loop drop ]b ; + +\ sfx-funktionen + +\ sfx:fire( chan slot -- ) - sfx abspielen +\ slot - $00..$0f nummer der freien effektpuffer +\ slot - $f0..f5 vordefinierte effektslots +\ chan - 0/1 stereokanal +\ vordefinierte effekte +\ &f0 - warnton +\ $f1 - signalton +\ $f2 - herzschlag schnell +\ $f3 - herzschlag langsam +\ $f4 - telefon +\ $f5 - phaser :) +\ $f6 - pling +\ $f7 - on +\ $f8 - off +ifnot: sfx:fire +: sfx:fire 6B adm:fkt!b!b! ; + +\ ( ptr slot -- ) - sfx setzen +\ slot - $00..$0f nummer der freien effektpuffer +\ ptr - zeiger auf 32 byte effektdaten +\ +\ struktur der effektdaten: +\ +\ [wav ][len ][freq][vol ] grundschwingung +\ [lfo ][lfw ][fma ][ama ] modulation +\ [att ][dec ][sus ][rel ] hüllkurve +\ [seq ] (optional) +\ +\ [wav] wellenform +\ 0 sinus (0..500hz) +\ 1 schneller sinus (0..1khz) +\ 2 dreieck (0..500hz) +\ 3 rechteck (0..1khz) +\ 4 schnelles rechteck (0..4khz) +\ 5 impulse (0..1,333hz) +\ 6 rauschen +\ [len] tonlänge $0..$fe, $ff endlos +\ [freq] frequenz $00..$ff +\ [vol] lautstärke $00..$0f +\ +\ [lfo] low frequency oscillator $ff..$01 +\ [lfw] low frequency waveform +\ $00 sinus (0..8hz) +\ $01 fast sine (0..16hz) +\ $02 ramp up (0..8hz) +\ $03 ramp down (0..8hz) +\ $04 square (0..32hz) +\ $05 random +\ $ff sequencer data (es folgt eine sequenzfolge [seq]) +\ [fma] frequency modulation amount +\ $00 no modulation +\ $01..$ff +\ [ama] amplitude modulation amount +\ $00 no modulation +\ $01..$ff +\ [att] attack $00..$ff +\ [dec] decay $00..$ff +\ [sus] sustain $00..$ff +\ [rel] release $00..$ff +ifnot: sfx:setslot +: sfx:setslot + 6C adm:fkt!b!64b! ; + +\ sfx:keyoff ( chan -- ) - release-phase einleiten +ifnot: sfx:keyoff +: sfx:keyoff + 6D adm:fkt!b! ; + +\ sfx:stop ( chan -- ) +ifnot: sfx:stop +: sfx:stop + 6E adm:fkt!b! ; + diff --git a/forth/splay.mod b/forth/splay.mod new file mode 100644 index 0000000..eb6e485 --- /dev/null +++ b/forth/splay.mod @@ -0,0 +1,116 @@ + +\ achtung: vor verwendung muss der administra-code mit sidcog +\ geladen werden: +\ sys tools.f +\ sys splay.f <--- sid-player laden +\ aload admsid.adm <--- administra-code mit sidcog laden +\ splay xyz.dmp <--- sid-datei abspielen + + +hex + +ifnot: mod:splay +: mod:splay ; + +\ kommandoformen + +ifnot: adm:fkt! \ ( fkt -- ) +: adm:fkt! b[ [a!] ]b ; + +ifnot: adm:fkt!b! \ ( b fkt -- ) +: adm:fkt!b! b[ [a!] [a!] ]b ; + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ 0 [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!s! \ ( s fkt -- ) +: adm:fkt!s! b[ [a!] [a.s!] ]b ; + +ifnot: adm:fkt!s!b@ \ ( s fkt -- err ) +: adm:fkt!s! b[ [a!] [a.s!] [b@] ]b ; + +ifnot: adm:fkt!b!l@ \ ( b fkt -- l ) +: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ; + +\ dm-funktionen +ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen +: adm:dmget 1B adm:fkt!b!l@ ; + +\ adm:dmact ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ drop ; + +\ adm-funktionen + +\ adm:aload ( cstr -- ) - neuen administra-code laden +ifnot: adm:aload +: adm:aload + 60 adm:fkt!s! ; + +\ tools + +ifnot: aload +: aload + mount? parsenw dup + if 1 adm:dmact adm:aload 0 else drop 23 then .err ; + +\ sid-funktionen + +ifnot: sid:play +: sid:play \ ( cstr -- err ) + 9E adm:fkt!s!b@ ; + +ifnot: sid:stop +: sid:stop \ ( -- ) + 9F adm:fkt! ; + +ifnot: sid:status +: sid:status \ ( -- status ) + A1 adm:fkt!b@ ; + +ifnot: sid:mute +\ 1 - sid1 +\ 2 - sid2 +\ 3 - sid1 & sid2 +: sid:mute \ ( sidnr -- ) + A3 adm:fkt!b! ; + +\ send? ( -- t/f ) +ifnot: send? +: send? + begin 50 delms key? dup if key drop then sid:status 0= or + until ; + +\ (splay) ( cstr -- ) +ifnot: (splay) +: (splay) \ ( cstr -- ) + ." Datei : " dup .cstr cr sid:play .err + send? sid:stop 3 sid:mute adm:close drop ; + +\ files? ( -- cnt ) - anzahl dateien im dir +ifnot: files? +: files? + adm:diropen + 0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ; + +\ filenr? ( nr -- ) +ifnot: filenr? +: filenr? + adm:diropen + 0 do adm:nextfile drop loop ; + +\ splay name.dmp ( -- ) - sid-datei abspielen +ifnot: splay +: splay + parsenw (splay) ; + +\ sdirplay ( -- ) - gesamtes verzeichnis abspielen +\ im verzeichnis dürfen nur sid-dateien sein! +ifnot: sdirplay +: sdirplay + files? dup ." Dateien : " . cr + 0 do i dup 1 + . 3 + filenr? pad (splay) loop padbl ; + +ifnot: smute +: smute + sid:stop 3 sid:mute ; + \ No newline at end of file diff --git a/forth/tools.mod b/forth/tools.mod new file mode 100644 index 0000000..4d74e6f --- /dev/null +++ b/forth/tools.mod @@ -0,0 +1,152 @@ + +hex + +ifnot: mod:tools +: mod:tools ; + +\ kommandoformen +ifnot: adm:fkt!b!l@ \ ( b fkt -- l ) +: adm:fkt!b!l@ b[ [a!] [a!] [a.l@] ]b ; +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; +ifnot: adm:fkt!s! \ ( s fkt -- ) +: adm:fkt!s! b[ [a!] [a.s!] ]b ; + +\ dm-funktionen +ifnot: adm:dmget \ ( dmnr -- dm ) - marker lesen +: adm:dmget 1B adm:fkt!b!l@ ; + +ifnot: adm:dmact \ adm:dmact ( dmnr -- ) - marker aktivieren +: adm:dmact 19 adm:fkt!b!b@ drop ; + +\ adm-funktionen + +\ adm:aload ( cstr -- ) - neuen administra-code laden +ifnot: adm:load +: adm:load + 60 adm:fkt!s! ; + +\ bel-funktionen + +\ bel:load ( cstr -- ) - bellatrix-code laden +\ achtung: die gesamte loader-operation ist eine atomare +\ operation über alle drei propellerchips, kann also auch +\ nicht aufgetrennt werden! +ifnot: bel:load +: bel:load + 52 adm:open .err \ datei öffnen + b[ + 0 [b!] 63 [b!] \ bella-loader starten + 10 0 do 06 [a!] [a@] [b!] loop \ header einlesen + 0A [a!] 0 [a.l!] \ 0 adm:seek + [b@] <8 [b@] or \ dateilänge empfangen + 0 do 06 [a!] [a@] [b!] loop \ datei senden + ]b + adm:close .err \ datei schließen +; + +\ ------------------------------------ mod:tools + +ifnot: aload +: aload \ name ( -- ) - administra-code laden + mount? parsenw dup + if adm:load 0 else drop 23 then .err ; + +ifnot: bload +: bload \ name ( -- ) - bellatrix-code laden + mount? parsenw dup + if bel:load 0 else drop 23 then .err ; + +ifnot: .dmstatus \ ( dm -- ) - ausgabe marker-status +: .dmstatus -1 = if ." frei" else ." gesetzt" then cr ; + +ifnot: dm? +: dm? + ." [root] : " 0 adm:dmget .dmstatus + ." [sys ] : " 1 adm:dmget .dmstatus + ." [usr ] : " 2 adm:dmget .dmstatus + ." [ A ] : " 3 adm:dmget .dmstatus + ." [ B ] : " 4 adm:dmget .dmstatus + ." [ C ] : " 5 adm:dmget .dmstatus ; + +\ open name ( -- ) - datei lesend öffnen und auf fehler prüfen +ifnot: open +: open + mount? parsenw dup + if 52 adm:open else drop 23 then .err ; + +\ close ( -- ) - geöffnete datei schließen +ifnot: close +: close + adm:close .err ; + +\ (cat) ( -- ) - alle zeichen der geöffneten datei ab +\ lesemarke auf ausgabekanal bis zum eof ausgeben +ifnot: (cat) +: (cat) begin adm:getc emit adm:eof until ; + +\ cat name ( -- ) - datei "name" komplett ausgeben +ifnot: cat +: cat open (cat) close ; + +\ nextline ( -- ) - ausgabe der nächsten textzeile aus der +\ geöffneten datei +ifnot: nextline +: nextline + begin adm:getc dup emit 0d = adm:eof or until ; + +\ nextlines ( n -- ) - ausgabe von n zeilen +ifnot: nextlines +: nextlines + 0 do adm:eof 0= if nextline then loop ; + +\ less name ( -- ) - zeilenweise ausgabe der datei +ifnot: less +: less + open begin 10 nextlines key 71 = adm:eof or until close ; + +\ #C ( c1 -- ) prepend the character c1 to the number +\ currently being formatted +ifnot: #C +: #C -1 >out W+! pad>out C! ; + +\ .cogch ( n1 n2 -- ) print as x(y) +ifnot: .cogch +: .cogch <# 29 #C # 28 #C drop # #> .cstr ; + +\ j ( -- n1 ) the second most current loop counter +ifnot: j +: j _rsptr COG@ 5 + COG@ ; + +\ cog? ( -- ) +ifnot: cog? +: cog? + 8 0 do ." Cog:" i dup . ." #io chan:" + dup cognchan . cogstate C@ + dup 4 and if version W@ .cstr then + dup 10 and if i cognumpad version W@ C@ over C@ - + spaces .cstr then + 14 and if i cogio i cognchan 0 do + i 4* over + 2+ W@ dup 0= if drop else + space space j i .cogch ." ->" io>cogchan .cogch + then + loop +drop then cr loop ; + +\ jede erweiterung legt ein wort als startmarke +\ nmit folgendem namen an: +\ mod:xxx - softwaremodule +\ drv:xxx - treiber +\ lib:xxx - bibliotheken +\ so kann mit den folgenden kommandos eine schnelle liste der +\ vorhandenen erweiterungen abgerufen und mit forget +\ aus dem system entfernt werden + +\ mod? ( -- ) - anzeige der module +ifnot: mod? +: mod? c" mod:" _words ; + +\ lib? ( -- ) - anzeige der bibliotheken +ifnot: lib? +: lib? c" lib:" _words ; + diff --git a/forth/v1.mod b/forth/v1.mod new file mode 100644 index 0000000..7b0b8cd --- /dev/null +++ b/forth/v1.mod @@ -0,0 +1,325 @@ + +: mod:vortrag ; + +24 constant rows +64 constant cols + +wvariable lcol 7 lcol W! + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ [a!] [a@] ]b ; + +ifnot: bel:char \ ( b -- ) +: bel:char b[ [b!] ]b ; +ifnot: bel:ctrl!b! \ ( b ctrl -- ) +: bel:ctrl!b! b[ 0 [b!] 3 [b!] [b!] [b!] ]b ; +ifnot: bel:fkt!b!b! \ ( b b fkt -- ) +: bel:fkt!b!b! b[ 0 [b!] [b!] [b!] [b!] ]b ; + +ifnot: scr:bs \ ( -- ) - backspace +: scr:bs 08 bel:char ; +ifnot: scr:tab \ ( -- ) - tabulator +: scr:tab 09 bel:char ; +ifnot: scr:pos1 \ ( -- ) - cursor an zeilenanfang +: scr:pos1 03 bel:char ; +ifnot: scr:setcol \ ( colnr -- ) - farbe wählen 0..15 +: scr:setcol 06 bel:ctrl!b! ; +ifnot: scr:sline \ ( row -- ) - anfangszeile scrollbereich +: scr:sline 07 bel:ctrl!b! ; +ifnot: scr:setx \ ( x -- ) - cursor position x setzen +: scr:setx 02 bel:ctrl!b! ; +ifnot: scr:sety \ ( y -- ) - cursor position y setzen +: scr:sety 03 bel:ctrl!b! ; +ifnot: scr:curon \ ( -- ) - cursor anschalten +: scr:curon 04 bel:char ; +ifnot: scr:curoff \ ( -- ) - cursor abschalten +: scr:curoff 05 bel:char ; +ifnot: scr:logo \ ( y x -- ) - hive logo +: scr:logo 5 bel:fkt!b!b! ; + +\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten +\ sfkt: +\ 0: hss-engine abschalten +\ 1: hss-engine anschalten +\ 2: dac-engine abschalten +\ 3: dac-engine anschalten +\ sstat - status/cognr startvorgang +ifnot: adm:setsound +: adm:setsound + 5C adm:fkt!b!b@ ; + +\ wav:start ( cstr -- err ) +ifnot: wav:start +: wav:start + 96 adm:fkt!s!b@ ; + +\ wav:stop ( -- ) +ifnot: wav:stop +: wav:stop + 97 adm:fkt!b@ drop ; + +\ won +ifnot: won +: won + 0 adm:setsound 3 adm:setsound 2drop ; + +\ woff +ifnot: woff +: woff + 2 adm:setsound 1 adm:setsound 2drop ; + +: lcol@ lcol W@ ; \ ( -- col ) + +: lines \ ( n -- ) + 0 do cr loop ; + +: waitkey + scr:curoff cr key drop scr:bs scr:bs scr:bs scr:curon ; + +: nextpage + scr:curoff scr:pos1 lcol@ spaces ." -->" key drop scr:bs scr:bs scr:bs scr:curon ; + +: .head \ ( -- ) + 4 scr:setcol scr:pos1 lcol@ spaces ; + +: .bullet \ ( -- ) + 0 scr:setcol scr:pos1 lcol@ spaces 0f emit space ; + +: .number \ ( n -- n ) + 0 scr:setcol scr:pos1 lcol@ spaces dup . 1+ + 2e emit space ; + +: .line \ ( -- ) + cr 0 scr:setcol scr:pos1 lcol@ 2+ spaces ; + +: .sub \ ( -- ) + 0 scr:setcol scr:pos1 lcol@ 2+ spaces ; + +wvariable xpos 1 xpos W! +wvariable ypos 1 ypos W! + +: pos! \ ( x y -- ) + ypos W! xpos W! ; + +: pos@ \ ( -- x y ) + xpos W@ ypos W@ ; + +: nextline + ypos W@ 1+ ypos W! ; + +: move \ ( x y -- ) + 1 delms pos@ scr:sety scr:setx ; + + +: btop0 \ ( -- ) + move 9f emit 6 0 do 90 emit loop 9e emit nextline ; + +: bbot0 \ ( -- ) + move 9d emit 6 0 do 90 emit loop 9c emit nextline ; + +: btop1 \ ( -- ) + move 2 spaces 9f emit 6 0 do 90 emit loop 9e emit nextline ; + +: bbot1 \ ( -- ) + move 2 spaces 9d emit 6 0 do 90 emit loop 9c emit nextline ; + +: bmid0 \ ( -- ) + move 91 emit ." COG " 95 emit 90 emit bb emit nextline + move 91 emit ." " 95 emit 90 emit aa emit nextline ; + +: bmid1 \ ( -- ) + move a9 emit 90 emit 94 emit ." COG " 91 emit nextline + move ba emit 90 emit 94 emit ." " 91 emit nextline ; + +: bmid2 \ ( -- ) + move a9 emit 90 emit 94 emit ." SER " + 95 emit 90 emit bb emit ." [TERMINAL]" nextline + move ba emit 90 emit 94 emit ." " 91 emit nextline ; + +: bmid3 \ ( -- ) + move a9 emit 90 emit 94 emit ." VGA " + 95 emit 90 emit bb emit ." [BELLATRIX]" nextline + move ba emit 90 emit 94 emit ." KBD " 91 emit nextline ; + +: bmid4 \ ( -- ) + move 91 emit ." COG " 95 emit 90 emit bb emit + ." Zeichenausgabekanal (emit)" nextline + move 91 emit ." " 95 emit 90 emit aa emit + ." Zeicheneingabekanal (key)" nextline ; + +: cog0 \ ( x y -- ) + 0 scr:setcol pos! btop0 bmid0 bbot0 ; + +: cog1 \ ( x y -- ) + 0 scr:setcol pos! btop1 bmid1 bbot1 ; + +: cog3 \ ( x y -- ) + 0 scr:setcol pos! btop0 bmid4 bbot0 ; + +: cogext \ ( x y -- ) + 0 scr:setcol pos! btop1 bmid2 bbot1 ; + +: cogint \ ( x y -- ) + 0 scr:setcol pos! btop1 bmid3 bbot1 ; + +: drvser + 0 scr:setcol 2dup cog0 swap a + swap cogext ; + +: drvint + 0 scr:setcol 2dup cog0 swap a + swap cogint ; + +: p0 + 0 scr:sline cls 5 lines + 14 1c scr:curoff scr:logo won c" woodz.wav" wav:start drop + key drop scr:curon wav:stop woff ; + +: i1 + 0 scr:sline cls 3 lines + .head ." Implementierungsvarianten" cr waitkey + .bullet ." Forth-Diamond: Master & Slaves = PropForth" waitkey cr + .sub ." Nachteil: Programmierung aller Treiber in Forth" waitkey cr + .bullet ." Forth-Spin: Forth mit SPIN-Interface" waitkey cr + .sub ." Vorteil: Nutzung fertiger Treiber" waitkey + .sub ." Nachteil: hoher Ressourcenverbrauch" waitkey cr + .bullet ." Forth-Funktionskomplexe: " cr cr + .sub ." Master = Forth" cr + .sub ." Slaves = Spin-Funktionsbibliotheken" cr + .sub ." Interface Forth <--> Spin = 8Bit-Bus" cr cr + nextpage ; + +: i2 + 0 scr:sline cls 3 lines + .head ." Implementierungsvarianten" cr cr + .bullet ." Forth-Funktionskomplexe: " cr cr + .sub ." Master = Forth" cr + .sub ." Slaves = Spin-Funktionsbibliotheken" cr + .sub ." Interface Forth <--> Spin = 8Bit-Bus" cr waitkey + .bullet ." Nachteile:" cr cr + .sub ." Spin --> Compiler noch auf Host" cr waitkey + .bullet ." Vorteile:" cr cr + .sub ." Code ist schon vorhanden (TriOS)" waitkey + .sub ." Gegenseitige Befruchtung von Forth & TriOS" waitkey + .sub ." Maximale Ressourcen für Forth im Master" waitkey + .sub ." Spin-Code kann später auch durch Forth ersetzt werden" cr + nextpage ; + +: i3 + 0 scr:sline cls 3 lines + .head ." Ablauf der Implementierung" cr waitkey + .bullet ." Ausgangslage: " cr cr + .sub ." Forth mit Terminalzugriff" cr waitkey + .bullet ." Plan:" cr cr + .sub ." 1. Busroutine um auf Slaves zuzugreifen" waitkey + .sub ." 2. Integration VGA/Keyboard/SD-Card" waitkey + .sub ." 3. Autostart" cr cr + nextpage ; + + +: p1 + 0 scr:sline cls 1 lines + .head ." Buszugriff" cr cr + .bullet ." ! ( n adr -- ) store - Wert im RAM speichern" cr + .bullet ." @ ( adr -- n ) fetch - Wert aus RAM lesen" cr waitkey + .bullet ." c! c@ p! p@ - Abwandlungen der Grundform" cr waitkey + .bullet ." s! ( c adr -- ) - Byte an Slave senden" cr + .bullet ." s@ ( adr -- c ) - Byte von Slave empfangen" cr waitkey + .bullet ." b! ( c -- ) - Byte an Bellatrix senden" cr + .bullet ." b@ ( -- c ) - Byte von Bellatrix empfangen" cr + .bullet ." a! ( c -- ) - Byte an Administra senden" cr + .bullet ." a@ ( -- c ) - Byte von Administra empfangen" cr cr + .head ." Beispiele :" cr cr + .bullet ." 01 b! - Bildschirm löschen" waitkey + .bullet ." : cls 01 b! ; " waitkey + .bullet ." : bel:key 0 b! 2 b! b@ ; \ ( -- key )" cr + nextpage ; + +: p2 + 0 scr:sline cls 5 lines + .head ." IO-Kanäle/Pipes" cr waitkey + 9 8 cog3 key drop + 9 c cog3 + .line ." ..." + 9 11 cog3 + cr cr + nextpage ; + +: p3 + 0 scr:sline cls 5 lines + .head ." Serieller Treiber" cr cr + 9 8 drvser + 9 c cog3 + .line ." ..." + 9 11 cog3 + cr cr + nextpage ; + +: p4 + 0 scr:sline cls 5 lines + .head ." VGA/Keyboard-Treiber" cr cr + 9 8 drvser + 9 c drvint + .line ." ..." + 9 11 cog3 + cr cr + nextpage ; + +: p5 + 0 scr:sline cls 5 lines + .head ." Treiber: VGA" cr cr + 9 8 drvint cr + .line ." : drv-vga " + .line ." begin" + .line ." key?" + .line ." if key b! then" + .line ." 0 until ;" + cr cr + nextpage ; + +: p6 + 0 scr:sline cls 5 lines + .head ." Treiber: Keyboard" cr cr + 9 8 drvint cr + .line ." : drv-key" + .line ." begin" + .line ." bel:keystat" + .line ." if bel:key emit then" + .line ." 0 until ;" + cr cr + nextpage ; + +: p7 + 0 scr:sline cls 5 lines + .head ." Treiber: Gesamt" cr cr + 9 8 drvint cr + .line ." : drv:int" + .line ." begin" + .line ." \ input --> vga/video" + .line ." 200 0 do key?" + .line ." if key b[ [b!] ]b then loop" + .line ." \ output <-- keyboard" + .line ." b[ [key?]" + .line ." if [key] [emit] then ]b" + .line ." 0 until ;" + cr cr + nextpage ; + +: p8 + 0 scr:sline cls 5 lines + .head ." Semaphoren" cr waitkey + .bullet ." : bel:key 0 b! 2 b! b@ ; \ ( -- key )" cr waitkey + .bullet ." : bel:key bon 0 b! 2 b! b@ boff ;" cr waitkey + .bullet ." [ ... ]" cr waitkey + .bullet ." b[ ... ]b" cr waitkey + .bullet ." : bel:key b[ 0 b! 2 b! b@ ]b ;" cr waitkey + .bullet ." : bel:key b[ 0 [b!] 2 [b!] [b@] ]b ;" cr waitkey + .bullet ." : bel:key 2 0 b[ [b!] [b!] [b@] ]b ;" cr cr + cr cr + nextpage ; + +: run + begin p0 i1 i2 i3 p1 p2 p3 p4 p5 p6 p7 p8 0 until ; + diff --git a/forth/wav.lib b/forth/wav.lib new file mode 100644 index 0000000..4198e23 --- /dev/null +++ b/forth/wav.lib @@ -0,0 +1,54 @@ + +hex + +ifnot: lib:wav +: lib:wav ; + +\ kommandoformen + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ [a!] [a@] ]b ; + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!l@l@ \ ( fkt -- l l ) +: adm:fkt!l@l@ b[ [a!] [a.l@] [a.l@] ]b ; + +\ wave-funktionen + +\ wav:start ( cstr -- err ) +ifnot: wav:start +: wav:start + 96 adm:fkt!s!b@ ; + +\ wav:stop ( -- ) +ifnot: wav:stop +: wav:stop + 97 adm:fkt!b@ drop ; + +\ wav:status ( -- status ) +ifnot: wav:status +: wav:status + 98 adm:fkt!b@ ; + +\ wav:leftvol ( vol -- ) +ifnot: wav:leftvol +: wav:leftvol + 99 adm:fkt!b! ; + +\ wav:rightvol ( vol -- ) +ifnot: wav:rightvol +: wav:rightvol + 9A adm:fkt!b! ; + +\ wav:pause ( -- ) +ifnot: wav:pause +: wav:pause + 9B adm:fkt!b@ drop ; + +\ wav:position ( -- len pos ) +ifnot: wav:position +: wav:position + 9C adm:fkt!l@l@ ; + diff --git a/forth/words.mod b/forth/words.mod new file mode 100644 index 0000000..c0165f3 --- /dev/null +++ b/forth/words.mod @@ -0,0 +1,16 @@ + +fl + +\ _words ( cstr -- ) prints the words in the forth dictionary starting with cstr, 0 prints all +: _words lastnfa +begin + 2dup swap dup if npfx else 2drop -1 then + if dup .strname space then + nfa>next dup 0= +until 2drop cr ; + +\ words ( -- ) prints the words in the forth dictionary, if the pad has another string following, with that prefix +: words parsenw _xwords ; + +: t1 1000 0 do i . loop ; +: t2 1000 0 do ." test " loop ; diff --git a/forth/work/bload.f b/forth/work/bload.f new file mode 100644 index 0000000..8eee6eb --- /dev/null +++ b/forth/work/bload.f @@ -0,0 +1,23 @@ + +fl + +hex + +\ metafunktionen + +: (bload) \ ( cstr -- ) - belatrix-code laden + + 52 adm:open .err \ datei öffnen + b[ + 0 [b!] 63 [b!] \ bella-loader starten + 10 0 do 06 [a!] [a@] [b!] loop \ header einlesen + 0A [a!] 0 [a.l!] \ 0 adm:seek + [b@] <8 [b@] or \ dateilänge empfangen + 0 do 06 [a!] [a@] [b!] loop \ datei senden + ]b + adm:close .err \ datei schließen +; + +: bload \ name ( -- ) - bellatrix-code laden + parsenw (bload) ; + diff --git a/forth/wplay.mod b/forth/wplay.mod new file mode 100644 index 0000000..faf878f --- /dev/null +++ b/forth/wplay.mod @@ -0,0 +1,93 @@ + +hex + +ifnot: mod:wplay +: mod:wplay ; + +\ kommandoformate + +ifnot: adm:fkt!s!b@ \ ( s fkt -- b ) +: adm:fkt!s!b@ b[ [a!] [a.s!] [a@] ]b ; + +ifnot: adm:fkt!b!b@ \ ( b fkt -- b ) +: adm:fkt!b!b@ b[ [a!] [a!] [a@] ]b ; + +ifnot: adm:fkt!b@ \ ( fkt -- b ) +: adm:fkt!b@ b[ [a!] [a@] ]b ; + +\ wave-funktionen + +\ wav:start ( cstr -- err ) +ifnot: wav:start +: wav:start + 96 adm:fkt!s!b@ ; + +\ wav:stop ( -- ) +ifnot: wav:stop +: wav:stop + 97 adm:fkt!b@ drop ; + +\ wav:status ( -- status ) +ifnot: wav:status +: wav:status + 98 adm:fkt!b@ ; + +\ adm-funktionen + +\ adm:setsound ( sfkt -- sstat ) - soundsystem verwalten +\ sfkt: +\ 0: hss-engine abschalten +\ 1: hss-engine anschalten +\ 2: dac-engine abschalten +\ 3: dac-engine anschalten +\ sstat - status/cognr startvorgang +ifnot: adm:setsound +: adm:setsound + 5C adm:fkt!b!b@ ; + + +\ metafunktionen + +\ won +ifnot: won +: won + 0 adm:setsound 3 adm:setsound 2drop ; + +\ woff +ifnot: woff +: woff + 2 adm:setsound 1 adm:setsound 2drop ; + +\ wend? ( -- t/f ) +ifnot: wend? +: wend? + begin 50 delms key? dup if key drop then wav:status 0= or until ; + +\ (wplay) ( cstr -- ) +ifnot: (wplay) +: (wplay) \ ( cstr -- ) + ." Datei : " dup .cstr cr wav:start .err wend? wav:stop ; + +\ wplay name ( -- ) +ifnot: wplay +: wplay + won parsenw (wplay) woff ; + +\ files? ( -- cnt ) - anzahl dateien im dir +ifnot: files? +: files? + adm:diropen + 0 begin adm:nextfile swap 1+ swap 0= until 3 - padbl ; + +\ filenr? ( nr -- ) +ifnot: filenr? +: filenr? + adm:diropen + 0 do adm:nextfile drop loop ; + +\ wdirplay ( -- ) - gesamtes verzeichnis abspielen +\ im verzeichnis dürfen nur wav-dateien sein! +ifnot: wdirplay +: wdirplay + won files? dup ." Dateien : " . cr + 0 do i dup 1 + . 3 + filenr? pad (wplay) loop padbl woff ; diff --git a/system/administra/admay/admay.spin b/system/administra/admay/admay.spin new file mode 100644 index 0000000..48784a6 Binary files /dev/null and b/system/administra/admay/admay.spin differ diff --git a/system/administra/admsid/admsid.spin b/system/administra/admsid/admsid.spin new file mode 100644 index 0000000..bcdc6ec Binary files /dev/null and b/system/administra/admsid/admsid.spin differ diff --git a/system/administra/aterm/Read Me.rtf b/system/administra/aterm/Read Me.rtf new file mode 100644 index 0000000..8e60f75 --- /dev/null +++ b/system/administra/aterm/Read Me.rtf @@ -0,0 +1,272 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;} +{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f379\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f380\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f382\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f383\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f386\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f387\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\f409\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f410\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f412\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f413\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\f416\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f417\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} +{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} +{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0; +\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \f31506\fs22 }{\*\defpap +\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 +\af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 \styrsid3755876 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused \sqformat Normal Table;}} +{\*\rsidtbl \rsid410870\rsid1726074\rsid3366185\rsid3755876\rsid3833722\rsid4740689\rsid5992232\rsid6245947\rsid8655232\rsid8809290\rsid11759436\rsid14891351\rsid15496811}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0 +\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author Kwabena W. Agyeman}{\operator Kwabena W. Agyeman}{\creatim\yr2010\mo1\dy8\hr16\min46}{\revtim\yr2010\mo1\dy8\hr17\min52}{\version5}{\edmins66}{\nofpages3}{\nofwords944}{\nofchars4608} +{\nofcharsws5541}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen +\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1 +\jexpand\viewkind1\viewscale102\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct +\asianbrkrule\rsidroot6245947\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0 +{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid3755876\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2 +\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang +{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\contextualspace \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 +\f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid6245947\charrsid6245947 FATEngine Beta Demo}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid6245947 +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6245947 Thank you for taking the time help test out the FATEngine}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 : a}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6245947 fully functional FAT16/32 file system + driver library. To help you get started working with this tool please refer to the rest of this document. +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid6245947\charrsid6245947 +\par System Configuration}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid6245947 +\par +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6245947\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6245947 +You will need to first edit the included spin files to match your system configuration so that you can test out the demo. If you have a DS1307 real time clock please attach it to the specified pins below. +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 \tab Open the RTCEnigne.spin file in}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6245947 this folder and change the pin numbers to match the pin numbers of where you}{\rtlch\fcs1 \af31507 \ltrch\fcs0 +\insrsid11759436 r}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6245947 DS1307 RTC is attached in the CON block at the top of the code. If you do not have a DS1307 RTC the included demo code will still function, however all time stamps will be invalid. + +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 +\par \tab Open the FATEnigne.spin file in this folder and change the pin numbers to match the pin numbers of where SD/SDHC/MMC Card is attached in the CON block at the top of the code. +\par +\par }\pard \ltrpar\ql \fi720\li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11759436\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 +Open the COMEngine.spin file in this folder and change the pin numbers to match the pin numbers of where Prop Plug is attached in the CON block at the top of the code.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6245947 +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 +\par Open the Demo.spin file in this folder and chang +e the baud rate to match the baud rate of the specified baud rate when using parallax serial terminal. Additionally please change the clock frequency to your system configuration at the top of the Demo.spin file to match your setup. +\par +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11759436\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid11759436 Serial Terminal +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 Pleas +e open parallax serial terminal and connect to the propeller chip using the specified baud rate you set in the Demo.spin file. The demo program waits 5 seconds to let you get ready before running. After this the demo program should display a welcome messa +ge and a \'93>_\'94 command cursor. +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid11759436 Serial Terminal Commands +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 The following is a complete list of commands that the serial terminal demo program will execute.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 + Please note that the max command length is 255 characters after which a buffer overflow error will occur. The serial terminal will recover from this error but your command will be discarded. }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 General Commands: +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 \'93clear\'94 - Clears the terminal screen. +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid3833722 +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 \'93echo\'94 - }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 Echoes}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 back whatever was typed}{\rtlch\fcs1 \af31507 \ltrch\fcs0 +\insrsid4740689 after the command.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid3833722 +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 \'93date\'94 - Returns the current date fetched from the DS1307 RTC. If you do not have the DS1307 RTC the date returned will be invalid. +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid3833722 +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4740689\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 \'93time\'94 + - Ask the user for all specified timing parameters to set the date on the DS1307 RTC. +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11759436\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 +\par File System Commands +\par +\par \'93mount\'94 - Mounts the specified partition on the SD Card for file system access. An SD card must be attached to the system or an error message will be displayed. A partition must be mounted for + any other commands to execute. Please un-mount the partition when finished. The check disk flag causes windows to run check disk o}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid3833722 n the SD Card if not un-mo +unted properly when the disk is plugged into a windows machine.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 +\par +\par \'93umount\'94 - Un-mounts the active partition allowing another to be mounted and + writes file system optimization data back to the disk. Additionally deactivates the rest of the file system functions the turns off any raised check disk flags. +\par +\par \'93df\'94 <}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid5992232 fast mode (f)> - Computes the count of free 512 byte sectors on the partition. Use the +fast mode flag (f) to ask the function to return previously computed values instead of computing new ones. If no previously computed values are available this function will compute them after which fast mode will be valid. Computing the free sector count +can take a long time.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid5992232 +\par \'93du\'94 - Computes the count of used 512 byte sectors on the partition. Use the fast mode flag (f) to ask the function to return previously computed values instead of computing new ones. If no previously computed values +are available this function will compute them after which fast mode will be valid. Computing the used sector count can take a long time. +\par +\par \'93ls\'94 - List all files and folders in the current directory with along with their last access date, last modification date, and creation date as well as their size and attributes. Directories have no size. Only files have size.}{ +\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid410870 The attributes letters mean:}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid5992232 R \endash Read Only, H \endash Hidden, S \endash System, A \endash Archive, }{\rtlch\fcs1 \af31507 \ltrch\fcs0 +\insrsid410870 and }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid5992232 D- Directory. +\par +\par \'93find\'94 - Verifies the specified file exist in the current directory. +\par +\par \'93cd\'94}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid5992232\charrsid5992232 }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid5992232 - Enters into the specified directory allowing file system access to all files within that directory. +\par +\par \'93attrib\'94 - Changes the attributes of the specified file or directory to the new specified attributes.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8655232 The new attributes are: }{\rtlch\fcs1 \af31507 \ltrch\fcs0 +\insrsid5992232 R \endash Read Only, H \endash Hidden, S \endash System, A \endash Archive. +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid15496811 \'93rename\'94 - Changes the specified file or directory\rquote s entry name to the new specified entry name. +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid5992232 \'93rm\'94 - Removes the specified file from the current directory or deletes any empty directory from the file system permanently. +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid15496811 +\par \'93mkfile\'94 - Makes a new file in the current directory with the specified name. +\par +\par \'93mkdir\'94 - Makes a new directory in the current directory with the specified name. +\par +\par \'93cat\'94 - Displays the contents of the specified file in either binary, hexadecimal, decimal, or ASCII characters.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8655232 The type flag can be:}{\rtlch\fcs1 \af31507 \ltrch\fcs0 +\insrsid15496811 B \endash Binary, D \endash Decimal, H \endash Hexadecimal, A \endash ASCII. +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8655232 +\par \'93test\'94 - Creates a temporary file to test read and write character and block performance of the driver}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid1726074 +. After which results are printed to the screen and the file temporary file is deleted.}{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid8655232 +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid8655232\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid8655232 That\rquote s all folks! +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11759436\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689 +\par +\par +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid4740689\charrsid11759436 +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436 +\par +\par }{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436\charrsid11759436 +\par }\pard \ltrpar\qj \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11759436\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436\charrsid11759436 +\par }\pard \ltrpar\ql \fi720\li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11759436\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11759436\charrsid11759436 +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid6245947\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid6245947\charrsid6245947 +\par }\pard \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\contextualspace {\rtlch\fcs1 \af31507 \ltrch\fcs0 \b\ul\insrsid6245947\charrsid6245947 +\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8 +72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7 +2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b +44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7 +065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000 +00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08 +84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc +52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353 +bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468 +656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c +070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7 +29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65 +312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8 +a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04 +98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c +94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471 +7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671 +9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1 +e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5 +193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1 +17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2 +8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6 +6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a +668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847 +bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e +16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b +5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0 +8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2 +c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966 +0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b +7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb +9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0 +088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf +8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26 +ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0 +28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6 +345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93 +b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30 +254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74 +68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24 +51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198 +720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528 +a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000 +000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000 +002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468 +656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000 +00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000 +00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9; +\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7; +\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000 +4d73786d6c322e534158584d4c5265616465722e352e30000000000000000000000e0000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdffffff04000000feffffff05000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff01000000ec69d9888b8b3d4c859eaf6cd158be0f0000000000000000000000004047 +ec51b590ca010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff0200000000000000000000000000000000000000000000004047ec51b590ca01 +4047ec51b590ca01000000000000000000000000c70033005a005100d4004700cd0056004b0055004300c700d1004a004400dc00d200c3004400c700d000c0003d003d000000000000000000000000000000000032000101ffffffffffffffff0300000000000000000000000000000000000000000000004047ec51b590 +ca014047ec51b590ca010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000 +00000000000000000000000000000000cf00000000000000010000000200000003000000feffffff0500000006000000070000000800000009000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3c623a536f757263657320786d6c6e733a623d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f6772617068792220786d6c6e733d +22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f677261706879222053656c65637465645374796c653d225c4150412e58534c22205374796c654e616d653d22415041222f3e0d0a00000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b44303530 +443639442d353536422d343032392d413743342d3930464343413330453743327d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c +64733a736368656d615265662064733a7572693d22687474703a2f2f736368656d61732e6f70656e500072006f007000650072007400690065007300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000200ffffffffffffffffffffffff000000000000 +0000000000000000000000000000000000000000000000000000000000000400000055010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f677261706879222f3e3c2f64733a736368656d61526566733e3c2f64733a6461746173746f +72654974656d3e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/system/administra/aterm/aterm.spin b/system/administra/aterm/aterm.spin new file mode 100644 index 0000000..44c6f95 Binary files /dev/null and b/system/administra/aterm/aterm.spin differ diff --git a/system/bellatrix/bel-htext/htext.spin b/system/bellatrix/bel-htext/htext.spin new file mode 100644 index 0000000..31bde38 Binary files /dev/null and b/system/bellatrix/bel-htext/htext.spin differ diff --git a/system/bellatrix/bel-htext/logo-hive-8x2.dat b/system/bellatrix/bel-htext/logo-hive-8x2.dat new file mode 100644 index 0000000..109ef59 Binary files /dev/null and b/system/bellatrix/bel-htext/logo-hive-8x2.dat differ diff --git a/system/bellatrix/bel-tv/tv.spin b/system/bellatrix/bel-tv/tv.spin new file mode 100644 index 0000000..a7f31d3 Binary files /dev/null and b/system/bellatrix/bel-tv/tv.spin differ diff --git a/system/license.spin b/system/license.spin new file mode 100644 index 0000000..c2b7622 Binary files /dev/null and b/system/license.spin differ diff --git a/system/regnatix/admtest.spin b/system/regnatix/admtest.spin new file mode 100644 index 0000000..977052d Binary files /dev/null and b/system/regnatix/admtest.spin differ diff --git a/system/regnatix/basic.spin b/system/regnatix/basic.spin new file mode 100644 index 0000000..d24fad7 Binary files /dev/null and b/system/regnatix/basic.spin differ diff --git a/system/regnatix/beltest.spin b/system/regnatix/beltest.spin new file mode 100644 index 0000000..7d9f92e Binary files /dev/null and b/system/regnatix/beltest.spin differ diff --git a/system/regnatix/charmap.spin b/system/regnatix/charmap.spin new file mode 100644 index 0000000..20083a3 Binary files /dev/null and b/system/regnatix/charmap.spin differ diff --git a/system/regnatix/eram.spin b/system/regnatix/eram.spin new file mode 100644 index 0000000..cc18dea Binary files /dev/null and b/system/regnatix/eram.spin differ diff --git a/system/regnatix/eram.txt b/system/regnatix/eram.txt new file mode 100644 index 0000000..92024bf --- /dev/null +++ b/system/regnatix/eram.txt @@ -0,0 +1,33 @@ + +cls - bildschirm löschen +bye - player beenden +d - anzeige eram +n - anzeige fortsetzen +m ... - ram modifizieren (byte) +l ... - ram modifizieren (long) +load - ladei datei in eram +sysvar - anzeige systemvariablen +rbas - basisadresse setzen +info - speicheraufteilung anzeigen +f - speicherbereich füllen (sysmod) +fu - speicherbereich füllen (usermod) +xinit - rdisk initialisieren +xnew - neue datei anlegen +xhead - header anzeigen +xdir - dir anzeigen +xdel - datei löschen +xren - datei umbenennen +xftab - ftab anzeigen +xopen - datei öffnen +xseek - zeiger positionieren +xput - zeichen in datei schreiben +xget - zeichenh aus datei lesen +xwrite - wert schreiben +xread - wert lesen +xload - datei in rd laden +xsave - datei fn1 auf sd fn2 speichern + +bas - basisadresse +end - endadresse (startsysvar) +sys - start systemvariablen +rd: - daten datei diff --git a/system/regnatix/flash.spin b/system/regnatix/flash.spin new file mode 100644 index 0000000..9dc2aa9 Binary files /dev/null and b/system/regnatix/flash.spin differ diff --git a/system/regnatix/flash.txt b/system/regnatix/flash.txt new file mode 100644 index 0000000..cd9f657 --- /dev/null +++ b/system/regnatix/flash.txt @@ -0,0 +1,10 @@ +/? : Hilfe +/fh : Datei in HI-ROM flashen +/fl : Datei in LO-ROM flashen +/dh : Dump HI-ROM +/dl : Dump LO-ROM +/vh : Vergleich Datei <--> HI-ROM +/ch : HI-ROM löschen +/cl : LO-ROM löschen +/sh : HI-ROM speichern +/sl : LO-ROM speichern diff --git a/system/regnatix/fterm.spin b/system/regnatix/fterm.spin new file mode 100644 index 0000000..eeb3dc0 Binary files /dev/null and b/system/regnatix/fterm.spin differ diff --git a/system/regnatix/hplay.spin b/system/regnatix/hplay.spin new file mode 100644 index 0000000..d847b7e Binary files /dev/null and b/system/regnatix/hplay.spin differ diff --git a/system/regnatix/hplay.txt b/system/regnatix/hplay.txt new file mode 100644 index 0000000..78a0da2 --- /dev/null +++ b/system/regnatix/hplay.txt @@ -0,0 +1,7 @@ +/? : hilfetext +/p name.wav : hss-datei abspielen +/d : verzeichnis abspielen +/s : wiedergabe stoppen +/t : anzeige trackerliste +/r : anzeige engine-register +/i : anzeige interface-register diff --git a/system/regnatix/keycode.spin b/system/regnatix/keycode.spin new file mode 100644 index 0000000..7f707af Binary files /dev/null and b/system/regnatix/keycode.spin differ diff --git a/system/regnatix/perplex.spin b/system/regnatix/perplex.spin new file mode 100644 index 0000000..e5c88b6 Binary files /dev/null and b/system/regnatix/perplex.spin differ diff --git a/system/regnatix/perplex.txt b/system/regnatix/perplex.txt new file mode 100644 index 0000000..1ec44d1 --- /dev/null +++ b/system/regnatix/perplex.txt @@ -0,0 +1,7 @@ +open - plexus öffnen +close - plexus schliessen +put - zeichen zu plexus senden +get - zeichen von plexus empfangen +testout - werte an port ausgeben +testin - eingangswerte port anzeigen +scan - 0..anz plexus abfragen \ No newline at end of file diff --git a/system/regnatix/ramtest.spin b/system/regnatix/ramtest.spin new file mode 100644 index 0000000..b55b2f2 Binary files /dev/null and b/system/regnatix/ramtest.spin differ diff --git a/system/regnatix/regime.spin b/system/regnatix/regime.spin new file mode 100644 index 0000000..c3907f4 Binary files /dev/null and b/system/regnatix/regime.spin differ diff --git a/system/regnatix/regime.txt b/system/regnatix/regime.txt new file mode 100644 index 0000000..49e8fbf --- /dev/null +++ b/system/regnatix/regime.txt @@ -0,0 +1,57 @@ +help - diese hilfe + - bin/adm/bel-datei wird gestartet +mount - sd-card mounten +unmount - sd-card abmelden +dir wh - verzeichnis anzeigen +type - anzeige einer textdatei +aload - administra-code laden +bload - bellatrix-treiber laden +rload - regnatix-code laden +del - datei löschen +cls - bildschirm löschen +free - freier speicher auf sd-card +attrib ashr - attribute ändern +cd - verzeichnis wechseln +mkdir - verzeichnis erstellen +rename - datei/verzeichnis umbenennen +format - sd-card formatieren +reboot - hive neu starten +sysinfo - systeminformationen +color <0..7> - farbe wählen +cogs - belegung der cogs anzeigen +dmlist - anzeige der verzeichnis-marker +dm - in das entsprechende marker- + verzeichnis wechseln +dmset - setzt den entsprechenden marker + auf das aktuelle verzeichnis +dmclr - marker löschen +forth - forth starten + +marker: +r - root-verzeichnis +s - system-verzeichnis +u - user-verzeichnis +a/b/c - benutzerdefinierte verzeichnismarker +r, s, u-marker werden vom system automatisch gesetzt und +intern verwendet. + +RAMDISK: + +xload - datei in ram laden +xsave - datei aus ram speichern +xdir - verzeichnis im ram anzeigen +xrename - datei im ram umbenennen +xdel - datei im ram löschen +xtype - text im ram anzeigen + +EXTERNE KOMMANDOS: + +sysconf - systemeinstellungen +hplay - hss-player +wplay - wav-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 + diff --git a/system/regnatix/rom.spin b/system/regnatix/rom.spin new file mode 100644 index 0000000..25fa998 Binary files /dev/null and b/system/regnatix/rom.spin differ diff --git a/system/regnatix/sfxtool.spin b/system/regnatix/sfxtool.spin new file mode 100644 index 0000000..c0fb1cb Binary files /dev/null and b/system/regnatix/sfxtool.spin differ diff --git a/system/regnatix/splay.spin b/system/regnatix/splay.spin new file mode 100644 index 0000000..51485c9 Binary files /dev/null and b/system/regnatix/splay.spin differ diff --git a/system/regnatix/splay.txt b/system/regnatix/splay.txt new file mode 100644 index 0000000..5f2eb23 --- /dev/null +++ b/system/regnatix/splay.txt @@ -0,0 +1,8 @@ +/? : Hilfetext +/m name.dmp : DMP-Datei mono auf SID2 abspielen +/s name.dmp : DMP-Datei stereo auf beiden SIDs abspielen +/d : Verzeichnis wiedergeben + q - quit + n - next + p - pause + diff --git a/system/regnatix/sysconf.spin b/system/regnatix/sysconf.spin new file mode 100644 index 0000000..f1e07ac Binary files /dev/null and b/system/regnatix/sysconf.spin differ diff --git a/system/regnatix/sysconf.txt b/system/regnatix/sysconf.txt new file mode 100644 index 0000000..484e2f7 --- /dev/null +++ b/system/regnatix/sysconf.txt @@ -0,0 +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 \ No newline at end of file diff --git a/system/regnatix/time.spin b/system/regnatix/time.spin new file mode 100644 index 0000000..36f0d34 Binary files /dev/null and b/system/regnatix/time.spin differ diff --git a/system/regnatix/wplay.spin b/system/regnatix/wplay.spin new file mode 100644 index 0000000..f8daa73 Binary files /dev/null and b/system/regnatix/wplay.spin differ diff --git a/system/regnatix/wplay.txt b/system/regnatix/wplay.txt new file mode 100644 index 0000000..d2301d9 --- /dev/null +++ b/system/regnatix/wplay.txt @@ -0,0 +1,9 @@ +/? : Hilfetext +/p name.wav : WAV-Datei abspielen +/d : Verzeichnis wiedergeben + q - quit + n - next + p - pause +/l 0..100 : Lautstärke links +/r 0..100 : Lautstärke rechts +/i name.wav : Info zur Datei anzeigen diff --git a/system/regnatix/yplay.spin b/system/regnatix/yplay.spin new file mode 100644 index 0000000..0c2828a Binary files /dev/null and b/system/regnatix/yplay.spin differ diff --git a/system/regnatix/yplay.txt b/system/regnatix/yplay.txt new file mode 100644 index 0000000..03f0d0d --- /dev/null +++ b/system/regnatix/yplay.txt @@ -0,0 +1,8 @@ +Wiedergabe von YM-Dateien mittels AY-3-891X / YM2149 emulator + +/? : Hilfetext +/p name.YM : YM-Datei abspielen +/d : Verzeichnis wiedergeben + q - quit + n - next + p - pause diff --git a/system/sonstiges/BLUE.COL b/system/sonstiges/BLUE.COL new file mode 100644 index 0000000..0d8d9d8 --- /dev/null +++ b/system/sonstiges/BLUE.COL @@ -0,0 +1 @@ +<<<<ððððÀÀÀÀ0000<<<<üüüüÿ€ÿ€ÿÿ€€ˆˆˆˆ \ No newline at end of file diff --git a/system/sonstiges/BW.COL b/system/sonstiges/BW.COL new file mode 100644 index 0000000..ecbace2 Binary files /dev/null and b/system/sonstiges/BW.COL differ diff --git a/system/sonstiges/BWHALF.COL b/system/sonstiges/BWHALF.COL new file mode 100644 index 0000000..d23a6fe Binary files /dev/null and b/system/sonstiges/BWHALF.COL differ diff --git a/system/sonstiges/CHESS.COL b/system/sonstiges/CHESS.COL new file mode 100644 index 0000000..1bd21ce Binary files /dev/null and b/system/sonstiges/CHESS.COL differ diff --git a/system/sonstiges/PAR.COL b/system/sonstiges/PAR.COL new file mode 100644 index 0000000..6ead846 Binary files /dev/null and b/system/sonstiges/PAR.COL differ diff --git a/system/sonstiges/regime.txt b/system/sonstiges/regime.txt new file mode 100644 index 0000000..d2a673b --- /dev/null +++ b/system/sonstiges/regime.txt @@ -0,0 +1,56 @@ +help - diese hilfe + - bin/adm/bel-datei wird gestartet +mount - sd-card mounten +unmount - sd-card abmelden +dir wh - verzeichnis anzeigen +type - anzeige einer textdatei +aload - administra-code laden +bload - bellatrix-treiber laden +rload - regnatix-code laden +del - datei l?schen +cls - bildschirm l?schen +free - freier speicher auf sd-card +attrib ashr - attribute ?ndern +cd - verzeichnis wechseln +mkdir - verzeichnis erstellen +rename - datei/verzeichnis umbenennen +format - sd-card formatieren +reboot - hive neu starten +sysinfo - systeminformationen +color <0..7> - farbe w?hlen +cogs - belegung der cogs anzeigen +dmlist - anzeige der verzeichnis-marker +dm - in das entsprechende marker- + verzeichnis wechseln +dmset - setzt den entsprechenden marker + auf das aktuelle verzeichnis +dmclr - marker l”schen + +marker: +r - root-verzeichnis +s - system-verzeichnis +u - user-verzeichnis +a/b/c - benutzerdefinierte verzeichnismarker +r, s, u-marker werden vom system automatisch gesetzt und +intern verwendet. + +RAMDISK: + +xload - datei in ram laden +xsave - datei aus ram speichern +xdir - verzeichnis im ram anzeigen +xrename - datei im ram umbenennen +xdel - datei im ram l”schen +xtype - text im ram anzeigen + +EXTERNE KOMMANDOS: + +sysconf - systemeinstellungen +hplay - hss-player +wplay - wav-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 + diff --git a/system/sonstiges/test1.txt b/system/sonstiges/test1.txt new file mode 100644 index 0000000..15d01ca --- /dev/null +++ b/system/sonstiges/test1.txt @@ -0,0 +1,7 @@ + +"Die Blütenträume +Von Faltern, wie ich hörte, +So lautlos wie sie -" +Reikan + + diff --git a/system/sonstiges/test2.txt b/system/sonstiges/test2.txt new file mode 100644 index 0000000..72e62d4 --- /dev/null +++ b/system/sonstiges/test2.txt @@ -0,0 +1,115 @@ +Johann Wolfgang Goethe + +Der Zauberlehrling + +Hat der alte Hexenmeister +Sich doch einmal wegbegeben! +Und nun sollen seine Geister +Auch nach meinem Willen leben! +Seine Wort' und Werke +Merkt' ich und den Brauch, +Und mit Geistesstärke +Tu' ich Wunder auch. + +Walle! Walle +Manche Strecke, +Dass, zum Zwecke, +Wasser fließe +Und mit reichem, vollem Schwalle +Zu dem Bade sich ergieße. + +Und nun komm, du alter Besen! +Nimm die schlechten Lumpenhüllen! +Bist schon lange Knecht gewesen; +Nun erfülle meinen Willen! +Auf zwei Beinen stehe, +Oben sei ein Kopf, +Eile nun und gehe +Mit dem Wassertopf! + +Walle! Walle +Manche Strecke, +Dass, zum Zwecke, +Wasser fließe +Und mit reichem, vollem Schwalle +Zu dem Bade sich ergieße. + +Seht, er läuft zum Ufer nieder; +Wahrlich! ist schon an dem Flusse, +Und mit Blitzesschnelle wieder +Ist er hier mit raschem Gusse. +Schon zum zweiten Male! +Wie das Becken schwillt! +Wie sich jede Schale +Voll mit Wasser füllt! + +Stehe! Stehe! +Denn wir haben +Deiner Gaben +Voll gemessen! +Ach, ich merk' es! Wehe! Wehe! +Hab' ich doch das Wort vergessen! + +Ach, das Wort, worauf am Ende +Er das wird, was er gewesen. +Ach, er läuft und bringt behände! +Wärst du doch der alte Besen! +Immer neue Güsse +Bringt er schnell herein, +Ach! und hundert Flüsse +Stürzen auf mich ein. + +Nein, nicht länger +Kann ich's lassen; +Will ihn fassen. +Das ist Tücke! +Ach! nun wird mir immer bänger! +Welche Miene! Welche Blicke! + +Oh, du Ausgeburt der Hölle! +Soll das ganze Haus ersaufen? +Seh' ich über jede Schwelle +Doch schon Wasserströme laufen. +Ein verruchter Besen, +Der nicht hören will! +Stock, der du gewesen, +Steh doch wieder still! + +Willst's am Ende +Gar nicht lassen? +Will dich fassen, +Will dich halten +Und das alte Holz behände +Mit dem scharfen Beile spalten. + +Seht, da kommt er schleppend wieder! +Wie ich mich nun auf dich werfe, +Gleich, o Kobold, liegst du nieder; +Krachend trifft die glatte Schärfe! +Wahrlich, brav getroffen! +Seht, er ist entzwei! +Und nun kann ich hoffen +Und ich atme frei! + +Wehe! Wehe! +Beide Teile +Stehn in Eile +Schon als Knechte +Völlig fertig in die Höhe! +Helft mir, ach! ihr hohen Mächte! + +Und sie laufen! Nass und nässer +Wird's im Saal und auf den Stufen. +Welch entsetzliches Gewässer! +Herr und Meister! Hör' mich rufen! - +Ach, da kommt der Meister! +Herr, die Not ist groß! +Die ich rief, die Geister, +Werd' ich nun nicht los. + +In die Ecke, +Besen! Besen! +Seid's gewesen! +Denn als Geister +Ruft euch nur, zu seinem Zwecke, +Erst hervor der alte Meister." \ No newline at end of file