Mac68k Forums

Home


Welcome, Guest
Guest Settings
Help

Mac68k Forums » Development » Hardware Hacking

Thread: 040 to 060 Hacking


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 19 - Pages: 2 [ 1 2 | Next ] - Last Post: Jan 15, 2017 10:48 PM Last Post By: tt
tt


Posts: 144
Registered: 8/25/12
040 to 060 Hacking
Posted: Jun 2, 2014 7:20 PM
Click to report abuse...   Click to reply to this thread Reply
I was thinking about this hack, and looked a little bit into it. Hardware-wise, it looks like a 060 CPU can be inserted into an 040 socket with little modification. In the conversion, the supply voltage voltage is dropped to 3.3V, clock speed may need to be adjusted, and I am guessing some of the extra pins on the 060 become unused (NC). There are some somewhat simple adapters to do the conversion that I have seen online. Some adapters were manufactured at some point during the transition of 040 to 060 that didn't really take-off.

I am wondering if any of the Mac ROM hackers out there have ideas on implementing the patches the Amiga guys have been using to apply similar patches the Mac ROM, since we now have the capability to flash new ROMs. Is it at all feasible? Or perhaps in the case of a Daystar Turbo, to modify its ROM to apply patches for the 060?
bbraun


Posts: 493
Registered: 7/25/12
Re: 040 to 060 Hacking
Posted: Jun 2, 2014 7:27 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
Sounds like an interesting challenge. From a software side, it seems like the easiest first step would be trying to hackup an emulator to try to use an 060 engine instead of 040, since there's going to be lots of debugging during the very early stages of bringup.
I haven't looked at the 060 at all, so have no idea of the differences either electrically, or in the instruction set. It seems like at least for regular old CPU instructions, you could handle any unimplemented instructions in an illegal instruction trap. Dunno about MMU or any of the more advanced features.
techknight

Posts: 110
Registered: 10/13/12
Re: 040 to 060 Hacking
Posted: Jun 2, 2014 7:51 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
If i remember, there was a discussion on this in the past, Isnt the 060 a different machine language? I cant remember but I do remember a discussion back at 68kmla about the 68060.
tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Jun 2, 2014 8:17 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Attachment 3640_Adapter.jpg (182.7 K)
From what I've seen, the instruction set for the 060 is a subset of the 040. I looked at the 060 datasheet, and there is a section explaining the electrical differences.

Page 328: 11.2 USING AN MC68060 IN AN EXISTING MC68040 SYSTEM

http://cache.freescale.com/files/32bit/doc/ref_manual/MC68060UM.pdf

Homebrew adapter:

http://www.a1k.org/forum/showthread.php?p=644305#post644305

Photo of the 060 adapter for the 040 accelerator


Besides the ROM patching, it seems somewhat plug & play. ;-)

tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Jun 3, 2014 3:31 AM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
Attachment f6606.png (65.6 K)
Attachment S68060-2.jpg (14.4 K)
Attachment MC68060-pins.png (174.1 K)
I started digging into this potential hack after seeing a bunch of mentions by Amiga guys upgrading their 040 accelerators with 060 CPUs. They mention they required ROM patches to be able to boot. And some of the accelerator boards were conveniently designed to run at 3.3V for the LV version of the 040 or I guess future 060 compatibility.

Some more info on adapters and electrical stuff:

060/040 adapter:

http://www.emulation.com/catalog/off-the-shelf_solutions/production-test_adapters/upgrade_motorola/



It's a pretty neat package, the offer price is quite high though. I wonder if it is pretty much equivalent to that homebrew version in my previous post.

There is this compatibility note:

For your system board to be compatible with the S68060-2, a few conditions need to be met. The skew between leading edges of the BCLK and PCLK signals should be no more than 1ns, and the 68060 should not have to perform bus snooping.

The 060/040 overall sizes are the same and the pin layouts are similar with the main difference of extra interior pins.
tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Jun 4, 2014 1:33 AM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
Attachment MC68060HQXSW.zip (501.4 K)
The 68060 has a section covering the software package, which I think was intended to address the 040 features not included in the 060 architecture. I attached the software/code package here, but it can also be found here (software and tools section): http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC68060&fpsp=1&tab=Design_Tools_Tab

MC68060 SOFTWARE PACKAGE
The purpose of the M68060 software package (M68060SP) is to supply, for a target operating system, system exception handlers and user library software that provide:

•Software emulation for integer instructions not implemented in MC68060 hardware via the new unimplemented integer instruction exception.
•System V ABI-compliant library subroutines to help avoid using unimplemented integer instructions.
•IEEE floating-point support for the on-chip floating-point unit (FPU) as well as software emulation of floating-point instructions, data types, and addressing modes not implemented in MC68060 hardware.
•System V ABI-compliant library subroutines to help avoid using unimplemented float- ing-point instructions.
Arbee

