I have zero knowledge about digital audio.
I started playing with the SPC700 and I want to reproduce one sample.
Im using the "cymbal.brr" sample that 93143 posted here:(basamples_v2.7z)
viewtopic.php?f=12&t=10696&start=120#p142336
The situation is the following:
-I have written one 65816 routine that can upload data to the APU RAM and set the execution address
-I can transfer the sample and the program.(The SPC700 executes my program without problem)
-The sample and the program are stored in the ROM like a single binary file , organized in this way:
This binary is transfered to $0200-$45B6 on the APU RAM.
This is my SPC700 code:
(I'm unexperienced with the spc700 , I dont know the instructions & addressing modes , so be kind and dont laught too much )
What im doing wrong?
Any example of how to do this?
Any brr test sample?
I started playing with the SPC700 and I want to reproduce one sample.
Im using the "cymbal.brr" sample that 93143 posted here:(basamples_v2.7z)
viewtopic.php?f=12&t=10696&start=120#p142336
The situation is the following:
-I have written one 65816 routine that can upload data to the APU RAM and set the execution address
-I can transfer the sample and the program.(The SPC700 executes my program without problem)
-The sample and the program are stored in the ROM like a single binary file , organized in this way:
Code:
$0000->|--------------| \
| SAMPLE | | "cymbal.brr" 17010 bytes
$4272->|--------------| /
| Program |
$43B6->|--------------|
| SAMPLE | | "cymbal.brr" 17010 bytes
$4272->|--------------| /
| Program |
$43B6->|--------------|
This binary is transfered to $0200-$45B6 on the APU RAM.
This is my SPC700 code:
(I'm unexperienced with the spc700 , I dont know the instructions & addressing modes , so be kind and dont laught too much )
Code:
;-----------------------------------------------------------------------------------------
;*This WLA directives are from the nwarp code by d4s
;-----------------------------------------------------------------------------------------
.MEMORYMAP ; Tell WLA that the SPC has RAM at locations ;$0000-$ffff in every bank
SLOTSIZE $10000 ; and that this area is $10000 bytes in size.
DEFAULTSLOT 0 ; There is only a single slot in SNES, other consoles
SLOT 0 $0000 ; may have more slots per bank.
.ENDME
.ROMBANKSIZE $00144 ; Every ROM bank is 64 KBytes in size
.ROMBANKS 1
;----------------------------------------------------------------------------------------
.EQU DIR $02 ;SOUND DIRECTORY ADDRESS
.BANK 0 SLOT 0
mov A,#$5D
mov $F2,A
mov A,#DIR
mov $F3,A ;Set DIR value ( 2 * 100h = 200h)
;Set volume to the max
mov A,#$0C
mov $F2,A
mov A,#$7F
mov $F3,A ;Left output main volume
mov A,#$1C
mov $F2,A
mov A,#$7F
mov $F3,A ;Right Output main volume
;VOICE 0 SETTING
mov A,#$00
mov $F2,A
mov A,#$7F
mov $F3,A ;voice 0 volume left
mov A,#$01
mov $F2,A
mov A,#$7F
mov $F3,A ;voice 0 volume RIGHT
mov A,#$02
mov $F2,A
mov A,#$00
mov $F3,A ;voice 0 pitch low byte
mov A,#$03
mov $F2,A
mov A,#$10
mov $F3,A ;voice 0 pitch high byte
mov A,#$04
mov $F2,A
mov A,#$00
mov $F3,A ;voice 0 SRCN
;============;
mov A,#$4C
mov $F2,A
mov A, #$01
mov $F3,A ;K-ON , activate voice 0
-:
;instructions for testing
mov A,#$DD
mov X,#$EE
mov Y,#$FF
bra -
;*This WLA directives are from the nwarp code by d4s
;-----------------------------------------------------------------------------------------
.MEMORYMAP ; Tell WLA that the SPC has RAM at locations ;$0000-$ffff in every bank
SLOTSIZE $10000 ; and that this area is $10000 bytes in size.
DEFAULTSLOT 0 ; There is only a single slot in SNES, other consoles
SLOT 0 $0000 ; may have more slots per bank.
.ENDME
.ROMBANKSIZE $00144 ; Every ROM bank is 64 KBytes in size
.ROMBANKS 1
;----------------------------------------------------------------------------------------
.EQU DIR $02 ;SOUND DIRECTORY ADDRESS
.BANK 0 SLOT 0
mov A,#$5D
mov $F2,A
mov A,#DIR
mov $F3,A ;Set DIR value ( 2 * 100h = 200h)
;Set volume to the max
mov A,#$0C
mov $F2,A
mov A,#$7F
mov $F3,A ;Left output main volume
mov A,#$1C
mov $F2,A
mov A,#$7F
mov $F3,A ;Right Output main volume
;VOICE 0 SETTING
mov A,#$00
mov $F2,A
mov A,#$7F
mov $F3,A ;voice 0 volume left
mov A,#$01
mov $F2,A
mov A,#$7F
mov $F3,A ;voice 0 volume RIGHT
mov A,#$02
mov $F2,A
mov A,#$00
mov $F3,A ;voice 0 pitch low byte
mov A,#$03
mov $F2,A
mov A,#$10
mov $F3,A ;voice 0 pitch high byte
mov A,#$04
mov $F2,A
mov A,#$00
mov $F3,A ;voice 0 SRCN
;============;
mov A,#$4C
mov $F2,A
mov A, #$01
mov $F3,A ;K-ON , activate voice 0
-:
;instructions for testing
mov A,#$DD
mov X,#$EE
mov Y,#$FF
bra -
What im doing wrong?
Any example of how to do this?
Any brr test sample?