Skip to content

Commit

Permalink
version 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaw02 committed Jun 9, 2013
1 parent e0a7539 commit fc7b6a7
Show file tree
Hide file tree
Showing 63 changed files with 103 additions and 50 deletions.
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_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����| NSDL109.ZIP
|�t�@�C����| NSDL110.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���́yNSDL109.ZIP�z�ł��B
����̃t�@�C���́yNSDL110.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_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.
Binary file modified sample/_debug/fds_test.nsf
Binary file not shown.
Binary file modified sample/_debug/mmc5_test.nsf
Binary file not shown.
Binary file modified sample/_debug/s5b_test.nsf
Binary file not shown.
Binary file modified sample/_debug/test.nsf
Binary file not shown.
Binary file modified sample/_debug/test_offset.nsf
Binary file not shown.
Binary file modified sample/_debug/test_scale.nsf
Binary file not shown.
Binary file modified sample/_debug/vrc6_test.nsf
Binary file not shown.
6 changes: 3 additions & 3 deletions sample/_debug/vrc7_test.BAK
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ VRC7(1){ //Piano
15 7 1 1 0 1 0 0 0 1 0
}

E(300){ L 64 96 127 96 }
E(300){ L (32,47,16) (47,32,16) }

// frequency envelop "Volume table"
Envelop(0){ 8 10 12 13 14 15 D10 14 D3 13 D1 12 11 L 10 10 9 9 8 8 9 9 R 8 8 7 7 6 6 5 5 L 4 4 3 3 2 2 3 3 }
Expand All @@ -31,9 +31,9 @@ Envelop(200){ 0 1 2 3 4 5 6 L 7 }

