Skip to content

Commit

Permalink
version 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaw02 committed Dec 31, 2014
1 parent e75f0fd commit cfb97e8
Show file tree
Hide file tree
Showing 38 changed files with 59 additions and 20 deletions.
Binary file modified bin/nsc.exe
Binary file not shown.
Binary file modified bin/nsd.bin
Binary file not shown.
Binary file modified bin/nsd_all.bin
Binary file not shown.
Binary file modified bin/nsd_all2.bin
Binary file not shown.
Binary file modified bin/nsd_fds.bin
Binary file not shown.
Binary file modified bin/nsd_hfe4.bin
Binary file not shown.
Binary file modified bin/nsd_hfx4.bin
Binary file not shown.
Binary file modified bin/nsd_mmc5.bin
Binary file not shown.
Binary file modified bin/nsd_n163.bin
Binary file not shown.
Binary file modified bin/nsd_oall.bin
Binary file not shown.
Binary file modified bin/nsd_opll.bin
Binary file not shown.
Binary file modified bin/nsd_s5b.bin
Binary file not shown.
Binary file modified bin/nsd_vrc6.bin
Binary file not shown.
Binary file modified bin/nsd_vrc7.bin
Binary file not shown.
Binary file modified doc/nsdl.chm
Binary file not shown.
4 changes: 2 additions & 2 deletions doc/readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+-----------------------------------------------------------------------------
| �^�C�g�� | NES Sound Driver Library
|�t�@�C����| NSDL122.ZIP
|�t�@�C����| NSDL123.ZIP
| �J�e�S�� | Sound Driver for NES
| ����@�� | NES (Nintendo Entertainment System)
|�O��\�t�g| cc65 (Complete cross development package for 65(C)02 systems.)
Expand Down Expand Up @@ -28,4 +28,4 @@ This is developed as object library, and user application can control it.
�Emixi http://mixi.jp/show_profile.pl?id=16558
========================================================================

����̃t�@�C���́yNSDL122.ZIP�z�ł��B
����̃t�@�C���́yNSDL123.ZIP�z�ł��B
Binary file modified lib/NSD.lib
Binary file not shown.
Binary file modified lib/NSD_ALL.lib
Binary file not shown.
Binary file modified lib/NSD_ALL2.lib
Binary file not shown.
Binary file modified lib/NSD_FDS.lib
Binary file not shown.
Binary file modified lib/NSD_HFE4.lib
Binary file not shown.
Binary file modified lib/NSD_HFX4.lib
Binary file not shown.
Binary file modified lib/NSD_MMC5.lib
Binary file not shown.
Binary file modified lib/NSD_N163.lib
Binary file not shown.
Binary file modified lib/NSD_OALL.lib
Binary file not shown.
Binary file modified lib/NSD_OPLL.lib
Binary file not shown.
Binary file modified lib/NSD_VRC6.lib
Binary file not shown.
Binary file modified lib/NSD_VRC7.lib
Binary file not shown.
Binary file modified lib/NSD_s5b.lib
Binary file not shown.
24 changes: 13 additions & 11 deletions src/help/mml.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,21 @@
何度でも指定可能であり、各シーケンス記述ブロック毎に設定することもできます。<br>
音符、休符において、この数値<var>n</var>の4倍の値を割り切ることが可能なm分音符を使用することができます。<br>
それ以外のm分音符を使用した場合、割り切れない旨のWarning(警告)となり、小数点を切り捨ててコンパイルします。</td></tr>
<tr><td>#QMax <var>n</var> </td><td>8</td><td>シーケンス記述ブロック内における<a href="mml_gate.html">Q コマンド</a>の分母を設定します。<br>
Qコマンド使用時、実際の発音音長は、音長 × <a href="mml_gate.html">Q コマンド</a>の値 ÷ <var>n</var> となります。</td></tr>
<tr><td>#QReverse </td><td>-</td><td>本コマンドを記述することで、シーケンス記述ブロック内におけるゲートクオンタイズコマンド
`<a href="mml_gate.html">Q</a>'と`<a href="mml_gate.html">q</a>'を入れ替えます。</td></tr>
<tr><td>#octaveReverse </td><td>-</td><td>本コマンドを記述することで、シーケンス記述ブロック内における相対オクターブコマンド
`<a href="mml_relative_octave.html">&lt;</a>'と`<a href="mml_relative_octave.html">&gt;</a>'を入れ替えます。</td></tr>
<tr><td>#RepeatMode <var>n</var> </td><td>0</td><td>シーケンス記述ブロック内における<a href="mml_repeatA.html">リピート(A)コマンド</a>のコンパイル方法を設定します。<br>
 0 … MMLコンパイラが自動的に、リピートコマンドのコンパイル方法を選択します。<br>
 1 … ユーザーにて明示的に、リピートコマンドのコンパイル方法を選択します。<br>
 2 … ユーザーにて明示的に、リピートコマンドのコンパイル方法を選択します。<br>
