TashTwenty - Single-Chip DCD (Hard Disk 20) Interface for Macintosh

Tashtari

Tinkerer
Oct 13, 2022
42
68
18
I've posted about this elsewhere but I'm new to TinkerDifferent and it doesn't seem to have been mentioned here yet, so... introducing: TashTwenty!

Elevator Pitch​

It's a DCD (the interface used by the Hard Disk 20 to plug in through the disk port) interface, contained entirely within a PIC16F1704 (14 pins, ~$1.39) microcontroller. It bit-bangs the low-level IWM protocol using the read/write and phase lines on the "DB"-19 disk port, no programmable logic devices of any kind required.

It interfaces to an MMC or compatible card and can emulate up to four DCD devices of up to 2 GB each, with support for custom icons. It also has an enable output which can be used to chain more DCD devices (though ROMs only support a maximum of four) and a floppy disk drive.

Project Status​

Stable.

Caveats​

Due to the dearth of documentation on the DCD protocol, the firmware only implements the commands whose formats are known, namely read, write, and device identification. Responses to other commands are faked. Fortunately, this seems to be enough for the device to function properly, including formatting.

Certain Macs may have a limitation imposed by their ROM on the number of DCDs they support (the Plus and earlier appear to support four, later Macs seem to be limited to two).

Code​

https://github.com/lampmerchant/tashtwenty

Boards and Builds​

There are currently two PCB designs for TashTwenty.

TashTwenty Tiny, by @demik (this also fits in a Hammond case with PCBs used as front and back plates)

tashtwenty-with-case.jpg


TashTwenty Rev 3, by me

tempImageHtXhZd.png


