@@ -48,14 +48,13 @@
|
|||||||
UNINSTALL .addr ; UNINSTALL routine
|
UNINSTALL .addr ; UNINSTALL routine
|
||||||
COUNT .addr ; COUNT routine
|
COUNT .addr ; COUNT routine
|
||||||
READ .addr ; READ routine
|
READ .addr ; READ routine
|
||||||
IRQ .addr ; IRQ routine
|
|
||||||
.endstruct
|
.endstruct
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; The JOY API version, stored in JOY_HDR::VERSION
|
; The JOY API version, stored in JOY_HDR::VERSION
|
||||||
|
|
||||||
JOY_API_VERSION = $04
|
JOY_API_VERSION = $05
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Variables
|
; Variables
|
||||||
|
|||||||
@@ -70,14 +70,13 @@
|
|||||||
BAR .addr ; BAR routine
|
BAR .addr ; BAR routine
|
||||||
TEXTSTYLE .addr ; TEXTSTYLE routine
|
TEXTSTYLE .addr ; TEXTSTYLE routine
|
||||||
OUTTEXT .addr ; OUTTEXT routine
|
OUTTEXT .addr ; OUTTEXT routine
|
||||||
IRQ .addr ; IRQ routine
|
|
||||||
.endstruct
|
.endstruct
|
||||||
.endstruct
|
.endstruct
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; The TGI API version, stored at TGI_HDR_VERSION
|
; The TGI API version, stored at TGI_HDR_VERSION
|
||||||
|
|
||||||
TGI_API_VERSION = $05
|
TGI_API_VERSION = $06
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; Bitmapped tgi driver flags, stored in TGI_HDR::VARS::FLAGS.
|
; Bitmapped tgi driver flags, stored in TGI_HDR::VARS::FLAGS.
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ MEMORY {
|
|||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
EXEHDR: load = HEADER, type = ro;
|
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||||
STARTUP: load = MAIN, type = ro;
|
STARTUP: load = MAIN, type = ro;
|
||||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||||
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
|
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ MEMORY {
|
|||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
EXEHDR: load = HEADER, type = ro;
|
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||||
STARTUP: load = MAIN, type = ro, define = yes;
|
STARTUP: load = MAIN, type = ro, define = yes;
|
||||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||||
CODE: load = MAIN, type = ro;
|
CODE: load = MAIN, type = ro;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ MEMORY {
|
|||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
EXEHDR: load = HEADER, type = ro;
|
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||||
STARTUP: load = MAIN, type = ro;
|
STARTUP: load = MAIN, type = ro;
|
||||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||||
CODE: load = MAIN, type = ro;
|
CODE: load = MAIN, type = ro;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ MEMORY {
|
|||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
EXEHDR: load = HEADER, type = ro;
|
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||||
STARTUP: load = MAIN, type = ro;
|
STARTUP: load = MAIN, type = ro;
|
||||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||||
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
|
HGR: load = MAIN, type = rw, optional = yes, start = $2000;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ MEMORY {
|
|||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
EXEHDR: load = HEADER, type = ro;
|
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||||
STARTUP: load = MAIN, type = ro, define = yes;
|
STARTUP: load = MAIN, type = ro, define = yes;
|
||||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||||
CODE: load = MAIN, type = ro;
|
CODE: load = MAIN, type = ro;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ MEMORY {
|
|||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
ZEROPAGE: load = ZP, type = zp;
|
ZEROPAGE: load = ZP, type = zp;
|
||||||
EXEHDR: load = HEADER, type = ro;
|
EXEHDR: load = HEADER, type = ro, optional = yes;
|
||||||
STARTUP: load = MAIN, type = ro;
|
STARTUP: load = MAIN, type = ro;
|
||||||
LOWCODE: load = MAIN, type = ro, optional = yes;
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
||||||
CODE: load = MAIN, type = ro;
|
CODE: load = MAIN, type = ro;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
SYMBOLS {
|
SYMBOLS {
|
||||||
__STACKSIZE__: type = weak, value = $0180;
|
__STACKSIZE__: type = weak, value = $0040;
|
||||||
}
|
}
|
||||||
MEMORY {
|
MEMORY {
|
||||||
ZP: file = "", define = yes, start = $0020, size = $00E0;
|
ZP: file = "", define = yes, start = $0020, size = $00E0;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ containing the load address and load length. The default load address is
|
|||||||
$803.
|
$803.
|
||||||
|
|
||||||
<bf/AppleCommander 1.3.5/ or later (available at <url
|
<bf/AppleCommander 1.3.5/ or later (available at <url
|
||||||
url="http://applecommander.sourceforge.net/">) includes the option <tt/-cc65/
|
url="https://applecommander.github.io/">) includes the option <tt/-cc65/
|
||||||
that allows to put binary files with a DOS 3.3 header onto disk images
|
that allows to put binary files with a DOS 3.3 header onto disk images
|
||||||
containing DOS 3.3 as well as ProDOS 8.
|
containing DOS 3.3 as well as ProDOS 8.
|
||||||
|
|
||||||
@@ -168,9 +168,44 @@ Parameters:
|
|||||||
</descrip><p>
|
</descrip><p>
|
||||||
|
|
||||||
|
|
||||||
|
<sect1><tt/apple2-hgr.cfg/<p>
|
||||||
|
|
||||||
|
Configuration for a program including a hires page. See <tt>testcode/lib/apple/hgrtest.c</tt>
|
||||||
|
for an example of such a program.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
<descrip>
|
||||||
|
|
||||||
|
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||||
|
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||||
|
|
||||||
|
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||||
|
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||||
|
the header.
|
||||||
|
|
||||||
|
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||||
|
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||||
|
stack size.
|
||||||
|
|
||||||
|
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||||
|
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||||
|
highest usable address.
|
||||||
|
|
||||||
|
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||||
|
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||||
|
code address.
|
||||||
|
|
||||||
|
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||||
|
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||||
|
code size.
|
||||||
|
|
||||||
|
</descrip><p>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt/apple2-overlay.cfg/<p>
|
<sect1><tt/apple2-overlay.cfg/<p>
|
||||||
|
|
||||||
Configuration for overlay programs with the up to nine overlays. The overlay files
|
Configuration for an overlay program with up to nine overlays. The overlay files
|
||||||
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
||||||
information on overlays.
|
information on overlays.
|
||||||
|
|
||||||
@@ -210,7 +245,7 @@ Parameters:
|
|||||||
|
|
||||||
<sect1><tt/apple2-asm.cfg/<p>
|
<sect1><tt/apple2-asm.cfg/<p>
|
||||||
|
|
||||||
Configuration for a assembler programs which don't need a special setup.
|
Configuration for an assembler program that doesn't need a special setup.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ containing the load address and load length. The default load address is
|
|||||||
$803.
|
$803.
|
||||||
|
|
||||||
<bf/AppleCommander 1.3.5/ or later (available at <url
|
<bf/AppleCommander 1.3.5/ or later (available at <url
|
||||||
url="http://applecommander.sourceforge.net/">) includes the option <tt/-cc65/
|
url="https://applecommander.github.io/">) includes the option <tt/-cc65/
|
||||||
that allows to put binary files with a DOS 3.3 header onto disk images
|
that allows to put binary files with a DOS 3.3 header onto disk images
|
||||||
containing DOS 3.3 as well as ProDOS 8.
|
containing DOS 3.3 as well as ProDOS 8.
|
||||||
|
|
||||||
@@ -168,9 +168,44 @@ Parameters:
|
|||||||
</descrip><p>
|
</descrip><p>
|
||||||
|
|
||||||
|
|
||||||
|
<sect1><tt/apple2enh-hgr.cfg/<p>
|
||||||
|
|
||||||
|
Configuration for a program including a hires page. See <tt>testcode/lib/apple/hgrtest.c</tt>
|
||||||
|
for an example of such a program.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
<descrip>
|
||||||
|
|
||||||
|
<tag><tt/STARTADDRESS:/ Program start address</tag>
|
||||||
|
Default: $803. Use <tt/-S <addr>/ to set a different start address.
|
||||||
|
|
||||||
|
<tag><tt/__EXEHDR__:/ Executable file header</tag>
|
||||||
|
Default: DOS 3.3 header (address and length). Use <tt/-D __EXEHDR__=0/ to omit
|
||||||
|
the header.
|
||||||
|
|
||||||
|
<tag><tt/__STACKSIZE__:/ C runtime stack size</tag>
|
||||||
|
Default: $800. Use <tt/-D __STACKSIZE__=<size>/ to set a different
|
||||||
|
stack size.
|
||||||
|
|
||||||
|
<tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
|
||||||
|
Default: $9600. Use <tt/-D __HIMEM__=<addr>/ to set a different
|
||||||
|
highest usable address.
|
||||||
|
|
||||||
|
<tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
|
||||||
|
Default: $D400. Use <tt/-D __LCADDR__=<addr>/ to set a different
|
||||||
|
code address.
|
||||||
|
|
||||||
|
<tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
|
||||||
|
Default: $C00. Use <tt/-D __LCSIZE__=<size>/ to set a different
|
||||||
|
code size.
|
||||||
|
|
||||||
|
</descrip><p>
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt/apple2enh-overlay.cfg/<p>
|
<sect1><tt/apple2enh-overlay.cfg/<p>
|
||||||
|
|
||||||
Configuration for overlay programs with the up to nine overlays. The overlay files
|
Configuration for an overlay program with up to nine overlays. The overlay files
|
||||||
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
don't include the DOS 3.3 header. See <tt>samples/overlaydemo.c</tt> for more
|
||||||
information on overlays.
|
information on overlays.
|
||||||
|
|
||||||
@@ -210,7 +245,7 @@ Parameters:
|
|||||||
|
|
||||||
<sect1><tt/apple2enh-asm.cfg/<p>
|
<sect1><tt/apple2enh-asm.cfg/<p>
|
||||||
|
|
||||||
Configuration for a assembler programs which don't need a special setup.
|
Configuration for an assembler program that doesn't need a special setup.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
||||||
|
|||||||
108
include/_gtia.h
108
include/_gtia.h
@@ -34,63 +34,65 @@
|
|||||||
|
|
||||||
/* Define a structure with the gtia register offsets */
|
/* Define a structure with the gtia register offsets */
|
||||||
struct __gtia_write {
|
struct __gtia_write {
|
||||||
unsigned char hposp0; /* horizontal position player 0 */
|
unsigned char hposp0; /* 0x00: horizontal position player 0 */
|
||||||
unsigned char hposp1; /* horizontal position player 1 */
|
unsigned char hposp1; /* 0x01: horizontal position player 1 */
|
||||||
unsigned char hposp2; /* horizontal position player 2 */
|
unsigned char hposp2; /* 0x02: horizontal position player 2 */
|
||||||
unsigned char hposp3; /* horizontal position player 3 */
|
unsigned char hposp3; /* 0x03: horizontal position player 3 */
|
||||||
unsigned char hposm0; /* horizontal position missile 0 */
|
unsigned char hposm0; /* 0x04: horizontal position missile 0 */
|
||||||
unsigned char hposm1; /* horizontal position missile 1 */
|
unsigned char hposm1; /* 0x05: horizontal position missile 1 */
|
||||||
unsigned char hposm2; /* horizontal position missile 2 */
|
unsigned char hposm2; /* 0x06: horizontal position missile 2 */
|
||||||
unsigned char hposm3; /* horizontal position missile 3 */
|
unsigned char hposm3; /* 0x07: horizontal position missile 3 */
|
||||||
unsigned char sizep0; /* size of player 0 */
|
unsigned char sizep0; /* 0x08: size of player 0 */
|
||||||
unsigned char sizep1; /* size of player 1 */
|
unsigned char sizep1; /* 0x09: size of player 1 */
|
||||||
unsigned char sizep2; /* size of player 2 */
|
unsigned char sizep2; /* 0x0A: size of player 2 */
|
||||||
unsigned char sizep3; /* size of player 3 */
|
unsigned char sizep3; /* 0x0B: size of player 3 */
|
||||||
unsigned char sizem; /* size of missiles */
|
unsigned char sizem; /* 0x0C: size of missiles */
|
||||||
unsigned char grafp0; /* graphics shape player 0 */
|
unsigned char grafp0; /* 0x0D: graphics shape player 0 */
|
||||||
unsigned char grafp1; /* graphics shape player 1 */
|
unsigned char grafp1; /* 0x0E: graphics shape player 1 */
|
||||||
unsigned char grafp2; /* graphics shape player 2 */
|
unsigned char grafp2; /* 0x0F: graphics shape player 2 */
|
||||||
unsigned char grafp3; /* graphics shape player 3 */
|
unsigned char grafp3; /* 0x10: graphics shape player 3 */
|
||||||
unsigned char grafm; /* graphics shape missiles */
|
unsigned char grafm; /* 0x11: graphics shape missiles */
|
||||||
unsigned char colpm0; /* color player and missile 0 */
|
unsigned char colpm0; /* 0x12: color player and missile 0 */
|
||||||
unsigned char colpm1; /* color player and missile 1 */
|
unsigned char colpm1; /* 0x13: color player and missile 1 */
|
||||||
unsigned char colpm2; /* color player and missile 2 */
|
unsigned char colpm2; /* 0x14: color player and missile 2 */
|
||||||
unsigned char colpm3; /* color player and missile 3 */
|
unsigned char colpm3; /* 0x15: color player and missile 3 */
|
||||||
unsigned char colpf0; /* color playfield 0 */
|
unsigned char colpf0; /* 0x16: color playfield 0 */
|
||||||
unsigned char colpf1; /* color playfield 1 */
|
unsigned char colpf1; /* 0x17: color playfield 1 */
|
||||||
unsigned char colpf2; /* color playfield 2 */
|
unsigned char colpf2; /* 0x18: color playfield 2 */
|
||||||
unsigned char colpf3; /* color playfield 3 */
|
unsigned char colpf3; /* 0x19: color playfield 3 */
|
||||||
unsigned char colbk; /* color background */
|
unsigned char colbk; /* 0x1A: color background */
|
||||||
unsigned char prior; /* priority selection */
|
unsigned char prior; /* 0x1B: priority selection */
|
||||||
unsigned char vdelay; /* vertical delay */
|
unsigned char vdelay; /* 0x1C: vertical delay */
|
||||||
unsigned char gractl; /* stick/paddle latch, p/m control */
|
unsigned char gractl; /* 0x1D: stick/paddle latch, p/m control */
|
||||||
unsigned char hitclr; /* clear p/m collision */
|
unsigned char hitclr; /* 0x1E: clear p/m collision */
|
||||||
unsigned char consol; /* console buttons */
|
unsigned char consol; /* 0x1F: builtin speaker */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Define a structure with the gtia register offsets */
|
/* Define a structure with the gtia register offsets */
|
||||||
struct __gtia_read {
|
struct __gtia_read {
|
||||||
unsigned char m0pf; /* missile 0 to playfield collision */
|
unsigned char m0pf; /* 0x00: missile 0 to playfield collision */
|
||||||
unsigned char m1pf; /* missile 1 to playfield collision */
|
unsigned char m1pf; /* 0x01: missile 1 to playfield collision */
|
||||||
unsigned char m2pf; /* missile 2 to playfield collision */
|
unsigned char m2pf; /* 0x02: missile 2 to playfield collision */
|
||||||
unsigned char m3pf; /* missile 3 to playfield collision */
|
unsigned char m3pf; /* 0x03: missile 3 to playfield collision */
|
||||||
unsigned char p0pf; /* player 0 to playfield collision */
|
unsigned char p0pf; /* 0x04: player 0 to playfield collision */
|
||||||
unsigned char p1pf; /* player 1 to playfield collision */
|
unsigned char p1pf; /* 0x05: player 1 to playfield collision */
|
||||||
unsigned char p2pf; /* player 2 to playfield collision */
|
unsigned char p2pf; /* 0x06: player 2 to playfield collision */
|
||||||
unsigned char p3pf; /* player 3 to playfield collision */
|
unsigned char p3pf; /* 0x07: player 3 to playfield collision */
|
||||||
unsigned char m0pl; /* missile 0 to player collision */
|
unsigned char m0pl; /* 0x08: missile 0 to player collision */
|
||||||
unsigned char m1pl; /* missile 1 to player collision */
|
unsigned char m1pl; /* 0x09: missile 1 to player collision */
|
||||||
unsigned char m2pl; /* missile 2 to player collision */
|
unsigned char m2pl; /* 0x0A: missile 2 to player collision */
|
||||||
unsigned char m3pl; /* missile 3 to player collision */
|
unsigned char m3pl; /* 0x0B: missile 3 to player collision */
|
||||||
unsigned char p0pl; /* player 0 to player collision */
|
unsigned char p0pl; /* 0x0C: player 0 to player collision */
|
||||||
unsigned char p1pl; /* player 1 to player collision */
|
unsigned char p1pl; /* 0x0D: player 1 to player collision */
|
||||||
unsigned char p2pl; /* player 2 to player collision */
|
unsigned char p2pl; /* 0x0E: player 2 to player collision */
|
||||||
unsigned char p3pl; /* player 3 to player collision */
|
unsigned char p3pl; /* 0x0F: player 3 to player collision */
|
||||||
unsigned char trig0; /* joystick trigger 0 */
|
unsigned char trig0; /* 0x10: joystick trigger 0 */
|
||||||
unsigned char trig1; /* joystick trigger 1 */
|
unsigned char trig1; /* 0x11: joystick trigger 1 */
|
||||||
unsigned char trig2; /* joystick trigger 2 */
|
unsigned char trig2; /* 0x12: joystick trigger 2 */
|
||||||
unsigned char trig3; /* joystick trigger 3 */
|
unsigned char trig3; /* 0x13: joystick trigger 3 */
|
||||||
unsigned char pal; /* pal/ntsc flag */
|
unsigned char pal; /* 0x14: pal/ntsc flag */
|
||||||
|
unsigned char unused[10];
|
||||||
|
unsigned char consol; /* 0x1F: console buttons */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* End of _gtia.h */
|
/* End of _gtia.h */
|
||||||
|
|||||||
119
include/ace.h
119
include/ace.h
@@ -1,119 +0,0 @@
|
|||||||
/*****************************************************************************/
|
|
||||||
/* */
|
|
||||||
/* ace.h */
|
|
||||||
/* */
|
|
||||||
/* ACE system-specific definitions */
|
|
||||||
/* */
|
|
||||||
/* */
|
|
||||||
/* */
|
|
||||||
/* (C) 1998-2015, Ullrich von Bassewitz */
|
|
||||||
/* Roemerstrasse 52 */
|
|
||||||
/* D-70794 Filderstadt */
|
|
||||||
/* EMail: uz@cc65.org */
|
|
||||||
/* */
|
|
||||||
/* */
|
|
||||||
/* This software is provided 'as-is', without any expressed or implied */
|
|
||||||
/* warranty. In no event will the authors be held liable for any damages */
|
|
||||||
/* arising from the use of this software. */
|
|
||||||
/* */
|
|
||||||
/* Permission is granted to anyone to use this software for any purpose, */
|
|
||||||
/* including commercial applications, and to alter it and redistribute it */
|
|
||||||
/* freely, subject to the following restrictions: */
|
|
||||||
/* */
|
|
||||||
/* 1. The origin of this software must not be misrepresented; you must not */
|
|
||||||
/* claim that you wrote the original software. If you use this software */
|
|
||||||
/* in a product, an acknowledgment in the product documentation would be */
|
|
||||||
/* appreciated but is not required. */
|
|
||||||
/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
||||||
/* be misrepresented as being the original software. */
|
|
||||||
/* 3. This notice may not be removed or altered from any source */
|
|
||||||
/* distribution. */
|
|
||||||
/* */
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _ACE_H
|
|
||||||
#define _ACE_H
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Check for errors */
|
|
||||||
#if !defined(__ACE__)
|
|
||||||
# error This module may only be used when compiling for the ACE os!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _STDDEF_H
|
|
||||||
#include <stddef.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct aceDirentBuf {
|
|
||||||
unsigned long ad_size; /* Size in bytes */
|
|
||||||
unsigned char ad_date [8]; /* YY:YY:MM:DD:HH:MM:SS:TW */
|
|
||||||
char ad_type [4]; /* File type as ASCIIZ string */
|
|
||||||
unsigned char ad_flags; /* File flags */
|
|
||||||
unsigned char ad_usage; /* More flags */
|
|
||||||
unsigned char ad_namelen; /* Length of name */
|
|
||||||
char ad_name [17]; /* Name itself, ASCIIZ */
|
|
||||||
};
|
|
||||||
|
|
||||||
int __cdecl__ aceDirOpen (char* dir);
|
|
||||||
int __cdecl__ aceDirClose (int handle);
|
|
||||||
int __cdecl__ aceDirRead (int handle, struct aceDirentBuf* buf);
|
|
||||||
|
|
||||||
/* Type of an ACE key. Key in low byte, shift mask in high byte */
|
|
||||||
typedef unsigned int aceKey;
|
|
||||||
|
|
||||||
/* #defines for the shift mask returned by aceConGetKey */
|
|
||||||
#define aceSH_KEY 0x00FF /* Mask key itself */
|
|
||||||
#define aceSH_MASK 0xFF00 /* Mask shift mask */
|
|
||||||
#define aceSH_EXT 0x2000 /* Extended key */
|
|
||||||
#define aceSH_CAPS 0x1000 /* Caps lock key */
|
|
||||||
#define aceSH_ALT 0x0800 /* Alternate key */
|
|
||||||
#define aceSH_CTRL 0x0400 /* Ctrl key */
|
|
||||||
#define aceSH_CBM 0x0200 /* Commodore key */
|
|
||||||
#define aceSH_SHIFT 0x0100 /* Shift key */
|
|
||||||
|
|
||||||
/* #defines for the options in aceConSetOpt/aceConGetOpt */
|
|
||||||
#define aceOP_PUTMASK 1 /* Console put mask */
|
|
||||||
#define aceOP_CHARCOLOR 2 /* Character color */
|
|
||||||
#define aceOP_CHARATTR 3 /* Character attribute */
|
|
||||||
#define aceOP_FILLCOLOR 4 /* Fill color */
|
|
||||||
#define aceOP_FILLATTR 5 /* Fill attribute */
|
|
||||||
#define aceOP_CRSCOLOR 6 /* Cursor color */
|
|
||||||
#define aceOP_CRSWRAP 7 /* Force cursor wrap */
|
|
||||||
#define aceOP_SHSCROLL 8 /* Shift keys for scrolling */
|
|
||||||
#define aceOP_MOUSCALE 9 /* Mouse scaling */
|
|
||||||
#define aceOP_RPTDELAY 10 /* Key repeat delay */
|
|
||||||
#define aceOP_RPTRATE 11 /* Key repeat rate */
|
|
||||||
|
|
||||||
/* Console functions */
|
|
||||||
void __cdecl__ aceConWrite (char* buf, size_t count);
|
|
||||||
void __cdecl__ aceConPutLit (int c);
|
|
||||||
void __cdecl__ aceConPos (unsigned x, unsigned y);
|
|
||||||
void __cdecl__ aceConGetPos (unsigned* x, unsigned* y);
|
|
||||||
unsigned aceConGetX (void);
|
|
||||||
unsigned aceConGetY (void);
|
|
||||||
char __cdecl__* aceConInput (char* buf, unsigned initial);
|
|
||||||
int aceConStopKey (void);
|
|
||||||
aceKey aceConGetKey (void);
|
|
||||||
int __cdecl__ aceConKeyAvail (aceKey* key);
|
|
||||||
void __cdecl__ aceConKeyMat (char* matrix);
|
|
||||||
void __cdecl__ aceConSetOpt (unsigned char opt, unsigned char val);
|
|
||||||
int __cdecl__ aceConGetOpt (unsigned char opt);
|
|
||||||
|
|
||||||
/* Misc stuff */
|
|
||||||
int __cdecl__ aceMiscIoPeek (unsigned addr);
|
|
||||||
void __cdecl__ aceMiscIoPoke (unsigned addr, unsigned char val);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of ace.h */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -41,9 +41,10 @@
|
|||||||
# error This module may only be used when compiling for the Apple ][!
|
# error This module may only be used when compiling for the Apple ][!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <apple2_filetype.h>
|
#include <apple2_filetype.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -42,10 +42,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* If not already done, include the apple2.h header file */
|
#include <apple2.h>
|
||||||
#if !defined(_APPLE2_H)
|
|
||||||
# include <apple2.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -355,5 +355,7 @@ struct __iocb {
|
|||||||
#define IOCB_GETCWD 0x30 /* get current directory (MyDOS/SpartaDOS) */
|
#define IOCB_GETCWD 0x30 /* get current directory (MyDOS/SpartaDOS) */
|
||||||
#define IOCB_FORMAT 0xFE /* format */
|
#define IOCB_FORMAT 0xFE /* format */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of atari.h */
|
/* End of atari.h */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -8,9 +8,13 @@
|
|||||||
/* */
|
/* */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _ATARI2600_H
|
#ifndef _ATARI2600_H
|
||||||
#define _ATARI2600_H
|
#define _ATARI2600_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Check for errors */
|
/* Check for errors */
|
||||||
#if !defined(__ATARI2600__)
|
#if !defined(__ATARI2600__)
|
||||||
# error This module may only be used when compiling for the Atari 2600!
|
# error This module may only be used when compiling for the Atari 2600!
|
||||||
@@ -22,5 +26,7 @@
|
|||||||
#include <_riot.h>
|
#include <_riot.h>
|
||||||
#define RIOT (*(struct __riot*)0x0280)
|
#define RIOT (*(struct __riot*)0x0280)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of atari2600.h */
|
/* End of atari2600.h */
|
||||||
#endif /* #ifndef _ATARI2600_H */
|
#endif
|
||||||
|
|||||||
@@ -47,9 +47,7 @@
|
|||||||
|
|
||||||
/* Include the base header file for the 264 series. include file.
|
/* Include the base header file for the 264 series. include file.
|
||||||
*/
|
*/
|
||||||
#ifndef _CBM264_H
|
|
||||||
#include <cbm264.h>
|
#include <cbm264.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -46,10 +46,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* We need NULL. */
|
/* We need NULL. */
|
||||||
|
#include <stddef.h>
|
||||||
#if !defined(_STDDEF_H)
|
|
||||||
# include <stddef.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Load the system-specific files here, if needed. */
|
/* Load the system-specific files here, if needed. */
|
||||||
#if defined(__C64__) && !defined(_C64_H)
|
#if defined(__C64__) && !defined(_C64_H)
|
||||||
|
|||||||
@@ -85,7 +85,8 @@
|
|||||||
#define SID (*(struct __sid*)0xDA00)
|
#define SID (*(struct __sid*)0xDA00)
|
||||||
|
|
||||||
#include <_6526.h>
|
#include <_6526.h>
|
||||||
#define CIA (*(struct __6526*)0xDC00)
|
#define CIA1 (*(struct __6526*)0xDB00)
|
||||||
|
#define CIA2 (*(struct __6526*)0xDC00)
|
||||||
|
|
||||||
#include <_6551.h>
|
#include <_6551.h>
|
||||||
#define ACIA (*(struct __6551*)0xDD00)
|
#define ACIA (*(struct __6551*)0xDD00)
|
||||||
|
|||||||
@@ -54,40 +54,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined(_STDARG_H)
|
#include <stdarg.h>
|
||||||
# include <stdarg.h>
|
#include <target.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Include the correct machine-specific file */
|
|
||||||
#if defined(__APPLE2ENH__)
|
|
||||||
# include <apple2enh.h>
|
|
||||||
#elif defined(__APPLE2__)
|
|
||||||
# include <apple2.h>
|
|
||||||
#elif defined(__ATARI5200__)
|
|
||||||
# include <atari5200.h>
|
|
||||||
#elif defined(__ATARI__)
|
|
||||||
# include <atari.h>
|
|
||||||
#elif defined(__ATMOS__)
|
|
||||||
# include <atmos.h>
|
|
||||||
#elif defined(__CBM__)
|
|
||||||
# include <cbm.h>
|
|
||||||
#elif defined(__CREATIVISION__)
|
|
||||||
# include <creativision.h>
|
|
||||||
#elif defined(__GAMATE__)
|
|
||||||
# include <gamate.h>
|
|
||||||
#elif defined(__GEOS__)
|
|
||||||
# include <geos.h>
|
|
||||||
#elif defined(__LUNIX__)
|
|
||||||
# include <lunix.h>
|
|
||||||
#elif defined(__LYNX__)
|
|
||||||
# include <lynx.h>
|
|
||||||
#elif defined(__NES__)
|
|
||||||
# include <nes.h>
|
|
||||||
#elif defined(__OSIC1P__)
|
|
||||||
# include <osic1p.h>
|
|
||||||
#elif defined(__PCE__)
|
|
||||||
# include <pce.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -232,16 +200,16 @@ void __fastcall__ cputhex16 (unsigned val);
|
|||||||
** the macro will give access to the actual function.
|
** the macro will give access to the actual function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_textcolor)
|
#ifdef _textcolor
|
||||||
# define textcolor(x) _textcolor(x)
|
# define textcolor(x) _textcolor(x)
|
||||||
#endif
|
#endif
|
||||||
#if defined(_bgcolor)
|
#ifdef _bgcolor
|
||||||
# define bgcolor(x) _bgcolor(x)
|
# define bgcolor(x) _bgcolor(x)
|
||||||
#endif
|
#endif
|
||||||
#if defined(_bordercolor)
|
#ifdef _bordercolor
|
||||||
# define bordercolor(x) _bordercolor(x)
|
# define bordercolor(x) _bordercolor(x)
|
||||||
#endif
|
#endif
|
||||||
#if defined(_cpeekcolor)
|
#ifdef _cpeekcolor
|
||||||
# define cpeekcolor(x) _cpeekcolor(x)
|
# define cpeekcolor(x) _cpeekcolor(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,13 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _HAVE_size_t
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#define _HAVE_size_t
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|||||||
@@ -19,53 +19,19 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _GCONST_H
|
|
||||||
#include <geos/gconst.h>
|
#include <geos/gconst.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GSYM_H
|
|
||||||
#include <geos/gsym.h>
|
#include <geos/gsym.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GDISK_H
|
|
||||||
#include <geos/gdisk.h>
|
#include <geos/gdisk.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GFILE_H
|
|
||||||
#include <geos/gfile.h>
|
#include <geos/gfile.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GPROCESS_H
|
|
||||||
#include <geos/gprocess.h>
|
#include <geos/gprocess.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GGRAPH_H
|
|
||||||
#include <geos/ggraph.h>
|
#include <geos/ggraph.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GMENU_H
|
|
||||||
#include <geos/gmenu.h>
|
#include <geos/gmenu.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GSPRITE_H
|
|
||||||
#include <geos/gsprite.h>
|
#include <geos/gsprite.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GMEMORY_H
|
|
||||||
#include <geos/gmemory.h>
|
#include <geos/gmemory.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GSYS_H
|
|
||||||
#include <geos/gsys.h>
|
#include <geos/gsys.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _GDLGBOX_H
|
|
||||||
#include <geos/gdlgbox.h>
|
#include <geos/gdlgbox.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define CH_ULCORNER '+'
|
#define CH_ULCORNER '+'
|
||||||
@@ -140,5 +106,6 @@
|
|||||||
#define JOY_BTN_1_MASK 0x10
|
#define JOY_BTN_1_MASK 0x10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of geos.h */
|
/* End of geos.h */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#ifndef _GDISK_H
|
#ifndef _GDISK_H
|
||||||
#define _GDISK_H
|
#define _GDISK_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
char __fastcall__ ReadBuff(struct tr_se *myTrSe);
|
char __fastcall__ ReadBuff(struct tr_se *myTrSe);
|
||||||
char __fastcall__ WriteBuff(struct tr_se *myTrSe);
|
char __fastcall__ WriteBuff(struct tr_se *myTrSe);
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#ifndef _GFILE_H
|
#ifndef _GFILE_H
|
||||||
#define _GFILE_H
|
#define _GFILE_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
struct filehandle *Get1stDirEntry(void);
|
struct filehandle *Get1stDirEntry(void);
|
||||||
struct filehandle *GetNxtDirEntry(void);
|
struct filehandle *GetNxtDirEntry(void);
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#ifndef _GGRAPH_H
|
#ifndef _GGRAPH_H
|
||||||
#define _GGRAPH_H
|
#define _GGRAPH_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
void __fastcall__ SetPattern(char newpattern);
|
void __fastcall__ SetPattern(char newpattern);
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#ifndef _GMEMORY_H
|
#ifndef _GMEMORY_H
|
||||||
#define _GMEMORY_H
|
#define _GMEMORY_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
void __fastcall__ CopyString(char *dest, const char *source);
|
void __fastcall__ CopyString(char *dest, const char *source);
|
||||||
char __fastcall__ CmpString(const char *dest, const char *source);
|
char __fastcall__ CmpString(const char *dest, const char *source);
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#ifndef _GMENU_H
|
#ifndef _GMENU_H
|
||||||
#define _GMENU_H
|
#define _GMENU_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
void __fastcall__ DoMenu(struct menu *myMenu);
|
void __fastcall__ DoMenu(struct menu *myMenu);
|
||||||
void ReDoMenu(void);
|
void ReDoMenu(void);
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#ifndef _GPROCESS_H
|
#ifndef _GPROCESS_H
|
||||||
#define _GPROCESS_H
|
#define _GPROCESS_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
void __fastcall__ InitProcesses(char number, struct process *proctab);
|
void __fastcall__ InitProcesses(char number, struct process *proctab);
|
||||||
void __fastcall__ RestartProcess(char number);
|
void __fastcall__ RestartProcess(char number);
|
||||||
|
|||||||
@@ -7,9 +7,7 @@
|
|||||||
#ifndef _GSYM_H
|
#ifndef _GSYM_H
|
||||||
#define _GSYM_H
|
#define _GSYM_H
|
||||||
|
|
||||||
#ifndef _GSTRUCT_H
|
|
||||||
#include <geos/gstruct.h>
|
#include <geos/gstruct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#define r0 (*(unsigned*)(R_BASE + 0x00))
|
#define r0 (*(unsigned*)(R_BASE + 0x00))
|
||||||
#define r0L (*(char*)(R_BASE + 0x00))
|
#define r0L (*(char*)(R_BASE + 0x00))
|
||||||
|
|||||||
@@ -31,9 +31,13 @@ char get_ostype(void);
|
|||||||
#define GEOS4 0x04 /* plus4 geos is not or'ed with version */
|
#define GEOS4 0x04 /* plus4 geos is not or'ed with version */
|
||||||
#define GEOS128 0x80
|
#define GEOS128 0x80
|
||||||
/* version flags */
|
/* version flags */
|
||||||
|
#define MEGAPATCH3 0x03
|
||||||
|
#define GATEWAY 0x08
|
||||||
#define GEOS_V10 0x10
|
#define GEOS_V10 0x10
|
||||||
#define GEOS_V11 0x11
|
#define GEOS_V11 0x11
|
||||||
#define GEOS_V12 0x12 /* ??? not sure */
|
#define GEOS_V12 0x12
|
||||||
|
#define GEOS_V13 0x13
|
||||||
|
#define GEOS_V15 0x15
|
||||||
#define GEOS_V20 0x20
|
#define GEOS_V20 0x20
|
||||||
#define WHEELS 0x40 /* only Wheels? */
|
#define WHEELS 0x40 /* only Wheels? */
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <target.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Definitions */
|
/* Definitions */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -103,6 +107,3 @@ unsigned char __fastcall__ joy_read (unsigned char joystick);
|
|||||||
|
|
||||||
/* End of joystick.h */
|
/* End of joystick.h */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ typedef struct {
|
|||||||
void* uninstall; /* UNINSTALL routine */
|
void* uninstall; /* UNINSTALL routine */
|
||||||
void* count; /* COUNT routine */
|
void* count; /* COUNT routine */
|
||||||
void* read; /* READ routine */
|
void* read; /* READ routine */
|
||||||
void* irq; /* IRQ routine */
|
|
||||||
|
|
||||||
} joy_drv_header;
|
} joy_drv_header;
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ extern void lynx_160_102_16_tgi[]; /* Referred to by tgi_static_stddrv[] */
|
|||||||
/* Sound support */
|
/* Sound support */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void lynx_snd_init (void);
|
void lynx_snd_init (void);
|
||||||
/* Initialize the sound driver */
|
/* Initialize the sound driver */
|
||||||
|
|
||||||
@@ -144,6 +146,8 @@ void __fastcall__ lynx_snd_stop_channel (unsigned char channel);
|
|||||||
unsigned char lynx_snd_active(void);
|
unsigned char lynx_snd_active(void);
|
||||||
/* Show which channels are active */
|
/* Show which channels are active */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Accessing the cart */
|
/* Accessing the cart */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -209,5 +213,6 @@ unsigned __fastcall__ lynx_eewrite (unsigned cell, unsigned val);
|
|||||||
#define SUZY (*(struct __suzy*)0xFC00)
|
#define SUZY (*(struct __suzy*)0xFC00)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of lynx.h */
|
/* End of lynx.h */
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -47,9 +47,7 @@
|
|||||||
|
|
||||||
/* Include the base header file for the 264 series. include file.
|
/* Include the base header file for the 264 series. include file.
|
||||||
*/
|
*/
|
||||||
#ifndef _CBM264_H
|
|
||||||
#include <cbm264.h>
|
#include <cbm264.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define hardware */
|
/* Define hardware */
|
||||||
#include <_6551.h>
|
#include <_6551.h>
|
||||||
|
|||||||
@@ -38,12 +38,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _STDDEF_H
|
#include <stddef.h>
|
||||||
# include <stddef.h>
|
#include <stdarg.h>
|
||||||
#endif
|
|
||||||
#ifndef _STDARG_H
|
|
||||||
# include <stdarg.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -147,6 +143,3 @@ void __fastcall__ _poserror (const char* msg); /* cc65 */
|
|||||||
|
|
||||||
/* End of stdio.h */
|
/* End of stdio.h */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -54,28 +54,28 @@ struct __sv_lcd {
|
|||||||
unsigned char xpos;
|
unsigned char xpos;
|
||||||
unsigned char ypos;
|
unsigned char ypos;
|
||||||
};
|
};
|
||||||
#define SV_LCD ((struct __sv_lcd*)0x2000)
|
#define SV_LCD (*(struct __sv_lcd*)0x2000)
|
||||||
|
|
||||||
struct __sv_tone {
|
struct __sv_tone {
|
||||||
unsigned delay;
|
unsigned delay;
|
||||||
unsigned char control;
|
unsigned char control;
|
||||||
unsigned char timer;
|
unsigned char timer;
|
||||||
};
|
};
|
||||||
#define SV_RIGHT ((struct __sv_tone*)0x2010)
|
#define SV_RIGHT (*(struct __sv_tone*)0x2010)
|
||||||
#define SV_LEFT ((struct __sv_tone*)0x2014)
|
#define SV_LEFT (*(struct __sv_tone*)0x2014)
|
||||||
|
|
||||||
struct __sv_noise {
|
struct __sv_noise {
|
||||||
unsigned char volume; /* and frequency */
|
unsigned char volume; /* and frequency */
|
||||||
unsigned char timer;
|
unsigned char timer;
|
||||||
unsigned char control;
|
unsigned char control;
|
||||||
};
|
};
|
||||||
#define SV_NOISE ((struct __sv_noise*)0x2028)
|
#define SV_NOISE (*(struct __sv_noise*)0x2028)
|
||||||
|
|
||||||
struct __io_port {
|
struct __io_port {
|
||||||
unsigned char in;
|
unsigned char in;
|
||||||
unsigned char out;
|
unsigned char out;
|
||||||
};
|
};
|
||||||
#define IO_PORT ((struct __io_port*)(0x2021)
|
#define IO_PORT (*(struct __io_port*)0x2021)
|
||||||
|
|
||||||
struct __sv_dma {
|
struct __sv_dma {
|
||||||
unsigned start;
|
unsigned start;
|
||||||
@@ -83,7 +83,7 @@ struct __sv_dma {
|
|||||||
unsigned char control;
|
unsigned char control;
|
||||||
unsigned char on;
|
unsigned char on;
|
||||||
};
|
};
|
||||||
#define SV_DMA ((struct __sv_dma*)0x2018)
|
#define SV_DMA (*(struct __sv_dma*)0x2018)
|
||||||
|
|
||||||
#define SV_CONTROL (*(unsigned char*)0x2020)
|
#define SV_CONTROL (*(unsigned char*)0x2020)
|
||||||
|
|
||||||
|
|||||||
73
include/target.h
Normal file
73
include/target.h
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
/*****************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* target.h */
|
||||||
|
/* */
|
||||||
|
/* Target specific definitions */
|
||||||
|
/* */
|
||||||
|
/* */
|
||||||
|
/* */
|
||||||
|
/* This software is provided 'as-is', without any expressed or implied */
|
||||||
|
/* warranty. In no event will the authors be held liable for any damages */
|
||||||
|
/* arising from the use of this software. */
|
||||||
|
/* */
|
||||||
|
/* Permission is granted to anyone to use this software for any purpose, */
|
||||||
|
/* including commercial applications, and to alter it and redistribute it */
|
||||||
|
/* freely, subject to the following restrictions: */
|
||||||
|
/* */
|
||||||
|
/* 1. The origin of this software must not be misrepresented; you must not */
|
||||||
|
/* claim that you wrote the original software. If you use this software */
|
||||||
|
/* in a product, an acknowledgment in the product documentation would be */
|
||||||
|
/* appreciated but is not required. */
|
||||||
|
/* 2. Altered source versions must be plainly marked as such, and must not */
|
||||||
|
/* be misrepresented as being the original software. */
|
||||||
|
/* 3. This notice may not be removed or altered from any source */
|
||||||
|
/* distribution. */
|
||||||
|
/* */
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef _TARGET_H
|
||||||
|
#define _TARGET_H
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Include the correct target specific file */
|
||||||
|
#if defined(__APPLE2ENH__)
|
||||||
|
# include <apple2enh.h>
|
||||||
|
#elif defined(__APPLE2__)
|
||||||
|
# include <apple2.h>
|
||||||
|
#elif defined(__ATARI__)
|
||||||
|
# include <atari.h>
|
||||||
|
#elif defined(__ATARI2600__)
|
||||||
|
# include <atari2600.h>
|
||||||
|
#elif defined(__ATARI5200__)
|
||||||
|
# include <atari5200.h>
|
||||||
|
#elif defined(__ATMOS__)
|
||||||
|
# include <atmos.h>
|
||||||
|
#elif defined(__CBM__)
|
||||||
|
# include <cbm.h>
|
||||||
|
#elif defined(__CREATIVISION__)
|
||||||
|
# include <creativision.h>
|
||||||
|
#elif defined(__GAMATE__)
|
||||||
|
# include <gamate.h>
|
||||||
|
#elif defined(__GEOS__)
|
||||||
|
# include <geos.h>
|
||||||
|
#elif defined(__LYNX__)
|
||||||
|
# include <lynx.h>
|
||||||
|
#elif defined(__NES__)
|
||||||
|
# include <nes.h>
|
||||||
|
#elif defined(__OSIC1P__)
|
||||||
|
# include <osic1p.h>
|
||||||
|
#elif defined(__PCE__)
|
||||||
|
# include <pce.h>
|
||||||
|
#elif defined(__SUPERVISION__)
|
||||||
|
# include <supervision.h>
|
||||||
|
#elif defined(__TELESTRAT__)
|
||||||
|
# include <telestrat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* End of target.h */
|
||||||
|
#endif
|
||||||
@@ -38,9 +38,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _TGI_ERROR_H
|
|
||||||
#include <tgi/tgi-error.h>
|
#include <tgi/tgi-error.h>
|
||||||
#endif
|
#include <target.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -284,6 +283,3 @@ int __fastcall__ tgi_imulround (int rhs, int lhs);
|
|||||||
|
|
||||||
/* End of tgi.h */
|
/* End of tgi.h */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ PREAD := $FB1E ; Read paddle in X, return AD conv. value in Y
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ not used
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ pages: .byte 2 ; Number of screens available
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ Y2 := ptr4
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry not used
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry not used
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ libref: .addr $0000 ; Library reference
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ******************************************************************************
|
; ******************************************************************************
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry not used
|
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
|
|||||||
@@ -27,24 +27,12 @@
|
|||||||
|
|
||||||
.addr $0000
|
.addr $0000
|
||||||
|
|
||||||
; Button state masks (8 values)
|
|
||||||
|
|
||||||
.byte $10 ; JOY_UP
|
|
||||||
.byte $08 ; JOY_DOWN
|
|
||||||
.byte $01 ; JOY_LEFT
|
|
||||||
.byte $02 ; JOY_RIGHT
|
|
||||||
.byte $20 ; JOY_FIRE
|
|
||||||
.byte $00 ; Future expansion
|
|
||||||
.byte $00 ; Future expansion
|
|
||||||
.byte $00 ; Future expansion
|
|
||||||
|
|
||||||
; Jump table.
|
; Jump table.
|
||||||
|
|
||||||
.addr INSTALL
|
.addr INSTALL
|
||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ YSIZE = 8 ; System font height
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ YSIZE = 8 ; System font height
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry not used
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ pages: .byte 1 ; Number of screens available
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ pages: .byte 0 ; Number of screens available
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr IRQ
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry not used
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -4,8 +4,11 @@
|
|||||||
;4-2-99
|
;4-2-99
|
||||||
|
|
||||||
bootName = $c006
|
bootName = $c006
|
||||||
|
gatewayFlag = $c007
|
||||||
version = $c00f
|
version = $c00f
|
||||||
nationality = $c010
|
nationality = $c010
|
||||||
sysFlgCopy = $c012
|
sysFlgCopy = $c012
|
||||||
c128Flag = $c013
|
c128Flag = $c013
|
||||||
|
mp3Flag = $c014
|
||||||
dateCopy = $c018
|
dateCopy = $c018
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
;
|
;
|
||||||
; 10.09.2001
|
; 10.09.2001
|
||||||
;
|
;
|
||||||
; Plus4 and GEOS 1.1 detection by
|
; Plus4, Gateway, MP3 and GEOS 1.1 detection by
|
||||||
; Marco van den Heuvel, 2010-02-02
|
; Marco van den Heuvel, 2018-02-07
|
||||||
;
|
;
|
||||||
|
|
||||||
; unsigned char get_ostype (void);
|
; unsigned char get_ostype (void);
|
||||||
@@ -26,11 +26,20 @@ _get_ostype:
|
|||||||
and #%11110000
|
and #%11110000
|
||||||
cmp #$10
|
cmp #$10
|
||||||
beq geos10
|
beq geos10
|
||||||
|
cmp #$13 ; either 1.3 or 1.5
|
||||||
|
beq geos13check
|
||||||
|
lda gatewayFlag
|
||||||
|
cmp #$41
|
||||||
|
beq gateway
|
||||||
|
lda mp3Flag
|
||||||
|
cmp #$4d
|
||||||
|
beq megapatch3
|
||||||
lda c128Flag ; we're on at least 2.0
|
lda c128Flag ; we're on at least 2.0
|
||||||
cmp #$18
|
cmp #$18
|
||||||
beq geos_on_plus4
|
beq geos_on_plus4
|
||||||
ora version
|
ora version
|
||||||
rts
|
rts
|
||||||
|
geos13:
|
||||||
geos10:
|
geos10:
|
||||||
lda version
|
lda version
|
||||||
rts
|
rts
|
||||||
@@ -40,6 +49,21 @@ geos11:
|
|||||||
geos_on_plus4:
|
geos_on_plus4:
|
||||||
lda #$04
|
lda #$04
|
||||||
rts
|
rts
|
||||||
|
gateway:
|
||||||
|
lda #$08
|
||||||
|
ora c128Flag
|
||||||
|
rts
|
||||||
|
megapatch3:
|
||||||
|
lda #$03
|
||||||
|
ora c128Flag
|
||||||
|
rts
|
||||||
|
geos13check:
|
||||||
|
lda mp3Flag
|
||||||
|
cmp #$03
|
||||||
|
bne geos13
|
||||||
|
geos15:
|
||||||
|
lda #$15
|
||||||
|
rts
|
||||||
|
|
||||||
_get_tv:
|
_get_tv:
|
||||||
jsr _get_ostype
|
jsr _get_ostype
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ aspect: .word $00D4 ; Aspect ratio (based on 4/3 display)
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
.import joy_libref
|
.import joy_libref
|
||||||
.importzp ptr1
|
.importzp ptr1
|
||||||
.interruptor joy_irq ; Export as IRQ handler
|
|
||||||
|
|
||||||
.include "joy-kernel.inc"
|
.include "joy-kernel.inc"
|
||||||
.include "joy-error.inc"
|
.include "joy-error.inc"
|
||||||
@@ -26,7 +25,6 @@ joy_install: jmp $0000
|
|||||||
joy_uninstall: jmp $0000
|
joy_uninstall: jmp $0000
|
||||||
joy_count: jmp $0000
|
joy_count: jmp $0000
|
||||||
joy_read: jmp $0000
|
joy_read: jmp $0000
|
||||||
joy_irq: .byte $60, $00, $00 ; RTS plus two dummy bytes
|
|
||||||
|
|
||||||
; Driver header signature
|
; Driver header signature
|
||||||
.rodata
|
.rodata
|
||||||
@@ -73,18 +71,7 @@ _joy_install:
|
|||||||
cpy #(JOY_HDR::JUMPTAB + .sizeof(JOY_HDR::JUMPTAB))
|
cpy #(JOY_HDR::JUMPTAB + .sizeof(JOY_HDR::JUMPTAB))
|
||||||
bne @L1
|
bne @L1
|
||||||
|
|
||||||
jsr joy_install ; Call driver install routine
|
jmp joy_install ; Call driver install routine
|
||||||
tay ; Test error code
|
|
||||||
bne @L2 ; Bail out if install had errors
|
|
||||||
|
|
||||||
; Install the IRQ vector if the driver needs it. A/X contains the error code
|
|
||||||
; from joy_install, so don't use it.
|
|
||||||
|
|
||||||
ldy joy_irq+2 ; Check high byte of IRQ vector
|
|
||||||
beq @L2 ; Jump if vector invalid
|
|
||||||
ldy #$4C ; JMP opcode
|
|
||||||
sty joy_irq ; Activate IRQ routine
|
|
||||||
@L2: rts
|
|
||||||
|
|
||||||
; Driver signature invalid
|
; Driver signature invalid
|
||||||
|
|
||||||
@@ -108,9 +95,6 @@ copy: lda (ptr1),y
|
|||||||
; */
|
; */
|
||||||
|
|
||||||
_joy_uninstall:
|
_joy_uninstall:
|
||||||
lda #$60 ; RTS opcode
|
|
||||||
sta joy_irq ; Disable IRQ entry point
|
|
||||||
|
|
||||||
jsr joy_uninstall ; Call the driver routine
|
jsr joy_uninstall ; Call the driver routine
|
||||||
|
|
||||||
_joy_clear_ptr: ; External entry point
|
_joy_clear_ptr: ; External entry point
|
||||||
|
|||||||
@@ -8,5 +8,3 @@
|
|||||||
.include "joy-kernel.inc"
|
.include "joy-kernel.inc"
|
||||||
|
|
||||||
_joy_read = joy_read ; Use driver entry
|
_joy_read = joy_read ; Use driver entry
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
; Oliver Schmidt, 2013-05-31
|
; Oliver Schmidt, 2013-05-31
|
||||||
;
|
;
|
||||||
|
|
||||||
.export joy_libref, ser_libref, tgi_libref
|
.export joy_libref, ser_libref
|
||||||
.import _exit
|
.import _exit
|
||||||
|
|
||||||
joy_libref := _exit
|
joy_libref := _exit
|
||||||
ser_libref := _exit
|
ser_libref := _exit
|
||||||
tgi_libref := _exit
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
.byte $74, $67, $69 ; "tgi"
|
.byte $74, $67, $69 ; "tgi"
|
||||||
.byte TGI_API_VERSION ; TGI API version number
|
.byte TGI_API_VERSION ; TGI API version number
|
||||||
.addr $0000 ; Library reference
|
libref: .addr $0000 ; Library reference
|
||||||
.word 160 ; X resolution
|
.word 160 ; X resolution
|
||||||
.word 102 ; Y resolution
|
.word 102 ; Y resolution
|
||||||
.byte 16 ; Number of drawing colors
|
.byte 16 ; Number of drawing colors
|
||||||
@@ -64,7 +64,6 @@
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr IRQ
|
|
||||||
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
@@ -164,6 +163,18 @@ INSTALL:
|
|||||||
stz BGINDEX
|
stz BGINDEX
|
||||||
stz DRAWPAGE
|
stz DRAWPAGE
|
||||||
stz SWAPREQUEST
|
stz SWAPREQUEST
|
||||||
|
lda libref
|
||||||
|
ldx libref+1
|
||||||
|
sta ptr1
|
||||||
|
stx ptr1+1
|
||||||
|
ldy #1
|
||||||
|
lda #<irq
|
||||||
|
sta (ptr1),y
|
||||||
|
iny
|
||||||
|
lda #>irq
|
||||||
|
sta (ptr1),y
|
||||||
|
lda #$4C ; Jump opcode
|
||||||
|
sta (ptr1) ; Activate IRQ routine
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@@ -175,6 +186,12 @@ INSTALL:
|
|||||||
;
|
;
|
||||||
|
|
||||||
UNINSTALL:
|
UNINSTALL:
|
||||||
|
lda libref
|
||||||
|
ldx libref+1
|
||||||
|
sta ptr1
|
||||||
|
stx ptr1+1
|
||||||
|
lda #$60 ; RTS opcode
|
||||||
|
sta (ptr1) ; Disable IRQ routine
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@@ -466,14 +483,10 @@ SETDRAWPAGE:
|
|||||||
stx DRAWPAGEH
|
stx DRAWPAGEH
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
irq:
|
||||||
; IRQ: VBL interrupt handler
|
|
||||||
;
|
|
||||||
|
|
||||||
IRQ:
|
|
||||||
lda INTSET ; Poll all pending interrupts
|
lda INTSET ; Poll all pending interrupts
|
||||||
and #VBL_INTERRUPT
|
and #VBL_INTERRUPT
|
||||||
beq IRQEND ; Exit if not a VBL interrupt
|
beq @L0 ; Exit if not a VBL interrupt
|
||||||
|
|
||||||
lda SWAPREQUEST
|
lda SWAPREQUEST
|
||||||
beq @L0
|
beq @L0
|
||||||
@@ -485,7 +498,6 @@ IRQ:
|
|||||||
jsr SETDRAWPAGE
|
jsr SETDRAWPAGE
|
||||||
stz SWAPREQUEST
|
stz SWAPREQUEST
|
||||||
@L0:
|
@L0:
|
||||||
IRQEND:
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|||||||
11
libsrc/lynx/tgi_irq.s
Normal file
11
libsrc/lynx/tgi_irq.s
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
;
|
||||||
|
; Oliver Schmidt, 2018-02-02
|
||||||
|
;
|
||||||
|
|
||||||
|
.export tgi_libref
|
||||||
|
.interruptor tgi_irq ; Export as IRQ handler
|
||||||
|
|
||||||
|
.data
|
||||||
|
|
||||||
|
tgi_libref:
|
||||||
|
tgi_irq: .byte $60, $00, $00 ; RTS plus two dummy bytes
|
||||||
@@ -35,7 +35,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ yres: .word 56 ; Max Y resolution
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READJOY
|
.addr READJOY
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
8
libsrc/supervision/libref.s
Normal file
8
libsrc/supervision/libref.s
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
;
|
||||||
|
; Oliver Schmidt, 2013-05-31
|
||||||
|
;
|
||||||
|
|
||||||
|
.export joy_libref
|
||||||
|
.import _exit
|
||||||
|
|
||||||
|
joy_libref := _exit
|
||||||
@@ -58,7 +58,6 @@ YSIZE = 8 ; System font height
|
|||||||
.addr CIRCLE
|
.addr CIRCLE
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ YSIZE = 8 ; System font height
|
|||||||
.addr BAR
|
.addr BAR
|
||||||
.addr TEXTSTYLE
|
.addr TEXTSTYLE
|
||||||
.addr OUTTEXT
|
.addr OUTTEXT
|
||||||
.addr 0 ; IRQ entry is unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Data.
|
; Data.
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
.import tgi_libref
|
.import tgi_libref
|
||||||
.importzp ptr1
|
.importzp ptr1
|
||||||
.interruptor tgi_irq ; Export as IRQ handler
|
|
||||||
|
|
||||||
.include "tgi-kernel.inc"
|
.include "tgi-kernel.inc"
|
||||||
.include "tgi-error.inc"
|
.include "tgi-error.inc"
|
||||||
@@ -81,7 +80,6 @@ tgi_line: jmp $0000
|
|||||||
tgi_bar: jmp $0000
|
tgi_bar: jmp $0000
|
||||||
tgi_textstyle: jmp $0000
|
tgi_textstyle: jmp $0000
|
||||||
tgi_outtext: jmp $0000
|
tgi_outtext: jmp $0000
|
||||||
tgi_irq: .byte $60, $00, $00 ; RTS plus two dummy bytes
|
|
||||||
|
|
||||||
; Driver header signature
|
; Driver header signature
|
||||||
.rodata
|
.rodata
|
||||||
@@ -144,20 +142,13 @@ _tgi_install:
|
|||||||
dex
|
dex
|
||||||
bpl @L3
|
bpl @L3
|
||||||
|
|
||||||
; Install the IRQ vector if the driver needs it.
|
|
||||||
|
|
||||||
lda tgi_irq+2 ; Check high byte of IRQ vector
|
|
||||||
beq @L4 ; Jump if vector invalid
|
|
||||||
lda #$4C ; Jump opcode
|
|
||||||
sta tgi_irq ; Activate IRQ routine
|
|
||||||
|
|
||||||
; Initialize some other variables
|
; Initialize some other variables
|
||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
@L4: ldx #csize-1
|
ldx #csize-1
|
||||||
@L5: sta cstart,x ; Clear error/mode/curx/cury/...
|
@L4: sta cstart,x ; Clear error/mode/curx/cury/...
|
||||||
dex
|
dex
|
||||||
bpl @L5
|
bpl @L4
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -206,9 +197,6 @@ _tgi_uninstall:
|
|||||||
|
|
||||||
jsr tgi_uninstall ; Allow the driver to clean up
|
jsr tgi_uninstall ; Allow the driver to clean up
|
||||||
|
|
||||||
lda #$60 ; RTS opcode
|
|
||||||
sta tgi_irq ; Disable IRQ entry point
|
|
||||||
|
|
||||||
; Clear driver pointer and error code
|
; Clear driver pointer and error code
|
||||||
|
|
||||||
tgi_clear_ptr:
|
tgi_clear_ptr:
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -36,7 +36,6 @@
|
|||||||
.addr UNINSTALL
|
.addr UNINSTALL
|
||||||
.addr COUNT
|
.addr COUNT
|
||||||
.addr READ
|
.addr READ
|
||||||
.addr 0 ; IRQ entry unused
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Constants
|
; Constants
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),)
|
|||||||
# This one comes with VICE
|
# This one comes with VICE
|
||||||
C1541 ?= c1541
|
C1541 ?= c1541
|
||||||
|
|
||||||
# For this one see http://applecommander.sourceforge.net/
|
# For this one see https://applecommander.github.io/
|
||||||
AC ?= ac.jar
|
AC ?= ac.jar
|
||||||
|
|
||||||
# For this one see http://www.horus.com/~hias/atari/
|
# For this one see http://www.horus.com/~hias/atari/
|
||||||
|
|||||||
62
samples/geos/geosver.c
Normal file
62
samples/geos/geosver.c
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
#include <geos.h>
|
||||||
|
#include <conio.h>
|
||||||
|
|
||||||
|
// Let's define the window we're operating
|
||||||
|
struct window wholeScreen = {0, SC_PIX_HEIGHT-1, 0, SC_PIX_WIDTH-1};
|
||||||
|
|
||||||
|
|
||||||
|
void main (void)
|
||||||
|
{
|
||||||
|
unsigned char os = get_ostype();
|
||||||
|
unsigned char *machine = NULL;
|
||||||
|
unsigned char *version = NULL;
|
||||||
|
unsigned char good = 1;
|
||||||
|
|
||||||
|
SetPattern(0);
|
||||||
|
InitDrawWindow(&wholeScreen);
|
||||||
|
Rectangle();
|
||||||
|
gotoxy(0, 4);
|
||||||
|
if (os == GEOS4) {
|
||||||
|
machine = "plus4";
|
||||||
|
version = "GEOS v3.5";
|
||||||
|
} else {
|
||||||
|
if ((os & GEOS128) == GEOS128) {
|
||||||
|
machine = "c128";
|
||||||
|
} else {
|
||||||
|
machine = "c64";
|
||||||
|
}
|
||||||
|
os &= 0x7f;
|
||||||
|
if (os == GEOS_V10) {
|
||||||
|
version = "GEOS v1.0";
|
||||||
|
} else if (os == GEOS_V11) {
|
||||||
|
version = "GEOS v1.1";
|
||||||
|
} else if (os == GEOS_V12) {
|
||||||
|
version = "GEOS v1.2";
|
||||||
|
} else if (os == GEOS_V13) {
|
||||||
|
version = "GEOS v1.3";
|
||||||
|
} else if (os == GEOS_V15) {
|
||||||
|
version = "GEOS v1.5";
|
||||||
|
} else if (os == GEOS_V20) {
|
||||||
|
version = "GEOS v2.0";
|
||||||
|
} else if (os == MEGAPATCH3) {
|
||||||
|
version = "MegaPatch 3";
|
||||||
|
} else if (os == GATEWAY) {
|
||||||
|
version = "GateWay";
|
||||||
|
} else if ((os & WHEELS) == WHEELS) {
|
||||||
|
version = "Wheels";
|
||||||
|
} else {
|
||||||
|
version = "Unknown GEOS version";
|
||||||
|
good = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (good) {
|
||||||
|
cprintf("%s (%s)", version, machine);
|
||||||
|
} else {
|
||||||
|
cprintf("%s (%s) (%d)", version, machine, os);
|
||||||
|
}
|
||||||
|
|
||||||
|
Sleep(10*50);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
8
samples/geos/geosverres.grc
Normal file
8
samples/geos/geosverres.grc
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
; this is the resource file for geosver.c, a GEOS application example
|
||||||
|
|
||||||
|
HEADER APPLICATION "geosver" "GEOSver" "V1.0" {
|
||||||
|
dostype USR
|
||||||
|
author "Marco van den Heuvel"
|
||||||
|
info "This is a C prog compiled with cc65 and GEOSLib."
|
||||||
|
}
|
||||||
12
testcode/lib/apple2/Makefile
Normal file
12
testcode/lib/apple2/Makefile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# For this one see https://applecommander.github.io/
|
||||||
|
AC ?= ac.jar
|
||||||
|
|
||||||
|
CL = cl65
|
||||||
|
CLFLAGS = -t apple2 -C apple2-hgr.cfg -Oirs
|
||||||
|
|
||||||
|
hgrtest.dsk: hgrtest
|
||||||
|
cp prodos.dsk $@
|
||||||
|
java -jar $(AC) -cc65 $@ hgrtest bin <hgrtest
|
||||||
|
|
||||||
|
hgrtest: hgrtest.c werner.s
|
||||||
|
$(CL) $(CLFLAGS) -m hgrtest.map $^
|
||||||
Reference in New Issue
Block a user