Posts: 61
Registered: 11/29/12
Re: 040 to 060 Hacking
Posted: Jun 10, 2014 11:58 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
It looks like a reasonable first step would be to simply bring up the 68060 in 68LC040 emulation mode with superscalar dispatch turned off; that would probably get you running with relatively minimal disturbance to the ROM code. Of course, it would also mostly defeat the purpose of the upgrade :)
tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Jun 11, 2014 1:06 AM   in response to: Arbee in response to: Arbee
Click to report abuse...   Click to reply to this thread Reply
I agree, trying the simplest implementation first would be best. And also bbraun's suggestion about getting it done in emulation first.

I think even if the hack just got to the simple implementation, there would be, I'm guessing, about a 2X speed bump since the 060 clock speed would be 2X the 040 clock speed. Without swapping an XTAL, an 060 CPU on Quadra machines would really run at 50-80MHz unlike the 040 CPUs.
tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Jun 17, 2014 5:47 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
Some more notes...

From the Basilisk src:

68060 systems are a small problem because there is no Mac that ever
used the 68060 and MacOS doesn't know about this processor. Basilisk II
reports the 68060 as being a 68040 to the MacOS and patches some places
where MacOS makes use of certain 68040-specific features such as the
FPU state frame layout or the PTEST instruction. Also, Basilisk II
requires that all of the Motorola support software for the 68060 to
emulate missing FPU and integer instructions and addressing modes is
provided by the host operating system (this also applies to the 68040).

**********

fsave/frestore emulation under AmigaOS and NetBSD/m68k always behaves like
a 68882/68040 FPU, eliminating the need for 68060 FPU patches

***********

AmigaOS: disabled 68060 Super Bypass mode because of CPU bug triggered by MacOS 8

Video demonstrating Mac "emulation" on an Amiga with a 060 processor: https://www.youtube.com/watch?v=_hkPu8IJB7c

tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Jul 1, 2014 1:56 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
Just a small update... I have most of the parts (PCBs, sockets, resistors, capacitors) I need to build an 060 adapter and started customizing the sockets for the 040 and 060 by removing extra pins. Pressing out the pins is not too difficult. Once I get some pics I'll post them. =)
bbraun


Posts: 493
Registered: 7/25/12
Re: 040 to 060 Hacking
Posted: Jul 2, 2014 8:28 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
Nice, 060's don't seem very available, do you have a source for them other than the $$$ amiga upgrades?
tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Jul 3, 2014 1:12 AM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Attachment DSC09849.jpg (179.5 K)
Not really, just the usual places. They can be found loose and they are not hard to find, just a bit pricey.

Here's a pic of the boards with sockets. I haven't soldered anything yet. I'm waiting for the voltage regulator and the multiplexer to arrive.



I wish I knew someone local to me (SF Bay Area) with some Amiga gear so I could test out the board and CPU.
olePigeon

Posts: 3
Registered: 7/31/14
Re: 040 to 060 Hacking
Posted: Jul 31, 2014 10:48 PM   in response to: tt in response to: tt
Click to report abuse...   Click to reply to this thread Reply
Howdy, guys. Went ahead and registered since bbraun hangs out here. :)

Speaking of which, if the 060 upgrade requires a custom ROM, could dougg3's ROM be used to solve that problem?
bbraun


Posts: 493
Registered: 7/25/12
Re: 040 to 060 Hacking
Posted: Aug 1, 2014 11:00 AM   in response to: olePigeon in response to: olePigeon
Click to report abuse...   Click to reply to this thread Reply
Welcome aboard! Yeah, it would likely require a custom ROM using dougg3's ROM SIMM. Just shooting from the hip here, but at least to start, it probably will need some patches to the cache and MMU setup, and then try to patch out the FPU checks to disable ROM use of the FPU. It's probably easier, at least initially, to get working without FPU, then work on enabling the FPU as an INIT, and then possibly move that into the custom ROM.
tt


Posts: 144
Registered: 8/25/12
Re: 040 to 060 Hacking
Posted: Aug 5, 2014 4:34 PM   in response to: olePigeon in response to: olePigeon
Click to report abuse...   Click to reply to this thread Reply
Welcome oP! Do you happen to have any Amiga/Atari gear? =)

I started assembly of the adapter a couple weeks ago but found that the voltage converter required some extra spacing, between the two PCBs, and I didn't like it, so I tweaked the design of the top board, which should solve that issue. I just ordered a new batch of boards and they are off to the fab.

Point your RSS reader here for a feed of the latest messages in all forums