diff --git a/asminc/atari7800.inc b/asminc/atari7800.inc index 93e990870..0f109ba64 100644 --- a/asminc/atari7800.inc +++ b/asminc/atari7800.inc @@ -8,6 +8,7 @@ .include "atari7800_maria.inc" ; constants for the conio implementation +mono_charsperline = 40 charsperline = 20 screenrows = 28 diff --git a/cfg/atari7800.cfg b/cfg/atari7800.cfg index 160d1e58e..1eed534f3 100644 --- a/cfg/atari7800.cfg +++ b/cfg/atari7800.cfg @@ -10,7 +10,7 @@ SYMBOLS { __ENCRYPT_BOTTOM__: value = $ff7a, type = export; __ENCRYPT_SIZE__: value = $80, type = export; __MEMORY_TOP__: value = __ENCRYPT_BOTTOM__, type = export; - __INIT_SIZE__: value = 154, type = export; + __INIT_SIZE__: value = 156, type = export; __MEMORY_INIT__: value = __MEMORY_TOP__ - __INIT_SIZE__, type = export; __MEMORY_BOTTOM__: value = $10000 - __CARTSIZE__, type = weak; __FREE_ROM_SIZE__: value = __MEMORY_INIT__ - __MEMORY_BOTTOM__, type = export; diff --git a/libsrc/atari7800/clrscr.s b/libsrc/atari7800/clrscr.s index b5b3a1ebf..9d063fad6 100644 --- a/libsrc/atari7800/clrscr.s +++ b/libsrc/atari7800/clrscr.s @@ -11,8 +11,8 @@ .proc _clrscr - lda #<(_screen) - ldx #>(_screen) + lda #<_screen + ldx #>_screen sta ptr7800 stx ptr7800+1 ldx #screenrows diff --git a/libsrc/atari7800/conio.s b/libsrc/atari7800/conio.s index ad1c4a976..5b60f39fe 100644 --- a/libsrc/atari7800/conio.s +++ b/libsrc/atari7800/conio.s @@ -8,7 +8,8 @@ .constructor initconio .include "atari7800.inc" - .import _font160 + .include "extzp.inc" + .import _font .import _get_tv .export _screen .export _zones @@ -57,7 +58,7 @@ _screen: ; Cursor .byte 254 .byte 0 - .byte >_font160 + .byte >_font .byte 0 .endmacro @@ -205,12 +206,14 @@ vblankon: vblankoff: lda MSTAT bpl vblankoff - lda #>_font160 + lda #>_font sta CHBASE lda #(CTRL_MODE160 | CTRL_KANGOFF | CTRL_BCBLACK | CTRL_CHAR2B | CTRL_DMAON | CTRL_CKOFF) sta CTRL lda #$00 ; Black background sta BKGRND + sta CURS_X + sta CURS_Y lda #$33 ; Red sta P0C1 lda #$c8 ; Green diff --git a/libsrc/atari7800/cputc.s b/libsrc/atari7800/cputc.s index 4d2b8dbf6..fb95277d2 100644 --- a/libsrc/atari7800/cputc.s +++ b/libsrc/atari7800/cputc.s @@ -10,7 +10,6 @@ .import _gotoxy, gotox, gotoy, pusha0 .import pushax .import _screen - .import CURS_X, CURS_Y .import txtcolor .include "atari7800.inc" diff --git a/libsrc/atari7800/extzp.inc b/libsrc/atari7800/extzp.inc index ac1dd7e41..5990b5c86 100644 --- a/libsrc/atari7800/extzp.inc +++ b/libsrc/atari7800/extzp.inc @@ -10,4 +10,6 @@ .global ptr7800: zp .global ptrtmp: zp .global cursorzone: zp + .global CURS_X: zp + .global CURS_Y: zp diff --git a/libsrc/atari7800/extzp.s b/libsrc/atari7800/extzp.s index 376674268..a79ede01a 100644 --- a/libsrc/atari7800/extzp.s +++ b/libsrc/atari7800/extzp.s @@ -11,3 +11,5 @@ ptr7800: .res 2 ptrtmp: .res 2 cursorzone: .res 2 +CURS_X: .res 1 +CURS_Y: .res 1 diff --git a/libsrc/atari7800/font160.s b/libsrc/atari7800/font160.s index 69c5774ab..07be43c4d 100644 --- a/libsrc/atari7800/font160.s +++ b/libsrc/atari7800/font160.s @@ -16,10 +16,10 @@ ; 0, 2, 4, 6, ... 254 ; Odd indices cannot be used. - .export _font160 + .export _font .rodata .align 256 -_font160: +_font: .byte $0, $0, $41, $41, $0, $0, $14, $0 .byte $0, $0, $0, $0, $1, $40, $0, $0 .byte $0, $0, $0, $0, $0, $0, $0, $0 diff --git a/libsrc/atari7800/setcursor.s b/libsrc/atari7800/setcursor.s index caaa9c1d5..99e051cff 100644 --- a/libsrc/atari7800/setcursor.s +++ b/libsrc/atari7800/setcursor.s @@ -24,7 +24,6 @@ ; .export gotoxy, _gotoxy, gotox, gotoy - .export CURS_X, CURS_Y .constructor init_cursor .interruptor blink_cursor @@ -43,10 +42,6 @@ ; The variables used by cursor functions ; -CURS_X: - .byte 0 -CURS_Y: - .byte 0 blink_time: .byte 140 diff --git a/libsrc/atari7800/textcolor.s b/libsrc/atari7800/textcolor.s index be98ed340..1f8efced5 100644 --- a/libsrc/atari7800/textcolor.s +++ b/libsrc/atari7800/textcolor.s @@ -51,9 +51,3 @@ txtcolor: @L4: lda #2 rts ; Old colour was 2 .endproc - -;------------------------------------------------------------------------------- -; force the init constructor to be imported - - .import initconio -conio_init = initconio diff --git a/libsrc/atari7800/wherex.s b/libsrc/atari7800/wherex.s index f90105c46..4926f1479 100644 --- a/libsrc/atari7800/wherex.s +++ b/libsrc/atari7800/wherex.s @@ -5,7 +5,7 @@ ; .export _wherex - .import CURS_X + .include "extzp.inc" ;----------------------------------------------------------------------------- ; Get cursor X position diff --git a/libsrc/atari7800/wherey.s b/libsrc/atari7800/wherey.s index 2223f29ac..f105975c0 100644 --- a/libsrc/atari7800/wherey.s +++ b/libsrc/atari7800/wherey.s @@ -5,7 +5,7 @@ ; .export _wherey - .import CURS_Y + .include "extzp.inc" ;----------------------------------------------------------------------------- ; Get cursor Y position