Playback speed of music in PAL & NTSC

Página 1/2
| 2

Por XoRRoX

Supporter (14)

imagem de XoRRoX

21-02-2021, 08:51

I'm not very knowledgable regarding the MSX yet, but, if I understand correctly, there are PAL and NTSC machines.

If so, is music being played back slower or faster according to the machine they were composed on? Or is it somehow compensated for, for example in software?

Entrar ou registrar-se para comentar

Por ToriHino

Paladin (721)

imagem de ToriHino

21-02-2021, 09:57

Yes, in general music is played faster on a NTSC (60hz) machine than on a PAL (50Hz) machine. There are software titles who can compensate for it, but this is up to the replay routine.

Note that on MSX2 and higher you can just switch between 50 en 60hz by activating either one of these modes on the VDP. This is however not always a good idea since it depends on the display connected whether it can cope with this change of refresh rate.

Por XoRRoX

Supporter (14)

imagem de XoRRoX

21-02-2021, 20:02

Okay, thanks for the info.
Do you by any chance have names of games that compensate?

Por Meits

Scribe (6437)

imagem de Meits

21-02-2021, 20:20

There aren't many. Commercial Japanese games that run the music correctly on European machines just boldly switch your PAL machine to 60Hz (Metal Gear 2, Quarth, Androgynous to name a few). There might be some homebrew/scene games which play the music correctly on both frequencies. Can't name any.

Por aoineko

Master (163)

imagem de aoineko

21-02-2021, 21:37

Music trackers often have a delay parameter that allows you to determine how often the sound processor (PSG) is updated (depending on the speed of the music). If the delay is 6 frames on a 60 Hz machine, it is quite simple to set it to 5 on a 50 Hz machine and thus have the same playback speed for the music. But this is very rarely the case. If the music is faster, it is very complicated to adapt the speed according to the machine (at least for trackers).

Por Manuel

Ascended (18088)

imagem de Manuel

21-02-2021, 22:04

XoRRoX: why are you asking?

Por geijoenr

Champion (264)

imagem de geijoenr

21-02-2021, 23:02

I can tell what I do is precisely detect if the computer is running at 60 or 50Hz and then, assuming that the default music timing is 50Hz skip one playback step every 5 interrupts when running at 60Hz, and playback normally when running at 50Hz.
Maybe this is not perfectly accurate, but I think there is not much else you can do?

Por Grauw

Ascended (10016)

imagem de Grauw

22-02-2021, 01:11

If you want to be “perfect” then on MSX2 you can use line interrupts to get a 300 Hz timer for music replaying on both 50 and 60 Hz display frequencies, VGMPlay does this but it is not a common approach. The approach you describe is perfectly fine I think and with plenty of precedent.

To determine the display frequency on MSX1 check bit 7 at address 002BH in the BIOS, and on MSX2 check bit 1 of the VDP register 9 mirror.

Por Maggoo

Paragon (1214)

imagem de Maggoo

22-02-2021, 01:37

Small example on how to call your Tracker / FX replayer and adjust the replay speed based on address $2b.

PlayMus:
	ld a,(#2b)
	and 128
	jp nz,MusInt                          ; if (Bit 7 = 1) then play music at every vblank (50hz)
	ld a,(muscnt)                         ; Else
	inc a                                     ; use simple counter to skip replayer every 6th vblank (60hz)
	ld (muscnt),a
	cp 6
	jp z,ResetMus
MusInt:
        xor a
        ld (PT3_SETUP),a
        call	PT3_ROUT
        call	PT3_PLAY
        call ayFX_PLAY
        ret
ResetMus:
	xor a
	ld (muscnt),a
	ret

Por ro

Scribe (4452)

imagem de ro

22-02-2021, 13:56

Exactly, this is how most re-players do the trick. It's kinda weird, you're skipping a frame every 6 frames. That makes the timing kinda wobbly, right. Luckily, not every one has trained ears like Wolf does and won't even know this happens. Itsa dirty trick, but it works. And it is not too complex.

It all depends on the music re-player (or driver). For example, Moonblaster and Oracle do this.

Por XoRRoX

Supporter (14)

imagem de XoRRoX

22-02-2021, 13:58

Thanks for your insights, all Smile

The reason why I asked is that during my research on the possibility to convert MSX AY-3-8910 music to and play on the ZX-Spectrum natively, I discovered that there were PAL & NTSC MSXs. Because the Spectrum is 50 Hz (PAL), 60 Hz MSX tunes would need to be frame-converted.

Either that or the playback routine could compensate by frame-dropping similar as shown above?

Página 1/2
| 2