Author Topic: PCW256 expansion port pinout  (Read 2018 times)

0 Members and 1 Guest are viewing this topic.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
PCW256 expansion port pinout
« on: 22:22, 26 December 16 »
Hi


Is this correct?


I/O ports of the PCW: http://www.chiark.greenend.org.uk/~jacobn/cpm/pcwports.html
Especially C8-CF which I want to use.


Expansion Port pinout: http://pcwpage.co.uk/expansion-port/


The reason I ask is, I have connected a simple IDE interface to the port and it is behaving like it is clashing with the Floppy drive. It's hardware mapped to ports C8-CF and I know the board itself is correct as it comes from another application. I have double checked the wiring and it looks good. Heh, maybe triple check it?


Cheers
JonB

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 644
  • Country: gb
  • PCW since '85
  • Liked: 143
  • Likes Given: 7
Re: PCW256 expansion port pinout
« Reply #1 on: 01:04, 27 December 16 »
I assume you mean the PCW8256?


There were HD drives available long ago, some suppliers made a business out of it.


You needed a version of CP/M that could cope with a HD being attached, I think the package included that.   I assume that a .FID, or similar, would also be required.   I'm not sure if the floppy could still be used when the HD was active.


If you look at the port info, you'll see mention of some other ports as 'reserved' relating to suppliers of add-on HD systems.   How those ports were used, I don't know, but maybe this included swapping between floppy and hard drives?


I think John Elliotts listing of CP/M versions refers to some as being specific to HD variants, and these versions may have been available ONLY with the HD package?


I'm not sure there is any relationship between the way that HDs were enabled on actual PCWs, and the way that 'Joyce' does it as Joyce has all the facilities of the PC to access anyway!


Geoff

Offline Habi

  • CPC464
  • **
  • Posts: 46
  • Country: es
  • Liked: 103
  • Likes Given: 21
Re: PCW256 expansion port pinout
« Reply #2 on: 13:08, 27 December 16 »
Is this correct?

I/O ports of the PCW: http://www.chiark.greenend.org.uk/~jacobn/cpm/pcwports.html

Especially C8-CF which I want to use.

Mostly, yes. :D

In the $C8-$CF you shouldn't have any problems; the FDC IC only activates when A7=0.

The hard drives had their own drivers for CP/M access, there is not native support on Locomotive BIOS; also some HDs (like the Cirtech Gem) had a small boot ROM to boot from them without floppìes.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: PCW256 expansion port pinout
« Reply #3 on: 13:13, 27 December 16 »
@GeoffB17 Yes, PCW8256.


I'm using C8-CF addresses for this, because that's what the IDE board is set for. It can be changed. This is supposedly "reserved" for the "Fax link interface", which is not connected to my system. I doubt it's a problem. I do think that I might remap the IDE board to A0-A7, which means I might be able to use the ASD.FID that came with the ASD hard drive package, but I am wary of the comment John made about there not being a set features command.


I don't need a hard disk driver as I wrote one myself for CP/M 2.2 and it's this that I want to put in a FID. Hence the questions (on the other thread).


What is bothering me is that the card is behaving like it is wired to the 8256 expansion bus incorrectly and that's why I asked if the pinout on the web page is correct.


My objective is to produce a cheap IDE adapter that allows you to use a hard drive on the PCW computers (and 6128). If it cost more than £30 I'd be surprised. It leverages another design and maps the connections for that to the PCW's expansion port. It could just as easily map to the 6128's port. Once the hardware is connected I will produce drivers for it and then we'll be cooking with gas....


@Habi: What do you mean by "mostly"? As long as  A0-A15 / D0-D7 / Reset / IOREQ / IORD / IOWR are correct..

Anyway, thanks, it's good to know. I thought it'd be OK, but as you can see from my reply to Geoff, I'm having trouble... from the evidence, it looks like my card is picking up the FDD write access, because the activity light is flickering when writing to the FDD. Time to check the connections, a third time!


Quick question - are any of the signals A0-A15 / D0-D7 / Reset / IOREQ / IORD / IOWR inverted? I'd expect the control signals to be, but not the address / data lines. And are they buffered?
« Last Edit: 13:16, 27 December 16 by JonB »

Offline Habi

  • CPC464
  • **
  • Posts: 46
  • Country: es
  • Liked: 103
  • Likes Given: 21
