PDA

View Full Version : Poorly Philips P2000C



JonB
March 29th, 2015, 12:34 AM
Hi

I just acquired a Philips P2000C. This is a luggable CP/M machine with a dinky 9" screen and twin Teac FD55 drives (DSDD 640k). However, it is not working. At boot up it shows a random pattern of graphics characters. I say random, but it is always the same pattern each time I boot, so not like a PET boot screen.

The machine has a CPU board with a separate "terminal" board that is connected to the CPU board via a TTL level serial link, so the display looks like a dumb terminal to the computer.

According to the technical manual, the machine waits until the terminal board sends two characters. Only then will it proceed to boot.

So I'm thinking the terminal board is suspect. Does anyone have any clues on how to proceed?

JonB
March 29th, 2015, 12:41 AM
Interesting. It is showing a more regular pattern now. If you look closely at the attached image, you can also see some tiny bars one pixel high and about 8 wide at irregular points on the display. These are not static; they flit around randomly, so I think it is trying to do something.

23449

Other than the little bars, the image is rock steady, does not appear to be rolling.

JonB
March 29th, 2015, 01:49 AM
Update: The terminal board is definitely not working. By connecting its serial port to a PC via USB serial interface, I can see the boot prompt (after sending a couple of characters). The PC port is connected via a small line driver board (TTL to RS-232 voltages via a MAX232) like this:


P2000C RS-232
Serial
conn
----- ------
1 TxD - RxD
2 RxD - TxD
3 CTS
4 RTS
5 NC
6 GND - GnD



CTS/RTS are not connected. Serial parameters in Hyperterm are 19200 baud, 8 bits, 1 stop bit, no handshake. Power up the P2000C and hit a few keys and I can see:-



IPL-1.1

SYSTEM DISK?

..so it looks like the CPU card is OK. Inserting a disk gives activity, but the drive just buzzes, stops, and then the SYSTEM DISK? prompt comes up again. None of the disks I have will boot; whether that is because they are all zapped or the machine is not working I cannot tell right now. I suspect the former.

JonB
March 29th, 2015, 01:52 AM
(Duplicated post, deleted)

JonB
March 29th, 2015, 02:12 AM
Thought maybe drive 1 was defective so tried swapping the drives but it's still doing it. So now I have connected a pair of external drives, 3.5", and disconnected the internal ones. I should now be able to get a boot disk going from a downloaded image..

Update: OK, HxC floppy emulator is connected. I have tried images from here:

http://electrickery.xs4all.nl/comp/p2000c/floppyImages/

..but none of them will boot. I get the same buzz from HxC as I do from the drives, then back to the "SYSTEM DISK?" prompt. (To transfer to HxC I am converting them to .hfe format using the HxC PC software load / export function, and the images are all recognised as 80 track DS.)

JonB
March 29th, 2015, 04:36 AM
For reference the serial circuit is shown here. Highlighted are the pins for the internal connection to the terminal board.

23450

JonB
March 29th, 2015, 05:29 AM
I'm running out of ideas...

At the "SYSTEM DISK?" prompt you can enter the debugger by pressing ESC.

There are various commands you can execute, including some to read / write disk tracks.

They are shown in section 2.2 of the technical service manual.

When reading a track from a 5.25" floppy I am getting:

40 01 00 00 00 01 01

It is supposed to be the uPD765 floppy controller's RESULT byte or OK if successful, but I am not sure what I'm seeing here. 40 may be the result byte but I don't know how to interpret it. I looked at the datasheet for the controller and it mentions the main register and four others, but only gives the meaning of the four registers. I am not sure if one of these is the "RESULT" byte, or if it is the status register.

When attempting to read from the HxC I get the same result starting with 40.
When attempting to write to the floppy, I also get 40 01 00 00 00 01 01.
When attempting to write to a write protected floppy, I get 44 02 00 00 00 01 01. I think the second byte may be register 1 as bit 1 (as in "02") means "Write protected".


I do not know how to interpret these results, can anyone suggest a way?

JonB
March 29th, 2015, 06:29 AM
Main status register..

23451

Doesn't look like any of those are describing error conditions (and the datasheet says it is readable anytime, whereas the other registers are result sets that should only be read after an operation completes).

