Posted Mon Apr 25, 2011 6:27 PM
Posted Mon Apr 25, 2011 6:32 PM
Posted Mon Apr 25, 2011 9:15 PM
GroovyBee, on Mon Apr 25, 2011 6:32 PM, said:
Posted Wed Apr 27, 2011 7:33 AM
Posted Wed Apr 27, 2011 1:41 PM
chjmartin2, on Wed Apr 27, 2011 7:33 AM, said:
Address# PacMr OhSucks 3c06 call $3cf8 call $5200Next at address $5200
5200 f5 push af 5201 c5 push bc 5202 d5 push de 5203 e5 push hl 5204 213052 ld hl,$5230 5207 0efc ld c,$fc 5209 23 inc hl 520a 7e ld a,(hl) 520b 57 ld d,a 520c 0608 ld b,$08 520e cb12 rl d 5210 1eff ld e,$ff 5212 3002 jr nc,$5216 5214 1efe ld e,$fe 5216 ed59 out (c),e 5218 3e0a ld a,$0a 521a 3d dec a 521b 20fd jr nz,$521a 521d 10ef djnz $520e 521f 7c ld a,h 5220 fe60 cp $60 5222 c20552 jp nz,$5205 5225 e1 pop hl 5226 d1 pop de 5227 c1 pop bc 5228 f1 pop af 5229 c9 retAll code after address $5230 is the voice and should be considered raw bytes (.db).
PacOh.zip 66.25K
12 downloadsPosted Wed Apr 27, 2011 8:12 PM
; ; Disassembled by: ; DASMx object code disassembler ; (c) Copyright 1996-1998 Conquest Consultants ; Version 1.20 (Apr 2 1998) ; ; File: LOAD.BIN ; Date: Wed Apr 20 19:16:28 2011 ; CPU: Zilog Z80 (Z80 family) ; ; org $3E80 ; ld hl,$3F00 ld c,$FC L3E85: ld b,$08 L3E87: in a,(c) out (c),a cp $FF rl d ld a,$0A L3E91: dec a jr nz,L3E91 djnz L3E87 ld a,d inc hl ld (hl),a ld ($3002),hl ld a,h cp $7D jp nz,L3E85 ret
; ; Disassembled by: ; DASMx object code disassembler ; (c) Copyright 1996-1998 Conquest Consultants ; Version 1.20 (Apr 2 1998) ; ; File: SPEECH.bin ; Date: Wed Apr 20 19:15:23 2011 ; CPU: Zilog Z80 (Z80 family) ; ; org $3E80 ; ld hl,$3F00 ld c,$FC L3E85: inc hl ld a,(hl) ld d,a ld ($3002),hl ld b,$08 L3E8D: rl d ld e,$FF jr nc,L3E95 ld e,$FE L3E95: out (c),e ld a,$0A L3E99: dec a jr nz,L3E99 djnz L3E8D ld a,h cp $7D jp nz,L3E85 ret
Posted Thu Apr 28, 2011 3:02 AM
chjmartin2, on Wed Apr 27, 2011 8:12 PM, said:
Posted Thu Apr 28, 2011 10:45 AM
chjmartin2, on Wed Apr 27, 2011 8:12 PM, said:
org $3E80 MAIN: ld hl,$3F00 ; Memory Location to ROM Sample (= 16128) ld c,$FC ; I/O port for sound replay: ld b,$08 ; Sub-Samples subsamp: in a,(c) ; Read from I/O port out (c),a ; and send it right back (playback) ; bit 7 in register A will be set if there is sound ; all other bits will be set by default ; register A will have the value 255 ($FF) or 254 ($FE) cp $FF ; Compare register A with 255 ($FF) to see if bit 7 has been set ; Carrier bit will be set if register A has a lower value ; The carrier bit will rotate left into register D to bit 0 rl d ; c -> bit 0, bit 0 -> bit 1, ....., bit 6 -> bit 7, bit 7 -> c ; register D becomes a collection of 8x carrier bits ld a,$0A ; Size of the delay loop DELAY: dec a ; decrease delay counter a = a - 1 jr nz,DELAY ; repeat until register A hits zero djnz subsamp ; b = b - 1, jump if b is not zero ld a,d ; store the collected carrier bits into register A inc hl ; next memory location ld (hl),a ; store the collected carrier bits into memory ld ($3002),hl ; show the HL register in upperleft corner on screen ld a,h ; store the upper H register into A ; If register H is 125 ($7D) then memory address location cp $7D ; 32000 ($7D00) has been reached (= end address) jp nz,replay ; Repeat until memory address location 32000 ($7D00) is reached ret ; Back to BASICPlay sound
org $3E80 MAIN: ld hl,$3F00 ; Memory Location to ROM Sample (= 16128) ld c,$FC ; I/O port for sound replay: inc hl ; next memory location ld a,(hl) ; fetch the collected carrier bits from memory address ld d,a ; store collected carrier bits into register D ld ($3002),hl ; show the HL register in upperleft corner on screen ld b,$08 ; Sub-Samples subsamp: ; The 7th bit of register D will rotate left into the carrier flag rl d ; c -> bit 0, bit 0 -> bit 1, ....., bit 6 -> bit 7, bit 7 -> c ld e,$FF ; default value 255 ($FF), bit 7 for I/O has been set jr nc,Output ; Was the carrier set during the "rl d" command ld e,$FE ; carrier was set -> reset bit 7 for I/O Output: out (c),e ; sending I/O ld a,$0A ; Size of the delay loop DELAY: dec a ; decrease delay counter a = a - 1 jr nz,DELAY ; repeat until register A hits zero djnz subsamp ; b = b - 1, jump if b is not zero ld a,h ; store the upper H register into A ; If register H is 125 ($7D) then memory address location cp $7D ; 32000 ($7D00) has been reached jp nz,replay ; Repeat until memory address location 32000 ($7D00) is reached ret ; Back to BASICBasically the same thing as your code, but Harrold is using the carrier flag to determine if bit 7 has been set.
Posted Sat Apr 30, 2011 10:40 AM
mvdsteenoven, on Sat Apr 30, 2011 8:14 AM, said:
Posted Sat Apr 30, 2011 10:59 AM
chjmartin2, on Sat Apr 30, 2011 10:40 AM, said:
mvdsteenoven, on Sat Apr 30, 2011 8:14 AM, said:
Posted Sat Apr 30, 2011 12:30 PM
chjmartin2, on Sat Apr 30, 2011 10:59 AM, said:
Posted Sat Jun 18, 2011 9:35 PM
Screenres 1500,900,32: CLS
LOCATE 1, 1
FILENAME$ = "forever.raw"
TOGGLE = 0
PAUSER = 0
randomize timer
samples = 355546
dim audio(samples+10) as UBYTE, audioout(samples+10) as UBYTE, naudio(samples+10) as UBYTE, ebitout(samples+10) as UBYTE
'input "How many levels?",levels
totalbitcount=samples
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
for j=1 to samples
naudio(j)=audio(j)
pset (j/(samples/1500),100+audio(j)),rgb(audio(j),255,audio(j)/2)
'Clip Check
'if audio(j)>255 then audio(j)=255
'if audio(j)<0 then audio(j)=0
if audio(j)>127 then
audioout(j)=1
ebitout(j)=255
else
audioout(j)=0
ebitout(j)=0
end if
' Distortion Shaping - 4th order
'locate 55,1:print "audio(j): ";audio(j)
'locate 56,1:print "audioout(j): ";audioout(j)
derror=naudio(j)-(255*audioout(j))
'locate 57,1:print "derror: ";derror
'locate 58,1:print "naudio(j): ";naudio(j)
'Noise Shaping & Dither Filter Block
'audio(j)=audio(j)+int(rnd(1)*32-16)
audio(j+1)=audio(j+1)+int(derror*.5)+int(rnd(1)*32-16)
audio(j+2)=audio(j+2)+int(derror*.1)+int(rnd(1)*10-5)
audio(j+3)=audio(j+3)+int(derror*.1)+int(rnd(1)*10-5)
'audio(j+4)=audio(j+4)+int(derror*.1)+int(rnd(1)*16-8)
'audio(j+5)=audio(j+5)+int(derror*.1)+int(rnd(1)*16-8)
'audio(j+6)=audio(j+6)+int(derror*.1)
'audio(j+7)=audio(j+7)+int(derror*.1)
audio(j+8)=audio(j+8)+int(derror*.1)+int(rnd(1)*10-5)
audio(j+9)=audio(j+9)+int(derror*.1)+int(rnd(1)*10-5)
audio(j+10)=audio(j+10)+int(derror*.1)+int(rnd(1)*10-5)
pset (j/(samples/1500),400+audioout(j)*25),rgb(audio(j)/2,255,audio(j))
'locate 65,1:print "audio: ";audio(j);" - audioout: ";audioout(j)
bitcounter=bitcounter+1
outputbit$=outputbit$+str$(audioout(j))
if bitcounter/8=int(bitcounter/8) then
ebitcounter=ebitcounter+1
bitaudioout(ebitcounter)=128*val(mid$(outputbit$,1,1))+64*val(mid$(outputbit$,2,1))+32*val(mid$(outputbit$,3,1))+16*val(mid$(outputbit$,4,1))+8*val(mid$(outputbit$,5,1))+4*val(mid$(outputbit$,6,1))+2*val(mid$(outputbit$,7,1))+1*val(mid$(outputbit$,8,1))
locate 50,1:print outputbit$;" - ";bitaudioout(ebitcounter)
outputbit$=""
end if
'pset (bitcounter/(totalbitcount/1500),400+levels+50+0),rgb(255,255,255)
for c=1 to pauser:next c
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 a 1-BIT Playback at 50,700 Hz
; Must be run on Actual Aquarius with Bank-Switching Capable Cartridge
; Requires 56k 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
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
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
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
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
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
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
halt
main:
ld hl, $C000 ; Memory Location to ROM Sample
ld bc, 8192 ; Number of Samples
replay: ld d, 8 ; Sub-Samples
ld e, (hl) ; load sample into e
;ld ($3002),hl ; show the HL register in upperleft corner of screen
subsamp:
rl e ; 7th bit of register E will rotate left into the carrier flag
ld a, $FF ; default value 255 bit 7 for i/o has been set
jp nc, Output ; Was the carrier set during the "rl d" command
ld a, $FE ; Carrier was set -> reset bit 7 for I/O
Output:
out ($FC),a ; sending I/O
; ld a, 10 ; delay loop
;Delay:
; dec a ; decrease a
; jr nz, Delay ; repeast until a is zero
dec d ; countdown
ld a, d ; check on d
jp nz, subsamp ; repeat until 8 samples
inc hl
dec bc ; Decrement Sample Counter
ld a, c ; Load C
or b ; Is BC Zero
jp nz, replay ; If it isn't zero, keep playing
FINISH:
ret
; Zero-Fill Remainder of Cartridge ROM
.org $FFFF
.byte $00
.end
seriousBLEEP.wav 54.83K
27 downloads
Wave1.wav 1.12MB
32 downloads
Serious_Bleep.wav 796.57K
46 downloads
1bitbank.bin 64K
15 downloads
Posted Sun Jun 19, 2011 10:06 AM
Posted Fri Nov 25, 2011 4:54 PM
Posted Fri Nov 25, 2011 9:03 PM
Posted Fri Nov 25, 2011 10:51 PM
Posted Sat Nov 26, 2011 5:27 PM
Tcats_6.8k.mp3 1.15MB
28 downloads
Posted Sat Nov 26, 2011 6:09 PM
Posted Sat Jan 14, 2012 3:27 PM
; Program to Create Sound Using a 4-BIT PWM at 9,724 Hz ; Must be run on Actual Aquarius with Bank-Switching Capable Cartridge ; Requires 56k 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 init: ; Load the Data Table into the Screen ld hl, PWMDATA ; load memory location PWM Data into HL ld de, 12328 ; use the screen memory (good a place as any) ld bc, 256 ; 256 Bytes dude ldir ; load it up 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 (13248), hl ; put it into the screen location for the sample ld bc, 8192 ; number of bytes of samples ld hl, $C000 ; (10) Memory Location to ROM Sample push hl ; (11) put the rom location on the stack replay: pop hl ; (10) get the Rom memory location from the stack ld a, (hl) ; (7) load sample into a ex af, af' ; (4) original sample into the alt register ld a, (hl) ; (7) load sample into e inc hl ; (6) Move up the Rom sample location push hl ; (11) put the rom location back on the stack and 240 ; we need the first 4 bit value first, 240='11110000' ld e,a ; get the result back into e ld hl, 12328 ; load the start of the screen (that is where the PWM data is) ld d, 0 ; put zero into d to make sure you are just adding the 8 bit values add hl, de ; add e to hl which moves to the right pwm memory location ld a, (hl) ; (7) load first byte of PWM model into A out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample inc hl ; (6) move up memory location ld a, (hl) ; (7) load second pwm model out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (11) send out the sample ex af, af' ; (4) original sample back into accumulator and 15 ; now we need the trailing 4 bit value, 15='00001111' rlca ; rotate accumulator left one bit rlca ; rotate accumulator left one bit rlca ; rotate accumulator left one bit rlca ; rotate accumulator left one bit ld e,a ; put the value back into e ld hl, 12328 ; load the start of the screen (that is where the PWM data is) ld d, 0 ; put zero into d to make sure you are just adding the 8 bit values add hl, de ; add e to hl which moves to the right pwm memory location ld a, (hl) ; (7) load first byte of PWM model into A out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample inc hl ; (6) move up memory location ld a, (hl) ; (7) load second pwm model out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample rlca ; (4) rotate the PWM model left out ($fc), a ; (12) send out the sample dec bc ; (6) Reduce the byte counter ld a, b ; grab the counter or c ; check if it is zero jp nz, replay ; do it again until we are done! FINISH: pop hl ; (10) clean up the stack ;jp FINISH ret PWMDATA: .db 0,0,255,255,255,255,255,255,254,254,254,254,254,254,254,254 .db 1,0,255,255,255,255,255,255,254,254,254,254,254,254,254,254 .db 8,16,255,255,255,255,255,254,254,254,254,254,254,254,254,254 .db 17,16,255,255,255,255,255,254,254,254,254,254,254,254,254,254 .db 17,17,255,255,255,255,254,254,254,254,254,254,254,254,254,254 .db 36,146,255,255,255,255,254,254,254,254,254,254,254,254,254,254 .db 74,164,255,255,255,254,254,254,254,254,254,254,254,254,254,254 .db 42,170,255,255,255,254,254,254,254,254,254,254,254,254,254,254 .db 85,85,255,255,254,254,254,254,254,254,254,254,254,254,254,254 .db 85,213,255,255,254,254,254,254,254,254,254,254,254,254,254,254 .db 213,213,255,254,254,254,254,254,254,254,254,254,254,254,254,254 .db 221,213,255,254,254,254,254,254,254,254,254,254,254,254,254,254 .db 221,245,254,254,254,254,254,254,254,254,254,254,254,254,254,254 .db 221,247,254,254,254,254,254,254,254,254,254,254,254,254,254,254 .db 223,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254 .db 254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254 ; Zero-Fill Remainder of Cartridge ROM .org $FFFF .byte $00 .end
Edited by chjmartin2, Sat Jan 14, 2012 3:31 PM.
Posted Sun Jan 15, 2012 9:20 AM
Posted Tue Feb 21, 2012 3:51 PM
Posted Tue Feb 21, 2012 6:03 PM
Posted Tue Feb 21, 2012 8:51 PM
chjmartin2, on Tue Feb 21, 2012 3:51 PM, said:
0 members, 1 guests, 0 anonymous users