Jump to content

Reverse Engineering the Macintosh SE PCB & Custom Chips for 1:1 reproduction


Recommended Posts

  • Replies 429
  • Created
  • Last Reply

Top Posters In This Topic

8 hours ago, Bolle said:

Was just going to say that... I was staring at VCC and GND layers and saw nothing but it jumped right at me when I activated the outline Layer.

Yea, need to make each of those holes a part of the circuit and connected to ground, so the layout engine knows what to do with them, and can do its thing. 

Link to post
Share on other sites

I'm kind of wondering about the mention of ground connection, the Macintosh SE/30 schematic does say that hot and cold ground are connected together, is this also the same with the Macintosh SE or are they kept separate?  I've assumed that the wire to the chassis connected it to protective ground on the AC plug and this was kept separate from the PSU common ground, but I haven't looked carefully to verify it.

Link to post
Share on other sites

Rev 1.4c now in production - I know i can drill these boards, but i'd need to buy a drill for that...and to be honest, it's part of the process of prototyping - it's less expensive to spin up a batch of 10 more boards, than to get a dremel and whatnot - and probably just as quick to order. 

Thanks to @techknight and @Bolle for helping with the Gerber evaluation - fingers crossed 3rd time is the charm! To the people waiting on a board - i thankfully hadn't sent out a faulty one yet. 

I've received some donations in the past few weeks to help with the costs of the project, just need to go and get more passives, now! :D

Link to post
Share on other sites

Daft question... I'm interested down the line in a working board, but would you sell me a spare faulty one (or two) to hang an SE motherboard on the wall? I'm UK based. Assuming you are? Awesome work by the way. Looking forward to seeing the end result.

Link to post
Share on other sites

@Kai Robinson It is very amazing project! I love to see how you go through on each reversengineer's problems and do beautifull job at the end. :beige:

Do you plan to rebuild the Macintosh SE "only" at Logic Board level, or are you planning for the Analog Board too? Or the Magical Miniscribe 8425SA harddisk, what was the original for that SEs?

Link to post
Share on other sites

@Phipli & @buserror - You're welcome to a faulty one for £10 + the postage - DM me with your addresses :)

@fehervaria - Analogue board is doable, much easier than the logic board, just need a dead one sent to me - they're single sided boards, from what i can see. I do have the SE/30 boards arriving, and the Mac Classic (which is a cost reduced SE) boards, so they're in the pipeline, but i can knock out the Analogue board over a weekend, probably, if someone has a dead one!

Link to post
Share on other sites

Right, I've added a bit of sponsorship to @Kai Robinson for my wall-board, if anyone else feel like helping, remember you would be hard pressed to find something you would hang on your wall for less than  £30 :-)

 

Also, on a side topic regarding the attiny85 RTC chip, I'm the author of https://github.com/buserror/simavr  - I can simulate pretty much any AVR firmware with simulated external input before you have to flash it and put it on a board, if anyone needs a bit on support getting that working, feel free to ping me.

Link to post
Share on other sites

Just a thought... I know Compact Macs are very popular atm, and the SE/30 is a worthwhile follow up to the best computer ever made (the SE)... but it might be good to do a IIcx or something rather than every compact Mac first. Consider that it is easier to build up a new desktop as you can use an ATX supply and an LCD screen! Also not a huge difference between the SE/30 and IIcx designs.

 

Note this isn't specifically a request / demand, I'm over the moon to see this project happening as I have an SE.

Edited by Phipli
Link to post
Share on other sites

@buserror Nice -- that would help sidestep one issue in testing.  Namely, I say this is only for the sake I am new to AVR/Arduino and I need to figure out what is the problem with the currently written I/O routines using Arduino-specific libraries, otherwise the correct code to program the chip with comes pretty much straight out of existing Macintosh emulators, Mnii vMac I was looking at.  I did fix a few errors in the current code... but probably I'm just going to rewrite it from scratch using emulator source code as a reference to get a clean, bug-free implementation.

Link to post
Share on other sites
8 hours ago, Kai Robinson said:

Well, if peope send me dead logic boards i can have a go :D 

Absolutely just misread this as 'if the pope sends me dead logic boards' and for a moment I thought we had some unexpected company in our hobby, but apparently not...

Link to post
Share on other sites

Alright... I've cleaned through the existing source code for the replacement RTC and should have a feature-complete version now, with no fundamental design flaws like the previous versions had.  However, it's not tested yet, so there could be a few bugs.  Anyone interested to code review this or even try a spin with physical hardware?

 

The source code compiles with avr-gcc (and avr-libc) and it no longer has any dependencies on Arduino code libraries.  There are two versions you can compile, the 20-byte PRAM chip and the 256-byte XPRAM chip, 256-byte XPRAM is the default.

 

https://github.com/quorten/macsehw/blob/1e91a8b426ecac3230fe9b218b4f3b2720658943/firmware/rtc/MacRTC.cpp

Link to post
Share on other sites
14 hours ago, quorten said:

Alright... I've cleaned through the existing source code for the replacement RTC and should have a feature-complete version now, with no fundamental design flaws like the previous versions had.  However, it's not tested yet, so there could be a few bugs.  Anyone interested to code review this or even try a spin with physical hardware?

 

The source code compiles with avr-gcc (and avr-libc) and it no longer has any dependencies on Arduino code libraries.  There are two versions you can compile, the 20-byte PRAM chip and the 256-byte XPRAM chip, 256-byte XPRAM is the default.

 

https://github.com/quorten/macsehw/blob/1e91a8b426ecac3230fe9b218b4f3b2720658943/firmware/rtc/MacRTC.cpp

 

Couple of question here: is there a pullup resistor on the board for the data line? If so, you probably should not /drive/ the pin as an output, but configure it as open drain, this is pretty much to ensure both end are not driving the pin at the same time (which would damage both drivers).

Also, for the clock pin, I notice it is also INT0 as well as PCINT2 on the AVR, so you could use an interrupt vector for that, and put the AVR to sleep in between. Rigth now the AVR runs full speed all the time to resample the clock signal. /Ideally/ you would put the CPU to sleep /all the time/ and let the clock pin interrupt wake you up, process the current clock cycle, then go right back to (deep) sleep. With that the CPU will use power just when it's driven, and for toggling the RTC pin on a separate timer handler...

 

Link to post
Share on other sites

Yeah, I thought about using edge interrupts for the serial clock pin, that would make the code more elegant too (and more similar to Mini vMac).  Now I'm getting around to testing this design under simulation, and I found that the clock divider wasn't actually configured as it claimed to be... TCCR0B should be 0b011, not 0b111.  However, even so when I configure it like that, looks like I have the annoying problem that the one second pulse is consistently stretched a little longer than one second.  I'm guessing this must have to do with something like interrupt processing slowing down the timer counter advance or something.

Link to post
Share on other sites

@Kai Robinson I couldn't find the RTC chip on the schematic. Do you think the 65C22 has internal pullups?

 

@quorten I noticed you enable/disable interrupt in various places in the firmware, in some place I don't think it's actually necessary to do so (when reconfiguring ports for example) -- it's possible that the 'stretching' that occurs is because the interrupt is delayed by one of these blocks. You could see if it's the case by tracing the interupt generation vs the interrupt delivery. What sim are you using?

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...