]> git.sur5r.net Git - cc65/commitdiff
Merge pull request #588 from polluks/master
authorOliver Schmidt <ol.sc@web.de>
Sat, 10 Feb 2018 00:35:14 +0000 (00:35 +0000)
committerGitHub <noreply@github.com>
Sat, 10 Feb 2018 00:35:14 +0000 (00:35 +0000)
Cleanup notes

80 files changed:
asminc/joy-kernel.inc
asminc/tgi-kernel.inc
cfg/apple2-hgr.cfg
cfg/apple2-overlay.cfg
cfg/apple2.cfg
cfg/apple2enh-hgr.cfg
cfg/apple2enh-overlay.cfg
cfg/apple2enh.cfg
doc/apple2.sgml
doc/apple2enh.sgml
include/_gtia.h
include/ace.h [deleted file]
include/apple2.h
include/apple2enh.h
include/atari.h
include/atari2600.h
include/c16.h
include/cbm.h
include/conio.h
include/geos.h
include/geos/gdisk.h
include/geos/gfile.h
include/geos/ggraph.h
include/geos/gmemory.h
include/geos/gmenu.h
include/geos/gprocess.h
include/geos/gsym.h
include/joystick.h
include/joystick/joy-kernel.h
include/lynx.h
include/plus4.h
include/stdio.h
include/supervision.h
include/target.h [new file with mode: 0644]
include/tgi.h
libsrc/apple2/joy/a2.stdjoy.s
libsrc/apple2/tgi/a2.hi.s
libsrc/apple2/tgi/a2.lo.s
libsrc/atari/joy/atrmj8.s
libsrc/atari/joy/atrstd.s
libsrc/atari/tgi/atari_tgi_common.inc
libsrc/atari5200/joy/atr5200std.s
libsrc/atmos/joy/atmos-ijk.s
libsrc/atmos/joy/atmos-pase.s
libsrc/atmos/tgi/atmos-228-200-3.s
libsrc/atmos/tgi/atmos-240-200-2.s
libsrc/c128/joy/c128-ptvjoy.s
libsrc/c128/joy/c128-stdjoy.s
libsrc/c128/tgi/c128-vdc.s
libsrc/c128/tgi/c128-vdc2.s
libsrc/c64/joy/c64-hitjoy.s
libsrc/c64/joy/c64-numpad.s
libsrc/c64/joy/c64-ptvjoy.s
libsrc/c64/joy/c64-stdjoy.s
libsrc/c64/tgi/c64-hi.s
libsrc/cbm510/joy/cbm510-std.s
libsrc/creativision/joy/creativision-stdjoy.s
libsrc/gamate/joy/gamate-stdjoy.s
libsrc/geos-cbm/tgi/geos-tgi.s
libsrc/joystick/joy-kernel.s
libsrc/joystick/joy_read.s
libsrc/lynx/joy/lynx-stdjoy.s
libsrc/lynx/libref.s
libsrc/lynx/tgi/lynx-160-102-16.s
libsrc/lynx/tgi_irq.s [new file with mode: 0644]
libsrc/nes/joy/nes-stdjoy.s
libsrc/nes/tgi/nes-64-56-2.s
libsrc/pce/joy/pce-stdjoy.s
libsrc/pet/joy/pet-ptvjoy.s
libsrc/pet/joy/pet-stdjoy.s
libsrc/plus4/joy/plus4-stdjoy.s
libsrc/supervision/joy/supervision-stdjoy.s
libsrc/supervision/libref.s [new file with mode: 0644]
libsrc/telestrat/tgi/telestrat-228-200-3.s
libsrc/telestrat/tgi/telestrat-240-200-2.s
libsrc/tgi/tgi-kernel.s
libsrc/vic20/joy/vic20-ptvjoy.s
libsrc/vic20/joy/vic20-stdjoy.s
samples/Makefile
testcode/lib/apple2/Makefile [new file with mode: 0644]

index c8cc298208a1a2a6837f9059e37c12ed3f8c2bc3..ef729fe3c351fed314487f8e6859d91a088d4b29 100644 (file)
             UNINSTALL   .addr   ; UNINSTALL routine
             COUNT       .addr   ; COUNT routine
             READ        .addr   ; READ routine
-            IRQ         .addr   ; IRQ routine
         .endstruct
 .endstruct
 
 ;------------------------------------------------------------------------------
 ; The JOY API version, stored in JOY_HDR::VERSION
 
-JOY_API_VERSION         = $04
+JOY_API_VERSION         = $05
 
 ;------------------------------------------------------------------------------
 ; Variables
index e9f2f6aa9abd92528a8de9d72995518f54de0d8a..fba78afff51d2d0b52dd88cb2a7ea73d84213b1e 100644 (file)
             BAR             .addr       ; BAR routine
             TEXTSTYLE       .addr       ; TEXTSTYLE routine
             OUTTEXT         .addr       ; OUTTEXT routine
-            IRQ             .addr       ; IRQ routine
         .endstruct
 .endstruct
 
 ;------------------------------------------------------------------------------
 ; 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.
index 536491c67771f620d13518cb5e7c37f5f780e137..b11dd12bc47a6ab82791b3ea49abadf98eb51778 100644 (file)
@@ -19,7 +19,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE: load = ZP,             type = zp;
-    EXEHDR:   load = HEADER,         type = ro;
+    EXEHDR:   load = HEADER,         type = ro,  optional = yes;
     STARTUP:  load = MAIN,           type = ro;
     LOWCODE:  load = MAIN,           type = ro,  optional = yes;
     HGR:      load = MAIN,           type = rw,  optional = yes, start = $2000;
