From: Christian Groessler Date: Fri, 12 Apr 2019 12:01:26 +0000 (+0200) Subject: atari5200: update docs for recent conio changes X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=03311e72689111c76b07f39b1ed181a9efc4ebd0;p=cc65 atari5200: update docs for recent conio changes also renames libsrc/atari5200/extra/conioscreen_20x12.s to libsrc/atari5200/extra/conioscreen-20x12.s to be in line with other optional link modules --- diff --git a/doc/atari5200.sgml b/doc/atari5200.sgml index fedac4466..bd2b6adcb 100644 --- a/doc/atari5200.sgml +++ b/doc/atari5200.sgml @@ -52,7 +52,7 @@ Special locations: If the program doesn't use any CONIO output functions it needs to setup its own @@ -151,6 +151,43 @@ No serial drivers are available for the Atari 5200. Limitations

+ +Direct console I/O

+ +The + + +Note that the +cl65 -t atari5200 myprog.c lib/atari5200-conioscreen-20x12.o + + + Disk I/O

Disk I/O is not supported by the Other hints

+AtariROMMaker ( ) +can be used to create a License

diff --git a/doc/library.sgml b/doc/library.sgml index 8800c5496..e8ca84653 100644 --- a/doc/library.sgml +++ b/doc/library.sgml @@ -162,6 +162,7 @@ portable. conio implementations exist for the following targets: apple2 apple2enh atari + atari5200 atarixl atmos c16 (works also for the c116 with up to 32K memory) diff --git a/libsrc/atari5200/extra/conioscreen-20x12.s b/libsrc/atari5200/extra/conioscreen-20x12.s new file mode 100644 index 000000000..e591bf05a --- /dev/null +++ b/libsrc/atari5200/extra/conioscreen-20x12.s @@ -0,0 +1,92 @@ +; setup alternative CONIO screen (20x12, Antic mode 7, BASIC mode 2) +; +; 02-Apr-2019, Christian Groessler + + .include "atari5200.inc" + +SCREEN_BUF_SIZE = 20 * 12 +SCREEN_BUF = $4000 - SCREEN_BUF_SIZE + + .export screen_setup + .export screen_width, screen_height + .export conio_color + +screen_width = 20 +screen_height = 12 + + + .segment "ONCE" + +; initialize color registers, display list, and screen memory +screen_setup: + + ; initialize SAVMSC + lda #SCREEN_BUF + sta SAVMSC+1 + + ; initialize cursor position + lda #0 + sta COLCRS_5200 + sta ROWCRS_5200 + + ; clear screen buffer + ldy #<(SCREEN_BUF_SIZE-1) + ldx #>(SCREEN_BUF_SIZE-1) +clrscr: sta (SAVMSC),y + dey + cpy #$FF + bne clrscr + dex + cpx #$FF + bne clrscr + + ; set default colors + + lda #GTIA_COLOR_WHITE + sta COLOR0 + lda #GTIA_COLOR_LIGHTRED + sta COLOR1 + lda #GTIA_COLOR_LIGHTGREEN + sta COLOR2 + lda #GTIA_COLOR_BLACK + sta COLOR3 + sta COLOR4 ; background + + ; set display list + + lda #dlist + sta SDLSTH + + rts + + .bss + +conio_color: .res 1 + + .segment "DLIST" + +; display list for 20x12 text mode + +dlist: .repeat 3 + .byte DL_BLK8 + .endrepeat + + .byte DL_CHR20x16x2 | DL_LMS + .word SCREEN_BUF + + .repeat 11 + .byte DL_CHR20x16x2 + .endrepeat + + .byte DL_JVB + .word dlist + +; end of display list + +.assert ((* >> 10) = (dlist >> 10)), error, "Display list crosses 1K boundary" + + .end diff --git a/libsrc/atari5200/extra/conioscreen_20x12.s b/libsrc/atari5200/extra/conioscreen_20x12.s deleted file mode 100644 index e591bf05a..000000000 --- a/libsrc/atari5200/extra/conioscreen_20x12.s +++ /dev/null @@ -1,92 +0,0 @@ -; setup alternative CONIO screen (20x12, Antic mode 7, BASIC mode 2) -; -; 02-Apr-2019, Christian Groessler - - .include "atari5200.inc" - -SCREEN_BUF_SIZE = 20 * 12 -SCREEN_BUF = $4000 - SCREEN_BUF_SIZE - - .export screen_setup - .export screen_width, screen_height - .export conio_color - -screen_width = 20 -screen_height = 12 - - - .segment "ONCE" - -; initialize color registers, display list, and screen memory -screen_setup: - - ; initialize SAVMSC - lda #SCREEN_BUF - sta SAVMSC+1 - - ; initialize cursor position - lda #0 - sta COLCRS_5200 - sta ROWCRS_5200 - - ; clear screen buffer - ldy #<(SCREEN_BUF_SIZE-1) - ldx #>(SCREEN_BUF_SIZE-1) -clrscr: sta (SAVMSC),y - dey - cpy #$FF - bne clrscr - dex - cpx #$FF - bne clrscr - - ; set default colors - - lda #GTIA_COLOR_WHITE - sta COLOR0 - lda #GTIA_COLOR_LIGHTRED - sta COLOR1 - lda #GTIA_COLOR_LIGHTGREEN - sta COLOR2 - lda #GTIA_COLOR_BLACK - sta COLOR3 - sta COLOR4 ; background - - ; set display list - - lda #dlist - sta SDLSTH - - rts - - .bss - -conio_color: .res 1 - - .segment "DLIST" - -; display list for 20x12 text mode - -dlist: .repeat 3 - .byte DL_BLK8 - .endrepeat - - .byte DL_CHR20x16x2 | DL_LMS - .word SCREEN_BUF - - .repeat 11 - .byte DL_CHR20x16x2 - .endrepeat - - .byte DL_JVB - .word dlist - -; end of display list - -.assert ((* >> 10) = (dlist >> 10)), error, "Display list crosses 1K boundary" - - .end