toascii.s added, doc updated, tgi_line & tgi_outtext are available
This commit is contained in:
@@ -152,7 +152,7 @@ SCREEN := $BB80
|
|||||||
XRD0 = $08
|
XRD0 = $08
|
||||||
XRDW0 = $0C
|
XRDW0 = $0C
|
||||||
XWR0 = $10
|
XWR0 = $10
|
||||||
XWSTR0 = $14
|
XWSTR0 = $14 ; write a string in text mode
|
||||||
XTEXT = $19
|
XTEXT = $19
|
||||||
XHIRES = $1A
|
XHIRES = $1A
|
||||||
XFILLM = $1C
|
XFILLM = $1C
|
||||||
@@ -165,14 +165,14 @@ XCSSCR = $35 ; switch on cursor
|
|||||||
XCLOSE = $3A ; only in TELEMON 3.x Close file
|
XCLOSE = $3A ; only in TELEMON 3.x Close file
|
||||||
XFWRITE = $3B ; only in TELEMON 3.x write file
|
XFWRITE = $3B ; only in TELEMON 3.x write file
|
||||||
XSONPS = $40
|
XSONPS = $40
|
||||||
XOUPS = $42
|
XOUPS = $42 ; sends Oups sound into PSG
|
||||||
XPLAY = $43
|
XPLAY = $43
|
||||||
XSOUND = $44
|
XSOUND = $44
|
||||||
XMUSIC = $45
|
XMUSIC = $45
|
||||||
XZAP = $46
|
XZAP = $46
|
||||||
XSHOOT = $47
|
XSHOOT = $47
|
||||||
XSOUT = $67 ; Send A register to RS232, available in telemon 2.4 & 3.x
|
XSOUT = $67 ; Send A register to RS232, available in telemon 2.4 & 3.x
|
||||||
XHRSSE = $8C ; Put in X and Y
|
XHRSSE = $8C ; Set hires position cursor
|
||||||
XDRAWA = $8D ; Draw a line
|
XDRAWA = $8D ; Draw a line
|
||||||
XDRAWR = $8E ; Draw a line
|
XDRAWR = $8E ; Draw a line
|
||||||
XCIRCL = $8F
|
XCIRCL = $8F
|
||||||
@@ -184,7 +184,7 @@ XBOX = $94
|
|||||||
XABOX = $95
|
XABOX = $95
|
||||||
XFILL = $96
|
XFILL = $96
|
||||||
XCHAR = $97
|
XCHAR = $97
|
||||||
XSCHAR = $98 ; Draw a string
|
XSCHAR = $98 ; Draw a string in hires
|
||||||
XEXPLO = $9C
|
XEXPLO = $9C
|
||||||
XPING = $9D
|
XPING = $9D
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<date>2017-01-22
|
<date>2017-01-22
|
||||||
|
|
||||||
<abstract>
|
<abstract>
|
||||||
An overview over the Telestrat (Telemon 3.0 : http://orix.oric.org) runtime system as it is implemented for the cc65 C
|
An overview over the Telestrat (Telemon 2.4 & Telemon 3.x : http://orix.oric.org) runtime system as it is implemented for the cc65 C
|
||||||
compiler.)
|
compiler.)
|
||||||
</abstract>
|
</abstract>
|
||||||
|
|
||||||
@@ -113,6 +113,21 @@ structures; accessing the struct fields will access the chip registers.
|
|||||||
|
|
||||||
<sect>Loadable drivers<p>
|
<sect>Loadable drivers<p>
|
||||||
|
|
||||||
|
<sect1>TGI<p>
|
||||||
|
|
||||||
|
TGI drivers is available on Oric Telestrat with some functions :
|
||||||
|
|
||||||
|
<itemize>
|
||||||
|
<item>
|
||||||
|
<item>tgi_install
|
||||||
|
<item>tgi_init
|
||||||
|
<item>tgi_clear
|
||||||
|
<item>tgi_setpixel
|
||||||
|
<item>tgi_getmaxx
|
||||||
|
<item>tgi_getmaxy
|
||||||
|
</itemize>
|
||||||
|
|
||||||
|
|
||||||
<sect1>Extended memory drivers<p>
|
<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.
|
||||||
@@ -139,7 +154,7 @@ Telestrat manages also mouse, but it had been no handled yet in this version.
|
|||||||
|
|
||||||
<descrip>
|
<descrip>
|
||||||
|
|
||||||
Telestrat has a RS232 port, but it's not used
|
Telestrat has a RS232 port, but it's not usable in cc65.
|
||||||
|
|
||||||
</descrip>
|
</descrip>
|
||||||
|
|
||||||
|
|||||||
@@ -286,9 +286,27 @@ GETPIXEL:
|
|||||||
|
|
||||||
LINE:
|
LINE:
|
||||||
; not done yet
|
; not done yet
|
||||||
|
lda X1
|
||||||
|
sta HRS1
|
||||||
|
lda Y1
|
||||||
|
sta HRS2
|
||||||
|
|
||||||
|
lda X2
|
||||||
|
sta HRS3
|
||||||
|
lda Y2
|
||||||
|
sta HRS4
|
||||||
|
|
||||||
|
lda #$ff
|
||||||
|
sta HRSPAT
|
||||||
|
|
||||||
|
BRK_TELEMON(XDRAWA)
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CIRCLE:
|
CIRCLE:
|
||||||
|
|
||||||
; not done yet
|
; not done yet
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -332,5 +350,25 @@ TEXTSTYLE:
|
|||||||
;
|
;
|
||||||
|
|
||||||
OUTTEXT:
|
OUTTEXT:
|
||||||
; not done yet
|
; put hires cursor in X & Y
|
||||||
|
lda #$00
|
||||||
|
jsr SETPIXELSETMODE
|
||||||
|
|
||||||
|
|
||||||
|
; count the length of the string
|
||||||
|
ldy #$00
|
||||||
|
loop:
|
||||||
|
lda (ptr3),y
|
||||||
|
beq out
|
||||||
|
iny
|
||||||
|
bne loop
|
||||||
|
out:
|
||||||
|
; XSCHAR routine from telemon needs to have the length of the string in X register
|
||||||
|
; copy Y register to X register. It could be optimized in 65C02 with TYX
|
||||||
|
tya
|
||||||
|
tax
|
||||||
|
|
||||||
|
lda ptr3 ; XSCHAR needs in A and Y the adress of the string
|
||||||
|
ldy ptr3+1
|
||||||
|
BRK_TELEMON(XSCHAR)
|
||||||
rts
|
rts
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ INIT:
|
|||||||
; Switch into graphics mode
|
; Switch into graphics mode
|
||||||
|
|
||||||
BRK_TELEMON(XHIRES)
|
BRK_TELEMON(XHIRES)
|
||||||
|
|
||||||
; Done, reset the error code
|
; Done, reset the error code
|
||||||
|
|
||||||
lda #TGI_ERR_OK
|
lda #TGI_ERR_OK
|
||||||
@@ -248,14 +248,16 @@ GETDEFPALETTE:
|
|||||||
;
|
;
|
||||||
|
|
||||||
SETPIXEL:
|
SETPIXEL:
|
||||||
|
lda #$80 ; curset on
|
||||||
|
SETPIXELSETMODE:
|
||||||
|
sta HRSFB
|
||||||
|
|
||||||
lda X1
|
lda X1
|
||||||
sta HRS1
|
sta HRS1
|
||||||
lda Y1
|
lda Y1
|
||||||
sta HRS2
|
sta HRS2
|
||||||
|
|
||||||
lda #$80 ; curset on
|
|
||||||
sta HRSFB
|
|
||||||
|
|
||||||
BRK_TELEMON(XCURSE)
|
BRK_TELEMON(XCURSE)
|
||||||
|
|
||||||
@@ -278,9 +280,24 @@ GETPIXEL:
|
|||||||
;
|
;
|
||||||
|
|
||||||
LINE:
|
LINE:
|
||||||
; not done yet
|
|
||||||
rts
|
|
||||||
|
|
||||||
|
lda X1
|
||||||
|
sta HRS1
|
||||||
|
lda Y1
|
||||||
|
sta HRS2
|
||||||
|
|
||||||
|
lda X2
|
||||||
|
sta HRS3
|
||||||
|
lda Y2
|
||||||
|
sta HRS4
|
||||||
|
|
||||||
|
lda #$ff
|
||||||
|
sta HRSPAT
|
||||||
|
|
||||||
|
BRK_TELEMON(XDRAWA)
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
CIRCLE:
|
CIRCLE:
|
||||||
; not done yet
|
; not done yet
|
||||||
rts
|
rts
|
||||||
@@ -325,5 +342,25 @@ TEXTSTYLE:
|
|||||||
;
|
;
|
||||||
|
|
||||||
OUTTEXT:
|
OUTTEXT:
|
||||||
; Not done yet
|
; put hires cursor in X & Y
|
||||||
|
lda #$00
|
||||||
|
jsr SETPIXELSETMODE
|
||||||
|
|
||||||
|
|
||||||
|
; count the length of the string
|
||||||
|
ldy #$00
|
||||||
|
loop:
|
||||||
|
lda (ptr3),y
|
||||||
|
beq out
|
||||||
|
iny
|
||||||
|
bne loop
|
||||||
|
out:
|
||||||
|
; XSCHAR routine from telemon needs to have the length of the string in X register
|
||||||
|
; copy Y register to X register. It could be optimized in 65C02 with TYX
|
||||||
|
tya
|
||||||
|
tax
|
||||||
|
|
||||||
|
lda ptr3 ; XSCHAR needs in A and Y the adress of the string
|
||||||
|
ldy ptr3+1
|
||||||
|
BRK_TELEMON(XSCHAR)
|
||||||
rts
|
rts
|
||||||
|
|||||||
14
libsrc/telestrat/toascii.s
Normal file
14
libsrc/telestrat/toascii.s
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
;
|
||||||
|
; char __fastcall__ toascii (char c);
|
||||||
|
; /* Convert a target-specific character to ASCII. */
|
||||||
|
;
|
||||||
|
|
||||||
|
.export _toascii
|
||||||
|
|
||||||
|
.proc _toascii
|
||||||
|
|
||||||
|
; .X must be zero, on return.
|
||||||
|
ldx #>$0000
|
||||||
|
rts
|
||||||
|
|
||||||
|
.endproc
|
||||||
Reference in New Issue
Block a user