Smartport disk emulators and daisy-chaining

12 posts / 0 new
Last post
Online
Last seen: 59 min 3 sec ago
Joined: Dec 19 2003 - 14:45
Posts: 9
Smartport disk emulators and daisy-chaining

Hi,

In the last weeks I wanted to add a smartport "hard disk" to my Apple IIc setup, and chose a SPIISD for that. First I had a problem with it: it is not seen when booting from the internal floppy drive. Basically it's because it boots too slow and missed the smartport RESET/ENABLE sequence that is used for device ID assignment.

I fixed that in software. 

Next in my wishlist was to be able to daisy-chain my external Disk IIc to it. As it has no daisy-chain connector, I wondered whether I could use a BMOW daisy chainer to that effect. Short answer is no, it does not work. Steve Chamberlain provided me with some support, but it was not enough.

In the process, I somehow fried the WRPROT-related part of my IIc's IWM chip, so now I have a full read-only Apple IIc, and I'll have to wait to see a friend who is, contrary to me, good with electronics to desolder the chip and replace it. I am really annoyed with myself.

Anyway, even if I suck at electronics, I have not yet completely written off my desire to make a daisy-chainable Smartport device. In my dreams (which are dreams because I can't design a PCB to save my life), it would have a male DB19 on one side of the PCB, then a small PCB with the Nano on one side and SD module on the other, then a female DB19, so it'd be inline between the IIc and the Disk IIc cable. Female DB19 are kind of unobtainium but there are some of them on ebay, so it would be an option to solder it or not.

 

Here are my notes so far:

My sources are the IIGS Firmware reference, pages 157-158 (179-180 in the PDF at http://www.applelogic.org/files/GSFIRMWAREREF1.pdf), and everything daisy-chain-related from BWOM's blog.

From what I understand:

Lines on the "input" (to computer) port should be read by the SP device (INPUT in Arduino language).

Lines on the daisy-chain "output" port should be controlled by the SP device (OUTPUT in Arduino language).

I suppose the "output" PH0-3 lines should mirror the "input" PH0-3 lines in general.

== Smartport devices init

When we get a bus reset (PH2+PH0 high) on the input port, we should turn the daisy-chain PH3 low so downstream can't receive the following Enable (PH1+PH3 high) commands.

We then get ID definition commands, assign our unit number(s), reply with 0x80 to indicate we accept them. If there is no other intelligent device on the daisy-chain output port (which we can know if "a signal unused by DiskII is grounded by intelligent devices, the signal being HDSEL apparently), we respond with 0xFF instead of 0x80 to the next (and last) ID definition command.

Once our ID definitions are done, we go back to mirroring PH0-3. If there are downstream intelligent devices, the computer keeps sending ID definition commands, to which we don't reply, and let the downstream device reply.

== Downstream Disk II

To handle a Disk II on the daisy-chain port, I seem to understand that we have to control the daisy chain /ENABLE2: either mirror the input /ENABLE2 if PH1 or PH3 is low, or deassert it (high, so output 5V?) when PH1==PH3==1. /ENABLE2 is apparently the DB19 pin 9 "DRIVE2".

== Questions

1) my device must ground HDSEL (DB19's pin 16, IDC20's pin 12) in order to advertise an upstream SP device that we are an SP device. I did try that with no adverse effect on the IIgs, and I do wonder if it is what fried my IWM chip. I could live without that and with a device only capable of having a dumb 5.25 drive after it in the daisy chain.

2) downstream PH3 should be controlled by my device, either forced low during setup, or according to input PH3 the rest of the time

3) downstream DRIVE2 should be controlled by my device, either mirroring the input DRIVE2 (when PH1==PH3==1) or forced high (when PH1==0 || PH3==0)

4) Apart from PH3 (DB19 pin 14) and DRIVE2 (DB19 pin 9), how should I connect the daisy-chain, downstream lines? Simply in parallel with the input (upstream) lines?

5) Should I stay in my lane, go back to software and assembly, and wait for someone better than me to make such a device?

