Here are the results of Douglas helping me troubleshoot a Kaypro 4/84 Motherboard with
a problem booting from Floppy.
I'm working on a Kaypro 4/84 that has a Motherboard 81-184, with ROM 81-292A.
I have Verified the ROM has good Code. On Power up the Motherboard is starting
the Boot process as the LED comes on for Drive A: and it moves the head to
track 0. After the computer steps Floppy A: to track 0, the Keyboard LED comes "ON",
and nothing happens after that.
I've checked the Crystal Frequency, and the Frequencies generated from the
U10 Gate Array (CCLK) for U10 81-189. I've verified the Crystal frequency on
Gate Array U23 and the 4800 HZ, 1 MHz, 2 MHz, and 4 MHz generated from U23 81-194.
I've verified the following signals back to the FDC Pins, and all are good and
working correctly. Note that the Floppy Must be SELECTED to get the INPUT signals
to the FDC.
1. FDC Pin 35 = INDEX Pulse from Floppy Drive
2. FDC Pin 34 = Track 0 Sensor from Floppy Drive
3. FDC Pin 36 = Write Protect from Floppy Drive
I moved my Floppy Drive's Head to the inner track, and on Power up, it steps
to the outer track. So, stepper Motor, and logic are working for stepping.
The Motor also runs to spin the floppy media. But, it's not reading my boot
floppy.
I've verified the FDC Pins 26 and 27.
FDC 9216 Pin 7 is FDATA to FDC Pin 27.
FDC 9216 Pin 2 is FClock to FDC Pin 26
I've even changed one Memory IC, and replaced D0 thru D7 moving the New RAM IC
in each D{0..7} position. No Change in operation of the Motherboard.
I'm trying to test the FDC to get it working on that problematic Motherboard.
I've installed Monitor 2.7, and moved the head to track 39 with power OFF.
When I power up, the FDC steps the head to track 0.
The Kaypro Monitor's commands are:
Code:
Kaypro Monitor v2.7
: ?(CR)
D <start> <end> - display memory in HEX
S <start> - set/view memory
(CR) = skip fwd, '-' = skip bkwd, '.' = done
G <start> - go to address
F <start> <end> <data> - fill memory
M <start> <end> <dest> - Move data
I <port> [num] - Input from port
O <port> <value> [...] - Output to port
H - Hexload program
N <hw> - iNitialize hardware (KB83, KB84, CRTC, HDD)
T <hw> - Test hardware
(KBD, CRTC, VRT, CRTR, CRTF, HDD, HDRD, FDRD, FLPY)
V - Show ROM version
^C aborts command entry
.
.
The Kaypro 4/84's Ports are as follows: (Modified to be correct for the 4/84
Motherboard from the Version F Manual.)
Code:
Port#
Use (hex) Device Function
System:
14 - 17 74 373 System output port.
Bit functions.
0 0=Select floppy A (C on K10).
1 0=Select floppy B (Hard disk on K10).
2 0=Select side 1, 1=Select side 0.
3 0=PSTROB.
4 1=Floppy motor on (48 tpi drives).
(FOR HIGH SPEED, HIGH Density Drives)
4 0=Floppy motor on (48 tpi drives).
1=Select high speed (High density drive). * see note below.
5 0=Select double-density.
6 0=Select normal character set.
7 0=Select 64K RAM.
1=Select ROM (RAM 8000-FFFF).
74 244 System input port.
Bit functions.
0 0=floppy A selected (C on K10).
1 0=floppy B selected (Hard disk on K10).
2 0=Side 1 selected, 1=Select side 0.
3 0=PSTROB.
4 1=Motor is on (48 tpi floppy).
(FOR HIGH SPEED, HIGH Density Drives)
4 0=Floppy motor on (48 tpi drives).
1=Select high speed (High density drive). * see note below.
5 0=Double-density is selected.
6 0=Parallel printer is busy.
7 0=64K RAM is selected.
1=ROM (RAM 8000-FFFF) selected.
* Note on high-density drives:
A 1 in bit position 4 will select high speed on the high-density diskette
drive. To reset the drive to low speed it is necessary to change this bit to a
0 AND open the drive door, then close it.
I've read port 0x14, and I get a response of 0xE7.
I 14
INPUT 14 = 0xE7 = 1110 0111 Binary.
I used the floppy stepping rate of 30ms since I know the Kaypro's Tandon Floppy
Drives require a step rate of 30ms.
Code:
r1 r0 Stepping rate
0 0 6 ms
0 1 12 ms
1 0 20 ms
1 1 30 ms <-------------b1 & b0
The Type I commands will use this stepping rate.
Now, I need to calculate my command for a SEEK to track 20 = 0x14
The SEEK Command is 0x13 (for 30ms stepping rate) and the Data Register 0x17 is
loaded with the Desired Track.
O 17 14
T FLPY 13
But, that doesn't make it step.
Code:
Command Summary (models 1791, 1792, 1793, 1794)
Type Command b7 b6 b5 b4 b3 b2 b1 b0
I Restore 0 0 0 0 h V r1 r0
I Seek 0 0 0 1 h V r1 r0
I Step 0 0 1 T h V r1 r0
I Step-In 0 1 0 T h V r1 r0
I Step-Out 0 1 1 T h V r1 r0
-------------------------------------------------------------------
II Read Sector 1 0 0 m S E C 0
II Write Sector 1 0 1 m S E C a0
III Read Address 1 1 0 0 0 E 0 0
III Read Track 1 1 1 0 0 E 0 0
III Write Track 1 1 1 1 0 E 0 0
IV Force Interrupt 1 1 0 1 i3 i2 i1 i0
A simple program to /WR (and /CE) to the WD1793 would be:
: S8000
8000 00 AF
8001 00 D3
8002 00 13
8003 00 C3
8004 00 01
8005 00 80
8006 00 .
: G8000
GO 8000 ?Y
Continuously stepping in/out is more complicated, but you can issue single STEP IN and STEP OUT
commands to the WD1793 manually:
: T FLPY 53
41 0000
40 0001
: T FLPY 73
41 0000
40 0001
:
Command 53 is STEP IN (away from track 0), and 73 is STEP OUT (towards track 0). Each performs a
single STEP, with direction set according to the command.
I've calculated my byte should be 0x96 to turn on Motor for A:, Double Density, Side 0.
That works fine.
I checked the CLOCK on Pin 24 and I get a 1 MHz Square wave clock signal.
When I use O 17 14 <CR>
and T FLPY 13
I get a response but no head movement. I know my floppy drive
works with another motherboard.
I used your example code to send the Write (/WE) signal to U44 FDC 1793.
I did not have the /WE Signal on Pin 2 of the FDC U44 1793. I chased that
back to Pin 8 of U52 74LS32. On U52 Pin 9 was working correctly but Pin 10
was stuck at about 1.8 volts.
See U52-Pin10.jpg
I had a spare 74LS32 and replaced it. Now, I had the /WE Signal at Pin 2 of
FDC U44 1793.
Next, I tried stepping the head towards the center of the floppy (Track 20 = 0x14)
and that worked. I then restored the head to track 0 and read the Boot Sector
into 0x8000 to 0x8100. That worked fine. So, I replaced your Monitor ROM
with the OEM ROM, and Booted the Kaypro with the Video Board connector
unplugged. The Motherboard booted to CP/M, and when I did a DIR<CR>
I got a read from Drive A:.
Another Kaypro fixed with Douglas's Monitor.
Larry