HD20 Schematics required

Macintosh, 512k, SE, etc.

Re: HD20 Schematics required

Postby Mac128 » 27 Nov 2010, 05:10

Dennis Nedry wrote:I have an old Apple 400k drive here with a cable that certainly would NOT fit through the case of the HD20, and I seem to remember that my UniDisk 3.5 cable didn't fit.

Just slid my 400K drive's cable through the HD 20 case, and aside from not having a rounded bottom (leaving a tiny gap), fits perfectly. The 3.5" 800K Unidisk came out at the exact same time as the HD20 and uses the exact same strain-relief rubbber pass-through cable, except it's off-white rather than beige, and there's slighlty more internal wiring. Only the 5.25" Unidisk will not physical pass through as it's rounded on both the top and bottom. This is presumably to keep someone from using that cable on a Macintosh which is electrically incompatible. But no worries, this is an old Mac forum where memories are assumed to suffer from bit-rot. ;-)

And I already mentioned the drive that came with the identical Unidisk cable in beige - the common Macintosh 800K external disk drive, released only 3 months later for use with the Mac Plus. But as I said, the 400K drive cable will also fit, though not identical, if you are concerned about color-matching. And the dual platform Platinum-colored Apple 3.5" drive cable is also identical, if color is not an issue.

One interesting note, all Mac drive cables are either actually a taupe color, or Platinum. Cross Platform cables are Platinum and off-white, matching the plastic cases. While Apple II family only cables are true beige and match the plastic cases. Later 5.25" Platinum drives came with matching Platinum cables as well, but continued the unique strain-relief case passthrough that prevents it being used on a Mac without alteration.
Last edited by Mac128 on 27 Nov 2010, 05:35, edited 1 time in total.
User avatar
Mac128
 
Joined: 13 Aug 2007, 04:59

Re: HD20 Schematics required

Postby Dennis Nedry » 27 Nov 2010, 05:23

Thanks for understanding my bit rot Mac128. Have you by any chance used your HD20 off of a disk drive cable? I just get paranoid about that stuff, like maybe Apple switched 2 wires so the traces on the board didn't have to cross each other or something. This drive is SO old and so strange, I feel like there's at least a chance and that worries me.
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby Mac128 » 27 Nov 2010, 05:40

I don't disagree, especially with the HD 20 - better safe than sorry. But no, never used my external floppy cable instead of the HD 20 cable. I could probably use my HD 20 cable on a floppy disk drive, though I doubt that's proof positive it would work the other way a round.
User avatar
Mac128
 
Joined: 13 Aug 2007, 04:59

Re: HD20 Schematics required

Postby Gorgonops » 27 Nov 2010, 18:40

If you have both cables available a few minutes with a continuity tester (or a gutted flashlight and a few scraps of wire) should be sufficient to determine whether the pinouts are the same. Not exactly rocket science.
User avatar
Gorgonops
 
Joined: 16 Jun 2009, 18:05

Re: HD20 Schematics required

Postby Dennis Nedry » 27 Nov 2010, 20:16

That's my plan when my HD 20 comes unless someone beats me to it. I have an external 3.5" drive or two to compare with.
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby Mac128 » 28 Nov 2010, 18:11

Dennis, couldn't be happier that you are taking on this project!

While you're at it, will you see if you can figure out what code Apple used to disable the HD20 under MFS? It can be formatted MFS, but requires by default that the HFS file system be loaded, or present in the case of the 128K ROM or laters. This means it cannot be used on a stock 128K, for which there is otherwise no reason it should not be able to be used, other than if fully loaded would be slow as molasses under MFS as the Finder struggles to keep track of 20MB of data. But it would be a great device to transfer files back and forth between a more accessible compact and the 128K. Even if only a small capacity of it is used, it would eliminate the two floppy drive limitation of the 128K, and vastly increase the storage space of a 128K, the current max of which is 1600K, without swapping floppy disks. I would also be happy to find a way to load HFS on a 128K, just to see how it actually copes with the file system using the added burden of the INIT code to the system heap.

