1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-09 06:29:38 +00:00

Create static drivers directly from source files.

Up to now static drivers were created via co65 from dynamic drivers. However there was an issue with that approach:

The dynamic drivers are "o65 simple files" which obligates that they start with the 'code' segment. However dynamic drivers need to start with the module header - which is written to. For dynamic drivers this isn't more than a conceptual issue because they are always contain a 'data' segment and may therefore only be loaded into writable memory.

However when dynamic drivers are converted to static drivers using co65 then that issue becomes a real problem as then the 'code' segment may end up in non-writable memory - and thus writing to the module header fails.

Instead of changing the way dynamic drivers work I opted to rather make static driver creation totally independent from dynamic drivers. This allows to place the module header in the 'data' segment (see 'module.mac').
This commit is contained in:
Oliver Schmidt 2014-06-04 23:50:18 +02:00
parent 2bc4634860
commit 2c975d3642
79 changed files with 332 additions and 115 deletions

13
asminc/module.mac Normal file
View File

@ -0,0 +1,13 @@
.ifndef DYN_DRV
DYN_DRV = 1
.endif
.macro module_header module_label
.if DYN_DRV
.segment "HEADER"
.else
.data
.export module_label
module_label:
.endif
.endmacro

View File

@ -4321,16 +4321,14 @@ The package defines the following macros:
<sect1><tt>.MACPACK atari</tt><p> <sect1><tt>.MACPACK atari</tt><p>
The atari macro package will define a macro named <tt/scrcode/. It takes a This macro package defines a macro named <tt/scrcode/. It takes a string
string as argument and places this string into memory translated into screen as argument and places this string into memory translated into screen codes.
codes.
<sect1><tt>.MACPACK cbm</tt><p> <sect1><tt>.MACPACK cbm</tt><p>
The cbm macro package will define a macro named <tt/scrcode/. It takes a This macro package defines a macro named <tt/scrcode/. It takes a string
string as argument and places this string into memory translated into screen as argument and places this string into memory translated into screen codes.
codes.
<sect1><tt>.MACPACK cpu</tt><p> <sect1><tt>.MACPACK cpu</tt><p>
@ -4386,6 +4384,13 @@ it is possible to determine if the
instruction is supported, which is the case for the 65SC02, 65C02 and 65816 instruction is supported, which is the case for the 65SC02, 65C02 and 65816
CPUs (the latter two are upwards compatible to the 65SC02). CPUs (the latter two are upwards compatible to the 65SC02).
<sect1><tt>.MACPACK module</tt><p>
This macro package defines a macro named <tt/module_header/. It takes an
identifier as argument and is used to define the header of a module both
in the dynamic and static variant.
<sect>Predefined constants<label id="predefined-constants"><p> <sect>Predefined constants<label id="predefined-constants"><p>

View File

