"Simon Williams" wrote in message news:1gd68wp.1p6md43j3rbeeN%see_sig_for_valid_email@no.spam... > Here's an idea I've been toying with, I wouldn't mind some feedback on > its feasibility. > I'm working on a new version of the Timelord drum sequencer and thought > it would be rather nice to have more than ~20K available for audio > samples. Since the new interface is 80-columns, it pretty much means > that it'll only run on 128K machines anyway, so it would be smart to use > the extra 64K for the audio samples. The problem is that DAC522 only > works in the main 64K, so I would need a way to move samples from aux > memory to main memory (hopefully my terminology is correct here), and so > far I haven't found any documented technique for accomplishing this. If > anyone can point me in the right direction, I'd very much appreciate it. > Also, if anyone has done something similar, I'm curious as to how much > of a time penalty would be incurred. > -simon For simplicity, there will be a lot of that here, let's limit it to an enhanced 128K machine. We'll take advantage of the $C311 AUXMOVE routine and use 2K blocks for clarity. When you get to coding for 20k blocks the routine will be the same and the speed good enough for only a blip. Those accustomed to vinyl will feel nostalgic. AUXMOVE EQU $ C311 ;carry=1 main>aux carry=0 aux>main STARTLO EQU $ 3C STARTHI EQU $ 3D ENDLO EQU $ 3E ENDHI EQU $ 3F DESTINATIONLO EQU $ 42 DESTINATIONHI EQU $ 43 LDA #0 ;PAGE ALIGN AND DON'T MESS WITH THESE AGAIN STA STARTLO STA ENDLO STA DESTINATIONLO ;BLOAD SAMPLE1 ,A$2000,L8192 LDA #$20 STA STARTHI STA DESTINATIONHI LDA #$40 STA ENDHI SEC ;MAIN TO AUX JSR AUXMOVE ;BLOAD SAMPLE2 ,A$2000,L8192 LDA #$20 STA STARTHI LDA #$40 STA DESTINATIONHI STA ENDHI SEC ;MAIN TO AUX JSR AUXMOVE ;BLOAD SAMPLE3 ,A$2000,L8192 LDA #$20 STA STARTHI LDA #$40 STA ENDHI LDA #$60 STA DESTINATIONHI SEC ;MAIN TO AUX JSR AUXMOVE ;AUXMEM HAS 3 SAMPLES FROM $2000 TO $7FFF LDA #$20 STA STARTHI STA DESTINATIONHI LDA #$40 STA ENDHI CLC ;AUX TO MAIN JSR AUXMOVE JSR DAC522 ;PLAY THE SAMPLE LDA #$20 STA DESTINATIONHI LDA #$40 STA STARTHI LDA #$60 STA ENDHI CLC ;AUX TO MAIN JSR AUXMOVE JSR DAC522 ;PLAY THE SAMPLE LDA #$20 STA DESTINATIONHI LDA #$60 STA STARTHI LDA #$80 STA ENDHI CLC ;AUX TO MAIN JSR AUXMOVE JSR DAC522 ;PLAY THE SAMPLE I hope that gives you an idea. Of course in practice you would use loops and perhaps tables. I used straight line execution to show the steps clearer. If AUXMOVE doesn't mess with your initial values you might LDA STARTHI CLC ADC #$20 STA STARTHI LDA ENDHI CLC ADC #$20 STA ENDHI Laine... PS if using 80 col. or graphics make sure you don't load into those sections of auxmem. Mainly graphics with the above routine.