viewtopic.php?f=7&t=1492&hilit=HD20&start=25#p21460
User avatar
Mac128
 
Joined: 13 Aug 2007, 04:59

Re: HD20 Schematics required

Postby Dennis Nedry » 28 Nov 2010, 19:01

Replicating a "black box" and actually understanding it well enough to make a major functional change, like using a different filesystem, are two very different things. I believe that I can replicate the original functionality, or at least document it well enough to be extremely helpful. I don't know enough details at this point to tell exactly what modifications are feasible; a lot of things will probably end up remaining unknown and just repeated from observations. It seems to me that if there is a 20MB volume limit with this interface, and a limit of 2 HD20s, at least some attempts to provide an emulated second HD20 should be worth investigating.

I have a Willem ROM programmer that supposedly can dump the 2764 ROM chip inside of the HD 20. Given that it's only 8 kilobytes, disassembly should at least be somewhat feasible and should shed some light on the Rodime and floppy interfaces. Once dumped, I shall certainly share the 8k file for others to poke around in. Theoretically, we can determine where the Z8 starts execution and disassemble from that point. From there we can determine what register is what, which ports correspond with what hardware, and form up all sorts of cool theories.

If we crack the external disk drive interface, we can build a new board that converts those signals directly to flash. If we crack the Rodime interface, we can build a new board that converts THAT to flash. Both have advantages and disadvantages.

Cracking the Rodime interface allows us to continue using the original controller board and its daisy chain port, the most authentic solution, and maybe the easiest. Cracking the disk drive interface allows ANYBODY with a ROM burner and a soldering iron to build an external disk drive port hard drive with a few affordable parts, but replaces the original HD20 interface board. More hacking is required to provide the daisy chain port, and in all honesty, that part is likely to be skipped in all of the excitement unless it's fairly straightforward. I suspect that the complete replacement version is low-power enough to be powered off of the floppy port.

We have to disassemble the HD20 a bit before we really know which direction to go with this. I imagine that I will have the drive in a week or so. My favorite microcontroller board is loaned out at the moment, so it may take a bit to analyze signals. Stay tuned!
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby jongleur » 28 Nov 2010, 21:40

OK, my HD20 with the butchered data cable arrived, and all I've been able to do is take a few photos which are over on RetroMacCast (http://retromaccast.ning.com/photo/hd20 ... ntext=user). Haven't been able to get out the spare 400k drive to "borrow" the cable as we are in the process of adopting the neighbour's 3 cats and are getting the downstairs ready for their arrival. Inside the HD20 is dusty and will need a good brush and blast before I do any work with it.
http://www.jongleur.co.uk/blogs/
User avatar
jongleur
 
Joined: 11 Mar 2010, 02:38
Location: Sydney, Australia

Re: HD20 Schematics required

Postby Dennis Nedry » 28 Nov 2010, 22:15

That doesn't look like the original cable anyway. It looks like a 400k drive cable. Compare to some of the other pictures posted here. Very interesting.

I'd pull the internal connector before powering it on in case the chopped cable has created short circuits. But you should be safe to turn it on and have a listen once that's removed. :)
Last edited by Dennis Nedry on 28 Nov 2010, 22:18, edited 1 time in total.
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby Mac128 » 28 Nov 2010, 22:16

Its hard to say exactly what the limits are with the HD20. Its entirely possible the HD20 could support a larger drive, but Apple didn't offer it based on System limitations, or merely price point. Look at their first SCSI drive, it only offered 20MB for many months, yet the case is capable of supporting any size drive you can fit into it, and supported by the system. So the HD20 may well support a greater than 20MB limit.

Also, the HD20 only officially supports one additional daisy-chained drive, but others have reported no problems with three and up to six daisy chained. Hard to say why such limitations were invoked by Apple, maybe to force the consumer to buy more than one Macintosh? But, as you say the onboard ROM dump will divulge much.

