Jump to content
IGNORED

Exploring the Atari Frontier


Recommended Posts

In the GTIA section listing 4, some code is missing:-

Line 20 has a GOSUB 90, but there is no line 90

from the looks of it lines 80, 90, 100 and 110 are missing.

 

20 Z=PEEK(704):POKE 77,0:IF Z<>255 THEN POKE 764,255:GOSUB 90
30 IF STRIG(0)=0 THEN 200
40 XP=XP+XD(STICK(0)):YP=YP+YD(STICK(0)):IF XP<0 THEN XP=79
50 IF XP>79 THEN XP=0
60 IF YP>160 THEN YP=0
70 IF YPCMAX THEN C=CMIN
120 IF B>BMAX THEN B=BMIN
Link to comment
Share on other sites

1 hour ago, TGB1718 said:

In the GTIA section listing 4, some code is missing:-

Line 20 has a GOSUB 90, but there is no line 90

from the looks of it lines 80, 90, 100 and 110 are missing.

 


20 Z=PEEK(704):POKE 77,0:IF Z<>255 THEN POKE 764,255:GOSUB 90
30 IF STRIG(0)=0 THEN 200
40 XP=XP+XD(STICK(0)):YP=YP+YD(STICK(0)):IF XP<0 THEN XP=79
50 IF XP>79 THEN XP=0
60 IF YP>160 THEN YP=0
70 IF YPCMAX THEN C=CMIN
120 IF B>BMAX THEN B=BMIN

Thanks for pointing that out, I will go ahead and correct, hopefully during the day.

 

Kind regards, 

Luis.

Link to comment
Share on other sites

2 hours ago, TGB1718 said:

In the GTIA section listing 4, some code is missing:-

Line 20 has a GOSUB 90, but there is no line 90

from the looks of it lines 80, 90, 100 and 110 are missing.

 


20 Z=PEEK(704):POKE 77,0:IF Z<>255 THEN POKE 764,255:GOSUB 90
30 IF STRIG(0)=0 THEN 200
40 XP=XP+XD(STICK(0)):YP=YP+YD(STICK(0)):IF XP<0 THEN XP=79
50 IF XP>79 THEN XP=0
60 IF YP>160 THEN YP=0
70 IF YPCMAX THEN C=CMIN
120 IF B>BMAX THEN B=BMIN

This is the image from internet archive:

image.png.cca22f532cd7a7f8259901ff401bf340.png

 

Seems the mising lines are:

80 COLOR ABS(C-CMAX):PLOT XP,YP:COLOR C:PLOT XP,YP:6OTO 20
90 IF Z=6 THEN 140
100 IF Z=35 THEN GRAPHICS O:B=BMIN:C=CMIN:GOTO 330
110 OB=B:OB1=B+1:OC=C:B=B+2:C=C+1:IF C>CMAX THEN C=CMIN

Have Fun!

Link to comment
Share on other sites

2 hours ago, TGB1718 said:

In the GTIA section listing 4, some code is missing:-

Line 20 has a GOSUB 90, but there is no line 90

from the looks of it lines 80, 90, 100 and 110 are missing.

 


20 Z=PEEK(704):POKE 77,0:IF Z<>255 THEN POKE 764,255:GOSUB 90
30 IF STRIG(0)=0 THEN 200
40 XP=XP+XD(STICK(0)):YP=YP+YD(STICK(0)):IF XP<0 THEN XP=79
50 IF XP>79 THEN XP=0
60 IF YP>160 THEN YP=0
70 IF YPCMAX THEN C=CMIN
120 IF B>BMAX THEN B=BMIN

These are fixed now, the culprit was a bad escaped <, so I changed that to &lt;

 

Kind regards,

Luis.

  • Like 1
Link to comment
Share on other sites

There are three errors in the listing in the article:    Part 1, as published on Issue 41, Vol. 6 No. 8, June 1983.

 

If you copy the listings and paste them into BASIC in an emulator, you can test the listings in all the articles easily.

Link to comment
Share on other sites

Hi Allan, thanks for the hint, I am already doing that.

 

Now I need a hand debugging listing 4 here: https://lbaeza.neocities.org/frontier/frontier_10.html

 

I have double-checked that listing and compared it with the source as printed on the magazine (Issue 44, Vol. 6 No. 11, September 1983), but all I get is a message saying "PMG$ ISN'T A LEGAL VARIABLE".


Can you please check?

Thanks in advance,

Luis.

  • Like 1
Link to comment
Share on other sites

I've had a quick look, it's messing about with the variable name table, bit of a pain

to follow what it's up to. It is changing values in the variable value table

 

The only thing I could see is PMG$ is DIM'd to 1 but in the code

it's using 1024 bytes in the array, but as it's playing with the value table, maybe it's done there ?

 

700 DIM PMG$(1),VAR$(4):VAR$="PMG$" 

 

940 PMG$=CHR$(0):PMG$(1024)=CHR$(0)

Link to comment
Share on other sites

10 hours ago, TGB1718 said:

I've had a quick look, it's messing about with the variable name table, bit of a pain

to follow what it's up to. It is changing values in the variable value table

 

The only thing I could see is PMG$ is DIM'd to 1 but in the code

it's using 1024 bytes in the array, but as it's playing with the value table, maybe it's done there ?

 

700 DIM PMG$(1),VAR$(4):VAR$="PMG$" 

 

940 PMG$=CHR$(0):PMG$(1024)=CHR$(0)

This is a common hack used in BASIC programs to animate Player/Missile graphics.  The program dimensions a 1 character string.  It then manipulates the program's variable table to (1) move the memory address of the string to a 1K page boundary suitable for use as PM memory and (2) extend the length to 1024 bytes.  Atari BASIC string assignments are used to quickly move the PM sprites vertically.  BASIC string manipulation is just an assembly language memory copy, which is just what you'd do to move the sprites in an assembly program.

Edited by FifthPlayer
  • Like 2
Link to comment
Share on other sites

On 7/20/2022 at 1:45 PM, TGB1718 said:

Got it, typo line 870:

870 IF AZ2-128*(AZ2>27)=ASC(VAR$(AZ)) THEN VNTP=VNTP+1:NEXT AZ:GOTO 910

 

should be 

 

870 IF AZ2-128*(AZ2>127)=ASC(VAR$(AZ)) THEN VNTP=VNTP+1:NEXT AZ:GOTO 910

Thanks TGB1718, I have corrected the typo and found another error on line 950, but this has already been fixed too...

Now demo on Listing 4 works!

 

Kind regards,

Luis. 

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

In magazine issue 39 (Vol. 6 No. 6, March 1983, article GTIA Part 1), there is small glitch in Doodle program, line 330:

 

330 GRAPHICS 0:? CHR$(125);"ENTER GRAPHICS MODE(9,10,11)';:INPUT M

 

Fixed:

330 GRAPHICS 0:? CHR$(125);"ENTER GRAPHICS MODE(9,10,11)";:INPUT M

 

Wrong program line will result in improper functioning: the program will not ask you for GTIA graphics mode.

 

Link to comment
Share on other sites

  • 2 weeks later...

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...