Live data from Hacker News

MacRelix – Unix-like features for classic Mac OS

macrelix.org

61–70 of 83 posts

Re: MacRelix – Unix-like features for classic Mac OS

#61
post #47
post #25

Earlier quoted context omitted.

MPW was actually one of the inspirations for MacRelix, in a backhanded sort of way: https://www.metamage.com/text/relix/origins.html I still use MPW's ToolServer for running the Metrowerks build tools, but sadly it's no longer available as an official download from Apple.

Question - looking at the code quickly, I see stuff about MWCC and Metrowerks object file format - is your tool chain in some way generating Metwowerks compatible object files? BeOS PowerPC uses the same compiler so you got me excited!

Yes and no. The MacRelix toolchain does, in a very trivial sense, generate Metrowerks-compatible object files, because mwcc is ultimately a wrapper around the Metrowerks-proprietary MWC68K and MWCPPC tools that run in MPW.

I reverse-engineered enough of the .o header format so that MacRelix's ar and ld could retrieve architecture and runtime information from a static library instead of making the caller provide it via a switch.

Separately, I've been writing post-linkers that patch or rewrite the Metrowerks-provided startup code in 68K code resources. The next step on this path might be writing my own compatible linker.

Re: MacRelix – Unix-like features for classic Mac OS

#62

Why does it need an internet connection?

MacRelix has an `upgrade` command that will check for and fetch a new version of itself.

The installer is merely a stripped-down, single-file build of MacRelix with just enough tools to run the installer script, including `upgrade`.

Re: MacRelix – Unix-like features for classic Mac OS

#63

I wonder if there would be a way to adapt this to also use MacTCP instead of OpenTransport.

Curious, what does someone gain with MacTCP? I'm not familiar with the space, but a casual glance (not an assessment!) suggests that OpenTransport was standard-ish from system 7.6 onwards. Does it boil down to compatibility with older hardware?

Different software. They had different APIs from the programmer perspective. MacTCP was older and was based on Berkeley sockets (I think with some BSD code in the implementation?) and was somewhat primitive.

OpenTransport was fully multithreaded and based on SysV UNIX streams. Technically much superior. It has partial MacTCP API support for older apps but some programs demanded real MacTCP to work properly. I think Mac was the only place that really used Streams widely. Mac network programming in the OpenTransport days was alien from a Unix perspective.

OS X now uses sockets like everyone does these days.

Going off memory here it has been a long long time.

Re: MacRelix – Unix-like features for classic Mac OS

#65

I wonder if there would be a way to adapt this to also use MacTCP instead of OpenTransport.

Curious, what does someone gain with MacTCP? I'm not familiar with the space, but a casual glance (not an assessment!) suggests that OpenTransport was standard-ish from system 7.6 onwards. Does it boil down to compatibility with older hardware?

At the very least, MacTCP supports System 6 and the 68000; Open Transport is incompatible with both.

(I seem to recall there's a version of OT you can use with System 7 Pro, a.k.a. System 7.1.1.)

Re: MacRelix – Unix-like features for classic Mac OS

#66
post #61
post #47

Earlier quoted context omitted.

Question - looking at the code quickly, I see stuff about MWCC and Metrowerks object file format - is your tool chain in some way generating Metwowerks compatible object files? BeOS PowerPC uses the same compiler so you got me excited!

Yes and no. The MacRelix toolchain does, in a very trivial sense, generate Metrowerks-compatible object files, because mwcc is ultimately a wrapper around the Metrowerks-proprietary MWC68K and MWCPPC tools that run in MPW. I reverse-engineered enough of the .o header format so that MacRelix's ar and ld could retrieve architecture and runtime information from a static library instead of making the caller provide it vi…

I'll come find you on Github, but I'd certainly be interested in getting involved in a Metrowerks compatible linker. The BeOS toolchain suffers from being so old that nothing modern compiles anymore and so this combined with other projects might make a replacement more viable. Because BeOS PowerPC uses PEF as the linker and a load of the support code is in the form of object code (they pretend to be static libs, but they are just object files) and as the API is in C++ and uses whatever the MW standard mangling was, replacing the linker without the object file format is not really viable.

Re: MacRelix – Unix-like features for classic Mac OS

#67
post #26

Earlier quoted context omitted.

Author of MacRelix (and system-info) here. I'm delighted that you've noticed and appreciate this. :-)

Out of curiosity, how is MacRelix able to detect even under what emulator the system is running on?

It's mostly checking Gestalt() and scanning the unit table for specific graphics drivers, occasionally peeking in low memory. (My own v68k core identifies itself through undefined CCR bits in the CHK instruction.)

Have a look at tools/mac/system-info/system-info.cc and mac/libs/mac-sys-utils/mac_sys/has/virtualization.hh in the metamage_1 repository.

Re: MacRelix – Unix-like features for classic Mac OS

#68
Back in the day, the Aztec C development environment provided a "shell" experience for development.

Essentially, you coded in vi, you used make, had the basic shell commands (notably ls, cat, mv, cp). I can't speak to it much deeper than that. I used it for some time, but I had no Unix experience, so I can't say what was missing.

I'm sure, today, if I tried to work on it like a would a normal Unix environment, even a limited one, I would run smack into some deficiency. For example, I doubt you can shell out in vi, something that is bread and butter in my toolbox and workflow.

But, it was a very early (1985) "Unix on Mac" experience.

Re: MacRelix – Unix-like features for classic Mac OS

#69
post #5

This makes me wonder.. Are there any quirky whimsical or nostalgic but still functional desktop OS out there.. Like the fantasy console PICO-8, but for Desktop applications?

AROS -- an AmigaOS-like environment -- can run in "hosted mode" on Linux or Windows environments, maybe Mac as well, in addition to standalone.

https://www.aros.org

Note that because it's an API-compatible reimplementation of AmigaOS, it's not really a "fantasy OS". Hosted mode is rather a tool for serious OS development. Nevertheless, it's much more like a modernized retro Amiga than it is any extant DE for Windows/Linux/Mac.

Re: MacRelix – Unix-like features for classic Mac OS

#70

Back in the day, the Aztec C development environment provided a "shell" experience for development. Essentially, you coded in vi, you used make, had the basic shell commands (notably ls, cat, mv, cp). I can't speak to it much deeper than that. I used it for some time, but I had no Unix experience, so I can't say what was missing. I'm sure, today, if I tried to work on it like a would a normal Unix environment, even a…

You don't happen to have access to Aztec C for the classic 68k? I (and others) have been trying to track down a copy for some time. There appears to be one on Macintosh garden, but that is for ms-dos.
Post reply on HN