The HD20 is also designed to hold a 5.25" full height drive. The original Macintosh ROM contains a driver for the Apple Widget drive per Inside Macintosh, which drive was a full height 5.25" drive. So it's entirely possible the original HD20 drive was intended to be Apple's own Widget, until that too was discontinued along with the Lisa in early 1985. This may in part explain why the HD20 was announced during the 2nd quarter 1985, but not actually delivered until the 4th quarter, as they retooled it for the Rodime.

And yup, that's the 400K drive cable alright ... so if any damage was done, then there's no reason not to try a replacement 400K cable.
Last edited by Mac128 on 28 Nov 2010, 22:54, edited 1 time in total.
User avatar
Mac128
 
Joined: 13 Aug 2007, 04:59

Re: HD20 Schematics required

Postby Dennis Nedry » 28 Nov 2010, 22:24

Mac128 wrote:Also, the HD20 only officially supports one additional daisy-chained drive, but others have report no problems with three and up to six daisy chained.

That's very good to know!
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby jongleur » 28 Nov 2010, 23:30

Post by Mac128 » 29 Nov 2010, 08:16
And yup, that's the 400K drive cable alright ... so if any damage was done, then there's no reason not to try a replacement 400K cable.


Post by Dennis Nedry » 29 Nov 2010, 08:15
That doesn't look like the original cable anyway. It looks like a 400k drive cable. Compare to some of the other pictures posted here. Very interesting.

I'd pull the internal connector before powering it on in case the chopped cable has created short circuits. But you should be safe to turn it on and have a listen once that's removed. :)


Curiouser and curiouser, thanks for the quick ID on the remnants of the cable gentlemen. When I get the chance I'll clean the dust out, remove the butchered cable and give it a power-up test, then try the 400k's cable.

I'll let you know how it goes.
http://www.jongleur.co.uk/blogs/
User avatar
jongleur
 
Joined: 11 Mar 2010, 02:38
Location: Sydney, Australia

Re: HD20 Schematics required

Postby JDW » 29 Nov 2010, 08:34

Well, well, well...

http://cgi.ebay.com/Rare-Macintosh-Hard ... 225wt_1141

Interesting how fast these "rare" HD20 drives pop up on EBAY, one after another. And this one has its cable intact too, as do most I've seen on EBAY. Which makes me ponder the definition of "rare" a bit... Ahah! So that is the definition of a "rare HD20"!!! An HD20 with its cable hacked off! A cable-less HD20, my friends, is indeed "rare." But the one on EBAY at the moment, is not.
User avatar
JDW
 
Joined: 12 May 2007, 10:28
Location: Aichi-ken, Japan

Re: HD20 Schematics required

Postby jsarchibald » 29 Nov 2010, 08:37

Yeah, it goes without saying that the US is a treasure trove of Apple stuff. But here in Australia, we can't just snap our fingers or wait for a few weeks for something to come up. I have been looking for the past 6 months, and one has never popped up. There has been no 128Ks and only one 512K. A TAM, forget about it. So, you may have it easy but we are not in the same boat as you - hence rare.
//e, //c, IIGS, 128K, 512K, 2 x ED, Plus, boxed SE, SE FDHD, SE/30, Portable, CC, Performa 250, boxed LC, boxed Quadra 700, boxed PM6100, TAM x 2, boxed G4 Cube, G4 iMac, TechStep, TC, ATV, 15" Mid-2012 i7 MBP, 27" Thunderbolt Display, iPhone 4S
User avatar
jsarchibald
 
Joined: 06 Oct 2010, 06:48
Location: Gold Coast, Queensland, Australia

Re: HD20 Schematics required

Postby applefreak » 29 Nov 2010, 10:44

for years i bought items on ebay
even the ones with: 'Shipping to: United States'

if you realy want an item,
ask sellers if they would send the item to your place
ask the amount for handling and shipping...

you have nothing to lose
User avatar
applefreak
 
Joined: 10 Jul 2007, 17:53
Location: Belgium

Re: HD20 Schematics required

