Mac OS 9 Discussion > Development & Programming

Classic implementation of 'modern' tech

(1/2) > >>

sentient06:
Hello, I'm new to the forum, although I've been reading stuff from here for quite some time in silence. I just didn't have much to comment on.

But now, I'm considering a few projects to get my hands dirty developing for classic Mac OS, but there are a few hurdles.

For example, I need SHA-1 implementation, and ZLIB. I also need to use regular expressions, and to learn how to traverse directories, create, hide, show and delete files, which, I assume, are part of the toolbox.

I don't want to reinvent the wheel and go on a quest to develop a ZLIB library, which sounds overkill. I assume someone already did these things. Does anyone know about implementations of things like that, or where to find it, or which keywords could help me locating implementations like that on the web?

So, that's basically me surveying the options and trying to figure out how much of a learning curve and how much extra work I will have to deal with.

Thanks!

sentient06:
I don't see a lot on enthusiasm here, but I'm going to post some updates here anyway.

So I started reading a bunch of books for Macintosh programming and using CodeWarrior. One of the books was the 1996's PowerPC Programmer's Toolkit by Tom Thompson. But I couldn't find the corresponding CD-ROM that came with it and I was getting pretty annoyed with the whole typing, especially when it came to Resource icons in hexadecimals.

So, first, I got those gigantic cd catalogues available on the Macintosh Garden and found the source codes from the CD in a random server somewhere that happened to be in the catalogue.

Second, I was missing the multiple cursor feature from modern IDEs, so I took Retro68 for a spin. And lo! It is a very cool thing! I setup QEMU running Mac OS 9.2.2 and managed to get a bunch of scripts in place to automate my work. So now I can code on macOS 15, run a script on command line and have it compiled, packaged into a CD image and mounted on QEMU immediately.

Retro68 is said to have some hurdles (like not supporting font resources), but so far it's been much easier to use that than CodeWarrior. So I plan on developing the bulk of my project using Retro68 and leave the odd parts to CodeWarrior, if I need to do that at any point.

I've laid out the basics of my scripts on Emaculation, if anyone is interested. And I'm putting all the boilerplate madness that deals with the Toolbox in a project that compiles into a library. Feel free to use it. It's very small atm, it has 2 functions dealing with files: one just gives some information about a filepath and the other is an old implementation to get a "choose folder" kind of window, which is fittinly called `StandardGetFolder`. I'm amazed that this kind of selection was not built into the Toolbox by default! Anyway, it works, after a full week trying to figure out what the resources for that damn window looked like.

(Please, please, please, if you do code for classic Macintosh, and it's open-source, dump the resource code into the codebase! Especially because git destroys the resource fork, so committing a resource file to git is just pointless. For anyone who doesn't know how to do that, use DeRez on Macintosh Programmer's Workshop to do it. There's a command you run on MPW that yields the whole code for the resource. People didn't do that in the 80s, nor the 90s, and now to find these things online it's a massive pain in the backside when it's not dowright impossible. Rant over.)

My libs are here:

https://github.com/sentient06/MacintoshLibs

They are geared towards my own projects, so the "make install" command only makes sense in my own environment. Be sure to change to whatever your needs are.

Greystash:
Thanks for sharing, that's really helpful! I've been meaning to build a few projects in C/C++ so your examples are very much appreciated!

sentient06:

--- Quote from: Greystash on December 02, 2024, 08:01:31 PM ---Thanks for sharing, that's really helpful! I've been meaning to build a few projects in C/C++ so your examples are very much appreciated!

--- End quote ---

Hey, no worries. I figured we need more developers. It's really cool to see modern tech making its way into Mac OS 9, so if we can keep some material available and well documented, it should naturally attract some people.

I've made a small tutorial for Retro68 as well:

https://mediocreprogramming.blogspot.com/2024/11/using-retro68-on-mac.html

It might have a few gaps, but the bulk of the drama is there.

I also created gists for all the scripts used on compilation, they were linked in the repo.

It's slow work, but it should accrue with time.  ;D

rvense:
Always cool to see new dev projects! I've used Codewarrior a bit. The developer experience is *incredibly* primitive, it's a miracle that any software was shipped at all if you ask me.

Navigation

[0] Message Index

[#] Next page

Go to full version