index e6a5ae25c1589334b3eaecdfdc6a4ade7c3d9113..d5476d264b5b5710f10eecc89d6b9209b125be28 100644 (file)
@@ -36,7 +36,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE: load = ZP,             type = zp;
-    EXEHDR:   load = HEADER,         type = ro;
+    EXEHDR:   load = HEADER,         type = ro,                optional = yes;
     STARTUP:  load = MAIN,           type = ro,  define = yes;
     LOWCODE:  load = MAIN,           type = ro,                optional = yes;
     CODE:     load = MAIN,           type = ro;
index eba2a0e66706f1079b5f40d2ac1128bfb81c2d6d..bbe45839db59e05964ca0fd416fb3c8e59865242 100644 (file)
@@ -19,7 +19,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE: load = ZP,             type = zp;
-    EXEHDR:   load = HEADER,         type = ro;
+    EXEHDR:   load = HEADER,         type = ro,  optional = yes;
     STARTUP:  load = MAIN,           type = ro;
     LOWCODE:  load = MAIN,           type = ro,  optional = yes;
     CODE:     load = MAIN,           type = ro;
index 536491c67771f620d13518cb5e7c37f5f780e137..b11dd12bc47a6ab82791b3ea49abadf98eb51778 100644 (file)
@@ -19,7 +19,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE: load = ZP,             type = zp;
-    EXEHDR:   load = HEADER,         type = ro;
+    EXEHDR:   load = HEADER,         type = ro,  optional = yes;
     STARTUP:  load = MAIN,           type = ro;
     LOWCODE:  load = MAIN,           type = ro,  optional = yes;
     HGR:      load = MAIN,           type = rw,  optional = yes, start = $2000;
index e6a5ae25c1589334b3eaecdfdc6a4ade7c3d9113..d5476d264b5b5710f10eecc89d6b9209b125be28 100644 (file)
@@ -36,7 +36,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE: load = ZP,             type = zp;
-    EXEHDR:   load = HEADER,         type = ro;
+    EXEHDR:   load = HEADER,         type = ro,                optional = yes;
     STARTUP:  load = MAIN,           type = ro,  define = yes;
     LOWCODE:  load = MAIN,           type = ro,                optional = yes;
     CODE:     load = MAIN,           type = ro;
index eba2a0e66706f1079b5f40d2ac1128bfb81c2d6d..bbe45839db59e05964ca0fd416fb3c8e59865242 100644 (file)
@@ -19,7 +19,7 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE: load = ZP,             type = zp;
-    EXEHDR:   load = HEADER,         type = ro;
+    EXEHDR:   load = HEADER,         type = ro,  optional = yes;
     STARTUP:  load = MAIN,           type = ro;
     LOWCODE:  load = MAIN,           type = ro,  optional = yes;
     CODE:     load = MAIN,           type = ro;
index 33a878223059af8c1d42a96d4a63fa427e4b3135..822dd564eae45f671fad5b0d0c38de24cc9735c6 100644 (file)
@@ -39,7 +39,7 @@ containing the load address and load length. The default load address is
 &dollar;803.
 
 <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
 containing DOS 3.3 as well as ProDOS 8.
 
@@ -168,9 +168,44 @@ Parameters:
 </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: &dollar;803. Use <tt/-S &lt;addr&gt;/ 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: &dollar;800. Use <tt/-D __STACKSIZE__=&lt;size&gt;/ to set a different
+  stack size.
+
+  <tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
+  Default: &dollar;9600. Use <tt/-D __HIMEM__=&lt;addr&gt;/ to set a different
+  highest usable address.
+
+  <tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
+  Default: &dollar;D400. Use <tt/-D __LCADDR__=&lt;addr&gt;/ to set a different
+  code address.
+
+  <tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
+  Default: &dollar;C00. Use <tt/-D __LCSIZE__=&lt;size&gt;/ to set a different
+  code size.
+
+</descrip><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
 information on overlays.
 
@@ -210,7 +245,7 @@ Parameters:
 
 <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:
 
index 4f520254386a1f3b20440368a2a7e61d157536d6..3a53b6b8c19b5c868e03f76c31308fcdf3983e5d 100644 (file)
@@ -39,7 +39,7 @@ containing the load address and load length. The default load address is
 &dollar;803.
 
 <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
 containing DOS 3.3 as well as ProDOS 8.
 
@@ -168,9 +168,44 @@ Parameters:
 </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: &dollar;803. Use <tt/-S &lt;addr&gt;/ 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: &dollar;800. Use <tt/-D __STACKSIZE__=&lt;size&gt;/ to set a different
+  stack size.
+
+  <tag><tt/__HIMEM__:/ Highest usable memory address presumed at link time</tag>
+  Default: &dollar;9600. Use <tt/-D __HIMEM__=&lt;addr&gt;/ to set a different
+  highest usable address.
+
+  <tag><tt/__LCADDR__:/ Address of code in the Language Card</tag>
+  Default: &dollar;D400. Use <tt/-D __LCADDR__=&lt;addr&gt;/ to set a different
+  code address.
+
+  <tag><tt/__LCSIZE__:/ Size of code in the Language Card</tag>
+  Default: &dollar;C00. Use <tt/-D __LCSIZE__=&lt;size&gt;/ to set a different
+  code size.
+
+</descrip><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
 information on overlays.
 
@@ -210,7 +245,7 @@ Parameters:
 
 <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:
 