JonB
March 30th, 2015, 02:35 AM
Just testing with a longer seek.

Command "DR 179" means disk read from Floppy 1 Side 1 track 79. This gives a longer buzz (the head is moving further) and a different result of:-


40 01 00 4F 00 01 01

It is trying to tell me something, but what?

In case anyone fancies a go, the service manual is here: http://electrickery.xs4all.nl/comp/p2000c/doc/P2000C-SystemRefServiceManual.pdf and the debugger program is described on p.335 of the PDF.

Edit 2: Tested using a different track. If I ask it to read a track, say 60, byte 4 of the return value is showing the track number in hex. Works with other tracks too. When attempting to read from Drive 1 I get byte 1 as "41" instead of "40" for drive 0. And asking it to read side 2 of drive gives "45", so I conclude that the lower nibble of byte 1 is the drive side parameter of the command, and byte 4 is the track.

fjkraan
April 3rd, 2015, 04:38 AM
Could it be that you have a RAM problem? The screen gives garbage and the machine does not boot. The IPL (assumed to be working from ROM) and serial port work. The video screen is visible and stable, so the MC6845 is initialized. The FDC765 responds properly.

Is there a RAM test in the IPL ROM? Having the service manual on my site does not make me an expert on the P2000C. In this case I did not even scan it myself, just copied the files :-).

The machine appears to read the boot track and then stops. Apparantly the boot track did not land in RAM, or is not readable.

Fred Jan

JonB
April 3rd, 2015, 05:09 AM
Thanks Fred!

I think it is attempting to read the disk and failing for some reason. What I am hoping is that someone else who does have a P2000C can try this and let me know what the result is. As I said, the IPL should say "OK" if it successfully reads into the memory, but this is just coming up with a string of status bytes (which I assume indicates an error). I would like to discount the possibility that my disks are corrupted. I have tried write, then read, with a fresh (unformatted) disk, thinking it would succeed in writing at least but as you can see, it's not working.

One may perform memory tests on the CPU card manually by filling memory blocks with data and reading them back in the IPL. There s no memory test as such, because it is on the maintenance disk. There is a terminal board diagnostic test that you run by pressing ESC and Reset which performs a ROM checksum and simple RAM test, but with a corrupted screen I cannot see any result. It would be nice if the terminal board could send its results via the serial line rather than its own inbuilt monitor, because then you could see what was going on.

I must say there is very little out there about the P2000C, apart from what is on your site. I have just scoured Google and come up with nothing, save usenet group requests for boot disks. There is also an interesting youtube video showing it booting from reset in 3 seconds, but nothing else. What a pity.

Regards
JonB

ldkraemer
April 3rd, 2015, 05:37 PM
JonB,
I tend to agree with Fred Jan.

When you get time, why not enter the IPL (using the ESC key) and then try to use the SET MEMORY COMMAND in 4.2.10 to view
Driver Parameter Block at 0xFFD0 (Ref Section 3.2).

If that appears to be good, I'd start with all the Control Signals on the Z80 CPU located on the Terminal Board (Page 91 - Section B6)
after VERIFYING all the Power Suppy connections on the Terminal Board.

INT is PULLED UP by Resistor 3309
RES is toggled LOW by 74LS14 (7479)
NMI is PULLED UP by Resistor 3308
WAIT is PULLED UP by Resistor 3306
BUSREQ is PULLED UP by Resistor 3307

Don't overlook the CLOCK on Pin 6 of the Z80.

That should provide some good information.



Larry

JonB
April 5th, 2015, 02:02 AM
Hi Larry

Fred is talking about the terminal board, mostly, and I have that disconnected for the time being. Reason being that I would like to get the mainboard booting into CP/M before trying to fix the terminal board. I have the terminal board substituted for a PC running hyperterm which is why I can see the IPL running. More and more I am suspicious of my disks, I think they might all be corrupted. I need to try a known working boot disk.

So if I read this correct, the DPB is pointed to by the address held in FFD0-FFD1. Then, after issuing a DR command as previously, I should examine the 9 bytes of the DPB by following the address. Fair enough... I would expect it to contain the read parameters, but I don't see (in the manual) where the results of the operation get stored (I mean, the out buffer sure, but not the error or return code).

