fcdev-cc65 0.0.0-stage → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -0
- package/asminc/_file.inc +27 -0
- package/asminc/_heap.inc +35 -0
- package/asminc/accelerator.inc +80 -0
- package/asminc/agat.inc +39 -0
- package/asminc/apple2.inc +95 -0
- package/asminc/apple2.mac +54 -0
- package/asminc/ascii_charmap.inc +287 -0
- package/asminc/atari.inc +1169 -0
- package/asminc/atari.mac +65 -0
- package/asminc/atari2600.inc +7 -0
- package/asminc/atari2600_riot.inc +20 -0
- package/asminc/atari2600_tia.inc +69 -0
- package/asminc/atari5200.inc +133 -0
- package/asminc/atari7800.inc +14 -0
- package/asminc/atari7800_maria.inc +39 -0
- package/asminc/atari7800_riot.inc +20 -0
- package/asminc/atari7800_tia.inc +69 -0
- package/asminc/atari_antic.inc +95 -0
- package/asminc/atari_atascii_charmap.inc +301 -0
- package/asminc/atari_gtia.inc +119 -0
- package/asminc/atari_pokey.inc +43 -0
- package/asminc/atari_screen_charmap.inc +303 -0
- package/asminc/atmos.inc +117 -0
- package/asminc/c128.inc +224 -0
- package/asminc/c16.inc +9 -0
- package/asminc/c64.inc +219 -0
- package/asminc/c65.inc +239 -0
- package/asminc/cbm.mac +56 -0
- package/asminc/cbm510.inc +200 -0
- package/asminc/cbm610.inc +121 -0
- package/asminc/cbm_filetype.inc +34 -0
- package/asminc/cbm_kernal.inc +248 -0
- package/asminc/cbm_petscii_charmap.inc +291 -0
- package/asminc/cbm_screen_charmap.inc +305 -0
- package/asminc/cpu.mac +4 -0
- package/asminc/creativision.inc +66 -0
- package/asminc/ctype.inc +31 -0
- package/asminc/ctype_common.inc +91 -0
- package/asminc/ctypetable.inc +48 -0
- package/asminc/cx16.inc +574 -0
- package/asminc/em-error.inc +49 -0
- package/asminc/em-kernel.inc +106 -0
- package/asminc/errno.inc +37 -0
- package/asminc/fcntl.inc +21 -0
- package/asminc/gamate.inc +64 -0
- package/asminc/generic.mac +53 -0
- package/asminc/get_tv.inc +22 -0
- package/asminc/joy-error.inc +44 -0
- package/asminc/joy-kernel.inc +83 -0
- package/asminc/kim1.inc +31 -0
- package/asminc/longbranch.mac +88 -0
- package/asminc/lynx.inc +460 -0
- package/asminc/mega65.inc +239 -0
- package/asminc/modload.inc +78 -0
- package/asminc/module.mac +13 -0
- package/asminc/mouse-kernel.inc +184 -0
- package/asminc/nes.inc +93 -0
- package/asminc/o65.inc +150 -0
- package/asminc/opcodes.inc +514 -0
- package/asminc/pce.inc +93 -0
- package/asminc/pet.inc +100 -0
- package/asminc/plus4.inc +86 -0
- package/asminc/rp6502.inc +98 -0
- package/asminc/ser-error.inc +55 -0
- package/asminc/ser-kernel.inc +162 -0
- package/asminc/signal.inc +57 -0
- package/asminc/sim65.inc +75 -0
- package/asminc/smc.inc +267 -0
- package/asminc/stat.inc +64 -0
- package/asminc/statvfs.inc +46 -0
- package/asminc/stdio.inc +74 -0
- package/asminc/supervision.inc +75 -0
- package/asminc/sym1.inc +186 -0
- package/asminc/telestrat.inc +546 -0
- package/asminc/tgi-error.inc +52 -0
- package/asminc/tgi-kernel.inc +233 -0
- package/asminc/tgi-vectorfont.inc +70 -0
- package/asminc/time.inc +74 -0
- package/asminc/utsname.inc +46 -0
- package/asminc/vic20.inc +119 -0
- package/asminc/zeropage.inc +40 -0
- package/bin/ar65.exe +0 -0
- package/bin/ca65.exe +0 -0
- package/bin/cc65.exe +0 -0
- package/bin/da65.exe +0 -0
- package/bin/ld65.exe +0 -0
- package/cfg/module.cfg +21 -0
- package/cfg/nes.cfg +62 -0
- package/cfg/none.cfg +37 -0
- package/include/6502.h +140 -0
- package/include/_6522.h +68 -0
- package/include/_6525.h +62 -0
- package/include/_6526.h +71 -0
- package/include/_6545.h +53 -0
- package/include/_6551.h +55 -0
- package/include/_antic.h +254 -0
- package/include/_atari5200os.h +94 -0
- package/include/_atarios.h +661 -0
- package/include/_gtia.h +281 -0
- package/include/_heap.h +60 -0
- package/include/_maria.h +63 -0
- package/include/_mikey.h +264 -0
- package/include/_pbi.h +63 -0
- package/include/_pia.h +52 -0
- package/include/_pokey.h +220 -0
- package/include/_riot.h +26 -0
- package/include/_sid.h +68 -0
- package/include/_suzy.h +336 -0
- package/include/_ted.h +86 -0
- package/include/_tia.h +100 -0
- package/include/_vdc.h +53 -0
- package/include/_vic.h +67 -0
- package/include/_vic2.h +192 -0
- package/include/_vic3.h +188 -0
- package/include/accelerator.h +339 -0
- package/include/agat.h +76 -0
- package/include/apple2.h +358 -0
- package/include/apple2_filetype.h +324 -0
- package/include/apple2enh.h +67 -0
- package/include/arpa/inet.h +81 -0
- package/include/ascii_charmap.h +295 -0
- package/include/assert.h +59 -0
- package/include/atari.h +554 -0
- package/include/atari2600.h +32 -0
- package/include/atari5200.h +100 -0
- package/include/atari7800.h +67 -0
- package/include/atari_atascii_charmap.h +304 -0
- package/include/atari_screen_charmap.h +310 -0
- package/include/atmos.h +189 -0
- package/include/c128.h +175 -0
- package/include/c16.h +60 -0
- package/include/c64.h +175 -0
- package/include/c65.h +120 -0
- package/include/cbm.h +321 -0
- package/include/cbm264.h +165 -0
- package/include/cbm510.h +168 -0
- package/include/cbm610.h +153 -0
- package/include/cbm_filetype.h +108 -0
- package/include/cbm_petscii_charmap.h +297 -0
- package/include/cbm_screen_charmap.h +311 -0
- package/include/cc65.h +109 -0
- package/include/conio.h +248 -0
- package/include/creativision.h +78 -0
- package/include/ctype.h +88 -0
- package/include/cx16.h +420 -0
- package/include/dbg.h +124 -0
- package/include/device.h +72 -0
- package/include/dio.h +113 -0
- package/include/dirent.h +151 -0
- package/include/em/em-kernel.h +77 -0
- package/include/em.h +135 -0
- package/include/errno.h +135 -0
- package/include/fcntl.h +75 -0
- package/include/gamate.h +209 -0
- package/include/geos/gconst.h +69 -0
- package/include/geos/gdisk.h +79 -0
- package/include/geos/gdlgbox.h +110 -0
- package/include/geos/gfile.h +72 -0
- package/include/geos/ggraph.h +180 -0
- package/include/geos/gmemory.h +30 -0
- package/include/geos/gmenu.h +53 -0
- package/include/geos/gprocess.h +22 -0
- package/include/geos/gsprite.h +96 -0
- package/include/geos/gstruct.h +174 -0
- package/include/geos/gsym.h +340 -0
- package/include/geos/gsys.h +54 -0
- package/include/geos.h +109 -0
- package/include/inttypes.h +237 -0
- package/include/iso646.h +60 -0
- package/include/joystick/joy-kernel.h +84 -0
- package/include/joystick.h +109 -0
- package/include/kim1.h +73 -0
- package/include/limits.h +87 -0
- package/include/locale.h +83 -0
- package/include/lynx.h +144 -0
- package/include/lz4.h +43 -0
- package/include/lzsa.h +56 -0
- package/include/mega65.h +120 -0
- package/include/modload.h +103 -0
- package/include/mouse/mouse-kernel.h +67 -0
- package/include/mouse.h +220 -0
- package/include/nes.h +203 -0
- package/include/o65.h +178 -0
- package/include/osic1p.h +66 -0
- package/include/pce.h +110 -0
- package/include/peekpoke.h +58 -0
- package/include/pen.h +78 -0
- package/include/pet.h +113 -0
- package/include/plus4.h +63 -0
- package/include/rp6502.h +266 -0
- package/include/serial.h +180 -0
- package/include/setjmp.h +55 -0
- package/include/signal.h +74 -0
- package/include/sim65.h +136 -0
- package/include/stdarg.h +57 -0
- package/include/stdbool.h +53 -0
- package/include/stddef.h +66 -0
- package/include/stdint.h +144 -0
- package/include/stdio.h +166 -0
- package/include/stdlib.h +174 -0
- package/include/string.h +106 -0
- package/include/supervision.h +137 -0
- package/include/sym1.h +165 -0
- package/include/sys/stat.h +94 -0
- package/include/sys/statvfs.h +74 -0
- package/include/sys/types.h +102 -0
- package/include/sys/utsname.h +97 -0
- package/include/target.h +77 -0
- package/include/telestrat.h +129 -0
- package/include/tgi/tgi-error.h +64 -0
- package/include/tgi/tgi-kernel.h +75 -0
- package/include/tgi/tgi-vectorfont.h +90 -0
- package/include/tgi.h +286 -0
- package/include/time.h +143 -0
- package/include/unistd.h +103 -0
- package/include/vic20.h +141 -0
- package/include/zlib.h +175 -0
- package/include/zx02.h +44 -0
- package/lib/nes.lib +0 -0
- package/lib/none.lib +0 -0
- package/manifest.json +227 -0
- package/package.json +19 -4
- package/README.md +0 -3
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
;/*****************************************************************************/
|
|
2
|
+
;/* */
|
|
3
|
+
;/* em-kernel.inc */
|
|
4
|
+
;/* */
|
|
5
|
+
;/* EM kernel interface */
|
|
6
|
+
;/* */
|
|
7
|
+
;/* */
|
|
8
|
+
;/* */
|
|
9
|
+
;/* (C) 2002-2003 Ullrich von Bassewitz */
|
|
10
|
+
;/* Roemerstrasse 52 */
|
|
11
|
+
;/* D-70794 Filderstadt */
|
|
12
|
+
;/* EMail: uz@cc65.org */
|
|
13
|
+
;/* */
|
|
14
|
+
;/* */
|
|
15
|
+
;/* This software is provided 'as-is', without any expressed or implied */
|
|
16
|
+
;/* warranty. In no event will the authors be held liable for any damages */
|
|
17
|
+
;/* arising from the use of this software. */
|
|
18
|
+
;/* */
|
|
19
|
+
;/* Permission is granted to anyone to use this software for any purpose, */
|
|
20
|
+
;/* including commercial applications, and to alter it and redistribute it */
|
|
21
|
+
;/* freely, subject to the following restrictions: */
|
|
22
|
+
;/* */
|
|
23
|
+
;/* 1. The origin of this software must not be misrepresented; you must not */
|
|
24
|
+
;/* claim that you wrote the original software. If you use this software */
|
|
25
|
+
;/* in a product, an acknowledgment in the product documentation would be */
|
|
26
|
+
;/* appreciated but is not required. */
|
|
27
|
+
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
28
|
+
;/* be misrepresented as being the original software. */
|
|
29
|
+
;/* 3. This notice may not be removed or altered from any source */
|
|
30
|
+
;/* distribution. */
|
|
31
|
+
;/* */
|
|
32
|
+
;/*****************************************************************************/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
;------------------------------------------------------------------------------
|
|
37
|
+
; The driver header
|
|
38
|
+
|
|
39
|
+
.struct EMD_HDR
|
|
40
|
+
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
|
|
41
|
+
VERSION .byte 1 ; Interface version
|
|
42
|
+
LIBREF .addr ; Library reference
|
|
43
|
+
JUMPTAB .struct
|
|
44
|
+
INSTALL .addr ; INSTALL routine
|
|
45
|
+
UNINSTALL .addr ; UNINSTALL routine
|
|
46
|
+
PAGECOUNT .addr ; PAGECOUNT routine
|
|
47
|
+
MAP .addr ; MAP routine
|
|
48
|
+
USE .addr ; USE routine
|
|
49
|
+
MAPCLEAN .addr ; MAPCLEAN routine
|
|
50
|
+
COPYFROM .addr ; COPYFROM routine
|
|
51
|
+
COPYTO .addr ; COPYTO routine
|
|
52
|
+
.endstruct
|
|
53
|
+
.endstruct
|
|
54
|
+
|
|
55
|
+
;------------------------------------------------------------------------------
|
|
56
|
+
; The EMD API version, stored in EMD_HDR::VERSION
|
|
57
|
+
|
|
58
|
+
EMD_API_VERSION = $02
|
|
59
|
+
|
|
60
|
+
;------------------------------------------------------------------------------
|
|
61
|
+
; The asm equivalent to the C em_copy structure
|
|
62
|
+
|
|
63
|
+
.struct EM_COPY
|
|
64
|
+
BUF .addr ; Memory buffer to copy from or to
|
|
65
|
+
OFFS .byte ; Offset into page
|
|
66
|
+
PAGE .word ; Starting page to copy from or to
|
|
67
|
+
COUNT .word ; Number of bytes to copy
|
|
68
|
+
UNUSED .byte ; Make the size 8 bytes
|
|
69
|
+
.endstruct
|
|
70
|
+
|
|
71
|
+
;------------------------------------------------------------------------------
|
|
72
|
+
; Variables
|
|
73
|
+
|
|
74
|
+
.global _em_drv ; Pointer to driver
|
|
75
|
+
|
|
76
|
+
;------------------------------------------------------------------------------
|
|
77
|
+
; Driver entry points
|
|
78
|
+
|
|
79
|
+
.global emd_install
|
|
80
|
+
.global emd_uninstall
|
|
81
|
+
.global emd_pagecount
|
|
82
|
+
.global emd_map
|
|
83
|
+
.global emd_use
|
|
84
|
+
.global emd_commit
|
|
85
|
+
.global emd_copyfrom
|
|
86
|
+
.global emd_copyto
|
|
87
|
+
|
|
88
|
+
;------------------------------------------------------------------------------
|
|
89
|
+
; ASM functions
|
|
90
|
+
|
|
91
|
+
.global em_clear_ptr
|
|
92
|
+
|
|
93
|
+
;------------------------------------------------------------------------------
|
|
94
|
+
; C callable functions
|
|
95
|
+
|
|
96
|
+
.global _em_load_driver
|
|
97
|
+
.global _em_unload
|
|
98
|
+
.global _em_install
|
|
99
|
+
.global _em_uninstall
|
|
100
|
+
.global _em_pagecount
|
|
101
|
+
.global _em_map
|
|
102
|
+
.global _em_use
|
|
103
|
+
.global _em_commit
|
|
104
|
+
.global _em_copyfrom
|
|
105
|
+
.global _em_copyto
|
|
106
|
+
|
package/asminc/errno.inc
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
;
|
|
2
|
+
; Ullrich von Bassewitz, 16.05.2000
|
|
3
|
+
;
|
|
4
|
+
|
|
5
|
+
; Variables and functions
|
|
6
|
+
|
|
7
|
+
.global ___errno, ___oserror
|
|
8
|
+
.global ___osmaperrno
|
|
9
|
+
.global ___seterrno
|
|
10
|
+
.global ___directerrno, ___mappederrno
|
|
11
|
+
|
|
12
|
+
; Error codes, must match the values in the C headers
|
|
13
|
+
.enum
|
|
14
|
+
EOK ; No error
|
|
15
|
+
ENOENT ; No such file or directory
|
|
16
|
+
ENOMEM ; Out of memory
|
|
17
|
+
EACCES ; Permission denied
|
|
18
|
+
ENODEV ; No such device
|
|
19
|
+
EMFILE ; Too many open files
|
|
20
|
+
EBUSY ; Device or resource busy
|
|
21
|
+
EINVAL ; Invalid argument
|
|
22
|
+
ENOSPC ; No space left on device
|
|
23
|
+
EEXIST ; File exists
|
|
24
|
+
EAGAIN ; Try again
|
|
25
|
+
EIO ; I/O error
|
|
26
|
+
EINTR ; Interrupted system call
|
|
27
|
+
ENOSYS ; Function not implemented
|
|
28
|
+
ESPIPE ; Illegal seek
|
|
29
|
+
ERANGE ; Range error
|
|
30
|
+
EBADF ; Bad file number
|
|
31
|
+
ENOEXEC ; Exec format error
|
|
32
|
+
EUNKNOWN ; Unknown OS specific error - must be last!
|
|
33
|
+
|
|
34
|
+
EMAX = EUNKNOWN ; Highest error code
|
|
35
|
+
.endenum
|
|
36
|
+
|
|
37
|
+
|
package/asminc/fcntl.inc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
;
|
|
2
|
+
; Ullrich von Bassewitz, 05.06.1999
|
|
3
|
+
;
|
|
4
|
+
|
|
5
|
+
; Predefined file handles
|
|
6
|
+
STDIN_FILENO = 0
|
|
7
|
+
STDOUT_FILENO = 1
|
|
8
|
+
STDERR_FILENO = 2
|
|
9
|
+
|
|
10
|
+
; File mode constants, must match the values in the C headers
|
|
11
|
+
O_RDONLY = $01
|
|
12
|
+
O_WRONLY = $02
|
|
13
|
+
O_RDWR = $03
|
|
14
|
+
O_CREAT = $10
|
|
15
|
+
O_TRUNC = $20
|
|
16
|
+
O_APPEND = $40
|
|
17
|
+
O_EXCL = $80
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
;-------------------------------------------------------------------------------
|
|
2
|
+
; gamate.inc
|
|
3
|
+
;
|
|
4
|
+
; Gamate system specific definitions
|
|
5
|
+
;
|
|
6
|
+
; (w) 2015 Groepaz/Hitmen (groepaz@gmx.net)
|
|
7
|
+
; based on technical reference by PeT (mess@utanet.at)
|
|
8
|
+
;-------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
; look at gamate.h for comments, they are not duplicated here
|
|
11
|
+
|
|
12
|
+
AUDIO_BASE = $4000
|
|
13
|
+
|
|
14
|
+
JOY_DATA = $4400
|
|
15
|
+
|
|
16
|
+
JOY_DATA_UP = $01
|
|
17
|
+
JOY_DATA_DOWN = $02
|
|
18
|
+
JOY_DATA_LEFT = $04
|
|
19
|
+
JOY_DATA_RIGHT = $08
|
|
20
|
+
JOY_DATA_FIRE_A = $10
|
|
21
|
+
JOY_DATA_FIRE_B = $20
|
|
22
|
+
JOY_DATA_START = $40
|
|
23
|
+
JOY_DATA_SELECT = $80
|
|
24
|
+
|
|
25
|
+
LCD_WIDTH = 160
|
|
26
|
+
LCD_HEIGHT = 152
|
|
27
|
+
|
|
28
|
+
LCD_BASE = $5000
|
|
29
|
+
LCD_MODE = $5001
|
|
30
|
+
LCD_XPOS = $5002
|
|
31
|
+
LCD_YPOS = $5003
|
|
32
|
+
LCD_X = $5004
|
|
33
|
+
LCD_Y = $5005
|
|
34
|
+
LCD_READ = $5006
|
|
35
|
+
LCD_DATA = $5007
|
|
36
|
+
|
|
37
|
+
LCD_MODE_INC_X = $00
|
|
38
|
+
LCD_MODE_INC_Y = $40
|
|
39
|
+
LCD_XPOS_PLANE1 = $00
|
|
40
|
+
LCD_XPOS_PLANE2 = $80
|
|
41
|
+
|
|
42
|
+
; constants for the conio implementation
|
|
43
|
+
charsperline = (LCD_WIDTH / 8)
|
|
44
|
+
screenrows = (LCD_HEIGHT / 8)
|
|
45
|
+
|
|
46
|
+
CH_HLINE = 1
|
|
47
|
+
CH_VLINE = 2
|
|
48
|
+
|
|
49
|
+
COLOR_WHITE = 0
|
|
50
|
+
COLOR_GREY2 = 1
|
|
51
|
+
COLOR_GREY1 = 2
|
|
52
|
+
COLOR_BLACK = 3
|
|
53
|
+
|
|
54
|
+
; bios zp usage:
|
|
55
|
+
ZP_NMI_4800 = $0a
|
|
56
|
+
ZP_IRQ_COUNT = $0b
|
|
57
|
+
ZP_IRQ_CTRL = $0c
|
|
58
|
+
|
|
59
|
+
ZP_IRQ_CNT1 = $0e
|
|
60
|
+
ZP_IRQ_CNT2 = $0f
|
|
61
|
+
ZP_IRQ_CNT3 = $10
|
|
62
|
+
ZP_IRQ_CNT4 = $11
|
|
63
|
+
|
|
64
|
+
ZP_NMI_FLAG = $e8
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
; add - Add without carry
|
|
3
|
+
.macro add Arg1, Arg2
|
|
4
|
+
clc
|
|
5
|
+
.if .paramcount = 2
|
|
6
|
+
adc Arg1, Arg2
|
|
7
|
+
.else
|
|
8
|
+
adc Arg1
|
|
9
|
+
.endif
|
|
10
|
+
.endmacro
|
|
11
|
+
|
|
12
|
+
; sub - subtract without borrow
|
|
13
|
+
.macro sub Arg1, Arg2
|
|
14
|
+
sec
|
|
15
|
+
.if .paramcount = 2
|
|
16
|
+
sbc Arg1, Arg2
|
|
17
|
+
.else
|
|
18
|
+
sbc Arg1
|
|
19
|
+
.endif
|
|
20
|
+
.endmacro
|
|
21
|
+
|
|
22
|
+
; bge - jump if unsigned greater or equal
|
|
23
|
+
.macro bge Arg
|
|
24
|
+
bcs Arg
|
|
25
|
+
.endmacro
|
|
26
|
+
|
|
27
|
+
; blt - Jump if unsigned less
|
|
28
|
+
.macro blt Arg
|
|
29
|
+
bcc Arg
|
|
30
|
+
.endmacro
|
|
31
|
+
|
|
32
|
+
; bgt - jump if unsigned greater
|
|
33
|
+
.macro bgt Arg
|
|
34
|
+
beq *+4
|
|
35
|
+
bcs Arg
|
|
36
|
+
.endmacro
|
|
37
|
+
|
|
38
|
+
; ble - jump if unsigned less or equal
|
|
39
|
+
.macro ble Arg
|
|
40
|
+
beq Arg
|
|
41
|
+
bcc Arg
|
|
42
|
+
.endmacro
|
|
43
|
+
|
|
44
|
+
; bnz - jump if not zero
|
|
45
|
+
.macro bnz Arg
|
|
46
|
+
bne Arg
|
|
47
|
+
.endmacro
|
|
48
|
+
|
|
49
|
+
; bze - jump if zero
|
|
50
|
+
.macro bze Arg
|
|
51
|
+
beq Arg
|
|
52
|
+
.endmacro
|
|
53
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
;
|
|
2
|
+
; get_tv.inc
|
|
3
|
+
;
|
|
4
|
+
; Ullrich von Bassewitz, 2004-10-15
|
|
5
|
+
;
|
|
6
|
+
; Defines for the get_tv function.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
; Error codes returned by all functions
|
|
11
|
+
.enum TV
|
|
12
|
+
NTSC
|
|
13
|
+
PAL
|
|
14
|
+
OTHER
|
|
15
|
+
.endenum
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
; get_tv function
|
|
19
|
+
|
|
20
|
+
.global _get_tv
|
|
21
|
+
|
|
22
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
;/*****************************************************************************/
|
|
2
|
+
;/* */
|
|
3
|
+
;/* joy-error.inc */
|
|
4
|
+
;/* */
|
|
5
|
+
;/* Joystick error codes */
|
|
6
|
+
;/* */
|
|
7
|
+
;/* */
|
|
8
|
+
;/* */
|
|
9
|
+
;/* (C) 2002 Ullrich von Bassewitz */
|
|
10
|
+
;/* Wacholderweg 14 */
|
|
11
|
+
;/* D-70597 Stuttgart */
|
|
12
|
+
;/* EMail: uz@musoftware.de */
|
|
13
|
+
;/* */
|
|
14
|
+
;/* */
|
|
15
|
+
;/* This software is provided 'as-is', without any expressed or implied */
|
|
16
|
+
;/* warranty. In no event will the authors be held liable for any damages */
|
|
17
|
+
;/* arising from the use of this software. */
|
|
18
|
+
;/* */
|
|
19
|
+
;/* Permission is granted to anyone to use this software for any purpose, */
|
|
20
|
+
;/* including commercial applications, and to alter it and redistribute it */
|
|
21
|
+
;/* freely, subject to the following restrictions: */
|
|
22
|
+
;/* */
|
|
23
|
+
;/* 1. The origin of this software must not be misrepresented; you must not */
|
|
24
|
+
;/* claim that you wrote the original software. If you use this software */
|
|
25
|
+
;/* in a product, an acknowledgment in the product documentation would be */
|
|
26
|
+
;/* appreciated but is not required. */
|
|
27
|
+
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
28
|
+
;/* be misrepresented as being the original software. */
|
|
29
|
+
;/* 3. This notice may not be removed or altered from any source */
|
|
30
|
+
;/* distribution. */
|
|
31
|
+
;/* */
|
|
32
|
+
;/*****************************************************************************/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
; Error codes
|
|
37
|
+
JOY_ERR_OK = 0 ; No error
|
|
38
|
+
JOY_ERR_NO_DRIVER = 1 ; No driver available
|
|
39
|
+
JOY_ERR_CANNOT_LOAD = 2 ; Error loading driver
|
|
40
|
+
JOY_ERR_INV_DRIVER = 3 ; Invalid driver
|
|
41
|
+
JOY_ERR_NO_DEVICE = 4 ; Device (hardware) not found
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
;/*****************************************************************************/
|
|
2
|
+
;/* */
|
|
3
|
+
;/* joy-kernel.inc */
|
|
4
|
+
;/* */
|
|
5
|
+
;/* Internally used joystick functions */
|
|
6
|
+
;/* */
|
|
7
|
+
;/* */
|
|
8
|
+
;/* */
|
|
9
|
+
;/* (C) 2002-2006, Ullrich von Bassewitz */
|
|
10
|
+
;/* Roemerstrasse 52 */
|
|
11
|
+
;/* D-70794 Filderstadt */
|
|
12
|
+
;/* EMail: uz@cc65.org */
|
|
13
|
+
;/* */
|
|
14
|
+
;/* */
|
|
15
|
+
;/* This software is provided 'as-is', without any expressed or implied */
|
|
16
|
+
;/* warranty. In no event will the authors be held liable for any damages */
|
|
17
|
+
;/* arising from the use of this software. */
|
|
18
|
+
;/* */
|
|
19
|
+
;/* Permission is granted to anyone to use this software for any purpose, */
|
|
20
|
+
;/* including commercial applications, and to alter it and redistribute it */
|
|
21
|
+
;/* freely, subject to the following restrictions: */
|
|
22
|
+
;/* */
|
|
23
|
+
;/* 1. The origin of this software must not be misrepresented; you must not */
|
|
24
|
+
;/* claim that you wrote the original software. If you use this software */
|
|
25
|
+
;/* in a product, an acknowledgment in the product documentation would be */
|
|
26
|
+
;/* appreciated but is not required. */
|
|
27
|
+
;/* 2. Altered source versions must be plainly marked as such, and must not */
|
|
28
|
+
;/* be misrepresented as being the original software. */
|
|
29
|
+
;/* 3. This notice may not be removed or altered from any source */
|
|
30
|
+
;/* distribution. */
|
|
31
|
+
;/* */
|
|
32
|
+
;/*****************************************************************************/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
;------------------------------------------------------------------------------
|
|
40
|
+
; Driver header stuff
|
|
41
|
+
|
|
42
|
+
.struct JOY_HDR
|
|
43
|
+
ID .byte 3 ; $6A, $6F, $79 ("joy")
|
|
44
|
+
VERSION .byte 1 ; Interface version
|
|
45
|
+
LIBREF .addr ; Library reference
|
|
46
|
+
JUMPTAB .struct
|
|
47
|
+
INSTALL .addr ; INSTALL routine
|
|
48
|
+
UNINSTALL .addr ; UNINSTALL routine
|
|
49
|
+
COUNT .addr ; COUNT routine
|
|
50
|
+
READ .addr ; READ routine
|
|
51
|
+
.endstruct
|
|
52
|
+
.endstruct
|
|
53
|
+
|
|
54
|
+
;------------------------------------------------------------------------------
|
|
55
|
+
; The JOY API version, stored in JOY_HDR::VERSION
|
|
56
|
+
|
|
57
|
+
JOY_API_VERSION = $05
|
|
58
|
+
|
|
59
|
+
;------------------------------------------------------------------------------
|
|
60
|
+
; Variables
|
|
61
|
+
|
|
62
|
+
.global _joy_drv ; Pointer to driver
|
|
63
|
+
.global _joy_masks
|
|
64
|
+
|
|
65
|
+
;------------------------------------------------------------------------------
|
|
66
|
+
; Driver entry points
|
|
67
|
+
|
|
68
|
+
.global joy_install
|
|
69
|
+
.global joy_uninstall
|
|
70
|
+
.global joy_count
|
|
71
|
+
.global joy_read
|
|
72
|
+
|
|
73
|
+
;------------------------------------------------------------------------------
|
|
74
|
+
; C callable functions
|
|
75
|
+
|
|
76
|
+
.global _joy_load_driver
|
|
77
|
+
.global _joy_unload
|
|
78
|
+
.global _joy_install
|
|
79
|
+
.global _joy_uninstall
|
|
80
|
+
.global _joy_count
|
|
81
|
+
.global _joy_read
|
|
82
|
+
|
|
83
|
+
.global _joy_clear_ptr
|
package/asminc/kim1.inc
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
; ---------------------------------------------------------------------------
|
|
2
|
+
;
|
|
3
|
+
; KIM-1 definitions
|
|
4
|
+
;
|
|
5
|
+
; ---------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
RAMSTART := $0200 ; Entry point
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
; ---------------------------------------------------------------------------
|
|
12
|
+
; Monitor Functions
|
|
13
|
+
; ---------------------------------------------------------------------------
|
|
14
|
+
OUTCHR := $1EA0 ; Output character
|
|
15
|
+
INTCHR := $1E5A ; Input character without case conversion
|
|
16
|
+
DUMPT := $1800 ; Dump memory to tape
|
|
17
|
+
LOADT := $1873 ; Load memory from tape
|
|
18
|
+
START := $1C4F ; Enter KIM-1 monitor
|
|
19
|
+
SCANDS := $1F1F ; Scan 7-segment display
|
|
20
|
+
KEYIN := $1F40 ; Open up keyboard channel
|
|
21
|
+
GETKEY := $1F6A ; Return key from keyboard
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
; ---------------------------------------------------------------------------
|
|
25
|
+
; System Memory
|
|
26
|
+
; ---------------------------------------------------------------------------
|
|
27
|
+
SAL := $17F5 ; Tape load address low
|
|
28
|
+
SAH := $17F6 ; Tape load address high
|
|
29
|
+
EAL := $17F7 ; Tape address end low
|
|
30
|
+
EAH := $17F8 ; Tape address end high
|
|
31
|
+
ID := $17F9 ; Tape Identification number
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.macro jeq Target
|
|
2
|
+
.if .match(Target, 0)
|
|
3
|
+
bne *+5
|
|
4
|
+
jmp Target
|
|
5
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
6
|
+
beq Target
|
|
7
|
+
.else
|
|
8
|
+
bne *+5
|
|
9
|
+
jmp Target
|
|
10
|
+
.endif
|
|
11
|
+
.endmacro
|
|
12
|
+
.macro jne Target
|
|
13
|
+
.if .match(Target, 0)
|
|
14
|
+
beq *+5
|
|
15
|
+
jmp Target
|
|
16
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
17
|
+
bne Target
|
|
18
|
+
.else
|
|
19
|
+
beq *+5
|
|
20
|
+
jmp Target
|
|
21
|
+
.endif
|
|
22
|
+
.endmacro
|
|
23
|
+
.macro jmi Target
|
|
24
|
+
.if .match(Target, 0)
|
|
25
|
+
bpl *+5
|
|
26
|
+
jmp Target
|
|
27
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
28
|
+
bmi Target
|
|
29
|
+
.else
|
|
30
|
+
bpl *+5
|
|
31
|
+
jmp Target
|
|
32
|
+
.endif
|
|
33
|
+
.endmacro
|
|
34
|
+
.macro jpl Target
|
|
35
|
+
.if .match(Target, 0)
|
|
36
|
+
bmi *+5
|
|
37
|
+
jmp Target
|
|
38
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
39
|
+
bpl Target
|
|
40
|
+
.else
|
|
41
|
+
bmi *+5
|
|
42
|
+
jmp Target
|
|
43
|
+
.endif
|
|
44
|
+
.endmacro
|
|
45
|
+
.macro jcs Target
|
|
46
|
+
.if .match(Target, 0)
|
|
47
|
+
bcc *+5
|
|
48
|
+
jmp Target
|
|
49
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
50
|
+
bcs Target
|
|
51
|
+
.else
|
|
52
|
+
bcc *+5
|
|
53
|
+
jmp Target
|
|
54
|
+
.endif
|
|
55
|
+
.endmacro
|
|
56
|
+
.macro jcc Target
|
|
57
|
+
.if .match(Target, 0)
|
|
58
|
+
bcs *+5
|
|
59
|
+
jmp Target
|
|
60
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
61
|
+
bcc Target
|
|
62
|
+
.else
|
|
63
|
+
bcs *+5
|
|
64
|
+
jmp Target
|
|
65
|
+
.endif
|
|
66
|
+
.endmacro
|
|
67
|
+
.macro jvs Target
|
|
68
|
+
.if .match(Target, 0)
|
|
69
|
+
bvc *+5
|
|
70
|
+
jmp Target
|
|
71
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
72
|
+
bvs Target
|
|
73
|
+
.else
|
|
74
|
+
bvc *+5
|
|
75
|
+
jmp Target
|
|
76
|
+
.endif
|
|
77
|
+
.endmacro
|
|
78
|
+
.macro jvc Target
|
|
79
|
+
.if .match(Target, 0)
|
|
80
|
+
bvs *+5
|
|
81
|
+
jmp Target
|
|
82
|
+
.elseif .def(Target) .and .const((*-2)-(Target)) .and ((*+2)-(Target) <= 127)
|
|
83
|
+
bvc Target
|
|
84
|
+
.else
|
|
85
|
+
bvs *+5
|
|
86
|
+
jmp Target
|
|
87
|
+
.endif
|
|
88
|
+
.endmacro
|