burn 0.1.0 → 0.1.1
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.
- data/README.md +59 -12
- data/lib/burn/cli.rb +25 -5
- data/lib/burn/generator/assembly_music.rb +1 -1
- data/lib/burn/tools/mac.tar.gz +0 -0
- data/lib/burn/tools/make_exec.sh +4 -0
- data/lib/burn/tools/other.tar.gz +0 -0
- data/lib/burn/tools/src.tar.gz +0 -0
- data/lib/burn/tools/win.tar.gz +0 -0
- data/lib/burn/tools/workspace_default.tar.gz +0 -0
- data/lib/burn/util/unpack.rb +11 -0
- data/lib/burn/util.rb +2 -1
- data/lib/burn/version.rb +1 -1
- data/lib/burn.rb +2 -0
- metadata +25 -157
- data/lib/burn/tools/mac/cc65/asminc/_file.inc +0 -27
- data/lib/burn/tools/mac/cc65/asminc/_heap.inc +0 -35
- data/lib/burn/tools/mac/cc65/asminc/apple2.inc +0 -64
- data/lib/burn/tools/mac/cc65/asminc/atari.inc +0 -1175
- data/lib/burn/tools/mac/cc65/asminc/atari.mac +0 -59
- data/lib/burn/tools/mac/cc65/asminc/atmos.inc +0 -110
- data/lib/burn/tools/mac/cc65/asminc/c128.inc +0 -214
- data/lib/burn/tools/mac/cc65/asminc/c16.inc +0 -9
- data/lib/burn/tools/mac/cc65/asminc/c64.inc +0 -212
- data/lib/burn/tools/mac/cc65/asminc/cbm.mac +0 -50
- data/lib/burn/tools/mac/cc65/asminc/cbm510.inc +0 -182
- data/lib/burn/tools/mac/cc65/asminc/cbm610.inc +0 -110
- data/lib/burn/tools/mac/cc65/asminc/cbm_filetype.inc +0 -34
- data/lib/burn/tools/mac/cc65/asminc/cpu.mac +0 -24
- data/lib/burn/tools/mac/cc65/asminc/ctype.inc +0 -29
- data/lib/burn/tools/mac/cc65/asminc/em-error.inc +0 -49
- data/lib/burn/tools/mac/cc65/asminc/em-kernel.inc +0 -106
- data/lib/burn/tools/mac/cc65/asminc/errno.inc +0 -36
- data/lib/burn/tools/mac/cc65/asminc/fcntl.inc +0 -21
- data/lib/burn/tools/mac/cc65/asminc/generic.mac +0 -55
- data/lib/burn/tools/mac/cc65/asminc/get_tv.inc +0 -22
- data/lib/burn/tools/mac/cc65/asminc/joy-error.inc +0 -44
- data/lib/burn/tools/mac/cc65/asminc/joy-kernel.inc +0 -85
- data/lib/burn/tools/mac/cc65/asminc/longbranch.mac +0 -88
- data/lib/burn/tools/mac/cc65/asminc/lynx.inc +0 -279
- data/lib/burn/tools/mac/cc65/asminc/modload.inc +0 -78
- data/lib/burn/tools/mac/cc65/asminc/mouse-kernel.inc +0 -180
- data/lib/burn/tools/mac/cc65/asminc/nes.inc +0 -93
- data/lib/burn/tools/mac/cc65/asminc/o65.inc +0 -150
- data/lib/burn/tools/mac/cc65/asminc/opcodes.inc +0 -509
- data/lib/burn/tools/mac/cc65/asminc/pet.inc +0 -54
- data/lib/burn/tools/mac/cc65/asminc/plus4.inc +0 -86
- data/lib/burn/tools/mac/cc65/asminc/ser-error.inc +0 -54
- data/lib/burn/tools/mac/cc65/asminc/ser-kernel.inc +0 -162
- data/lib/burn/tools/mac/cc65/asminc/signal.inc +0 -57
- data/lib/burn/tools/mac/cc65/asminc/smc.inc +0 -245
- data/lib/burn/tools/mac/cc65/asminc/stdio.inc +0 -70
- data/lib/burn/tools/mac/cc65/asminc/supervision.inc +0 -76
- data/lib/burn/tools/mac/cc65/asminc/tgi-error.inc +0 -52
- data/lib/burn/tools/mac/cc65/asminc/tgi-kernel.inc +0 -234
- data/lib/burn/tools/mac/cc65/asminc/tgi-vectorfont.inc +0 -70
- data/lib/burn/tools/mac/cc65/asminc/time.inc +0 -59
- data/lib/burn/tools/mac/cc65/asminc/utsname.inc +0 -46
- data/lib/burn/tools/mac/cc65/asminc/vic20.inc +0 -75
- data/lib/burn/tools/mac/cc65/asminc/zeropage.inc +0 -26
- data/lib/burn/tools/mac/cc65/bin/ca65 +0 -0
- data/lib/burn/tools/mac/cc65/bin/cc65 +0 -0
- data/lib/burn/tools/mac/cc65/bin/ld65 +0 -0
- data/lib/burn/tools/other/cc65/asminc/_file.inc +0 -27
- data/lib/burn/tools/other/cc65/asminc/_heap.inc +0 -35
- data/lib/burn/tools/other/cc65/asminc/apple2.inc +0 -64
- data/lib/burn/tools/other/cc65/asminc/atari.inc +0 -1175
- data/lib/burn/tools/other/cc65/asminc/atari.mac +0 -59
- data/lib/burn/tools/other/cc65/asminc/atmos.inc +0 -110
- data/lib/burn/tools/other/cc65/asminc/c128.inc +0 -214
- data/lib/burn/tools/other/cc65/asminc/c16.inc +0 -9
- data/lib/burn/tools/other/cc65/asminc/c64.inc +0 -212
- data/lib/burn/tools/other/cc65/asminc/cbm.mac +0 -50
- data/lib/burn/tools/other/cc65/asminc/cbm510.inc +0 -182
- data/lib/burn/tools/other/cc65/asminc/cbm610.inc +0 -110
- data/lib/burn/tools/other/cc65/asminc/cbm_filetype.inc +0 -34
- data/lib/burn/tools/other/cc65/asminc/cpu.mac +0 -24
- data/lib/burn/tools/other/cc65/asminc/ctype.inc +0 -29
- data/lib/burn/tools/other/cc65/asminc/em-error.inc +0 -49
- data/lib/burn/tools/other/cc65/asminc/em-kernel.inc +0 -106
- data/lib/burn/tools/other/cc65/asminc/errno.inc +0 -36
- data/lib/burn/tools/other/cc65/asminc/fcntl.inc +0 -21
- data/lib/burn/tools/other/cc65/asminc/generic.mac +0 -55
- data/lib/burn/tools/other/cc65/asminc/get_tv.inc +0 -22
- data/lib/burn/tools/other/cc65/asminc/joy-error.inc +0 -44
- data/lib/burn/tools/other/cc65/asminc/joy-kernel.inc +0 -85
- data/lib/burn/tools/other/cc65/asminc/longbranch.mac +0 -88
- data/lib/burn/tools/other/cc65/asminc/lynx.inc +0 -279
- data/lib/burn/tools/other/cc65/asminc/modload.inc +0 -78
- data/lib/burn/tools/other/cc65/asminc/mouse-kernel.inc +0 -180
- data/lib/burn/tools/other/cc65/asminc/nes.inc +0 -93
- data/lib/burn/tools/other/cc65/asminc/o65.inc +0 -150
- data/lib/burn/tools/other/cc65/asminc/opcodes.inc +0 -509
- data/lib/burn/tools/other/cc65/asminc/pet.inc +0 -54
- data/lib/burn/tools/other/cc65/asminc/plus4.inc +0 -86
- data/lib/burn/tools/other/cc65/asminc/ser-error.inc +0 -54
- data/lib/burn/tools/other/cc65/asminc/ser-kernel.inc +0 -162
- data/lib/burn/tools/other/cc65/asminc/signal.inc +0 -57
- data/lib/burn/tools/other/cc65/asminc/smc.inc +0 -245
- data/lib/burn/tools/other/cc65/asminc/stdio.inc +0 -70
- data/lib/burn/tools/other/cc65/asminc/supervision.inc +0 -76
- data/lib/burn/tools/other/cc65/asminc/tgi-error.inc +0 -52
- data/lib/burn/tools/other/cc65/asminc/tgi-kernel.inc +0 -234
- data/lib/burn/tools/other/cc65/asminc/tgi-vectorfont.inc +0 -70
- data/lib/burn/tools/other/cc65/asminc/time.inc +0 -59
- data/lib/burn/tools/other/cc65/asminc/utsname.inc +0 -46
- data/lib/burn/tools/other/cc65/asminc/vic20.inc +0 -75
- data/lib/burn/tools/other/cc65/asminc/zeropage.inc +0 -26
- data/lib/burn/tools/other/cc65/bin/ca65 +0 -0
- data/lib/burn/tools/other/cc65/bin/cc65 +0 -0
- data/lib/burn/tools/other/cc65/bin/ld65 +0 -0
- data/lib/burn/tools/win/cc65/asminc/_file.inc +0 -27
- data/lib/burn/tools/win/cc65/asminc/_heap.inc +0 -35
- data/lib/burn/tools/win/cc65/asminc/apple2.inc +0 -64
- data/lib/burn/tools/win/cc65/asminc/atari.inc +0 -1101
- data/lib/burn/tools/win/cc65/asminc/atmos.inc +0 -31
- data/lib/burn/tools/win/cc65/asminc/c128.inc +0 -213
- data/lib/burn/tools/win/cc65/asminc/c16.inc +0 -9
- data/lib/burn/tools/win/cc65/asminc/c64.inc +0 -212
- data/lib/burn/tools/win/cc65/asminc/cbm510.inc +0 -182
- data/lib/burn/tools/win/cc65/asminc/cbm610.inc +0 -110
- data/lib/burn/tools/win/cc65/asminc/ctype.inc +0 -29
- data/lib/burn/tools/win/cc65/asminc/em-error.inc +0 -44
- data/lib/burn/tools/win/cc65/asminc/em-kernel.inc +0 -100
- data/lib/burn/tools/win/cc65/asminc/errno.inc +0 -36
- data/lib/burn/tools/win/cc65/asminc/fcntl.inc +0 -21
- data/lib/burn/tools/win/cc65/asminc/get_tv.inc +0 -22
- data/lib/burn/tools/win/cc65/asminc/joy-error.inc +0 -44
- data/lib/burn/tools/win/cc65/asminc/joy-kernel.inc +0 -85
- data/lib/burn/tools/win/cc65/asminc/lynx.inc +0 -273
- data/lib/burn/tools/win/cc65/asminc/modload.inc +0 -78
- data/lib/burn/tools/win/cc65/asminc/mouse-kernel.inc +0 -179
- data/lib/burn/tools/win/cc65/asminc/nes.inc +0 -93
- data/lib/burn/tools/win/cc65/asminc/o65.inc +0 -135
- data/lib/burn/tools/win/cc65/asminc/pet.inc +0 -45
- data/lib/burn/tools/win/cc65/asminc/plus4.inc +0 -87
- data/lib/burn/tools/win/cc65/asminc/rs232.inc +0 -19
- data/lib/burn/tools/win/cc65/asminc/ser-error.inc +0 -50
- data/lib/burn/tools/win/cc65/asminc/ser-kernel.inc +0 -161
- data/lib/burn/tools/win/cc65/asminc/signal.inc +0 -57
- data/lib/burn/tools/win/cc65/asminc/stdio.inc +0 -70
- data/lib/burn/tools/win/cc65/asminc/supervision.inc +0 -76
- data/lib/burn/tools/win/cc65/asminc/tgi-error.inc +0 -48
- data/lib/burn/tools/win/cc65/asminc/tgi-kernel.inc +0 -183
- data/lib/burn/tools/win/cc65/asminc/tgi-mode.inc +0 -48
- data/lib/burn/tools/win/cc65/asminc/time.inc +0 -59
- data/lib/burn/tools/win/cc65/asminc/utsname.inc +0 -46
- data/lib/burn/tools/win/cc65/asminc/vic20.inc +0 -77
- data/lib/burn/tools/win/cc65/asminc/zeropage.inc +0 -22
- data/lib/burn/tools/win/cc65/bin/ca65.exe +0 -0
- data/lib/burn/tools/win/cc65/bin/cc65.exe +0 -0
- data/lib/burn/tools/win/cc65/bin/ld65.exe +0 -0
- data/lib/burn/workspace_default/asset/crt0.s +0 -260
- data/lib/burn/workspace_default/asset/famitone.s +0 -1031
- data/lib/burn/workspace_default/asset/mus_instruments.s +0 -50
- data/lib/burn/workspace_default/asset/music.s +0 -3
- data/lib/burn/workspace_default/asset/nes.cfg +0 -83
- data/lib/burn/workspace_default/asset/neslib.h +0 -213
- data/lib/burn/workspace_default/asset/neslib.s +0 -923
- data/lib/burn/workspace_default/asset/runtime.lib +0 -0
- data/lib/burn/workspace_default/asset/sounds.s +0 -143
- data/lib/burn/workspace_default/asset/test.h +0 -22
- data/lib/burn/workspace_default/asset/tileset.chr +0 -0
- data/lib/burn/workspace_default/release/js/emulator.html +0 -42
- data/lib/burn/workspace_default/release/js/js/dynamicaudio-89ba58da476270a9b630.min.js +0 -1
- data/lib/burn/workspace_default/release/js/js/jquery-1.4.2.min.js +0 -154
- data/lib/burn/workspace_default/release/js/js/jsnes-4e7a7260aa.js +0 -7149
- data/lib/burn/workspace_default/release/js/swf/dynamicaudio.swf +0 -0
- data/lib/burn/workspace_default/scripts/compile.bat +0 -30
- data/lib/burn/workspace_default/scripts/compile.sh +0 -30
@@ -1,162 +0,0 @@
|
|
1
|
-
;****************************************************************************
|
2
|
-
;* *
|
3
|
-
;* ser-kernel.inc *
|
4
|
-
;* *
|
5
|
-
;* Serial communication API *
|
6
|
-
;* *
|
7
|
-
;* *
|
8
|
-
;* *
|
9
|
-
;*(C) 2003-2006, Ullrich von Bassewitz *
|
10
|
-
;* R�merstrasse 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
|
-
INSTALL .addr ; INSTALL routine
|
45
|
-
UNINSTALL .addr ; UNINSTALL routine
|
46
|
-
OPEN .addr ; OPEN routine
|
47
|
-
CLOSE .addr ; CLOSE routine
|
48
|
-
GET .addr ; GET routine
|
49
|
-
PUT .addr ; PUT routine
|
50
|
-
STATUS .addr ; STATUS routine
|
51
|
-
IOCTL .addr ; IOCTL routine
|
52
|
-
IRQ .addr ; IRQ routine
|
53
|
-
.endstruct
|
54
|
-
.endstruct
|
55
|
-
|
56
|
-
|
57
|
-
;------------------------------------------------------------------------------
|
58
|
-
; The SER API version, stored SER_HDR::VERSION
|
59
|
-
|
60
|
-
SER_API_VERSION = $01
|
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
|
-
|
100
|
-
; Data bit settings
|
101
|
-
SER_BITS_5 = $00
|
102
|
-
SER_BITS_6 = $01
|
103
|
-
SER_BITS_7 = $02
|
104
|
-
SER_BITS_8 = $03
|
105
|
-
|
106
|
-
; Stop bit settings
|
107
|
-
SER_STOP_1 = $00
|
108
|
-
SER_STOP_2 = $01
|
109
|
-
|
110
|
-
; Parity
|
111
|
-
SER_PAR_NONE = $00
|
112
|
-
SER_PAR_ODD = $01
|
113
|
-
SER_PAR_EVEN = $02
|
114
|
-
SER_PAR_MARK = $03
|
115
|
-
SER_PAR_SPACE = $04
|
116
|
-
|
117
|
-
; Handshake
|
118
|
-
SER_HS_NONE = $00 ; No handshake
|
119
|
-
SER_HS_HW = $01 ; Hardware (RTS/CTS) handshake
|
120
|
-
SER_HS_SW = $02 ; Software handshake
|
121
|
-
|
122
|
-
; Bit masks to mask out things from the status returned by ser_status
|
123
|
-
SER_STATUS_PE = $01 ; Parity error
|
124
|
-
SER_STATUS_FE = $02 ; Framing error
|
125
|
-
SER_STATUS_OE = $04 ; Overrun error
|
126
|
-
SER_STATUS_DCD = $20 ; NOT data carrier detect
|
127
|
-
SER_STATUS_DSR = $40 ; NOT data set ready
|
128
|
-
|
129
|
-
;------------------------------------------------------------------------------
|
130
|
-
; Variables
|
131
|
-
|
132
|
-
.global _ser_drv ; Pointer to driver
|
133
|
-
|
134
|
-
;------------------------------------------------------------------------------
|
135
|
-
; Driver entry points
|
136
|
-
|
137
|
-
.global ser_install
|
138
|
-
.global ser_uninstall
|
139
|
-
.global ser_open
|
140
|
-
.global ser_close
|
141
|
-
.global ser_get
|
142
|
-
.global ser_put
|
143
|
-
.global ser_status
|
144
|
-
.global ser_ioctl
|
145
|
-
.global ser_irq
|
146
|
-
|
147
|
-
;------------------------------------------------------------------------------
|
148
|
-
; C callable functions
|
149
|
-
|
150
|
-
.global _ser_load_driver
|
151
|
-
.global _ser_unload
|
152
|
-
.global _ser_install
|
153
|
-
.global _ser_uninstall
|
154
|
-
.global _ser_open
|
155
|
-
.global _ser_close
|
156
|
-
.global _ser_get
|
157
|
-
.global _ser_put
|
158
|
-
.global _ser_status
|
159
|
-
.global _ser_ioctl
|
160
|
-
|
161
|
-
.global _ser_clear_ptr
|
162
|
-
|
@@ -1,57 +0,0 @@
|
|
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
|
-
|
@@ -1,245 +0,0 @@
|
|
1
|
-
; smc.mac
|
2
|
-
; ca65 Macro-Pack for Self Modifying Code (SMC)
|
3
|
-
;
|
4
|
-
; (c) Christian Kr�ger, latest change: 09-Nov-2011
|
5
|
-
;
|
6
|
-
; This software is provided 'as-is', without any expressed or implied
|
7
|
-
; warranty. In no event will the authors be held liable for any damages
|
8
|
-
; arising from the use of this software.
|
9
|
-
;
|
10
|
-
; Permission is granted to anyone to use this software for any purpose,
|
11
|
-
; including commercial applications, and to alter it and redistribute it
|
12
|
-
; freely, subject to the following restrictions:
|
13
|
-
;
|
14
|
-
; 1. The origin of this software must not be misrepresented; you must not
|
15
|
-
; claim that you wrote the original software. If you use this software
|
16
|
-
; in a product, an acknowledgment in the product documentation would be
|
17
|
-
; appreciated but is not required.
|
18
|
-
; 2. Altered source versions must be plainly marked as such, and must not
|
19
|
-
; be misrepresented as being the original software.
|
20
|
-
; 3. This notice may not be removed or altered from any source
|
21
|
-
; distribution.
|
22
|
-
;
|
23
|
-
|
24
|
-
.define _SMCDesignator .mid(0, .tcount(label) - 1, label) .ident(.concat(.string(.right(1, label)), "_SMC"))
|
25
|
-
.define _SMCAlias .mid(0, .tcount(alias) - 1, alias) .ident(.concat(.string(.right(1, alias)), "_SMC"))
|
26
|
-
.define SMC_AbsAdr $FADE
|
27
|
-
.define SMC_ZpAdr $00
|
28
|
-
.define SMC_Opcode nop
|
29
|
-
.define SMC_Value $42
|
30
|
-
|
31
|
-
.macro SMC_OperateOnValue opcode, label
|
32
|
-
opcode _SMCDesignator+1
|
33
|
-
.endmacro
|
34
|
-
|
35
|
-
.macro SMC_OperateOnLowByte opcode, label
|
36
|
-
SMC_OperateOnValue opcode, label
|
37
|
-
.endmacro
|
38
|
-
|
39
|
-
.macro SMC_OperateOnHighByte opcode, label
|
40
|
-
opcode _SMCDesignator + 2
|
41
|
-
.endmacro
|
42
|
-
|
43
|
-
.macro SMC_Import alias
|
44
|
-
.import _SMCAlias
|
45
|
-
.endmacro
|
46
|
-
|
47
|
-
.macro SMC_Export alias, label
|
48
|
-
.export _SMCAlias := _SMCDesignator
|
49
|
-
.endmacro
|
50
|
-
|
51
|
-
.macro SMC label, statement
|
52
|
-
_SMCDesignator: statement
|
53
|
-
.endmacro
|
54
|
-
|
55
|
-
.macro SMC_TransferOpcode label, opcode, register
|
56
|
-
.if .paramcount = 2 .or .match ({register}, a)
|
57
|
-
lda #opcode
|
58
|
-
sta _SMCDesignator
|
59
|
-
.elseif .match ({register}, x)
|
60
|
-
ldx #opcode
|
61
|
-
stx _SMCDesignator
|
62
|
-
.elseif .match ({register}, y)
|
63
|
-
ldy #opcode
|
64
|
-
sty _SMCDesignator
|
65
|
-
.endif
|
66
|
-
.endmacro
|
67
|
-
|
68
|
-
.macro SMC_LoadOpcode label, register
|
69
|
-
.if .paramcount = 1 .or .match ({register}, a)
|
70
|
-
lda _SMCDesignator
|
71
|
-
.elseif .match ({register}, x)
|
72
|
-
ldx _SMCDesignator
|
73
|
-
.elseif .match ({register}, y)
|
74
|
-
ldy _SMCDesignator
|
75
|
-
.endif
|
76
|
-
.endmacro
|
77
|
-
|
78
|
-
.macro SMC_StoreOpcode label, register
|
79
|
-
.if .paramcount = 1 .or .match ({register}, a)
|
80
|
-
sta _SMCDesignator
|
81
|
-
.elseif .match ({register}, x)
|
82
|
-
stx _SMCDesignator
|
83
|
-
.elseif .match ({register}, y)
|
84
|
-
sty _SMCDesignator
|
85
|
-
.endif
|
86
|
-
.endmacro
|
87
|
-
|
88
|
-
.macro SMC_ChangeBranch label, destination, register
|
89
|
-
.if .paramcount = 2 .or .match ({register}, a)
|
90
|
-
lda #(destination - _SMCDesignator -2)
|
91
|
-
sta _SMCDesignator+1
|
92
|
-
.elseif .match ({register}, x)
|
93
|
-
ldx #(destination - _SMCDesignator - 2)
|
94
|
-
stx _SMCDesignator+1
|
95
|
-
.elseif .match ({register}, y)
|
96
|
-
ldy #(destination - _SMCDesignator - 2)
|
97
|
-
sty _SMCDesignator+1
|
98
|
-
.endif
|
99
|
-
.endmacro
|
100
|
-
|
101
|
-
.macro SMC_TransferValue label, value, register
|
102
|
-
.if .paramcount = 2 .or .match ({register}, a)
|
103
|
-
lda value
|
104
|
-
sta _SMCDesignator+1
|
105
|
-
.elseif .match ({register}, x)
|
106
|
-
ldx value
|
107
|
-
stx _SMCDesignator+1
|
108
|
-
.elseif .match ({register}, y)
|
109
|
-
ldy value
|
110
|
-
sty _SMCDesignator+1
|
111
|
-
.endif
|
112
|
-
.endmacro
|
113
|
-
|
114
|
-
.macro SMC_LoadValue label, register
|
115
|
-
.if .paramcount = 1 .or .match ({register}, a)
|
116
|
-
lda _SMCDesignator+1
|
117
|
-
.elseif .match ({register}, x)
|
118
|
-
ldx _SMCDesignator+1
|
119
|
-
.elseif .match ({register}, y)
|
120
|
-
ldy _SMCDesignator+1
|
121
|
-
.endif
|
122
|
-
.endmacro
|
123
|
-
|
124
|
-
.macro SMC_StoreValue label, register
|
125
|
-
.if .paramcount = 1 .or .match ({register}, a)
|
126
|
-
sta _SMCDesignator+1
|
127
|
-
.elseif .match ({register}, x)
|
128
|
-
stx _SMCDesignator+1
|
129
|
-
.elseif .match ({register}, y)
|
130
|
-
sty _SMCDesignator+1
|
131
|
-
.endif
|
132
|
-
.endmacro
|
133
|
-
|
134
|
-
|
135
|
-
.macro SMC_TransferLowByte label, value, register
|
136
|
-
SMC_TransferValue label, value, register
|
137
|
-
.endmacro
|
138
|
-
|
139
|
-
.macro SMC_LoadLowByte label, register
|
140
|
-
SMC_LoadValue label, register
|
141
|
-
.endmacro
|
142
|
-
|
143
|
-
.macro SMC_StoreLowByte label, register
|
144
|
-
SMC_StoreValue label, register
|
145
|
-
.endmacro
|
146
|
-
|
147
|
-
.macro SMC_TransferHighByte label, value, register
|
148
|
-
.if .paramcount = 2 .or .match ({register}, a)
|
149
|
-
lda value
|
150
|
-
sta _SMCDesignator+2
|
151
|
-
.elseif .match ({register}, x)
|
152
|
-
ldx value
|
153
|
-
stx _SMCDesignator+2
|
154
|
-
.elseif .match ({register}, y)
|
155
|
-
ldy value
|
156
|
-
sty _SMCDesignator+2
|
157
|
-
.endif
|
158
|
-
.endmacro
|
159
|
-
|
160
|
-
.macro SMC_LoadHighByte label, register
|
161
|
-
.if .paramcount = 1 .or .match ({register}, a)
|
162
|
-
lda _SMCDesignator+2
|
163
|
-
.elseif .match ({register}, x)
|
164
|
-
ldx _SMCDesignator+2
|
165
|
-
.elseif .match ({register}, y)
|
166
|
-
ldy _SMCDesignator+2
|
167
|
-
.endif
|
168
|
-
.endmacro
|
169
|
-
|
170
|
-
.macro SMC_StoreHighByte label, register
|
171
|
-
.if .paramcount = 1 .or .match ({register}, a)
|
172
|
-
sta _SMCDesignator+2
|
173
|
-
.elseif .match ({register}, x)
|
174
|
-
stx _SMCDesignator+2
|
175
|
-
.elseif .match ({register}, y)
|
176
|
-
sty _SMCDesignator+2
|
177
|
-
.endif
|
178
|
-
.endmacro
|
179
|
-
|
180
|
-
.macro SMC_TransferAddressSingle label, address, register
|
181
|
-
.if .paramcount = 2 .or .match ((register), a)
|
182
|
-
.if (.match (.left (1, {address}), #))
|
183
|
-
; immediate mode
|
184
|
-
lda #<(.right (.tcount ({address})-1, {address}))
|
185
|
-
sta _SMCDesignator+1
|
186
|
-
lda #>(.right (.tcount ({address})-1, {address}))
|
187
|
-
sta _SMCDesignator+2
|
188
|
-
.else
|
189
|
-
; assume absolute or zero page
|
190
|
-
lda address
|
191
|
-
sta _SMCDesignator+1
|
192
|
-
lda 1+(address)
|
193
|
-
sta _SMCDesignator+2
|
194
|
-
.endif
|
195
|
-
.elseif .match ((register), x)
|
196
|
-
.if (.match (.left (1, {address}), #))
|
197
|
-
; immediate mode
|
198
|
-
ldx #<(.right (.tcount ({address})-1, {address}))
|
199
|
-
stx _SMCDesignator+1
|
200
|
-
ldx #>(.right (.tcount ({address})-1, {address}))
|
201
|
-
stx _SMCDesignator+2
|
202
|
-
.else
|
203
|
-
; assume absolute or zero page
|
204
|
-
ldx address
|
205
|
-
stx _SMCDesignator+1
|
206
|
-
ldx 1+(address)
|
207
|
-
stx _SMCDesignator+2
|
208
|
-
.endif
|
209
|
-
.elseif .match ((register), y)
|
210
|
-
.if (.match (.left (1, {address}), #))
|
211
|
-
; immediate mode
|
212
|
-
ldy #<(.right (.tcount ({address})-1, {address}))
|
213
|
-
sty _SMCDesignator+1
|
214
|
-
ldy #>(.right (.tcount ({address})-1, {address}))
|
215
|
-
sty _SMCDesignator+2
|
216
|
-
.else
|
217
|
-
; assume absolute or zero page
|
218
|
-
ldy address
|
219
|
-
sty _SMCDesignator+1
|
220
|
-
ldy 1+(address)
|
221
|
-
sty _SMCDesignator+2
|
222
|
-
.endif
|
223
|
-
.endif
|
224
|
-
.endmacro
|
225
|
-
|
226
|
-
.macro SMC_TransferAddress label, address
|
227
|
-
.if (.match (.left (1, {address}), #))
|
228
|
-
; immediate mode
|
229
|
-
lda #<(.right (.tcount ({address})-1, {address}))
|
230
|
-
sta _SMCDesignator+1
|
231
|
-
ldx #>(.right (.tcount ({address})-1, {address}))
|
232
|
-
stx _SMCDesignator+2
|
233
|
-
.else
|
234
|
-
; assume absolute or zero page
|
235
|
-
lda {address}
|
236
|
-
sta _SMCDesignator+1
|
237
|
-
ldx 1+{address}
|
238
|
-
stx _SMCDesignator)+2
|
239
|
-
.endif
|
240
|
-
.endmacro
|
241
|
-
|
242
|
-
.macro SMC_StoreAddress label
|
243
|
-
sta _SMCDesignator+1
|
244
|
-
stx _SMCDesignator+2
|
245
|
-
.endmacro
|
@@ -1,70 +0,0 @@
|
|
1
|
-
;*****************************************************************************/
|
2
|
-
;* */
|
3
|
-
;* stdio.inc */
|
4
|
-
;* */
|
5
|
-
;* Mirror definitions for stdio.h */
|
6
|
-
;* */
|
7
|
-
;* */
|
8
|
-
;* */
|
9
|
-
;* (C) 2003-2005, Ullrich von Bassewitz */
|
10
|
-
;* R�merstrasse 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
|
-
; Constants
|
38
|
-
|
39
|
-
_IOFBF = 0
|
40
|
-
_IOLBF = 1
|
41
|
-
_IONBF = 2
|
42
|
-
BUFSIZ = 256
|
43
|
-
EOF = -1
|
44
|
-
.if .defined(__APPLE2__)
|
45
|
-
FILENAME_MAX = 64+1
|
46
|
-
.elseif .defined(__ATARI__)
|
47
|
-
FILENAME_MAX = 12+1
|
48
|
-
.elseif .defined(__LUNIX__)
|
49
|
-
FILENAME_MAX = 80+1
|
50
|
-
.else
|
51
|
-
FILENAME_MAX = 16+1
|
52
|
-
.endif
|
53
|
-
L_tmpnam = FILENAME_MAX
|
54
|
-
SEEK_CUR = 0
|
55
|
-
SEEK_END = 1
|
56
|
-
SEEK_SET = 2
|
57
|
-
TMP_MAX = 256
|
58
|
-
|
59
|
-
; Maximum number of open files (size of the file table)
|
60
|
-
FOPEN_MAX = 8
|
61
|
-
|
62
|
-
;----------------------------------------------------------------------------
|
63
|
-
; External variables
|
64
|
-
|
65
|
-
.global _stdin
|
66
|
-
.global _stdout
|
67
|
-
.global _stderr
|
68
|
-
|
69
|
-
|
70
|
-
|
@@ -1,76 +0,0 @@
|
|
1
|
-
; supervision symbols
|
2
|
-
|
3
|
-
; supervision 65c02s
|
4
|
-
; in cc65 up to 2.9.1 65c02 means 65c02s
|
5
|
-
.pc02
|
6
|
-
|
7
|
-
lcd_addr = $4000
|
8
|
-
LCD_LINESIZE = $30
|
9
|
-
LCD_WIDTH = 160
|
10
|
-
LCD_HEIGHT = 160
|
11
|
-
; 2 bit per pixel, packed
|
12
|
-
|
13
|
-
lcd_width = $2000
|
14
|
-
lcd_height = $2001
|
15
|
-
lcd_xpos = $2002 ; in pixel, bit 0+1 not used
|
16
|
-
lcd_ypos = $2003 ; weird
|
17
|
-
|
18
|
-
sv_port_r = $2021
|
19
|
-
sv_port_w = $2022
|
20
|
-
|
21
|
-
sv_timer_count = $2023
|
22
|
-
; read for quitting
|
23
|
-
sv_timer_quit = $2024
|
24
|
-
|
25
|
-
; bit 0 timer, bit 1 dma
|
26
|
-
sv_irq_source = $2027
|
27
|
-
SV_IRQ_REQUEST_TIMER = 1
|
28
|
-
SV_IRQ_REQUEST_DMA = 2
|
29
|
-
|
30
|
-
; bit 5,6,7 select bank at 0x8000
|
31
|
-
sv_bank = $2026
|
32
|
-
SV_NMI_ENABLE_ON = 1
|
33
|
-
SV_IRQ_ENABLE_TIMER = 2
|
34
|
-
SV_IRQ_ENABLE_DMA = 4
|
35
|
-
SV_LCD_ON = 8
|
36
|
-
SV_TIMER_MODE_240Hz = $10 ; else 15360
|
37
|
-
|
38
|
-
|
39
|
-
; low activ/pressed
|
40
|
-
sv_control = $2020
|
41
|
-
SV_RIGHT = 1
|
42
|
-
SV_LEFT = 2
|
43
|
-
SV_DOWN = 4
|
44
|
-
SV_UP = 8
|
45
|
-
SV_BUTTONB = $10
|
46
|
-
SV_BUTTONA = $20
|
47
|
-
SV_SELECT = $40
|
48
|
-
SV_START = $80
|
49
|
-
|
50
|
-
; frequency=125000/counter
|
51
|
-
sv_audio_right_counter = $2010 ;word
|
52
|
-
sv_audio_left_counter = $2014
|
53
|
-
SV_AUDIO_ON =$40
|
54
|
-
;bits 0..3 volume
|
55
|
-
; bit 4 ?
|
56
|
-
; bit 5 ?
|
57
|
-
sv_audio_right_control = $2012
|
58
|
-
sv_audio_left_control = $2016
|
59
|
-
; write activates tone for x/60 sec (0 means 256)
|
60
|
-
sv_audio_right_timer = $2013
|
61
|
-
sv_audio_left_timer = $2017
|
62
|
-
|
63
|
-
|
64
|
-
;read for irq quitting
|
65
|
-
sv_dma_quit = $2025
|
66
|
-
sv_dma_on = $201c
|
67
|
-
; bit 7 true start, false stop
|
68
|
-
sv_dma_start = $2018 ; word
|
69
|
-
sv_dma_size = $201a ; *32 samples
|
70
|
-
sv_dma_control = $201b
|
71
|
-
; bit 0,1 speed: 0 15360, 11 15360/4
|
72
|
-
; bit 2,3 volume: 0 silent, 11 loud
|
73
|
-
|
74
|
-
sv_noise_volume = $2028 ; and frequency
|
75
|
-
sv_noise_timer = $2029
|
76
|
-
sv_noise_control = $202a
|
@@ -1,52 +0,0 @@
|
|
1
|
-
;*****************************************************************************/
|
2
|
-
;* */
|
3
|
-
;* tgi-error.inc */
|
4
|
-
;* */
|
5
|
-
;* TGI error codes */
|
6
|
-
;* */
|
7
|
-
;* */
|
8
|
-
;* */
|
9
|
-
;* (C) 2002-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
|
-
; Error constants
|
37
|
-
.enum
|
38
|
-
TGI_ERR_OK ; No error
|
39
|
-
TGI_ERR_NO_DRIVER ; No driver available
|
40
|
-
TGI_ERR_CANNOT_LOAD ; Error loading driver or font
|
41
|
-
TGI_ERR_INV_DRIVER ; Invalid driver
|
42
|
-
TGI_ERR_INV_MODE ; Mode not supported by driver
|
43
|
-
TGI_ERR_INV_ARG ; Invalid function argument
|
44
|
-
TGI_ERR_INV_FUNC ; Function not supported
|
45
|
-
TGI_ERR_INV_FONT ; Font file is invalid
|
46
|
-
TGI_ERR_NO_RES ; Out of resources (memory, handles, ...)
|
47
|
-
TGI_ERR_UNKNOWN ; Unknown error
|
48
|
-
TGI_ERR_INSTALLED ; A driver is already installed
|
49
|
-
|
50
|
-
TGI_ERR_COUNT ; Special: Number of error messages
|
51
|
-
.endenum
|
52
|
-
|