;-------------------------------------------------------------------------
; Atari System Equates
-; by Freddy Offenga & Christian Groessler
+; by Freddy Offenga, Christian Groessler, and Christian Krueger
;
; References:
; - Atari 400/800 OS rev.B source code, Atari 1979
FNCNOT = 146 ;($92) function not implemented in handler
SCRMEM = 147 ;($93) insufficient memory for screen mode
-DSKFMT = 148 ;($94) SpartaDOS: urecognized disk format
+DSKFMT = 148 ;($94) SpartaDOS: unrecognized disk format
INCVER = 149 ;($95) SpartaDOS: disk was made with incompat. version
DIRNFD = 150 ;($96) SpartaDOS: directory not found
FEXIST = 151 ;($97) SpartaDOS: file exists
TMPCHR = $50 ;1-byte temporary character
HOLD1 = $51 ;1-byte temporary
-LMARGN = $52 ;LEFT MARGIN (SET TO 1 AT POWER ON>
-RMARGN = $53 ;RIGHT MARGIN (SET TO 38 AT POWER ON)
+LMARGN = $52 ;left margin (normally 2, cc65 C startup code sets it to 0)
+RMARGN = $53 ;right margin (normally 39 if no XEP80 is used)
ROWCRS = $54 ;1-byte cursor row
COLCRS = $55 ;2-byte cursor column
DINDEX = $57 ;1-byte display mode
DFLAGS = $0240 ;DISK FLAGS FROM SECTOR ONE
DBSECT = $0241 ;NUMBER OF DISK BOOT SECTORS
-BOOTAD = $0242 ;ADDRESS WHERE DISK BOOT LOADER WILL 13E PUT
+BOOTAD = $0242 ;ADDRESS WHERE DISK BOOT LOADER WILL BE PUT
COLDST = $0244 ;COLDSTART FLAG (1=IN MIDDLE OF COLDSTART>
RECLEN = $0245 ;##1200xl## 1-byte relocating loader record length
DSKTIM = $0246 ;DISK TIME OUT REGISTER
CHBASE = $D409 ;character base address
WSYNC = $D40A ;wait for HBLANK synchronization
NMIEN = $D40E ;NMI enable
-NMIRES = $D40F ;NMI iterrupt reset
+NMIRES = $D40F ;NMI interrupt reset
;-------------------------------------------------------------------------
; Floating Point Package Address Equates
STMCUR = $8A ;2-byte current statement pointer
STARP = $8C ;2-byte string and array table pointer
RUNSTK = $8E ;2-byte runtime stack address
-;MEMTOP = $90 ;2-byte top of memory pointer
+BMEMTOP = $90 ;2-byte top of memory pointer
STOPLN = $BA ;2-byte stopped line number
ERRSAVE = $C3 ;1-byte error code
PTABW = $C9 ;1-byte tab width
RENAME = $20 ;RENAME DISK FILE
DELETE = $21 ;DELETE DISK FILE
-FORMAT = $21 ;FORMAT
LOCKFL = $23 ;LOCK FILE TO READ ONLY
UNLOCK = $24 ;UNLOCK LOCKED FILE
POINT = $25 ;POINT SECTOR
NOTE = $26 ;NOTE SECTOR
+FORMAT = $FE ;FORMAT
; Command line table, Index values for (DOSVEC),Y -- COMTAB
; Compatible with OS/A+, DOS XL and SpartaDOS
SPARTADOS = 1
OSADOS = 2 ; OS/A+
MYDOS = 3
+XDOS = 4
NODOS = 255
;-------------------------------------------------------------------------
-; End of atari.inc
+; Antic opcodes
;-------------------------------------------------------------------------
+; usage example:
+;
+; ScreenDL:
+; .byte DL_BLK8
+; .byte DL_BLK8
+; .byte DL_CHR40x8x1 + DL_LMS + DL_DLI
+; .word ScreenAlignment
+; .byte DL_BLK1 + DL_DLI
+; .byte DL_MAP320x1x1 + DL_LMS
+; .word Screen
+;
+; .repeat 99
+; .byte DL_MAP320x1x1
+; .endrepeat
+; .byte DL_MAP320x1x1 + DL_LMS
+; .word Screen + 40 * 100 ; 100 lines a 40 byte, 'Screen' has to be aligned correctly!
+; .repeat 92
+; .byte DL_MAP320x1x1
+; .endrepeat
+;
+; .byte DL_JVB
+
+; absolute instructions (non mode lines)
+
+DL_JMP = 1
+DL_JVB = 65
+
+DL_BLK1 = 0
+DL_BLK2 = 16
+DL_BLK3 = 32
+DL_BLK4 = 48
+DL_BLK5 = 64
+DL_BLK6 = 80
+DL_BLK7 = 96
+DL_BLK8 = 112
+
+; absolute instructions (mode lines)
+
+DL_CHR40x8x1 = 2 ; monochrome, 40 character & 8 scanlines per mode line (GR. 0)
+DL_CHR40x10x1 = 3 ; monochrome, 40 character & 10 scanlines per mode line
+DL_CHR40x8x4 = 4 ; colour, 40 character & 8 scanlines per mode line (GR. 12)
+DL_CHR40x16x4 = 5 ; colour, 40 character & 16 scanlines per mode line (GR. 13)
+DL_CHR20x8x2 = 6 ; colour (duochrome per character), 20 character & 8 scanlines per mode line (GR. 1)
+DL_CHR20x16x2 = 7 ; colour (duochrome per character), 20 character & 16 scanlines per mode line (GR. 2)
+
+DL_MAP40x8x4 = 8 ; colour, 40 pixel & 8 scanlines per mode line (GR. 3)
+DL_MAP80x4x2 = 9 ; 'duochrome', 80 pixel & 4 scanlines per mode line (GR.4)
+DL_MAP80x4x4 = 10 ; colour, 80 pixel & 4 scanlines per mode line (GR.5)
+DL_MAP160x2x2 = 11 ; 'duochrome', 160 pixel & 2 scanlines per mode line (GR.6)
+DL_MAP160x1x2 = 12 ; 'duochrome', 160 pixel & 1 scanline per mode line (GR.14)
+DL_MAP160x2x4 = 13 ; 4 colours, 160 pixel & 2 scanlines per mode line (GR.7)
+DL_MAP160x1x4 = 14 ; 4 colours, 160 pixel & 1 scanline per mode line (GR.15)
+DL_MAP320x1x1 = 15 ; monochrome, 320 pixel & 1 scanline per mode line (GR.8)
+
+; modifiers on mode lines...
+
+DL_HSCROL = 16
+DL_VSCROL = 32
+DL_LMS = 64
+
+; general modifier...
+
+DL_DLI = 128
+
+;-------------------------------------------------------------------------
+; End of atari.inc
+;-------------------------------------------------------------------------