fcdev-cc65 0.0.0-stage → 0.6.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.
Files changed (224) hide show
  1. package/LICENSE +17 -0
  2. package/asminc/_file.inc +27 -0
  3. package/asminc/_heap.inc +35 -0
  4. package/asminc/accelerator.inc +80 -0
  5. package/asminc/agat.inc +39 -0
  6. package/asminc/apple2.inc +95 -0
  7. package/asminc/apple2.mac +54 -0
  8. package/asminc/ascii_charmap.inc +287 -0
  9. package/asminc/atari.inc +1169 -0
  10. package/asminc/atari.mac +65 -0
  11. package/asminc/atari2600.inc +7 -0
  12. package/asminc/atari2600_riot.inc +20 -0
  13. package/asminc/atari2600_tia.inc +69 -0
  14. package/asminc/atari5200.inc +133 -0
  15. package/asminc/atari7800.inc +14 -0
  16. package/asminc/atari7800_maria.inc +39 -0
  17. package/asminc/atari7800_riot.inc +20 -0
  18. package/asminc/atari7800_tia.inc +69 -0
  19. package/asminc/atari_antic.inc +95 -0
  20. package/asminc/atari_atascii_charmap.inc +301 -0
  21. package/asminc/atari_gtia.inc +119 -0
  22. package/asminc/atari_pokey.inc +43 -0
  23. package/asminc/atari_screen_charmap.inc +303 -0
  24. package/asminc/atmos.inc +117 -0
  25. package/asminc/c128.inc +224 -0
  26. package/asminc/c16.inc +9 -0
  27. package/asminc/c64.inc +219 -0
  28. package/asminc/c65.inc +239 -0
  29. package/asminc/cbm.mac +56 -0
  30. package/asminc/cbm510.inc +200 -0
  31. package/asminc/cbm610.inc +121 -0
  32. package/asminc/cbm_filetype.inc +34 -0
  33. package/asminc/cbm_kernal.inc +248 -0
  34. package/asminc/cbm_petscii_charmap.inc +291 -0
  35. package/asminc/cbm_screen_charmap.inc +305 -0
  36. package/asminc/cpu.mac +4 -0
  37. package/asminc/creativision.inc +66 -0
  38. package/asminc/ctype.inc +31 -0
  39. package/asminc/ctype_common.inc +91 -0
  40. package/asminc/ctypetable.inc +48 -0
  41. package/asminc/cx16.inc +574 -0
  42. package/asminc/em-error.inc +49 -0
  43. package/asminc/em-kernel.inc +106 -0
  44. package/asminc/errno.inc +37 -0
  45. package/asminc/fcntl.inc +21 -0
  46. package/asminc/gamate.inc +64 -0
  47. package/asminc/generic.mac +53 -0
  48. package/asminc/get_tv.inc +22 -0
  49. package/asminc/joy-error.inc +44 -0
  50. package/asminc/joy-kernel.inc +83 -0
  51. package/asminc/kim1.inc +31 -0
  52. package/asminc/longbranch.mac +88 -0
  53. package/asminc/lynx.inc +460 -0
  54. package/asminc/mega65.inc +239 -0
  55. package/asminc/modload.inc +78 -0
  56. package/asminc/module.mac +13 -0
  57. package/asminc/mouse-kernel.inc +184 -0
  58. package/asminc/nes.inc +93 -0
  59. package/asminc/o65.inc +150 -0
  60. package/asminc/opcodes.inc +514 -0
  61. package/asminc/pce.inc +93 -0
  62. package/asminc/pet.inc +100 -0
  63. package/asminc/plus4.inc +86 -0
  64. package/asminc/rp6502.inc +98 -0
  65. package/asminc/ser-error.inc +55 -0
  66. package/asminc/ser-kernel.inc +162 -0
  67. package/asminc/signal.inc +57 -0
  68. package/asminc/sim65.inc +75 -0
  69. package/asminc/smc.inc +267 -0
  70. package/asminc/stat.inc +64 -0
  71. package/asminc/statvfs.inc +46 -0
  72. package/asminc/stdio.inc +74 -0
  73. package/asminc/supervision.inc +75 -0
  74. package/asminc/sym1.inc +186 -0
  75. package/asminc/telestrat.inc +546 -0
  76. package/asminc/tgi-error.inc +52 -0
  77. package/asminc/tgi-kernel.inc +233 -0
  78. package/asminc/tgi-vectorfont.inc +70 -0
  79. package/asminc/time.inc +74 -0
  80. package/asminc/utsname.inc +46 -0
  81. package/asminc/vic20.inc +119 -0
  82. package/asminc/zeropage.inc +40 -0
  83. package/bin/ar65.exe +0 -0
  84. package/bin/ca65.exe +0 -0
  85. package/bin/cc65.exe +0 -0
  86. package/bin/da65.exe +0 -0
  87. package/bin/ld65.exe +0 -0
  88. package/cfg/module.cfg +21 -0
  89. package/cfg/nes.cfg +62 -0
  90. package/cfg/none.cfg +37 -0
  91. package/include/6502.h +140 -0
  92. package/include/_6522.h +68 -0
  93. package/include/_6525.h +62 -0
  94. package/include/_6526.h +71 -0
  95. package/include/_6545.h +53 -0
  96. package/include/_6551.h +55 -0
  97. package/include/_antic.h +254 -0
  98. package/include/_atari5200os.h +94 -0
  99. package/include/_atarios.h +661 -0
  100. package/include/_gtia.h +281 -0
  101. package/include/_heap.h +60 -0
  102. package/include/_maria.h +63 -0
  103. package/include/_mikey.h +264 -0
  104. package/include/_pbi.h +63 -0
  105. package/include/_pia.h +52 -0
  106. package/include/_pokey.h +220 -0
  107. package/include/_riot.h +26 -0
  108. package/include/_sid.h +68 -0
  109. package/include/_suzy.h +336 -0
  110. package/include/_ted.h +86 -0
  111. package/include/_tia.h +100 -0
  112. package/include/_vdc.h +53 -0
  113. package/include/_vic.h +67 -0
  114. package/include/_vic2.h +192 -0
  115. package/include/_vic3.h +188 -0
  116. package/include/accelerator.h +339 -0
  117. package/include/agat.h +76 -0
  118. package/include/apple2.h +358 -0
  119. package/include/apple2_filetype.h +324 -0
  120. package/include/apple2enh.h +67 -0
  121. package/include/arpa/inet.h +81 -0
  122. package/include/ascii_charmap.h +295 -0
  123. package/include/assert.h +59 -0
  124. package/include/atari.h +554 -0
  125. package/include/atari2600.h +32 -0
  126. package/include/atari5200.h +100 -0
  127. package/include/atari7800.h +67 -0
  128. package/include/atari_atascii_charmap.h +304 -0
  129. package/include/atari_screen_charmap.h +310 -0
  130. package/include/atmos.h +189 -0
  131. package/include/c128.h +175 -0
  132. package/include/c16.h +60 -0
  133. package/include/c64.h +175 -0
  134. package/include/c65.h +120 -0
  135. package/include/cbm.h +321 -0
  136. package/include/cbm264.h +165 -0
  137. package/include/cbm510.h +168 -0
  138. package/include/cbm610.h +153 -0
  139. package/include/cbm_filetype.h +108 -0
  140. package/include/cbm_petscii_charmap.h +297 -0
  141. package/include/cbm_screen_charmap.h +311 -0
  142. package/include/cc65.h +109 -0
  143. package/include/conio.h +248 -0
  144. package/include/creativision.h +78 -0
  145. package/include/ctype.h +88 -0
  146. package/include/cx16.h +420 -0
  147. package/include/dbg.h +124 -0
  148. package/include/device.h +72 -0
  149. package/include/dio.h +113 -0
  150. package/include/dirent.h +151 -0
  151. package/include/em/em-kernel.h +77 -0
  152. package/include/em.h +135 -0
  153. package/include/errno.h +135 -0
  154. package/include/fcntl.h +75 -0
  155. package/include/gamate.h +209 -0
  156. package/include/geos/gconst.h +69 -0
  157. package/include/geos/gdisk.h +79 -0
  158. package/include/geos/gdlgbox.h +110 -0
  159. package/include/geos/gfile.h +72 -0
  160. package/include/geos/ggraph.h +180 -0
  161. package/include/geos/gmemory.h +30 -0
  162. package/include/geos/gmenu.h +53 -0
  163. package/include/geos/gprocess.h +22 -0
  164. package/include/geos/gsprite.h +96 -0
  165. package/include/geos/gstruct.h +174 -0
  166. package/include/geos/gsym.h +340 -0
  167. package/include/geos/gsys.h +54 -0
  168. package/include/geos.h +109 -0
  169. package/include/inttypes.h +237 -0
  170. package/include/iso646.h +60 -0
  171. package/include/joystick/joy-kernel.h +84 -0
  172. package/include/joystick.h +109 -0
  173. package/include/kim1.h +73 -0
  174. package/include/limits.h +87 -0
  175. package/include/locale.h +83 -0
  176. package/include/lynx.h +144 -0
  177. package/include/lz4.h +43 -0
  178. package/include/lzsa.h +56 -0
  179. package/include/mega65.h +120 -0
  180. package/include/modload.h +103 -0
  181. package/include/mouse/mouse-kernel.h +67 -0
  182. package/include/mouse.h +220 -0
  183. package/include/nes.h +203 -0
  184. package/include/o65.h +178 -0
  185. package/include/osic1p.h +66 -0
  186. package/include/pce.h +110 -0
  187. package/include/peekpoke.h +58 -0
  188. package/include/pen.h +78 -0
  189. package/include/pet.h +113 -0
  190. package/include/plus4.h +63 -0
  191. package/include/rp6502.h +266 -0
  192. package/include/serial.h +180 -0
  193. package/include/setjmp.h +55 -0
  194. package/include/signal.h +74 -0
  195. package/include/sim65.h +136 -0
  196. package/include/stdarg.h +57 -0
  197. package/include/stdbool.h +53 -0
  198. package/include/stddef.h +66 -0
  199. package/include/stdint.h +144 -0
  200. package/include/stdio.h +166 -0
  201. package/include/stdlib.h +174 -0
  202. package/include/string.h +106 -0
  203. package/include/supervision.h +137 -0
  204. package/include/sym1.h +165 -0
  205. package/include/sys/stat.h +94 -0
  206. package/include/sys/statvfs.h +74 -0
  207. package/include/sys/types.h +102 -0
  208. package/include/sys/utsname.h +97 -0
  209. package/include/target.h +77 -0
  210. package/include/telestrat.h +129 -0
  211. package/include/tgi/tgi-error.h +64 -0
  212. package/include/tgi/tgi-kernel.h +75 -0
  213. package/include/tgi/tgi-vectorfont.h +90 -0
  214. package/include/tgi.h +286 -0
  215. package/include/time.h +143 -0
  216. package/include/unistd.h +103 -0
  217. package/include/vic20.h +141 -0
  218. package/include/zlib.h +175 -0
  219. package/include/zx02.h +44 -0
  220. package/lib/nes.lib +0 -0
  221. package/lib/none.lib +0 -0
  222. package/manifest.json +227 -0
  223. package/package.json +19 -4
  224. package/README.md +0 -3
