Jump to content
IGNORED

How to detect PAL/NTSC machines


tmop69

Recommended Posts

Is there a way to detect if a TI99 is a PAL or a NTSC version? While testing on the real machine some of  the BASIC games I've compiled, I've noticed that on my PAL machine they are a little slower than running on the emulator (set on NTSC). So I would like to try to differentiate the delay added on the code based on the machine version.

 

Link to comment
Share on other sites

1 hour ago, mizapf said:

- In Extended Basic, let a sprite move across the screen and measure the time until it reaches some goal.

- In assembly language, poll CRU line 2 and check how many iterations it takes until the line is down (normally up).

 

Is there a way to check the CRU from XB? The test with the sprite would be ok for a brand new program (e.g. during the game title), but not feasible if you want to compile an existent one.

 

Link to comment
Share on other sites

54 minutes ago, Asmusr said:

Does compiling make the difference between NTSC and PAL bigger?

These legacy games were not designed to by compiled, so it's necessary to place some delays on CALL KEY/JOYST and HCHAR/VCHAR instructions to make the game playable.


Usually from 2 to 4 frames of delay is enough for KEY/JOYST, while for HCHAR/VCHAR it depends on the game. To compile I'm using the emulator set to NTSC (so 60hz) and the tuning was done on such setup. When I've tested some compiled games on my PAL TI99 I was able to notice the difference. Nothing severe, however why not trying to see if this can be improved? So, this is the reason of the question.

 

Link to comment
Share on other sites

1 hour ago, tmop69 said:

Is there a way to check the CRU from XB? The test with the sprite would be ok for a brand new program (e.g. during the game title), but not feasible if you want to compile an existent one.

For a minimal impact, one could do that with a sprite color that blends with the background.

 

10 CALL SPRITE(#1,42,8,96,1,0,10)
20 A=0
30 CALL POSITION(#1,X,Y)
40 A=A+1
50 IF Y<20 THEN 30
60 IF A>15 THEN PRINT "PAL/50 Hz" ELSE PRINT "NTSC/60 Hz"

 

Accessing CRU is only possible via machine language programs.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, mizapf said:

For a minimal impact, one could do that with a sprite color that blends with the background.

 

 


10 CALL SPRITE(#1,42,8,96,1,0,10)
20 A=0
30 CALL POSITION(#1,X,Y)
40 A=A+1
50 IF Y<20 THEN 30
60 IF A>15 THEN PRINT "PAL/50 Hz" ELSE PRINT "NTSC/60 Hz"

 

 

Accessing CRU is only possible via machine language programs.

 

Thanks!

 

 

Link to comment
Share on other sites

13 hours ago, Asmusr said:

The reason I'm asking is that the only difference between NTSC and PAL with respect to speed should be when something is interrupt driven, which for XB means sprite movement or sound. And I would assume the difference is the same compiled or not.

The sprite speed should be the same, but the value that the BASIC code counts up to while timing would change. :)

 

  • Like 1
Link to comment
Share on other sites

3 hours ago, sometimes99er said:

The ISR is called 50 versus 60 times a second, so how would the sprite speed be the same ? :)
 

The question was compiled XB versus not compiled.

 

(Edit: Well, there were two overlapping questions, I guess, but that's the one I was answering ;) ).

 

Edited by Tursi
  • Like 1
Link to comment
Share on other sites

On 11/14/2020 at 7:17 AM, tmop69 said:

Is there a way to check the CRU from XB? The test with the sprite would be ok for a brand new program (e.g. during the game title), but not feasible if you want to compile an existent one.

 

RXB has a command CALL IO that can talk to any CRU address but some care may be required on some that might interfere with GPL or OS.

A WIFI Weather Station is any example of it being used on a TI99/4A using XB language.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...