Jump to content
IGNORED

How do I get a program from a Windows text file onto an atr?


bfollowell

Recommended Posts

I don't know what I was thinking. I was at work and it was early in the morning and it had gotten awfully quiet, so I got to playing around and typed up a little Atari BASIC utility program to ID the system type & OS. Nothing big really, and probably not very efficient, but I was just playing around. I was typing it up on my work computer in Notepad and now I've decided that I want to keep it, but I would really prefer not to type it all in again. It's not huge; only about 25 lines, but I'd really prefer to find some way to get from my desktop onto an atr that I can use on an emulator or my real hardware. Is that possible and, if so, how would I go about doing that?

 

I figure using Altirra as an intermediary would be a good way to go about it, but I've not had any luck so far. I saved the Notepad file out with a BAS extension on my desktop. Then I opened the atr in Altirra using Disk Explorer and dragged the file onto the disk. It seemed to work. When boot an Altirra session with that atr in the disk, the file is there. I was able to ENTER the file and it seems to work, but the only reason I say that is because I don't get an error when it loads. However, after loading, there's nothing there. If I try to list or run the program, there's nothing there and nothing happens. I'm thinking it has something to do with the Windows text file format.

 

Am I even heading in the right direction or am I way out in left field?

 

By now, I could've already typed in my program twice, but now I really want to find out if I can do this, and how, in case it's anything I ever want to try again in the future.

 

Thanks for helping me kill time until time to go home and go to bed!

 

Link to comment
Share on other sites

Another way is to mount windows folder as a disk in Altirra, I have the folder on my desktop

and just drag/drop anything I want into the folder, SDX reads these fine, you can't write

to the folder, but you can get stuff into Altirra to copy wherever you want.

 

Link to comment
Share on other sites

boot a blank dos disk image in altirra with basic

at the ready prompt (before dos) paste in your text with right-click

save to the dos disk with save"D:filename.bas"

it is now within the dos disk image

 

you can then copy it to real media using SIO2PC and aspeqt

Edited by xrbrevin
Link to comment
Share on other sites

33 minutes ago, dely said:

Easiest way: 

 

1. Type BASIC program in Notepad. 

2. CTRL+A, CTRL+C

3. Boot Altirra into BASIC

4. Right click at emulator window

5. Select paste from context menu

 

Hahahahaha!!!

 

That's so easy. It just never occurred to me to try and copy/paste from Windows into the emulation window. That's awesome.

 

I was able to get it in a completely different way from any of you guys too though. I typed in a simple basic program, listed it to disk, opened disk explorer, then drug the file out to my desktop. I opened it in Notepad and checked the encoding type. Then I saw that all the carriage returns were ›. So I modified using that and the changing the whole program to line long line, saved it and moved it back to the atr. This time, when I mounted the atr and entered the program, it worked perfectly. Then I resaved it. Now it's where I need it to be.

 

Thanks for all the suggestions though. @dely, your solution would've definitely saved me some time.

 

Link to comment
Share on other sites

The Linux way (or one of them) (without Altirra):

 

1. Convert the text file to ATASCII using aac.py (Python script).

2. Download and compile a tool called "franny". Compilation should be easy.

3. Create a new ".atr"-file:

franny -C myatr.atr

4. Write the ATASCII-file to the ".atr"-file:

franny -A myatr.atr -i myprog.bas -o MYPROG.BAS

Done.

Edited by Pokeypy
  • Like 2
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...