Postby Concorde1993 » 29 Nov 2010, 11:03

JDW wrote:Interesting how fast these "rare" HD20 drives pop up on EBAY, one after another

It's not really that interesting, but that floppy disk for the HD20 is probably worth more than the unit itself.
Vintage Macs:88 SE SuperDrive, 87 Plus (was a 512ke), 512K, Plus, IW II (2x), 96 5215CD, LW 300, SW 1500, SW 2200 (2x), MS 17, SC 20 HD, 800k ED & eMate
Other: Amiga 2000HD, 81 VIC-20, 88 Commodore PC 10-III, 84 Commodore 1701, 81 Datacasette
User avatar
Concorde1993
 
Joined: 02 Sep 2010, 18:27
Location: Brampton, Ontario, Canada

Re: HD20 Schematics required

Postby jongleur » 29 Nov 2010, 11:28

by applefreak » 29 Nov 2010, 20:44

for years i bought items on ebay
even the ones with: 'Shipping to: United States'

if you realy want an item,
ask sellers if they would send the item to your place
ask the amount for handling and shipping...

you have nothing to lose


Yep, done that, and sometimes they oblige, and sometimes not. What the killer is is the cost of shipping from the USA to Australia. I just don't understand it. Asia to Austrla is cheap - understandably, UK/Europe is not too bad, Canada is not bad either, but for some reason shipping from the good ol' USA is down right criminal at times.

Recently I acquired copies of MS Word and MS Basic Interpreter for 128/512k Macs and it cost US$50 (ish) each to sent to the land down under, but nix, and next to nix for domestic. Similar size and weight packages from the UK only put me back the equivalent of US$20 for it to be sent by Her Majesty's Royal Mail.

Yep, the USA is a treasure trove of ye olde computer goodies, but be prepared to pay heavily for it to be sent down to this end of the planet.
http://www.jongleur.co.uk/blogs/
User avatar
jongleur
 
Joined: 11 Mar 2010, 02:38
Location: Sydney, Australia

Re: HD20 Schematics required

Postby JDW » 29 Nov 2010, 11:33

jongleur wrote:What the killer is is the cost of shipping from the USA to... for some reason shipping from the good ol' USA is down right criminal at times.

And cursed be USPS for that. They used to offer Ocean shipping, but no longer. I am so thankful I purchase my compact Macs off EBAY when I did. I would have never even considered bidding on them, had USPS killed off Ocean shipping and I had been stuck with outrageous AIR mail as the only option. I also blame Americans too since they didn't make a stink about it and allowed USPS to do it (and as an American, I have every right to say that too).

Thankfully, Japan Post has retained its sanity, and I can ship virtually anything, anywhere by "reasonably priced" Ocean shipping. Sure it takes a month, but the cost savings is incredible.
User avatar
JDW
 
Joined: 12 May 2007, 10:28
Location: Aichi-ken, Japan

Re: HD20 Schematics required

Postby Mac128 » 29 Nov 2010, 19:14

Concorde1993 wrote:It's not really that interesting, but that floppy disk for the HD20 is probably worth more than the unit itself.

Actually it is sort of interesting that once a topic becomes hot on this forum, suddenly the item in question begins turning up in spades.

As for the floppy disk, hardly rare. I see at least a dozen or so per year circulating on eBay with and without the drives. Mostly worthless in my opinion, as the drivers are freely available on the web, and more often than not, these floppies have been updated with the latest Systems the user was running at the time they discontinued use, assuming they even work, thus negating their collectability, to thextent they have any such value. I've seen disks, which didn't even have the HD20 software on it - the disk recycled once they stopped using the HD20. And for the record I've never seen an HD20 disk sell for more than a working drive. Nor have I seen a manual sell for more either.

There's rare stuff on eBay, but it is few and far between. Nothing discussed here is rare, and I hate this forum helping to perpetrate this myth in any way.
User avatar
Mac128
 
Joined: 13 Aug 2007, 04:59

Re: HD20 Schematics required