数値の詳細は、<a href="mml_repeatA.html">リピート(A)コマンド</a>を参照。</td></tr>
<tr><td>#TieMode <var>n</var> </td><td>0</td><td>シーケンス記述ブロック内における<b> ^ </b>コマンドのコンパイル方法を設定します。<br>
 0 … <b> ^ </b>コマンドは、すべての場合において<a href="mml_tie.html">「タイ」</a>としてコンパイルします。<br>
 1 … 音符の直後に^コマンドが記述された場合は、直前の音符に対する音長を加算する演算子として処理します。<br>
    (※加算結果が255[tick]を超えるとエラーになります。)</td></tr>
<tr><td>#rest <var>n</var> </td><td>2</td><td>シーケンス記述ブロック内における<a href="mml_rest.html">r コマンド</a>による休符のコンパイル方法を設定します。<br>
 0 … 強制的に、音量を0にします。⊿PCMの場合はKeyOffします。<br>
 1 … 直前のノートを、<a href="mml_release.html">R@, Rvコマンド</a>の値で鳴らします。<br>
Expand All @@ -64,17 +77,6 @@
 1 … 直前のノートを、<a href="mml_release.html">R@, Rvコマンド</a>の値で鳴らします。<br>
 2 … 直前のノートのエンベロープ(音色・音量)を継続し、リリースパターンが定義されている場合それに従います。<br>
 3 … <a href="mml_release.html">Rmコマンド</a>に従います。<br></td></tr>
<tr><td>#QMax <var>n</var> </td><td>8</td><td>シーケンス記述ブロック内における<a href="mml_gate.html">Q コマンド</a>の分母を設定します。<br>
Qコマンド使用時、実際の発音音長は、音長 × <a href="mml_gate.html">Q コマンド</a>の値 ÷ <var>n</var> となります。</td></tr>
<tr><td>#RepeatMode <var>n</var> </td><td>0</td><td>シーケンス記述ブロック内における<a href="mml_repeatA.html">リピート(A)コマンド</a>のコンパイル方法を設定します。<br>
 0 … MMLコンパイラが自動的に、リピートコマンドのコンパイル方法を選択します。<br>
 1 … ユーザーにて明示的に、リピートコマンドのコンパイル方法を選択します。<br>
 2 … ユーザーにて明示的に、リピートコマンドのコンパイル方法を選択します。<br>
数値の詳細は、<a href="mml_repeatA.html">リピート(A)コマンド</a>を参照。</td></tr>
<tr><td>#TieMode <var>n</var> </td><td>0</td><td>シーケンス記述ブロック内における<b> ^ </b>コマンドのコンパイル方法を設定します。<br>
 0 … <b> ^ </b>コマンドは、すべての場合において<a href="mml_tie.html">「タイ」</a>としてコンパイルします。<br>
 1 … 音符の直後に^コマンドが記述された場合は、直前の音符に対する音長を加算する演算子として処理します。<br>
    (※加算結果が255[tick]を超えるとエラーになります。)</td></tr>
<tr><td>#ReleaseVolume <var>n</var> </td><td>2</td><td>シーケンス記述ブロック内における<a href="mml_release.html">Rvコマンド</a>の初期値を設定します。<br>
nは0~15の範囲で指定します。<br>
※音源ドライバ側のデフォルトは2であるため、2以外を指定した場合は各トラックの先頭に自動でRvコマンドを出力します。</td></tr>
Expand Down
6 changes: 6 additions & 0 deletions src/help/mml_dpcm.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ <h4>next</h4>
若しくは、#Bankコマンドを記述しバンクに対応したbin(nsd_all.bin, nsd_all2.bin)を使用して下さい。<br>
</p>

<p>
⊿PCMにてIRQを使用している場合、<code>&amp;</code>(スラー)ではなく、<a href="mml_tie.html"><code>^</code>(タイ)</a>を使ってください。<br>
<code>&amp;</code>(スラー)を利用して音を繋げた場合、繋げた先のノートナンバーに⊿PCMの発音中ポインタが設定され、
次のIRQではそのノートナンバーの次に示される⊿PCMが再生されます。<br>
</p>

<p>
また、多くのNSFプレイヤーは、IRQに対応しておりません。<br>
以下、2014年 1月 3日時点での対応状況です。<br>
Expand Down
Binary file modified src/help/nsdl.chm
Binary file not shown.
3 changes: 2 additions & 1 deletion src/help/revision.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
・N16x音源にて、サンプル長が不定だったのを、32[sample](s56)で初期化するようにした。<br>
・VRC7音源に対して、音量、音色、周波数のレジスタアクセスを最短(データシートのギリギリ)で行うように最適化した。<br>
・VRC7音源にて、 @ コマンドと、E@コマンド(レジスタに対するエンベロープ)を同じTickに置いた場合、 @ コマンドによる音色変更ができなかったバグをFix。<br>
・VRC7音源にて、ハードウェアをKeyOffしないまま、ソフトウェアエンベロープだけKeyOffする機能を実装した(sコマンドで行います)。<br>
・三角波のリニアカウンタ($4008)の制御に対応(sコマンドで行います)。<br>
・音程について、n16x以外は12.5[cent]単位の制御だったが、n16xと同じく6.25[cent]単位に変更。音程の精度を倍にしました。<br>
 (※但し、n16x以外の音程テーブルそのものは12.5[cent]毎のテーブルであり、線形補完により算出します。)<br>
