Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound effects?
#9
There's no real 'source' as yet, because I sort of hacked it in there to prove a point. :-)

Basically I created a tune and 'compiled' it from Beepola, then saved it as a .TAP file with a start address of 64000. I then added a 'randomize usr 64000' call into my game at the required point and compiled it to a low-enough address that I knew the game wouldn't overwrite the music. Then I loaded both the game code and the music code before starting the game.

This seems a little fiddly, but it works.

You can get Beepola to output an .asm file instead (which I think would be easier in the long run), but I've not had time to finish playing around with that method yet - it seems a neater way of including the music so that you can build the whole thing in one go.

The ASM *almost* compiles just by wrapping it in an asm/end asm block, there just seems to be a very slight incompatibility with how ZXBasic handles EQU. Beepola outputs this:

Code:
; *** DATA ***
VECTOR_TABLE_LOC:    EQU $FE00
BORDER_CLR:          EQU $0

But ZXBasic doesn't like the colons at the end of the label before the EQUs. Remove those and it compiles fine!

i.e.
Code:
; *** DATA ***
VECTOR_TABLE_LOC    EQU $FE00
BORDER_CLR          EQU $0
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)