PDA

View Full Version : IMSAI 8080 programming problem



thefoolonthehill
February 7th, 2010, 09:16 PM
I have an IMSAI 8080 and I wanted to know if and how I could use an Apple II+ ascii keyboard as a keyboard on the IMSAI. I have a parallel and serial card for the IMSAI.

NobodyIsHere
February 8th, 2010, 03:53 AM
Hi! That's a familiar problem! John from S100Computers.com and I are working on a S-100 keyboard project at the moment. It would allow you to use cheap PS/2 type keyboards with your parallel ASCII interface. We've already gotten the PCBs so it is too late for this round but if there is another PCB order you may want to get in on the project.

We have the PCBs and are currently in build and test phase of the initial boards. It looks like it works but we are still working out the bugs. I have a partially built board in my basement workshop. I suspect by the time we're down fixing this board we are looking at a PCB respin to clean up some issues but that's rather preliminary.

Depending on your keyboard input you probably can use the Apple II+ keyboard with a custom cable connection. What sort of keyboard interface are you using? If it is just a straight parallel interface like a 8 bit port or 8255 PPI then it is just a matter of building a cable. Typically that is VCC, GND, 8 data bits, strobe, and acknowledge (sometimes). If you are using a Vector Graphic FlashWriter or VDB 8024 or some other kind of video board with parallel ASCII keyboard interface which is the more typical situation then you'll need to build a cable for it that matches your board.

Of course you could make your own using a uC like PIC or AVR but that is overkill since you already have the Apple II+ keyboard. I think Jim Brain sells or has PCBs for a PS/2 keyboard to parallel ASCII converter.

If you decide to just make the cable for your Apple II+ keyboard you will need the schematics for it and the keyboard interface on the IMSAI. That is your starting point because you'll have to make the match up specific to your system.

Thanks and have a nice day!

Andrew Lynch

Dwight Elvey
February 8th, 2010, 07:08 AM
Hi
The keyboard will most likely not work with the parallel
output you have. Most of these boards have just a parallel
output for a centronics printer. It is usually a uni-directional
port.
The serial is what is normally expected unless you have
a board ( like the polymophic graphics board ) that has
a specific keyboard port.
If you have a laptop or other PC that is working, use
the serial port of it. If you are trying to bootstrap
CP/M or something, this can be a lot more easily done
through the serial port and a PC with a disk.
Dwight

thefoolonthehill
February 8th, 2010, 03:40 PM
here is a picture of the card I have which I suspect to be a serial board. the only labels on the board are "MIO rev. 2, and there are 3 ports labeled PIO PIO and SIO.

http://img5.imageshack.us/img5/8964/snapshotpe.jpg

Dwight Elvey
February 8th, 2010, 04:17 PM
Hi
If it is the IMSAI MIO board, it does have input ports. You can see
a copy of the manual at:
http://www.s100computers.com/Hardware%20Folder/IMSAI/MIO/MIO%20Board.htm
I don't see a schematic but there should be enough information there
to get you going.
Parallel keyboards usually have a strobe and 7 or 8 data bits.
Do check to see what power requirements it has, Most need
+5V but some also require -5V or -12V.
I don't know what the Apple on needed.
Dwight

thefoolonthehill
February 8th, 2010, 05:37 PM
I now have a 25 pin to 9 pin serial connection between my PC and the IMSAI. The only thing I don't know how to do is talk to it with hyperterminal. Is there some kind of bootstrap program I have to toggle into it before I can use the terminal?

Dwight Elvey
February 8th, 2010, 09:11 PM
I now have a 25 pin to 9 pin serial connection between my PC and the IMSAI. The only thing I don't know how to do is talk to it with hyperterminal. Is there some kind of bootstrap program I have to toggle into it before I can use the terminal?

Hi
Yes, it needs some software to run.
I guess the question is, what are you planning to do with the
system? What other boards does it have?
Look at the code examples in the manual.
It usually doesn't take to much to just transfer
data into RAM.
Dwight

thefoolonthehill
February 8th, 2010, 10:31 PM
All I need is a bootloader program to toggle in so I can dump paper tape images from the pc terminal.

http://www.youtube.com/watch?v=vAhp_LzvSWk

this guy is doing exactly what I want to do with my IMSAI with his altair, but the only problem is he doesn't tell us the code for his bootloader.

Dwight Elvey
February 9th, 2010, 08:16 AM
Hi
Look at the example code in the manual. Such a loader
is only a few bytes.
Dwight

NobodyIsHere
February 9th, 2010, 08:52 AM
Hi! You may want to consider a EPROM board for boot loading. You can bootstrap with the front panel but it is going to be pretty time consuming to do it everytime. A small EPROM board would make your life a lot easier.

Thanks and have a nice day!

Andrew Lynch

thefoolonthehill
February 9th, 2010, 11:06 PM
thank you all for your help

