How to restore system from Performa CD in Basilisk II

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
dougg3
Student Driver
Posts: 20
Joined: Sat Mar 02, 2013 10:20 pm

How to restore system from Performa CD in Basilisk II

Post by dougg3 »

Hey everybody,

I saw some previous topics about trouble restoring original system software from a Performa CD in Basilisk II:

http://www.emaculation.com/forum/viewtopic.php?t=5809
http://www.emaculation.com/forum/viewtopic.php?t=648
http://macintoshgarden.org/how-restore- ... a-software

The problem is that the restore program looks for either an IDE disk or a SCSI disk with ID 0 (I've seen the disassembled code with my own eyes), and if it can't find one of those, it won't allow you to restore. And of course, Basilisk doesn't actually emulate SCSI or IDE, so it complains that it can't find a hard drive to restore to.

One option that has been mentioned is to use SoftMac, which will emulate an internal SCSI drive. That process also works, but I decided to dig in deeper and get it working in Basilisk II.

I have the restore process working in Basilisk, at least with a Performa 500 series restore CD. I don't know about compatibility with all of the various restore CDs, but this CD in particular has a bunch of restore data files that appear to be in the same or a similar format as Apple Backup. In fact, the restore program seems to share a lot of code with Apple Backup and Apple Restore from what I can tell. You will need an existing Basilisk system set up with ResEdit available.

Here's what you have to do. Create a new hard drive image where you want the original software to be installed to. It will need to be sufficiently big (a few hundred MB or bigger will do).

On the Performa restore CD, there is a folder called "Restore All Software". That folder contains everything you will need, including the data files and a hidden System Folder that boots the CD (at least on the CD I have been playing with--the last data file is actually a folder disguised with a custom icon). Copy the entire "Restore All Software" folder onto the new, blank hard drive image you just created. We can't boot from the CD while doing the restore because we need to modify the Restore All Software program to skip the IDE/SCSI check.

Now, open up the "Restore All Software" program inside the copied "Restore All Software" folder with ResEdit. We need to patch the code so that it skips the check for an IDE/SCSI drive and assumes success. Open up CODE resource ID 1 ("Main"). At hex offset 001DBC, you should see the data "6614". The entire line starting at hex offset 001DB8 is "B06E FF84 6614 2F2E", but we're just concerned with the 6614. This is a jump instruction that executes if a detected disk is not IDE. We're going to replace it with a NOP instruction so it won't jump and will act like the first disk it finds is IDE. Replace the 6614 with 4E71. Save the file and quit. I hope that Apple used the same restore program on all of their restore disks. If not, the location of that patch might be different.

Assuming everything matched on your restore CD, shut down your Basilisk emulated machine. Remove all hard drives and CD-ROMs with the exception of the new hard drive image containing the Restore All Software folder and the patched Restore All Software program. Now boot up your Basilisk machine and it should boot from the new hard drive image. It will appear just like it booted from the restore CD. Open up the Restore All Software program and let it run. It will extract all of the original files onto the same disk you're running it from.

When you're done, click Restart and it will reboot into the restored system software, but it will probably bomb out on the A/ROSE extension. Boot up with extensions off (or boot from a different disk image) and remove the A/ROSE extension to fix that problem. Seems to work for me -- I end up with all of the stock programs that came with the Performa. In particular, I was interested in getting the custom Applications and Documents folder icons back :-) All you need to do to finish is delete the Restore All Software folder. It's no longer needed now that you have the restored system installed.

Because of the way the patch works, it detects the startup disk as the disk to restore to as well--it's the first disk it finds. I don't have an easy way to change that behavior, so that's why you have to copy the CD contents to the destination drive and boot from it.

I hope this little hack helps someone out there in the future. I think it's fun to see what a Performa's hard drive looked like straight from the factory :-)

Edit: Oh, and I noticed a bunch of aliases were broken too after doing this -- it was expecting that the hard drive was named "Hard Disk". I renamed it, rebooted, rebuilt the desktop, and that fixed the problem.
User avatar
adespoton
Forum All-Star
Posts: 3690
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: How to restore system from Performa CD in Basilisk II

Post by adespoton »

This sounds like you could probably use PatchMaker or a similar program to create a clickable patching system -- actually, I think I could probably even automate the entire process in AppleScript on OS X -- which would be preferable, an automated app inside a BII guest OS that would take the contents of the CD, create a Disk Image of it, and apply the patches, or an OS X applet that would make an ISO of the CD and patch the bytes?

Can't guarantee I'll get to actually doing it any time soon however....
dougg3
Student Driver
Posts: 20
Joined: Sat Mar 02, 2013 10:20 pm

Re: How to restore system from Performa CD in Basilisk II

Post by dougg3 »

Sounds awesome! Unfortunately, there are various versions of the restore program out there, and the patch doesn't work for all of them :( I checked another restore disk and its Restore All Software program was completely different. So I may have to figure out a smarter way to detect where to patch...
Post Reply