Expand All @@ -58,7 +59,7 @@
●取扱説明書<br>
・各コマンドについて、デフォルトの値、疑似コマンドか否かを分かり易くした。<br>
・最適化のためのヒントを更新した。<br>
<td>2014年 9月__日</td></tr>
<td>2014年12月31日</td></tr>
<tr><td>1.22</td>
<td>●MMLコンパイラ<br>
・#TieModeコマンドを追加。^記述時の挙動を設定できます。<br>
Expand Down
32 changes: 31 additions & 1 deletion src/nsc/FileInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void FileInput::fileopen(const char* _strFileName){
//--------------------------------
void FileInput::fileopen(const char* _strFileName,SearchPass* _pass)
{
bool success = false;
bool success = false;

//先ずは、そのまま
errno = 0; //グローバル変数 errno を0に初期化
Expand All @@ -62,6 +62,7 @@ void FileInput::fileopen(const char* _strFileName,SearchPass* _pass)
if(cOptionSW->flag_SearchPass){
perror(_strFileName);
}

if(good()==true){
success = true;
} else {
Expand All @@ -70,10 +71,22 @@ void FileInput::fileopen(const char* _strFileName,SearchPass* _pass)
int i = 0;
int iSize = _pass->count();
string name;
string workName= string(_strFileName);
int loc = workName.rfind('/');

//指定のファイルにパスが書かれていたら、消す。
if(loc != string::npos){
workName.erase(0, loc); //ファイル名のみ
}

while(i < iSize){

#ifdef _WIN32
//Windowsの場合は、相対パスも含めて検索する(UNIX系は不可)
//指定の検索パスを基準とした相対パスも検索する。
errno = 0; //グローバル変数 errno を0に初期化
clear(); //フラグのクリア

name.assign(_pass->get(i));
name.append(_strFileName);
open(name.c_str(),ios_base::in | ios_base::binary);
Expand All @@ -84,6 +97,23 @@ void FileInput::fileopen(const char* _strFileName,SearchPass* _pass)
success = true;
break;
};
#endif
//WINDOWS, UNIX系共通
//検索パス+ファイル名のみで検索。
errno = 0; //グローバル変数 errno を0に初期化
clear(); //フラグのクリア

name.assign(_pass->get(i));
name.append(workName);
open(name.c_str(),ios_base::in | ios_base::binary);
if(cOptionSW->flag_SearchPass){
perror(name.c_str());
}
if(good()==true){
success = true;
break;
};

i++;
}

Expand Down
Binary file modified src/nsc/nsc.ncb
Binary file not shown.
Binary file modified src/nsc/nsc.suo
Binary file not shown.
6 changes: 3 additions & 3 deletions src/nsd/nsd_snd.s
Original file line number Diff line number Diff line change
Expand Up @@ -1641,16 +1641,16 @@ _nsd_OPLL_volume:
lda __detune_fine,x ;[4]6
bpl @L ;[3] or [4]9 (Branch) or [4](not Branch)
dey ; ay = __detune_fine (sign expand)
@L: add __opll_frequency - nsd::TR_VRC7 + 0,x ;[6]15
@L: add __opll_frequency - nsd::TR_OPLL + 0,x ;[6]15
sta __tmp ;[3]18
tya ;[2]20
adc __opll_frequency - nsd::TR_VRC7 + 1,x ;[4]24
adc __opll_frequency - nsd::TR_OPLL + 1,x ;[4]24
and #$0F ;[2]26
sta __tmp + 1 ;[3]29 __tmp += (signed int)__detune_cent
pla ;[4]33
pha ;[3]36
tay ;[2]38 y <- device channel
add #OPLL_Frequency ;[4]42 > 42 clock !! (VRC7のwait)
add #OPLL_Frequency ;[4]42 > 42 clock !! (OPLLのwait)
sta OPLL_Resister ;●Resister Write
pla ;[4]
lda __tmp ;[2]6
Expand Down
4 changes: 2 additions & 2 deletions src/rom/crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ _play: .byte 0
.segment "DRVINFO"
DRV_Name: .byte $4E, $53, $44, $4C, $20, $20
DRV_Version: .byte 1
.byte 22
.byte 23
.byte 0,0,0,0,0,0,0,0

.ifdef DPCMBank
.segment "STARTUP"
DRV_Name2: .byte $4E, $53, $44, $4C, $20, $20
DRV_Version2: .byte 1
.byte 22
.byte 23
.endif

; ------------------------------------------------------------------------
Expand Down

0 comments on commit cfb97e8

Please sign in to comment.