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,50 +0,0 @@
|
|
1
|
-
music_instruments:
|
2
|
-
@ins:
|
3
|
-
.word @env_default,@env_default,@env_default
|
4
|
-
.byte $30,$00
|
5
|
-
.word @env_vol0,@env_default,@env_default
|
6
|
-
.byte $30,$00
|
7
|
-
.word @env_vol1,@env_default,@env_default
|
8
|
-
.byte $30,$00
|
9
|
-
.word @env_vol2,@env_default,@env_default
|
10
|
-
.byte $70,$00
|
11
|
-
.word @env_vol3,@env_arp0,@env_default
|
12
|
-
.byte $70,$00
|
13
|
-
.word @env_vol3,@env_default,@env_default
|
14
|
-
.byte $30,$00
|
15
|
-
.word @env_vol4,@env_default,@env_default
|
16
|
-
.byte $30,$00
|
17
|
-
.word @env_vol2,@env_default,@env_pitch1
|
18
|
-
.byte $30,$00
|
19
|
-
.word @env_vol5,@env_default,@env_default
|
20
|
-
.byte $30,$00
|
21
|
-
.word @env_vol2,@env_default,@env_pitch0
|
22
|
-
.byte $30,$00
|
23
|
-
@env_default:
|
24
|
-
.byte $c0,$7f,$00
|
25
|
-
@env_vol0:
|
26
|
-
.byte $cf,$7f,$00
|
27
|
-
@env_vol1:
|
28
|
-
.byte $cf,$c5,$c4,$c3,$c3,$c2,$05,$c1,$09,$c0,$7f,$09
|
29
|
-
@env_vol2:
|
30
|
-
.byte $c6,$c6,$c5,$c4,$c3,$08,$c2,$07,$c1,$0e,$c0,$7f,$0a
|
31
|
-
@env_vol3:
|
32
|
-
.byte $d7,$01,$d0,$01,$c2,$01,$b7,$01,$b1,$01,$af,$01,$a2,$01,$98,$94,$7f,$00
|
33
|
-
@env_vol4:
|
34
|
-
.byte $c8,$c3,$c2,$c1,$04,$c0,$7f,$05
|
35
|
-
@env_vol5:
|
36
|
-
.byte $c5,$c5,$c4,$c4,$c3,$c0,$7f,$05
|
37
|
-
@env_arp0:
|
38
|
-
.byte $b4
|
39
|
-
@env_arp1:
|
40
|
-
.byte $c0,$c0,$c3,$c3,$7f,$00
|
41
|
-
@env_arp2:
|
42
|
-
.byte $c6,$c3,$c0,$7f,$02
|
43
|
-
@env_arp3:
|
44
|
-
.byte $c0,$01,$c4,$01,$c7,$01,$7f,$00
|
45
|
-
@env_arp4:
|
46
|
-
.byte $c6,$c6,$c0,$7f,$02
|
47
|
-
@env_pitch0:
|
48
|
-
.byte $c4,$c0,$c3,$c0,$c2,$c0,$c1,$bb,$b6,$b0,$7f,$00
|
49
|
-
@env_pitch1:
|
50
|
-
.byte $c0,$0a,$c1,$c2,$c3,$c4,$c3,$c2,$c1,$c0,$7f,$02
|
@@ -1,83 +0,0 @@
|
|
1
|
-
MEMORY {
|
2
|
-
# First 28 bytes of the zero page are used by NES library
|
3
|
-
|
4
|
-
ZP: start = $28, size = $d8, type = rw, define = yes;
|
5
|
-
|
6
|
-
# INES Cartridge Header
|
7
|
-
|
8
|
-
HEADER: start = $0, size = $10, file = %O ,fill = yes;
|
9
|
-
|
10
|
-
# 2 16K ROM Banks
|
11
|
-
# - startup
|
12
|
-
# - code
|
13
|
-
# - rodata
|
14
|
-
# - data (load)
|
15
|
-
|
16
|
-
PRG: start = $8000, size = $3f00, file = %O ,fill = yes, define = yes;
|
17
|
-
|
18
|
-
# NROM256
|
19
|
-
# PRG: start = $8000, size = $7f00, file = %O ,fill = yes, define = yes;
|
20
|
-
|
21
|
-
# DPCM Samples at end of the ROM
|
22
|
-
|
23
|
-
DMC: start = $7f00, size = $fa, file = %O, fill = yes;
|
24
|
-
|
25
|
-
# NROM256
|
26
|
-
# DMC: start = $ff00, size = $fa, file = %O, fill = yes;
|
27
|
-
|
28
|
-
# Hardware Vectors at end of the ROM
|
29
|
-
|
30
|
-
VECTORS: start = $7ffa, size = $6, file = %O, fill = yes;
|
31
|
-
|
32
|
-
# NROM256
|
33
|
-
# VECTORS: start = $fffa, size = $6, file = %O, fill = yes;
|
34
|
-
|
35
|
-
# 1 8K CHR Bank
|
36
|
-
|
37
|
-
CHR: start = $0000, size = $2000, file = %O, fill = yes;
|
38
|
-
|
39
|
-
# standard 2K SRAM (-zeropage)
|
40
|
-
# $0100 famitone, palette, cpu stack
|
41
|
-
# $0200 oam buffer
|
42
|
-
# $0300..$800 ca65 stack
|
43
|
-
|
44
|
-
RAM: start = $0300, size = $0500, define = yes;
|
45
|
-
|
46
|
-
# Use this definition instead if you going to use extra 8K RAM
|
47
|
-
# RAM: start = $6000, size = $2000, define = yes;
|
48
|
-
}
|
49
|
-
|
50
|
-
SEGMENTS {
|
51
|
-
HEADER: load = HEADER, type = ro;
|
52
|
-
STARTUP: load = PRG, type = ro, define = yes;
|
53
|
-
LOWCODE: load = PRG, type = ro, optional = yes;
|
54
|
-
INIT: load = PRG, type = ro, define = yes, optional = yes;
|
55
|
-
CODE: load = PRG, type = ro, define = yes;
|
56
|
-
RODATA: load = PRG, type = ro, define = yes;
|
57
|
-
DATA: load = PRG, run = RAM, type = rw, define = yes;
|
58
|
-
VECTORS: load = VECTORS, type = rw;
|
59
|
-
SAMPLES: load = DMC, type = rw;
|
60
|
-
CHARS: load = CHR, type = rw;
|
61
|
-
BSS: load = RAM, type = bss, define = yes;
|
62
|
-
HEAP: load = RAM, type = bss, optional = yes;
|
63
|
-
ZEROPAGE: load = ZP, type = zp;
|
64
|
-
}
|
65
|
-
|
66
|
-
FEATURES {
|
67
|
-
CONDES: segment = INIT,
|
68
|
-
type = constructor,
|
69
|
-
label = __CONSTRUCTOR_TABLE__,
|
70
|
-
count = __CONSTRUCTOR_COUNT__;
|
71
|
-
CONDES: segment = RODATA,
|
72
|
-
type = destructor,
|
73
|
-
label = __DESTRUCTOR_TABLE__,
|
74
|
-
count = __DESTRUCTOR_COUNT__;
|
75
|
-
CONDES: type = interruptor,
|
76
|
-
segment = RODATA,
|
77
|
-
label = __INTERRUPTOR_TABLE__,
|
78
|
-
count = __INTERRUPTOR_COUNT__;
|
79
|
-
}
|
80
|
-
|
81
|
-
SYMBOLS {
|
82
|
-
__STACKSIZE__ = $0500; # 5 pages stack
|
83
|
-
}
|
@@ -1,213 +0,0 @@
|
|
1
|
-
//set bg and spr palettes, data is 32 bytes array
|
2
|
-
|
3
|
-
void __fastcall__ pal_all(const char *data);
|
4
|
-
|
5
|
-
//set bg palette only, data is 16 bytes array
|
6
|
-
|
7
|
-
void __fastcall__ pal_bg(const char *data);
|
8
|
-
|
9
|
-
//set spr palette only, data is 16 bytes array
|
10
|
-
|
11
|
-
void __fastcall__ pal_spr(const char *data);
|
12
|
-
|
13
|
-
//set a palette entry, index is 0..31
|
14
|
-
|
15
|
-
void __fastcall__ pal_col(unsigned char index,unsigned char color);
|
16
|
-
|
17
|
-
//reset palette to $0f
|
18
|
-
|
19
|
-
void __fastcall__ pal_clear(void);
|
20
|
-
|
21
|
-
//set virtual bright, 0 is black, 4 is normal, 8 is white
|
22
|
-
|
23
|
-
void __fastcall__ pal_bright(unsigned char bright);
|
24
|
-
|
25
|
-
|
26
|
-
//turn off rendering and nmi
|
27
|
-
|
28
|
-
void __fastcall__ ppu_off(void);
|
29
|
-
|
30
|
-
//turn on bg, spr, and nmi
|
31
|
-
|
32
|
-
void __fastcall__ ppu_on_all(void);
|
33
|
-
|
34
|
-
//turn on bg only and nmi
|
35
|
-
|
36
|
-
void __fastcall__ ppu_on_bg(void);
|
37
|
-
|
38
|
-
//turn on spr only and nmi
|
39
|
-
|
40
|
-
void __fastcall__ ppu_on_spr(void);
|
41
|
-
|
42
|
-
//set PPU_MASK directly
|
43
|
-
|
44
|
-
;void __fastcall__ ppu_mask(unsigned char mask);
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
//clear OAM buffer, all the sprites are hidden
|
49
|
-
|
50
|
-
void __fastcall__ oam_clear(void);
|
51
|
-
|
52
|
-
//set sprite in OAM buffer, chrnum is tile, attr is attribute, sprid is offset in OAM in bytes
|
53
|
-
//returns sprid+4, which is offset for a next sprite
|
54
|
-
|
55
|
-
unsigned char __fastcall__ oam_spr(unsigned char x,unsigned char y,unsigned char chrnum,unsigned char attr,unsigned char sprid);
|
56
|
-
|
57
|
-
//set metasprite in OAM buffer
|
58
|
-
//meta sprite is a const unsigned char array, it contains four bytes per sprite
|
59
|
-
//in order x offset, y offset, tile, attribute
|
60
|
-
//x=128 is end of a meta sprite
|
61
|
-
//returns sprid+4, which is offset for a next sprite
|
62
|
-
|
63
|
-
unsigned char __fastcall__ oam_meta_spr(unsigned char x,unsigned char y,unsigned char sprid,const unsigned char *data);
|
64
|
-
|
65
|
-
//hide all the sprites starting from given offset
|
66
|
-
|
67
|
-
void __fastcall__ oam_hide_rest(unsigned char sprid);
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
//wait NMI and sync to 50hz (with frameskip for NTSC)
|
72
|
-
|
73
|
-
void __fastcall__ ppu_waitnmi(void);
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
//play a music in FamiTone format
|
78
|
-
|
79
|
-
void __fastcall__ music_play(const unsigned char *data);
|
80
|
-
|
81
|
-
//stop music
|
82
|
-
|
83
|
-
void __fastcall__ music_stop(void);
|
84
|
-
|
85
|
-
//pause and unpause music
|
86
|
-
|
87
|
-
void __fastcall__ music_pause(unsigned char pause);
|
88
|
-
|
89
|
-
//play FamiTone sound effect on channel 0..3
|
90
|
-
|
91
|
-
void __fastcall__ sfx_play(unsigned char sound,unsigned char channel);
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
//poll controller and return flags like PAD_LEFT etc, input is pad number (0 or 1)
|
96
|
-
|
97
|
-
unsigned char __fastcall__ pad_poll(unsigned char pad);
|
98
|
-
|
99
|
-
//poll controller in trigger mode, a flag is set only on button down, not hold
|
100
|
-
//if you need to poll the pad in both normal and trigger mode, poll it in the
|
101
|
-
//trigger mode for first, then use pad_state
|
102
|
-
|
103
|
-
unsigned char __fastcall__ pad_trigger(unsigned char pad);
|
104
|
-
|
105
|
-
//get previous pad state without polling ports
|
106
|
-
|
107
|
-
unsigned char __fastcall__ pad_state(unsigned char pad);
|
108
|
-
|
109
|
-
|
110
|
-
//set scroll, including top bits
|
111
|
-
|
112
|
-
void __fastcall__ scroll(unsigned int x,unsigned int y);
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
//select current chr bank for sprites, 0..1
|
117
|
-
|
118
|
-
void __fastcall__ bank_spr(unsigned char n);
|
119
|
-
|
120
|
-
//select current chr bank for background, 0..1
|
121
|
-
|
122
|
-
void __fastcall__ bank_bg(unsigned char n);
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
//returns random number 0..255 or 0..65535
|
127
|
-
|
128
|
-
unsigned char __fastcall__ rand8(void);
|
129
|
-
unsigned int __fastcall__ rand16(void);
|
130
|
-
|
131
|
-
//set random seed
|
132
|
-
|
133
|
-
void __fastcall__ set_rand(unsigned int seed);
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
//set a pointer to update buffer, contents of the buffer is transferred to vram every frame
|
138
|
-
//buffer structure is MSB, LSB, byte to write, len is number of entries (not bytes)
|
139
|
-
//could be set during rendering, but only takes effect on a new frame
|
140
|
-
//number of transferred bytes is limited by vblank time
|
141
|
-
|
142
|
-
void __fastcall__ set_vram_update(unsigned char len,unsigned char *buf);
|
143
|
-
|
144
|
-
//set vram pointer to write operations if you need to write some data to vram
|
145
|
-
//works only when rendering is turned off
|
146
|
-
|
147
|
-
void __fastcall__ vram_adr(unsigned int adr);
|
148
|
-
|
149
|
-
//put a byte at current vram address, works only when rendering is turned off
|
150
|
-
|
151
|
-
void __fastcall__ vram_put(unsigned char n);
|
152
|
-
|
153
|
-
//fill a block with a byte at current vram address, works only when rendering is turned off
|
154
|
-
|
155
|
-
void __fastcall__ vram_fill(unsigned char n,unsigned int len);
|
156
|
-
|
157
|
-
//set vram autoincrement, 0 for +1 and not 0 for +32
|
158
|
-
|
159
|
-
void __fastcall__ vram_inc(unsigned char n);
|
160
|
-
|
161
|
-
//read a block from vram, works only when rendering is turned off
|
162
|
-
|
163
|
-
void __fastcall__ vram_read(unsigned char *dst,unsigned int adr,unsigned int size);
|
164
|
-
|
165
|
-
//write a block to vram, works only when rendering is turned off
|
166
|
-
|
167
|
-
void __fastcall__ vram_write(unsigned char *src,unsigned int adr,unsigned int size);
|
168
|
-
|
169
|
-
|
170
|
-
//unpack a nametable into vram
|
171
|
-
|
172
|
-
void __fastcall__ unrle_vram(const unsigned char *data,unsigned int vram);
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
//like a normal memcpy, but does not return anything
|
177
|
-
|
178
|
-
void __fastcall__ memcpy(void *dst,void *src,unsigned int len);
|
179
|
-
|
180
|
-
//like memset, but does not return anything
|
181
|
-
|
182
|
-
void __fastcall__ memfill(void *dst,unsigned char value,unsigned int len);
|
183
|
-
|
184
|
-
//delay for N frames
|
185
|
-
|
186
|
-
void __fastcall__ delay(unsigned char frames);
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
#define PAD_A 0x01
|
191
|
-
#define PAD_B 0x02
|
192
|
-
#define PAD_SELECT 0x04
|
193
|
-
#define PAD_START 0x08
|
194
|
-
#define PAD_UP 0x10
|
195
|
-
#define PAD_DOWN 0x20
|
196
|
-
#define PAD_LEFT 0x40
|
197
|
-
#define PAD_RIGHT 0x80
|
198
|
-
|
199
|
-
#define OAM_FLIP_V 0x80
|
200
|
-
#define OAM_FLIP_H 0x40
|
201
|
-
#define OAM_BEHIND 0x20
|
202
|
-
|
203
|
-
#define MAX(x1,x2) (x1<x2?x2:x1)
|
204
|
-
#define MIN(x1,x2) (x1<x2?x1:x2)
|
205
|
-
|
206
|
-
#define MASK_SPR 0x10
|
207
|
-
#define MASK_BG 0x08
|
208
|
-
#define MASK_EDGE_SPR 0x04
|
209
|
-
#define MASK_EDGE_BG 0x02
|
210
|
-
|
211
|
-
#define NULL 0
|
212
|
-
#define TRUE 1
|
213
|
-
#define FALSE 0
|