• Please review our updated Terms and Rules here

Programming Altair confusion

the white wires" place them in a bag seal them and write "Beware of the Leopard.” on it and tape it inside your Altair case as a history lesson.
 
Wimp! I toggled in the assembler+editor (PT?) as well as the 4K BASIC on the Altair. My front panel shows a bit of wear....

Hahaha! I'll own that "Wimp" label; even keyboard transcription tends to drive me batty. I was a bit too young for front panels, but I remember typing in plenty of programs from books and magazines, and every single time having to go back over it with a fine tooth comb to see where I missed a value in a DATA statement or whatever. The thought of having to enter all that... and then having to flick through 4K of RAM looking for which byte I botched... you're a better man than I.
 
I was young and stupid. :)

Eh, at least some of us grow out of the stupid part. Not sure about myself. ;)

Speaking of which, apparently I found this just too darn fascinating. Look what I managed to make happen this evening: "Altair Music of a Sort" on the TRS-80 Model I:


I patched the program to load at 0x6000, removed the "ff" between the two songs so it'd play them both in one go, and it now jumps to the TRS-80 Level II BASIC ROM re-entry point instead of 0x0000 or looping. (These were all single byte patches to the hex code, I didn't recompile it.)

Still not really getting "The Fool on the Hill" out of the first part, but "Daisy" sounds remarkably good.
 
Driving a slot car around a track with a aerial antenna TV in the same room resulted in the birth of death metal music.
 
Ulp.. how long did that take you? It took me 25 minutes to do the FOTH demo.

If anyone's curious, here's a rough description of what I did to get that code from the website into the TRS-80:
  1. I selected the HTML table describing the code in detail, copied it, and pasted it into a UNIX terminal running "vi".
  2. Added a few lines in the text editor so the 4th tabular column is essentially a complete hex dump of the entire memory image of the program. (The table is missing NOPs from 0x001C-1F, (IE, it's not a *complete* memory dump.) Then I edited the all the jump addresses to relocate the program at the 24K memory boundary instead of at 0K, so it'll work in a computer that has ROM at the start of the memory map. Also changed the address at offset 0x07 so it jumps to the TRS-80 BASIC return entry point instead of the start of the program.
  3. Changed the value at offset 0x77 from "ff" (the end-of-song marker) to "02" ("rest") so the two songs in the data area would play sequentially.
  4. At a BASH shell, ran:
    Code:
    echo "\$A0000," > trsfool2.needham ; cat trashfool2.txt | awk '{print $4}' | tr "\n" " " >> trsfool2.needham
     srec_cat trsfool2.needham -Needham_Hexadecimal -Output trsfool2.bin -Binary
    (I chose the "Needham" format for input to srec_cat because poking through the man pages for the different supported formats it looked easy; it doesn't require a checksum, among other things. Alternatively I could have banged together a script to use"bc" to directly spit out a binary blob)
  5. Using trs80-tool I converted the .bin file into a TRS-80 .CMD file with ORG and ENTRY points set at 0x6000. Then I used the same tool to convert the .CMD into a .CAS file:
    Code:
    trs80-tool convert trsfool2.bin --start 0x6000 --entry 0x6000 trsfool2.cmd
    trs80-tool convert trsfool.cmd trsfool.cas
Having done all that I fired up the trs80gp emulator set to a cassette-only system, loaded the file with SYSTEM, and before entering "/" to execute it opened up the interactive Z80 debugger so I could watch the Z80 registers. (Obviously I'm not actually going to be able to hear the radio interference.) ;) When running in the emulator showed it doing the expected behavior (HL counting up through the music data area for ~30 seconds, followed by an exit to BASIC) it was time to clear off the work-desk enough to set up the real TRS-80 and an old boombox on it to see if it actually worked.

I guess that all sounds like a lot when I write it down there, and it *did* take me a couple hours all together to puzzle out the plan and get all the tools set up, but now that the work is done I can go from modifying the source bytes to testing a binary in about two minutes. We're so spoiled today. ;)
 
Stupid question. Is it "Al-tair" (like Al Bundy) or "All-tair"? I've heard it pronounced both ways and I have a habit of saying the latter myself, I'm wondering if there's a real difference or if it's just down to accents.
 
Stupid question. Is it "Al-tair" (like Al Bundy) or "All-tair"?
If you're goint to be strict about this: actually that name comes from Arabian, so it shouldn't be pronounced „English way”. Rather like „Al-tah-eer” (like Al Bundy, silent „h”).
 
It is funny, I've always preferred HEX but was quite aware of the octal connection with the 8080 instruction set. Then I got my Nicolet1080. Every thing was in octal. It was a 20 bit computer so there was no advantage to using HEX over octal and the instructions were 3 bit chunks. I'll always think of the 8080 instruction as C3 for jump but I'm quite at home using octal on my Nicolet, although 20 fits in a HEX number.
I should note that the most common mess up on the Altair white wires was the fact that C3 is the bit reverse of C3. This was one of the most common problems with people wiring their front panel. The front panel uses the 8080 processor for the address so loading the address is C3 and address bytes from the front panel switches. If the wires are out of order the address setting seems to act as it should but the address seen on the bus is wrong. It is almost impossible to properly strip the solid strand wires without the proper stripping tool so that nasty white wires will get nicked and break the third time you remove the CPU board. AAAaaaahhhhh!
Dwight
 
If you're goint to be strict about this: actually that name comes from Arabian, so it shouldn't be pronounced „English way”. Rather like „Al-tah-eer” (like Al Bundy, silent „h”).

If one common anecdote about the origin of the name of the machine is accurate the “correct” pronunciation is however they say it in the Original Series Star Trek episode “Amok Time”. Which would be “Al-tear”. (Al as in Bundy, tear as in rip.)

 
Never noticed that, Dwight, but you're right. Same C3 is also a near RETurn instruction in 8086-ese.
The problem with the Altair is that the front panel connector can be easily reversed on the CPU card. The symptoms just don't make much sense.
At one of the Maker Fairs, Erik brought me an Altair to fix while people watched ( kind of dull ). It was claimed to have worked once. Other than the connector on backwards, the bus board had about 5 or 6 shorts. It couldn't have worked that well! I like to use my "find the short" method but it takes a power supply that current limit to about 10 or more amps.
It is a non-destructive method, even though high current is used. The high current is used on paths that can normally take high current. The method is similar to a balanced bridge only uses higher current. It works on power plains as well but it is a two pass method where one finds the line of 0 volts using opposite corners and making a line of 0 volts across the board. Where the two lines cross is the short.
Hard to explain but is quite effective without making a lot of smoke.
Dwight
 
Molex pin connectors seemed to be a popular choice for budget cutters. SWTPC used them quite a bit. I still have an adapter that I made to go from the MITS front-panel to a DIP plug on a Z80 card.
 
Back
Top