News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

DOS for CPC6128

Started by RobertM, 00:50, 04 March 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rpalmer

hello everyone,

For those that downloaded the ROMs for HDOS + Drivers.

I have checked the code for SF-II and found it would crash. The attached zip contains a version which does not crash anymore, however I still have trouble getting to work as expected.

It seems I cannot even read the "Identify Packet" data at the initialisation (all i get is 255 for all bytes). I send the command and see no error, but data read in is invalid. I cannot see why this is so. I will continue to work out why, how and if where the problem is.

rpalmer

RobertM

Hi all,

I have assumed that I only need Address, Data, IORQ, RD and WR to decode the IDE port ???? I know the Z80 does some strange things like refresh but I am hoping that is enough ???


Next problem lol - the design is 1/2 an inch wider than the blank PCB I have here. So I will have to get larger PCB of change the design.

There are two 50 way connectors so that a Rom board can plug in so maybe I should just cut one out.

A pic - I should have spun the CPLD around 180 cos that programming port is hogging space -


Munchausen

Quote from: RobertM on 10:08, 10 March 16
Hi all,

I have assumed that I only need Address, Data, IORQ, RD and WR to decode the IDE port ??? ? I know the Z80 does some strange things like refresh but I am hoping that is enough ???


Next problem lol - the design is 1/2 an inch wider than the blank PCB I have here. So I will have to get larger PCB of change the design.

There are two 50 way connectors so that a Rom board can plug in so maybe I should just cut one out.

A pic - I should have spun the CPLD around 180 cos that programming port is hogging space -

If you solder an IDC connector on to your expansion port, you can just use 50-way SCSI cables to connect multiple boards up:

Connector:


Cable:


RobertM

Yes, that is exactly what I did even though it's a bit sad to loose the original edge connectors but they were badly corroded on the top surface and edge connector were only ever reliable in dust free environments anyway.

I did consider tin plating them but that could only be done by immersion. I also considered silver plating them as that can be done with a cotton swab and solution ... but sadly I ended up using DIP pin headers.

Munchausen

Quote from: RobertM on 11:35, 10 March 16
Yes, that is exactly what I did even though it's a bit sad to loose the original edge connectors but they were badly corroded on the top surface and edge connector were only ever reliable in dust free environments anyway.

I did consider tin plating them but that could only be done by immersion. I also considered silver plating them as that can be done with a cotton swab and solution ... but sadly I ended up using DIP pin headers.

At least this way you don't need a pass through connector on your PCB :)

What's odd is that I've never had a problem with an edge connector other than on a CPC, and they are everywhere (console cartridges, ISA/PCI cards etc). Probably on the CPC they aren't using the right metal for the contacts.

RobertM

Quote from: Munchausen on 11:44, 10 March 16
Probably on the CPC they aren't using the right metal for the contacts.

Spot on. The CPC used Tin and Lead to plate the connector. The others used Gold but that was expensive back in the day.

Gold isn't *the best* conductor and neither is copper. Silver is the best conductor but silver is hard. Gold works well because it is soft by comparison.

Bryce

Quote from: Munchausen on 11:44, 10 March 16
At least this way you don't need a pass through connector on your PCB :)

What's odd is that I've never had a problem with an edge connector other than on a CPC, and they are everywhere (console cartridges, ISA/PCI cards etc). Probably on the CPC they aren't using the right metal for the contacts.

You've obviously never owned a Spectrum with it's famous "reset if you touch the expansion" problem.

Console cartridges have the advantage of the cartridge case to make sure they can't move.

Edge connectors on PCs are a completely different matter. The cards are held firmly in place with a screw at the top of the card. They are also inside the machine, so they can't be knocked against and the signals go through a buffer, whereas 8-bit edge connectors were commonly directly connected to the CPU.

Bryce.

pelrun

Quote from: RobertM on 11:53, 10 March 16
Gold isn't *the best* conductor and neither is copper. Silver is the best conductor but silver is hard. Gold works well because it is soft by comparison.


It's not about conductivity, it's about reactivity. Most metals oxidise or tarnish when exposed to air/moisture, and that oxide layer is usually a really poor conductor compared to the original metal. Gold is extremely non-reactive, so no insulating layer forms on it and the end result is a connection that is *much* better than one with oxides in the middle.

Bryce

CuTe (Copper Tellurium): Not just a cute name, but one of the best surfaces you can get for low-loss connectivity, by making the copper rigid enough to machine into complex shapes and reduces the oxidation :) Pity it's rare as hens teeth and poisonous too  >:(

Bryce.

Munchausen

#34
Quote from: Bryce on 12:42, 10 March 16
You've obviously never owned a Spectrum with it's famous "reset if you touch the expansion" problem.

Console cartridges have the advantage of the cartridge case to make sure they can't move.

