]> git.sur5r.net Git - cc65/commitdiff
Merge pull request #834 from jedeoric/master
authorOliver Schmidt <ol.sc@web.de>
Tue, 12 Feb 2019 16:51:24 +0000 (17:51 +0100)
committerGitHub <noreply@github.com>
Tue, 12 Feb 2019 16:51:24 +0000 (17:51 +0100)
Update telestrat target doc, add tgi_clear support for telestrat target, stratsed & telemon 2.4 vars added

asminc/telestrat.inc
doc/telestrat.sgml
libsrc/telestrat/tgi/telestrat-228-200-3.s
libsrc/telestrat/tgi/telestrat-240-200-2.s

index 9322ec1146c47c5c35666b9ed8b0c9b29b08bfcf..f2eb42ff473d521ee5b04fb66255c110270b0baa 100644 (file)
@@ -54,9 +54,18 @@ IRQSVY          := $23           ; Used to save Y when a BRK call occurs
 IRQSVP          := $24           ; Used to save P when a BRK call occurs
 
 ADSCR           := $26
+SCRNB           := $28           ; Id of the current window
+
+ADKBD           := $2A           ; Address ASCII conversion table
+
 
 PTR_READ_DEST   := $2C           ; Used for XFREAD and XWRITE only in TELEMON 3.x
 
+ADCLK           := $40           ; Address for clock display
+TIMEUS          := $42
+TIMEUD          := $44 
+
+
 HRSX            := $46
 HRSY            := $47
 
@@ -64,6 +73,9 @@ XLPRBI          := $48           ; Printer flag (b7)
 
 HRSX40          := $49
 HRSX6           := $4A
+
+ADHRS           := $4B           ; Hires screen address (word)
+
 HRS1            := $4D
 HRS2            := $4F
 HRS3            := $51
@@ -72,6 +84,8 @@ HRS5            := $55
 
 HRSFB           := $57
 
+VABKP1          := $58
+
 ; RS232T
 ; b0-b3 : speed 
 ;         1111 => 19200 bps  (please note that telestrat can't handle this speed without stopping all IRQ except ACIA's one)
@@ -103,6 +117,18 @@ RS232T          := $59
 ;       : 11 SPACE SENT, reception not tested
 
 RS232C          := $5A
+INDRS           := $5B
+
+ACC1E           := $60
+ACC1M           := $61
+
+ACC1S           := $65
+
+FLGMEN          := $68
+ADMEN           := $69
+
+FLSVS           := $89
+FLERR           := $8B
 
 VARLNG          := $8C
 VARAPL          := $D0
@@ -195,14 +221,20 @@ XDECAL           = $18
 
 XTEXT            = $19
 XHIRES           = $1A
+XEFFHI           = $1B          ; Clear hires screen
 XFILLM           = $1C
 XMINMA           = $1F
 XVARS            = $24          ; Only in TELEMON 3.x, in TELEMON 2.4, it's XNOMFI ($24)
 XCRLF            = $25          ; Jump a line and return to the beginning of the line
+XDECAY           = $26
 XFREAD           = $27          ; Only in TELEMON 3.x (bank 7 of Orix)
 XBINDX           = $28          ; Convert a number into hex and displays on channel 0
 XDECIM           = $29
 XHEXA            = $2A          ; Convert a number into hex
+
+XEDT             = $2D          ; Launch editor
+XINSER           = $2E
+
 XSCELG           = $2F          ; Search a line in editor mode
 XOPEN            = $30          ; Only in TELEMON 3.x (bank 7 of Orix)
 XECRPR           = $33          ; Displays prompt
@@ -212,7 +244,12 @@ XSCRSE           = $36
 XSCRNE           = $39          ; Load charset from rom to ram
 XCLOSE           = $3A          ; Only in TELEMON 3.x close file (bank 7 of Orix)
 XFWRITE          = $3B          ; Only in TELEMON 3.x write file (bank 7 of Orix)
-XWRCLK           = $3E          ; Update clock
+
+; Clock primitive
+XRECLK           = $3C          ; Reset clock
+XCLCL            = $3D          ; Close clock
+XWRCLK           = $3E          ; Displays clock in the adress in A & Y registers
+
 XSONPS           = $40          ; Send data to PSG register (14 values)
 XOUPS            = $42          ; Send Oups sound into PSG
 XPLAY            = $43          ; Play a sound