I think the floppy controller is OK. It says here that there will be no motor or seek if the controller doesn't initialise properly. It has to be the floppies. Should I assume that if they are not formatted properly then any read/write operation will fail? This is true of the OS level calls, but I don't know about low level BIOS calls.

JonB
April 6th, 2015, 07:02 AM
OK, have had more time to look at this, finally.

I have downloaded images from three different sources - two of which had IMD files (for use with ImageDisk) and one had a set of .TD0 files (for use with Teledisk). I have tried EVERYTHING I can to write a disk image that the P2000C will read, but I just keep on getting the same result bytes. Very frustrating. Have tried with different media - writing with a 1.2mb 5.25" drive as well as a Teac FD55 right out of the P2000C. No dice. Even tried 3.5" floppies and HxC floppy drive emulator (those last two give me a different result beginning C0, which seems to be indicating "the ready state changed"). I have a PC just for this purpose - to write old format floppies - and it is supposed to have the right sort of controller.

The most annoying thing is I can see the data in the files, they look like cp/m disks, there are all sorts of familiar stings in the raw data ("C Digital Research", etc) but I cannot get any of it onto a floppy in the right format, or the machine is really, really broken. It goes without saying that it isn't booting!

So maybe there really is something wrong with the hardware. I do know the controller has initialised properly, but what about the lines between it and the FDD?

One thing I noticed is that the HxC Floppy Emulator is deselecting the drive image the moment the P2000C is turned on. Is that significant?

JonB
April 6th, 2015, 09:12 AM
Right... Using the following parameters for 22DISK (suggested by Larry in my other thread about the P2000C):


BEGIN PHI2 Philips PC-2012 - DSDD 96 tpi 5.25"
DENSITY MFM ,LOW
CYLINDERS 80 SIDES 2 SECTORS 16,256
SIDE1 0 1,3,5,7,9,11,13,15,2,4,6,8,10,12,14,16
SIDE2 1 1,3,5,7,9,11,13,15,2,4,6,8,10,12,14,16
ORDER SIDES
BSH 5 BLM 31 EXM 3 DSM 157 DRM 127 AL0 080H AL1 0 OFS 2
END

..I discover that I can read all the disks that were supplied with the machine. Some of them even look like boot disks. Awesome!

However, since none of them can be read in the machine, I am forced to conclude I have a hardware problem of some sort...

Progress, sort of!

I am still getting the result bytes 40 01 00 00 00 01 01 and on revisiting the u765FDC datasheet it looks like they are interpreted as follows:

