Raczej nic nie trzeba przerabiac w ptplayerze wersja 6.4.
Dziala i na timerze i na VBI.
Dla odgrywania 50 Hz muzyki na 60 Hz VBI, mozesz uzyc czegos takiego w procedurze VBI
VBI
move.b NTSC,D0
beq.b Play
addq.b #1,Counter
cmp.b #6,Counter
bne.b Play
clr.b Counter
bra.b skipPlay
Play
bsr.w PlayMusic
skipPlay
rts
NTSC
dc.b 0
Counter
dc.b 0
link
To sa 2 opcje do wyboru:
d) Setting NO_TIMERS=1 disables the use of both CIA-B timers completely,
which means that the player doesn't depend on level-6 EXTER interrupts
anymore. NO_TIMERS=1 automatically includes VBLANK_MUSIC=1 (see below).
With NO_TIMERS set, your main program has to call all music subroutines
itself. The typical procedure in a VERTB-based main loop would be:
1. call _mt_music
2. wait at least 550 ticks, then call _mt_dmaon
3. wait at least 550 ticks again, then call _mt_setrep
The last two steps could for example be done by Copper interrupts.
CAUTION: You should know what you do, if you use this mode! It is up
to you to take care that calling a ptplayer function is not interrupted
by another ptplayer function.
e) Define VBLANK_MUSIC=1 (defaults to 0) if you don't want ptplayer
to set up a CIA-B Timer-A interrupt for music replay, which means
you cannot set the tempo with the F-command anymore (only the speed)
and you have to call _mt_music yourself out of your own VBlank
interrupt handler. Also sound effects will no longer work, when no
music is playing.
NOTE: CIA-B Timer-B is still used for enabling Audio DMA and setting
the loop pointers (unless you define NO_TIMERS=1). So it doesn't free
the Level-6 interrupt vector. This is just an option if you must
synchronize your music with your game or demo running in VBlank interrupts