Getting going with the Floppy Disk kit

493 views
Skip to first unread message

John Kennedy

unread,
Oct 30, 2023, 11:36:40 PM10/30/23
to Altair-Duino
I love this kit! I’m sure I’ll love it more when I have things working :-)

At the moment I’ve reached the stage when I’ve build the interface card, and housed the TEAC  5.25” drive in the case with all the power and cables and so on.

I’ve connected the interface card directly to power (not the AltairDuino just yet, as I will have to manually solder pins to the Arduino and before I do that I want to know what is working!) and I can talk to the monitor program from a Serial program on my computer.  When I connect the Interface card to the floppy disk, I can use the monitor to read the drive status etc. Looks good so far!

Now I would like to write a bootable CP/M to a blank floppy.

I see the monitor program has option W, which will read a disk image over XMODEM and write to the floppy. Sounds perfect!

Could someone recommend a disk image that would work for this purpose? I’m not sure what image to use, and what format it needs to be in. Thank you!

Tom Lake

unread,
Oct 31, 2023, 9:15:07 PM10/31/23
to Altair-Duino
Use PC2FLOP on the Altair. Then you don't have to worry about the format. Use any of the disk images on https://altairclone.com/support.html

John Kennedy

unread,
Oct 31, 2023, 9:19:48 PM10/31/23
to Altair-Duino

If I understand, PC2FLOP requires the floppy disk to be connected to the AltaiDuino first. It is not currently connected, as this will require me soldering to the Arduino pins and I’m trying to confirm the floppy drive works and the interface works ie one step at a time. 

If using the floppy interface monitor is too tricky to get working, I will have to give it a go I guess. 

Chris Davis

unread,
Oct 31, 2023, 9:29:19 PM10/31/23
to Altair-Duino
The tools in the monitor will copy a floppy image regardless of the format. 

John Kennedy

unread,
Oct 31, 2023, 11:52:05 PM10/31/23
to Altair-Duino
Could you suggest a specific image? I tried a few and the transfer process hung after a second. The disk motor started but nothing else happened. 

Chris Davis

unread,
Nov 1, 2023, 9:02:25 AM11/1/23
to Altair-Duino
Then there is another issue.  I have copied all disk images to floppy with no problems at all.  I was connected to the Altair-Duino at the time.

da...@hansels.net

unread,
Nov 1, 2023, 9:09:31 AM11/1/23
to Altair-Duino
Can you successfully write data to the disk using the "w" command in the monitor and
read it back using the "r" command? That way you can test if your drive is working properly.
Note that you do NOT need to format the disk to write onto it on this level. If everything
is working properly then the write/read should just work.

If the basic write/read works then the problem is with your Xmodem transfer.

John Kennedy

unread,
Nov 1, 2023, 10:42:06 AM11/1/23
to Altair-Duino
Thanks David. Sadly "r" and "w" just hang, so it's time to check everything. At least I returns the drive data.

da...@hansels.net

unread,
Nov 1, 2023, 10:50:25 AM11/1/23
to Altair-Duino
Unfortunately the reponse to "I" doesn't mean much - floppy drives are dumb, they cannot
report their own status. Anything you see with the "I" command are things the controller
assumes about the drive based on what it's seen so far (but may be incorrect).

Here are a few things to try to see what works and what doesn't:
- Do the 'i' and 'o' commands move the drive head in and out?
- Does the '0' (zero) command move the head to track 0 (all the way out)?
- Does 'm 1' turn the motor on and 'm 0' turn it off? 
- Does 'M' show timing information (expected would be around 360 RPM)

John Kennedy

unread,
Nov 1, 2023, 11:14:16 PM11/1/23
to Altair-Duino
The head seems to move in and out as expected, and the motor turns on and off.
The M command reports:

Rotation period (ms, 28 rotations): avg=166.692, min=166.684=-0.004%, max=166.704=+0.007%, avgdiff=0.001=0.000%

So I don 't see a 360 anywhere :-/

da...@hansels.net

unread,
Nov 2, 2023, 7:37:39 AM11/2/23
to Altair-Duino
The 166ms is actually correct: 166.692ms/rotation = 5.999 rotations/second = 359.945 rotations/minute (RPM)
So that's looking good.

Do you have your DIP switches set correctly? Most importantly, DIP3+4 should be off.
Please post the output of the "I" and "T" commands.
And just to confirm: if you type "r 1" that just hangs forever - correct?

John Kennedy

unread,
Nov 2, 2023, 10:21:32 AM11/2/23
to Altair-Duino
All DIP switches off
r 1 <- hangs

Not known: if the eBay sourced floppy drive and disks are good.

Entering disk monitor.
Drive 0 is type 2: 5.25" HD emulating Altair 88-DCDD (8" disk system)
Drive 1 is type 2: 5.25" HD emulating Altair 88-DCDD (8" disk system)


Command: I
Measuring rotation period for drive 0... 166.697ms

