Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Christian Groessler
2013-06-04 10:54:34 +02:00
91 changed files with 663 additions and 245 deletions

View File

@@ -206,6 +206,8 @@ CC := $(if $(wildcard ../bin/cc65*),../bin/cc65,cc65)
CO := $(if $(wildcard ../bin/co65*),../bin/co65,co65)
LD := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65)
export CC65_HOME := $(abspath ..)
##########
define ASSEMBLE_recipe

View File

@@ -20,16 +20,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word DEINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants
@@ -69,11 +73,11 @@ INSTALL:
; rts
; ------------------------------------------------------------------------
; DEINSTALL routine. Is called before the driver is removed from memory.
; UNINSTALL routine. Is called before the driver is removed from memory.
; Can do cleanup or whatever. Must not return anything.
;
DEINSTALL:
UNINSTALL:
rts

View File

@@ -36,6 +36,10 @@ PREAD := $FB1E ; Read paddle in X, return AD conv. value in Y
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $10

12
libsrc/apple2/libref.s Normal file
View File

@@ -0,0 +1,12 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, mouse_libref, ser_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
mouse_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@@ -34,7 +34,10 @@ status := $0778
.byte $6D, $6F, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr HIDE

View File

@@ -34,7 +34,10 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr OPEN

View File

@@ -77,6 +77,7 @@ Y2 := ptr4
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 280 ; X resolution
.word 192 ; Y resolution
.byte 8 ; Number of drawing colors

View File

@@ -47,6 +47,7 @@ Y2 := ptr4
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 40 ; X resolution
.word 48 ; Y resolution
.byte 16 ; Number of drawing colors

View File

@@ -43,16 +43,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word DEINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants
@@ -191,11 +195,11 @@ INSTALL:
rts
; ------------------------------------------------------------------------
; DEINSTALL routine. Is called before the driver is removed from memory.
; UNINSTALL routine. Is called before the driver is removed from memory.
; Can do cleanup or whatever. Must not return anything.
;
DEINSTALL:
UNINSTALL:
rts

View File

@@ -26,6 +26,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $02 ; JOY_UP

View File

@@ -25,6 +25,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

10
libsrc/atari/libref.s Normal file
View File

@@ -0,0 +1,10 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
tgi_libref := _exit

View File

@@ -18,6 +18,7 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word x_res ; X resolution
.word y_res ; Y resolution
.byte colors ; Number of drawing colors

View File

@@ -21,6 +21,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $10 ; JOY_UP

10
libsrc/atmos/libref.s Normal file
View File

@@ -0,0 +1,10 @@
;
; Oliver Schmidt, 2013-05-31
;
.export joy_libref, ser_libref, tgi_libref
.import _exit
joy_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@@ -35,7 +35,10 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr OPEN

View File

@@ -26,6 +26,7 @@ YSIZE = 8 ; System font height
.byte "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 228 ; x resolution
.word 200 ; y resolution
.byte 3 ; Number of drawing colors

View File

@@ -26,6 +26,7 @@ YSIZE = 8 ; System font height
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 240 ; X resolution
.word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@@ -27,16 +27,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -25,16 +25,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -28,16 +28,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -26,16 +26,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -25,16 +25,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -23,16 +23,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word DEINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants
@@ -141,11 +145,11 @@ settestadr2:
jmp vdcsetsrcaddr
; ------------------------------------------------------------------------
; DEINSTALL routine. Is called before the driver is removed from memory.
; UNINSTALL routine. Is called before the driver is removed from memory.
; Can do cleanup or whatever. Must not return anything.
;
DEINSTALL:
UNINSTALL:
;on C128 restore font and clear the screen?
rts

View File

@@ -24,6 +24,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

View File

@@ -25,6 +25,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

12
libsrc/c128/libref.s Normal file
View File

@@ -0,0 +1,12 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, mouse_libref, ser_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
mouse_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@@ -23,7 +23,11 @@ HEADER:
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL

View File

@@ -22,7 +22,11 @@ HEADER:
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL

View File

@@ -23,7 +23,11 @@ HEADER:
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL

View File

@@ -37,7 +37,11 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.word INSTALL
.word UNINSTALL

View File

@@ -55,6 +55,7 @@ VDC_DATA = 31
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word 640 ; X resolution
yres: .word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@@ -56,6 +56,7 @@ VDC_DATA = 31
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word 640 ; X resolution
yres: .word 480 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@@ -24,16 +24,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