Postby Gorgonops » 29 Nov 2010, 19:29

Mac128 wrote:The HD20 is also designed to hold a 5.25" full height drive. The original Macintosh ROM contains a driver for the Apple Widget drive per Inside Macintosh...


Out of curiosity, where does it say that in "Inside Macintosh"? I have searched my PDF copy of volumes I-III and the only reference to a "Hard disk driver" is in reference to the soft-loaded ROM used in the *Macintosh XL* (Aka, the factory Hax0r-ed Lisa), not the "real" 64k ROM in the 128/512k. The Widget connected via an 8 bit parallel port rather than a crazy Rube-Goldberg floppy-UART nightmare thus I'd expect that any similarity between it and the HD-20 on a low-level driver level would be completely coincidental... although I do slightly wonder if the HD-20 software driver reuses the "Hard Disk" device identifier defined for the Macintosh XL Profile/Widget driver when it's loaded. (Apple says in the "writing device drivers" section never to reuse an identifier, but software companies that write the OS regularly break their own rules.)

Dennis Nedry wrote:... I have a Willem ROM programmer that supposedly can dump the 2764 ROM chip inside of the HD 20. Given that it's only 8 kilobytes, disassembly should at least be somewhat feasible and should shed some light on the Rodime and floppy interfaces. Once dumped, I shall certainly share the 8k file for others to poke around in. Theoretically, we can determine where the Z8 starts execution and disassemble from that point. From there we can determine what register is what, which ports correspond with what hardware, and form up all sorts of cool theories...


I really hate to be a skeptical buzzkill, but a number of people have promised at various times to build mass-storage devices to work on the original Mac, and it seems like they lose focus or get in over their heads pretty rapidly.

As I've unfortunately bad-tempered-ly expounded on before the problem with all these schemes people have is that no one seems to actually want to glue their butt to a chair, read *all* the relevant sections of "Inside Macintosh" over and over again until they understand it, and fire up a compiler/assembler capable of producing "period-suitable" balls of code to write a device driver capable of emulating a hard-disk-ish like device through, say, a null-modem cable before running off and playing with the TinkerToys. Sure, disassembling the ROM containing the Z8 code might shed light on a few questions, like explaining in more detail how exactly Apple managed to use the IWM as a UART, and if you *really* want to try reverse-engineering the proprietary Rodime hard-drive connector instead of the IWM interface delving into it might reveal some details on how command flags were sent to the drive and how data was serialized/deserialized. However, well... if you think you're up to groking a disassembler listing *why not read a disassembly of the HD-20 driver*? It just took me all of five minutes to get semi-commented disassemblies of the Mac 128k and Plus ROMs thanks to this pre-assembled kit of tools, so getting that code is a lot less work than actually tearing something apart.

(Of course, I am not a 68000 assembly programmer, and the driver is mixed in with, well, the entire contents of the Mac ROM but... it does appear based on my ignorant reading that the ".sony" floppy driver in the Plus has been extensively modified to support the HD-20 based on a comparison of the 64k ROM. If someone knowledgeable were to spend the time grokking this information they could probably determine exactly how the driver twiddles the bits on the IWM to figure out if an HD-20 is present and how data is transferred to it. Disassembling the stand-alone HD-20 init might also help. My guess is that the INIT probably just replaces the whole of the 64k's .sony driver with one similar to the Plus-es, but even if that's the case it would point out exactly what needs to be patched to replace the floppy driver and add HFS support.

Oh, and BTW, since this has come up in other discussions about making some mass-storage widget that would fit internally via the 68000 socket a disassembly should to answer the question of whether the ROM is extensible. I don't know about *general-case* extensibility, but one of the first things the Mac does on power-up is check a certain memory location to see if it contains a signature indicating "test software", and if so it jumps to an address... it's on the first page of the assembly listing. I would hazard a guess that devices like the Hyperdrive leveraged that hook to hijack the startup process unless finer-grained overrides exist within the individual initialization/boot code blocks.)

