Jump to content

Reverse Engineering the MacSnap SCSI


Recommended Posts

Hello,


Noticed a few month ago that the 53C80 SCSI Chip is in life production by Zilog, available new :

Mouser link : https://www.mouser.fr/ProductDetail/692-Z53C8003VSG/

 

COVID helping, I bough a broken MacSnap SCSI on eBay and started to reverse it. I though it will be cool to gave a schematic and understand a little bit how it was done. 

Managed to buzz almost everything and new PCB is almost done (and converted for use with a PLCC SCSI chip).

 

The board consist of :

- 53C80 SCSI chip

- Custom timer circuit to reset the 53C80

- two PALs

 

You can find a good article written by @Dog Cow on his blog here :

https://macgui.com/news/article.php?t=471

 

Here is the reversed schematic :

schema_v05.png

 

Currently I've got a few issues :

 

Resistor Packs

The original board got three resistors packs (~ 150Ω each) wired to each output of the 53C80 chip to the ground. I double checked with the MacPlus diagrams and the Mac Classic Ones, and neither of them have those resistors ladders. Any ideas what they are for ?

 

PAL

What is going on with the two PALs ?

The left PAL looks to be used as an address decoder to generate  /IOR /IOW /DACK and /CS lines and a few other stuff. 

 

The right one is especially weird. I cannot understand why it's wired that way... It has freaking data lines ! This is straight dark voodoo stuff. Only possibility I came to is that it's used to "live" patch the Mac ROM while running. Is that even possible ?

You can read on the PCB "128k ROM ONLY", so that could be it... 128k ROM as "Mac 128k" or 128k sized ROM (MacPlus) ?

 

Here is a picture of the board :

original_front.jpeg

 

I will get a PAL Dumper soon, but my hopes aren't high...

Would creating a new custom PAL be a better idea ? I think creating only /IOR /IOW /DACK and /CS lines should be enough. But we have a limited number of address lines though the ROM socket so that will be tricky.

- /ROMCE should be good for 0x40 0000 to 0x5F FFFF which include SCSI space (0x58 0000 to 0x5F FFFF)

- /CS should need A19:A23 but we only got access to A1:A17

- /DACK don't understand very well what's its for. Looking at the Datasheet, it's used for DMA purposes, but from what I remember, neither the Mac 512k / Plus / SE support DMA.

- A9 + /ROMCE can be used to generate ~IOR and ~IOS, but what about the other ones ?

 

Let's say ROM data is between 0x40000 and 0x42000, so generate /CS between 0x58 0000 to 0x5F FFFF when /ROMCE is low ?

 

Other informations

Does anyone have a manual for this board ?

 

Thanks for your help or input.

Edited by demik
Link to post
Share on other sites
  • demik changed the title to Reverse Engineering the MacSnap SCSI

Very neat indeed!

 

If 2020, an otherwise miserable year, brought us anything good, it's a plethora of newly reverse-engineered clones of these otherwise hard to find and very desirable upgrades!

 

c

Link to post
Share on other sites

Ok, some progress:

 

- after a few lectures, 128k ROM means MacPlus ROM.

- double checked the PALs and there is no clock line, so 90% sure they are combinational. 

- got the Z53C80

- made "new" ROMs using AT27C512R, they works fine : https://www.mouser.fr/ProductDetail/Microchip-Technology-Atmel/AT27C512R-70PU/?qs=lURXKZrvvXfxaNMm462qBA%3D%3D

- since one of the PALs got 14 inputs, I need a logic analyser or two and some other stuff. Bough two of them, waiting for delivery.

- everything is on GitHub now https://github.com/demik/oldworld/tree/master/EDA/MacSnap SCSI

- PCB is finished, I will probably need to check if everything is routed properly and send them for production afterwards.

 

routing_v05.png

 

MacSnap%20SCSI.jpg

 

Todo :

- need to check caps calues. Some caps value seems weird, others seems dead. I will probably 

- The reset timer circuit is strange, not sure if a replacement will be needed or not yet.

 

Otherwise, I'm stuck waiting for hardware (PAL DUMPER on the way, LA, etc…)

Link to post
Share on other sites
  • 68020

