Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Beepola with ZX BASIC
#8
Hello ยก

Works perfectly (THANKS !!).


I have a few questions about Beepola:

1) How works the option "Exit after every note (for in-game music)" ?


I want to put the call to sub in the main loop of the game. I only get sound the first note again and again.


2) To make sure set the player and song to use an area of memory which won't interfere with the program, I try to put the asm code beepola generated in the program itself:

(I remove previously the colons at the end of the label before the EQUs https://www.boriel.com/forum/showthread.php?tid=368 )



Code:
(...)

    ASM
    PUSH IX
    END ASM

    RANDOMIZE USR @OLE

    ASM
    POP IX
    END ASM

END SUB






OLE:

ASM

; *****************************************************************************
; * The Music Box Player Engine
; *
; * Based on code written by Mark Alexander for the utility, The Music Box.
; * Modified by Chris Cowley
; *
; * Produced by Beepola v1.06.01
; ******************************************************************************

START:
                          LD    HL,MUSICDATA         ;  <- Pointer to Music Data. Change
                                                     ;     this to play a different song
                          LD   A,(HL)                         ; Get the loop start pointer
                          LD   (PATTERN_LOOP_BEGIN),A
                          INC  HL
                          LD   A,(HL)                         ; Get the song end pointer
                          LD   (PATTERN_LOOP_END),A
                          INC  HL

(... etc ...)

This also works well, but can you put more than one song in this way??


THANKS AND REGARDS
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)