Anyway, good luck with your endeavors to be sure, but my position at this point is unless someone were willing to actually spend the time learning how a mass storage device for the Mac *works*, interface details aside, before jumping in they're seriously putting the cart before the horse. You can spend as many man hours as you like logging and oscilloscope-ing the interface to your heart's content, but unless you understand *what it's doing* before you try to figure out how it does it you'll be muddling around in the dark. It seems to me that the entire thought process behind these endeavors is that it's *impossible* for anyone to understand the Mac well enough to write a device driver for it and it would somehow be easier to reverse-engineer some antique and undocumented mass storage device perfectly enough that an existing driver could "just work" with your new hardware. "Wham, bam, thank you Ma'am, I just made myself a flash drive for my 64K ROM Mac without ever having to touch or understand 68k assembly or the Mac system software! Yay, that was easy!"

Color me unconvinced. If the HD-20 wasn't such a "black box" I'd consider it doable, but if the plan is to just haphazardly diddle with it and try to see a pattern in the bits without having the slightest idea what to expect I definitely wouldn't hold my breath waiting for success.
User avatar
Gorgonops
 
Joined: 16 Jun 2009, 18:05

Re: HD20 Schematics required

Postby Dennis Nedry » 29 Nov 2010, 20:15

Gorgonops wrote:Color me unconvinced. If the HD-20 wasn't such a "black box" I'd consider it doable, but if the plan is to just haphazardly diddle with it and try to see a pattern in the bits without having the slightest idea what to expect I definitely wouldn't hold my breath waiting for success.

I understand your mentality Gorgonops. It's very hard to say how complicated this thing is. We have several tools at our disposal:

  • A ROM dump that can be disassembled fairly easily (small in size, performs a dedicated task, simple CPU, much less complicated than a Mac ROM)
  • Existing documentation of floppy drives
  • Observable signals
  • Very very old and presumably not way too complicated

Any of these things may be impossible to use on their own, but combining them and observing correlations is basically what needs to be done. There could be things that we don't understand, for example spin-up procedures and diagnostics, but by simply replicating what we see and telling the Mac what it wants to hear, we can make the Mac think the drive is okay and proceed as normal. This is what I was referring to with the black box. There will be a lot of details that WILL need to be figured out to make any sense of the commands and data.

I feel pretty good about it. I don't promise an immediate solution, but we will definitely make significant progress. There are things that I know that I can do with this drive that haven't been done yet.

The guy who just sold me an HD 20 has another cheap one for sale if anyone's interested, and apparently it works:

http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 0572138162
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby Gorgonops » 29 Nov 2010, 20:57

Dennis Nedry wrote:Very very old and presumably not way too complicated


I sort of have to take issue with that statement, because you're making the assumption that something "old" and "simple" won't be "complicated". Minimal and "elegant" hardware designs are often some of the *hardest* to wrap your mind around because they offload much of their complexity into the software driver, leaving the hardware as a minimal pile of gates and latches that completely depends on split-second timing and oddball encodings.

I'd also say that looking at a disassembly of the Z8 *may* be less informative than you'd actually like... don't get me wrong, it will undoubtedly provide some insight about how the floppy interface works, but... the thing to keep in mind is it's perfectly possible that the HD-20 itself is a relatively "dumb" device, with the Z8 essentially fully occupied driving the IWM and arbitrating communication with the Mac, while commands actually targeted to the drive mechanism and its associated controller might just pass fairly transparently through it. (IE, the Z8 gets a data byte off the wire and all it does is decode it and based on a header either shoves it into the HD controller as a "step head" command or whatever or shoves the data into the read-write buffer to await a "flush" command.) If that's the case then a disassembly will tell you a lot less about what sort of responses the Mac will be waiting for from it then decoding the Mac driver will.