@@ -0,0 +1,86 @@
1
+ ;
2
+ ; Plus/4 generic definitions.
3
+ ;
4
+
5
+
6
+ ; ---------------------------------------------------------------------------
7
+ ; Zero page, Commodore stuff
8
+
9
+ TMPPTR := $22 ; Temporary ptr used by BASIC
10
+ VARTAB := $2D ; Pointer to start of BASIC variables
11
+ MEMSIZE := $37 ; Pointer to highest BASIC RAM location (+1)
12
+ TXTPTR := $3B ; Pointer into BASIC source code
13
+ STATUS := $90 ; Kernal I/O completion status
14
+ TIME := $A3 ; 60HZ clock
15
+ FNAM_LEN := $AB ; Length of filename
16
+ LFN := $AC ; Logical file number
17
+ SECADR := $AD ; Secondary address
18
+ DEVNUM := $AE ; Device number
19
+ FNAM := $AF ; Pointer to filename for OPEN
20
+ KEY_COUNT := $EF ; Number of keys in input buffer
21
+ RVS := $C2 ; Reverse flag
22
+ CURS_X := $CA ; Cursor column
23
+ CURS_Y := $CD ; Cursor row
24
+ SCREEN_PTR := $C8 ; Pointer to current char in text screen
25
+ CRAM_PTR := $EA ; Pointer to current char in color RAM
26
+
27
+ BASIC_BUF := $200 ; Location of command-line
28
+ BASIC_BUF_LEN = 89 ; Maximum length of command-line
29
+
30
+ FNBUF := $25E ; Buffer for filename
31
+ FETCH := $494 ; lda (zp),y from RAM
32
+ CHARCOLOR := $53B
33
+ FKEY_COUNT := $55D ; Characters for function key
34
+ FKEY_SPACE := $55F ; Function key definitions
35
+ FKEY_ORIG := $F3D2 ; Original definitions
36
+
37
+ KBDREPEAT := $540
38
+ KBDREPEATRATE := $541
39
+ KBDREPEATDELAY := $542
40
+
41
+ ; ---------------------------------------------------------------------------
42
+ ; Vector and other locations
43
+
44
+ IRQVec := $0314
45
+ BRKVec := $0316
46
+ NMIVec := $0318
47
+
48
+ ; ---------------------------------------------------------------------------
49
+ ; Screen size
50
+
51
+ XSIZE = 40
52
+ YSIZE = 25
53
+
54
+ ; ---------------------------------------------------------------------------
55
+ ; I/O
56
+
57
+ TED_T1LO := $FF00
58
+ TED_T1HI := $FF01
59
+ TED_T2LO := $FF02
60
+ TED_T2HI := $FF03
61
+ TED_T3LO := $FF04
62
+ TED_T4HI := $FF05
63
+ TED_MULTI1 := $FF07
64
+ TED_KBD := $FF08
65
+ TED_CURSHI := $FF0C
66
+ TED_CURSLO := $FF0D
67
+ TED_V1FRQLO := $FF0E
68
+ TED_V2FRQLO := $FF0F
69
+ TED_V2FRQHI := $FF10
70
+ TED_CLK := $FF13
71
+ TED_BGCOLOR := $FF15
72
+ TED_COLOR1 := $FF16
73
+ TED_COLOR2 := $FF17
74
+ TED_COLOR3 := $FF18
75
+ TED_BORDERCOLOR := $FF19
76
+ TED_VLINEHI := $FF1C
77
+ TED_VLINELO := $FF1D
78
+ TED_HPOS := $FF1E
79
+ TED_ROMSEL := $FF3E
80
+ TED_RAMSEL := $FF3F
81
+
82
+ ; ---------------------------------------------------------------------------
83
+ ; RAM/ROM selection addresses
84
+
85
+ ENABLE_ROM := TED_ROMSEL
86
+ ENABLE_RAM := TED_RAMSEL
@@ -0,0 +1,98 @@
1
+ ; Picocomputer 6502 general defines
2
+
3
+ ; RIA UART
4
+ RIA_READY := $FFE0 ; TX=$80 RX=$40
5
+ RIA_TX := $FFE1
6
+ RIA_RX := $FFE2
7
+
8
+ ; VSYNC from PIX VGA
9
+ RIA_VSYNC := $FFE3
10
+
11
+ ; RIA XRAM portal 0
12
+ RIA_RW0 := $FFE4
13
+ RIA_STEP0 := $FFE5
14
+ RIA_ADDR0 := $FFE6
15
+
16
+ ; RIA XRAM portal 1
17
+ RIA_RW1 := $FFE8
18
+ RIA_STEP1 := $FFE9
19
+ RIA_ADDR1 := $FFEA
20
+
21
+ ; RIA OS fastcall
22
+ RIA_XSTACK := $FFEC
23
+ RIA_ERRNO := $FFED
24
+ RIA_OP := $FFEF
25
+ RIA_IRQ := $FFF0
26
+ RIA_SPIN := $FFF1
27
+ RIA_BUSY := $FFF2 ; Bit $80
28
+ RIA_A := $FFF4
29
+ RIA_X := $FFF6
30
+ RIA_SREG := $FFF8
31
+
32
+ ; RIA OS operation numbers
33
+ RIA_OP_EXIT := $FF
34
+ RIA_OP_ZXSTACK := $00
35
+ RIA_OP_XREG := $01
36
+ RIA_OP_PHI2 := $02
37
+ RIA_OP_CODEPAGE := $03
38
+ RIA_OP_LRAND := $04
39
+ RIA_OP_STDIN_OPT := $05
40
+ RIA_OP_CLOCK := $0F
41
+ RIA_OP_CLOCK_GETRES := $10
42
+ RIA_OP_CLOCK_GETTIME := $11
43
+ RIA_OP_CLOCK_SETTIME := $12
44
+ RIA_OP_CLOCK_GETTIMEZONE := $13
45
+ RIA_OP_OPEN := $14
46
+ RIA_OP_CLOSE := $15
47
+ RIA_OP_READ_XSTACK := $16
48
+ RIA_OP_READ_XRAM := $17
49
+ RIA_OP_WRITE_XSTACK := $18
50
+ RIA_OP_WRITE_XRAM := $19
51
+ RIA_OP_LSEEK := $1A
52
+ RIA_OP_UNLINK := $1B
53
+ RIA_OP_RENAME := $1C
54
+
55
+ ; 6522 VIA
56
+ VIA := $FFD0 ; VIA base address
57
+ VIA_PB := VIA+$0 ; Port register B
58
+ VIA_PA1 := VIA+$1 ; Port register A
59
+ VIA_PRB := VIA+$0 ; *** Deprecated ***
60
+ VIA_PRA := VIA+$1 ; *** Deprecated ***
61
+ VIA_DDRB := VIA+$2 ; Data direction register B
62
+ VIA_DDRA := VIA+$3 ; Data direction register A
63
+ VIA_T1CL := VIA+$4 ; Timer 1, low byte
64
+ VIA_T1CH := VIA+$5 ; Timer 1, high byte
65
+ VIA_T1LL := VIA+$6 ; Timer 1 latch, low byte
66
+ VIA_T1LH := VIA+$7 ; Timer 1 latch, high byte
67
+ VIA_T2CL := VIA+$8 ; Timer 2, low byte
68
+ VIA_T2CH := VIA+$9 ; Timer 2, high byte
69
+ VIA_SR := VIA+$A ; Shift register
70
+ VIA_CR := VIA+$B ; Auxiliary control register
71
+ VIA_PCR := VIA+$C ; Peripheral control register
72
+ VIA_IFR := VIA+$D ; Interrupt flag register
73
+ VIA_IER := VIA+$E ; Interrupt enable register
74
+ VIA_PA2 := VIA+$F ; Port register A w/o handshake
75
+
76
+ ; Values in ___oserror are the union of these FatFs errors and errno.inc
77
+ .enum
78
+ FR_OK = 32 ; Succeeded
79
+ FR_DISK_ERR ; A hard error occurred in the low level disk I/O layer
80
+ FR_INT_ERR ; Assertion failed
81
+ FR_NOT_READY ; The physical drive cannot work
82
+ FR_NO_FILE ; Could not find the file
83
+ FR_NO_PATH ; Could not find the path
84
+ FR_INVALID_NAME ; The path name format is invalid
85
+ FR_DENIED ; Access denied due to prohibited access or directory full
86
+ FR_EXIST ; Access denied due to prohibited access
87
+ FR_INVALID_OBJECT ; The file/directory object is invalid
88
+ FR_WRITE_PROTECTED ; The physical drive is write protected
89
+ FR_INVALID_DRIVE ; The logical drive number is invalid
90
+ FR_NOT_ENABLED ; The volume has no work area
91
+ FR_NO_FILESYSTEM ; There is no valid FAT volume
92
+ FR_MKFS_ABORTED ; The f_mkfs() aborted due to any problem
93
+ FR_TIMEOUT ; Could not get a grant to access the volume within defined period
94
+ FR_LOCKED ; The operation is rejected according to the file sharing policy
95
+ FR_NOT_ENOUGH_CORE ; LFN working buffer could not be allocated
96
+ FR_TOO_MANY_OPEN_FILES ; Number of open files > FF_FS_LOCK
97
+ FR_INVALID_PARAMETER ; Given parameter is invalid
98
+ .endenum
@@ -0,0 +1,55 @@
1
+ ;****************************************************************************
2
+ ;* *
3
+ ;* ser-error.inc *
4
+ ;* *
5
+ ;* Serial communication API *
6
+ ;* *
7
+ ;* *
8
+ ;* *
9
+ ;* (C) 2003-2012, 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
+ ; Error codes
38
+
39
+ .enum
40
+ SER_ERR_OK ; Not an error - relax
41
+ SER_ERR_NO_DRIVER ; No driver available
42
+ SER_ERR_CANNOT_LOAD ; Error loading driver
43
+ SER_ERR_INV_DRIVER ; Invalid driver
44
+ SER_ERR_NO_DEVICE ; Device (hardware) not found
45
+ SER_ERR_BAUD_UNAVAIL ; Baud rate not available
46
+ SER_ERR_NO_DATA ; Nothing to read
47
+ SER_ERR_OVERFLOW ; No room in send buffer
48
+ SER_ERR_INIT_FAILED ; Initialization failed
49
+ SER_ERR_INV_IOCTL ; IOCTL not supported
50
+ SER_ERR_INSTALLED ; A driver is already installed
51
+ SER_ERR_NOT_OPEN ; Driver not open
52
+
53
+ SER_ERR_COUNT ; Special: Number of error codes
54
+ .endenum
55
+
@@ -0,0 +1,162 @@
1
+ ;****************************************************************************
2
+ ;* *
3
+ ;* ser-kernel.inc *
4
+ ;* *
5
+ ;* Serial communication API *
6
+ ;* *
7
+ ;* *
8
+ ;* *
9
+ ;*(C) 2003-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
+ ; The driver header
38
+
39
+ .struct SER_HDR
40
+ ID .byte 3 ; Contains 0x73, 0x65, 0x72 ("ser")
41
+ VERSION .byte 1 ; Interface version
42
+ LIBREF .addr ; Library reference
43
+ JUMPTAB .struct
44
+ SER_INSTALL .addr ; SER_INSTALL routine
45
+ SER_UNINSTALL .addr ; SER_UNINSTALL routine
46
+ SER_OPEN .addr ; SER_OPEN routine
47
+ SER_CLOSE .addr ; SER_CLOSE routine
48
+ SER_GET .addr ; SER_GET routine
49
+ SER_PUT .addr ; SER_PUT routine
50
+ SER_STATUS .addr ; SER_STATUS routine
51
+ SER_IOCTL .addr ; SER_IOCTL routine
52
+ SER_IRQ .addr ; SER_IRQ routine
53
+ .endstruct
54
+ .endstruct
55
+
56
+
57
+ ;------------------------------------------------------------------------------
58
+ ; The SER API version, stored SER_HDR::VERSION
59
+
60
+ SER_API_VERSION = $02
61
+
62
+ ;------------------------------------------------------------------------------
63
+ ; ser_params
64
+
65
+ .struct SER_PARAMS
66
+ BAUDRATE .byte ; Baudrate
67
+ DATABITS .byte ; Number of data bits
68
+ STOPBITS .byte ; Number of stop bits
69
+ PARITY .byte ; Parity setting
70
+ HANDSHAKE .byte ; Type of handshake to use
71
+ .endstruct
72
+
73
+ ;------------------------------------------------------------------------------
74
+ ; Serial parameters
75
+
76
+ ; Baudrate
77
+ SER_BAUD_45_5 = $00
78
+ SER_BAUD_50 = $01
79
+ SER_BAUD_75 = $02
80
+ SER_BAUD_110 = $03
81
+ SER_BAUD_134_5 = $04
82
+ SER_BAUD_150 = $05
83
+ SER_BAUD_300 = $06
84
+ SER_BAUD_600 = $07
85
+ SER_BAUD_1200 = $08
86
+ SER_BAUD_1800 = $09
87
+ SER_BAUD_2400 = $0A
88
+ SER_BAUD_3600 = $0B
89
+ SER_BAUD_4800 = $0C
90
+ SER_BAUD_7200 = $0D
91
+ SER_BAUD_9600 = $0E
92
+ SER_BAUD_19200 = $0F
93
+ SER_BAUD_38400 = $10
94
+ SER_BAUD_57600 = $11
95
+ SER_BAUD_115200 = $12
96
+ SER_BAUD_230400 = $13
97
+ SER_BAUD_31250 = $14
98
+ SER_BAUD_62500 = $15
99
+ SER_BAUD_56_875 = $16
100
+
101
+ ; Data bit settings
102
+ SER_BITS_5 = $00
103
+ SER_BITS_6 = $01
104
+ SER_BITS_7 = $02
105
+ SER_BITS_8 = $03
106
+
107
+ ; Stop bit settings
108
+ SER_STOP_1 = $00
109
+ SER_STOP_2 = $01
110
+
111
+ ; Parity
112
+ SER_PAR_NONE = $00
113
+ SER_PAR_ODD = $01
114
+ SER_PAR_EVEN = $02
115
+ SER_PAR_MARK = $03
116
+ SER_PAR_SPACE = $04
117
+
118
+ ; Handshake
119
+ SER_HS_NONE = $00 ; No handshake
120
+ SER_HS_HW = $01 ; Hardware (RTS/CTS) handshake
121
+ SER_HS_SW = $02 ; Software handshake
122
+
123
+ ; Bit masks to mask out things from the status returned by ser_status
124
+ SER_STATUS_PE = $01 ; Parity error
125
+ SER_STATUS_FE = $02 ; Framing error
126
+ SER_STATUS_OE = $04 ; Overrun error
127
+ SER_STATUS_DCD = $20 ; NOT data carrier detect
128
+ SER_STATUS_DSR = $40 ; NOT data set ready
129
+
130
+ ;------------------------------------------------------------------------------
131
+ ; Variables
132
+
133
+ .global _ser_drv ; Pointer to driver
134
+
135
+ ;------------------------------------------------------------------------------
136
+ ; Driver entry points
137
+
138
+ .global ser_install
139
+ .global ser_uninstall
140
+ .global ser_open
141
+ .global ser_close
142
+ .global ser_get
143
+ .global ser_put
144
+ .global ser_status
145
+ .global ser_ioctl
146
+ .global ser_irq
147
+
148
+ ;------------------------------------------------------------------------------
149
+ ; C callable functions
150
+
151
+ .global _ser_load_driver
152
+ .global _ser_unload
153
+ .global _ser_install
154
+ .global _ser_uninstall
155
+ .global _ser_open
156
+ .global _ser_close
157
+ .global _ser_get
158
+ .global _ser_put
159
+ .global _ser_status
160
+ .global _ser_ioctl
161
+
162
+ .global _ser_clear_ptr
@@ -0,0 +1,57 @@
1
+ ;/*****************************************************************************/
2
+ ;/* */
3
+ ;/* signal.inc */
4
+ ;/* */
5
+ ;/* Signal handling definitions */
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
+ ; Standard signal handling functions
37
+ SIG_ERR = $0000
38
+
39
+ ; Signal numbers
40
+ SIGABRT = 0
41
+ SIGFPE = 1
42
+ SIGILL = 2
43
+ SIGINT = 3
44
+ SIGSEGV = 4
45
+ SIGTERM = 5
46
+ SIGCOUNT = 6 ; Number of signals
47
+
48
+ ; Table with signal handlers (asm code only)
49
+ .global sigtable
50
+
51
+ ; Function declarations
52
+ .global ___sig_ign
53
+ .global ___sig_dfl
54
+ .global _signal
55
+ .global _raise
56
+
57
+
@@ -0,0 +1,75 @@
1
+
2
+ ; *******************************************************************************
3
+ ; ** **
4
+ ; ** sim65.inc : assembler definitions for the sim6502 and sim65c02 targets. **
5
+ ; ** **
6
+ ; ** Sidney Cadot, January 2025 **
7
+ ; ** **
8
+ ; *******************************************************************************
9
+
10
+ ; The '_peripherals' symbol is defined in the linker configuration
11
+ ; file to correspond to the first address in the periperal memory
12
+ ; aparture.
13
+ ;
14
+ ; We use it here as a base address for all peripheral addresses.
15
+
16
+ .import _peripherals
17
+
18
+ ; **************************************************************
19
+ ; ** **
20
+ ; ** Define assembler symbols for the "counter" peripheral. **
21
+ ; ** **
22
+ ; **************************************************************
23
+
24
+ peripheral_counter_base := _peripherals + 0
25
+
26
+ peripheral_counter_latch := peripheral_counter_base + 0
27
+ peripheral_counter_select := peripheral_counter_base + 1
28
+ peripheral_counter_value := peripheral_counter_base + 2
29
+
30
+ ; Values for the peripheral_counter_select register.
31
+
32
+ COUNTER_SELECT_CLOCKCYCLE_COUNTER = $00
33
+ COUNTER_SELECT_INSTRUCTION_COUNTER = $01
34
+ COUNTER_SELECT_IRQ_COUNTER = $02
35
+ COUNTER_SELECT_NMI_COUNTER = $03
36
+ COUNTER_SELECT_WALLCLOCK_TIME = $80
37
+ COUNTER_SELECT_WALLCLOCK_TIME_SPLIT = $81
38
+
39
+ ; ********************************************************************
40
+ ; ** **
41
+ ; ** Define assembler symbols for the "sim65 control" peripheral. **
42
+ ; ** **
43
+ ; ********************************************************************
44
+
45
+ peripheral_sim65_base := _peripherals + 10
46
+
47
+ peripheral_sim65_cpu_mode := peripheral_sim65_base + 0
48
+ peripheral_sim65_trace_mode := peripheral_sim65_base + 1
49
+
50
+ ; Values for the peripheral_sim65_cpu_mode register.
51
+
52
+ SIM65_CPU_MODE_6502 = $00
53
+ SIM65_CPU_MODE_65C02 = $01
54
+ SIM65_CPU_MODE_6502X = $02
55
+
56
+ ; Bitfield values for the peripheral_sim65_trace_mode field.
57
+
58
+ SIM65_TRACE_MODE_FIELD_INSTR_COUNTER = $40
59
+ SIM65_TRACE_MODE_FIELD_CLOCK_COUNTER = $20
60
+ SIM65_TRACE_MODE_FIELD_PC = $10
61
+ SIM65_TRACE_MODE_FIELD_INSTR_BYTES = $08
62
+ SIM65_TRACE_MODE_FIELD_INSTR_ASSEMBLY = $04
63
+ SIM65_TRACE_MODE_FIELD_CPU_REGISTERS = $02
64
+ SIM65_TRACE_MODE_FIELD_CC65_SP = $01
65
+
66
+ ; Values for the peripheral_sim65_trace_mode field that fully disable / enable tracing.
67
+
68
+ SIM65_TRACE_MODE_DISABLE = $00
69
+ SIM65_TRACE_MODE_ENABLE_FULL = $7F
70
+
71
+ ; ************************
72
+ ; ** **
73
+ ; ** End of sim65.inc **
74
+ ; ** **
75
+ ; ************************