Merge pull request #507 from jedeoric/master

[telestrat] tgi_line & tgi_outtext are available, toascii.s added, doc updated
This commit is contained in:
Oliver Schmidt
2017-10-25 14:49:14 +00:00
committed by GitHub
4 changed files with 115 additions and 24 deletions

View File

@@ -255,14 +255,16 @@ GETDEFPALETTE:
;
SETPIXEL:
lda #$80
SETPIXELSETMODE:
sta HRSFB
lda X1
sta HRS1
lda Y1
sta HRS2
lda #$80
sta HRSFB
BRK_TELEMON(XCURSE)
@@ -286,8 +288,24 @@ GETPIXEL:
LINE:
; 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
CIRCLE:
; not done yet
rts
@@ -332,5 +350,25 @@ TEXTSTYLE:
;
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

View File

@@ -125,7 +125,7 @@ INIT:
; Switch into graphics mode
BRK_TELEMON(XHIRES)
; Done, reset the error code
lda #TGI_ERR_OK
@@ -248,14 +248,16 @@ GETDEFPALETTE:
;
SETPIXEL:
lda #$80 ; curset on
SETPIXELSETMODE:
sta HRSFB
lda X1
sta HRS1
lda Y1
sta HRS2
lda #$80 ; curset on
sta HRSFB
BRK_TELEMON(XCURSE)
@@ -278,9 +280,24 @@ GETPIXEL:
;
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:
; not done yet
rts
@@ -325,5 +342,25 @@ TEXTSTYLE:
;
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