#define COLOR_GRAY3 _gtia_mkcolor(HUE_GREY,5)
/* color register functions */
-extern void __fastcall__ setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
-extern void __fastcall__ setcolor_low (unsigned char color_reg, unsigned char color_value);
-extern unsigned char __fastcall__ getcolor (unsigned char color_reg);
+extern void __fastcall__ _setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
+extern void __fastcall__ _setcolor_low (unsigned char color_reg, unsigned char color_value);
+extern unsigned char __fastcall__ _getcolor (unsigned char color_reg);
/* other screen functions */
-extern int __fastcall__ graphics(unsigned char mode); /* mode value same as in BASIC */
-extern void __fastcall__ scroll (signed char numlines);
+extern int __fastcall__ _graphics (unsigned char mode); /* mode value same as in BASIC */
+extern void __fastcall__ _scroll (signed char numlines);
/* numlines > 0 scrolls up */
/* numlines < 0 scrolls down */
/* misc. functions */
-extern void save_vecs(void); /* save system vectors */
-extern void rest_vecs(void); /* restore system vectors */
-extern unsigned char get_ostype(void); /* get ROM version */
-extern unsigned char get_tv(void); /* get TV system */
-extern char *getdefdev(void); /* get default floppy device */
+extern void _save_vecs(void); /* save system vectors */
+extern void _rest_vecs(void); /* restore system vectors */
+extern unsigned char _get_ostype(void); /* get ROM version */
+extern unsigned char _get_tv(void); /* get TV system */
+extern char *_getdefdev(void); /* get default floppy device */
/* global variables */
extern unsigned char _dos_type; /* the DOS flavour */
+/* provide old names for backwards compatibility */
+#ifdef ATARI_COMPAT_PRE_2_10
+#define setcolor _setcolor
+#define setcolor_low _setcolor_low
+#define getcolor _getcolor
+#define graphics _graphics
+#define scroll _scroll
+#define save_vecs _save_vecs
+#define rest_vecs _rest_vecs
+#define get_ostype _get_ostype
+#define get_tv _get_tv
+#define getdefdev _getdefdev
+#endif /* #ifdef ATARI_COMPAT_PRE_2_10 */
+
/* get_ostype return value defines (for explanation, see ostype.s) */
/* masks */
#define AT_OS_TYPE_MAIN 7
;
-; Freddy Offenga & Christian Groessler, August 2003
+; Freddy Offenga & Christian Groessler, June 2004
;
-; function to get default device: char *getdefdev(void);
+; function to get default device: char *_getdefdev(void);
;
; SpartaDOS:
; the ZCRNAME routine is only used to get the default drive because
.include "atari.inc"
.import __dos_type
- .export _getdefdev ; get default device (e.g. "D1:")
+ .export __getdefdev ; get default device (e.g. "D1:")
; Get default device (LBUF will be destroyed!!)
-_getdefdev:
+__getdefdev:
lda __dos_type ; which DOS?
cmp #ATARIDOS
;
-; Christian Groessler, October 2001
+; Christian Groessler, June 2004
;
; this file provides an equivalent to the BASIC GRAPHICS function
;
-; int __fastcall__ graphics(unsigned char mode);
+; int __fastcall__ _graphics(unsigned char mode);
;
;
- .export _graphics
+ .export __graphics
.constructor initscrmem,28
.import findfreeiocb
; returns handle or -1 on error
; uses tmp1, tmp2, tmp3, tmp4 (in subroutines)
-.proc _graphics
+.proc __graphics
; tax
; and #15 ; get required graphics mode
cioerr: jsr fddecusage ; decrement usage counter of fd as open failed
jmp __do_oserror
-.endproc ; _graphics
+.endproc ; __graphics
; calc. upper memory limit to use
;
-; Christian Groessler, December 2000
+; Christian Groessler, June 2004
; from Freddy Offenga's rominfo.c
;
-; unsigned char get_ostype(void)
+; unsigned char _get_ostype(void)
;
; x x x x x x x x - 8 bit flag
; | | | | | | | |
; 101 - unassigned (up to 111)
;
- .export _get_ostype
+ .export __get_ostype
-.proc _get_ostype
+.proc __get_ostype
lda $fcd8
cmp #$a2
; save and restore system vectors
; originally by Mark Keates
;
-; void save_vecs(void);
-; void rest_vecs(void);
+; void _save_vecs(void);
+; void _rest_vecs(void);
;
- .export _save_vecs,_rest_vecs
+ .export __save_vecs,__rest_vecs
.include "atari.inc"
.bss
.code
-.proc _save_vecs
+.proc __save_vecs
lda VDSLST
sta old_dli
.endproc
-.proc _rest_vecs
+.proc __rest_vecs
lda #6
ldx old_vbi+1
;
-; Christian Groessler, June 2000
+; Christian Groessler, June 2004
;
-; void __fastcall__ scroll (signed char numlines);
+; void __fastcall__ _scroll (signed char numlines);
; numlines > 0 scrolls up
; numlines < 0 scrolls down
;
.include "atari.inc"
.importzp tmp1,tmp4,ptr1,ptr2
.import mul40,_clrscr
- .export _scroll
+ .export __scroll
-.proc _scroll
+.proc __scroll
cmp #0
beq jmpfin
;
-; Christian Groessler, June 2000
+; Christian Groessler, June 2004
;
-; this file provides a setcolor() function similar to BASIC SETCOLOR
+; this file provides a color functions similar to BASIC
;
-; void __fastcall__ setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
-; void __fastcall__ setcolor_low (unsigned char color_reg, unsigned char color_value);
-; unsigned char __fastcall__ getcolor (unsigned char color_reg);
+; void __fastcall__ _setcolor (unsigned char color_reg, unsigned char hue, unsigned char luminace);
+; void __fastcall__ _setcolor_low (unsigned char color_reg, unsigned char color_value);
+; unsigned char __fastcall__ _getcolor (unsigned char color_reg);
;
- .export _setcolor, _setcolor_low, _getcolor
+ .export __setcolor, __setcolor_low, __getcolor
.import popa
.include "atari.inc"
-.proc _getcolor
+.proc __getcolor
tax
lda COLOR0,x ; get current value
.endproc
-.proc _setcolor
+.proc __setcolor
; asl a ; not -> BASIC compatible
sta lum ; remember luminance
asl a
asl a
ora lum
-; jmp _setcolor_low
+; jmp __setcolor_low
.endproc
-.proc _setcolor_low
+.proc __setcolor_low
pha
jsr popa
;
-; Christian Groessler, November 2001
+; Christian Groessler, June 2004
;
-; unsigned char get_tv(void)
+; unsigned char _get_tv(void)
;
; returns the TV system the machine is using
; 0 - NTSC
.include "atari.inc"
- .export _get_tv
+ .export __get_tv
-.proc _get_tv
+.proc __get_tv
lda PAL ; use hw register, PALNTS is only supported on XL/XE ROM
ldx #0