Skip to content

Commit 84b4d02

Browse files
committed
version 1.26
1 parent 423bd42 commit 84b4d02

File tree

143 files changed

+3168
-627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+3168
-627
lines changed

bin/nsc.exe

0 Bytes
Binary file not shown.

bin/nsd.bin

4 Bytes
Binary file not shown.

bin/nsd_all.bin

0 Bytes
Binary file not shown.

bin/nsd_all2.bin

0 Bytes
Binary file not shown.

bin/nsd_fds.bin

4 Bytes
Binary file not shown.

bin/nsd_hfe4.bin

0 Bytes
Binary file not shown.

bin/nsd_hfx4.bin

0 Bytes
Binary file not shown.

bin/nsd_mmc5.bin

4 Bytes
Binary file not shown.

bin/nsd_n163.bin

4 Bytes
Binary file not shown.

bin/nsd_oall.bin

0 Bytes
Binary file not shown.

bin/nsd_opll.bin

4 Bytes
Binary file not shown.

bin/nsd_s5b.bin

4 Bytes
Binary file not shown.

bin/nsd_vrc6.bin

4 Bytes
Binary file not shown.

bin/nsd_vrc7.bin

4 Bytes
Binary file not shown.

doc/nsdl.chm

3.13 KB
Binary file not shown.

include/macro.inc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1+
;=======================================================================
2+
;
3+
; NES Sound Driver & library (NSD.lib) Macros
4+
;
5+
;-----------------------------------------------------------------------
6+
;
7+
; Copyright (c) 2012 A.Watanabe (S.W.), All rights reserved.
8+
; For conditions of distribution and use, see copyright notice
9+
; in "nsd.h" or "nsd.inc".
10+
;
11+
;=======================================================================
112

213
.ifndef __MACRO_DEF__
314

415
.define __MACRO_DEF__ 1
516

6-
;=======================================================================
7-
; Macros
8-
;-----------------------------------------------------------------------
9-
1017
.MACPACK generic
1118
.MACPACK longbranch
1219

13-
1420
;---------------------------------------
1521
; ax <= arg(mem16/imm16)
1622
;---------------------------------------

include/makefile.mk

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#==============================================================================
2-
# NES Sound Driver Libraly
2+
# NES Sound Driver & library (NSD.lib)
33
# Make file
4-
#; A.Waranabe
4+
#------------------------------------------------------------------------------
5+
#
6+
# Copyright (c) 2012 A.Watanabe (S.W.), All rights reserved.
7+
# For conditions of distribution and use, see copyright notice
8+
# in "nsd.h" or "nsd.inc".
9+
#
510
#==============================================================================
611

712
########################################

include/nsd.BAK

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
/***************************************************************************
2+
3+
NES Sound Driver & Library (NSD.lib)
4+
5+
****************************************************************************
6+
7+
Copyright (c) 2012 A.Watanabe (S.W.)
8+
All rights reserved.
9+
10+
Redistribution and use in source and binary forms, with or without
11+
modification, are permitted provided that the following conditions
12+
are met:
13+
14+
1. Redistributions of source code must retain the above copyright
15+
notice, this list of conditions and the following disclaimer.
16+
17+
2. Redistributions in binary form must reproduce the above copyright
18+
notice, this list of conditions and the following disclaimer in the
19+
documentation and/or other materials provided with the distribution.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32+
33+
***************************************************************************/
34+
35+
#ifndef _NSD_H_
36+
#define _NSD_H_
37+
38+
/****************************************************************/
39+
/* Struct of ��PCM */
40+
/****************************************************************/
41+
typedef struct{
42+
char Control; /* I/O 0x4010 */
43+
char DA; /* I/O 0x4011 */
44+
char Address; /* I/O 0x4012 */
45+
char Size; /* I/O 0x4013 */
46+
} nsd_dpcm;
47+
48+
49+
50+
/****************************************************************/
51+
/* Function of Library */
52+
/****************************************************************/
53+
/*----------------------------------------------
54+
Summary : main routine of this sound driver
55+
Arguments : None
56+
Return : None
57+
Useage : Call by 60[Hz]. e.g. V-Blank
58+
----------------------------------------------*/
59+
void __fastcall__ nsd_main(void);
60+
void __fastcall__ nsd_main_bgm(void);
61+
void __fastcall__ nsd_main_se(void);
62+
63+
64+
/*----------------------------------------------
65+
Summary : Initraize this sound driver.
66+
Arguments : None
67+
Return : None
68+
Useage : Call when start up.
69+
----------------------------------------------*/
70+
void __fastcall__ nsd_init(void);
71+
72+
73+
/*----------------------------------------------
74+
Summary : Set the Delta PCM information.
75+
Arguments : Pointer of the Delta PCM information.
76+
Return : None
77+
----------------------------------------------*/
78+
void __fastcall__ nsd_set_dpcm(nsd_dpcm* dpcm);
79+
80+
81+
/*----------------------------------------------
82+
Summary : Play the BGM
83+
Arguments : Pointer of the BGM data.
84+
Return : None
85+
----------------------------------------------*/
86+
void __fastcall__ nsd_play_bgm(void* ptr);
87+
88+
89+
/*----------------------------------------------
90+
Summary : Stop the BGM
91+
Arguments : None
92+
Return : None
93+
----------------------------------------------*/
94+
void __fastcall__ nsd_stop_bgm(void);
95+
96+
97+
/*----------------------------------------------
98+
Summary : Pause the BGM
99+
Arguments : None
100+
Return : None
101+
----------------------------------------------*/
102+
void __fastcall__ nsd_pause_bgm(void);
103+
104+
105+
/*----------------------------------------------
106+
Summary : Resume the BGM
107+
Arguments : None
108+
Return : None
109+
----------------------------------------------*/
110+
void __fastcall__ nsd_resume_bgm(void);
111+
112+
113+
/*----------------------------------------------
114+
Summary : Pause ans Save
115+
Arguments : None
116+
Return : None
117+
----------------------------------------------*/
118+
void __fastcall__ nsd_save(void* buff);
119+
120+
121+
/*----------------------------------------------
122+
Summary : Pause ans Load
123+
Arguments : None
124+
Return : None
125+
----------------------------------------------*/
126+
void __fastcall__ nsd_load(void* buff);
127+
128+
129+
/*----------------------------------------------
130+
Summary : Play the SE
131+
Arguments : Pointer of the SE data.
132+
Return : None
133+
----------------------------------------------*/
134+
void __fastcall__ nsd_play_se(void* ptr);
135+
136+
137+
/*----------------------------------------------
138+
Summary : Stop the SE
139+
Arguments : None
140+
Return : None
141+
----------------------------------------------*/
142+
void __fastcall__ nsd_stop_se(void);
143+
144+
145+
146+
/****************************************************************/
147+
148+
#endif _NSD_H_