Dwight Elvey
February 10th, 2010, 09:53 AM
Hi
While I've been trying to get you to RTFM, I thought I'd at least give
you some idea as to how to write code to do a bootstrap.
You'll still have to find out what 8080 instructions to use and
actually look at the manual.

cold start:
read the data port of the serial chip ( to clear any previous junk data ).
load a memory pointer with the location of the data you are expecting
load ( HL seems like a like pointer to use ).
loop
Check that serial status.
If RecieveReady continue else junp back to loop.
Read the data port of the serial chip.
Transfer it to the location pointer to by the memory pointer
Increment the memory pointer
Jump back to loop

This is 8 instructions and about 19 or 20 bytes.
Please post your code listing here.
Looking at the manual, you'll need to understand
what the jumpers do and how your board is configured.
Dwight

thefoolonthehill
February 11th, 2010, 09:37 PM
Here is the simplest bootstrap loader that's printed in the manual. I have keyed it in twice but I was unsuccessful in downloading binaries to the RAM through a serial terminal. Im not sure if it is a problem with the bootstrap or with the file or the connection.

3E CE D3 03 3E 17 D3 03 21 20 00 06 F8 DB 03 E6
02 CA 0D 00 DB 02 77 3C CA 08 00 23 05 C2 0D 00

Chuck(G)
February 11th, 2010, 10:26 PM
Okay, let's take a look at your bootstrap. I'm assuming that you've got the terminal connected to the correct serial port and the bitrate of the terminal matches that of the serial card and you've set the terminal to 8 bits, no parity.

The serial chips appear to be 8251A devices, so your bootstrap would be:


3E CE D3 03 : Async mode byte; sets 2 stop, 8 data bits, no parity, 16x bitrate divisor.
3E 17 D3 03 : Command byte; reset error flag, set receive enable, DTR, transmit enable
21 20 00 : Start storing data in location 00 20
06 F8 : Set our byte counter in register B to 248
DB 03 E6 02 CA 0D 00 : Read the USART status, isolate bit 1 (RxRDY) and loop if no data
DB 02 77 : Read the data byte and store it in the next location
3C CA 08 00 : Increment the byte and loop back, restarting the whole thing if FF is read (rubout)
23 05 C2 0D 00 : bump the location we're storing in, decrement our byte counter and loop back if we haven't read 248 bytes

Okay, so if this doesn't work, why not see if your terminal is hooked up correctly? Key in the following code


3E CE D3 03 3E 17 D3 03 DB 03 E6 01 CA 08 00 3E 5A D3 02 C3 08 00

This will send a continuous stream of "Z" characters to your terminal. If you're not getting them, time to start troubleshooting your serial hookup.

Dwight Elvey
February 11th, 2010, 11:33 PM
Okay, let's take a look at your bootstrap. I'm assuming that you've got the terminal connected to the correct serial port and the bitrate of the terminal matches that of the serial card and you've set the terminal to 8 bits, no parity.

The serial chips appear to be 8251A devices, so your bootstrap would be:

.

Hi
Are you sure it is a 8251A??
The manual I was looking at seemed to be one of those older ones
that didn't require any software initializations.
Dwight

Dwight Elvey
February 11th, 2010, 11:57 PM
Here is the simplest bootstrap loader that's printed in the manual. I have keyed it in twice but I was unsuccessful in downloading binaries to the RAM through a serial terminal. Im not sure if it is a problem with the bootstrap or with the file or the connection.

3E CE D3 03 3E 17 D3 03 21 20 00 06 F8 DB 03 E6
02 CA 0D 00 DB 02 77 3C CA 08 00 23 05 C2 0D 00

Hi
Can you show this as an assembly listing. I don't
really want to disassemble your code here.
Also, what are your jumper and switch setting?
Dwight

thefoolonthehill
February 12th, 2010, 12:06 AM
00111110 11001110 11010011 00000011 00111110 00010111 11010011 00000011 00100001 00100000 00000000 00000110 11111000 11011011 00000011 11100110 00000010 11001010 00001101 00000000 11011011 00000010 01110111 00111100 11001010 00001000 00000000 00100011 00000101 11000010 00001101 00000000

the settings for the MIO board?

Dwight Elvey
February 12th, 2010, 07:19 AM
Hi
I guess I'm not to clear here. Please list the program as
assembly code mnemonics. I'm not going to run it
on a processor.
The jumpers and such can significantly change where
the board is addressed. I want to see if your program
is matched to the board.
Dwight

Dwight Elvey
February 12th, 2010, 07:28 AM
Hi
Oops! I should have looked at Chuck's code. He listed it out
for me and I didn't even pay to much attention.
The code you entered is for a different serial chip and
won't work. It is not correct for your serial board.
As I said before, RTFM. Back a few messages, I posted
a pointer to a manual. Please refer to THAT manual. It
didn't show any boot code but the code you need is
even simpler than the 8251 code you are trying to
use.
Dwight