PDA

View Full Version : Basic


phe
10-11-2007, 03:18 AM
Anyone know how to load Basic? I got a hex file with 4K basic on it from the altair 32 emulator. I tried several different loaders, with several different changes that I thought would select the correct ports (020/021). I'm using hyperterminal and selecting "send text file".

Well, no matter what I try, no go.

Any ideas how to do this?

Paul

Grant Stockly
10-11-2007, 07:58 AM
I never got around to doing it myself. I will this weekend at the latest. I'll get a file and some instructions for you.

I'm not sure what is in that file you had, but you probably shouldn't use "text" file. That might be stripping off the 8th bit of binary data...

phe
10-11-2007, 12:19 PM
Thanks Grant. I look forward to that.

I found this quote for "text" file:
You can send text files as an alternative to keyboard input using Send Text File. This is useful, for example, when you need to send a string of keyboard input to a remote computer for troubleshooting purposes, or need to send a lengthy keyboard input string as part of a connection sequence to a remote computer or router.I still suspect the loader was not right.

I seem to have two major gaps of knowledge for the Altair: the protocol around using the IO ports, and the use of the sense switches. Can you recommend any manuals for these two knowledge gaps?

Paul

marty
10-11-2007, 01:22 PM
Hi Paul;
Hex files would not be the way to go, they may carry extra information, for the hex loader. I would get a Binary file, which is what I got from the same site, the file should end in .bin.. that may not cure all your ills but it should help !! I have had the same problem, with hyperterminal, even loading .bin files. I think Grant is correct, they strip off the 8th bit. :(
You could go to Wildharecomputers.com and ask Bruce Ray if he would be willing to let you use his loader.. Which doesn't strip off any information... I used it to help him copy paper tapes for our Novas, but it should work with any binary file.. it will transfer either direction, to or from any Ibm -- windows based machine.. :D :D
Have a great day Marty

phe
10-11-2007, 01:41 PM
Thanks, Marty. I never liked hyperterminal. Now I like it even less. I seem to have a need for it once every three years or so, and every time it only doest about 80% of what I need! :mad:

I'm not sure what I could offer Bruce Ray in return and I would feel uncomfortable asking him. I'd feel like I was interrupting his main business for my hobby :o

If I can't find a suitable program that transfers the files, I'll probably try to write one in C++ or something. But that will surely take quite a while. :D

We'll see if Grant pulls another rabbit out of the hat. He usually does.

Paul

Grant Stockly
10-11-2007, 07:32 PM
I like hyperterminal for some things. :)

I use teraterm pro for sending/receiving binary files.

marty
10-12-2007, 01:54 AM
Hi Paul;
Don't worry about Bruce Ray, He wrote the program a number of years ago to transfer all the Paper Tapes that we both had to his Hard disk, and then to a CD so as to keep them on a more protected medium. If you haven't been to his Web site, Bruce Collects and Restores Old Data General Machines, He is the Authority on them. So the program was written for our own need. I have it at home, but I don't have permission to give it away.
Thanks Marty

marty
10-12-2007, 12:56 PM
Hi Paul;
I have loaded the tera term pro, program, but I have not tried it out. So we will have to rely on Grants word that it works and is good. No problem there.
thanks marty:D :D

Geoff Harrison
10-14-2007, 07:04 PM
Anyone know how to load Basic?

Paul,

I just finished loading basic into my 4k Altair with a 2SIO board using an XP machine as the terminal. I'll post a longer explanation of what works and what doesn't and why later today or tomorrow, but in the mean time, here's what should work.