index 424628f19531e7de18c5a5c0a0030c2ce73ade22..0542efa2f6b3828fa6389825bcddb5a22e180153 100644 (file)
 
 /* Define a structure with the gtia register offsets */
 struct __gtia_write {
-    unsigned char   hposp0; /* horizontal position player 0 */
-    unsigned char   hposp1; /* horizontal position player 1 */
-    unsigned char   hposp2; /* horizontal position player 2 */
-    unsigned char   hposp3; /* horizontal position player 3 */
-    unsigned char   hposm0; /* horizontal position missile 0 */
-    unsigned char   hposm1; /* horizontal position missile 1 */
-    unsigned char   hposm2; /* horizontal position missile 2 */
-    unsigned char   hposm3; /* horizontal position missile 3 */
-    unsigned char   sizep0; /* size of player 0 */
-    unsigned char   sizep1; /* size of player 1 */
-    unsigned char   sizep2; /* size of player 2 */
-    unsigned char   sizep3; /* size of player 3 */
-    unsigned char   sizem;  /* size of missiles */
-    unsigned char   grafp0; /* graphics shape player 0 */
-    unsigned char   grafp1; /* graphics shape player 1 */
-    unsigned char   grafp2; /* graphics shape player 2 */
-    unsigned char   grafp3; /* graphics shape player 3 */
-    unsigned char   grafm;  /* graphics shape missiles */
-    unsigned char   colpm0; /* color player and missile 0 */
-    unsigned char   colpm1; /* color player and missile 1 */
-    unsigned char   colpm2; /* color player and missile 2 */
-    unsigned char   colpm3; /* color player and missile 3 */
-    unsigned char   colpf0; /* color playfield 0 */
-    unsigned char   colpf1; /* color playfield 1 */
-    unsigned char   colpf2; /* color playfield 2 */
-    unsigned char   colpf3; /* color playfield 3 */
-    unsigned char   colbk;  /* color background */
-    unsigned char   prior;  /* priority selection */
-    unsigned char   vdelay; /* vertical delay */
-    unsigned char   gractl; /* stick/paddle latch, p/m control */
-    unsigned char   hitclr; /* clear p/m collision */
-    unsigned char   consol; /* console buttons */
+    unsigned char   hposp0; /* 0x00: horizontal position player 0 */
+    unsigned char   hposp1; /* 0x01: horizontal position player 1 */
+    unsigned char   hposp2; /* 0x02: horizontal position player 2 */
+    unsigned char   hposp3; /* 0x03: horizontal position player 3 */
+    unsigned char   hposm0; /* 0x04: horizontal position missile 0 */
+    unsigned char   hposm1; /* 0x05: horizontal position missile 1 */
+    unsigned char   hposm2; /* 0x06: horizontal position missile 2 */
+    unsigned char   hposm3; /* 0x07: horizontal position missile 3 */
+    unsigned char   sizep0; /* 0x08: size of player 0 */
+    unsigned char   sizep1; /* 0x09: size of player 1 */
+    unsigned char   sizep2; /* 0x0A: size of player 2 */
+    unsigned char   sizep3; /* 0x0B: size of player 3 */
+    unsigned char   sizem;  /* 0x0C: size of missiles */
+    unsigned char   grafp0; /* 0x0D: graphics shape player 0 */
+    unsigned char   grafp1; /* 0x0E: graphics shape player 1 */
+    unsigned char   grafp2; /* 0x0F: graphics shape player 2 */
+    unsigned char   grafp3; /* 0x10: graphics shape player 3 */
+    unsigned char   grafm;  /* 0x11: graphics shape missiles */
+    unsigned char   colpm0; /* 0x12: color player and missile 0 */
+    unsigned char   colpm1; /* 0x13: color player and missile 1 */
+    unsigned char   colpm2; /* 0x14: color player and missile 2 */
+    unsigned char   colpm3; /* 0x15: color player and missile 3 */
+    unsigned char   colpf0; /* 0x16: color playfield 0 */
+    unsigned char   colpf1; /* 0x17: color playfield 1 */
+    unsigned char   colpf2; /* 0x18: color playfield 2 */
+    unsigned char   colpf3; /* 0x19: color playfield 3 */
+    unsigned char   colbk;  /* 0x1A: color background */
+    unsigned char   prior;  /* 0x1B: priority selection */
+    unsigned char   vdelay; /* 0x1C: vertical delay */
+    unsigned char   gractl; /* 0x1D: stick/paddle latch, p/m control */
+    unsigned char   hitclr; /* 0x1E: clear p/m collision */
+    unsigned char   consol; /* 0x1F: builtin speaker */
 };
 
 /* Define a structure with the gtia register offsets */
 struct __gtia_read {
-    unsigned char   m0pf;   /* missile 0 to playfield collision */
-    unsigned char   m1pf;   /* missile 1 to playfield collision */
-    unsigned char   m2pf;   /* missile 2 to playfield collision */
-    unsigned char   m3pf;   /* missile 3 to playfield collision */
-    unsigned char   p0pf;   /* player 0 to playfield collision */
-    unsigned char   p1pf;   /* player 1 to playfield collision */
-    unsigned char   p2pf;   /* player 2 to playfield collision */
-    unsigned char   p3pf;   /* player 3 to playfield collision */
-    unsigned char   m0pl;   /* missile 0 to player collision */
-    unsigned char   m1pl;   /* missile 1 to player collision */
-    unsigned char   m2pl;   /* missile 2 to player collision */
-    unsigned char   m3pl;   /* missile 3 to player collision */
-    unsigned char   p0pl;   /* player 0 to player collision */
-    unsigned char   p1pl;   /* player 1 to player collision */
-    unsigned char   p2pl;   /* player 2 to player collision */
-    unsigned char   p3pl;   /* player 3 to player collision */
-    unsigned char   trig0;  /* joystick trigger 0 */
-    unsigned char   trig1;  /* joystick trigger 1 */
-    unsigned char   trig2;  /* joystick trigger 2 */
-    unsigned char   trig3;  /* joystick trigger 3 */
-    unsigned char   pal;    /* pal/ntsc flag */
+    unsigned char   m0pf;       /* 0x00: missile 0 to playfield collision */
+    unsigned char   m1pf;       /* 0x01: missile 1 to playfield collision */
+    unsigned char   m2pf;       /* 0x02: missile 2 to playfield collision */
+    unsigned char   m3pf;       /* 0x03: missile 3 to playfield collision */
+    unsigned char   p0pf;       /* 0x04: player 0 to playfield collision */
+    unsigned char   p1pf;       /* 0x05: player 1 to playfield collision */
+    unsigned char   p2pf;       /* 0x06: player 2 to playfield collision */
+    unsigned char   p3pf;       /* 0x07: player 3 to playfield collision */
+    unsigned char   m0pl;       /* 0x08: missile 0 to player collision */
+    unsigned char   m1pl;       /* 0x09: missile 1 to player collision */
+    unsigned char   m2pl;       /* 0x0A: missile 2 to player collision */
+    unsigned char   m3pl;       /* 0x0B: missile 3 to player collision */
+    unsigned char   p0pl;       /* 0x0C: player 0 to player collision */
+    unsigned char   p1pl;       /* 0x0D: player 1 to player collision */
+    unsigned char   p2pl;       /* 0x0E: player 2 to player collision */
+    unsigned char   p3pl;       /* 0x0F: player 3 to player collision */
+    unsigned char   trig0;      /* 0x10: joystick trigger 0 */
+    unsigned char   trig1;      /* 0x11: joystick trigger 1 */
+    unsigned char   trig2;      /* 0x12: joystick trigger 2 */
+    unsigned char   trig3;      /* 0x13: joystick trigger 3 */
+    unsigned char   pal;        /* 0x14: pal/ntsc flag */
+    unsigned char   unused[10];
+    unsigned char   consol;     /* 0x1F: console buttons */
 };
 
 /* End of _gtia.h */
