Fix conflicts with some conio routines

This commit is contained in:
Karri Kaksonen 2022-04-05 10:35:59 +03:00
parent 4c7c3d8f2f
commit 6b16b99192
3 changed files with 18 additions and 13 deletions

View File

@ -52,6 +52,8 @@
/* No support for dynamically loadable drivers */
#define DYN_DRV 0
extern unsigned char get_tv(void); /* get TV system */
#include <_tia.h>
#define TIA (*(struct __tia*)0x0000)

View File

@ -10,7 +10,7 @@
.import _gotoxy, _gotox, _gotoy, tosaddax, tosumula0, pusha0
.import pushax
.import _screen
.importzp ptr1
.importzp ptr3
.import CURS_X, CURS_Y
.include "atari7800.inc"
@ -132,12 +132,12 @@ txtcolor:
lda #<(_screen)
ldx #>(_screen)
jsr tosaddax
sta ptr1
stx ptr1+1
sta ptr3
stx ptr3+1
pla
ldy #0
sta (ptr1),y
sta (ptr3),y
rts
.endproc

View File

@ -24,11 +24,11 @@
;
.export _setcursor
.export _gotoxy, _gotox, _gotoy, wherex, wherey
.export gotoxy, _gotoxy, _gotox, _gotoy, wherex, wherey
.export CURS_X, CURS_Y
.constructor init_cursor
.importzp ptr1, sp
.importzp ptr3, sp
.import _zones
.import pusha, incsp1, pusha0, pushax, popax, tosumula0, incax5
.include "atari7800.inc"
@ -81,11 +81,11 @@ _cursorzone:
clc
adc #<_zones
sta _cursorzone ; calculate new cursorzone
sta ptr1
sta ptr3
txa
adc #>_zones
sta _cursorzone+1
sta ptr1+1
sta ptr3+1
rts
.endproc
@ -112,7 +112,7 @@ _cursorzone:
jsr calccursorzone
ldy #1
lda #0
sta (ptr1),y ; disable cursor
sta (ptr3),y ; disable cursor
pla
sta CURS_Y
jsr calccursorzone
@ -120,7 +120,7 @@ _cursorzone:
beq @L1
lda #30 ; enable cursor
@L1: ldy #1
sta (ptr1),y
sta (ptr3),y
rts
.endproc
@ -136,15 +136,15 @@ _cursorzone:
tay
lda _cursorzone
ldx _cursorzone+1
sta ptr1
stx ptr1+1
sta ptr3
stx ptr3+1
tya
ldy #3
clc
rol
rol
rol
sta (ptr1),y
sta (ptr3),y
rts
.endproc
@ -160,6 +160,9 @@ _cursorzone:
rts
.endproc
.proc gotoxy
jmp _gotoxy
.endproc
;-----------------------------------------------------------------------------
; Get cursor X position
;