include/nsd.h

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,52 @@
1-
/************************************************************************/
2-
/* */
3-
/* NES Sound Driver & Library */
4-
/* define file */
5-
/* for C Language (cc65) */
6-
/* */
7-
/* Programmed by */
8-
/* A.Watanabe */
9-
/* */
10-
/************************************************************************/
1+
/***************************************************************************
2+
3+
NES Sound Driver & Library (NSD.lib)
4+
5+
****************************************************************************
6+
7+
Copyright (c) 2012 A.Watanabe (S.W.)
8+
All rights reserved.
9+
10+
Redistribution and use in source and binary forms, with or without
11+
modification, are permitted provided that the following conditions
12+
are met:
13+
14+
1. Redistributions of source code must retain the above copyright
15+
notice, this list of conditions and the following disclaimer.
16+
17+
2. Redistributions in binary form must reproduce the above copyright
18+
notice, this list of conditions and the following disclaimer in the
19+
documentation and/or other materials provided with the distribution.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
25+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32+
33+
***************************************************************************/
1134

1235
#ifndef _NSD_H_
1336
#define _NSD_H_
1437

38+
/****************************************************************/
39+
/* Struct of ‡™PCM */
40+
/****************************************************************/
41+
typedef struct{
42+
char Control; /* I/O 0x4010 */
43+
char DA; /* I/O 0x4011 */
44+
char Address; /* I/O 0x4012 */
45+
char Size; /* I/O 0x4013 */
46+
} nsd_dpcm;
47+
48+
49+
1550
/****************************************************************/
1651
/* Function of Library */
1752
/****************************************************************/
@@ -40,7 +75,7 @@ void __fastcall__ nsd_init(void);
4075
Arguments : Pointer of the Delta PCM information.
4176
Return : None
4277
----------------------------------------------*/
43-
void __fastcall__ nsd_set_dpcm(void* dpcm);
78+
void __fastcall__ nsd_set_dpcm(const nsd_dpcm* dpcm);
4479

4580

4681
/*----------------------------------------------
@@ -108,21 +143,6 @@ void __fastcall__ nsd_stop_se(void);
108143

109144

110145

111-
112-
113146
/****************************************************************/
114-
/* Struct of ‡™PCM */
115-
/****************************************************************/
116-
typedef struct{
117-
char Control; /* I/O 0x4010 */
118-
char DA; /* I/O 0x4011 */
119-
char Address; /* I/O 0x4012 */
120-
char Size; /* I/O 0x4013 */
121-
} nsd_dpcm;
122-
123147

124-
125-
126-
127-
/****************************************************************/
128148
#endif _NSD_H_

