Page 1 of 1
ASM; Banked 4kb of PCM Data into $9F3D (4kb FIFo) for AUDIO DATA
Posted: Sat Apr 27, 2024 8:03 am
by schristis
- hhh1.jpg (48.87 KiB) Viewed 1477 times
Hi, Im not sure if this is the way you'd do it....
I'm just playing around tring to load PCM Data into $9F3D
given that AUDIO_CTRL ($9F3B) & AUDIO_RATE ($9F3C) are correctly setup.... I should get the sound i want (or hope to want)
Ummm Not sure if I'm even doing this corectly, any direction would be apreciated...
I know some ASM,, but BASIC would be too slow to fill this buffer...
I know the sound would only last a second, like a small WAV file... but with the PCM DATA...
If anyone else has idea's, let me know...
Best Regards
Shaun
Re: ASM; Banked 4kb of PCM Data into $9F3D (4kb FIFo) for AUDIO DATA
Posted: Sat Apr 27, 2024 9:03 am
by ahenry3068
schristis wrote: ↑Sat Apr 27, 2024 8:03 am
hhh1.jpg
Hi, Im not sure if this is the way you'd do it....
I'm just playing around tring to load PCM Data into $9F3D
given that AUDIO_CTRL ($9F3B) & AUDIO_RATE ($9F3C) are correctly setup.... I should get the sound i want (or hope to want)
Ummm Not sure if I'm even doing this corectly, any direction would be apreciated...
I know some ASM,, but BASIC would be too slow to fill this buffer...
I know the sound would only last a second, like a small WAV file... but with the PCM DATA...
If anyone else has idea's, let me know...
Best Regards
Shaun
Look at the ROM sub routine memory_copy. You wouldn't even have to do any assembly yourself. Use Poke to set it up then
Try setting up the VERA audio registers then MYPCM.RAW should hold the PCM raw audio.
BLOAD "MYPCM.RAW",8,2, $A000
BANK 2
REM The following Pokes setup the source, dest and size for memory_copy at r0,r1 and r2
REM SRC ADDR
POKE 2, 0
POKE 3, $A0
REM DEST ADDR
POKE 4, $3D
POKE 5, $9F
REM BYTES TO COPY(4000)
POKE 6, $A0
POKE 7, $0F
REM CALL MEMORY_COPY
SYS $FEE7
In assembly
LDA #0
STA 2
LDA #$A0
STA 3
LDA #$3D
STA 4
LDA #$9F
STA 5
LDA #$A0
STA 6
LDA #$0F
STA 7
JSR $FEE7
Re: ASM; Banked 4kb of PCM Data into $9F3D (4kb FIFo) for AUDIO DATA
Posted: Sat Apr 27, 2024 11:22 am
by schristis
Hi Ahenry,
Thankyou, I thought there might be an answer... I can follow that like a roadmap now.!
The $FEE7 memory copy seems to be designed to do just that!!!
Very highly apreciated ...
Best regards
Shaun