Get a copy of Tera Term. You'll be sending a pure binary file to the Altair and Hyperterm can't do that. I downloaded Tera Term from here (http://hp.vector.co.jp/authors/VA002416/ttermp23.zip).
Get a copy of the 4k Basic3.2 tape image from Rich Cini's Altair emulator. For convenience I have put a copy of it here (http://www.solivant.com/altair_bootloaders/misc/4kbas32m.tap).
Make sure you can communicate with the Altair 2SIO card. I think you said in an earlier 88-2SIO thread that you got that working, so you should be good to go. NOTE: due to cable limitations I am using only RD, TD, & GND, so I am not using handshaking and the fastest I can send data to the Altair without dropping bytes is 4800. If you have a full cable, it should run faster, but I am unable to test that until I fix my cable.
Set up Tera Term to use 4800, 8 bits, no parity, 1 stop bit.
Toggle the following bootloader into the Altair. This comes from the Altair Extended Basic manual and is set up specifically for 4k Basic3.2


000: 076 003 323 020 076 025 323 020 041 256 017 061 032 000 333 020
020: 017 320 333 021 275 310 055 167 300 351 013 000 000 000 000 000

Check it carefully. If it doesn't correctly load Basic it will probably trash itself and you'll have to enter it again.
Set address switches A11 and A10 on, all others off. Hit reset, hit run.
On Tera Term, go to File->SendFile, select the Binary checkbox, navigate to the 4kbas32m.tap file you downloaded above, hit Open. Tera Term will display a status box showing the number of bytes sent.
When the file finishes transferring, if all went well you'll see something like "Memory Siz@@" on the main Tera Term screen. Before you type anything else, go to Setup->SerialPort and change the word length from 8 to 7. Then you can hit enter and answer the rest of the Basic startup dialog questions. You should finally end up with something like

973 BYTES FREE

BASIC VERSION 3.2
[4K VERSION]


Good luck. Let me know if you have any problems or questions.

Geoff.

Grant Stockly
10-15-2007, 12:18 AM
Thanks a lot for helping me with this!

Did you try 9600 or 19200?

Paul, make sure to change the jumpers on the 2SIO for 4800. :)

Grant

Geoff Harrison
10-15-2007, 12:27 AM
Did you try 9600 or 19200?

I tried a maximum of 9600 and was losing characters due to the lack of handshaking. I'm going to order another Molex connector and pins and make a proper cable, but that's probably about a week away. I think you have mentioned before that Tera Term allows inter-character delays, so that should be another way to slow down the transmission to allow the Altair to keep up at 9600. However, the only configuration I have tested with my 2SIO card is 4800,8,n,1, no handshaking.

Paul, make sure to change the jumpers on the 2SIO for 4800. :)

Good point :)

phe
10-15-2007, 03:05 AM
Geoff, this is awesome information. Thanks a lot!

I've tried it several ways tonight without diving too deep to try to figure out what I am doing wrong. I can confirm it will not work at 9600 for me either, but it could be for an entirely different reason.

Rather than resetting my card to 4800, I've tried the intercharacter delay. I even tried 100ms, which makes the transmit rate very slow. I cannot tell if Basic is loaded into memory or not, all I can confirm is that I cannot get anything to display and that the low memory locations do indeed get changed.

A quick glance at the loader helps me see how it is set for 020/021. I'll use this to try to debug what is going on. Unfortunately I have to head out of town tomorrow for two weeks. What lousy timing! :mad:

Tell me about switches A11 and A10? I was surprised to see you put both on.

Paul

Geoff Harrison
10-15-2007, 03:44 AM
Sorry to hear it didn't work. I'll try setting my 2SIO back to 9600 and setting the character delay to see whether I can get it to work that way.

Unfortunately I have to head out of town tomorrow for two weeks. What lousy timing! :mad:

Tell me about switches A11 and A10? I was surprised to see you put both on.


No problem. It gives me more time to write up my more detailed description of what's going on with the boot loader. I'll post it in a day or two.

A11 tells the 2nd stage loader (what MITS calls the checksum loader) and Basic that the terminal is on a 2SIO, A10 tells them how many stop bits to use; up=1 stop bit, down=2 stop bits.

Grant Stockly
10-15-2007, 06:20 AM
I tried a maximum of 9600 and was losing characters due to the lack of handshaking. I'm going to order another Molex connector and pins and make a proper cable, but that's probably about a week away. I think you have mentioned before that Tera Term allows inter-character delays, so that should be another way to slow down the transmission to allow the Altair to keep up at 9600. However, the only configuration I have tested with my 2SIO card is 4800,8,n,1, no handshaking.


I forgot about that! I've used that to "type" in basic programs to the Altair. You WILL need a delay for line EVEN with 300bps! :)

There are two kinds of delays in terra term. Character and Line. Hyperterminal has the same thing. It is kind of annoying that these delays are not available for telnet connections, but that doesn't matter for us.

Click the "Setup" menu and select "Serial Port". Look for the "Transmit delay" frame at the bottom.