9
libsrc/c16/libref.s Normal file
View File

@@ -0,0 +1,9 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref
.import _exit
em_libref := _exit
joy_libref := _exit

View File

@@ -22,16 +22,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -22,16 +22,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -27,16 +27,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -22,16 +22,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -24,16 +24,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -26,16 +26,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -24,16 +24,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -27,16 +27,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -26,16 +26,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -23,6 +23,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

View File

@@ -25,6 +25,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $02 ; JOY_UP "8"

View File

@@ -23,6 +23,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

View File

@@ -24,6 +24,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

12
libsrc/c64/libref.s Normal file
View File

@@ -0,0 +1,12 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, mouse_libref, ser_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
mouse_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@@ -42,7 +42,11 @@ HEADER:
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL

View File

@@ -41,7 +41,11 @@ HEADER:
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL

View File

@@ -23,7 +23,11 @@ HEADER:
.byte $6d, $6f, $75 ; "mou"
.byte MOUSE_API_VERSION ; Mouse driver API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL

View File

@@ -37,7 +37,11 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.word INSTALL
.word UNINSTALL

View File

@@ -23,6 +23,7 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 320 ; X resolution
.word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@@ -24,16 +24,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -25,6 +25,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

10
libsrc/cbm510/libref.s Normal file
View File

@@ -0,0 +1,10 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, ser_libref
.import _exit
em_libref := _exit
joy_libref := _exit
ser_libref := _exit

View File

@@ -38,7 +38,11 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.word INSTALL
.word UNINSTALL

View File

@@ -24,16 +24,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

9
libsrc/cbm610/libref.s Normal file
View File

@@ -0,0 +1,9 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, ser_libref
.import _exit
em_libref := _exit
ser_libref := _exit

View File

@@ -38,7 +38,11 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.word INSTALL
.word UNINSTALL

View File

@@ -4,7 +4,7 @@
; Common functions of the extended memory API.
;
.import return0
.import return0, em_libref
.importzp ptr1
.include "em-kernel.inc"
@@ -55,6 +55,15 @@ _em_install:
dey
bpl @L0
; Set the library reference
ldy #EMD_HDR::LIBREF
lda #<em_libref
sta (ptr1),y
iny
lda #>em_libref
sta (ptr1),y
; Copy the jump vectors
ldy #EMD_HDR::JUMPTAB

View File

@@ -21,16 +21,20 @@
.byte $65, $6d, $64 ; "emd"
.byte EMD_API_VERSION ; EM API version number
; Jump table.
; Library reference
.word INSTALL
.word UNINSTALL
.word PAGECOUNT
.word MAP
.word USE
.word COMMIT
.word COPYFROM
.word COPYTO
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr PAGECOUNT
.addr MAP
.addr USE
.addr COMMIT
.addr COPYFROM
.addr COPYTO
; ------------------------------------------------------------------------
; Constants

View File

@@ -22,6 +22,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

View File

@@ -0,0 +1,10 @@
;
; Oliver Schmidt, 2013-05-31
;
.export em_libref, joy_libref, tgi_libref
.import _exit
em_libref := _exit
joy_libref := _exit
tgi_libref := _exit

View File

@@ -40,6 +40,7 @@ VDC_DATA = 31
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word 320 ; X resolution
yres: .word 200 ; Y resolution
.byte 2 ; Number of drawing colors

View File

@@ -4,6 +4,7 @@
; Common functions of the joystick API.
;
.import joy_libref
.importzp ptr1
.interruptor joy_irq ; Export as IRQ handler
@@ -55,6 +56,15 @@ _joy_install:
dey
bpl @L0
; Set the library reference
ldy #JOY_HDR::LIBREF
lda #<joy_libref
sta (ptr1),y
iny
lda #>joy_libref
sta (ptr1),y
; Copy the mask array
ldy #JOY_HDR::MASKS + .sizeof(JOY_HDR::MASKS) - 1

View File

@@ -26,6 +26,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
joy_mask:

10
libsrc/lynx/libref.s Normal file
View File

@@ -0,0 +1,10 @@
;
; Oliver Schmidt, 2013-05-31
;
.export joy_libref, ser_libref, tgi_libref
.import _exit
joy_libref := _exit
ser_libref := _exit
tgi_libref := _exit

View File

@@ -18,7 +18,10 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.addr INSTALL
.addr UNINSTALL
.addr OPEN

View File