@demik wow! Very nice work, I’m impressed. Looks like you’re pretty much ready for prototyping. I don’t think clearance will be a problem because the MacSnap processor upgrade was taller IIRC. If you get this working and want to work together on making it a complete set, I can injection mold this plastic part. 

20D47A25-C557-47E3-B700-DB1645122E7E.jpeg

Link to post
Share on other sites
  • 68kMLA Supporter

128K ROM only because the early Mac ROM (64K) did not contain firmware to support SCSI.

 

IIRC, and I don't remember enough detail, the Mac Plus and previous models, use D1 and D2 in a strange way.  I can't remember what specifically they're used for.    That's probably why the other PAL touches those two.   Unless I'm confusing them with A1 and A2....

Link to post
Share on other sites
  • 68kMLA Supporter

This is awesome! I'm anxious to be one of your first customers or help beta test if desired. My 512K has a MacSnap 548E and Plus ROMs, but I've never been able to track down a real MacSnap SCSI to go with it.

Link to post
Share on other sites
21 hours ago, Dog Cow said:

Have you verified clearance, that is, head height for the populated board?

 

Didn't think of that. I will do a dummy PCB to check this, thanks !

 

21 hours ago, maceffects said:

@demik wow! Very nice work, I’m impressed. Looks like you’re pretty much ready for prototyping. I don’t think clearance will be a problem because the MacSnap processor upgrade was taller IIRC. If you get this working and want to work together on making it a complete set, I can injection mold this plastic part. 

20D47A25-C557-47E3-B700-DB1645122E7E.jpeg

 

Thanks ! I'm missing the PALs equations for now, and I'm not as skilled with PALs as some other folks around there.

 

Anyway, I made a few changes to the PCB:

- There is now Internal terminaison power (for SCSI2SD)

- I put a 26 pin IDC header wired to use a LPT header. They are avaible on eBay or Aliexpress for like $3 or $4 bucks. The only thing missing would be the plastic part. Will get back to you when everything is working.

 

19 hours ago, History_SE30_Dude said:

Those resister packs judging by their location are internal termination, this was common to see on early SCSI cards and would be installed if you were not using an internal drive. 

 

it makes sense, thanks. Would that make sense on the new board ? Does something like SCSI2SD provide termination ?

I would like to offer the option to enable or disable the termination. Resistors are ~ 143Ω each to ground. Is there something to improve here ?

Link to post
Share on other sites
  • 68kMLA Supporter
5 hours ago, demik said:

There is now Internal terminaison power

Nice! With a BlueSCSI (arduiscsino) you could probably fit everything right on top (or maybe even on the same board, haha!). I'm interested in trying one out for my 512k.

Link to post
Share on other sites
On 1/9/2021 at 7:06 PM, maceffects said:

@demik I ordered some of @Kai Robinson 's PAL dump boards and I'll be assembling them soon.  If you want me to send you one let me know.  It seems like if that is the only thing stopping the project, that can be easily solved. 

 

Thanks ! I've already got two on the way. But the thing is on the MacSnap, one PAL has an output used as an input and the other one has like 14 inputs. Kai's boards only works with 16L8 PALs (8 inputs only)

I will need to build a custom PAL dumper for this... And yeah it's the only thing that's is difficult really

 

On 1/9/2021 at 4:10 PM, History_SE30_Dude said:

The scsi2sd has termination that can be enabled or disabled in software. I’ve seen it cause issues and I’ve seen it not. If the intent is to have an internal drive then no problem but if you don’t it could cause problems. 

 

On 1/9/2021 at 3:19 PM, erichelgeson said:

Nice! With a BlueSCSI (arduiscsino) you could probably fit everything right on top (or maybe even on the same board, haha!). I'm interested in trying one out for my 512k.

 

Thanks both of you for your feedback. I've looked around SCSI specs this week-end and choose this set up :

 

- the board will provide both active termination and termination power for SCSI2SD and alike. Each one can be disabled if needed.

- to prevent damage to the logic board, termination power will be limited to 5W

 

The active terminaison should consume less power than the actual passive one, so in theory this should works. I'm still trying to figure which termination power regulator to get as I want to use only new parts on the kit.

