Region autodetection for PAL/NTSC

dale_coop

Moderator
Staff member
Thanks, it's a strange behavior over all.

Here is the intialization script (what should be totally okay, it's the version I last saved in june 2022 since when it worked well) ...

Try changing those lines:
Code:
    JSR getTVSystem
    ;;;; lda #SOUND_REGION_NTSC ;or #SOUND_REGION_PAL, or #SOUND_REGION_DENDY
    sta sound_param_byte_0

Into:
Code:
    LDA #1
    STA skipNMI
    JSR getTVSystem ; loads region instead of hardcoding it
    ;;;; lda #SOUND_REGION_NTSC ;or #SOUND_REGION_PAL, or #SOUND_REGION_DENDY
    sta sound_param_byte_0
    LDA #0
    STA skipNMI

Let me know if it helps with your issue.
 

force73

Member
Try changing those lines:
Code:
    JSR getTVSystem
    ;;;; lda #SOUND_REGION_NTSC ;or #SOUND_REGION_PAL, or #SOUND_REGION_DENDY
    sta sound_param_byte_0

Into:
Code:
    LDA #1
    STA skipNMI
    JSR getTVSystem ; loads region instead of hardcoding it
    ;;;; lda #SOUND_REGION_NTSC ;or #SOUND_REGION_PAL, or #SOUND_REGION_DENDY
    sta sound_param_byte_0
    LDA #0
    STA skipNMI

Let me know if it helps with your issue.
Thanks for your code but unfortunately it didn't changed anything. PAL music still slower.
 

force73

Member
Gentlemen, there is an update to this topic. The code works fine, the PAL and NTSC switching works fine. It really is, how the music was made in Famitracker. It's not finally clear how to descibe it, but we've found out, one song in the game plays totally fine in NTSC and PAL. Another song didn't. What's behind will be found out the next days for sure.

Thanks for helping! It simply hadn't to do with the game code. Strange anyway.
 
Last edited:
Top Bottom