ATARI basic to Free Basic

New to FreeBASIC? Post your questions here.
Post Reply
Elico
Posts: 24
Joined: Jun 10, 2012 6:46

ATARI basic to Free Basic

Post by Elico »

Hi all

I just got a book about games based on ATARI Basic

How i use that code with FreeBasic ?

Thanks

Elico
marcov
Posts: 3462
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: ATARI basic to Free Basic

Post by marcov »

If you light it, it keeps you warm while programming Free Basic ?

Seriously, to translate from one basic dialect to another you need quite good knowledge of both. Though it can of course be used as inspiration (reading about gaming principles)
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: ATARI basic to Free Basic

Post by D.J.Peters »

Elico wrote:I just got a book about games based on ATARI Basic
Do you mean Compute!'s First Book of Atari Games
http://www.atarimania.com/documents/Com ... -Games.pdf
or which book ?

Joshy
Elico
Posts: 24
Joined: Jun 10, 2012 6:46

Re: ATARI basic to Free Basic

Post by Elico »

The book is called:THE ATARI BOOK OF GAMES ,by mike james

I need help only on cetain atari basic commands

Thanks
Elico
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: ATARI basic to Free Basic

Post by D.J.Peters »

This won't work if you don't know the internals of the used ATARI device.
For example the first BASIC listing on page 7

Code: Select all

50 CH=(PEEK(106)-8)*256 ' Is it the high byte of the first CHAR in screen memory or what ?
60 CHORG=PEEK(756)*256 ' Is it the start of the character ROM or what ?
If some one will help you: http://www.atarimania.com/documents/The ... -Games.pdf

Why not emulating the ATARI device and run the original BASIC ROM on it ?
You would learn more then translating the BASIC listings to FreeBASIC in QB mode.

Joshy
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: ATARI basic to Free Basic

Post by D.J.Peters »

"They will all run on all ATARI models including the ATARI 600XL"
So for the Peeks and Pokes you need an ATARI 400-800 book about all this used addresses.

http://www.atarimania.com/documents-ata ... s_2_8.html

Joshy
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: ATARI basic to Free Basic

Post by jj2007 »

D.J.Peters wrote:

Code: Select all

50 CH=(PEEK(106)-8)*256 ' Is it the high byte of the first CHAR in screen memory or what ?
60 CHORG=PEEK(756)*256 ' Is it the start of the character ROM or what ?
I remember vaguely to have seen such stuff briefly, in the early 1980s. But already in the late 1980s, Basic on an Atari looked more like this:

Code: Select all

Procedure Pl_gk
  Tgn%=Instr("23456789",Mid$(Leg$,2,1))+1
  @Tg_c
  Z%=Ur%-Asc(Mid$(Leg$,4,1))*Pl_h%/150
  Deftext 1,0,0,Tg%
  Clr A%,Bf%
  Is%=6
  Repeat
    Rx%=Is%+1
    Is%=Instr(Rx%,Leg$+"þþþð","ð")
    Inc A%
    Bf%=Max(Bf%,Is%-Rx%-6*(Mid$(Leg$,Max(1,Rx%-2),2)<>"#ð")+Mid$(Leg$,Is%-2,1)<>" ")
  Until Is%>Len(Leg$)
  Dl%=Zy%+3+2*""=Chr$(Tgn%)
  Rx%=Lr%+Asc(Mid$(Leg$,3,1))*Pl_b%/200
  Bb%=Rx%+Bf%*Zx%-Zx%-3*(Tgn%<=3)+2
  Bh%=Dl%*A%-Zy%+Tgn%*2
  Rahmen!=Left$(Leg$)="R"
Return
Arbitrarily picked procedure from a 15kLines source...
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: ATARI basic to Free Basic

Post by jj2007 »

JasonBF wrote:indeed it was in 1980 in the Atari company.
thanks for information
Attention that link is not what it seems!
Last edited by counting_pine on Dec 06, 2017 16:21, edited 1 time in total.
Reason: Thanks, I've deleted the post and redacted the link
Post Reply