There is one (MC34268) still produced, but the current stocks are empty. It's in SOIC-8 format, I plan to put it on a DIP-8 socket adapter so it can be removed if needed.


This one is cool because it was built especially for SCSI terminaison, has short circuit protection, and cost less than $1

Edited by demik
Link to post
Share on other sites
  • 1 month later...
Posted (edited)

Technical post I'm having a lot of trouble reversing both PALs and need some help. The first one is almost done. Underneath the PCB I found their names :

- Left one is "DOV1"

- Right one is "DOV2"

 

First one that got reversed is "BSM1" in order to check /ROMCE values :

Minimized:
/IWM = A23'  + A22'  + A21  + /AS;
/SCCRD = A23'  + A22  + A21  + /AS;
/SCCEN = A23'  + A22  + /AS;
/VPA = A23'  + A22'  + A21'  + /AS;
/ROM = OVERLAY' A23' A22'  + OVERLAY A22 A21  + A23 A22 A21 ;
/RAM = OVERLAY' A22  + A23 A22  + OVERLAY A23' A22'  + OVERLAY A23' A21' ;
VC0 = /VCA  + VA6' L13  + VA8 L13'  + VA7' L13' ;
VC1 = /VCA  + VA6' L13  + VA8' L13'  + VA7 L13' ;

