Jump to content
IGNORED

CTIA or GTIA


videofx

Recommended Posts

OK I am confused.

 

I want to know if my 800 is CTIA or GTIA.

 

So I try 3 methods

 

1. Graphics 9 : Produces black screen like its supposed to white GTIA

2. POKE 623,64 : Get black screen with multi color character mode again supposed to be GTIA

3. Use Bill Wilkersons Insight Atari program and it says "CTIA"

 

also one of the lines does a peek of collision register 0. It does IF PEEK(53252) THEN PRINT "CTIA".  What does this mean? it doesn't say if PEEK equals a specific value so Im confused.

 

Any help will be appreciated

 

Thanks

Link to comment
Share on other sites

22 minutes ago, Mclaneinc said:

Gotta be a miss print, the line makes no sense without a comparison..

 

nope not a misprint. Cause if I do a poke to reset the collision register  then it says GTIA, when collision register is 4 it says CTIA.

 

 

line 220 is what I am trying to understand

 

Here is the program

 

100 GRAPHICS 0 : REM ALWAYS USE THIS MODE
110 PRINT "NOW TESTING FOR CTIA VERSUS GTIA"
120 PRINT "================================"
130 POKE 559, 58 : POKE 53277, 2 : REM ENABLE PLAYERS
140 POKE 54279, 240 : REM USE ROM FOR PLAYER DATA
145 POKE 53248, 80 : REM CENTERED PLAYER
150 POKE 53278, 0 : REM CLEAR COLLISION REGISTERS
160 POKE 623, 65 : REM ENABLE GTIA, IF IT EXISTS
170 POKE 20, 0
180 IF PEEK(20)<2 THEN 180
190 POKE 623, 1 : REM DISABLE GTIA
200 POKE 559, 34 : POKE 53277, 0 : REM TURN OFF PLAYERS
210 FOR A = 53261 TO 53265 : POKE A, 0 : NEXT A : REM (AND PLAYER DATA)
220 IF PEEK(53252) THEN PRINT "SORRY, ONLY ACTIA" : GOTO 240
230 PRINT "AHA ! A GTIA."
240 END
Link to comment
Share on other sites

53252 ($D004) is P0PF, the player 0 <-> playfield collision register. If a GTIA is present, the POKE 623,65 statement switches the display to Graphics 9, which doesn't support playfield collisions and so PEEK(53252)=0. If a CTIA is present, the POKE 623 does nothing and the display stays in Graphics 0, which then causes a P0<->PF2 collision against the text banner (which is an essential part of the test!).

 

You don't need a comparison for IF statements, as they implicitly test the condition against zero.

 

It looks like there are a couple of race conditions in this test program that could cause false CTIA detections. Lines 150 and 160 should be swapped, and line 190 should be moved after line 220. Otherwise, there is a period of time where the the GTIA is running in the same mode that a CTIA would and could flag playfield 2 collisions.

 

  • Like 2
Link to comment
Share on other sites

It's not worth the bother of typing or loading a program.

 

POKE 623,64 is the probably the quickest/easiest method.

Alternately something like a Lucasfilm game cartridge with the title sequence on startup if you have one handy.

 

And I'll repeat - CTIA seems to be sufficiently rare that it'd fetch a decent price as a collectors item.

 

And sidenote - though you'd not expect to see one in the other, the faulty GTIA in some later XEs can produce symptoms of only being CTIA.

Link to comment
Share on other sites

16 hours ago, phaeron said:

53252 ($D004) is P0PF, the player 0 <-> playfield collision register. If a GTIA is present, the POKE 623,65 statement switches the display to Graphics 9, which doesn't support playfield collisions and so PEEK(53252)=0. If a CTIA is present, the POKE 623 does nothing and the display stays in Graphics 0, which then causes a P0<->PF2 collision against the text banner (which is an essential part of the test!).

 

You don't need a comparison for IF statements, as they implicitly test the condition against zero.

 

It looks like there are a couple of race conditions in this test program that could cause false CTIA detections. Lines 150 and 160 should be swapped, and line 190 should be moved after line 220. Otherwise, there is a period of time where  the the GTIA is running in the same mode that a CTIA would and could flag playfield 2 collisions.

 

 

Thanks!

 

So 

IF PEEK(53252) THEN PRINT "SORRY, ONLY ACTIA"

 

So it saying if (53252) =0 then Print?  cause when I do a Peek(53252) it = 4 

 

Thanks

Link to comment
Share on other sites

1 hour ago, videofx said:

 

Thanks!

 

So 


IF PEEK(53252) THEN PRINT "SORRY, ONLY ACTIA"

 

So it saying if (53252) =0 then Print?  cause when I do a Peek(53252) it = 4 

 

Thanks

Usually the way these older BASICS work, is any non-zero value is treated as true, while 0 is treated as false.  It's therefore saying if (53252) != (NOT equal) to 0, then do the print.

Link to comment
Share on other sites

On 2/5/2020 at 3:55 PM, videofx said:

I have GTIA. I wrote a program that uses Graphics mode 11 which is one of the GTIA modes.

 

10 GRAPHICS 11

[snip]

 

So now I know how to test :)

I don't believe this program will work on a 400 or 800, even if they have a GTIA, because BASIC relies on the OS handler which doesn't directly support the GR.9/10/11 GTIA modes. OS support for GTIA modes was added in the XL/XE OS's.

Link to comment
Share on other sites

1 hour ago, Nezgar said:

I don't believe this program will work on a 400 or 800, even if they have a GTIA, because BASIC relies on the OS handler which doesn't directly support the GR.9/10/11 GTIA modes. OS support for GTIA modes was added in the XL/XE OS's.

No - that is not correct.  The XL/XE OS added support for what is commonly referred to as mode 7.5 (in basic, the modes were 12, 13, 14, 15).  The hardware of course supported them, but they required a user written display list.  Modes 12 and 13 are multi-coloured text, and 14,15 are bitmap modes - the 160 pixel by 192 lines, as opposed to Graphics 7 which was 160 * 96 lines.

  • Like 1
  • Thanks 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...