@@ -222,7 +259,17 @@ XZAP             = $46          ; Send Zap sound to PSG
 XSHOOT           = $47
 XMKDIR           = $4B          ; Create a folder. Only available in TELEMON 3.x (bank 7 of Orix)
 XRM              = $4D          ; Remove a folder or a file. Only available in TELEMON 3.x (bank 7 of Orix)
-XGOKBD           = $52 
+XGOKBD           = $52
+
+; Buffer management
+XECRBU           = $54          ; Write A or AY in the buffer
+XLISBU           = $55          ; Read A or AY in the buffer
+XTSTBU           = $56
+XVIDBU           = $57          ; Flush the buffer 
+XINIBU           = $58          ; Initialize the buffer X
+XDEFBU           = $59          ; Reset all value of the buffer
+XBUSY            = $5A          ; Test if the buffer is empty
+
 XMALLOC          = $5B          ; Only in TELEMON 3.x (bank 7 of Orix)
 XFREE            = $62          ; Only in TELEMON 3.x (bank 7 of Orix)
 XSOUT            = $67          ; Send accumulator value (A) to RS232, available in TELEMON 2.4 & 3.x : if RS232 buffer is full, the Oric Telestrat freezes
@@ -256,28 +303,83 @@ BUFTRV          := $100
 ; Page $200
 BNKST            := $200        ; Used to store signature of 8 bank (length : 8 bytes)
 TABDRV           := $208
+
+DRVDEF           := $20C
 FLGTEL           := $20D
 KOROM            := $20E        ; Used to compute the size of all rom bank. The result is store here. The value is in KB
 KORAM            := $20F        ; Used to compute the size of all ram bank. The result is store here. The value is in KB
+; Time management
 TIMED            := $210
 TIMES            := $211
 TIMEM            := $212
+TIMEH            := $213
+FLGCLK           := $214
+FLGCLK_FLAG      := $215 
+FLGCUR           := $216        ; Cursor management flag
+; screens position managements
+
+FLGCUR_STATE     := $217        ; Cursor state flag
+
 ADSCRL           := $218
 ADSCRH           := $21C
 SCRX             := $220
 SCRY             := $224
+
+SCRDX            := $228
+SCRFX            := $22C
+SCRDY            := $230
+SCRFY            := $234
+SCRBAL           := $238
+SCRBAH           := $23C
+SCRCT            := $240
+SCRCF            := $244
+FLGSCR           := $248
+CURSCR           := $24C
+
+HARD_COPY_HIRES  := $250        ; Hard copy vector
+
+SCRTXT           := $256
+SCRHIR           := $25C
+SCRTRA           := $262        ; 6 bytes lenfth
+
+; Keyboard management
+KBDCOL           := $268        ; 8 bytes length
+KBDFLG_KEY       := $270        ; 0 if no key pressed
+KBDVRR           := $272
+
 KBDVRL           := $273
 FLGKBD           := $275
 KBDFCT           := $276
 KBDSHT           := $278
+
+KBDKEY           := $279
 KBDCTC           := $27E
+LPRX             := $286
+LPRY             := $287
 LPRFX            := $288
 LPRFY            := $289
+FLGLPR           := $28A
+
+; Joysticks management
+FLGJCK           := $28C
+JCGVAL           := $28D
+JCDVAL           := $28E
+JCKTAB           := $29D
+
+
 HRSPAT           := $2AA        ; Hires pattern : it's used to draw pattern for a line or a circle
-ADIOB            := $2BE
+HRSERR           := $2AB
+
+IOTAB0           := $2AE
+IOTAB1           := $2B2
+IOTAB2           := $2B6
+IOTAB3           := $2BA
+ADIOB            := $2BE        ; 48 bytes length
 FLGRST           := $2EE
 CSRND            := $2EF
 VNMI             := $2F4
+ADIODB_VECTOR    := $2f7        ; 3 bytes length
+
 IRQVECTOR        := $2FA
 VAPLIC           := $2FD
 
@@ -310,6 +412,9 @@ MAX_BUFEDT_LENGTH=110
 CH376_DATA       := $340
 CH376_COMMAND    := $341
 
+; RAM overlays buffer
+BUFBUF           := $c080
+
 ; ---------------------------------------------------------------------------
 ; Stratsed vectors
 ; Stratsed is the main OS for Telestrat 
