ATARI basic to Free Basic

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

ATARI basic to Free Basic

Postby Elico » Nov 18, 2017 18:25

Hi all

I just got a book about games based on ATARI Basic

How i use that code with FreeBasic ?

Thanks

Elico
marcov
Posts: 2398
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: ATARI basic to Free Basic

Postby marcov » Nov 18, 2017 19:50

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: 7191
Joined: May 28, 2005 3:28

Re: ATARI basic to Free Basic

Postby D.J.Peters » Nov 18, 2017 20:33

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

Postby Elico » Nov 18, 2017 20:38

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: 7191
Joined: May 28, 2005 3:28

Re: ATARI basic to Free Basic

Postby D.J.Peters » Nov 18, 2017 21:10

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: 7191
Joined: May 28, 2005 3:28

Re: ATARI basic to Free Basic

Postby D.J.Peters » Nov 18, 2017 21:18

"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: 181
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: ATARI basic to Free Basic

Postby jj2007 » Nov 22, 2017 21:09

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: 181
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: ATARI basic to Free Basic

Postby jj2007 » Dec 06, 2017 14:08

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

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 1 guest