]> git.sur5r.net Git - cc65/commitdiff
atari5200: update docs for recent conio changes
authorChristian Groessler <chris@groessler.org>
Fri, 12 Apr 2019 12:01:26 +0000 (14:01 +0200)
committerOliver Schmidt <ol.sc@web.de>
Sat, 13 Apr 2019 09:07:06 +0000 (11:07 +0200)
also renames libsrc/atari5200/extra/conioscreen_20x12.s to
libsrc/atari5200/extra/conioscreen-20x12.s to be in line with
other optional link modules

doc/atari5200.sgml
doc/library.sgml
libsrc/atari5200/extra/conioscreen-20x12.s [new file with mode: 0644]
libsrc/atari5200/extra/conioscreen_20x12.s [deleted file]

index fedac4466c6fa408c54de37a016ad7e8cbdf5b11..bd2b6adcba2ee25feb09423720efc91976960a7a 100644 (file)
@@ -52,7 +52,7 @@ Special locations:
   <tag/Text screen/
   The text screen is only enabled if any of the CONIO output functions
   is used in the program. Its size is 20x24 characters (Antic mode 6,
-  BASIC mode 1). The text screen is located at &dollar;3E00. The
+  BASIC mode 1) by default. The text screen is located at &dollar;3E00. The
   address of the screen memory is available at runtime in the variable
   SAVMSC (&dollar;001B).<p>
   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.
 
 <sect>Limitations<p>
 
+
+<sect1>Direct console I/O<p>
+
+The <tt/atari5200/ target uses Antic mode 6 (BASIC mode 1) for the console
+screen by default. There are four colors available:
+
+<itemize>
+<item><tt/COLOR_WHITE/
+<item><tt/COLOR_RED/
+<item><tt/COLOR_GREEN/
+<item><tt/COLOR_BLACK/
+</itemize>
+
+Note that the <tt/COLOR_GREEN/ and <tt/COLOR_RED/ colors aren't
+exactly the same colors as the ones with the same name on the
+<tt/atari/ target.
+They are the colors which are available as <tt/COLOR_LIGHTGREEN/
+and <tt/COLOR_LIGHTRED/ there.
+
+One can set the color shadow registers directly with other colors.
+Then the color defines from above will just become placeholders. In
+this scenario it might be more convenient to use index values (0..3)
+instead of the color defines. The index values specify which of the
+system shadow color registers (<tt/COLOR0/ .. <tt/COLOR3/) to use.
+
+The default console screen has a layout of 20x24 characters. An
+alternative layout, 20x12, Antic mode 7, BASIC mode 2, is provided in
+the file <tt/atari5200-conioscreen-20x12.o/.
+
+Using <tt/atari5200-conioscreen-20x12.o/ is as simple as placing it on
+the linker command line like this:
+
+<tscreen><verb>
+cl65 -t atari5200 myprog.c lib/atari5200-conioscreen-20x12.o
+</verb></tscreen>
+
+
 <sect1>Disk I/O<p>
 
 Disk I/O is not supported by the <tt/atari5200/ target. This means that
@@ -171,6 +208,9 @@ you cannot use any of the following functions (and a few others):
 
 <sect>Other hints<p>
 
+AtariROMMaker (<url url="https://www.wudsn.com/index.php/productions-atari800/tools/atarirommaker"> ) 
+can be used to create a <tt/.CAR/ file from the binary ROM image cc65 generates.
+This might be more convenient when working with emulators.
 
 
 <sect>License<p>
index 8800c5496f41b67bf65bdf601a70e43d6171f634..e8ca84653aa62d9e5d8e2e043cfea76e38e92184 100644 (file)
@@ -162,6 +162,7 @@ portable. conio implementations exist for the following targets:
   <item>apple2
   <item>apple2enh
   <item>atari
+  <item>atari5200
   <item>atarixl
   <item>atmos
   <item>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 (file)
index 0000000..e591bf0
--- /dev/null
@@ -0,0 +1,92 @@
+; setup alternative CONIO screen (20x12, Antic mode 7, BASIC mode 2)
+;
+; 02-Apr-2019, Christian Groessler <chris@groessler.org>
+
+                .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
+                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     SDLSTL
+                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 (file)
index e591bf0..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-; setup alternative CONIO screen (20x12, Antic mode 7, BASIC mode 2)
-;
-; 02-Apr-2019, Christian Groessler <chris@groessler.org>
-
-                .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
-                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     SDLSTL
-                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