Re: PCW256 expansion port pinout
« Reply #4 on: 13:29, 27 December 16 »
@Habi: What do you mean by "mostly"? As long as  A0-A15 / D0-D7 / Reset / IOREQ / IORD / IOWR are correct..

...

Quick question - are any of the signals A0-A15 / D0-D7 / Reset / IOREQ / IORD / IOWR inverted? I'd expect the control signals to be, but not the address / data lines. And are they buffered?

I mean the port list is not exactly complete.

The signals are not buffered, they are connected directly to Z80. Therefore, /RD, /WR, /IORQ and /RESET are inverted. There is no IORD or IOWR, just /RD and /WR, both for I/O and Memory.

$A0-$A7 I/O space is crowded; it will conflict with: Electric Studio Joystick, Electric Studio Mouse, AMX Mouse, Electric Studio Lightpen, ...

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: PCW256 expansion port pinout
« Reply #5 on: 18:08, 27 December 16 »
Doesn't matter, I have none of that stuff connected to my PCW, as I suspect neither will anyone else. They are unobtanium.


Anyway, it's not working at all. I have FFh on ports C8h-CBh and 40h on ports CCh-CFh. I tried with a different machine (got 2 PCWs here) and now all ports are reading as FFh.


I am using Mallard BASIC-80 INP and OUT instructions to write to / read from the ports. The interface works by polling, you check the busy flag of the Status register (on port CFh) then (when the flag is clear) write an IDE command to the same register. Busy goes high, you wait until it's low again, then check the status & error registers for results. Pretty simple, but not working.


Any suggestions on how to proceed?

Offline Habi

  • CPC464
  • **
  • Posts: 46
  • Country: es
  • Liked: 103
  • Likes Given: 21
Re: PCW256 expansion port pinout
« Reply #6 on: 20:00, 27 December 16 »
Doesn't matter, I have none of that stuff connected to my PCW, as I suspect neither will anyone else. They are unobtanium.

Well, not really. From my point of view, they are very attainable: I started coding my emulator of PCW without having a PCW; when the PCWWiki was founded, I only had a 8256, a 9512 and a Fairlight copy without case. Right now, three years later, I have at least one of each of the mentioned peripherals, and at least one of each PCW model (including Joyce variants and PcW16).

But you can do as you wish, it's your interface. :)

Any suggestions on how to proceed?

I guess I can't help; if the decoding is correct it should work. I made some experiments myself with a CF time ago and it was straightforward.
« Last Edit: 20:15, 27 December 16 by Habi »

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: PCW256 expansion port pinout
« Reply #7 on: 18:10, 28 December 16 »
Well here's a funny thing.

The interface is connected to the bus and decodes C8-CF. The output from the address decode logic is gated with /IOREQ and /RD to generate a READ signal, and IOREQ and /WR to generate a WRITE signal.

I wrote a short BASIC program that does the following in a loop:

•   Beep
•   Out C8h,AAh
•   Wait for 500ms
•   Beep
•   Out C8h,55h
•   Wait for 500 ms
•   Beep
•   In C8
•   Wait for 500ms
•   Loop back to start

So, it beeps every I/O statement, twice for the OUTs and once for the IN.

Next, I connected a logic probe to the 0v / 5v lines.

I put my probe on the gated READ signal pin. It flashes once per three beeps. This indicates to me that the Address selection, /IOREQ and /RD interpretation is correct.

Then I put the probe on the gated WRITE signal. It flashes constantly, not in time with the beeps, at a much higher rate. This is wrong, it should flash with two beeps, then not with the third beep.

I suspected the gate that combines the Address Decode, /WR and /IOREQ signals so I replaced the chip. No difference.

It is almost like the computer is writing constantly to a port in the C8-CF range. But the I/O port page http://www.systemed.net/pcw/hardware.html says it's not in use (reserved for a peripheral called "I/O Fax Link Interface"). Is this an Amstrad device [edit: no, it isn't!], and is it it possible my CP/M is polling for it? It must be happening via an interrupt as I am running Mallard BASIC.


[edit2: I tried again with the printer connected. No dice.]

Any ideas?
« Last Edit: 19:08, 28 December 16 by JonB »

Offline 1024MAK

  • Supporter
  • 464 Plus
  • *
  • Posts: 343
  • Country: gb
  • Touching the hot end of an iron will hurt!
  • Liked: 146
  • Likes Given: 197
