Mac Help Forums


Reply
Thread Tools Display Modes

Resurrecting the G4 Macintosh as a vintage computer

 
Tinkerer Atlarge
Guest
Posts: n/a
 
      11th September 2010
Anyone nostalgic for the old 8-bit micros might be interested to know
the powerpc Mac's boot monitor Open Firmware has a lot of similarities
to the built-in BASIC interpreters. The 32-bit PowerPC registers are
somewhat analagous to the 6502's zero-page memory. The cpu has 32
general purpose (integer) registers, each 4 bytes wide, making a total
of 128 bytes - half the size of a 6502's zero page memory.

A major difference which has deterred potential users in the past is
that Apple Computer does not document its hardware and firmware as
comprehensively as the way "personal computer" manufacturers did in the
past. However the Open Firmware user interface offers a rich and
interesting programming environment which is available to the user prior
to booting the operating system from disk. (Just hold down the key
combination Ctrl-Alt-O-F after the startup chime, and don't release
until Open Firmware's " 0 > " prompt appears).

Unlike the earlier 8-bit micros, Open Firmware uses forth to implement
its command interpreter instead of BASIC. Forth is more complicated to
learn, but it is also a lot more efficient and powerful. You can write
device drivers with it, for example.

However, because of previous neglect by the user communities, it lacks
interesting and/or useful software beyond what is provided in the
resident Open Firmware ROM. To some extent you could say it is partially
crippled, possibly as a deliberate security measure. Getting around its
lack of easy obvious solutions is what makes it more interesting to
die-hard coders like me.

I see it as a worthwhile goal to help these old Macs extend their
lifespan by writing some of the missing software. I invite others to
contribute and discuss their own Open Firmware efforts as well.

To get the ball rolling, I will post the source code for a tiny program
I just wrote which gives a G4 Mac the ability to list the most recently
loaded Open Firmware program when 'list' is entered at the prompt - just
like on the old 8-bit micros.

If you then use it to list itself and examine its forth source code, you
will see how some of the complications I alluded to can be got around.

One complication is that the built-in value word "actual-load-size" is
normally hidden from the user interface. Another is that the loaded text
is typically concealed, although only the value of parameter "load-size"
is actually erased until another file is loaded or booted.

Yet another complication: modern Mac files typically have only a
linefeed at the end of each line of text, whereas Open Firmware's
terminal emulator takes the terms "linefeed" and "carriage-return"
literally. When outputting such text, it needs what it calls "carret"s
inserted at the appropriate places, otherwise it will start each new
line directly below where the previous line ended.

I will post a screen dump of "list.of" being booted by the user before
being used to list itself in parallel thread "A LIST command for G4
Macintosh Open Firmware"

Obviously it is intended for use with the loaded content of text files,
and will only work with content Open Firmware recognizes (or thinks it
recognizes) as actionable. If you load and then list (without executing)
a bootable binary file, the binary content will typically be preceded by
a "<CHRP-BOOT>" XML structure. After that has listed you will see
garbage, the same as you would in a linux shell. If that happens, press
'q' (maybe twice) to terminate the listing.

Cheers
 
Reply With Quote
 
 
 
 
Tinkerer Atlarge
Guest
Posts: n/a
 
      13th September 2010
Tinkerer Atlarge <(E-Mail Removed)> wrote:

> (Just hold down the key
> combination Ctrl-Alt-O-F after the startup chime, and don't release
> until Open Firmware's " 0 > " prompt appears).


Correction: Should have been Cmd-Option-O-F to start Open Firmware.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resurrecting an old PowerPC 7600 Tom Hardware 6 30th November 2008 05:26 AM
Resurrecting computer drive Tony W. Misc 3 21st December 2005 06:03 AM
Vintage Macintosh Quadra 840AV Monitor Problem Lionel Pinkhard Video Hardware 1 7th October 2005 12:42 PM
Vintage Macintosh Quadra 840AV Monitor Problem Lionel Pinkhard Hardware 1 7th October 2005 12:42 PM
Almost resurrecting thread: Shiva Fastpath 4 help needed rfka01 Hardware 1 29th March 2005 08:23 PM


All times are GMT +1. The time now is 03:01 PM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
Corrupted HD after force quitting XCode installer
geoffreyiy (10 Hours Ago, 04:30 AM)

WiFi or Ethernet do not work! (need to renew DHCP lease) works 10 seconds
madominguez7 (18 Hours Ago, 08:40 PM)

Copying file from mounted disc image.
gsearle (1 Day Ago, 08:30 AM)

Need help - getting worse and worse
wiggumfloss3 (1 Day Ago, 07:33 AM)

Traveler Microscope - Mac Driver?
seloc (1 Day Ago, 12:58 AM)