40 is Status Register 0. a value of 01000000 (D7 clear, D6 set; which means "Abnormal Termination of Command (AT)".
01 is Status Register 1. A value of 00000001 (D0 set; which means "Missing address Mark (MA)".

This is on a disk which, in the PC, I can actually read the directory from, and I can even see what the (text) files contain. So I guess the question is: Why am I getting a missing address mark every time I try to read a disk on the P2000C?

JonB
April 6th, 2015, 11:11 AM
The FDC uses a PLL to assist its Address Mark Detector. In the FDD section of the service manual we have this:

23586

I have a frequency counter but no scope. But I could set the VCO middle freq if it would help. Any ideas?

Alternatively, I guess Pin 30 (read) might be loose... Maybe...

Edit: looks like its at 303khz, way too low, unless I measure it wrong. Turning the pot has no effect. All connections on the cable are good.

JonB
April 7th, 2015, 10:06 AM
PLL circuit for reference. TP2 should read 500Khz but it's at 303 per my earlier post. Pin 8 of the 74LS293 top right is @ 150Khz, should be 250. Pin 10 is @ 500Khz, correct.

So should I conclude the '293 is bad? If anyone has advice on how to investigate further I'd be very grateful..

Roman
May 4th, 2015, 11:36 PM
Hi,
i tried to make a boot disk from the "p2kc_sys.imd" file you mentioned for my working P2000c and failed too. Similar to your description: access, buzzing - stop.

So i made an image of a working boot disk which was properly reproduced and works. The file (p2k_sys.imd) can be found at my server (ftp.sigst.at).
My environment is a pc 486, Teac FD-55 FV-03-U, ImageDisk 1.17 an a brand new 48TPI floppy. Don't use HD (96TPI) floppies.
Give that a try.
Good luck,
Roman

JonB
June 20th, 2015, 01:00 AM
Hi Roman

I succeeded in fixing my mainboard FDD interface. It turned out there was a blown zener diode in the PLL circuit (which was suggested by Bryce over at CPCWIKI Forums), and the WCLK signal to the controller was not being generated properly. I traced this back to a 74LS74 which is referred to as IC7486 on the schematic in the service manual. The left hand flip flop had failed and wasn't supplying the (divided down) 250khz WCLK (write clock) signal, which I found out is also required for reading. I replaced this and it booted into CP/M using one of the original disks.

I also managed to get all the images to physical media, and read/write individual files on my old PC. Here are the methods:

Using Sydex 22DSK144 to read/write P2000C disk images

Prerequisites: Use a 720k floppy drive, or connect one of the FD55 drives from the P2000C to the PC. you have to configure it in the BIOS as 720k 3.5 inch if there is no 5.25" alternative. You can also use a 1.2Mb 5.25" drive if you have one; again, might need to configure in the BIOS as 720k. Some experimentation is needed.
If you have the unregistered version of 22DSK144, you need to add the disk definitions in my earlier post to your definition file and regenerate the index file. See the documentation for instructions.
Run 22DSK144 (CMENU.COM)
Set CP/M drive to your floppy drive - A: or B:
Set CP/M drive type to Philips P2012
You should now be able to view the disk directory and read / write files from / to the disk


Using Dave Dunfield's IMGDISK to read / write images from / to P2000C disks

Prerequisites as per 22DSK144
Launch IMD.COM
In settings, set double step to "off" (for 600k P2012 disks) and 300Khz -> 250 Khz
You should now be able to Read / write disk images


I found that, even with HD disks, the P2012 is happy. I have a pair of 3.5" disks attached to it and it works perfectly. All I had to do is cover the floppy's HD detection hole with some tape, and it worked. And of course, the FD55s are happy as well (though for the time being I am using 3.5" floppies only because they're lighter and smaller, and I still have the machine in pieces). In this way I have created real floppies of all the available images, and all of them work, even the p-system disks.

Anyway, now I have the mainboard booting, and I am communicating with it using a PC via its internal V24 serial interface (normally connected to the terminal board) and a TTL-RS232 board / USB-RS232 adapter, because the terminal board is broken. This is unfortunate, because the configuration programs use the terminal board's escape sequences to draw the screens. It's hard to see what is going on if you don't have a terminal emulator that recognises these sequences. So now, I need to fix my terminal board. I have had a look at its ROM and I am not entirely sure it is valid.

Do you have the facilities to dump your terminal board ROM to a file?

Roman
June 25th, 2015, 02:21 AM
Hi, JonB !
I can and will try to do so. But i am currently travelling, so it will take two weeks or so.
Roman

1980s_john
July 1st, 2015, 12:36 AM
Jon,
Very well done in fixing your P2000C! Quite a feat to trace the fault in the FDC, good luck with the terminal.

Regards,
John

JonB
July 1st, 2015, 08:59 AM
Thanks John

The terminal board fix is a long saga that's not yet resolved. You can read about it here: http://stardot.org.uk/forums/viewtopic.php?f=45&t=9566

I nearly had it going, then something failed and I am back to a completely blank screen. So I have bought a logic tracer from woodchips (on this forum) which I'm going to use to try and diagnose the problem. On the way I have learned an awful lot about the hardware and ROM, and it is all documented in that thread.

If anyone reading that has any ideas, well, you know... I would be very happy to read them!

The main point is that I will get it working. I've been beaten by broken hardware before, but not this time.

Cheers
JonB

1024MAK
July 3rd, 2015, 05:34 PM
Yep, keep going Jon :D

Mark

Roman
July 8th, 2015, 03:17 AM
Hi JonB !

Here are the contents of the eeproms.
25215

Hope that helps.:D

Roman

JonB
September 15th, 2015, 10:00 AM
Oh lovely, thank you, Roman! I've been away from it for a while, a combination of work, overseas holiday, sickness, domestic stuff and tiredness, but I am hoping to return to it soon.

At which point that stardot thread is going to get a kicking, Mark...