I have previously made and sold kits for these (and will again if there's sufficient interest), and though I'm currently out of stock, I still have plenty of PCBs ready made if anyone is interested in doing a build, as well as PICs that I can pre-program.

A third PCB design is in the works, "TashTwenty Mega", which is slated to be a drop-in replacement for the controller board in a Hard Disk 20, so you can get the full HD20 aesthetic with a solid-state core.

Conclusion​

Check it out, let me know what you think! Also, since this post is sort of my introduction to the forum, hi, I'm Tashtari, I do stuff with PICs.

_o/
 

eric

Administrator
Staff member
Sep 2, 2021
942
1,542
93
MN
scsi.blue
I'm new to TinkerDifferent
Welcome!

I have previously made and sold kits for these (and will again if there's sufficient interest), and though I'm currently out of stock, I still have plenty of PCBs ready made if anyone is interested in doing a build, as well as PICs that I can pre-program.
Very nice! Put me down for one.

A third PCB design is in the works, "TashTwenty Mega", which is slated to be a drop-in replacement for the controller board in a Hard Disk 20, so you can get the full HD20 aesthetic with a solid-state core.
My HD20 is still going, but I'm sure the drive will fail at some point, great idea making a drop in replacement board.
 

ScutBoy

Administrator
Staff member
Founder
Sep 2, 2021
337
316
63
Northfield, MN USA
Welcome!

This is very cool. I'd be down for a kit when they become available again.

Like @eric I have an HD20 that I'm sure has a limited half-life, so I'll be watching for the "Mega" as well.
 

Patrick

Tinkerer
Oct 26, 2021
434
1
224
43
i currently use a floppy emu as a hd20. but i would still buy one of these. that way i can keep the floppy emu as a .. floppy emu instead of a hd20 emu.

would even buy it as a kit and build it if you have the boards.
 

retr01

Senior Tinkerer
Jun 6, 2022
2,473
1
796
113
Utah, USA
retr01.com
I have an Apple 40SC, so I am unsure if the SC external hard drive boxes are included in this solution. Notwithstanding, if this new solution increases the transfer rate and throughput via the DB19 to the floppy port, then it will be interesting.

Furthermore, this could be nifty if the Apple IIe Card blindly accepts this via the DB19 on the Y cable. Typically with the PDS Apple IIe Card in one of the compatible LC series Macs, only one Apple 5.25" and one Apple 3.5" Unidisk external floppy drive are accepted via the DB19 of the Y cable.
 

pfuentes69

Active Tinkerer
Oct 27, 2021
380
293
63
Switzerland
Please remind here the prices. I saw this in the other site, and definitely this is something that my 512K would be happy to have.
 

warmech

Tinkerer
Oct 30, 2021
79
101
33
I should be ordering the PCBs for the Mega this weekend to get them tested. They have minimal changes from the original design (they're mostly adapted to the HD20 controller card's form factor is all) so they should just work. Here's the preview which is now slightly out of date - I'll update with the newer one after I make the last couple of minor changes. It supports either installing an SD slot in the exposed area at the back of the case where the DB19 connector would go (if you intend to just use this as a standalone disk that you can swap out disk images on at will) or, if you have the tools and inclination, removing the DB19 connector from your dead/dying HD20 and installing it in the same location in the TashTwenty and using an internally-facing SD card meant to act as a more static storage solution with compatibility with other floppy drives/HD20s in a chain. The card select jumper (int/ext) lets you choose which you want to roll with.

I wanted to add a piezo to simulate head stepper movement, but it just sounded... off. I may come back with a rev2 that has an additional MCU and stepper controller to allow the Mega to connect directly to the Rodime's stepper and reproduce physical disk access sounds. This would require the Rodime to be spun up, which would also require the HD20 to be powered via its PSU (whereas the TashTwenty draws its power from the floppy port). Too many flaming knives and bowling balls in the air at the moment to run down that path, but I'd like to explore it later in the year for those who want the aesthetic feel of using an HD20.

If the first batch is successful, and no minor revisions are required, I'll sell the other four cards I get at cost plus a little extra for my time; I'm a 20 minute drive from Mouser, so I run will call orders all the time. I'd be more than happy to put kits together for those interested.

Screen Shot 2022-10-10 at 11.26.15 PM.png
 

Patrick

Tinkerer
Oct 26, 2021
434
1
224
43
Just to clearify. This allows you to use it in a daisy chain? you can plugin an actual floppy drive at the end of it ? (or can be configred to do so?)
 

warmech

Tinkerer
Oct 30, 2021
79
101
33
Just to clearify. This allows you to use it in a daisy chain? you can plugin an actual floppy drive at the end of it ? (or can be configred to do so?)
Yep - sorry for the confusion. You can either put the SD card where the DB19 would normally go (which makes it easy to get to, but means you can't use it in a daisy chain) or you can put the SD slot inside the case and transplant the DB19 connector from your old HD20 to this and use it in a daisy chain.
 
  • Like
Reactions: retr01

warmech

Tinkerer
Oct 30, 2021
79
101
33
Alright, here's what I've got so far; this should be the near final design for V1.0 of the Mega. I'm considering adding an optoisolator, and you'll see why in a sec. I need to do some more breadboard testing now that I have the stepper working, but I'm pleased with how things have progressed so far.

Screen Shot 2022-10-20 at 7.37.29 PM.png


I decided to dig in and figure out a way to drive the stepper and, in the end, got it to work the way I wanted. If you decide you want to use the it, some additional disassembly of the HD20 is required and there are a couple of caveats.

First, the Rodime will have to be removed and the stepper and home position sensor disconnected (a small ribbon cable on the back of the drive casing). Once disconnected, the stepper will have to be connected with the colors on its cable matching the RBWY color indicators on the card; additionally, the optocoupler used to detect when the head has reached its home position will need to be connected to match the diagram on the card. The Rodime can be reinstalled once this is done.

Second, the PSU is required to drive the stepper control and powers that portion of the card independently of the HD20 logic. The stepper will automatically park itself when powering up to ensure that it's in a known state when simulating seek actions and uses the /ENABLE line to determine when to, uhh... "seek."

Third, the disk itself is not powered and, thus, does not spin up. It appears the HD20 controller sends an instruction to the Rodime's controller to power up the spindle motor, as simply applying power to the drive would not engage it. I've been unable to determine how this is done and have put that side for a potential future revision.

Fourth, on startup, and after homing itself, the stepper will simulate the power-on diagnostic routine. Since it's not actually running the self-test, it's safe to just power up the Mac right after powering up the HD20, as the logic is powered and driven independently of the stepper control. I'm considering adding an optoisolator on the /ENABLE line just before it hits the ATTiny to ensure there's no weird power issues that might cause problems.

Last, there's an easter egg in this thing now. It requires the stepper to be driven and for you to make an "incorrect" choice when choosing which SD slot to use. ;)
 
Last edited:

Drake

TinkerDifferent Board Vice-President 2023
Staff member
Sep 23, 2021
447
782
93
Alright, here's what I've got so far; this should be the near final design for V1.0 of the Mega. I'm considering adding an optoisolator, and you'll see why in a sec. I need to do some more breadboard testing now that I have the stepper working, but I'm pleased with how things have progressed so far.

View attachment 9454

I decided to dig in and figure out a way to drive the stepper and, in the end, got it to work the way I wanted. If you decide you want to use the it, some additional disassembly of the HD20 is required and there are a couple of caveats.

First, the Rodime will have to be removed and the stepper and home position sensor disconnected (a small ribbon cable on the back of the drive casing). Once disconnected, the stepper will have to be connected with the colors on its cable matching the RBWY color indicators on the card; additionally, the optocoupler used to detect when the head has reached its home position will need to be connected to match the diagram on the card. The Rodime can be reinstalled once this is done.

Second, the PSU is required to drive the stepper control and powers that portion of the card independently of the HD20 logic. The stepper will automatically park itself when powering up to ensure that it's in a known state when simulating seek actions and uses the /ENABLE line to determine when to, uhh... "seek."

Third, the disk itself is not powered and, thus, does not spin up. It appears the HD20 controller sends an instruction to the Rodime's controller to power up the spindle motor, as simply applying power to the drive would not engage it. I've been unable to determine how tis is done and have put that side for a potential future revision.

Fourth, on startup, and after homing itself, the stepper will simulate the power-on diagnostic routine. Since it's not actually running the self-test, it's safe to just power up the Mac right after powering up the HD20, as the logic is powered and driven independently of the stepper control. I'm considering adding an optoisolator on the /ENABLE line just before it hist the ATTiny to ensure there's no weird power issues that might cause problems.

Last, there's an easter egg in this thing now. It requires the stepper to be driven and for you to make an "incorrect" choice when choosing which SD slot to use. ;)
Holy Guacamole!
fun project :) I especially like the addition here *chefs kiss*
 

warmech

Tinkerer
Oct 30, 2021
79
101
33
I too would like to purchase one of these when they become available!
I'm working on testing this at the moment and hope to be done this week or next. Work's just been very demanding, or this would have been done a couple of weeks ago. I guess I should open up Tindie shop or something - I've got more stuff in the pipeline that's starting to approach "finished product" status. I never really planned on selling some of this and was just going to open source everything, but why not both? I've got some older stuff as well that is long done and might actually have some commercial appeal, so maybe I should toss all that up for sale as well...

I'll make a note to get back to you on here when it's ready to go!

I too, would subscribe to your newsletter.


and buy this thing. kit form.
Same with you! :) My only concern is that L293D stepper drivers are $8-9 apiece and would substantially increase the price of a kit.

Anyone know of a cheaper (and less hot-running) alternative? I'm more than happy revising to use a new H-bridge or such that's less expensive and readily available.
 

Mu0n

Active Tinkerer
Oct 29, 2021
609
560
93
Quebec
www.youtube.com
Unfortunately, my external Hyperdrive FX/20 hard disk is broken because of deep scratches in the disks, not because the controller card is defective, so I'm not in the market for a drop-in replacement board.

I could use the other project from @Tashtari to get a cheapie replacement hard disk for my Plus in case of failure from my BlueSCSIs.
 

Tashtari

Tinkerer
Oct 13, 2022
42
68
18
At this point I think enough people have expressed interest that I'm going to put together a batch of ten TashTwenty Rev 3 units. I've ordered parts, I think I'm going to assemble them myself this time for peace of mind - that way I can make absolutely sure that they work before I send them out. Price will be $23 each, plus shipping (which should be under $5 in the US, $15-$20 to most international destinations).

If everything arrives when I hope it does, I'll be able to get these shipped out in about a week's time. I'm hoping to get through these quickly to avoid any complications with Paypal and friends' IRS threshold getting drastically lowered next year...

Get your orders in, slide into my DMs. =)

1670603974820.png
 
  • Like
Reactions: JDW and BPearce