Minimized Product of Sums:
/IWM = (A23'+A22'+A21+/AS);
/SCCRD = (A23'+A22+A21+/AS);
/SCCEN = (A23'+A22+/AS);
/VPA = (A23'+A22'+A21'+/AS);
/ROM = (A23'+A22)(A22'+A21)(OVERLAY'+A22)(OVERLAY+A23+A22');
/RAM = (A23'+A22)(OVERLAY+A22)(OVERLAY'+A23+A22'+A21');
VC0 = (VA6'+/VCA+L13')(VA8+VA7'+/VCA+L13);
VC1 = (VA6'+/VCA+L13')(VA8'+VA7+/VCA+L13);

 

This matches Jessel and Wouter's previous findings ! 

 

Both DOV1 and DOV2 were dumped using an 27C020 adapter. I then wrote a few programs to generate a truth tables. Obvisouly this doesn't work well since some outputs are used as input. Here is where I'm at 

DOV1

Minimized:
x = A9'  + I3  + I8' ;
O2 = I3  + I8'  + I9'  + A1;
O3 = A9  + I3  + I8' ;
A5 = I3  + I8'  + I9 A1';
/IOW = 1;
/CS = /ROMCE A7' A15' A17' ;
/IOR = A9 /ROMCE' A7 A15' A4' A17' A1';
/DACK = I3' I8 ;

Minimized Product of Sums:
x = (A9'+I3+I8');
O2 = (I3+I8'+I9'+A1);
O3 = (A9+I3+I8');
A5 = (I3+I8'+A1')(I3+I8'+I9);
/IOW = 1;
/CS = (A15')(A17')(/ROMCE)(/ROMCE'+A7');
/IOR = (A15')(A17')(A7)(/ROMCE'+A7')(A9)(A1')(A4');
/DACK = (I3')(I8);

 

Analysis :

- A5 is probably an input, but may some way to remap addresses (A5 is connected to the pin A1 of the SCSI chip)

- /IOW is always right : is this normal ? On a Mac Classic it's connected to /LDS

 

Lets assume ROM space is 0x40 0000 - 0x5F FFFF. Does anyone know the SCSI space on a Mac Plus ?

 

DOV2

Minimized:
O1 = I4' ;
A14 = I4'  + A10' A16' A8 A6 A2' A3 I8 ;
A13 = A10' A16' A8' A2' A3' I9 ;
A12 = 1;
A11 = 1;
O6 = 1;
O7 = 1;
O8 = A10' A16' A8 A6 A3 I8 ;

Minimized Product of Sums:
O1 = (I4');
A14 = (A10'+I4')(A16'+I4')(I4'+A2')(I4'+A3)(A8+I4')(I4'+A6)(I4'+I8);
A13 = (A10')(A16')(A2')(A8')(I9)(A8+A3');
A12 = 1;
A11 = 1;
O6 = 1;
O7 = 1;
O8 = (A10')(A16')(A3)(I8)(A8+A3')(A6);

 

This one is a total mystery... Doesn't make any sense when dumped as PAL16L8

 

Can someone with a little bit of experience give a few hints ? (Useful programs for example). I've got the dump on hand if needed.

 

Thanks for your help

Edited by demik
Link to post
Share on other sites
  • 2 months later...

Here's a possible mac plus memory map including scsi,

http://www.mac.linux-m68k.org/devel/plushw.php

Here's a clip from that article:

The locations of the NCR 5380 control and data registers are given in the following table as offsets from the constant scsiWr for write operations, or scsiRd for read operations.

The address of each register is computed as follows: $580drn where r represents the register number (from 0 through 7), n determines whether it a read or write operation (0 for reads, or 1 for writes), and d determines whether the DACK signal to the NCR 5380 is asserted. (0 for not asserted, 1 is for asserted)

Here's an example of the address expressed in binary: 0101 1000 0000 00d0 0rrr 000n

Link to post
Share on other sites

Exciting to see this... have built a couple of BlueSCSIs, so would be great to pop one on top of the Floppy cage and hook this up... Good luck bringing this to life!

 

Not to derail you or anything... but have you looked at any other SCSI add-ons from the time?  @JC8080 recently sent me a pic of one he has...

 

PXL_20210430_232854698.thumb.jpg.7eafc824d8bd5a082af79663f5b9ccae.jpg

 

Not come across one of those... but thought I'd mention...  Internal (or external) SCSI in a 512k would be cool!

Link to post
Share on other sites
1 hour ago, mg.man said:

Exciting to see this... have built a couple of BlueSCSIs, so would be great to pop one on top of the Floppy cage and hook this up... Good luck bringing this to life!

 

Not to derail you or anything... but have you looked at any other SCSI add-ons from the time?  @JC8080 recently sent me a pic of one he has...

 

PXL_20210430_232854698.thumb.jpg.7eafc824d8bd5a082af79663f5b9ccae.jpg

 

Not come across one of those... but thought I'd mention...  Internal (or external) SCSI in a 512k would be cool!

 

Thanks both of you. I'm currently hitting a wall with both PALs, looking a way around them.

 

@mg.man No I didn't ! Didn't even knew this one existed. This board is VERY interesting. It looks similar to the MacSNAP SCSI, except with different PALs and a line delay. I would like to get my hand one one ! The line delay (DS1000-500) is something I suspect the MacSNAP SCSI PALs  are doing.

 

@JC8080 Can you please post high res resolutions of your board ? (top and bottom).

 

Link to post
Share on other sites
1 hour ago, demik said:

No I didn't ! Didn't even knew this one existed. This board is VERY interesting.

 

I'm glad (and hope!) it's helpful... the 'board that @JC8080 has looks (to the untrained eye!) to be a bit simpler / straightforward?  

 

It *would* be awesome to move the SCSI in a 512k effort forward - so I hope in some small way this might help!

Edited by mg.man
Link to post
Share on other sites

@demik Here are photos of the front and back.  I took these with my cell phone so they aren't amazing, but they look to me to be quite useable.  I also took a series of photos with my mediocre electronic microscope to stitch together, but the photos didn't end up showing any more useable detail.  If there is anything in specific you want close up photos of, just let me know!

 

Edit: if imgur is giving you trouble with the links and won't let you download the full images, DM me your email and I'll send them that way.

 

https://imgur.com/kAt6NiC

 

https://imgur.com/0TZBl4b

Edited by JC8080
Link to post
Share on other sites
1 hour ago, JC8080 said:

@demik Here are photos of the front and back.  I took these with my cell phone so they aren't amazing, but they look to me to be quite useable.  I also took a series of photos with my mediocre electronic microscope to stitch together, but the photos didn't end up showing any more useable detail.  If there is anything in specific you want close up photos of, just let me know!

 

Edit: if imgur is giving you trouble with the links and won't let you download the full images, DM me your email and I'll send them that way.

 

https://imgur.com/kAt6NiC

 

https://imgur.com/0TZBl4b

 

Thanks a lot. Thats ok I can work with that. The traces are clearly visible that's what I wanted.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...