index 8d8aa23d26669335a09c47d339c88d9c3ccc0853..1f352607f97e8a4e2f062bfdc652d2ac91ddd5f0 100644 (file)
@@ -16,9 +16,9 @@ An overview over the Telestrat (Telemon 2.4 & Telemon 3.x : http://orix.oric.org
 
 <sect>Overview<p>
 
-This file contains an overview of the Telestrat runtime system as it comes with the
-cc65 C compiler. It describes the memory layout, Telestrat-specific header files,
-available drivers, and any pitfalls specific to that platform.
+This file contains an overview of the Telestrat runtime system as it comes 
+with the cc65 C compiler. It describes the memory layout, Telestrat-specific 
+header files, available drivers, and any pitfalls specific to that platform.
 
 Please note that Telestrat-specific functions are just mentioned here, they are
 described in detail in the separate <url url="funcref.html" name="function
@@ -26,17 +26,61 @@ reference">. Even functions marked as "platform dependent" may be available on
 more than one platform. Please see the function reference for more
 information.
 
+Oric Telestrat is the last Oric computer (Released in 1986, mainly in France).
+This computer is an Atmos with extra hardware: RS232, cardridge(banking system), 
+joysticks (2 ports) or mouse (on joystick port), FDC.
+
+Video chip, CPU, keyboard management, tape hardware are the same than Atmos.
+
+Telestrat can start in Atmos mode with Atmos Cardridge (which is only the atmos 
+Basic 1.1 ROM). 
+
+Telestrat can start in Sedoric (Atmos OS) and Atmos mode with Stratoric Cardridge.
+This Cardridge has 3 banks of 16KB of rom with:
+<itemize>
+<item>a Sedoric ROM.
+<item>a Basic 1.1 ROM (Atmos).
+<item>a Basic 1.0 ROM (Oric-1).
+</itemize>
+
+The main Telestrat's configuration is the Telemon/Hyperbasic Cardridge inserted 
+with Stratsed in floppy drive.
+
+Anyway, there is no way to load a tape file in Telemon/Hyperbasic mode without 
+alternative program.
+
+There is also no software to write a Stratsed dsk file on PC.
+
+This Telestrat target build an Orix binary file. But, in the future, it will be possible 
+to build a Stratsed disk. Orix uses the same systems calls than Telemon mode.
+
+That is why if you need to do software for telestrat target, you have the choice to:
+<itemize>
+<item>use cc65 Atmos target and start Telestrat in Atmos mode: A tape file is required.
+<item>use cc65 Atmos target and start Telestrat in Stratoric mode: A dsk file or tape file is required.
+<item>use cc65 Telestrat target and start Telestrat in Orix mode (see <url
+name="here" url="http://orix.oric.org/download/">).
+<item>use cc65 Telestrat target, remove Orix header from binary, code a dsk tool for Stratsed,
+add Stratsed header on your binary,insert your binary on floppy disk (this solution will be possible is the future).
+</itemize>
+
+Telestrat (from cardridge) can handle 8 banks (from $C000 to $FFFF): Bank 0 is the overlay ram. Others banks can be ROM or RAM.
+
 <sect>Binary format<p>
 
 The standard binary output format generated the linker for the Telestrat
 target is a machine language program with a 20 bytes header described <url
-name="here" url="http://orix.oric.org/doku.php?id=orix:header">
+name="here" url="http://orix.oric.org/orix-header/">
 
 This header is used for Telemon 3.0.
 
-Anyway, for Telemon 2.4, there is no file management, there is no TAPE routine in Telemon, there is no way to load a binary easily.
+Anyway, for Telemon 2.4, there is no file management, there is no TAPE routine 
+in Telemon, there is no way to load a binary easily.
 
-Stratsed (the Telestrat operating system) handles files management. Stratsed is loaded to memory from floppy disk.
+Stratsed (the Telestrat operating system) handles files management. Stratsed 
+is loaded to memory from floppy disk. Stratsed vector are declared in asminc/telestrat.inc.
+But, reverse engineering is required to find how theses vectors works. Please, note that 
+Stratsed is located in overlay memory (bank 0)
 
 There is no tool to insert a binary in a Stratsed floppy disk.
 
@@ -44,7 +88,9 @@ The only way to load a binary (for Telemon 2.4) is to:
 <itemize>
 <item>remove the 20 bytes header
 <item>download <url name="osdk" url="http://osdk.defence-force.org/index?page=download">
-<item>use Floppybuilder in OSDK to insert the binary with the tool (please read FloppyBuilder manual to insert your binary, and to start microdisc boot sector when Telestrat starts)
+<item>use Floppybuilder in OSDK to insert the binary with the tool (please read 
+FloppyBuilder manual to learn how to insert your binary and how to start Microdisc boot sector 
+when Telestrat starts)
 </itemize>
 
 Please note also, that the binary converted into TAP file, will not produce
@@ -58,7 +104,7 @@ If you know the Stratsed disk format, please contact the author of this doc.
 
 In the standard setup, cc65-generated programs use the memory from
 &dollar;0801 to &dollar;9800; so, nearly 37K of memory (including the stack) is
-available. ROM calls are possible without further precautions.
+available. ROM calls are possible with BRK feature.
 
 
 Special locations:
@@ -107,6 +153,14 @@ structures; accessing the struct fields will access the chip registers.
   Access to the VIA (Versatile Interface Adapter) chip is available via the
   <tt/VIA/ variable. The structure behind this variable is explained in <tt/_6522.h/.
 
+  <tag><tt/VIA2/</tag>
+  Access to the VIA2 (Versatile Interface Adapter) chip is available via the
+  <tt/VIA2/ variable. The structure behind this variable is explained in <tt/_6522.h/.
+
+  <tag><tt/ACIA/</tag>
+  Access to the 6551 ACIA chip is available via the
+  <tt/ACIA/ variable. The structure behind this variable is explained in <tt/_6551.h/.
+
 </descrip><p>
 
 
@@ -114,34 +168,42 @@ structures; accessing the struct fields will access the chip registers.
 
 <sect1>TGI<p>
 
-TGI drivers is available on Oric Telestrat with some functions :
+TGI drivers is available on Oric Telestrat with some functions:
 
 <itemize>
+<item>tgi_clear
 <item>tgi_done
-<item>tgi_install
 <item>tgi_init
-<item>tgi_clear
+<item>tgi_install
 <item>tgi_line
+<item>tgi_outtext
 <item>tgi_setpixel
 </itemize>
 
 
 <sect1>Extended memory drivers<p>
 
-No extended memory drivers are currently available for the Telestrat.
-
+No extended memory drivers are currently available for the Telestrat. 
+This feature could be done because telestrat can manage RAM inserted in his 
+port cardridge. 
 
 <sect1>Joystick drivers<p>
 
-telemon 2.4 & 3.0 manages joysticks but it had been handled yet.
+Telemon 2.4 & 3.0 manages joysticks but it had been handled yet. This means that 
+joysticks driver could be written easily.
+
+Telemon 2.4 returns in keyboard buffer the direction of the joysticks. This means that
+if you get input from keyboard by conio cgetc function, you will get direction from joysticks.
 
 <sect1>Mouse drivers<p>
 
-Telestrat manages also mouse, but it had been no handled yet in this version.
+Telestrat manages also mouse, but it had been no handled yet in this version. 
+Telestrat mouse is really difficult to find.
 
 <sect1>RS232 device drivers<p>
 
-Telestrat has a RS232 port, but it's not usable in cc65.
+Telestrat has a RS232 port, but it's not usable in cc65. It is possible to use 
+RS232 port with Telemon calls (see XSOUT primitive for example)
 
 <sect>Limitations<label id="limitations"><p>
 
@@ -150,9 +212,7 @@ Telestrat has a RS232 port, but it's not usable in cc65.
 Telemon 3.0 handles fopen, fread, fclose primitives. It means that this
 function will crash the Telestrat because Telemon 2.4 does not have these
 primitives. By the way, Telemon 3.0 uses an extension "ch376 card" which
-handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS,
-Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread,
-fclose).
+handles sdcard and FAT 32 usb key. In the next version of Telemon, FT DOS, Sedoric, Stratsed will be handled in these 3 primitives (fopen, fread, fclose).
 
 <itemize>
 <item>fclose
index ce501f0bf29177ebd780263dcb0c3b65041d0dac..228bdce99a063f9c89eee69769f70545ffb605bb 100644 (file)
@@ -170,7 +170,7 @@ CONTROL:
 ;
 
 CLEAR:
-        ; not done yet
+        BRK_TELEMON(XEFFHI)
         rts
 
 ; ------------------------------------------------------------------------
index 3ee918c4fd5e1aad3428abcacaf58503fd04b9b1..9bffebb0ca9ec64def85a6dbe09177f90dd0dd21 100644 (file)
@@ -169,7 +169,7 @@ CONTROL:
 ;
 
 CLEAR:
-        ; not done yet
+        BRK_TELEMON(XEFFHI)
         rts
 
 ; ------------------------------------------------------------------------