Jump to content

Photo

Atari BAS file to TXT conversion


16 replies to this topic

#1 psychonaut25 OFFLINE  

psychonaut25

    Space Invader

  • 35 posts
  • Location:stuck in a development hell.....:(

Posted Thu Dec 23, 2010 6:35 AM

Is there any converter that can convert BAS basic files from atari to PC TXT files and back again (PC/TXT ==> ATR/BAS) ? I have extracted BAS files from ATR image using MakeATR , but when I convert them using Atari800Win (atascii to ascii) it doesn;t make them into readable form. Any suggestions please?

#2 Rybags ONLINE  

Rybags

    Quadrunner

  • 12,791 posts
  • Location:Australia

Posted Thu Dec 23, 2010 6:45 AM

You have to use the ENTER/LIST commands.

SAVE/LOAD deals with programs in tokenised form.

Another easy way to deal with stuff is to just set the P: Virtual handler to use Notepad. Then you can just load a program, and LIST "P"

Then you can just cut/paste from the Notepad window that it opens up.


This won't really help for the Control character graphics - there aren't really direct Windows equivalents for those.

Edited by Rybags, Thu Dec 23, 2010 6:46 AM.


#3 psychonaut25 OFFLINE  

psychonaut25

    Space Invader

  • Topic Starter
  • 35 posts
  • Location:stuck in a development hell.....:(

Posted Thu Dec 23, 2010 7:41 AM

You have to use the ENTER/LIST commands.

SAVE/LOAD deals with programs in tokenised form.

Another easy way to deal with stuff is to just set the P: Virtual handler to use Notepad. Then you can just load a program, and LIST "P"

Then you can just cut/paste from the Notepad window that it opens up.


This won't really help for the Control character graphics - there aren't really direct Windows equivalents for those.


I will not be useing any special characters. No problem with that. OK, I have saved Basic program using Enter"d1:xxx.bas" - error showed 137 TRUNC. :(

#4 Rybags ONLINE  

Rybags

    Quadrunner

  • 12,791 posts
  • Location:Australia

Posted Thu Dec 23, 2010 7:52 AM

If you've used SAVE, you have to use LOAD. The pairs of commands aren't interchangable.

Just use that Notepad P: handler trick, it'll probably be the easiest way.

#5 therealbountybob OFFLINE  

therealbountybob

    Quadrunner

  • 5,264 posts
  • Ready for some Ramp Rage
  • Location:High Score Club TAKE PART!

Posted Thu Dec 23, 2010 7:53 AM

This thread has some info on memopad http://www.atariage....ge__hl__memopad :)

#6 russg OFFLINE  

russg

    Stargunner

  • 1,195 posts
  • Location:Cleveland, Ohio

Posted Sat Dec 25, 2010 7:25 PM

Is there any converter that can convert BAS basic files from atari to PC TXT files and back again (PC/TXT ==> ATR/BAS) ? I have extracted BAS files from ATR image using MakeATR , but when I convert them using Atari800Win (atascii to ascii) it doesn;t make them into readable form. Any suggestions please?

LOAD your .BAS SAVEd file and LIST FILE.LST to disk.
Now use something to extract the .LSTed file from the .ATR, like IMAGEMAN.COM for single dens DOS 2/2.5/MYDOS .ATRs on PC.
Now use a ATASCII to ASCII converter like my command line version, eg ata2asc2 FILE.LST makes a FILE.ASC.
Now you can edit in notepad and save your edited file to FILE2.ASC.
Then you can convert back to ATASCII with ASC2ATA2.EXE eg. asc2ata2 FILE2.ASC makes a FILE2.LST ATASCII.
Three programs here, all PC files. I also have a ATAS to ASC and ASC to ATAS for the A8, but seldom use them.

Attached Files



#7 psychonaut25 OFFLINE  

psychonaut25

    Space Invader

  • Topic Starter
  • 35 posts
  • Location:stuck in a development hell.....:(

Posted Sun Dec 26, 2010 3:25 PM


Is there any converter that can convert BAS basic files from atari to PC TXT files and back again (PC/TXT ==> ATR/BAS) ? I have extracted BAS files from ATR image using MakeATR , but when I convert them using Atari800Win (atascii to ascii) it doesn;t make them into readable form. Any suggestions please?

LOAD your .BAS SAVEd file and LIST FILE.LST to disk.
Now use something to extract the .LSTed file from the .ATR, like IMAGEMAN.COM for single dens DOS 2/2.5/MYDOS .ATRs on PC.
Now use a ATASCII to ASCII converter like my command line version, eg ata2asc2 FILE.LST makes a FILE.ASC.
Now you can edit in notepad and save your edited file to FILE2.ASC.
Then you can convert back to ATASCII with ASC2ATA2.EXE eg. asc2ata2 FILE2.ASC makes a FILE2.LST ATASCII.
Three programs here, all PC files. I also have a ATAS to ASC and ASC to ATAS for the A8, but seldom use them.

Thank you. Helped. Now I have my Basic BAS file converted in TXT format.

#8 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,050 posts
  • Location:The land of Gorch

Posted Sun Dec 26, 2010 11:58 PM

Since you are using Atari800Win, you could just use it's hard drive patch to LIST your program in memory to the H: device.

Similarly, you can use ENTER within the emulated Atari BASIC to import a text file from the H: drive. This is useful, since you can just copy/paste archived program listings from web pages, scanners, etc...into a text file without needing to code any of it by hand except carriage returns...which would need to be changed to (character code 125).

#9 rdea6 OFFLINE  

rdea6

    Stargunner

  • 1,656 posts
  • Location:Arizona USA

Posted Mon Dec 27, 2010 12:39 AM

NOT (character code 125).




[character code 155).

#10 SIO99 OFFLINE  

SIO99

    Chopper Commander

  • 157 posts
  • Location:London, UK

Posted Tue Apr 17, 2012 9:00 AM

Please can anyone tell me if it's possible to save Atari BASIC programs from within any of the emulators that exist. If so, then how? I've just tried saving a program as a text file, but giving it the extension .BAS and all I got was BOOT ERROR. I've been using Atari800Win Plus, as well as XFormer, for a few weeks, but this doesn't seem possible. I'm now bidding on some Atari XL and XE computers on eBay, but I may end up getting one without any storage device. After this, I may still not be able to save, or have to buy an Atari tape deck, floppy drive, or the SIO2SD adaptor. I recently got a DVD full of emulators and have found that the Atari is one of the more interesting computer systems. My ambition is to program some new and different games on an Atari 8 bit emulator or real Atari, then once I understand how to do that, I could convert the games for a more modern system. This is because modern computers are more complicated and have various obstacles that get in the way of programming games.

Edited by SIO99, Tue Apr 17, 2012 9:03 AM.


#11 Stephen OFFLINE  

Stephen

    River Patroller

  • 4,729 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Tue Apr 17, 2012 10:19 AM

Since you are using Atari 800 Win +, go into the options and set up a hard drive folder. This will present itself to the Atari as an H device (H1: as opposed to D1:). Now, here is the cool bit. Adding a 5 to the number (H6: instead of H1:) will write to that device using the proper PC EOL character ($10,$13) as opposed to the Atari's ($9B). So, to save your BASIC code as a text file, enter the following :

LIST "H6:FNAME.TXT"

To load that back into the Atari, do
ENTER "H6:FNAME.TXT"


#12 tabar OFFLINE  

tabar

    Combat Commando

  • 4 posts

Posted Tue Jun 26, 2012 1:07 AM

similar to what some of the others do, I copy/past from the web into Notepad++, save as a .lst file to the H: drive subdirectory, then use a windows program called MEMO PAD from http://joyfulcoder.com/memopad/ it converts the end of line character, then resave as a .lst to H: and ENTER into basic. MEMO PAD can also convert EOL to windows so that listed files can be edited in windoes text editors.

#13 Savetz OFFLINE  

Savetz

    Chopper Commander

  • 116 posts
  • Location:Portland OR

Posted Sat Jul 7, 2012 3:23 PM

What if I want to text versions of hundreds or thousands of programs? Is there a bulk detokenizer (perhaps for Linux) that will create ATASCII listings?

#14 rdea6 OFFLINE  

rdea6

    Stargunner

  • 1,656 posts
  • Location:Arizona USA

Posted Sat Jul 7, 2012 8:06 PM

What if I want to text versions of hundreds or thousands of programs? Is there a bulk detokenizer (perhaps for Linux) that will create ATASCII listings?


Here is a few that might work on linux::
http://www.atariage....e/#entry1018480

detoken perl script.

I have also used a program call 'CHKBAS.EXE' PC program that quit working after I got a 64bit windows OS.

#15 Savetz OFFLINE  

Savetz

    Chopper Commander

  • 116 posts
  • Location:Portland OR

Posted Sun Jul 8, 2012 4:08 PM

Thanks, rdea! I'll try that perl script. Can you share CHKBAS.EXE also?

#16 rdea6 OFFLINE  

rdea6

    Stargunner

  • 1,656 posts
  • Location:Arizona USA

Posted Sun Jul 8, 2012 8:51 PM

HERE:
http://www.atarimax....soft/chkbas.txt
http://www.atarimax.....org/asoft.html
About half way down the page.


Thanks, rdea! I'll try that perl script. Can you share CHKBAS.EXE also?



#17 ac.tomo OFFLINE  

ac.tomo

    Star Raider

  • 99 posts
  • Location:s.wales

Posted Tue Sep 18, 2012 4:34 AM

.lst basic saved files
Did u know that u could type basic programs into a word processor, it's best 2 use a basic w/processor though,, one that doesn't save any extra bytes other than just your basic program. This format will be . Lst format, and what's really good about this is that u can type basic instructions in direct mode (without a. Line number) and the instructions will execute straight away (during loading of program using the basic 'enter' command).




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users