|
Post by ramon on Feb 11, 2022 19:01:41 GMT
; ------------------------------------------------------------- ; Beeper Music Routines ; USER 1 -> start and play ; USER 96 -> playnote ; USER 18 -> Stop ; ------------------------------------------------------------- ; ; Compile your music with a beepola player compatible with "in game player mode" ; like the ROM Beeper for example. ; Save your music as assembly and name it music.asm ; Delete the first line where it appears ORG NNNNN ; Copy music.asm into the SjasmPlus directory of your MPAGD installation ; Select UserBeeper.asm (this file) as user routine in your MPAGD editor ; Start the music with USER 1 at the moments of the game that you want. ; Include USER 96 in the main loop. ; Stop the music with USER 18 at any time. ; include USER 96 inside a WHILE ENDWHILE loop such as EVENT INTROMENU ; ; ------------------------------------------------------------- beeper cp 96 jp z,plsnd48 cp 18 jp z,Stopandmute initplayer ld a,1 ld (playfla),a ; PLAY flag = 1 startplayer call START ret plsnd48 ; check play DEFB $3E ; LD A,n playfla defb 0 cp 0 jr z,skipBeep ; play call NEXTNOTE ; PLAY skipBeep ret Stopandmute ; mute/pause/stop a sound. xor a ld (playfla),a ; MUTE/STOP flag ret ; BANCO de sonido BeepMusicPlayer include "music.asm" defs 4,0 UserBeeper.asm (1.36 KB)
|
|
|
Post by ramon on Feb 11, 2022 20:06:55 GMT
------------------------------------------------------ Geezer home screen example: ------------------------------------------------------
EVENT INTROMENU
INK 15 PAPER 0 CLS AT 4 9
LET CONTROL = 99 WHILE CONTROL >= 99 CLS AT 5 9 PRINTMODE 1 PRINT "DIAMOND GEEZER" PRINTMODE 0 AT 9 10 PRINT "1. KEYBOARD" AT 11 10 PRINT "2. KEMPSTON" AT 13 10 PRINT "3. SINCLAIR" LET CONTROL = 99 ; play intro music USER 1 WHILE CONTROL = 99 ; play next note USER 96 IF KEY OPTION1 LET CONTROL = 0 ENDIF IF KEY OPTION2 LET CONTROL = 1 ENDIF IF KEY OPTION3 LET CONTROL = 2 ENDIF ENDWHILE ; stop the music USER 18 ENDWHILE CLS
|
|