Before going any further, you need to know :
For more detailled informations about compiling STarKos songs, see the documentation FR,EN,DE.
Run the GenPlay utility.
RUN”GP
![]() | This is the smallest and fastest of the 3 types of STarKos players. The program will ask for the address in memory where the player will be located and the filename of the generated player. |
---|
To play the song, you have to call the player periodically (according to the song frequency: 50Hz, 100Hz, 300Hz, etc) :
; Exemple how to play a 50Hz STarKos song ; with the ASM Player ; address of your STarKos player sks_player equ &4000 ; address of your STarKos compiled song sks_songdata equ &5000 ; disable the firmware interrupt service routine ld hl,&C9FB ; poke "EI:RET" ld (&38),hl ; in the IM1 vector im 1 ; select IM1 just in case ; Initialize the STarKos player ld de,sks_songdata call sks_player ; Synchronisation with the frame flyback ; which should be a 50Hz signal (if no ; one messed up with the CRTC before =) wait_vsync ld b,&F5 in a,(c) rra jr nc,wait_vsync+2 ; wait for a few 300Hz interrupts halt halt halt ; Set a white raster in the BORDER to "see" how much ; CPU time the player takes. ld bc,&7F10 out (c),c ld c,&4B out (c),c ; Play the STarKos song call sks_player+3 ; Set the BORDER to black ld bc,&7F54 out (c),c ; Exit after 20 seconds ld hl,20*50 var_timer equ $-2 dec hl ld (var_timer),hl ld a,h or l jr nz,wait_vsync ; Stop the STarKos player / Mute sounds call sks_player+6 ; [...]
To use it from assembly, see the ASM Player exemple above, it's exactly the same except that this player is a bit slower and bigger.
From BASIC :
10 MEMORY &3FFF 20 LOAD "SKSBAS.BIN",&4000 ' Load the player 30 LOAD "SONG.BIN",&5000 ' Load the song 40 CALL &4000,&5000 ' Initialize the player 50 ' 50Hz Loop 60 CALL &BD19 ' Wait frame fly back 70 CALL &4003 ' Play the song 80 IF INKEY$<>" " THEN GOTO 60 ' loop until space is pressed 90 CALL &4006 ' Stop player and mute sounds
From BASIC :
10 MEMORY &3FFF 20 LOAD "SKSINT.BIN",&4000 ' Load the player 30 LOAD "SONG.BIN",&5000 ' Load the song 40 CALL &4000,&5000 ' Initialize the player and start playing the music 50 IF INKEY$<>" " THEN GOTO 50 ' do nothing until space is pressed 90 CALL &4003 ' Stop player and mute sounds
For more detailled informations about the STarKos player generator, see the documentation FR,EN,DE.