(Or it may be a very intelligent device and a disassembly will reveal all. Just don't make any assumptions, here.)

I feel pretty good about it. I don't promise an immediate solution, but we will definitely make significant progress. There are things that I know that I can do with this drive that haven't been done yet.


Again, I wish you luck, but I also caution that if you intend to follow through with this it behooves you to learn as *much about the high-level operation of this thing as you can*. I could be completely wrong, but it sort of strikes me at times that you're a little fuzzy about what you should expect to see out the floppy port when it's speaking to a floppy drive, let alone how it might go about encapsulating data for the HD-20.

I hate to bring this up again, since people seem allergic to admitting that it *is* possible to write low-level storage drivers for the Mac, but... Basilisk II has ROM patches that replace the .sony driver. And, from sony.cpp:

Code: Select all
*  SEE ALSO
*    Inside Macintosh: Devices, chapter 1 "Device Manager"
*    Technote DV 05: "Drive Queue Elements"
*    Technote DV 07: "Forcing Floppy Disk Size to be Either 400K or 800K"
*    Technote DV 17: "Sony Driver: What Your Sony Drives For You"
*    Technote DV 23: "Driver Education"
*    Technote FL 24: "Don't Look at ioPosOffset for Devices"


I'm sure they're all good reading, but... just as an example, Technote DV 17, Linked right here, opens with the words: "This Note covers the external (software) interface to the Sony 3.5" floppy disk and Hard Disk 20 driver." It confirms that the HD-20 driver is embedded in the .Sony driver, it explains what drive status codes apply to the HD-20... a *particularly* interesting tidbit is this:

Return Physical Drive Icon (csCode=21)

This call returns a pointer to an icon describing the selected drive's physical location. The supported drive icons are shown in Figure 2. Note that only the icons for a particular machine are included in that version of the driver. The Hard Disk 20 icon is in the drive's ROM, so it is available only when a Hard Disk 20 is connected...


That means at some point during initialization *a high-level call is made to the HD-20 requesting an icon bitmap*. There's something you could focus on. If you can find that icon in the HD-20's ROM and figure out what is sent to trigger the drive to spit it out that could crack a good portion of how the command interface works in one blow...

But, eh, that's just how I might do it if I cared enough. If you want to bootstrap it up from bare bits go for it.
User avatar
Gorgonops
 
Joined: 16 Jun 2009, 18:05

Re: HD20 Schematics required

Postby Dennis Nedry » 29 Nov 2010, 21:54

From everything I can tell, the page of calls that you linked to are operating system calls. Generic disk icons are stored in the System File, not in a disk drive's hardware, or on each disk! It even mentions that control calls are "opcodes" which seems to refer to A-Line traps, which are strictly 68k OS calls. These would not be passed directly to any hardware. That is the purpose of Mac OS and the Sony driver, to reside in the Mac, use the Mac's processor and memory, receive these OS calls, and finally the sony driver sends low-level controls to the IWM. The IWM then does the appropriate hardware logical functions to disk drives. These are things like stepping the head, writing data, reading data, spinning the disk, checking the write-protect switch, etc. Disk drives are really really stupid, basically more analog than digital.

I appreciate your perspective and your constructive criticism. Because the HD 20 must cleverly use the signals from an IWM, and we know a bit about IWM, this is where my confidence comes from.
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby Dennis Nedry » 29 Nov 2010, 22:16

Oooo I see what you mean now:

while the Hard Disk 20 icon is retrieved from the drive's ROM.


That could be tricky.

That's one of those things that can be figured out by disassembling the HD20's ROM or by just replicating the signals. Whatever command it sends to fetch the icon, followed by a return of the icon data, we don't necessarily even need to know what's happening to pipe it right back through. It could have been resolved with the black box sort of thing. It's very good to be aware of that sort of thing though.
Dennis Nedry's 68kMLA Wiki Userpage, including my extensive Mac collection.
Dennis Nedry was an awesome Mac hacker, but I hack Macs in his name to preserve, not to destroy.
User avatar
Dennis Nedry
 
Joined: 22 Jul 2008, 15:32
Location: Jurassic Park Visitor Center

Re: HD20 Schematics required

Postby Gorgonops » 29 Nov 2010, 23:55

Dennis Nedry wrote:From everything I can tell, the page of calls that you linked to are operating system calls...


I was about to post a snippy response to this, but I think you've figured out that I wasn't talking out of my arse. ;^b Much of the Mac's OS *is* in the ROM.. and if you look through a Mac Plus ROM disassembly I think you can actually see where the generic "Mac Floppy" icon is stored. (It's near the end of the block of code under the "P_Sony_RdData:" heading, and I suspect one of the unnamed subroutines within that section is what responds to the documented "Return Physical Drive Icon" system call. Only "known", IE, reverse engineered by the author of vMac for the most part, sections of the code are actually denoted with human-readable labels.)