diff --git a/include/ace.h b/include/ace.h
deleted file mode 100644 (file)
index fba6722..0000000
+++ /dev/null
@@ -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
-
-
-
index 31e56a95a913dbadc41a007a9fa8e0f23bd553b0..f217ad04c7a44341342e2745c19e69c9e9bb3abf 100644 (file)
 #  error This module may only be used when compiling for the Apple ][!
 #endif
 
-
 #include <apple2_filetype.h>
 
+
+
 /*****************************************************************************/
 /*                                   Data                                    */
 /*****************************************************************************/
index cc62f70b7a0b83aa7cdc54ac4685569f86541de8..77328b5edf116b0bdc7fbddfc3042afdfa9656d7 100644 (file)
 
 
 
-/* If not already done, include the apple2.h header file */
-#if !defined(_APPLE2_H)
-#  include <apple2.h>
-#endif
+#include <apple2.h>
 
 
 
index bf1af7d7bb0c1327193fab2a73ce2608cb3a73fb..4bed8d7a704455c949c1fce02fb9b411b9d14653 100644 (file)
@@ -355,5 +355,7 @@ struct __iocb {
 #define IOCB_GETCWD      0x30  /* get current directory (MyDOS/SpartaDOS) */
 #define IOCB_FORMAT      0xFE  /* format */
 
+
+
 /* End of atari.h */
 #endif
index 1eb51a2dda0b7e444b3010ad16896e46c95631c9..a6b5cda47749a3f08fe34974c295647ea7b882ad 100644 (file)
@@ -8,9 +8,13 @@
 /*                                                                           */
 /*****************************************************************************/
 
+
+
 #ifndef _ATARI2600_H
 #define _ATARI2600_H
 
+
+
 /* Check for errors */
 #if !defined(__ATARI2600__)
 #  error This module may only be used when compiling for the Atari 2600!
@@ -22,5 +26,7 @@
 #include <_riot.h>
 #define RIOT (*(struct __riot*)0x0280)
 
+
+
 /* End of atari2600.h */
-#endif /* #ifndef _ATARI2600_H */
+#endif
index d49ca6fd4d59b2730f03073098d9730c266a331a..c039218f980101f8f4c4d566c690ad4d8c8f0de0 100644 (file)
@@ -47,9 +47,7 @@
 
 /* Include the base header file for the 264 series. include file.
  */
-#ifndef _CBM264_H
 #include <cbm264.h>
-#endif
 
 
 
index da63375b238b5b73b3bd87256e45a9992a02c47c..1395f700f51568363ba4effcfb27087e75dbc1e4 100644 (file)
 
 
 /* We need NULL. */
-
-#if !defined(_STDDEF_H)
-#  include <stddef.h>
-#endif
+#include <stddef.h>
 
 /* Load the system-specific files here, if needed. */
 #if   defined(__C64__)    && !defined(_C64_H)
index 9cd505766113ce9971f357a2b884b449d28b2632..72421af86ac7d8742706fbaadba50e08b116760d 100644 (file)
 
 
 
-#if !defined(_STDARG_H)
-#  include <stdarg.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
+#include <stdarg.h>
+#include <target.h>
 
 
 
@@ -232,16 +200,16 @@ void __fastcall__ cputhex16 (unsigned val);
 ** the macro will give access to the actual function.
 */
 
-#if defined(_textcolor)
+#ifdef _textcolor
 #  define textcolor(x)          _textcolor(x)
 #endif
-#if defined(_bgcolor)
+#ifdef _bgcolor
 #  define bgcolor(x)            _bgcolor(x)
 #endif
-#if defined(_bordercolor)
+#ifdef _bordercolor
 #  define bordercolor(x)        _bordercolor(x)
 #endif
-#if defined(_cpeekcolor)
+#ifdef _cpeekcolor
 #  define cpeekcolor(x)         _cpeekcolor(x)
 #endif
 
index ae356d679923655ca823cf7501816d47eb44b5a1..3f760b6ad6558d735858372241bb8536462de155 100644 (file)
 
 
 
-#ifndef _GCONST_H
 #include <geos/gconst.h>
-#endif
-
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
-
-#ifndef _GSYM_H
 #include <geos/gsym.h>
-#endif
-
-#ifndef _GDISK_H
 #include <geos/gdisk.h>
-#endif
-
-#ifndef _GFILE_H
 #include <geos/gfile.h>
-#endif
-
-#ifndef _GPROCESS_H
 #include <geos/gprocess.h>
-#endif
-
-#ifndef _GGRAPH_H
 #include <geos/ggraph.h>
-#endif
-
-#ifndef _GMENU_H
 #include <geos/gmenu.h>
-#endif
-
-#ifndef _GSPRITE_H
 #include <geos/gsprite.h>
-#endif
-
-#ifndef _GMEMORY_H
 #include <geos/gmemory.h>
-#endif
-
-#ifndef _GSYS_H
 #include <geos/gsys.h>
-#endif
-
-#ifndef _GDLGBOX_H
 #include <geos/gdlgbox.h>
-#endif
+
 
 
 #define CH_ULCORNER             '+'
 #define JOY_BTN_1_MASK          0x10
 
 
+
 /* End of geos.h */
 #endif
index f65d7d30188d71dfa5bd15b6868a8d0a10c2be90..30305a2fc764579729cc02897e0e19f3097ea53b 100644 (file)
@@ -7,9 +7,7 @@
 #ifndef _GDISK_H
 #define _GDISK_H
 
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
 
 char __fastcall__ ReadBuff(struct tr_se *myTrSe);
 char __fastcall__ WriteBuff(struct tr_se *myTrSe);
index d7667d8ec12b02b99133d5cc90e8d68b92c3e75a..ec7a75bbc2545ae9b8b4427d66ed9daef73c4fcf 100644 (file)
@@ -7,9 +7,7 @@
 #ifndef _GFILE_H
 #define _GFILE_H
 
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
 
 struct filehandle *Get1stDirEntry(void);
 struct filehandle *GetNxtDirEntry(void);
index 961ec2d80b962096b57c2cd5b5be74eab39203ad..35e02c1983968f3cce055c518bb6ee31097ad059 100644 (file)
@@ -7,9 +7,7 @@
 #ifndef _GGRAPH_H
 #define _GGRAPH_H
 
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
 
 void __fastcall__ SetPattern(char newpattern);
 
index 3fba5cb5bb79d139a7b3942708d959ced29443e7..ba8e9f21175d7934b599ec4d320fa0e4126cbba7 100644 (file)
@@ -7,9 +7,7 @@
 #ifndef _GMEMORY_H
 #define _GMEMORY_H
 
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
 
 void __fastcall__ CopyString(char *dest, const char *source);
 char __fastcall__ CmpString(const char *dest, const char *source);
index 3175b6cf3690cc01105710604a40dbf64efde00d..89caa2c027d98a280e7d77ce0eff4d2d413c1191 100644 (file)
@@ -7,9 +7,7 @@
 #ifndef _GMENU_H
 #define _GMENU_H
 
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
 
 void __fastcall__ DoMenu(struct menu *myMenu);
 void ReDoMenu(void);
index 6fab2ecfae7bb5120b29454bf437048cc3358b5b..000003f3206567d4fc729bcd2e78ec0f2b34347a 100644 (file)
@@ -7,9 +7,7 @@
 #ifndef _GPROCESS_H
 #define _GPROCESS_H
 
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
 
 void __fastcall__ InitProcesses(char number, struct process *proctab);
 void __fastcall__ RestartProcess(char number);
index 0850466748b92ee951f2e00b21de48e446ac0577..2b2c8fbb21e42be9243ca94249dbe3e71e7b2814 100644 (file)
@@ -7,9 +7,7 @@
 #ifndef _GSYM_H
 #define _GSYM_H
 
-#ifndef _GSTRUCT_H
 #include <geos/gstruct.h>
-#endif
 
 #define r0              (*(unsigned*)(R_BASE + 0x00))
 #define r0L             (*(char*)(R_BASE + 0x00))
index 26f339fe4f392227accca399d7f35ee8d424a881..b6771c38158cf2eec3b7159981fb52b24b7c910c 100644 (file)
 
 
 
+#include <target.h>
+
+
+
 /*****************************************************************************/
 /*                                  Definitions                              */
 /*****************************************************************************/
@@ -103,6 +107,3 @@ unsigned char __fastcall__ joy_read (unsigned char joystick);
 
 /* End of joystick.h */
 #endif
-
-
-
index e984291f7b37532c474b52030920d7057d4add96..783508247e76daf7267dd8b0b26abdb392eec648 100644 (file)
@@ -59,7 +59,6 @@ typedef struct {
     void*               uninstall;      /* UNINSTALL routine */
     void*               count;          /* COUNT routine */
     void*               read;           /* READ routine */
-    void*               irq;            /* IRQ routine */
 
 } joy_drv_header;
 
index 3629f322e9329532b5152f9964181cda44da9c44..4b0390a13223c846115ba9d32719f379fdf2f299 100644 (file)
@@ -123,6 +123,8 @@ extern void lynx_160_102_16_tgi[];    /* Referred to by tgi_static_stddrv[] */
 /*                           Sound support                                   */
 /*****************************************************************************/
 
+
+
 void lynx_snd_init (void);
 /* Initialize the sound driver */
 
@@ -144,6 +146,8 @@ void __fastcall__ lynx_snd_stop_channel (unsigned char channel);
 unsigned char lynx_snd_active(void);
 /* Show which channels are active */
 
+
+
 /*****************************************************************************/
 /*                           Accessing the cart                              */
 /*****************************************************************************/
@@ -209,5 +213,6 @@ unsigned __fastcall__ lynx_eewrite (unsigned cell, unsigned val);
 #define SUZY        (*(struct __suzy*)0xFC00)
 
 
+
 /* End of lynx.h */
 #endif
index 840e8b342601d9421a9d1e05492566a8cb481ec7..81e3c5286588027f30aa4982904a0774e81e36ad 100644 (file)
@@ -47,9 +47,7 @@
 
 /* Include the base header file for the 264 series. include file.
  */
-#ifndef _CBM264_H
 #include <cbm264.h>
-#endif
 
 /* Define hardware */
 #include <_6551.h>
index a3facd513522dbdfe0cdd9ad618615bed8bc053f..73dc05bdb602a4e1b6a9eccf330e9b63a74527a7 100644 (file)
 
 
 
-#ifndef _STDDEF_H
-#  include <stddef.h>
-#endif
-#ifndef _STDARG_H
-#  include <stdarg.h>
-#endif
+#include <stddef.h>
+#include <stdarg.h>
 
 
 
@@ -147,6 +143,3 @@ void __fastcall__ _poserror (const char* msg);          /* cc65 */
 
 /* End of stdio.h */
 #endif
-
-
-
index f3ae1c25e03416fe8cc661f69090ae0ea94d4521..cce03791066f842e7b3bbf1d3b520b5d3066ec75 100644 (file)
@@ -54,28 +54,28 @@ struct __sv_lcd {
     unsigned char       xpos;
     unsigned char       ypos;
 };
-#define SV_LCD  ((struct __sv_lcd*)0x2000)
+#define SV_LCD  (*(struct __sv_lcd*)0x2000)
 
 struct __sv_tone {
     unsigned            delay;
     unsigned char       control;
     unsigned char       timer;
 };
-#define SV_RIGHT ((struct __sv_tone*)0x2010)
-#define SV_LEFT  ((struct __sv_tone*)0x2014)
+#define SV_RIGHT (*(struct __sv_tone*)0x2010)
+#define SV_LEFT  (*(struct __sv_tone*)0x2014)
 
 struct __sv_noise {
     unsigned char       volume;         /* and frequency */
     unsigned char       timer;
     unsigned char       control;
 };
-#define SV_NOISE ((struct __sv_noise*)0x2028)
+#define SV_NOISE (*(struct __sv_noise*)0x2028)
 
 struct __io_port {
     unsigned char       in;
     unsigned char       out;
 };
-#define IO_PORT  ((struct __io_port*)(0x2021)
+#define IO_PORT  (*(struct __io_port*)0x2021)
 
 struct __sv_dma {
     unsigned            start;
@@ -83,7 +83,7 @@ struct __sv_dma {
     unsigned char       control;
     unsigned char       on;
 };
-#define SV_DMA   ((struct __sv_dma*)0x2018)
+#define SV_DMA   (*(struct __sv_dma*)0x2018)
 
 #define SV_CONTROL (*(unsigned char*)0x2020)
 
diff --git a/include/target.h b/include/target.h
new file mode 100644 (file)
index 0000000..af401ec
--- /dev/null
@@ -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
index 02dff8868768b93ae7f2ec6f3a8caa22332449cf..f458180c51a8c62f91b938e958bf7ea9c3de01cc 100644 (file)
@@ -38,9 +38,8 @@
 
 
 
-#ifndef _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 */
 #endif
-
-
-
index ed208325504c6f353209931ebff3f2db7db66d9f..7e90f7b98226a710d56d67aa953c77083c17f1b7 100644 (file)
@@ -52,7 +52,6 @@ PREAD   :=      $FB1E   ; Read paddle in X, return AD conv. value in Y
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0               ; IRQ not used
 
 ; ------------------------------------------------------------------------
 
index 18f5724b5bf5b9069ffaf2e9b1982e9a4e978cea..e06b4a617f8b71efceb814bbf14a3ebb540b47ac 100644 (file)
@@ -115,7 +115,6 @@ pages:  .byte   2               ; Number of screens available
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0               ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 
index 045b0044fec01913fb258899f3cc1d4330ee5495..7238463a9a24211d7b9c03a1c1d39757f923b31b 100644 (file)
@@ -85,7 +85,6 @@ Y2      :=      ptr4
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0               ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 
index 0e8cd2a0a020836c15b2381d3e31d29a2930948a..9b02485d6bfb8d39a18766aeadc1034649584258 100644 (file)
@@ -41,7 +41,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index 0c8799e21bcf072140dd9fcc70a904c3c2aabb0d..0c49499f87d171e0317a73e122eb65bb9dbb4541 100644 (file)
@@ -40,7 +40,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index f4ef68165ae5c425fad88adebb00454393df61d5..cd486d91b15558ba6956e4a45edcd825143a656d 100644 (file)
@@ -68,7 +68,6 @@ libref: .addr   $0000                   ; Library reference
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0                       ; IRQ entry is unused
 
 ; ******************************************************************************
 
index 0b8b93b63d443a72c60ee85cf7f1ebfb0ab1d45f..041dc6830f8bc840100292137e01caa5f020f16c 100644 (file)
@@ -33,7 +33,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0               ; IRQ entry not used
 
 .code
 
index f59f6b96af699f3832814a8c649c41c004fa74d3..6e75a3e0b6625c9afcceb4dac3564d3e0f4b4e60 100644 (file)
 
         .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.
 
         .addr   INSTALL
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 637571c0461d2eece93190faf66b0be61c761f61..fd64901c9ef70dd4815614fc97f090dbdf18671e 100644 (file)
@@ -34,7 +34,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index ae9b0f77532c9194c820f1c19732ceb0180cda72..98d2cef96adc8163c603ee854f625aab0579f14c 100644 (file)
@@ -59,7 +59,6 @@ YSIZE   =       8               ; System font height
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0               ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index 943ec5389154959df89b1d6687f6f921b7f0145b..2643e08fd481d154a8158306a658627934be5492 100644 (file)
@@ -59,7 +59,6 @@ YSIZE   =       8                       ; System font height
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0                       ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index c9ae39a47734a271cb026a5af4d1ee3418fe6a54..180f7667dafe7aa0ff58519566b66c2ebef0de68 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 943361da5ee526d6333aab406f16248aa409099e..bf2e2fea7de08ce723874edc230ef380662834c4 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index 5100f7f7d0fef66f54f18759c1dd5707e023a761..f48b530f69e365de9934412b29eeb2adeb1bcf90 100644 (file)
@@ -88,7 +88,6 @@ pages:  .byte   1                       ; Number of screens available
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0                       ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index a7238e87788470d8e75c3cd6d8b2eebff83136e5..4b7b17c57857546d4fd46d2592030183ac8edcf5 100644 (file)
@@ -89,7 +89,6 @@ pages:  .byte   0                       ; Number of screens available
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0                       ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index 10c936399563265f83d7268af333d14706e8171e..9f6c0b4dd5204d6fd966dd0ebe39c3237b8e80f8 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   IRQ
 
 ; ------------------------------------------------------------------------
 ; Constants
index 5ed7af18771100e1d6750d08d8f60e0edc4a046e..0ccdc4fcd051f49526fde28652f554a78349e2ed 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index af5c27e134060dc8dd78532bede298b8afaadaf1..a772fb5f61266d81b42414f4a5bf59f9e62f1ef3 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 930ad6227138d2afab6151e30d7df33d6441ee7c..c983d81bbdc80d6203209a692a44935fdc006687 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 580220ecc3215cddec3a2fa6c6361874a0efc07c..8368c6ba2e71921476dc7963b7bdc8bfb504fc22 100644 (file)
@@ -57,7 +57,6 @@
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0                       ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index 0c2efc12d3b2999395da8a813b8374e3daea11f6..4e47fc1a02f8ae9cfad20928c5a145615e972d41 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 9a5afc42bb4a2e996ace680b1ffb136a004294b7..5cf46c39fe7142a8eea6490b0d1a0abbdb2099c2 100644 (file)
@@ -33,7 +33,6 @@
                 .addr   UNINSTALL
                 .addr   COUNT
                 .addr   READJOY
-                .addr   0                       ; IRQ entry not used
 
 ; ------------------------------------------------------------------------
 ; Constants
index 801b40acd5e2deafcae1cb24ad5f9eb041677b5c..8f927cdf520f4cfae861ec389ff79f2d7fd47c92 100644 (file)
@@ -30,7 +30,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 5a1af65e412212be4b3a848f0b366d805bfc23d3..08927e6c1fc2c4ed206e5a35faea9fd27015b84b 100644 (file)
@@ -74,7 +74,6 @@ aspect: .word $00D4             ; Aspect ratio (based on 4/3 display)
         .addr BAR
         .addr TEXTSTYLE
         .addr OUTTEXT
-        .addr 0                 ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index 0746709e9ba132385a4217455d081277a2ada353..c2d50c8d8b529f7e74b6973f1d9a8f7716851d6b 100644 (file)
@@ -6,7 +6,6 @@
 
         .import         joy_libref
         .importzp       ptr1
-        .interruptor    joy_irq         ; Export as IRQ handler
 
         .include        "joy-kernel.inc"
         .include        "joy-error.inc"
@@ -26,7 +25,6 @@ joy_install:    jmp     $0000
 joy_uninstall:  jmp     $0000
 joy_count:      jmp     $0000
 joy_read:       jmp     $0000
-joy_irq:        .byte   $60, $00, $00   ; RTS plus two dummy bytes
 
 ; Driver header signature
 .rodata
@@ -73,18 +71,7 @@ _joy_install:
         cpy     #(JOY_HDR::JUMPTAB + .sizeof(JOY_HDR::JUMPTAB))
         bne     @L1
 
-        jsr     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
+        jmp     joy_install             ; Call driver install routine
 
 ; Driver signature invalid
 
@@ -108,9 +95,6 @@ copy:   lda     (ptr1),y
 ; */
 
 _joy_uninstall:
-        lda     #$60                    ; RTS opcode
-        sta     joy_irq                 ; Disable IRQ entry point
-
         jsr     joy_uninstall           ; Call the driver routine
 
 _joy_clear_ptr:                         ; External entry point
index f76d9dfb747427fd6da1aefd8050739a60c6e4d0..151600aee798a313deab572634f181cf7ec33bdd 100644 (file)
@@ -8,5 +8,3 @@
         .include        "joy-kernel.inc"
 
         _joy_read       = joy_read              ; Use driver entry
-
-                                                
index 2e91cc43b103cca206f58abb65c30babba972d0a..c81a97dbf69e6097a731d5924b9d586f68a21cb9 100644 (file)
@@ -37,7 +37,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 62c78b8c5d2d8030c9f55bd5f57e97f73e7e6515..0bda1e7e8a31fcb256e8e6cdfd2d9928611aba90 100644 (file)
@@ -2,9 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         joy_libref, ser_libref, tgi_libref
+        .export         joy_libref, ser_libref
         .import         _exit
 
 joy_libref      := _exit
 ser_libref      := _exit
-tgi_libref      := _exit
index e6659631bd27af6a66ffad453d867f82b81a5fc9..04bdaae044d5e9a2b983f33c3e644a6a518241a0 100644 (file)
@@ -29,7 +29,7 @@
 
         .byte   $74, $67, $69           ; "tgi"
         .byte   TGI_API_VERSION         ; TGI API version number
-        .addr   $0000                   ; Library reference
+libref: .addr   $0000                   ; Library reference
         .word   160                     ; X resolution
         .word   102                     ; Y resolution
         .byte   16                      ; Number of drawing colors
@@ -64,7 +64,6 @@
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   IRQ
 
 
 ; ------------------------------------------------------------------------
@@ -164,6 +163,18 @@ INSTALL:
         stz     BGINDEX
         stz     DRAWPAGE
         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
 
 
@@ -175,6 +186,12 @@ INSTALL:
 ;
 
 UNINSTALL:
+        lda     libref
+        ldx     libref+1
+        sta     ptr1
+        stx     ptr1+1
+        lda     #$60            ; RTS opcode
+        sta     (ptr1)          ; Disable IRQ routine
         rts
 
 
@@ -466,14 +483,10 @@ SETDRAWPAGE:
         stx     DRAWPAGEH
         rts
 
-; ------------------------------------------------------------------------
-; IRQ: VBL interrupt handler
-;
-
-IRQ:
+irq:
         lda     INTSET          ; Poll all pending interrupts
         and     #VBL_INTERRUPT
-        beq     IRQEND          ; Exit if not a VBL interrupt
+        beq     @L0             ; Exit if not a VBL interrupt
 
         lda     SWAPREQUEST
         beq     @L0
@@ -485,7 +498,6 @@ IRQ:
         jsr     SETDRAWPAGE
         stz     SWAPREQUEST
 @L0:
-IRQEND:
         clc
         rts
 
diff --git a/libsrc/lynx/tgi_irq.s b/libsrc/lynx/tgi_irq.s
new file mode 100644 (file)
index 0000000..3968dc0
--- /dev/null
@@ -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
index 3032e9330083bc5f10b43fc0f9781b0ddff5eac0..63caf364bc19d3ddaedff667643c64e50f09a8eb 100644 (file)
@@ -35,7 +35,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 70e23e1193bf29482d5d0f55181e6bfce38241ee..e4dcb56ceab311832f10e8a6455d9286fd2b439f 100644 (file)
@@ -60,7 +60,6 @@ yres:   .word   56                      ; Max Y resolution
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0                       ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index ab25134ddfe4eb3fa6ce3738e35f2d408906a9f5..c0f338f9085161adb45ba71862a593d0a567dc21 100644 (file)
@@ -30,7 +30,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 3bb36835576dd9880d5fe9602a7a3b9b902c8aba..7620013be28a34828e2a0a20653e5acfe8d71554 100644 (file)
@@ -34,7 +34,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 29c6de627c48db49ff0d157c0fa2e2173f8916a0..85b7423022c4fcd9dd61ff191cfc050c28698b23 100644 (file)
@@ -33,7 +33,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0               ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index d998b2699057f832e3fabb9fd15b88488e54f37f..e8e85fedcfb89fdb5f98d5b14c21165e8987f255 100644 (file)
@@ -37,7 +37,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index f6a3257409d799a1552c1777c73e3c7ccfa22534..d233a8600d0b637e03eae47b580a5561d1593055 100644 (file)
@@ -29,7 +29,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READJOY
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
diff --git a/libsrc/supervision/libref.s b/libsrc/supervision/libref.s
new file mode 100644 (file)
index 0000000..e4afa7e
--- /dev/null
@@ -0,0 +1,8 @@
+;
+; Oliver Schmidt, 2013-05-31
+;
+
+        .export         joy_libref
+        .import         _exit
+
+joy_libref      := _exit
index 09c308e269b52ed493083fe6e8b85a0ac335f8c1..ce501f0bf29177ebd780263dcb0c3b65041d0dac 100644 (file)
@@ -58,7 +58,6 @@ YSIZE   =       8               ; System font height
         .addr   CIRCLE
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0               ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index 8a30ddd45f85e779fc9572fc9752c2fdabce2779..3ee918c4fd5e1aad3428abcacaf58503fd04b9b1 100644 (file)
@@ -58,7 +58,6 @@ YSIZE   =       8                       ; System font height
         .addr   BAR
         .addr   TEXTSTYLE
         .addr   OUTTEXT
-        .addr   0                       ; IRQ entry is unused
 
 ; ------------------------------------------------------------------------
 ; Data.
index ed65760af183bc08fb3ffa5394f554080f3cd9a5..3a388b6dc83f7794db512a41e46d47713b9de999 100644 (file)
@@ -6,7 +6,6 @@
 
         .import         tgi_libref
         .importzp       ptr1
-        .interruptor    tgi_irq         ; Export as IRQ handler
 
         .include        "tgi-kernel.inc"
         .include        "tgi-error.inc"
@@ -81,7 +80,6 @@ tgi_line:           jmp     $0000
 tgi_bar:            jmp     $0000
 tgi_textstyle:      jmp     $0000
 tgi_outtext:        jmp     $0000
-tgi_irq:            .byte   $60, $00, $00       ; RTS plus two dummy bytes
 
 ; Driver header signature
 .rodata
@@ -144,20 +142,13 @@ _tgi_install:
         dex
         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
 
         lda     #$00
-@L4:    ldx     #csize-1
-@L5:    sta     cstart,x                ; Clear error/mode/curx/cury/...
+        ldx     #csize-1
+@L4:    sta     cstart,x                ; Clear error/mode/curx/cury/...
         dex
-        bpl     @L5
+        bpl     @L4
 
         rts
 
@@ -206,9 +197,6 @@ _tgi_uninstall:
 
         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
 
 tgi_clear_ptr:
index 3b1db402afb885d06a9136daa52fea66caa8c05f..bf0ff128effe046578383f17569f4afb7ede7895 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 67299cc1a8e34bd272968159b3170c747104fc79..e5539c65355dc3c556329ef7b6a7b4719c49afeb 100644 (file)
@@ -36,7 +36,6 @@
         .addr   UNINSTALL
         .addr   COUNT
         .addr   READ
-        .addr   0                       ; IRQ entry unused
 
 ; ------------------------------------------------------------------------
 ; Constants
index 59841d6550d6ff1a52a66c33f305e1a19857a116..2bcfa08c367687d823c645b487fc27ebc1d13d86 100644 (file)
@@ -44,7 +44,7 @@ ifneq ($(filter disk samples.%,$(MAKECMDGOALS)),)
   # This one comes with VICE
   C1541 ?= c1541
 
-  # For this one see http://applecommander.sourceforge.net/
+  # For this one see https://applecommander.github.io/
   AC ?= ac.jar
 
   # For this one see http://www.horus.com/~hias/atari/
diff --git a/testcode/lib/apple2/Makefile b/testcode/lib/apple2/Makefile
new file mode 100644 (file)
index 0000000..87dadcb
--- /dev/null
@@ -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 $^