burn 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +621 -0
- data/README.md +467 -0
- data/Rakefile +1 -0
- data/bin/burn +14 -0
- data/lib/burn/builder.rb +65 -0
- data/lib/burn/cli.rb +187 -0
- data/lib/burn/debug.rb +25 -0
- data/lib/burn/dsl/channel_stream.rb +105 -0
- data/lib/burn/dsl/declare.rb +42 -0
- data/lib/burn/dsl/dsl_base.rb +31 -0
- data/lib/burn/dsl/music.rb +36 -0
- data/lib/burn/dsl/note.rb +125 -0
- data/lib/burn/dsl/scene.rb +278 -0
- data/lib/burn/dsl/sound.rb +30 -0
- data/lib/burn/dsl/sound_effect.rb +91 -0
- data/lib/burn/dsl.rb +8 -0
- data/lib/burn/generator/assembly_music.rb +47 -0
- data/lib/burn/generator/assembly_sound_effect.rb +33 -0
- data/lib/burn/generator/c_source.rb +54 -0
- data/lib/burn/generator/template/mus_template.s +49 -0
- data/lib/burn/generator/template/template.c +88 -0
- data/lib/burn/generator.rb +3 -0
- data/lib/burn/tools/mac/cc65/asminc/_file.inc +27 -0
- data/lib/burn/tools/mac/cc65/asminc/_heap.inc +35 -0
- data/lib/burn/tools/mac/cc65/asminc/apple2.inc +64 -0
- data/lib/burn/tools/mac/cc65/asminc/atari.inc +1175 -0
- data/lib/burn/tools/mac/cc65/asminc/atari.mac +59 -0
- data/lib/burn/tools/mac/cc65/asminc/atmos.inc +110 -0
- data/lib/burn/tools/mac/cc65/asminc/c128.inc +214 -0
- data/lib/burn/tools/mac/cc65/asminc/c16.inc +9 -0
- data/lib/burn/tools/mac/cc65/asminc/c64.inc +212 -0
- data/lib/burn/tools/mac/cc65/asminc/cbm.mac +50 -0
- data/lib/burn/tools/mac/cc65/asminc/cbm510.inc +182 -0
- data/lib/burn/tools/mac/cc65/asminc/cbm610.inc +110 -0
- data/lib/burn/tools/mac/cc65/asminc/cbm_filetype.inc +34 -0
- data/lib/burn/tools/mac/cc65/asminc/cpu.mac +24 -0
- data/lib/burn/tools/mac/cc65/asminc/ctype.inc +29 -0
- data/lib/burn/tools/mac/cc65/asminc/em-error.inc +49 -0
- data/lib/burn/tools/mac/cc65/asminc/em-kernel.inc +106 -0
- data/lib/burn/tools/mac/cc65/asminc/errno.inc +36 -0
- data/lib/burn/tools/mac/cc65/asminc/fcntl.inc +21 -0
- data/lib/burn/tools/mac/cc65/asminc/generic.mac +55 -0
- data/lib/burn/tools/mac/cc65/asminc/get_tv.inc +22 -0
- data/lib/burn/tools/mac/cc65/asminc/joy-error.inc +44 -0
- data/lib/burn/tools/mac/cc65/asminc/joy-kernel.inc +85 -0
- data/lib/burn/tools/mac/cc65/asminc/longbranch.mac +88 -0
- data/lib/burn/tools/mac/cc65/asminc/lynx.inc +279 -0
- data/lib/burn/tools/mac/cc65/asminc/modload.inc +78 -0
- data/lib/burn/tools/mac/cc65/asminc/mouse-kernel.inc +180 -0
- data/lib/burn/tools/mac/cc65/asminc/nes.inc +93 -0
- data/lib/burn/tools/mac/cc65/asminc/o65.inc +150 -0
- data/lib/burn/tools/mac/cc65/asminc/opcodes.inc +509 -0
- data/lib/burn/tools/mac/cc65/asminc/pet.inc +54 -0
- data/lib/burn/tools/mac/cc65/asminc/plus4.inc +86 -0
- data/lib/burn/tools/mac/cc65/asminc/ser-error.inc +54 -0
- data/lib/burn/tools/mac/cc65/asminc/ser-kernel.inc +162 -0
- data/lib/burn/tools/mac/cc65/asminc/signal.inc +57 -0
- data/lib/burn/tools/mac/cc65/asminc/smc.inc +245 -0
- data/lib/burn/tools/mac/cc65/asminc/stdio.inc +70 -0
- data/lib/burn/tools/mac/cc65/asminc/supervision.inc +76 -0
- data/lib/burn/tools/mac/cc65/asminc/tgi-error.inc +52 -0
- data/lib/burn/tools/mac/cc65/asminc/tgi-kernel.inc +234 -0
- data/lib/burn/tools/mac/cc65/asminc/tgi-vectorfont.inc +70 -0
- data/lib/burn/tools/mac/cc65/asminc/time.inc +59 -0
- data/lib/burn/tools/mac/cc65/asminc/utsname.inc +46 -0
- data/lib/burn/tools/mac/cc65/asminc/vic20.inc +75 -0
- data/lib/burn/tools/mac/cc65/asminc/zeropage.inc +26 -0
- 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 +27 -0
- data/lib/burn/tools/other/cc65/asminc/_heap.inc +35 -0
- data/lib/burn/tools/other/cc65/asminc/apple2.inc +64 -0
- data/lib/burn/tools/other/cc65/asminc/atari.inc +1175 -0
- data/lib/burn/tools/other/cc65/asminc/atari.mac +59 -0
- data/lib/burn/tools/other/cc65/asminc/atmos.inc +110 -0
- data/lib/burn/tools/other/cc65/asminc/c128.inc +214 -0
- data/lib/burn/tools/other/cc65/asminc/c16.inc +9 -0
- data/lib/burn/tools/other/cc65/asminc/c64.inc +212 -0
- data/lib/burn/tools/other/cc65/asminc/cbm.mac +50 -0
- data/lib/burn/tools/other/cc65/asminc/cbm510.inc +182 -0
- data/lib/burn/tools/other/cc65/asminc/cbm610.inc +110 -0
- data/lib/burn/tools/other/cc65/asminc/cbm_filetype.inc +34 -0
- data/lib/burn/tools/other/cc65/asminc/cpu.mac +24 -0
- data/lib/burn/tools/other/cc65/asminc/ctype.inc +29 -0
- data/lib/burn/tools/other/cc65/asminc/em-error.inc +49 -0
- data/lib/burn/tools/other/cc65/asminc/em-kernel.inc +106 -0
- data/lib/burn/tools/other/cc65/asminc/errno.inc +36 -0
- data/lib/burn/tools/other/cc65/asminc/fcntl.inc +21 -0
- data/lib/burn/tools/other/cc65/asminc/generic.mac +55 -0
- data/lib/burn/tools/other/cc65/asminc/get_tv.inc +22 -0
- data/lib/burn/tools/other/cc65/asminc/joy-error.inc +44 -0
- data/lib/burn/tools/other/cc65/asminc/joy-kernel.inc +85 -0
- data/lib/burn/tools/other/cc65/asminc/longbranch.mac +88 -0
- data/lib/burn/tools/other/cc65/asminc/lynx.inc +279 -0
- data/lib/burn/tools/other/cc65/asminc/modload.inc +78 -0
- data/lib/burn/tools/other/cc65/asminc/mouse-kernel.inc +180 -0
- data/lib/burn/tools/other/cc65/asminc/nes.inc +93 -0
- data/lib/burn/tools/other/cc65/asminc/o65.inc +150 -0
- data/lib/burn/tools/other/cc65/asminc/opcodes.inc +509 -0
- data/lib/burn/tools/other/cc65/asminc/pet.inc +54 -0
- data/lib/burn/tools/other/cc65/asminc/plus4.inc +86 -0
- data/lib/burn/tools/other/cc65/asminc/ser-error.inc +54 -0
- data/lib/burn/tools/other/cc65/asminc/ser-kernel.inc +162 -0
- data/lib/burn/tools/other/cc65/asminc/signal.inc +57 -0
- data/lib/burn/tools/other/cc65/asminc/smc.inc +245 -0
- data/lib/burn/tools/other/cc65/asminc/stdio.inc +70 -0
- data/lib/burn/tools/other/cc65/asminc/supervision.inc +76 -0
- data/lib/burn/tools/other/cc65/asminc/tgi-error.inc +52 -0
- data/lib/burn/tools/other/cc65/asminc/tgi-kernel.inc +234 -0
- data/lib/burn/tools/other/cc65/asminc/tgi-vectorfont.inc +70 -0
- data/lib/burn/tools/other/cc65/asminc/time.inc +59 -0
- data/lib/burn/tools/other/cc65/asminc/utsname.inc +46 -0
- data/lib/burn/tools/other/cc65/asminc/vic20.inc +75 -0
- data/lib/burn/tools/other/cc65/asminc/zeropage.inc +26 -0
- 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 +27 -0
- data/lib/burn/tools/win/cc65/asminc/_heap.inc +35 -0
- data/lib/burn/tools/win/cc65/asminc/apple2.inc +64 -0
- data/lib/burn/tools/win/cc65/asminc/atari.inc +1101 -0
- data/lib/burn/tools/win/cc65/asminc/atmos.inc +31 -0
- data/lib/burn/tools/win/cc65/asminc/c128.inc +213 -0
- data/lib/burn/tools/win/cc65/asminc/c16.inc +9 -0
- data/lib/burn/tools/win/cc65/asminc/c64.inc +212 -0
- data/lib/burn/tools/win/cc65/asminc/cbm510.inc +182 -0
- data/lib/burn/tools/win/cc65/asminc/cbm610.inc +110 -0
- data/lib/burn/tools/win/cc65/asminc/ctype.inc +29 -0
- data/lib/burn/tools/win/cc65/asminc/em-error.inc +44 -0
- data/lib/burn/tools/win/cc65/asminc/em-kernel.inc +100 -0
- data/lib/burn/tools/win/cc65/asminc/errno.inc +36 -0
- data/lib/burn/tools/win/cc65/asminc/fcntl.inc +21 -0
- data/lib/burn/tools/win/cc65/asminc/get_tv.inc +22 -0
- data/lib/burn/tools/win/cc65/asminc/joy-error.inc +44 -0
- data/lib/burn/tools/win/cc65/asminc/joy-kernel.inc +85 -0
- data/lib/burn/tools/win/cc65/asminc/lynx.inc +273 -0
- data/lib/burn/tools/win/cc65/asminc/modload.inc +78 -0
- data/lib/burn/tools/win/cc65/asminc/mouse-kernel.inc +179 -0
- data/lib/burn/tools/win/cc65/asminc/nes.inc +93 -0
- data/lib/burn/tools/win/cc65/asminc/o65.inc +135 -0
- data/lib/burn/tools/win/cc65/asminc/pet.inc +45 -0
- data/lib/burn/tools/win/cc65/asminc/plus4.inc +87 -0
- data/lib/burn/tools/win/cc65/asminc/rs232.inc +19 -0
- data/lib/burn/tools/win/cc65/asminc/ser-error.inc +50 -0
- data/lib/burn/tools/win/cc65/asminc/ser-kernel.inc +161 -0
- data/lib/burn/tools/win/cc65/asminc/signal.inc +57 -0
- data/lib/burn/tools/win/cc65/asminc/stdio.inc +70 -0
- data/lib/burn/tools/win/cc65/asminc/supervision.inc +76 -0
- data/lib/burn/tools/win/cc65/asminc/tgi-error.inc +48 -0
- data/lib/burn/tools/win/cc65/asminc/tgi-kernel.inc +183 -0
- data/lib/burn/tools/win/cc65/asminc/tgi-mode.inc +48 -0
- data/lib/burn/tools/win/cc65/asminc/time.inc +59 -0
- data/lib/burn/tools/win/cc65/asminc/utsname.inc +46 -0
- data/lib/burn/tools/win/cc65/asminc/vic20.inc +77 -0
- data/lib/burn/tools/win/cc65/asminc/zeropage.inc +22 -0
- 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/util/os.rb +38 -0
- data/lib/burn/util/patternizer.rb +62 -0
- data/lib/burn/util/pxes.rb +180 -0
- data/lib/burn/util/server.rb +21 -0
- data/lib/burn/util.rb +4 -0
- data/lib/burn/version.rb +3 -0
- data/lib/burn/workspace_default/asset/crt0.s +260 -0
- data/lib/burn/workspace_default/asset/famitone.s +1031 -0
- data/lib/burn/workspace_default/asset/mus_instruments.s +50 -0
- data/lib/burn/workspace_default/asset/music.s +3 -0
- data/lib/burn/workspace_default/asset/nes.cfg +83 -0
- data/lib/burn/workspace_default/asset/neslib.h +213 -0
- data/lib/burn/workspace_default/asset/neslib.s +923 -0
- data/lib/burn/workspace_default/asset/runtime.lib +0 -0
- data/lib/burn/workspace_default/asset/sounds.s +143 -0
- data/lib/burn/workspace_default/asset/test.h +22 -0
- data/lib/burn/workspace_default/asset/tileset.chr +0 -0
- data/lib/burn/workspace_default/release/js/emulator.html +42 -0
- data/lib/burn/workspace_default/release/js/js/dynamicaudio-89ba58da476270a9b630.min.js +1 -0
- data/lib/burn/workspace_default/release/js/js/jquery-1.4.2.min.js +154 -0
- data/lib/burn/workspace_default/release/js/js/jsnes-4e7a7260aa.js +7149 -0
- data/lib/burn/workspace_default/release/js/swf/dynamicaudio.swf +0 -0
- data/lib/burn/workspace_default/scripts/compile.bat +30 -0
- data/lib/burn/workspace_default/scripts/compile.sh +30 -0
- data/lib/burn.rb +11 -0
- data/test/helper.rb +8 -0
- data/test/runner.rb +2 -0
- data/test/test_burn.rb +14 -0
- data/test/test_dsl.rb +22 -0
- data/test/test_pxes.rb +48 -0
- metadata +270 -0
@@ -0,0 +1,110 @@
|
|
1
|
+
;
|
2
|
+
; Zeropage and I/O definitions for the CBM 610
|
3
|
+
;
|
4
|
+
; Taken from a kernal disassembly done by myself in 1987.
|
5
|
+
;
|
6
|
+
; Ullrich von Bassewitz, 28.09.1998
|
7
|
+
|
8
|
+
|
9
|
+
; ---------------------------------------------------------------------------
|
10
|
+
; Zeropage stuff
|
11
|
+
|
12
|
+
ExecReg = $00
|
13
|
+
IndReg = $01
|
14
|
+
|
15
|
+
; ---------------------------------------------------------------------------
|
16
|
+
; Screen size
|
17
|
+
|
18
|
+
XSIZE = 80
|
19
|
+
YSIZE = 25
|
20
|
+
|
21
|
+
; ---------------------------------------------------------------------------
|
22
|
+
; I/O definitions
|
23
|
+
|
24
|
+
|
25
|
+
; I/O $d800: CRTC 6545
|
26
|
+
|
27
|
+
.struct CRTC
|
28
|
+
ADDR .byte
|
29
|
+
DATA .byte
|
30
|
+
.endstruct
|
31
|
+
|
32
|
+
; I/O $db00: CIA 6526 Inter Process Communication
|
33
|
+
;
|
34
|
+
; IPCcia = $db00
|
35
|
+
|
36
|
+
.struct CIA
|
37
|
+
PRA .byte
|
38
|
+
PRB .byte
|
39
|
+
DDRA .byte
|
40
|
+
DDRB .byte
|
41
|
+
.union
|
42
|
+
.struct
|
43
|
+
TALO .byte
|
44
|
+
TAHI .byte
|
45
|
+
.endstruct
|
46
|
+
TA .word
|
47
|
+
.endunion
|
48
|
+
.union
|
49
|
+
.struct
|
50
|
+
TBLO .byte
|
51
|
+
TBHI .byte
|
52
|
+
.endstruct
|
53
|
+
TB .word
|
54
|
+
.endunion
|
55
|
+
TOD10 .byte
|
56
|
+
TODSEC .byte
|
57
|
+
TODMIN .byte
|
58
|
+
TODHR .byte
|
59
|
+
SDR .byte
|
60
|
+
ICR .byte
|
61
|
+
CRA .byte
|
62
|
+
CRB .byte
|
63
|
+
.endstruct
|
64
|
+
|
65
|
+
|
66
|
+
; I/O $dc00: CIA 6526
|
67
|
+
;
|
68
|
+
; cia = $dc00
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
; I/O $dd00: ACIA 6551
|
73
|
+
;
|
74
|
+
; acia = $dd00
|
75
|
+
|
76
|
+
.struct ACIA
|
77
|
+
DATA .byte
|
78
|
+
STATUS .byte
|
79
|
+
CMD .byte
|
80
|
+
CTRL .BYTE
|
81
|
+
.endstruct
|
82
|
+
|
83
|
+
|
84
|
+
; I/O $de00: Triport #1 6525
|
85
|
+
;
|
86
|
+
; tpi1 = $de00
|
87
|
+
|
88
|
+
.struct TPI
|
89
|
+
PRA .byte
|
90
|
+
PRB .byte
|
91
|
+
.union
|
92
|
+
PRC .byte
|
93
|
+
INT .byte
|
94
|
+
.endunion
|
95
|
+
DDRA .byte
|
96
|
+
DDRB .byte
|
97
|
+
.union
|
98
|
+
DDRC .byte
|
99
|
+
IMR .byte
|
100
|
+
.endunion
|
101
|
+
CR .byte
|
102
|
+
AIR .byte
|
103
|
+
.endstruct
|
104
|
+
|
105
|
+
|
106
|
+
; I/O $df00: Triport #2 6525
|
107
|
+
|
108
|
+
; tpi2 = $df00
|
109
|
+
|
110
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
;
|
2
|
+
; Definitions for the character type tables
|
3
|
+
;
|
4
|
+
; Ullrich von Bassewitz, 08.09.2001
|
5
|
+
;
|
6
|
+
|
7
|
+
; Make the __ctype table an exported/imported symbol
|
8
|
+
|
9
|
+
.global __ctype
|
10
|
+
|
11
|
+
; Define bitmapped constants for the table entries
|
12
|
+
|
13
|
+
CT_NONE = $00 ; Nothing special
|
14
|
+
CT_LOWER = $01 ; 0 - Lower case char
|
15
|
+
CT_UPPER = $02 ; 1 - Upper case char
|
16
|
+
CT_DIGIT = $04 ; 2 - Numeric digit
|
17
|
+
CT_XDIGIT = $08 ; 3 - Hex digit (both, lower and upper)
|
18
|
+
CT_CTRL = $10 ; 4 - Control character
|
19
|
+
CT_SPACE = $20 ; 5 - The space character itself
|
20
|
+
CT_OTHER_WS = $40 ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
|
21
|
+
CT_SPACE_TAB = $80 ; 7 - Space or tab character
|
22
|
+
|
23
|
+
; Combined stuff
|
24
|
+
CT_ALNUM = (CT_LOWER | CT_UPPER | CT_DIGIT)
|
25
|
+
CT_ALPHA = (CT_LOWER | CT_UPPER)
|
26
|
+
CT_CTRL_SPACE = (CT_CTRL | CT_SPACE)
|
27
|
+
CT_NOT_PUNCT = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)
|
28
|
+
|
29
|
+
|
@@ -0,0 +1,44 @@
|
|
1
|
+
;/*****************************************************************************/
|
2
|
+
;/* */
|
3
|
+
;/* em-error.inc */
|
4
|
+
;/* */
|
5
|
+
;/* EM 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
|
+
EM_ERR_OK = 0 ; No error
|
38
|
+
EM_ERR_NO_DRIVER = 1 ; No driver available
|
39
|
+
EM_ERR_CANNOT_LOAD = 2 ; Error loading driver
|
40
|
+
EM_ERR_INV_DRIVER = 3 ; Invalid driver
|
41
|
+
EM_ERR_NO_DEVICE = 4 ; Device (hardware) not found
|
42
|
+
|
43
|
+
|
44
|
+
|
@@ -0,0 +1,100 @@
|
|
1
|
+
;/*****************************************************************************/
|
2
|
+
;/* */
|
3
|
+
;/* em-kernel.inc */
|
4
|
+
;/* */
|
5
|
+
;/* EM kernel interface */
|
6
|
+
;/* */
|
7
|
+
;/* */
|
8
|
+
;/* */
|
9
|
+
;/* (C) 2002-2003 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 EMD_HDR
|
40
|
+
ID .byte 3 ; Contains 0x65, 0x6d, 0x64 ("emd")
|
41
|
+
VERSION .byte 1 ; Interface version
|
42
|
+
JUMPTAB .struct
|
43
|
+
INSTALL .word ; INSTALL routine
|
44
|
+
UNINSTALL .word ; UNINSTALL routine
|
45
|
+
PAGECOUNT .word ; PAGECOUNT routine
|
46
|
+
MAP .word ; MAP routine
|
47
|
+
USE .word ; USE routine
|
48
|
+
MAPCLEAN .word ; MAPCLEAN routine
|
49
|
+
COPYFROM .word ; COPYFROM routine
|
50
|
+
COPYTO .word ; COPYTO routine
|
51
|
+
.endstruct
|
52
|
+
.endstruct
|
53
|
+
|
54
|
+
;------------------------------------------------------------------------------
|
55
|
+
; The EMD API version, stored in EMD_HDR::VERSION
|
56
|
+
|
57
|
+
EMD_API_VERSION = $00
|
58
|
+
|
59
|
+
;------------------------------------------------------------------------------
|
60
|
+
; The asm equivalent to the C em_copy structure
|
61
|
+
|
62
|
+
.struct EM_COPY
|
63
|
+
BUF .word ; Memory buffer to copy from or to
|
64
|
+
OFFS .byte ; Offset into page
|
65
|
+
PAGE .word ; Starting page to copy from or to
|
66
|
+
COUNT .word ; Number of bytes to copy
|
67
|
+
UNUSED .byte ; Make the size 8 bytes
|
68
|
+
.endstruct
|
69
|
+
|
70
|
+
;------------------------------------------------------------------------------
|
71
|
+
; Variables
|
72
|
+
|
73
|
+
.global _em_drv ; Pointer to driver
|
74
|
+
|
75
|
+
;------------------------------------------------------------------------------
|
76
|
+
; Driver entry points
|
77
|
+
|
78
|
+
.global emd_install
|
79
|
+
.global emd_uninstall
|
80
|
+
.global emd_pagecount
|
81
|
+
.global emd_map
|
82
|
+
.global emd_use
|
83
|
+
.global emd_commit
|
84
|
+
.global emd_copyfrom
|
85
|
+
.global emd_copyto
|
86
|
+
|
87
|
+
;------------------------------------------------------------------------------
|
88
|
+
; ASM functions
|
89
|
+
|
90
|
+
.global _em_unload
|
91
|
+
.global _em_install
|
92
|
+
.global _em_uninstall
|
93
|
+
.global _em_pagecount
|
94
|
+
.global _em_map
|
95
|
+
.global _em_use
|
96
|
+
.global _em_commit
|
97
|
+
.global _em_copyfrom
|
98
|
+
.global _em_copyto
|
99
|
+
|
100
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
;
|
2
|
+
; Ullrich von Bassewitz, 16.05.2000
|
3
|
+
;
|
4
|
+
|
5
|
+
; Variables and functions
|
6
|
+
|
7
|
+
.global __errno, __oserror
|
8
|
+
.global __maperrno, __osmaperrno
|
9
|
+
.global __seterrno
|
10
|
+
.global oserrcheck
|
11
|
+
.global seterrnofromoserror
|
12
|
+
|
13
|
+
; Error codes, must match the values in the C headers
|
14
|
+
.enum
|
15
|
+
EOK ; No error
|
16
|
+
ENOENT ; No such file or directory
|
17
|
+
ENOMEM ; Out of memory
|
18
|
+
EACCES ; Permission denied
|
19
|
+
ENODEV ; No such device
|
20
|
+
EMFILE ; Too many open files
|
21
|
+
EBUSY ; Device or resource busy
|
22
|
+
EINVAL ; Invalid argument
|
23
|
+
ENOSPC ; No space left on device
|
24
|
+
EEXIST ; File exists
|
25
|
+
EAGAIN ; Try again
|
26
|
+
EIO ; I/O error
|
27
|
+
EINTR ; Interrupted system call
|
28
|
+
ENOSYS ; Function not implemented
|
29
|
+
ESPIPE ; Illegal seek
|
30
|
+
ERANGE ; Range error
|
31
|
+
EUNKNOWN ; Unknown OS specific error - must be last!
|
32
|
+
|
33
|
+
EMAX = EUNKNOWN ; Highest error code
|
34
|
+
.endenum
|
35
|
+
|
36
|
+
|
@@ -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,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,85 @@
|
|
1
|
+
;/*****************************************************************************/
|
2
|
+
;/* */
|
3
|
+
;/* joy-kernel.inc */
|
4
|
+
;/* */
|
5
|
+
;/* Internally used joystick functions */
|
6
|
+
;/* */
|
7
|
+
;/* */
|
8
|
+
;/* */
|
9
|
+
;/* (C) 2002-2006, Ullrich von Bassewitz */
|
10
|
+
;/* R�merstra�e 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
|
+
MASKS .byte 8 ; Joystick state mask array
|
46
|
+
JUMPTAB .struct
|
47
|
+
INSTALL .word ; INSTALL routine
|
48
|
+
UNINSTALL .word ; UNINSTALL routine
|
49
|
+
COUNT .word ; COUNT routine
|
50
|
+
READ .word ; READ routine
|
51
|
+
IRQ .word ; IRQ routine
|
52
|
+
.endstruct
|
53
|
+
.endstruct
|
54
|
+
|
55
|
+
;------------------------------------------------------------------------------
|
56
|
+
; The JOY API version, stored in JOY_HDR::VERSION
|
57
|
+
|
58
|
+
JOY_API_VERSION = $01
|
59
|
+
|
60
|
+
;------------------------------------------------------------------------------
|
61
|
+
; Variables
|
62
|
+
|
63
|
+
.global _joy_drv ; Pointer to driver
|
64
|
+
.global _joy_masks
|
65
|
+
|
66
|
+
;------------------------------------------------------------------------------
|
67
|
+
; Driver entry points
|
68
|
+
|
69
|
+
.global joy_install
|
70
|
+
.global joy_uninstall
|
71
|
+
.global joy_count
|
72
|
+
.global joy_read
|
73
|
+
|
74
|
+
;------------------------------------------------------------------------------
|
75
|
+
; C callable functions
|
76
|
+
|
77
|
+
.global _joy_load_driver
|
78
|
+
.global _joy_unload
|
79
|
+
.global _joy_install
|
80
|
+
.global _joy_uninstall
|
81
|
+
.global _joy_count
|
82
|
+
.global _joy_read
|
83
|
+
|
84
|
+
.global _joy_clear_ptr
|
85
|
+
|