• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

TashTwenty: Single-Chip DCD (Hard Disk 20) Interface

tashtari

PIC Whisperer
I've got both a TL866II+ and a PICKit 3. Hmm... now I kinda want to compare results between the two.
Well, it does look like it's on the supported devices list (TashTalk's PIC12F1840 was not, but a nearly identical device with only a smaller amount of memory space was) so one would hope that either would work.
 

warmech

Well-known member
Well, it does look like it's on the supported devices list (TashTalk's PIC12F1840 was not, but a nearly identical device with only a smaller amount of memory space was) so one would hope that either would work.
Which is what caught my eye initially - I mostly bought my TL866 to test 7400-series ICs (it's been a godsend for working on arcade boards), but when I saw it could also do the PIC for this, I was curious if it would actually do it successfully.
 

warmech

Well-known member
Not fdisk, lol; I don't know why it didn't occur to me to use that. I was just using the disk utility in MacOS, but it can't partition SD cards now, apparently. I'll have to dust off my Linux skills and give it a go with fdisk.
 

tashtari

PIC Whisperer
Worst coming to worst, you can make your own MBR with a hex editor or so, the format is pretty straightforward. TashTwenty looks for an MBR partition table and primary partitions with the 0xAF type (HFS) and size of 0xFFFFFF sectors or less.
 

warmech

Well-known member
@tashtari @demik Almost done, but I'm not sure what J3 is for. The photo back on page four shows it bridged, but I can't find any reference to it in the readme. Does that need to be bridged for normal operation?

Edit: D'oh! My bad - looks like it's just mislabeled as J1 in the readme down in the optional section for the main board.
 

demik

Well-known member
@tashtari @demik Almost done, but I'm not sure what J3 is for. The photo back on page four shows it bridged, but I can't find any reference to it in the readme. Does that need to be bridged for normal operation?

Edit: D'oh! My bad - looks like it's just mislabeled as J1 in the readme down in the optional section for the main board.

My bad ! Thanks for the feedback. Fixing it now. Yes you need to bridge J3.
 

tashtari

PIC Whisperer
I'm not sure what J3 is for
@demik had to remind me of this, but J3 is for unusual situations where it may be possible to find the !ENBL2 signal for a nonexistent external/secondary floppy port somewhere on the logic board (or clip onto its pin on the SWIM chip, failing that).

The Mac floppy disk interface is effectively a bus, with the only non-shared signal being !ENBL - there's !ENBL1 for the internal floppy drive and !ENBL2 for the external/secondary floppy drive, and DCD/HD20 is only supported off of !ENBL2. Thusly, if you have a machine like the LC II which is suspected of having DCD/HD20 support in the ROM but has only one floppy drive port, you can connect the TashTwenty Tiny board to the primary floppy drive port to get all the other signals and connect the !ENBL2 signal to J3 from somewhere else, and (depending on the ROM) have DCD/HD20 support.

Bridging J3 connects the !ENBL pin on the microcontroller to the !ENBL pin on the 2x20 header, which is what you want for the overwhelming majority of cases where you're connecting the board to an external/secondary floppy drive port that has !ENBL2 in the connector where it should be. It's fine to bridge the two pins with a piece of wire, but if you want this expandability available to you, it'd be better to solder a two-pin header and stick a jumper on it when not in use.
 

warmech

Well-known member
Alrighty - I got the PIC programmed (PICKit3) and formatted my card to (what I think are) correct specs aaand... nothing. The power LED lights up, but the activity LED does nothing; once into System 7, it doesn't appear to recognize that a disk is attached and in need of formatting. The series of commands i used to format my SD card were (starting with zero partitions):

  • fdisk /dev/sda
  • o (create a DOS partition table)
  • w
  • p
  • 1
  • 2048
  • +20M
  • t
  • AF
  • w
Which left me with:

Code:
Disk /dev/sda: 14.9 GiB, 15931539456 bytes, 31116288 sectors
Disk model: SD             
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc276ee2f

Device     Boot Start   End Sectors Size Id Type
/dev/sda1        2048 43007   40960  20M af HFS / HFS+

Am I doing something wrong with that setup, or should I be looking elsewhere?
 

tashtari

PIC Whisperer
Your card looks to be set up properly. What machine and system version are you testing it on and do you have another one that you could try? Do you have an oscilloscope that you can use to help assess where the trouble is?
 

warmech

Well-known member
I've tested it on an SE and Classic running 7.0 and 7.1 respectively. I don't have an oscilloscope, unfortunately. :(
 

demik

Well-known member
Am I doing something wrong with that setup, or should I be looking elsewhere?

Aw, sorry to hear that it doesn't work as expected. Your setup looks good from there. I will try your sequence of commands over there and see what happens. Can we have a picture of your board so I can double check the components ?
 

tashtari

PIC Whisperer
Hmm. Scattered thoughts:
  • You could try another SD card if you have one... the ones I've tried have worked but it's possible there's something about the current one that the firmware doesn't like.
  • While your partitioning setup looks fine, it's possible I missed something. I've attached the MBR off a known-good card - you can download this and write it to sector 0 on the card.
  • If you have something that can be used as a "TTL trainer" (that is, something that can put out logic 1s and 0s), it's possible to test if the firmware is alive by driving !ENBL low and setting the phase lines. If nothing else, with !ENBL low, PH3-0 == 5 should output a logic low on the RD pin and PH3-0 == 6 or 7 should output a logic high.
  • Apart from that, all I can think of is to check your connections and components. There's more that could be done if you had access to a scope, but there aren't any signals to the microcontroller that are slow enough that you can observe them using a multimeter while it's connected to a Mac...
 

Attachments

  • mbr.zip
    224 bytes · Views: 8

warmech

Well-known member
Aw, sorry to hear that it doesn't work as expected. Your setup looks good from there. I will try your sequence of commands over there and see what happens. Can we have a picture of your board so I can double check the components ?
Surely! Pardon the flux.

I'll try another couple of SD cards just in case. Also, I have a logic probe if that's of any value, but sadly no scope. I've been meaning to get one and learn how to use it for a while now. I'll also double-check my work on the board while I'm at it.
 

Attachments

  • IMG_3782.jpg
    IMG_3782.jpg
    1.7 MB · Views: 23
  • IMG_3783.jpg
    IMG_3783.jpg
    1.7 MB · Views: 22

warmech

Well-known member
@demik So, I did some thinking while I was looking things over (can't locate any faults, unfortunately), I got to thinking. Since I swapped out a 50mA 3.3v regulator for the original 250mA one, could that be failing to provide enough current to the SD card? If so, could I just wire up a 3.3v power supply to the output pad from the regulator (after removing the regulator first) that does provide enough current? Something in the neighborhood of 800-1000mA?

Also, when trying to get anything to notice the TashTwenty, everything would give me an error of some sort (HD20 Test reported a failed disk and NishaDiag spat out the "CommError - $240000" error) except for DiskTimer II which ran without fault and gave the following results. I have no idea how or why it was able to generate these, as the activity LED never lit up. Thoughts?

IMG_3784.jpg
 
Top