Re: PCW256 expansion port pinout
« Reply #8 on: 03:11, 29 December 16 »
Jon, we do need more to go on, otherwise we can't help...

Can you write a short machine code routine and run this? Your routine can turn off interrupts. Then that takes CP/M (and all other software) out of the suspect list...

Are you sure that the logic function of the circuitry does what you think it does? Just because it works on a different Z80 system, does not mean that the external bus signals are the same.

That's about all the help that anyone can give without having more detailed information...

Mark
Looking forward to summer in Somerset :-)

Offline Audronic

  • 6128 Plus
  • ******
  • Posts: 1.324
  • Country: au
  • I know RST3 . I now know a little More.
  • Liked: 294
  • Likes Given: 660
Re: PCW256 expansion port pinout
« Reply #9 on: 07:26, 29 December 16 »
@JonB


Can you do the test without booting up CPM (I Know you cannot run the Program) just test the Line ?
Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: PCW256 expansion port pinout
« Reply #10 on: 13:50, 29 December 16 »
Jon, we do need more to go on, otherwise we can't help...

Can you write a short machine code routine and run this? Your routine can turn off interrupts. Then that takes CP/M (and all other software) out of the suspect list...

Are you sure that the logic function of the circuitry does what you think it does? Just because it works on a different Z80 system, does not mean that the external bus signals are the same.

That's about all the help that anyone can give without having more detailed information...

Mark


Thanks Mark, that's is pretty well exactly what I was looking for, although I thought about DI before (haven't done it yet though, because I'm in 'scope mode!


This really is a very simple design. And I have proven that the address decoding logic works, because the READ signal is behaving as expected. It is just the WRITE that is playing up.


I tried DI (running in SID) but it doesn't make the racket shut up. There must be a crossed line somewhere, its the only thing I can think of.

Offline 1024MAK

  • Supporter
  • 464 Plus
  • *
  • Posts: 343
  • Country: gb
  • Touching the hot end of an iron will hurt!
  • Liked: 146
  • Likes Given: 197
Re: PCW256 expansion port pinout
« Reply #11 on: 11:06, 30 December 16 »
Here is how an 8 bit IDE is done on a ZX Spectrum...



Mark
Looking forward to summer in Somerset :-)

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: PCW256 expansion port pinout
« Reply #12 on: 14:52, 01 January 17 »
And this is how it is done on a PCW!



https://www.youtube.com/watch?v=Y1iQ3TAj-YM



https://www.youtube.com/watch?v=QWAe0i1GE48


Yes, I got it going in the end. Thank you for your advice, everyone! It didn't work because I'd wired the PCW end back to front.. d'oh!  :doh:

Offline Audronic

  • 6128 Plus
  • ******
  • Posts: 1.324
  • Country: au
  • I know RST3 . I now know a little More.
  • Liked: 294
  • Likes Given: 660
Re: PCW256 expansion port pinout
« Reply #13 on: 01:59, 02 January 17 »
Yes, I got it going in the end. Thank you for your advice, everyone! It didn't work because I'd wired the PCW end back to front.. d'oh!  :doh:



Youch !!!.


Well done.
I will have to drag my one out of Storage.
Thanks for all your effort.
Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: PCW256 expansion port pinout
« Reply #14 on: 11:52, 02 January 17 »
Thanks, Ray!


Now I need to setup a development environment so i can write the drivers. I need to be able to transfer stuff to and from a PC over serial, but I have no serial adapter. I may end up building one.. :(


Meanwhile, my 9512, which has a 3.5" floppy drive, is dead, so I could try and fix that.


Decisions, decisions...

Offline Audronic

  • 6128 Plus
  • ******
  • Posts: 1.324
  • Country: au
  • I know RST3 . I now know a little More.
  • Liked: 294
  • Likes Given: 660
Re: PCW256 expansion port pinout
« Reply #15 on: 12:30, 02 January 17 »
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

Offline JonB

  • 6128 Plus
  • ******
  • Posts: 757
  • Country: gb
  • Liked: 206
  • Likes Given: 48
Re: PCW256 expansion port pinout
« Reply #16 on: 15:00, 02 January 17 »
UK.


I'd be interested in the Amstrad RS232 box.. shipping to the UK?