Edge connectors on PCs are a completely different matter. The cards are held firmly in place with a screw at the top of the card. They are also inside the machine, so they can't be knocked against and the signals go through a buffer, whereas 8-bit edge connectors were commonly directly connected to the CPU.

Bryce.

Ah I have most of the spectrum models (I'm missing just one), but I just never used them much except the original 48k. I remember the joystick adapter being a real pain.

In terms of edge connectors and not moving, in general it is an advantage, but I've run many machines on a desk with no case with the backplates removed from the ISA cards and have had no problems. There is an inherent problem on the CPC because an edge connector can be very firmly in place and not moved about and it still wont work due to tarnished contacts.

Bryce

Yes, it's also reversed compared to PCs. The edge is on the cards, not the PC. With 8-bit computers it's the other way around (for cost reasons).

Bryce.

RobertM

Quote from: pelrun on 13:35, 10 March 16

It's not about conductivity, it's about reactivity. Most metals oxidise or tarnish when exposed to air/moisture, and that oxide layer is usually a really poor conductor compared to the original metal. Gold is extremely non-reactive, so no insulating layer forms on it and the end result is a connection that is *much* better than one with oxides in the middle.

That's definitely an issue with connectors generally. Silver oxide is reasonably conductive so for some connectors silver is preferred. Most high end RF connectors are silver - like BNC. A BNC connector ensures there is some wiping action when connecting and this helps displace the oxide to some degree.

On the other hand, I think the issue with edge connectors is more complex than just the connection materials. Other connector properties come into ply.

Edge connectors work perfectly in dust free environments even the old ones as that is where they came from before they ended up in the domestic environment. Vibration is also an issue in a dusty environment.

The old style edge socket had two contacts that were curved and flat in shape, flexed from the cable end and the two curved contacts were connected at the other end as well. This placed a curved shape gap on either side of the contact point so that any vibration would tend to draw dust closer to the center of the contact point and eventually break contact.

New edge connectors have round rather than flat contact surfaces and they are sprung from the opposite end and not connected at the floating end. They also have a different curved shape that is biased greatly to one side ... the inner side where there shouldn't be any dust.

So in a dust environment your only save is to remove dust by the wiping action of removing and re-inserting or blowing the dust out. This is where softer material do better because that have a greater contact surface area and are more malleable so they can absorb the very smallest dust particles.


RobertM

Quote from: Munchausen on 11:29, 10 March 16
If you solder an IDC connector on to your expansion port, you can just use 50-way SCSI cables to connect multiple boards up:

I missed the point of what you meant here. I have already put a pin headers on the expansion port. I was going to use miltiple connectors on a PCB nut I now see you point of having putiple connectors on the cable itself.

I will chop of the extra part of the PCB.

I just have to check that I have enough to decode the IDE port addresses, I have address, data, IORQ, RD and WR. I don't need data so I can add 8 extra inputs to the CPLD. The RESET is interesting. I assume that it's an input or is only active at power on ???


RobertM

Well another delay :(

My etch dish is too small lol. I will buy another one tomorrow.

Till then by board will be oxidizing lol.

It's not real good because I don't get good toner coverage but I will get it going.


RobertM

Quote from: PulkoMandy on 08:42, 06 March 16
Hi,
The ROMs are 16K and the CPC expects the ROM board to recognize a "ROM number" sent to a specific IO port address and store it.


An example board doing this is the RAMCard from Ram7, which I reverse-engineered and provided some explanations on here: Shinra Team

A simpler implementation using Flash-ROM instead of battery-backed RAM is available as:
- The MegaFlash or FlashGordon boards: MegaFlash - CPCWiki / FlashGordon - CPCWiki (very similar designs, but different flash chips used)
- The X-Mem board: X-MEM MX4 Board - Cent Pour Cent which adds to the above a 512K RAM expansion and a few extra things (it can also replace the firmware ROM which is a special case).

For the Ramcard, MegaFlash and FlashGordon, the PCB designs and schematics are available if you really want to build it yourself. Only the ramcard is single-side PCB, however.
For the X-Mem, you can just buy it from the store.

Hi, PulkoMandy

I looks like you have already done all this. When I go looking for whats out there on the net I see your screen name in lots of places.

One of which is HackaDay - I am a member there to (Hacker404). Congrats for all the featured articles. I also saw your website and various other accounts you have.

I looks like you made one of these already. It also looks like your version is ATA (16 bit) rather than XTA (true 8 bit). I can't see any level translators in your designs so I am guessing they are not needed for the MODE you are using?

I am aiming for XTA 8 bit mode (true 8 bit IDE) and the spec says that I need Vih to the CF of over 4 Volts so I have used 74HCxxx level translators. I thought they may not be necessary but I wanted a prototype that "works" first time if possible.

Also, I haven't given up on the SD card. I have ordered a Wi-Fi SD card (eye-fi) and I will play with that when it arrives.

PulkoMandy

Yes, I prototyped something with a Compact Flash in 8bit mode. I did not need any level translators with the card I tested with. However, I had a problem that the card would randomly reset and go back to 16-bit mode. I didn't have time to investigate this further, it could be caused by slight timing differences between the z80 and the CF interface bus (I think I saw notes about this on the retroleum website, with what they did for an early version of the v6z80p).


Also my implementation was hand-wired on protoboard which could cause all kind of interferences, bad contacts, etc, which could be the main problem in the project. I had patched BonnyDOS (with a lot of help from SyX) to use my device instead of the Symbiface (different IO port addresses). It is a relatively simple change but the author of BonnyDOS does not want me to distribute the modified files, sorry.


I have now moved to a solution using the CH376 USB/SD card controller, which opens some more possibilities and ends up being cheaper as CF cards are already becoming obsolete at this point (while MicroSD and USB are lasting a bit longer).

RobertM

OK, its (under) etched so now I can see if I can solder 0.8mm pitch QFP on a home made board.


gerald

Quote from: RobertM on 05:33, 12 March 16
OK, its (under) etched so now I can see if I can solder 0.8mm pitch QFP on a home made board.
With flux, there should be no problem.
Also, it looks like there are two shorted pins just in the middle of the top row of the QFP.

RobertM

Quote from: gerald on 09:04, 12 March 16
With flux, there should be no problem.
Also, it looks like there are two shorted pins just in the middle of the top row of the QFP.

Thanks for pointing that out. It's exactly the sort of thing that stuffs me up now that my sight isn't so good.

I scraped it out with a box opener (don't know what they're called in EU). I tested after soldering and all seem good so far.

I hope to finish tomorrow. It's the end of the day here - beer time.

RobertM

PS: It ended up under etched because I could see patches or red when I was etching so I panicked thinking they were defects in the resist.

I forgot that I had used red toner.  :doh:

RobertM

Getting there slowly.

Now I have to install the Xilinx ISE, write a constraints file, write some VHDL, program the CPLD and then test.

The socket is an IDE socket so in theory I could also use a Hard Drive.

[attach=2]


[attach=3]

rpalmer

Nice to see a new piece of hardware.

HDOS drivers now can read sectors from the WinAPE SF-II emulation via a driver. So in theory it can handle the XMAS as well (so i understand).

I still have more work to do as I still cannot read the "Device Geometry", but i can read the first sector (aka "Boot Sector") meaning I can get some sort of geometry to work with.
HDOS can perform device initialization which will clear the first sector, meaning after a reset I can no longer know how big the 'IDE device" is which is a big issue to overcome. So i will need to change the behavior of HDOS to handle this type of arrangement, more to come...... ;D

rpalmer

RobertM

Well, I wasted a day installing the Xilinx ISE and getting it to work so right now I hate Xilinx. This morning I spent hours trying to work out why Windows 7 has no option to search - didn't find the answer. Then I spent 2 hours trying to find the schematic blow even though I (repeatedly) saved it to the desktop and it shows in desktop with explorer but can't be seen on the desktop!!! So I hate windows 7 to lol.

Anyway, I have programmed some basic logic into the CPLD. It's more complex than it needs to be because I have focused on keeping the read and write windows as wide as they are on the Z80 --- less likelihood of problems while I am still prototyping.

I get different values back from reading the IDE ports from BASIC so it's seeing *something*. Now I will test it and start writing code.


RobertM

Well I had a play with and I can read all the ports and everything is as expected *so far*.

Surprisingly everything works so far - both the hardware and the VHDL programming in the CPLD. Well with one exception ... the JTAG programmer couldn't see the CPLDs core voltage reference. After extensive diagnostic processes I discovered that the CPC power wasn't plugged in  :doh:

One take home for me is that the CF card will initialize into IDE mode when it is powered up while in the socket but if you remove it from the socket and re-plug it there is no way to get it back into IDE mode so the next version of hardware will have a way to power down the CF card.

More tomorrow (hopefully).

RobertM

#49
Well so much for hopefully lol

I am having a couple of issues now and they are -

1) The specification I m reading for CF cards is as clear as mud when it comes to 8-bit IDE mode. It's mostly focused more modern modes and I expect that I am not interpreting it properly. I don't know of I can read a $sector directly or if I need to read the $sector into the buffer and then read it from there. OR even if the buffer exists in 8 bit mode.

2) I am getting different results at times and sometimes I am getting corruption of the CPC RAM. I suspect that the problem is the PSU, perhaps the addition of the CF Card and interface has pushed it over it's limit. The PSU is getting quite warm.

3) I don't know if I actually have a hardware issue (or perhaps PSU). I even wonder if there may be a problem with the CF card itself.

I am still using BASIC you read write ports. I haven't used a *check if busy* for the card because it shouldn't need it with slow slow BASIC.

I will persevere tomorrow.

Powered by SMFPacks Menu Editor Mod