Current Drive     : 0
Type              : 5.25" HD emulating Altair 88-DCDD (8" disk system)
Sync after step   : no
Number of Tracks  : 77
Number of Sectors : 32
Rotation speed    : 360 RPM
Sector length     : 5209us (soft-sectored)
Sector offset     : 2604us
Sector tail       : 425us
Read clear        : 200us
Write protected   : no
Current Track     : unknown

Command: T
Drive 0 is type 2: 5.25" HD emulating Altair 88-DCDD (8" disk system)

da...@hansels.net

unread,
Nov 2, 2023, 3:30:44 PM11/2/23
to Altair-Duino
That all looks good. Even a bad disk drive or disk shouldn't cause the controller to lock up when reading.

One condition that could cause it to lock up like that is if for some reason it thinks that the AD is
constantly trying to read or write data from/to it. While it is hanging, can you measure pins 27 and 28
of U6 with a voltmeter? They should both read LOW. If either of them permanently reads HIGH that
would cause the controller to lock up when reading (or writing) data from disk.

John Kennedy

unread,
Nov 2, 2023, 9:12:21 PM11/2/23
to Altair-Duino
ok, 27 reads high all the time. Time to inspect some soldering.

John Kennedy

unread,
Nov 3, 2023, 1:29:25 AM11/3/23
to Altair-Duino
Success! I neglected to notice that I needed to provide 3.3v as well as 5v. My test rig was set up for 5 only. Once I added 3.3 it seems like it's working! It's definitively let me write a CP/M image to a disk anyway.
Next step is to hook it up to a computer and see if it boots :-)

da...@hansels.net

unread,
Nov 3, 2023, 7:32:54 AM11/3/23
to Altair-Duino
Great! If you do more testing outside of the AD, I would also recommend pulling the INP and OUT lines (pin 17 and 19
of the connector that connects to the backplane) to ground (through a 10k resistor). Otherwise the floating inputs
may cause the controller to get stuck at random times.

John Kennedy

unread,
Nov 3, 2023, 1:08:46 PM11/3/23
to Altair-Duino
Thanks! I feel confident about soldering up everything to the AD now. 
Message has been deleted

John Kennedy

unread,
Nov 4, 2023, 4:16:42 PM11/4/23
to Altair-Duino
I was hoping everything would work first time, but guess what? I'm back.

I have soldered a socket to the Arduino, and connected the Disk interface to the AltairDuino. The Disk interface monitor still works great. I can r and w to the drive. I have tested all chips on the interface card, and double-checked the wiring. All chips are getting 5 or 3.3volts as expected.

I have flashed the AltairDuino with the "easy way" file here - https://adwaterandstir.com/install/ - so I hope that means all the firmware is in place. I'm using the ATMega supplied with the kit, and so it's set up to be MITS compatible.

I have jumper 3 "high", all others "low". I have Switch 1 on the switch block on, all others off as I am using DS DD floppy disks. I've used the W command to write a CP/M version to disk.

But when I select the Disk Boot ROM from the AltairDuino's menu,  nothing happens - not a peep from the floppy at all. I was expected it to start the drive motor at the very least.

Any ideas?

Chris Davis

unread,
Nov 4, 2023, 6:38:41 PM11/4/23
to Altair-Duino
Can you post a picture of the card?  I think you want all DIP switches down when using the 5.25" drive.

John Kennedy

unread,
Nov 4, 2023, 10:54:04 PM11/4/23
to Altair-Duino

Here's my build.

The position of the switches wouldn't have impact on the motor not starting, right? The address select would of course.

Note: The ribbon cable you see goes to a socket that contains wires to points on the Arduino Duo itself, as specified in the manual.
Mostly pins in the 20's and 40's.

IMG_2299.jpg
IMG_2298.jpg

da...@hansels.net

unread,
Nov 5, 2023, 7:53:40 AM11/5/23
to Altair-Duino
DIP switch 1 should be off (down), otherwise you're emulating a 88-MDS (5.25" disk) controller. However, as you said the drive should still spin, it just won't boot properly (checksum error).

The first thing the boot ROM does is select drive 0 and then check whether the controller is ready by reading register 8 and checking bit 3 which should be 0 if the controller is ready.

If you press STOP on the AD while it hangs, what's the address on the A0-A15 LEDs? If it is in the 4C0Ch-4C10h range that means the boot ROM isn't reading the "ready" bit as 0. You can verify that in the AD either by using the STEP switch and looking at the LEDs or (more human-friendly) enabling the "debug" option in the AD configuration editor which will show you the current instruction and processor register content. Note that you have to press STEP multiple times for most instructions since they take up more than one memory cycle.