include/nsd.inc

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,36 @@
1-
;=======================================================================|
2-
; |
3-
; NES Sound Driver & library |
4-
; define file |
5-
; for Assemble Language (ca65) |
6-
; |
7-
; Programmed by |
8-
; A.Watanabe |
9-
; |
10-
;=======================================================================|
1+
;===============================================================================|
2+
; |
3+
; NES Sound Driver & library (NSD.lib) |
4+
; |
5+
;-------------------------------------------------------------------------------|
6+
; |
7+
; Copyright (c) 2012 A.Watanabe (S.W.) |
8+
; All rights reserved. |
9+
; |
10+
; Redistribution and use in source and binary forms, with or without |
11+
; modification, are permitted provided that the following conditions |
12+
; are met: |
13+
; |
14+
; 1. Redistributions of source code must retain the above copyright |
15+
; notice, this list of conditions and the following disclaimer. |
16+
; |
17+
; 2. Redistributions in binary form must reproduce the above copyright |
18+
; notice, this list of conditions and the following disclaimer in the |
19+
; documentation and/or other materials provided with the distribution. |
20+
; |
21+
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
22+
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
23+
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
24+
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER |
25+
; OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
26+
; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
27+
; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
28+
; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
29+
; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
30+
; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
31+
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32+
; |
33+
;===============================================================================|
1134

1235
.include "nsddef.inc"
1336

include/nsddef.inc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
;=======================================================================
22
;
3-
; NES Sound Driver Libraly Define file
3+
; NES Sound Driver & library (NSD.lib) Define file
44
;
55
;-----------------------------------------------------------------------
66
;
7-
; 《メモ》 !!注意!!
8-
;
9-
; 変えた場合は、 include フォルダの nes.inc にも適用する事!!
7+
; Copyright (c) 2012 A.Watanabe (S.W.), All rights reserved.
8+
; For conditions of distribution and use, see copyright notice
9+
; in "nsd.h" or "nsd.inc".
1010
;
1111
;=======================================================================
1212

13+
14+
1315
;****************************************************************
1416
;* Sound I/O Device address defines *
1517
;****************************************************************
@@ -278,7 +280,7 @@ PSG_Envelope_Form = $0D
278280
.scope nsd_flag
279281
BGM = $01
280282
SE = $02
281-
Jump = $04
283+
Jump = $10
282284
Priority = $0C
283285
Disable = $80
284286
.endscope

lib/NSD.lib

101 Bytes
Binary file not shown.

lib/NSD_ALL.lib

41 Bytes
Binary file not shown.

lib/NSD_ALL2.lib

49 Bytes
Binary file not shown.

lib/NSD_FDS.lib

102 Bytes
Binary file not shown.

lib/NSD_HFE4.lib

41 Bytes
Binary file not shown.

lib/NSD_HFX4.lib

-42 Bytes
Binary file not shown.

lib/NSD_MMC5.lib

90 Bytes
Binary file not shown.

lib/NSD_N163.lib

59 Bytes
Binary file not shown.

lib/NSD_OALL.lib

-9 Bytes
Binary file not shown.

lib/NSD_OPLL.lib

45 Bytes
Binary file not shown.

lib/NSD_VRC6.lib

111 Bytes
Binary file not shown.

lib/NSD_VRC7.lib

83 Bytes
Binary file not shown.

lib/NSD_s5b.lib

92 Bytes
Binary file not shown.

sample/ca65/_build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
path %path%;..\..\bin
12
del buildlog.txt
23
del errlog.txt
34
del comlog.txt

sample/ca65/_re-build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
path %path%;..\..\bin
12
del buildlog.txt
23
del errlog.txt
34
del comlog.txt

sample/ca65/test.nes

0 Bytes
Binary file not shown.

sample/cc65/_build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
path %path%;..\..\bin
12
del buildlog.txt
23
del errlog.txt
34
del comlog.txt

sample/cc65/_re-build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
path %path%;..\..\bin
12
del buildlog.txt
23
del errlog.txt
34
del comlog.txt

sample/cc65/buildlog.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
I:\NES\NSDL\sample\cc65\comlog.txt �����‚���܂���ł����B
2+
I:\NES\NSDL\sample\cc65\errlog.txt �����‚���܂���ł����B
3+
I:\NES\NSDL\sample\cc65\buildlog.txt
4+
�v���Z�X�̓t�@�C���ɃA�N�Z�X�ł��܂���B�ʂ̃v���Z�X���g�p���ł��B
5+
cl65 -t none -I..\..\include\\ -c -o test.o test.c 1>>comlog.txt 2>>errlog.txt
6+
nsc -a -e testmus.mml 1>>comlog.txt 2>>errlog.txt
7+
ca65 -t none -I..\..\include\\ --listing testmus.lst --list-bytes 255 testmus.s 1>>comlog.txt 2>>errlog.txt
8+
del testmus.s 1>>comlog.txt 2>>errlog.txt
9+
ld65 -C nesc.cfg -L..\..\lib\\ -v -m test.map -vm -o test.nes test.o testmus.o ..\..\lib\\nsd.lib nes.lib 1>>comlog.txt 2>>errlog.txt

0 commit comments

Comments
 (0)