tmop69 Posted November 14, 2020 Share Posted November 14, 2020 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. Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/ Share on other sites More sharing options...
+mizapf Posted November 14, 2020 Share Posted November 14, 2020 - 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). Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4676672 Share on other sites More sharing options...
tmop69 Posted November 14, 2020 Author Share Posted November 14, 2020 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. Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4676695 Share on other sites More sharing options...
Asmusr Posted November 14, 2020 Share Posted November 14, 2020 Does compiling make the difference between NTSC and PAL bigger? Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4676699 Share on other sites More sharing options...
tmop69 Posted November 14, 2020 Author Share Posted November 14, 2020 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. Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4676724 Share on other sites More sharing options...
Asmusr Posted November 14, 2020 Share Posted November 14, 2020 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. Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4676733 Share on other sites More sharing options...
+mizapf Posted November 14, 2020 Share Posted November 14, 2020 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. 2 1 Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4676747 Share on other sites More sharing options...
tmop69 Posted November 14, 2020 Author Share Posted November 14, 2020 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! Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4676752 Share on other sites More sharing options...
Tursi Posted November 15, 2020 Share Posted November 15, 2020 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. 1 Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4677166 Share on other sites More sharing options...
sometimes99er Posted November 15, 2020 Share Posted November 15, 2020 4 hours ago, Tursi said: The sprite speed should be the same ... The ISR is called 50 versus 60 times a second, so how would the sprite speed be the same ? Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4677224 Share on other sites More sharing options...
+mizapf Posted November 15, 2020 Share Posted November 15, 2020 I think Tursi referred to the timing of the compiled versus the interpreted version. 2 Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4677298 Share on other sites More sharing options...
Tursi Posted November 15, 2020 Share Posted November 15, 2020 (edited) 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 November 15, 2020 by Tursi 1 Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4677326 Share on other sites More sharing options...
RXB Posted November 15, 2020 Share Posted November 15, 2020 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. 1 Quote Link to comment https://forums.atariage.com/topic/313534-how-to-detect-palntsc-machines/#findComment-4677491 Share on other sites More sharing options...
Recommended Posts
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.