(edit: holy wow, I joined here in 2003 and it's my first post, hahaha)

Offline
Last seen: 5 hours 30 min ago
Joined: Feb 27 2021 - 18:59
Posts: 799
There is already a schematic

There is already a schematic for a daisy-chain adapter, and it was made by Apple in 1985: the daisy-chain board inside the external Apple 3.5 Drive, with its DSIC chip. Remember that the 19-pin port on the IIgs can drive two Apple 3.5 drives, plus two Apple 5.25 drives; or a SmartPort device like the Unidisk 3.5.

The only pins wired "in parallel" on the daisy-chain board are RDDATA, WRDATA, /WRREQ, and WRPROT, plus the power and ground pins. These go straight through to the female connector on the back of the external drive where downstream devices can be connected. When passing data thru from/to downstream devices, these pins must be high-impedance on the drive. The DSIC ensures this using hardware, which was prototyped using TTL logic chips, then designed onto a Sony CMOS gate array for production.

 

https://www.applefritter.com/files/2025/12/04/Apple_3.5_Drive_Schematic.pdf

Online
Last seen: 59 min 3 sec ago
Joined: Dec 19 2003 - 14:45
Posts: 9
I did think about this, and

I did think about this, and tested, but it didn't work, and I suppose it's because the DSIC chip expects a floppy and not a Smartport device on the Internal drive port. On the IIc, nothing (SPIISD or external drive) worked; on the IIgs, SPIISD worked and external drive had motor on 100% of the time. 

Offline
Last seen: 18 hours 44 min ago
Joined: Apr 1 2020 - 16:46
Posts: 1270
You discovered yet another way to fry an 'IWM' !

In post #1, 'colinleroy' wrote:

 

" In the process, I somehow fried the WRPROT-related part of my IIc's IWM chip, so now I have a full read-only Apple IIc, and I'll have to wait to see a friend who is, contrary to me, good with electronics to desolder the chip and replace it. "

 

Uncle Bernie comments:

 

Ouch, but your mishap (and 'fessing up to it) gives us more insight how 'IWM's can be damaged / killed. So other than bad DRAMs leading to the dreaded "check disk drive" message leading to tinkering with the floppy disk drive, we now have seen that the IWM can also be killed by trying to plug daisy chainers into the backside floppy disk port of an Apple II.

 

I would recommend you to use an ultra low profile IC socket for the replacement of the IWM. Just in case your "mishap" happens again. It has been my experience that the aged Apple IIc PCBs do not like repeated desoldering and soldering of IWMs (or DRAMs) much (telltale bubbling when resoldering tells me it's already decomposing and has compromized through holes).

 

I happen to have three 'IWMless' beta test units with ultra low profile sockets available. These will be the last ones with regular pins and a socketing capability, as they are very tedious and expensive to make.

 

- Uncle Bernie

Offline
Last seen: 3 days 17 hours ago
Joined: Apr 27 2025 - 09:53
Posts: 64
I would repeat myself -- such

I would repeat myself -- such experimenting should be done (first) with a built with non-ASICs Apple ][+ motherboard or clone and a DISK II controller or clone. 

Online
Last seen: 59 min 3 sec ago
Joined: Dec 19 2003 - 14:45
Posts: 9
Hi UncleBernie,I had seen the

Hi UncleBernie,

I had seen the IWMLess thread but thought you had distributed all the beta units. Would you be OK with selling me one ? 

Offline
Last seen: 18 hours 44 min ago
Joined: Apr 1 2020 - 16:46
Posts: 1270
'IWMless" availability for your project

In post #6, 'colinleroy'wrote:

 

"I had seen the IWMLess thread but thought you had distributed all the beta units."

 

Uncle Bernie answers:

 

Oh, I can make as may beta test units as I want. The problem is the ongoing trade war between the U.S. and the rest of the world. But as long as you are located in the USA I still can send you an 'IWMless' and I even would make you (if you want) a special version that is not as easily "fried" by tinkering on the Apple IIc external floppy disk drive connector - no warranty to be indestructible, though, so if you fry it, no warranty and no refund. All I can do is to put in some series resistors on the SENSE and RDDATA lines. If despite of that you fry it, you lose your money, sorry, but this is life, and life is tough - I only offer these "extras" to you because I think your daisy chaining work may be valuable to the Apple II user community. You still need to pay the full costs (of mine) for the beta test unit. I ain't no U.S. Government welfare office handing out freebies to parasites. But I am volunteering to put these two extra resistors in (worth 2 cents plus my work) free of charge just because I think your daisy chaining work is worthy to get support.

 

Send me a PM for more details (sorry, if you are not in the USA I can't help you, not my fault or policy, but when extra customs paperwork is involved, sorry, I can't spend my time on any such nonsense).

 

- Uncle Bernie

Online
Last seen: 59 min 3 sec ago
Joined: Dec 19 2003 - 14:45
Posts: 9
Hi UncleBernie,Wow, that was

Hi UncleBernie,

Wow, that was a really nice proposal and I would have loved to say yes! Sadly, I'm in France, so that's not gonna be an option. I'll find a for-parts Mac SE and loot it.

Offline
Last seen: 18 hours 44 min ago
Joined: Apr 1 2020 - 16:46
Posts: 1270
On the problem of sending hobby projects to the EU

In post #8, 'colinleroy' wrote:

 

" Sadly, I'm in France, so that's not gonna be an option. "

 

Uncle Bernie comments:

 

Oh, this is bad luck. I wish I could have helped you with your project. But please understand that my refusal to send electronic stuff to the EU is not due to lazyness ("filling out the customs form" ;-) but due to massive problems I had with EU customs in the past. I wrote about this topic here on Applefritter a while ago. But in a nutshell, it seems to me that since Y2024 or so,  EU customs started to crack down hard on import attempts of vintage electronic components ("not RoHS conforming") and now it also seems they want a special EU id number for each and every component and certification it was not made by "Child Slave Labor", as if children ever had worked in the semiconductor industry, never happend, they could not do this kind of highly specialized work anyways.

 

So in the end, it is impossible to send any electronic components to the EU, unless you are a big distributor like Mouser and Digikey, who automatically print out lots and lots of paperwork including the bar codes for all the EU ID numbers and whatnot. Does the EU customs process ever scan in all these barcodes ? I don't know but it sure would be a way to create many unproductive government jobs for useless people who are unfit to do any productive work.

 

The bottom line is that due to these "paperwork" hurdles demanded by EU customs it became all but impossible to send electronic components or electronics based hobby projects to the EU. This is why so many US based small businesses who do have a good stock of vintage ICs etc. refuse to send these to recipients outside the USA. The EU may be the worst offender but other countries are not far behind and have their own hurdles against imports. It's a trade war, after all.

 

- Uncle Bernie

Online
Last seen: 59 min 3 sec ago
Joined: Dec 19 2003 - 14:45
Posts: 9
UncleBernie, you said: "All I

UncleBernie, you said: "All I can do is to put in some series resistors on the SENSE and RDDATA lines"

How would you calculate the required resistor values for the chip to still see high/low? I'll soon be able to replace my chip, so while I'm at that, I could maybe rig myself a "safer IWM".

Thanks!

Offline
Last seen: 18 hours 44 min ago
Joined: Apr 1 2020 - 16:46
Posts: 1270
How to protect IC input pins:

In post #10, 'colinleroy' wrote:

 

" How would you calculate the required resistor values for the chip to still see high/low ? "

 

Uncle Bernie comments:

 

Alas, there is nothing here to "calculate" ... the IWM is a NMOS chip and hence has inputs with (almost) no current draw, except for pullup "resistors" which may be on these pins or not ... at the moment I have no time to look it up in the IWM specifications that can be found on the web. The problem here is that even when looked up, the value they give you is typical. And these old processes had huge tolerances.

 

So this is what I would do: with the IWM plugged in, rig a 10 kOhm resistor to GND (O V) from each pin. Unplug the internal disk drive cable. Turn the Apple IIc on. Measure the voltage on the SENSE or RDDATA pins to GND. If it is lower than 1V, you should be good. Otherwise calculate which current the pin's pullup circuit  sources and calculate the new  resistor to have less than 1V on the pin. Verify the result with this resistor to GND and then use it as a series resistor to protect this pin.

 

You can improve the protection of you solder any small signal diode (such as the 1N4148)  to the pin (anode to the pin, cathode to VCC/+5V) and this will clamp the voltage on the pin to safe levels while the series resistor limits the current (Note that is is NOT sufficient for CMOS ICs, which would need Schottky diodes such as 1N5711 or BAT42/43 etc. and two of them, the added one with cathode to the pin and anode to GND, which clamps negative voltages on the pin to safe levels, and note that no, you can't use PN junction diodes to protect CMOS this way).

 

Lab work typically involves the hazard of mishaps and it's very easy to blow up ICs, especially CMOS ones which can and will "latch up" if a pins gets a voltage more than ~0.6V above VCC or below GND. Almost all Schottky diodes have forward voltages of less than that and so they will prevent parasitic BJTs within the CMOS ICs to turn on, which may lead to self destruction of the IC even if you limit the pin current.

 

NMOS ICs are much more robust than CMOS but still can be damaged if you force enough current into or out of a pin. Some CMOS ICs are worse than others ... some examples are known as "latchup machines": the slightest issue with power supply turn on / turn off sequencing may blow them up. If your CMOS ICs tend to get hot and die, this was "latch up". The industry has made great progress in making modern CMOS ICs more robust against latch up but as long as bulk CMOS processes are used, the danger will never go away. SOI CMOS processes do not have any latchup issue, this is why military and space applications prefer SOI ICs ... they are more rad hard, too.  But if I want to be snarky, I could make a joke that our modern electronics may be too modern to fly to the moon again. The 1960s technology was just right to do it. Not too primitive to do the job (you could not fly to the moon with a vacuum tube based computer), but primitive enough to still be robust against the cosmic background radiation and sun flares. This is no joke ... the recent sun flares have upset the onboard electronics of an Airbus airliner and the are now scrambling to upgrade the software, and if necessary, the hardware, too. Make no mistake ... Boeing avionics ain't no better, they just were not hit by the effects of a CME yet, or they did not make headlines. And with the weakening of Earth's magnettic field it will only get worse. Until we may need to shut down air travel ...

 

- Uncle Bernie

Online
Last seen: 59 min 3 sec ago
Joined: Dec 19 2003 - 14:45
Posts: 9
BurgerDisk is now a thing

Hi,

So, I made progress on that device. Re-reading my initial questions, I had understood the basis correctly. A firmware is ready, a prototype PCB too. I gave it a real name, BurgerDisk.

The last revision of the PCB is still untested, the first one had small issues but I have been able to assemble a test device based on it and make a daisy chain (IIc => Unidisk 3.5 => BurgerDisk => Disk //c).

Next step is to assemble a (hopefully) final PCB, and create an enclosure.

Here are a few pictures.

The PCB front:

The back, complete with my mishaps. Issues were: 1) linked the microSD module +5V to the IDC20 +5V instead of the Arduino's. This prevents programming the Arduino on the board. 2) Ripped the PH1 line while diagnosing the previous problem, had to bodge it from the IDC20 to the Nano and from the Nano to the DB19. 3) Two useless diodes, short-cuircuited them. 4) the DB19 border connector had incorrect pin spacing, I had to use the surface/angled connector which also has incorrect pin spacing but it was fixable with a bit of patience and bending.

A screenshot of my file manager. ProDOS sees all devices in the chain!

Preliminary CAD work on the enclosure.

 

The project lives at https://github.com/colinleroy/BurgerDisk. I licensed the firmware as GPLv3. It started as a fork of the SP2SD firmware so includes the basis of the SmartportSD firmware (mainly the packet encode/decode/read/send functions). I rewrote a lot of it as the code's quality was not up to my standards. The PCB is licensed as CC BY-SA.

Those licenses have been chosen so that people who would want to can modify either the firmware or PCB or both, and they can also distribute and commercialize the result of their work, but have to keep the source of both software and hardware open. 

Log in or register to post comments