vol Posted April 6, 2021 Share Posted April 6, 2021 Is there an easy way to distinguish a PAL (European) system from NTSC (American)? It seems the VDP can't provide this information. Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 6, 2021 Share Posted April 6, 2021 Well, as Force Command is able to give that information by typing the sysinfo command (which gives TMS9929A PAL on my system), it must be possible. So I guess you can either ask it's author (Jedimatt42) and/or research his source at Github. 1 Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 6, 2021 Share Posted April 6, 2021 (edited) Did a quick look, and this is the isPal() function he is using to detect a PAL system: https://github.com/jedimatt42/fcmd/blob/478f949664e3fbf65fe60bdd0d4f0a26b7f47b03/b10_isPal.c Edited April 6, 2021 by xahmol 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted April 6, 2021 Share Posted April 6, 2021 (edited) 54 minutes ago, vol said: Is there an easy way to distinguish a PAL (European) system from NTSC (American)? It seems the VDP can't provide this information. Sure, count the number of interrupts. You can set the interrupt hook at 83C4, use a loop and check how many interrupts have occurred at the end of the loop. NTSC has 60 interrupts per second, PAL has 50. If you don't have the hardware, you can check it e.g. in MAME when you run the drivers ti99_4ae vs. ti99_4a. Edited April 6, 2021 by mizapf 1 Quote Link to comment Share on other sites More sharing options...
vol Posted April 6, 2021 Author Share Posted April 6, 2021 1 hour ago, mizapf said: Sure, count the number of interrupts. You can set the interrupt hook at 83C4, use a loop and check how many interrupts have occurred at the end of the loop. NTSC has 60 interrupts per second, PAL has 50. If you don't have the hardware, you can check it e.g. in MAME when you run the drivers ti99_4ae vs. ti99_4a. It sounds like a joke. We need interrupts to get timings and you ask to use timings to count interrupts. I seek rather a ROM byte sequence which allows us to distinguish NTSC from PAL. IMHO there were only several revisions of main ROM... Quote Link to comment Share on other sites More sharing options...
vol Posted April 6, 2021 Author Share Posted April 6, 2021 (edited) 45 minutes ago, vol said: It sounds like a joke. We need interrupts to get timings and you ask to use timings to count interrupts. I seek rather a ROM byte sequence which allows us to distinguish NTSC from PAL. IMHO there were only several revisions of main ROM... I've just checked PAL and NTSC ROMs. Surprisingly they are identical! So there is no an easy way to find out what system is used. Edited April 6, 2021 by vol Quote Link to comment Share on other sites More sharing options...
+mizapf Posted April 6, 2021 Share Posted April 6, 2021 (edited) 2 hours ago, vol said: It sounds like a joke. We need interrupts to get timings and you ask to use timings to count interrupts. I seek rather a ROM byte sequence which allows us to distinguish NTSC from PAL. IMHO there were only several revisions of main ROM... No, seriously, we only have two possibilities: 50 Hz or 60 Hz; this is all you need to find out. From there you can calculate any timing factors as needed. Not sure whether you followed or found the discussions already; the 50Hz vs. 60Hz issue has been mentioned several times on this forum. None of the classic games actually checked for timing, which is why the games run visibly slower on European consoles. Edited April 6, 2021 by mizapf 3 Quote Link to comment Share on other sites More sharing options...
Tursi Posted April 8, 2021 Share Posted April 8, 2021 On many systems, the CPU and the VDP are derived from the same clock, so counting cycles is not necessarily reliable, but the TI clocks are distinct, so it's the only way. It's not that nobody thought to look at the ROMs for the last 40 years. 3 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted April 9, 2021 Share Posted April 9, 2021 On 4/6/2021 at 5:21 PM, vol said: It sounds like a joke. We need interrupts to get timings and you ask to use timings to count interrupts. No, it's not a joke. As indicated in other responses, the CPU in the TI 99/4A is running from one frequency. It's the same in all consoles. The VDP is running from a different frequency, and that's different for PAL and VDP. Thus you can compare the two, by running a certain number of loops (per CPU frequency) and count the number of interrupts that occurs (per VDP frequency) during these loops. A PAL console will run through 5/6 as many interupts as a NTSC console will. 4 Quote Link to comment Share on other sites More sharing options...
vol Posted April 10, 2021 Author Share Posted April 10, 2021 On 4/9/2021 at 11:22 AM, apersson850 said: No, it's not a joke. As indicated in other responses, the CPU in the TI 99/4A is running from one frequency. It's the same in all consoles. The VDP is running from a different frequency, and that's different for PAL and VDP. Thus you can compare the two, by running a certain number of loops (per CPU frequency) and count the number of interrupts that occurs (per VDP frequency) during these loops. A PAL console will run through 5/6 as many interupts as a NTSC console will. Let me explain my thoughts about this idea. I have written code which implemented a simple stopwatch. I just counted number of interrupts and then divided this number by 60. It works fine for an NTSC system but for a PAL system we need a different divider, we need 50 instead of 60. So I sought an easy way to distinguish a PAL system from an NTSC. I also uses more complex code which uses the TI99/4A timer and is PAL/NTSC independent. So when I got an idea to make even more complex code to detect PAL or NTSC it sounds for me like a joke. Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 10, 2021 Share Posted April 10, 2021 You could of course also let the user select PAL or NTSC. 1 Quote Link to comment Share on other sites More sharing options...
Stuart Posted April 10, 2021 Share Posted April 10, 2021 45 minutes ago, xahmol said: You could of course also let the user select PAL or NTSC. Unfortunately those terms will be meaningless to many users ... ;-( Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 10, 2021 Share Posted April 10, 2021 (edited) 48 minutes ago, Stuart said: Unfortunately those terms will be meaningless to many users ... ;-( Are you sure? Every single serious Commodore user knows exactly if he (or sometimes she) has a PAL or NTSC. And for the TI: I am pretty sure that the ones having a PAL would know, so you could just say to the user if you don’t know, use NTSC. Also, the target group of people still using the TI and know how to get new software from it from here probably is significantly more knowledgable than the generic home computer owner of the past would be. And if it is a simple toggle, a user can just try both and see what gives best results. Edited April 10, 2021 by xahmol 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted April 10, 2021 Share Posted April 10, 2021 I knew about PAL since I was 12 years old, because I always had this box between the console and the TV set. ? 1 1 Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 10, 2021 Share Posted April 10, 2021 Just now, mizapf said: I knew about PAL since I was 12 years old, because I always had this box between the console and the TV set. ? Same here ?and know that even as a kid I was making fun of Never The Same Color..... 2 Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 10, 2021 Share Posted April 10, 2021 (edited) But that reminded here: instruction to the user is simple. If you have this between console and TV you have PAL....? Edited April 10, 2021 by xahmol 3 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted April 10, 2021 Share Posted April 10, 2021 47 minutes ago, xahmol said: Same here ?and know that even as a kid I was making fun of Never The Same Color..... Yes, but as I learned on this forum, we completely missed the blinking stars in Parsec and other NTSC art-ifacts. 2 Quote Link to comment Share on other sites More sharing options...
JB Posted April 10, 2021 Share Posted April 10, 2021 2 hours ago, Stuart said: Unfortunately those terms will be meaningless to many users ... ;-( Then rephrase it. "Is your TV a flickery mess? If yes, press P. If no, press N." 2 2 Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted April 10, 2021 Share Posted April 10, 2021 I do not know if I understand good the main question because I read some complicate replies on this ? Anyway, talking of real TI99 consoles, the PAL TI99 has a 6pin DIN connector for the video output and the NTSC ones have a 5pin DIN connector instead. But maybe I have misunderstanding the question. Quote Link to comment Share on other sites More sharing options...
xahmol Posted April 10, 2021 Share Posted April 10, 2021 11 minutes ago, ti99iuc said: But maybe I have misunderstanding the question. Original question was how to detect from software. 1 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted April 10, 2021 Share Posted April 10, 2021 9 hours ago, vol said: Let me explain my thoughts about this idea. I have written code which implemented a simple stopwatch. I just counted number of interrupts and then divided this number by 60. It works fine for an NTSC system but for a PAL system we need a different divider, we need 50 instead of 60. So I sought an easy way to distinguish a PAL system from an NTSC. I also uses more complex code which uses the TI99/4A timer and is PAL/NTSC independent. So when I got an idea to make even more complex code to detect PAL or NTSC it sounds for me like a joke. OK, I can understand you thought it was a catch 22, since at first glance, it looks like you need to know the interrupt frequency to be able to determine it. But you get the principle now, don't you? If you do a loop where you count until you get, say, 50 interrupts, and count every turn through that loop, you will have made a few more loops in one second than in 0.83 seconds. 1 Quote Link to comment Share on other sites More sharing options...
Tursi Posted April 10, 2021 Share Posted April 10, 2021 12 hours ago, Stuart said: Unfortunately those terms will be meaningless to many users ... ;-( Yeah, I don't think that's true. Especially PAL users tend to know, due to the slower play speed. 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 10, 2021 Share Posted April 10, 2021 On 4/9/2021 at 10:22 AM, apersson850 said: No, it's not a joke. It would be a joke if a stopwatch app had to ask the user how fast their clock was, so a simple timing loop is a much better solution than asking for NTSC vs PAL. 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted April 10, 2021 Share Posted April 10, 2021 Here is my Extended Basic program that I posted a while ago: It says whether you are using 50 Hz or 60 Hz. (Not a joke.) 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" 6 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted April 11, 2021 Share Posted April 11, 2021 Yes, that's one way, since the automatic sprite movement will move the sprite a different distance in the same time, with the same speed setting, depending on if you get 50 or 60 movements per second. 3 Quote Link to comment 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.