If you've confirmed that the AD is reading 0xFF from register 8 then my first guesses would be:
(a) the AD firmware does not have the USE_IO_BUS option enabled (in which case it isn't looking for input from the I/O bus)
(b) the controller is in "monitor" mode (in which case it ignores requests from the AD). Power-cycling the AD (and therefore the controller) should reset the controller back into regular mode. The serial connection to the controller should NOT show the monitor prompt in that case.
(c) the controller isn't seeing the INP or OUT requests from the AD. Those should be short positive pulses on pins 27 (INP) or 28 (OUT) of U6. You'll need an oscilloscope to see them though.

da...@hansels.net

unread,
Nov 5, 2023, 12:44:58 PM11/5/23
to Altair-Duino
Forgot to say earlier: make sure that there is no disk in the emulated floppy disk drive.
The configuration menu should say "Configure disk drives : 0 mounted".

Here's another diagnostics suggestion:
  1. Get Mike Douglas' AFEXER.COM tool from here:
    https://deramp.com/downloads/altair/software/utilities/floppy_disk/
  2. Put it onto the emulated CP/M hard disk
  3. Boot from the emulated CP/M hard disk
  4. Start AFEXER, select the 8" disk drive option (since that is what the controller is emulating)
  5. Type "?" to get a list of possible commands. Some commands to try are
    'I' and 'O' should step the head in/out, this will work even without a disk in the drive
    'T' will load/unload the head. For a 5.25" drive that means the motor will start running. Note that the motor will keep running for a few seconds after you unload the head.
    'C' will attempt to read data from the disk to determine whether it's seeing the correct track
Message has been deleted
Message has been deleted

John Kennedy

unread,
Nov 5, 2023, 7:04:14 PM11/5/23
to Altair-Duino
Ah looks like my reply wasn't accidentally sent to author, it was just randomly deleted. Which is a sign that I need to take a break!

On Sunday, November 5, 2023 at 3:48:27 PM UTC-8 John Kennedy wrote:
Whoever designed this forum software to make too easy to reply to only the author is a jerk. 

tl;dr - nothing works. Weekend is over!Screenshot 2023-11-05 at 1.17.04 PM.png

da...@hansels.net

unread,
Nov 6, 2023, 7:51:14 AM11/6/23
to Altair-Duino
If you're not seeing pulses on the INP and OUT inputs of U6 then that's the main problem to look into now.
If the processor on the card can't see that the AD wants to read data from it (or write data to it) nothing can work.
It's basically the same as if no card were inserted at all.

First check your backplane wiring: test for continuity
  - between pin 1 of U3 on the card and pin D8 of the Arduino Due (INP)
  - between pin 5 of U3 on the card and pin D10 of the Arduino Due (OUT)

It that checks out then you'll have to follow the INP/OUT signals coming from the AD through the card until they get to U6.

The schematic and PCB layout are available as PDFs on my Github page:
https://github.com/dhansel/Altair8800-IOBus/tree/main/04-disk-controller

If you follow the signals they basically just combine the "INP" and "OUT" signals coming from the AD with the address decoder (determines whether the address on A2-A7 on the AD matches the card address set using the jumpers J2-J7). Then the signal goes through a transistor to convert 3.3V to 5V for the ATMega (U6).

You should be able to look at each of the signals on your scope. While the AD is stuck trying to boot:
- Do you see the (positive) INP pulses coming from the AD (pin 1 of U3)?
  If not then double-check the backplane wiring.
- Do you see the (positive) pulse coming from the address decoder (pin 2 of U3)?
  If not then double-check U1 and U2.
- Do you see the (negative) pulse at the output of U3 (NAND of pin 1 and pin 2)?

Let us know what you find.

John Kennedy

unread,
Nov 9, 2023, 9:33:49 PM11/9/23
to Altair-Duino
I'm a little calmer now ;-)

I've connected my scope to the Arduino. The interface board and floppy are not connected. Does this look as expected?
trace.png

John Kennedy

unread,
Nov 10, 2023, 12:05:40 AM11/10/23
to Altair-Duino
Actually, could you confirm the pins on the Arduino that are used for INP and OUT? I think I've found the problem.
I think I'm using the pins that are used for the INP and OUT LEDs, and not the pins used to interface with the card.
D'oh.

You say D8 and D10 above, but the Arduino source code says:

D6     OUT
D8     INP
D10  WAIT




On Monday, November 6, 2023 at 4:51:14 AM UTC-8 da...@hansels.net wrote:

da...@hansels.net

unread,
Nov 10, 2023, 7:46:18 AM11/10/23
to Altair-Duino
Sorry, you are correct - I messed up the pin numbers. OUT is D6 and INP is D8.

On the Arduino the same pins (D6 and D8) are used to both drive the LEDs and the I/O bus.
Those are the pins you need to connect to. There is also a table on the bottom of this page
that describes where the I/O bus lines connect to the Arduino Due.

John Kennedy

unread,
Nov 10, 2023, 11:09:53 PM11/10/23
to Altair-Duino
Once I realized I had soldered ALL the wires to the wrong place on the Arduino (well, 5V, 3.3V and And were correct) all I had to do was suck it up and desolder them.
And now it works :-D

IMG_BAB969C72F62-1.jpeg
Reply all
Reply to author
Forward
0 new messages