Anyway, the technote document points to there being some routine buried in there that says "Hello Mr. HD-20, please send me a pretty picture, kthxbye!", and all I was doing was suggesting that it *seems* like an example of a code path that might be relatively easy to find on both ends and which would enlighten how the IWM-as-a-UART things works in a vacuum without the complication of tracing a transfer of real data or looking for hard drive control codes which may not be obvious from a dissection of the Z8 code. (A lot of that depends on how "intelligent" the Rodime drive/host controller combo really is. We just don't know that definitively. The drive has its own Z8 on it after all, and the operating description in the patent application may not cover everything, particularly the possibility that the drive might have some Apple-specific firmware on it.) There may be other tidbits like that scattered around, just waiting to be found....

Which of course, the point I was really trying to make. There's a lot to be learned by reading all the documentation you can find for clues before just diving in. If you really want to tackle this from a low level "Disk drives are really really stupid, basically more analog than digital" (your words) point of view I'd honestly strongly suggest not starting with the HD-20 and instead concentrating on replicating a 400/800k floppy drive. Those *are* (mostly) dumb devices. The HD-20 is not, so starting straight with it leaves you having to figure out both the subtleties of the physical interface (IE, voltage levels, peak-to-peak variances, how to extract syncing/clocking information, how to convert the GCR nibble-encoding back into bytes, etc, etc.) *and* trying to reverse-engineer the high-level commands sent over that interface. (Another hint from that technote suggests that the HD-20 *may* be fairly "smart". The section about "formatting" suggests that the HD-20 uses linear addressing for its 38-thousand-something sectors rather than accepting explicit head/cylinder commands, for instance. It wouldn't surprise me if from a high level it ends up looking fairly SCSI-ish.) What you seem to be planning comes across as being akin to trying to learn how to read and write fancily-formatted ANSI text to/from terminal at the same time you're trying to reverse-engineer the modem it's connected via by tapping the tones on the phone line. If that's where you're starting it might behoove you to concentrate on making the modem first, and only after you have it reliably converting white noise to a serial bitstream *then* you can try sniffing the terminal protocols. (And even then you still might want to look up as much data as you can... starting at *least* with an ASCII chart?)

(I'd also suggest it might be a good idea to state straight-out which interface it is you're trying to crack here. Is it the Rodime interface or the HD-20 floppy interface you're after? If it's the former, forget everything I've said. Read the patent document, hope it's correct, hope there's enough high-level code in the HD-20 Z8 to grok out what commands it responds to, and hope that the ASIC-thing that makes up the host controller isn't particularly intelligent. Everything I'd suggested is with reference to making a device which can emulate an entire HD-20 via the floppy interface. Emulating the Rodime might actually be "easier" electrically, but you're totally on your own when it comes to docs. Which... may be what you want?)

Anyway, just saying that learning to walk before trying to learn to fly might not be a terrible idea. But I'll admit I don't have any formal education in electronics and I'm all thumbs with a soldering iron so perhaps I have *completely* the wrong idea, and with a dead HD-20 in hand it might *totally* be as easy as pie to reverse engineer the whole shebang at once. Keep everyone posted and all.
User avatar
Gorgonops
 
Joined: 16 Jun 2009, 18:05

PreviousNext

Return to Compact Mac

Who is online

Users browsing this forum: No registered users and 1 guest