@@ -27,6 +27,7 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
.word 160 ; X resolution
.word 102 ; Y resolution
.byte 16 ; Number of drawing colors

View File

@@ -4,7 +4,7 @@
; Common functions of the mouse driver API.
;
.import return0, popsreg, incsp2
.import return0, popsreg, incsp2, mouse_libref
.importzp sreg, ptr1, tmp1, tmp2
.interruptor mouse_irq ; Export as IRQ handler
@@ -64,6 +64,15 @@ _mouse_install:
dey
bpl @L0
; Set the library reference
ldy #MOUSE_HDR::LIBREF
lda #<mouse_libref
sta (ptr1),y
iny
lda #>mouse_libref
sta (ptr1),y
; Reset flags
lda #1

View File

@@ -23,6 +23,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $10 ; JOY_UP

9
libsrc/nes/libref.s Normal file
View File

@@ -0,0 +1,9 @@
;
; Oliver Schmidt, 2013-05-31
;
.export joy_libref, tgi_libref
.import _exit
joy_libref := _exit
tgi_libref := _exit

View File

@@ -26,13 +26,14 @@
.byte $74, $67, $69 ; "tgi"
.byte TGI_API_VERSION ; TGI API version number
.addr $0000 ; Library reference
xres: .word charsperline*2 ; Max X resolution
yres: .word 56 ; Max Y resolution
.byte 2 ; Number of drawing colors
.byte 1 ; Number of screens available
.byte 2 ; System font X size
.byte 2 ; System font Y size
.word $100 ; Aspect ratio
.word $0100 ; Aspect ratio
.byte 0 ; TGI driver flags
; Next comes the jump table. Currently all entries must be valid and may point

View File

@@ -24,6 +24,10 @@ VIA_DDRA := $E843 ; Data direction register A
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

View File

@@ -21,6 +21,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

8
libsrc/pet/libref.s Normal file
View File

@@ -0,0 +1,8 @@
;
; Oliver Schmidt, 2013-05-31
;
.export joy_libref
.import _exit
joy_libref := _exit

View File

@@ -24,6 +24,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

9
libsrc/plus4/libref.s Normal file
View File

@@ -0,0 +1,9 @@
;
; Oliver Schmidt, 2013-05-31
;
.export joy_libref, ser_libref
.import _exit
joy_libref := _exit
ser_libref := _exit

View File

@@ -37,7 +37,11 @@
.byte $73, $65, $72 ; "ser"
.byte SER_API_VERSION ; Serial API version number
; Jump table.
; Library reference
.addr $0000
; Jump table
.word INSTALL
.word UNINSTALL

View File

@@ -4,7 +4,7 @@
; Common functions of the serial drivers
;
.import return0
.import return0, ser_libref
.importzp ptr1
.interruptor ser_irq, 29 ; Export as high priority IRQ handler
@@ -58,6 +58,15 @@ _ser_install:
dey
bpl @L0
; Set the library reference
ldy #SER_HDR::LIBREF
lda #<ser_libref
sta (ptr1),y
iny
lda #>ser_libref
sta (ptr1),y
; Copy the jump vectors
ldy #SER_HDR::JUMPTAB

View File

@@ -4,12 +4,13 @@
; Common functions of the tgi graphics kernel.
;
.include "tgi-kernel.inc"
.include "tgi-error.inc"
.import tgi_libref
.importzp ptr1
.interruptor tgi_irq ; Export as IRQ handler
.include "tgi-kernel.inc"
.include "tgi-error.inc"
;----------------------------------------------------------------------------
; Variables
@@ -108,6 +109,15 @@ _tgi_install:
dey
bpl @L0
; Set the library reference
ldy #TGI_HDR::LIBREF
lda #<tgi_libref
sta (ptr1),y
iny
lda #>tgi_libref
sta (ptr1),y
; Copy the jump vectors
ldy #TGI_HDR::JUMPTAB

View File

@@ -23,6 +23,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $01 ; JOY_UP

View File

@@ -25,6 +25,10 @@
.byte $6A, $6F, $79 ; "joy"
.byte JOY_API_VERSION ; Driver API version number
; Library reference
.addr $0000
; Button state masks (8 values)
.byte $02 ; JOY_UP

8
libsrc/vic20/libref.s Normal file
View File

@@ -0,0 +1,8 @@
;
; Oliver Schmidt, 2013-05-31
;
.export joy_libref
.import _exit
joy_libref := _exit