News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_lightforce6128

Load audio samples to emulator memory

Started by lightforce6128, 03:44, 21 January 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lightforce6128

I'm not sure if this is the right category. My topic is about emulators, sampled audio, and programming.

Lately I did some experiments with sampled audio. For this I used WinAPE (2.0 Beta 2), configured with a memory extension of 4 megabyte and a DigiBlaster. I prepared the audio data with an external C++ program and stored it into an empty snapshot file (uncompressed for easy write access to the file). This works fine and the audio quality is also good.

For the current experiment I only used 512 kilobytes of the memory extension. This is well mapped to the snapshot file. To extend the sample time I would like to use the full 4 megabytes. But it seems they are not covered by the snapshot (at least not the custom uncompressed one).

My question is: How can I easily transfer 4 megabytes of external data into the emulator? One possibility would be to generate a bunch of disk images. But loading the data inside the emulator would be quite cumbersome. Is there a better way?

Jean-Marie

You could split your 4MB file into 64 files of 64 KB.
Then enter the following listing in WinAPE assembler :
WRITE DIRECT -1,-1,#C2:ORG 0:incbin "file1.bin"
WRITE DIRECT -1,-1,#CA:ORG 0:incbin "file2.bin"
WRITE DIRECT -1,-1,#D2:ORG 0:incbin "file3.bin"
WRITE DIRECT -1,-1,#DA:ORG 0:incbin "file4.bin"
WRITE DIRECT -1,-1,#E2:ORG 0:incbin "file5.bin"
WRITE DIRECT -1,-1,#EA:ORG 0:incbin "file6.bin"
WRITE DIRECT -1,-1,#F2:ORG 0:incbin "file7.bin"
WRITE DIRECT -1,-1,#FA:ORG 0:incbin "file8.bin"
WRITE DIRECT -1,-1,#8C2:ORG 0:incbin "file9.bin"
WRITE DIRECT -1,-1,#8CA:ORG 0:incbin "file10.bin"
WRITE DIRECT -1,-1,#8D2:ORG 0:incbin "file11.bin"
WRITE DIRECT -1,-1,#8DA:ORG 0:incbin "file12.bin"
WRITE DIRECT -1,-1,#8E2:ORG 0:incbin "file13.bin"
WRITE DIRECT -1,-1,#8EA:ORG 0:incbin "file14.bin"
WRITE DIRECT -1,-1,#8F2:ORG 0:incbin "file15.bin"
WRITE DIRECT -1,-1,#8FA:ORG 0:incbin "file16.bin"
WRITE DIRECT -1,-1,#9C2:ORG 0:incbin "file17.bin"
WRITE DIRECT -1,-1,#9CA:ORG 0:incbin "file18.bin"
WRITE DIRECT -1,-1,#9D2:ORG 0:incbin "file19.bin"
WRITE DIRECT -1,-1,#9DA:ORG 0:incbin "file20.bin"
WRITE DIRECT -1,-1,#9E2:ORG 0:incbin "file21.bin"
WRITE DIRECT -1,-1,#9EA:ORG 0:incbin "file22.bin"
WRITE DIRECT -1,-1,#9F2:ORG 0:incbin "file23.bin"
WRITE DIRECT -1,-1,#9FA:ORG 0:incbin "file24.bin"
WRITE DIRECT -1,-1,#AC2:ORG 0:incbin "file25.bin"
WRITE DIRECT -1,-1,#ACA:ORG 0:incbin "file26.bin"
WRITE DIRECT -1,-1,#AD2:ORG 0:incbin "file27.bin"
WRITE DIRECT -1,-1,#ADA:ORG 0:incbin "file28.bin"
WRITE DIRECT -1,-1,#AE2:ORG 0:incbin "file29.bin"
WRITE DIRECT -1,-1,#AEA:ORG 0:incbin "file30.bin"
WRITE DIRECT -1,-1,#AF2:ORG 0:incbin "file31.bin"
WRITE DIRECT -1,-1,#AFA:ORG 0:incbin "file32.bin"
WRITE DIRECT -1,-1,#BC2:ORG 0:incbin "file33.bin"
WRITE DIRECT -1,-1,#BCA:ORG 0:incbin "file34.bin"
WRITE DIRECT -1,-1,#BD2:ORG 0:incbin "file35.bin"
WRITE DIRECT -1,-1,#BDA:ORG 0:incbin "file36.bin"
WRITE DIRECT -1,-1,#BE2:ORG 0:incbin "file37.bin"
WRITE DIRECT -1,-1,#BEA:ORG 0:incbin "file38.bin"
WRITE DIRECT -1,-1,#BF2:ORG 0:incbin "file39.bin"
WRITE DIRECT -1,-1,#BFA:ORG 0:incbin "file40.bin"
WRITE DIRECT -1,-1,#CC2:ORG 0:incbin "file41.bin"
WRITE DIRECT -1,-1,#CCA:ORG 0:incbin "file42.bin"
WRITE DIRECT -1,-1,#CD2:ORG 0:incbin "file43.bin"
WRITE DIRECT -1,-1,#CDA:ORG 0:incbin "file44.bin"
WRITE DIRECT -1,-1,#CE2:ORG 0:incbin "file45.bin"
WRITE DIRECT -1,-1,#CEA:ORG 0:incbin "file46.bin"
WRITE DIRECT -1,-1,#CF2:ORG 0:incbin "file47.bin"
WRITE DIRECT -1,-1,#CFA:ORG 0:incbin "file48.bin"
WRITE DIRECT -1,-1,#DC2:ORG 0:incbin "file49.bin"
WRITE DIRECT -1,-1,#DCA:ORG 0:incbin "file50.bin"
WRITE DIRECT -1,-1,#DD2:ORG 0:incbin "file51.bin"
WRITE DIRECT -1,-1,#DDA:ORG 0:incbin "file52.bin"
WRITE DIRECT -1,-1,#DE2:ORG 0:incbin "file53.bin"
WRITE DIRECT -1,-1,#DEA:ORG 0:incbin "file54.bin"
WRITE DIRECT -1,-1,#DF2:ORG 0:incbin "file55.bin"
WRITE DIRECT -1,-1,#DFA:ORG 0:incbin "file56.bin"
WRITE DIRECT -1,-1,#EC2:ORG 0:incbin "file57.bin"
WRITE DIRECT -1,-1,#ECA:ORG 0:incbin "file58.bin"
WRITE DIRECT -1,-1,#ED2:ORG 0:incbin "file59.bin"
WRITE DIRECT -1,-1,#EDA:ORG 0:incbin "file60.bin"
WRITE DIRECT -1,-1,#EE2:ORG 0:incbin "file61.bin"
WRITE DIRECT -1,-1,#EEA:ORG 0:incbin "file62.bin"
WRITE DIRECT -1,-1,#EF2:ORG 0:incbin "file63.bin"
WRITE DIRECT -1,-1,#EFA:ORG 0:incbin "file64.bin"

Each line will fill up 64 Kb of RAM. Note that WinAPE is terribly slow when using the incbin directive.
It will look like it entered in a deadlock, but it will succeed eventually.

McArti0

CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
One chip driver for 512kB(to640) extRAM 6128
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

lightforce6128

Quote from: Jean-Marie on 06:02, 21 January 25You could split your 4MB file into 64 files of 64 KB.
Then enter the following listing in WinAPE assembler : ...

I like this approach. This a big bunch of files, but all can be generated automatically, and all can be read in automatically.

lightforce6128

Quote from: McArti0 on 08:39, 21 January 25Mayby M4 board in CPCemu?

I do not have experience with CPCemu. I need to see how things are organized there.

Powered by SMFPacks Menu Editor Mod