I think at 9600bps I used 5-20ms for character and 200-300ms per line.

There are ways to optimize speed based on the echo from the Altair, and I will try to perfect those methods later and release a special Altair basic transfer program. The Altair tokenizes basic lines after a LF. Not all basic lines take the same amount of time, and it seems as memory gets filled up it takes longer (what??? ;) ). Any way...I myself would prefer to bootstrap basic at 9600bps with a delay than run at 4800bps all the time.

Grant Stockly
10-15-2007, 06:23 AM
A11 tells the 2nd stage loader (what MITS calls the checksum loader) and Basic that the terminal is on a 2SIO, A10 tells them how many stop bits to use; up=1 stop bit, down=2 stop bits.


And in the manual 1 and l are the same character. When I got my first Altair with disk drives the instructions were to raise switch "A11", which looked like All to me.

It took a while to figure that one out. :)

Grant Stockly
10-15-2007, 06:27 AM
Rather than resetting my card to 4800, I've tried the intercharacter delay. I even tried 100ms, which makes the transmit rate very slow. I cannot tell if Basic is loaded into memory or not, all I can confirm is that I cannot get anything to display and that the low memory locations do indeed get changed.

A quick glance at the loader helps me see how it is set for 020/021. I'll use this to try to debug what is going on. Unfortunately I have to head out of town tomorrow for two weeks. What lousy timing! :mad:


Did you see ANY blinking in the lights in any of the tests? Your card is set for port 020/021, right? Not like the one in the picture I sent you? I had mine setup for CP/M which required the 2SIO be at port 0/1.

Did you have both the 4k and 1k memory card installed? Did you change the jumper setting on the 1k memory card? For the initial tests don't have the 1k memory card installed.

Grant Stockly
10-15-2007, 06:30 AM
No problem. It gives me more time to write up my more detailed description of what's going on with the boot loader. I'll post it in a day or two.


I have been putting off shooting mini training videos for the Kenbak. When I'm doing that maybe I can have a basic boot demo with the Altair. Just to make sure all of the switches/etc are done in the right order.

Paul hasn't ever used sense switches before. (I think) In fact, we should probably write a small program for him that tests the sense switch function. How about a program that reads the sense switches and transmits that value continuously to the serial port. We can use that along with "Serial Device Tester" from Hack Consulting to make sure his sense switches are all functioning.

phe
10-15-2007, 12:33 PM
Did you see ANY blinking in the lights in any of the tests?.
Blinking? No. I looked for that. But I saw some dim lights.

Your card is set for port 020/021, right? Not like the one in the picture I sent you? I had mine setup for CP/M which required the 2SIO be at port 0/1..
Yes, it is set to 020/021. Remember that the echo is working, which is using 020/021.
Did you have both the 4k and 1k memory card installed? Did you change the jumper setting on the 1k memory card? For the initial tests don't have the 1k memory card installed.
I have both installed.

That's about it. I'm headed out of town now. I'll be able to check this board again during my trip, but won't have the Altair with me ;)

Paul

Geoff Harrison
10-16-2007, 02:08 AM
I have posted a preliminary version of my discussion about the bootloading process here (http://www.solivant.com/altair_bootloaders/). I'll try to tidy it up a little over the next few days and add more troubleshooting hints when I think of them.

It goes into more detail than any sane person could want to know about booting Altairs, I hope it's not to dull to read.

Unfortunately, I can't do any more testing with windows for a while. My file server went down hard today and I had to scavenge my windows machine to get it running again. I'll do more testing when I get a new motherboard for it.

Geoff Harrison
10-20-2007, 11:05 PM
I tried a maximum of 9600 and was losing characters due to the lack of handshaking.

Just a follow up to my 4800 baud maximum speed issue. I have rewired the connection between my 2SIO board and the rear RS232 connector and I can run reliably at 9600 now. It had nothing to do with handshaking, the boot loaders don't even try to throttle the input anyway. I can only assume there was a bad connection with the old cable, which was one that was originally in my 8800b so it was probably about 30 years old.

Anyway, 9600 works fine and is definitely preferable to 4800. I did have to make sure that the DB25 pins 4, 5, & 8 were tied together to keep the 2SIO and my linux laptop happy. I don't know whether windows would be any different, I don't see why it would. I'll find out when I get a new motherboard for my windows machine next week.