@ -207,38 +207,39 @@ endif
define DRVTYPE_template define DRVTYPE_template
$1_SRCDIR = $$(SRCDIR)/$1 $1_SRCDIR = $$(SRCDIR)/$1
$1_OBJDIR = ../libwrk/$$(TARGET)/$1 $1_STCDIR = ../libwrk/$$(TARGET)
$1_DYNDIR = ../libwrk/$$(TARGET)/$1
$1_DRVDIR = ../$1 $1_DRVDIR = ../$1
$1_OBJPAT = $$($1_OBJDIR)/$$(OBJPFX)%.o $1_SRCPAT = $$($1_SRCDIR)/$$(OBJPFX)%.s
$1_STCPAT = $$($1_STCDIR)/$$(OBJPFX)%-$1.o
$1_DYNPAT = $$($1_DYNDIR)/$$(OBJPFX)%.o
$1_DRVPAT = $$($1_DRVDIR)/$$(DRVPFX)%.$1 $1_DRVPAT = $$($1_DRVDIR)/$$(DRVPFX)%.$1
$1_STCPAT = ../libwrk/$$(TARGET)/$$(DRVPFX)%-$1.o
$1_OBJS := $$(patsubst $$($1_SRCDIR)/%.s,$$($1_OBJDIR)/%.o,$$(wildcard $$($1_SRCDIR)/*.s)) $1_SRCS := $$(wildcard $$($1_SRCDIR)/*.s)
$1_STCS = $$(patsubst $$($1_SRCPAT),$$($1_STCPAT),$$($1_SRCS))
$1_DYNS = $$(patsubst $$($1_SRCPAT),$$($1_DYNPAT),$$($1_SRCS))
$1_DRVS = $$(patsubst $$($1_DYNPAT),$$($1_DRVPAT),$$($1_DYNS))
$1_DRVS = $$(patsubst $$($1_OBJPAT),$$($1_DRVPAT),$$($1_OBJS)) $$($1_STCPAT): $$($1_SRCPAT)
@echo $$(TARGET) - $$< - static
@$$(CA65) -t $$(TARGET) -D DYN_DRV=0 $$(CA65FLAGS) --create-dep $$(@:.o=.d) -o $$@ $$<
$1_STCS = $$(patsubst $$($1_DRVPAT),$$($1_STCPAT),$$($1_DRVS)) OBJS += $$($1_STCS)
DEPS += $$($1_STCS:.o=.d)
$$($1_OBJS): | $$($1_OBJDIR) $$($1_DYNS): | $$($1_DYNDIR)
$$($1_DRVPAT): $$($1_OBJPAT) $$(ZPOBJ) | $$($1_DRVDIR) $$($1_DRVPAT): $$($1_DYNPAT) $$(ZPOBJ) | $$($1_DRVDIR)
@echo $$(TARGET) - $$(<F) @echo $$(TARGET) - $$(<F)
@$$(LD65) -o $$@ -t module $$^ @$$(LD65) -o $$@ -t module $$^
$$($1_OBJDIR) $$($1_DRVDIR): $$($1_DYNDIR) $$($1_DRVDIR):
@$$(call MKDIR,$$@) @$$(call MKDIR,$$@)
$(TARGET): $$($1_DRVS) $(TARGET): $$($1_DRVS)
$$($1_STCPAT): $$($1_DRVPAT) DEPS += $$($1_DYNS:.o=.d)
@echo $$(TARGET) - $$(<F)
@$$(CO65) -o $$(@:.o=.s) --code-label _$$(subst -,_,$$(subst .,_,$$(<F))) $$<
@$$(CA65) -t $$(TARGET) -o $$@ $$(@:.o=.s)
OBJS += $$($1_STCS)
DEPS += $$($1_OBJS:.o=.d)
endef # DRVTYPE_template endef # DRVTYPE_template
@ -247,7 +248,6 @@ $(foreach drvtype,$(DRVTYPES),$(eval $(call DRVTYPE_template,$(drvtype))))
AR65 := $(if $(wildcard ../bin/ar65*),../bin/ar65,ar65) AR65 := $(if $(wildcard ../bin/ar65*),../bin/ar65,ar65)
CA65 := $(if $(wildcard ../bin/ca65*),../bin/ca65,ca65) CA65 := $(if $(wildcard ../bin/ca65*),../bin/ca65,ca65)
CC65 := $(if $(wildcard ../bin/cc65*),../bin/cc65,cc65) CC65 := $(if $(wildcard ../bin/cc65*),../bin/cc65,cc65)
CO65 := $(if $(wildcard ../bin/co65*),../bin/co65,co65)
LD65 := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65) LD65 := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
export CC65_HOME := $(abspath ..) export CC65_HOME := $(abspath ..)

View File

@ -10,10 +10,16 @@
.include "em-kernel.inc" .include "em-kernel.inc"
.include "em-error.inc" .include "em-error.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __APPLE2ENH__
module_header _a2e_auxmem_emd
.else
module_header _a2_auxmem_emd
.endif
; Driver signature ; Driver signature

View File

@ -13,6 +13,8 @@
.include "joy-error.inc" .include "joy-error.inc"
.include "apple2.inc" .include "apple2.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Constants ; Constants
@ -29,7 +31,11 @@ PREAD := $FB1E ; Read paddle in X, return AD conv. value in Y
; Header. Includes jump table. ; Header. Includes jump table.
.segment "HEADER" .ifdef __APPLE2ENH__
module_header _a2e_stdjoy_joy
.else
module_header _a2_stdjoy_joy
.endif
; Driver signature ; Driver signature

View File

@ -8,6 +8,8 @@
.include "mouse-kernel.inc" .include "mouse-kernel.inc"
.include "apple2.inc" .include "apple2.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
SETMOUSE = $12 ; Sets mouse mode SETMOUSE = $12 ; Sets mouse mode
@ -28,7 +30,11 @@ status := $0778
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "HEADER" .ifdef __APPLE2ENH__
module_header _a2e_stdmou_mou
.else
module_header _a2_stdmou_mou
.endif
; Driver signature ; Driver signature
.byte $6D, $6F, $75 ; "mou" .byte $6D, $6F, $75 ; "mou"

View File

@ -25,10 +25,16 @@
.include "ser-kernel.inc" .include "ser-kernel.inc"
.include "ser-error.inc" .include "ser-error.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __APPLE2ENH__
module_header _a2e_ssc_ser
.else
module_header _a2_ssc_ser
.endif
; Driver signature ; Driver signature
.byte $73, $65, $72 ; "ser" .byte $73, $65, $72 ; "ser"

View File

@ -11,6 +11,8 @@
.include "tgi-error.inc" .include "tgi-error.inc"
.include "apple2.inc" .include "apple2.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Zero page stuff ; Zero page stuff
@ -68,7 +70,11 @@ Y2 := ptr4
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "HEADER" .ifdef __APPLE2ENH__
module_header _a2e_hi_tgi
.else
module_header _a2_hi_tgi
.endif
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.

View File

@ -11,6 +11,8 @@
.include "tgi-error.inc" .include "tgi-error.inc"
.include "apple2.inc" .include "apple2.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Zero page stuff ; Zero page stuff
@ -38,7 +40,11 @@ Y2 := ptr4
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "HEADER" .ifdef __APPLE2ENH__
module_header _a2e_lo_tgi
.else
module_header _a2_lo_tgi
.endif
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.

View File

@ -31,12 +31,17 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __ATARIXL__
module_header _atrx130_emd
.else
module_header _atr130_emd
.endif
; Driver signature ; Driver signature

View File

@ -14,12 +14,17 @@
.include "atari.inc" .include "atari.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __ATARIXL__
module_header _atrxmj8_joy
.else
module_header _atrmj8_joy
.endif
; Driver signature ; Driver signature

View File

@ -13,12 +13,17 @@
.include "atari.inc" .include "atari.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __ATARIXL__
module_header _atrxstd_joy
.else
module_header _atrstd_joy
.endif
; Driver signature ; Driver signature

View File

@ -10,11 +10,16 @@
.include "atari.inc" .include "atari.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __ATARIXL__
module_header _atrxjoy_mou
.else
module_header _atrjoy_mou
.endif
HEADER: HEADER:

View File

@ -23,6 +23,7 @@ DISABLE_TIMEOUT = 30 ; # of vertical blank interrupts after w
.include "atari.inc" .include "atari.inc"
.macpack generic .macpack generic
.macpack module
.if .not ( .defined (AMIGA_MOUSE) .or .defined (TRAK_MOUSE)) .if .not ( .defined (AMIGA_MOUSE) .or .defined (TRAK_MOUSE))
ST_MOUSE = 1 ST_MOUSE = 1
@ -31,7 +32,31 @@ DISABLE_TIMEOUT = 30 ; # of vertical blank interrupts after w
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .if .defined (ST_MOUSE)
.ifdef __ATARIXL__
module_header _atrxst_mou
.else
module_header _atrst_mou
.endif
.elseif .defined (AMIGA_MOUSE)
.ifdef __ATARIXL__
module_header _atrxami_mou
.else
module_header _atrami_mou
.endif
.elseif .defined (TRAK_MOUSE)
.ifdef __ATARIXL__
module_header _atrxtrk_mou
.else
module_header _atrtrk_mou
.endif
.endif
HEADER: HEADER:

View File

@ -9,11 +9,16 @@
.include "atari.inc" .include "atari.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __ATARIXL__
module_header _atrxtt_mou
.else
module_header _atrtt_mou
.endif
HEADER: HEADER:

View File

@ -10,11 +10,17 @@
.include "ser-error.inc" .include "ser-error.inc"
.include "atari.inc" .include "atari.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .ifdef __ATARIXL__
module_header _atrxrdev_ser
.else
module_header _atrrdev_ser
.endif
; Driver signature ; Driver signature

View File

@ -3,6 +3,7 @@
; ;
.macpack longbranch .macpack longbranch
.macpack module
.ifdef __ATARIXL__ .ifdef __ATARIXL__
CIO_vec := my_CIOV CIO_vec := my_CIOV
@ -18,7 +19,19 @@
; ;
; ---------------------------------------------------------------------- ; ----------------------------------------------------------------------
.segment "HEADER" .ifdef __ATARIXL__
.define LABEL_X "x"
.else
.define LABEL_X ""
.endif
.if pages = 2
.define LABEL_P2 "p2"
.else
.define LABEL_P2 ""
.endif
module_header .ident (.sprintf ("_atr%s%d%s_tgi", LABEL_X, ::grmode, LABEL_P2))
; Header ; Header

View File

@ -10,11 +10,13 @@
.include "joy-error.inc" .include "joy-error.inc"
.include "atari5200.inc" .include "atari5200.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _atr5200std_joy
; Driver signature ; Driver signature

View File

@ -11,11 +11,13 @@
.include "joy-error.inc" .include "joy-error.inc"
.include "atmos.inc" .include "atmos.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _atmos_pase_joy
; Driver signature ; Driver signature

View File

@ -28,10 +28,13 @@
.include "ser-error.inc" .include "ser-error.inc"
.include "atmos.inc" .include "atmos.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _atmos_acia_ser
; Driver signature ; Driver signature
.byte $73, $65, $72 ; "ser" .byte $73, $65, $72 ; "ser"

View File

@ -12,6 +12,7 @@
.include "atmos.inc" .include "atmos.inc"
.macpack generic .macpack generic
.macpack module
XSIZE = 6 ; System font width XSIZE = 6 ; System font width
YSIZE = 8 ; System font height YSIZE = 8 ; System font height
@ -19,7 +20,7 @@ YSIZE = 8 ; System font height
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _atmos_228_200_3_tgi
; The first part of the header is a structure that has a signature, ; The first part of the header is a structure that has a signature,
; and defines the capabilities of the driver. ; and defines the capabilities of the driver.

View File

@ -12,6 +12,7 @@
.include "atmos.inc" .include "atmos.inc"
.macpack generic .macpack generic
.macpack module
XSIZE = 6 ; System font width XSIZE = 6 ; System font width
YSIZE = 8 ; System font height YSIZE = 8 ; System font height
@ -19,7 +20,7 @@ YSIZE = 8 ; System font height
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _atmos_240_200_2_tgi
; First part of the header is a structure that has a magic and defines the ; First part of the header is a structure that has a magic and defines the
; capabilities of the driver ; capabilities of the driver

View File

@ -13,14 +13,14 @@
.include "em-kernel.inc" .include "em-kernel.inc"
.include "em-error.inc" .include "em-error.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_georam_emd
; Driver signature ; Driver signature

View File

@ -11,14 +11,14 @@
.include "em-error.inc" .include "em-error.inc"
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_ram_emd
; Driver signature ; Driver signature

View File

@ -14,14 +14,14 @@
.include "em-error.inc" .include "em-error.inc"
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_ram2_emd
; Driver signature ; Driver signature

View File

@ -12,14 +12,14 @@
.include "em-kernel.inc" .include "em-kernel.inc"
.include "em-error.inc" .include "em-error.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_ramcart_emd
; Driver signature ; Driver signature

View File

@ -11,14 +11,14 @@
.include "em-error.inc" .include "em-error.inc"
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_reu_emd
; Driver signature ; Driver signature

View File

@ -9,14 +9,14 @@
.include "em-kernel.inc" .include "em-kernel.inc"
.include "em-error.inc" .include "em-error.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_vdc_emd
; Driver signature ; Driver signature

View File

@ -13,11 +13,13 @@
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_ptvjoy_joy
; Driver signature ; Driver signature

View File

@ -13,12 +13,13 @@
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_stdjoy_joy
; Driver signature ; Driver signature

View File

@ -12,11 +12,13 @@
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_1351_mou
HEADER: HEADER:

View File

@ -10,11 +10,13 @@
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table. ; Header. Includes jump table.
.segment "HEADER" module_header _c128_inkwell_mou
HEADER: HEADER:

View File

@ -11,11 +11,13 @@
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_joy_mou
HEADER: HEADER:

View File

@ -12,11 +12,13 @@
.include "c128.inc" .include "c128.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_pot_mou
HEADER: HEADER:

View File

@ -26,11 +26,13 @@
.include "ser-error.inc" .include "ser-error.inc"
.include "c128.inc" .include "c128.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c128_swlink_ser
; Driver signature ; Driver signature

View File

@ -25,8 +25,9 @@
.include "tgi-kernel.inc" .include "tgi-kernel.inc"
.include "tgi-error.inc" .include "tgi-error.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Constants ; Constants
@ -48,7 +49,7 @@ VDC_DATA = 31
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _c128_vdc_tgi
; First part of the header is a structure that has a magic and defines the ; First part of the header is a structure that has a magic and defines the
; capabilities of the driver ; capabilities of the driver

View File

@ -26,8 +26,9 @@
.include "tgi-kernel.inc" .include "tgi-kernel.inc"
.include "tgi-error.inc" .include "tgi-error.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Constants ; Constants
@ -49,7 +50,7 @@ VDC_DATA = 31
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _c128_vdc2_tgi
; First part of the header is a structure that has a magic and defines the ; First part of the header is a structure that has a magic and defines the
; capabilities of the driver ; capabilities of the driver

View File

@ -12,12 +12,13 @@
.include "plus4.inc" .include "plus4.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c16_ram_emd
; Driver signature ; Driver signature

View File

@ -5,5 +5,6 @@
; Ullrich von Bassewitz, 2002-12-21 ; Ullrich von Bassewitz, 2002-12-21
; ;
.include "../../plus4/joy/plus4-stdjoy.s" .define MODULE_LABEL _c16_stdjoy_joy
.include "../../plus4/joy/plus4-stdjoy.s"

View File

@ -10,12 +10,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_c256k_emd
; Driver signature ; Driver signature

View File

@ -10,12 +10,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_dqbb_emd
; Driver signature ; Driver signature

View File

@ -15,12 +15,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_georam_emd
; Driver signature ; Driver signature

View File

@ -10,12 +10,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_isepic_emd
; Driver signature ; Driver signature

View File

@ -12,12 +12,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_ram_emd
; Driver signature ; Driver signature

View File

@ -14,12 +14,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_ramcart_emd
; Driver signature ; Driver signature

View File

@ -12,12 +12,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_reu_emd
; Driver signature ; Driver signature

View File

@ -15,12 +15,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_vdc_emd
; Driver signature ; Driver signature

View File

@ -14,12 +14,13 @@
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _dtv_himem_emd
; Driver signature ; Driver signature

View File

@ -12,11 +12,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_hitjoy_joy
; Driver signature ; Driver signature

View File

@ -13,12 +13,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_numpad_joy
; Driver signature ; Driver signature

View File

@ -12,11 +12,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_ptvjoy_joy
; Driver signature ; Driver signature

View File

@ -12,12 +12,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_stdjoy_joy
; Driver signature ; Driver signature

View File

@ -29,11 +29,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_1351_mou
HEADER: HEADER:

View File

@ -9,11 +9,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table. ; Header. Includes jump table.
.segment "HEADER" module_header _c64_inkwell_mou
HEADER: HEADER:

View File

@ -28,11 +28,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_joy_mou
HEADER: HEADER:

View File

@ -11,11 +11,13 @@
.include "c64.inc" .include "c64.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_pot_mou
HEADER: HEADER:

View File

@ -26,11 +26,13 @@
.include "ser-error.inc" .include "ser-error.inc"
.include "c64.inc" .include "c64.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _c64_swlink_ser
; Driver signature ; Driver signature

View File

@ -9,14 +9,14 @@
.include "tgi-kernel.inc" .include "tgi-kernel.inc"
.include "tgi-error.inc" .include "tgi-error.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _c64_hi_tgi
; First part of the header is a structure that has a magic and defines the ; First part of the header is a structure that has a magic and defines the
; capabilities of the driver ; capabilities of the driver

View File

@ -12,12 +12,13 @@
.include "cbm510.inc" .include "cbm510.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _cbm510_ram_emd
; Driver signature ; Driver signature

View File

@ -13,12 +13,13 @@
.include "cbm510.inc" .include "cbm510.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _cbm510_std_joy
; Driver signature ; Driver signature

View File

@ -13,11 +13,13 @@
.include "cbm510.inc" .include "cbm510.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table. ; Header. Includes jump table.
.segment "HEADER" module_header _cbm510_inkwl_mou
HEADER: HEADER:

View File

@ -12,11 +12,13 @@
.include "cbm510.inc" .include "cbm510.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _cbm510_joy_mou
HEADER: HEADER:

View File

@ -27,11 +27,13 @@
.include "ser-error.inc" .include "ser-error.inc"
.include "cbm510.inc" .include "cbm510.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _cbm510_std_ser
; Driver signature ; Driver signature

View File

@ -12,12 +12,13 @@
.include "cbm610.inc" .include "cbm610.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _cbm610_ram_emd
; Driver signature ; Driver signature

View File

@ -27,11 +27,13 @@
.include "ser-error.inc" .include "ser-error.inc"
.include "cbm610.inc" .include "cbm610.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _cbm610_std_ser
; Driver signature ; Driver signature

View File

@ -10,11 +10,13 @@
.include "em-error.inc" .include "em-error.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _geos_vdc_emd
; Driver signature ; Driver signature

View File

@ -11,12 +11,14 @@
.include "geossym.inc" .include "geossym.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _geos_stdjoy_joy
; Driver signature ; Driver signature
.byte $6A, $6F, $79 ; "joy" .byte $6A, $6F, $79 ; "joy"

View File

@ -10,8 +10,10 @@
.include "jumptab.inc" .include "jumptab.inc"
.include "geossym.inc" .include "geossym.inc"
.include "geossym2.inc" .include "geossym2.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Constants ; Constants
@ -33,7 +35,7 @@ VDC_DATA = 31
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _geos_tgi_tgi
; First part of the header is a structure that has a magic signature, ; First part of the header is a structure that has a magic signature,
; and defines the capabilities of the driver. ; and defines the capabilities of the driver.

View File

@ -14,12 +14,13 @@
.include "lynx.inc" .include "lynx.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _lynx_stdjoy_joy
; Driver signature ; Driver signature

View File

@ -9,10 +9,13 @@
.include "ser-kernel.inc" .include "ser-kernel.inc"
.include "ser-error.inc" .include "ser-error.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _lynx_comlynx_ser
; Driver signature ; Driver signature
.byte $73, $65, $72 ; "ser" .byte $73, $65, $72 ; "ser"

View File

@ -16,11 +16,13 @@
.include "lynx.inc" .include "lynx.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _lynx_160_102_16_tgi
; First part of the header is a structure that has a magic and defines the ; First part of the header is a structure that has a magic and defines the
; capabilities of the driver ; capabilities of the driver

View File

@ -12,11 +12,13 @@
.include "joy-error.inc" .include "joy-error.inc"
.include "nes.inc" .include "nes.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _nes_stdjoy_joy
; Driver signature ; Driver signature

View File

@ -15,11 +15,13 @@
.import paldata .import paldata
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table and constants. ; Header. Includes jump table and constants.
.segment "HEADER" module_header _nes_64_56_2_tgi
; First part of the header is a structure that has a magic and defines the ; First part of the header is a structure that has a magic and defines the
; capabilities of the driver ; capabilities of the driver

View File

@ -10,14 +10,14 @@
.include "joy-kernel.inc" .include "joy-kernel.inc"
.include "joy-error.inc" .include "joy-error.inc"
; .include "pet.inc"
VIA_PRA := $E841 ; Port register A .macpack module
VIA_DDRA := $E843 ; Data direction register A
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _pet_ptvjoy_joy
; Driver signature ; Driver signature
@ -50,7 +50,10 @@ VIA_DDRA := $E843 ; Data direction register A
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Constants ; Constants
JOY_COUNT = 2 ; Number of joysticks we support JOY_COUNT = 2 ; Number of joysticks we support
VIA_PRA := $E841 ; Port register A
VIA_DDRA := $E843 ; Data direction register A
.code .code

View File

@ -10,11 +10,13 @@
.include "joy-error.inc" .include "joy-error.inc"
.include "pet.inc" .include "pet.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _pet_stdjoy_joy
; Driver signature ; Driver signature

View File

@ -12,12 +12,17 @@
.include "plus4.inc" .include "plus4.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" .if .xmatch ("MODULE_LABEL", .string(MODULE_LABEL))
module_header _plus4_stdjoy_joy
.else
module_header MODULE_LABEL
.endif
; Driver signature ; Driver signature

View File

@ -26,11 +26,13 @@
.include "ser-error.inc" .include "ser-error.inc"
.include "plus4.inc" .include "plus4.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _plus4_stdser_ser
; Driver signature ; Driver signature

View File

@ -13,10 +13,13 @@
.include "joy-error.inc" .include "joy-error.inc"
.include "vic20.inc" .include "vic20.inc"
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _vic20_ptvjoy_joy
; Driver signature ; Driver signature

View File

@ -13,12 +13,13 @@
.include "vic20.inc" .include "vic20.inc"
.macpack generic .macpack generic
.macpack module
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Header. Includes jump table ; Header. Includes jump table
.segment "HEADER" module_header _vic20_stdjoy_joy
; Driver signature ; Driver signature