I made a Sing Along program in C for my old Mac Plus!

Mu0n

Active Tinkerer
Oct 29, 2021
637
601
93
Quebec
www.youtube.com
✅THINK C was used
✅Studio Session was used
✅Discouraged alternate buffer hack was used


Thanks to @Crutch and @YMK over on this thread: https://tinkerdifferent.com/threads/scrnbase-and-its-alternate-screen-address.2299/page-2#post-19807
I was able to squash my bugs regarding a fast switching full screen graphic hack that Apple knew would break the future proofing when coding for the old macs.
Indeed, it used fixed memory addresses to control where the low-level redrawing routines would fish its data from. There was the main buffer known as ScrnBase, but also an alternate buffer a few kbs under it. This is used to switch around the graphics a bunch of times while the song is being played through.

Techniques practiced in this C project:
-Vertical Blanking Retrace timings (an interrupt happens every 1/60th of second, so it acts as a nice regular pulse for your program engine)
-hard coded events that could be made more flexible and part of a text file that's being fed to the program, to control the events that push the lyrics forward, the screen flips and the hidden screen drawings
-catch up mechanism if the events become suddenly bunched up, a queue is formed and they will be dealt with as swiftly as possible - useful for game programming if I ever need to dial in more steps, more logic and more drawings that couldn't fit in a frame's time.

Check it out in compiled form + all Symantec THINK C v6 source code + Studio Session song format here: https://macintoshgarden.org/apps/last-unicorn-sing-along
 
Last edited:
  • Love
  • Like
Reactions: Genjoke and YMK

YMK

Active Tinkerer
Nov 8, 2021
392
323
63
Very nice! I hadn't heard of this movie before.

The artwork looks great. How did you process that?

I don't know if Studio Session can export MIDI, but that would give you more playback options.

Four minutes of 11.025KHz audio is only around 2.5MB.

You could play back the pre-rendered Studio Session song, or even the original audio from the movie.
 

Mu0n

Active Tinkerer
Oct 29, 2021
637
601
93
Quebec
www.youtube.com
Go watch it. A lot of very young kids watched it back in the day when they were 2-7 years old only to be trapped by truly tragic and grown up themes throughout the movie. Many people report being marked by that film, in a mostly good way.

Process for graphics: I use Photoshop CS 2 to convert to gray scale, making sure I'm in 72 dpi, then bitmap by using one of the dithering, don't remember which but there are only 2 worthy ones anyway so it's not long to recover it. I can also use modern day GIMP but it creates slightly different results and I like PS slightly more. Then I save as PICT. Can't seem to be able to reproduce that with the latest Photoshop I have access to from work.

Then I transfer the file to a vintage Mac environnement and have to edit the file type as PICT so it can load into my stuff, or in Superpaint or whatnot.

As for sound, it would be easy to convert everything to the format and quality you mention, but I found it more fun to go way smaller in a programmatic sound format. This would be ideal for games and the result is not 100% bad imo. Still, your method is what they basically used for the title screen of 'Airborne!' with their 'RealSound' tech.