02-19-2022, 12:03 AM
(This post was last modified: 02-19-2022, 12:07 AM by worcestersource.)
Hello everyone,
I thought this would be a nifty place to pop some routines to make sound effects without resorting to asm.
Which makes a nice 'bwop' sound. it'll also change your border colour, so add the border value to the out statement to stop it changing colour. For example, for the a blue border:
You can play around with this, such as changing the 16 for an 8, or making y count down so the loop duration gets longer each time.
Steve
I thought this would be a nifty place to pop some routines to make sound effects without resorting to asm.
Code:
sub soundBwop()
dim x, y as uByte
do until x = 255
out 254, (y * 8)
let y = x
do until y > 239
let y = y + 16
loop
let x = x + 1
loop
end sub
Which makes a nice 'bwop' sound. it'll also change your border colour, so add the border value to the out statement to stop it changing colour. For example, for the a blue border:
Code:
out 254, (y * 8) + 1
You can play around with this, such as changing the 16 for an 8, or making y count down so the loop duration gets longer each time.
Steve