bgm(0){
t120
@V1


TR6 l4o4 v15 @0 E@300 u8 s0 cdef s1 gab> c1
TR6 l4o4 v15 @0 @V1 u8 s0 cdef s1 gab> c1
// TR7 l4o4 v9 Em100 Ev0 @4 r-8. cdefgab> c1
// TR8 l4o2 v13 Em100 Ev0 @2 cdefgab> c1

Expand Down
6 changes: 4 additions & 2 deletions sample/_debug/vrc7_test.mml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ Envelop(200){ 0 1 2 3 4 5 6 L 7 }

bgm(0){
t120
@V1


TR6 l4o4 v15 @0 E@300 u8 s0 cdef s1 gab> c1
TR9 @V1

TR6 l4o4 v15 @0 u8 s0 cdef s1 gab> c1
// TR7 l4o4 v9 Em100 Ev0 @4 r-8. cdefgab> c1
// TR8 l4o2 v13 Em100 Ev0 @2 cdefgab> c1

Expand Down
Binary file modified sample/_debug/vrc7_test.nsf
Binary file not shown.
Binary file modified src/help/nsdl.chm
Binary file not shown.
6 changes: 6 additions & 0 deletions src/help/revision.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
</p>
<table>
<tr><th>ヴァージョン</th><th>内容</th><th>改定日</th></tr>
<tr><td>1.0a</td>
<td>●音源ドライバー本体<br>
・VRC7, OPLLにて、音色切り替わり時に最初の音が正常に発音されない場合があったバグを修正。<br>
●コンパイル済み音源ドライバ<br>
・ΔPCM-IRQの割り込み処理中にNMI割り込みが発生した場合に、ΔPCMが正常に発音されなくなるバグを修正。<br>
<td>2013年 6月 9日</td></tr>
<tr><td>1.09</td>
<td>●音源ドライバー本体<br>
・VRC7, OPLLの@コマンド及び音色エンベロープにて、ユーザー音色のTL, MLを操作出来るようにした。<br>
Expand Down
Binary file modified src/nsd/NSD.lib
Binary file not shown.
Binary file modified src/nsd/NSD_ALL.lib
Binary file not shown.
Binary file modified src/nsd/NSD_ALL2.lib
Binary file not shown.
Binary file modified src/nsd/NSD_FDS.lib
Binary file not shown.
Binary file modified src/nsd/NSD_MMC5.lib
Binary file not shown.
Binary file modified src/nsd/NSD_N163.lib
Binary file not shown.
Binary file modified src/nsd/NSD_OALL.lib
Binary file not shown.
Binary file modified src/nsd/NSD_OPLL.lib
Binary file not shown.
Binary file modified src/nsd/NSD_VRC6.lib
Binary file not shown.
Binary file modified src/nsd/NSD_VRC7.lib
Binary file not shown.
Binary file modified src/nsd/NSD_s5b.lib
Binary file not shown.
1 change: 1 addition & 0 deletions src/nsd/nsd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ PSG_Envelope_Form = $0D
.scope nsd_flag
BGM = $01
SE = $02
Disable = $80
.endscope

;Zero Page Works
Expand Down
8 changes: 8 additions & 0 deletions src/nsd/nsd_irq.s
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
;=======================================================================
.proc _nsd_irq: near

; lda __flag
; ora #nsd_flag::Disable
; sta __flag

;DPCM IEQ check
lda APU_CHANCTRL
bpl DPCM_Exit
Expand Down Expand Up @@ -85,6 +89,10 @@ DPCM_Exit:
;-------------------------------
;Exit

; lda __flag
; and #~nsd_flag::Disable
; sta __flag

rts
.endproc

Expand Down
5 changes: 4 additions & 1 deletion src/nsd/nsd_main.s
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
;=======================================================================
.proc _nsd_main: near

; lda __flag ;無効の場合は、呼ばない。
; jmi Exit ;(最上位 1bit = `H'の場合、終了)

.ifdef DPCMBank
sei

Expand Down Expand Up @@ -130,5 +133,5 @@ SE_Exit:

;-------------------------------
;Exit
rts
Exit: rts
.endproc
106 changes: 68 additions & 38 deletions src/nsd/nsd_snd.s
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ _nsd_vrc7_keyoff:

lda __vrc7_frequency,y ;[5]
and #$EF ;[2]
sta __vrc7_frequency,y ;[5]
sta VRC7_Data ;

rts ;[6]
Expand Down Expand Up @@ -603,6 +604,7 @@ _nsd_OPLL_keyoff:

lda __opll_frequency,y ;[5]
and #$EF ;[2]
sta __opll_frequency,y ;[5]
sta OPLL_Data ;

_nsd_OPLL_keyoff_exit:
Expand Down Expand Up @@ -1327,17 +1329,41 @@ _nsd_vrc7_volume:
eor #$FF ;[2]2
tay ;[2]4

;チャンネルの計算
txa ;[2]6
sub #nsd::TR_VRC7 ;[]
shr a, 1 ;[2]
pha

;音量・音色番号書き込み
add #VRC7_Volume ;[2]
sta VRC7_Resister ;
sta VRC7_Resister ;●Resister Write

tya ;[2]
and #$0F ;[2]4
ora __voice_set,x ;[4]8
sta VRC7_Data ;●Data Write

sta VRC7_Data
;周波数 下位byte 書き込み
pla ;[4]4 a ← VRC7でのチャンネル番号
tay ;[2]6

lda __chflag,x ;[4]10
and #$30 ;[2]12 00XX 0000 <2>
ora __vrc7_frequency,y ;[4]16 flag と octave をマージ
sta __vrc7_frequency,y ;[5]21

lda (__ptr),y ;[5]26
lda (__ptr),y ;[5]31
lda (__ptr),y ;[5]36

tya ;[2]38
add #VRC7_Octave ;[4]42 clock !! (VRC7のwait)

sta VRC7_Resister ;●Resister Write
tya ;[2]
lda __vrc7_frequency,y ;[4]6 clock
sta VRC7_Data ;●Data Write

rts ;[6]

Expand All @@ -1354,20 +1380,44 @@ _nsd_OPLL_volume_R:

_nsd_OPLL_volume:

eor #$FF
tay
eor #$FF ;[2]2
tay ;[2]4

txa
sub #nsd::TR_OPLL
shr a, 1
add #OPLL_Volume
sta OPLL_Resister ;
;チャンネルの計算
txa ;[2]
sub #nsd::TR_OPLL
shr a, 1 ;[2]
pha

;音量・音色番号書き込み
add #OPLL_Volume ;[2]
sta OPLL_Resister ;●Resister Write

tya ;[2]
and #$0F ;[2]
ora __voice_set,x ;[4]
and #$0F ;[2]4
ora __voice_set,x ;[4]8
sta OPLL_Data ;●Data Write

sta OPLL_Data
;周波数 下位byte 書き込み
pla ;[4]4 a ← VRC7でのチャンネル番号
tay ;[2]6

lda __chflag,x ;[4]10
and #$30 ;[2]12 00XX 0000 <2>
ora __opll_frequency,y ;[4]16 flag と octave をマージ
sta __opll_frequency,y ;[5]21

lda (__ptr),y ;[5]26
lda (__ptr),y ;[5]31
lda (__ptr),y ;[5]36

tya ;[2]38
add #OPLL_Octave ;[4]42 clock !! (VRC7のwait)

sta OPLL_Resister ;●Resister Write
tya ;[2]
lda __opll_frequency,y ;[4]6 clock
sta OPLL_Data ;●Data Write

_nsd_OPLL_volume_exit:
rts
Expand Down Expand Up @@ -2826,22 +2876,12 @@ Detune:
adc __tmp + 1 ;[3]5
and #$0F ;[2]7
sta __tmp + 1 ;[3]10 __tmp += (signed int)__detune_cent
lda __chflag,x ;[4]14
and #$30 ;[2]16 00XX 0000 <2>
ora __tmp + 1 ;[3]19 flag と octave をマージ
sta __tmp + 1 ;[3]22

lda (__ptr,x) ;[6]28
lda __ptr,x ;[4]32

pla ;[4]36 a ← VRC7でのチャンネル番号
tay ;[2]40
add #VRC7_Octave ;[4]42 clock !! (VRC7のwait)

sta VRC7_Resister ;●Resister Write
;追加
pla ;a ← VRC7でのチャンネル番号
tay
lda __tmp + 1 ;[3]3
sta __vrc7_frequency,y ;[5]8 clock > 6 clock
sta VRC7_Data ;●Data Write

rts
.endproc
Expand Down Expand Up @@ -2883,22 +2923,12 @@ Detune:
adc __tmp + 1 ;[3]5
and #$0F ;[2]7
sta __tmp + 1 ;[3]10 __tmp += (signed int)__detune_cent
lda __chflag,x ;[4]14
and #$30 ;[2]16 00XX 0000 <2>
ora __tmp + 1 ;[3]19 flag と octave をマージ
sta __tmp + 1 ;[3]22

lda (__ptr,x) ;[6]28
lda __ptr,x ;[4]32

pla ;[4]36 a ← VRC7でのチャンネル番号
tay ;[2]40
add #OPLL_Octave ;[4]42 clock !! (OPLLのwait)

sta OPLL_Resister ;●Resister Write
;追加
pla ;a ← VRC7でのチャンネル番号
tay
lda __tmp + 1 ;[3]3
sta __opll_frequency,y ;[5]8 clock > 6 clock
sta OPLL_Data ;●Data Write

rts
.endproc
Expand Down
11 changes: 7 additions & 4 deletions src/rom/crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ _eff: .byte 0 ;SE start number
.byte 1 ;07 Start Music number
.addr $8000 ;08 Load address
.addr _nsf_init ;0A Init routine address
.ifdef DPCMBank
.addr _nmi_main
.else
.addr _nsd_main ;0C Sound driver main routine address
.endif
.res 32, $0
.res 32, $0
.res 32, $0
Expand All @@ -101,8 +105,8 @@ _eff: .byte 0 ;SE start number
; ------------------------------------------------------------------------
.segment "DRVINFO"
DRV_Name: .byte $4E, $53, $44, $4C, $20, $20
DRV_Version: .byte $01
.byte $09
DRV_Version: .byte 1
.byte 10

; ------------------------------------------------------------------------
; 実機ROM用 IRQ (DPCM)
Expand Down Expand Up @@ -150,8 +154,7 @@ DRV_Version: .byte $01
tay
pla

rti

rts
.endproc

.endif
Expand Down
Binary file modified src/rom/nsd.bin
Binary file not shown.
Binary file modified src/rom/nsd_all.bin
Binary file not shown.
Binary file modified src/rom/nsd_all2.bin
Binary file not shown.
Binary file modified src/rom/nsd_fds.bin
Binary file not shown.
Binary file modified src/rom/nsd_mmc5.bin
Binary file not shown.
Binary file modified src/rom/nsd_n163.bin
Binary file not shown.
Binary file modified src/rom/nsd_oall.bin
Binary file not shown.
Binary file modified src/rom/nsd_opll.bin
Binary file not shown.
Binary file modified src/rom/nsd_s5b.bin
Binary file not shown.
Binary file modified src/rom/nsd_vrc6.bin
Binary file not shown.
Binary file modified src/rom/nsd_vrc7.bin
Binary file not shown.

0 comments on commit fc7b6a7

Please sign in to comment.