PDA

View Full Version : New here...with plenty of questions!!



antiquekid3
November 10th, 2009, 03:38 PM
Hi!

Well, I've been interested in programming for quite a while now, but I haven't really gotten into the hardware part until a friend of mine sold me a KIM-1 for $20. I was really excited about it, but it doesn't work. I tested the LED display, keyboard, reset circuit and power supply, but all seem just fine. I just hope my 6530s haven't died... :-(

If anyone has any ideas where else I could look for getting the KIM-1 working again, I'd love to hear them!

But my latest toy was a free gift, and one that I've had a lot of fun with! Someone at my local radio club brought me a SWTPC 6800 with the CT-64 terminal, AC-30 tape interface, and a bunch of cards. I have a full 32K of RAM, although I have three bad 4044s...

Also, my original monitor for the terminal is not doing so well. It takes about 5 minutes for it to "warm up" which means going from a nearly black screen to one that is full bright green. Then comes the smell of lots of ozone. I think the insulation in the flyback has probably gone bad, as I can see purple arcs inside the silicone potting.

Luckily, I have a Tandy 200 and a Dell laptop that both offer RS-232 communication. I've been using HyperTerminal the most, though.

The biggest trouble has not been so much hardware related, though. I am not at all proficient in assembly (I know Processing/Arduino, Pascal and Basic) and am having a very hard time figuring out how to send data to a given card inserted in the SS-30 bus. I have numerous other cards, some of which I can't find a single sentence of information on. One particular card was made by Newtech Computer Systems in 1977, called the Model 68, which is some kind of sound card. I've figured out that it's a very primitive D/A converter with an amplifier. It only uses 6 data lines as input.

So how might I write a program that sends 00 through 3F hex (0 to 0011 1111 bin) and back down to 00 over and over, to simulate a triangle wave? I'm clueless as to communicating with the cards besides an MP-C in slot 0 and an MP-S in slot 1.

Thanks in advance!!

Kyle O.

antiquekid3
November 11th, 2009, 05:20 PM
Sorry if I have so many questions at first. Maybe I should've split them up.

If anyone can help (especially with the SWTPC), I'd be most appreciative!

Kyle

barythrin
November 12th, 2009, 09:06 AM
Not too many questions, just advanced ones that not all of us know enough to respond.

So on the Kim you could poke around pin-1 of most the chips and see if they're getting voltage. It could just be a bad trace or something. Most chips accept voltage on pin-1 so it's kinda a poor but relevant way to see if the chip is getting voltage or if something is burned out prior to that.

What does it do when you apply power to it? That may also help folks think of the culprit.

With card identification if you can find an FCC number that's usually the best bet you can search on although from that era not all cards have them. A few folks here are good enough to identify cards with a link to a picture of the card and looking at what the circuit and chips are used for.

Dwight Elvey
November 12th, 2009, 10:01 AM
Hi
4044s are a hard one to locate. Don't confuse these with the
CMOS part CD4044.
A look around shows that you could use 2147s but these are
35ns parts and use quite a bit more power to run. I did notice
that Anchor Electronics has 9044s. I've used these in place
of 4044s on my H8 memory boards with no issues.
Dwight

VintageComputerman
November 12th, 2009, 10:36 AM
You got a KIM-1 for $20.00!!! :gape:

I wish I had friends like that.

antiquekid3
November 12th, 2009, 02:19 PM
I think I have a pretty different KIM-1. I will definitely be getting some pictures of it and some of the mystery cards. I'm not sure what it means, but one of the chips has an X scratched into it. I might dig around and see if I have an extra 74145.

I did see that a 2147 could have been used instead, but it's good to know that it's not an exact replacement. Thanks for letting me know about the 9044s!

The KIM-1 does nothing when powered up. The display doesn't light up, but I have tested it. The keyboard checked out okay and the reset function works fine. I really don't know where to go from here other than check out the power to each chip.

A friend of mine wanted to buy some Smaller Advent speakers and a Technics turntable and found this KIM-1 at a thrift store for $20. Since I was selling her the speakers and turntable, she used the computer as bargaining power. And I was just fine with that!!

Kyle

JOELAV
November 28th, 2009, 08:27 AM
About the SWTPC, I'm currently restoring a 6809 SWTPC, so I'm very interested in this. (You can follow my progress at 8littlebits.wordpress.com FWIW.)

The 30-pin bus is 'geographically' addressed. What that means is that the address decoder circuitry is elsewhere -- on the backplane board for the 6800, or on a separate board that bridges the 50-pin and 30-pin sections on at least one 6809 model of the SWTPC. This means that the plug-in cards can be simpler, since they don't need to decode their own addresses.

It looks like the 6800 assigned 4 addresses to each "I/O Port" (30-pin slot) beginning at &H8000 through &H801F. So if you had (e.g.) a DAC board plugged into port 4 (numbering starting at 0), you could do something like:

POKE &H8010,63

in BASIC. If you move the DAC board to port 5, you'll have to POKE &H8014,63. Or in assembler, it would be something like:

LDA #63
STA $8014

I assume you have found Michael Holley's great SWTPC documentation archive at: http://www.swtpc.com/mholley/ If not, take a look. It's a treasure trove. The address - port mapping information you're looking for can be found in the Assembly Instructions PDF for the 6800 MP-B or MP-B2 motherboards.

I've printed out a bunch of this documentation and put it in a 3-ring binder.

JCE

antiquekid3
November 28th, 2009, 05:55 PM
Excellent! I like your blog! Now being almost completely illiterate when it comes to assembly programming (I am much more of a BASIC/Processing/Pascal guy), how do I know which LDA and STA command to use?

Do you think you could write me a simple program that sends 0 to 63 to 0 to 63...over and over...to the data lines of the card? Again, if I had more knowledge in assembly language, I presume this would be a simple task for me.

I'm having lots of trouble with the Altair 680 BASIC. For some odd reason, every character at the end of the line that it spits out is incorrect. For example, instead of an "H" at the end of "TERMINAL WIDTH", it's some other letter with an accent. I'll try and document what characters they actually are. I am using the BASIC patch and source code on Michael Holley's website.

Is there a better version of BASIC out there for the SWTPC? I'd love to get it if there is!

Thanks for the tips!

Kyle

JOELAV
November 29th, 2009, 05:31 PM
I have to admit that my assembly language skills are pretty stale at this point. I did read a book on programming the 6809 when I was in high school, but that was around 1985 or 1986, so I'd have to brush up a little. What you're wanting to do would probably look something like this (but I don't promise that the syntax is perfect (my comments in particular would cause an assembler to choke) -- this is off the top of my head...):


START LDA #63 Load the A accumulator (A = 63)
LOOP STA $8010 Store the contents of A at the address of the DAC
(POKE &H8010,A)
DECA Decrement A (A = A - 1)
[Sets the Z flag in the Condition Code Register if A=0 results]
BNE LOOP Branch to 'LOOP' if Not Equal to zero
(IF A<>0 THEN GOTO LOOP)
LOOP2 STA $8010 Store the contents of A at the address of the DAC
(POKE &H8010,A)
INCA Increment A (A = A + 1)
CMPA #63 CoMPare Accumulator A to 63
BEQ LOOP Branch to 'LOOP' if we are back to 63
(IF A=63 THEN GOTO LOOP)
BNE LOOP2 Branch to 'LOOP2' otherwise (ELSE GOTO LOOP2)


As to the Altair BASIC, I really have no experience with that. Are you running that from FLEX or NDOS, or is that in an EPROM on your CPU board? (Or are you loading it from tape?!) I know there are other BASICs for the SWTPC (Robert Uiterwyk's Micro Basic, TSC BASIC, and probably others). I'm an OS-9 guy from my CoCo days, so when I get OS-9 running on the SWTPC I have, I can use BASIC09, but those require a 6809 processor.

Have you played with the SWTPC emulator? If you download the full package there are a bunch of disk images which may well have all kinds of BASIC goodies...

JCE

antiquekid3
November 30th, 2009, 07:50 PM
Thanks for the code! When you store a number in the accumulator, does it store a decimal number or a hex number? I assume hex, so does that mean i need to store 0x3F instead of 63?

As for the BASIC, it turns out that by forcing incoming data to 7-bit ASCII in HyperTerminal fixes the problem. Yay!

Also, I tried poking the address the board was connected to in BASIC, and I heard it click! Unfortunately, it's not clicking anymore...I think I poked it a few too many times! Sounds like I need to fire up the oscilloscope!

Thanks for the help! I can't wait to get this all working!

Kyle

JOELAV
December 1st, 2009, 07:55 AM
Glad you got the terminal issue worked out.

The number you put in the accumulator is stored in binary of course! ;) The assembler allows you to express numbers in decimal, hexadecimal, binary, and maybe even octal, using different syntax. I think the Motorola assembler defaults to decimal, so when you write '63' that means decimal 63. A number prefixed with '$' will be interpreted as hex, so the hex equivalent would be '$3F'. And I think if you want to write out a binary number you would do it like '%00111111'. But of course these are just the different ways you express it to the assembler. In the accumulator it's all just 00111111.

JCE

antiquekid3
December 1st, 2009, 02:55 PM
Glad you got the terminal issue worked out.

The number you put in the accumulator is stored in binary of course! ;) The assembler allows you to express numbers in decimal, hexadecimal, binary, and maybe even octal, using different syntax. I think the Motorola assembler defaults to decimal, so when you write '63' that means decimal 63. A number prefixed with '$' will be interpreted as hex, so the hex equivalent would be '$3F'. And I think if you want to write out a binary number you would do it like '%00111111'. But of course these are just the different ways you express it to the assembler. In the accumulator it's all just 00111111.

JCE

Oh, well of course! But I was talking about how the computer inputs/outputs that data. Will this differ from SWTBUG to MIKBUG? I have the SWTBUG monitor in my computer.

Kyle

P.S. Do you need any 6821s? I think I could probably send you a couple if you need them.