Posted Sat Feb 25, 2012 9:29 PM
Posted Sat Feb 25, 2012 9:38 PM
thegoldenband, on Sat Feb 25, 2012 9:29 PM, said:
Edited by intvnut, Sat Feb 25, 2012 9:39 PM.
Posted Sat Feb 25, 2012 9:51 PM
Posted Sat Feb 25, 2012 9:51 PM
Posted Sat Feb 25, 2012 10:10 PM
intvnut, on Sat Feb 25, 2012 9:38 PM, said:
chjmartin2, on Sat Feb 25, 2012 9:51 PM, said:
Posted Sat Feb 25, 2012 10:24 PM
SDM_Long_1Meg.mp3 1.37MB
100 downloads
Wave1.wav 1.12MB 100 downloads
Serious_Bleep.wav 796.57K 91 downloads
seriousblout.mp3 174.86K 57 downloads
Audio_6.wav 197K 104 downloads
audio_30.wav 1.99MB 131 downloads
borntobaby.mp3 198K 77 downloads#lang "fblite" Screenres 1500,900,32: CLS LOCATE 1, 1 FILENAME$ = "wavex.raw" TOGGLE = 0 PAUSER = 400 randomize timer samples = 8323064 oversamprate = 1 dim audio(samples*oversamprate) as SHORT, audioout(samples*oversamprate) as SHORT, naudio(samples*oversamprate) as SHORT, ebitout(samples*oversamprate) as SHORT, noise(samples*oversamprate) as SHORT, shapenoise(samples) as SHORT dim quanterror(samples*oversamprate) as SHORT, origaudio(samples*oversamprate) as SHORT Randomize , 1 'input "How many levels?",levels totalbitcount=samples*oversamprate ebitcount=int(totalbitcount/8) if totalbitcount mod 8>0 then ebitcount=ebitcount+1 dim bitaudioout(ebitcount) as UBYTE OPEN filename$ FOR BINARY as #1 get #1,,audio() close #1 bitcounter=0:outputbit$="":ebitcounter=0 cumerror=0 for j=1 to samples origaudio(j)=audio(j) pset (j/(samples/1500),100+audio(j)/128),rgb(255,255,255) 'Clip Check 'if audio(j)>32 then audio(j)=32767 'if audio(j)<0 then audio(j)=-32768 naudio(j)=audio(j) 'for i=1 to oversamprate 'outj=(j-1)*oversamprate+i outj=j audio(j)=audio(j)+4000*rnd-2000 'locate 45,1: print "audio(j): ";audio(j) 'locate 46,2: print "2048*rnd: ";2048*rnd if audio(j)>cumerror then cumerror=cumerror+32767-audio(j) 'audio(j)=32767 audioout(outj)=1 ebitout(outj)=32767 else cumerror=cumerror-32768-audio(j) 'audio(j)=-32768 audioout(outj)=0 ebitout(outj)=-32768 end if pset (outj/(samples/1500),400+audioout(outj)*25),rgb(255,255,255) 'locate 65,1:print "audio: ";audio(j);" - audioout: ";audioout(j) bitcounter=bitcounter+1 outputbit$=outputbit$+str$(audioout(outj)) if bitcounter/8=int(bitcounter/8) then ebitcounter=ebitcounter+1 bitaudioout(ebitcounter)=128*val(mid$(outputbit$,2,1))+64*val(mid$(outputbit$,3,1))+32*val(mid$(outputbit$,4,1))+16*val(mid$(outputbit$,5,1))+8*val(mid$(outputbit$,6,1))+4*val(mid$(outputbit$,7,1))+2*val(mid$(outputbit$,8,1))+1*val(mid$(outputbit$,1,1)) 'locate 50,1:print outputbit$;" - ";bitaudioout(ebitcounter) outputbit$="" end if 'next i 'pset (bitcounter/(totalbitcount/1500),400+levels+50+0),rgb(255,255,255) next j locate 70,1 print "bitcounter: ";bitcounter print "ebitcounter: ";ebitcounter print "ebitcount: ";ebitcount print "totalbitcount: ";totalbitcount print "samples: ";samples input ggg$ open "OUTBIT.BIN" for BINARY AS #1 put #1,,bitaudioout() close #1 open "OUTPUT.RAW" for BINARY AS #1 put #1,,ebitout() close #1
; Program to Create Sound Using 1-BIT at 100,889 Hz ; Encoded Audio Data Requires 1 bit end shift encoding ; Encoded Audio Stream Optimized by Sigma Delta Modulation and Dither via ; raw2sigmadelta.bas on Freebasic can converter 16 BIT PCM streams ; Must be run on Actual Aquarius with Bank-Switching Capable Cartridge ; Requires 1016k of Audio Data to be loaded before execution code .org $E000 .db $b6, $b7, $24, $2a, $8d, $9c, $42, $b0 .db $53, $6c, $90, $64, $89, $a8, $f9, $70 bankmain: ld de, $c000 ; load the target address into register DE ld a, 0 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 1 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 2 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 3 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 4 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 5 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 6 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 7 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 8 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 9 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 10 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 11 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 12 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 13 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 14 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 15 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 16 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 17 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 18 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 19 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 20 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 21 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 22 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 23 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 24 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 25 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 26 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 27 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 28 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 29 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 30 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 31 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 32 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 33 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 34 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 35 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 36 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 37 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 38 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 39 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 40 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 41 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 42 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 43 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 44 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 45 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 46 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 47 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 48 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 49 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 50 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 51 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 52 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 53 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 54 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 55 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 56 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 57 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 58 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 59 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 60 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 61 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 62 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 63 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 64 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 65 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 66 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 67 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 68 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 69 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 70 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 71 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 72 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 73 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 74 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 75 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 76 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 77 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 78 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 79 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 80 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 81 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 82 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 83 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 84 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 85 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 86 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 87 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 88 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 89 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 90 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 91 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 92 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 93 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 94 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 95 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 96 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 97 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 98 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 99 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 100 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 101 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 102 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 103 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 104 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 105 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 106 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 107 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 108 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 109 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 110 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 111 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 112 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 113 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 114 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 115 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 116 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 117 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 118 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 119 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 120 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 121 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 122 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 123 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 124 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 125 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space; call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 126 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 127 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ;jp bankmain halt main: ld bc, 8191 ; (10) number of bytes of samples ld hl, $C000 ; (10) Memory Location to ROM Sample ld a, (hl) ; (7) load first sample set into A rlc b ; (8) set up b to be rotated replay: out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left inc hl ; (6) Move up the Rom sample location nop ; (4) waste cycles nop ; (4) waste cycles nop ; (4) waste cycles out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left rrc b ; (8) unrotate b from previous rotate jp wastetenone ; (10) waste 10 t-states wastetenone: out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left dec bc ; (6) Reduce the byte counter nop ; (4) waste cycles nop ; (4) waste cycles nop ; (4) waste cycles out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left nop ; (4) waste cycles nop ; (4) waste cycles jp wastetentwo ; (10) waste 10 t-states wastetentwo: out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left ld d, (hl) ; (7) next first sample set into A ld e, d ; (7) load d into e to waste cycles nop ; (4) waste cycles out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left nop ; (4) waste cycles nop ; (4) waste cycles jp wastetenthr ; (10) waste 10 t-states wastetenthr: out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left rlc b ; (8) see if loop counter went negative jp wastetenfou ; (10) waste 10 t-states wastetenfou: out ($fc), a ; (11) send out the sample ld a, d ; (4) copy new sample to a ;ld (12328), hl ;ld (12330), bc ;ld (12332), d ;ld (12333), a nop ; (4) waste cycles nop ; (4) waste cycles jp p, replay ; (10) do it again until we are done! FINISH: ;jp FINISH ret ; Zero-Fill Remainder of Cartridge ROM .org $FFFF .byte $00 .end
Posted Sat Feb 25, 2012 10:26 PM
thegoldenband, on Sat Feb 25, 2012 10:10 PM, said:
intvnut, on Sat Feb 25, 2012 9:38 PM, said:
chjmartin2, on Sat Feb 25, 2012 9:51 PM, said:
Posted Sun Feb 26, 2012 2:14 AM
chjmartin2, on Sat Feb 25, 2012 10:24 PM, said:
ld de, $c000 ; load the target address into register DE ld a, 110 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 111 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 112 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 113 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 114 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 115 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 116 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 117 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 118 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 119 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 120 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 121 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 122 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 123 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 124 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 125 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space; call main ; call the drawing program ld de, $c000 ; load the target address into register DE ld a, 126 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program ld a, 127 ; load the target bank number into the accumulator ld (de), a ; write the bank number into the cartridge space call main ; call the drawing program
Posted Sun Feb 26, 2012 9:30 AM
Quote
Posted Sun Feb 26, 2012 11:35 AM
chjmartin2, on Sun Feb 26, 2012 9:30 AM, said:
Quote
Posted Sun Feb 26, 2012 3:17 PM
intvnut, on Sun Feb 26, 2012 11:35 AM, said:
chjmartin2, on Sun Feb 26, 2012 9:30 AM, said:
Quote
Posted Sun Feb 26, 2012 3:44 PM
chjmartin2, on Sun Feb 26, 2012 3:17 PM, said:
chjmartin2, on Sun Feb 26, 2012 3:17 PM, said:
chjmartin2, on Sun Feb 26, 2012 3:17 PM, said:
void sdm
(
const short *i_samp, // input sample array
unsigned char *o_samp, // output sample array
int num_samp, // number of inputs to process
int oversamp, // oversampling ratio
int out_gain // output gain
)
{
int error = 0;
int i, j, samp;
for (i = 0; i < num_samp; i++)
{
samp = *i_samp++;
for (j = 0; j < oversamp; j++)
{
if (samp > error)
{
*o_samp++ = 1;
error += out_gain - samp;
} else
{
*o_samp++ = 0;
error += -out_gain - samp;
}
}
}
}
void sdm
(
const short *i_samp, // input sample array
unsigned char *o_samp, // output sample array
int num_samp, // number of inputs to process
int oversamp, // oversampling ratio
short (*actual)(const unsigned char*) // output modeling function
)
{
int error = 0;
int i, j, samp;
for (i = 0; i < num_samp; i++)
{
samp = *i_samp++;
for (j = 0; j < oversamp; j++)
{
if (samp > error)
{
*o_samp++ = 1;
error += actual(o_samp) - samp;
} else
{
*o_samp++ = 0;
error += actual(o_samp) - samp;
}
}
}
}
chjmartin2, on Sun Feb 26, 2012 3:17 PM, said:
Edited by intvnut, Sun Feb 26, 2012 3:45 PM.
Posted Sun Feb 26, 2012 4:19 PM
1010_SIGD_Output.wav 517.87K
41 downloadsPosted Sun Feb 26, 2012 4:27 PM
chjmartin2, on Sun Feb 26, 2012 4:19 PM, said:
Posted Sun Feb 26, 2012 4:39 PM
Posted Sun Feb 26, 2012 5:01 PM
ld e, d ; ( 7) load d into e to waste cycles
Posted Sun Feb 26, 2012 5:04 PM
Posted Sun Feb 26, 2012 5:06 PM
chjmartin2, on Sun Feb 26, 2012 5:04 PM, said:
Edited by intvnut, Sun Feb 26, 2012 5:07 PM.
Posted Sun Feb 26, 2012 5:20 PM
Wave_Examples_ProperBalance.mp3 1.99MB
244 downloadsPosted Sun Feb 26, 2012 5:24 PM
chjmartin2, on Sun Feb 26, 2012 5:20 PM, said:
Posted Sun Feb 26, 2012 5:45 PM
Quote
Posted Sun Feb 26, 2012 5:47 PM
chjmartin2, on Sun Feb 26, 2012 5:40 PM, said:
Edited by intvnut, Sun Feb 26, 2012 5:48 PM.
Posted Sun Feb 26, 2012 6:26 PM
Posted Sun Feb 26, 2012 6:35 PM
0 members, 0 guests, 0 anonymous users