• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Learning to program Mac Plus

Hello,

I am learning to program on Mac Plus 2 MB RAM using Think C 5.Can you recommend any books or sites or other resources for learning C on Mac Plus? My goal is to create a game.

Currently I am in mid doing C programming courses on Udemy - I was coding a little in C++ long time ago for Gamebuino, and was programming mostly in Python/C# during Uni years :).

Thanks for replies ;).
 
Hello,

I am learning to program on Mac Plus 2 MB RAM using Think C 5.Can you recommend any books or sites or other resources for learning C on Mac Plus? My goal is to create a game.

Currently I am in mid doing C programming courses on Udemy - I was coding a little in C++ long time ago for Gamebuino, and was programming mostly in Python/C# during Uni years :).

Thanks for replies ;).
The Macintosh Programming Primer is probably the most fun, although it does everything in 'C' rather than 'C++'. It uses THINK C no less! It explains the Macintosh Toolbox Operating System in terms of little examples that expand over the course of the book, so you can learn as you type them in!

 
Thank you for response!! I will look into it :). Yeah I want to use C programming language to code - thats why Im doing C courses on Udemy to get grasp of it so that Primer book will be very good for me :).

Currently learning structs and macro definitions :D.

Always had soft spot for B&W Macs. I think its gonna be fun to create some sort of game for it :D.
 

Attachments

  • 450178688_834897424982034_4295928455787383186_n.jpg
    450178688_834897424982034_4295928455787383186_n.jpg
    89.7 KB · Views: 14
Last edited:
Thank you for response!! I will look into it :). Yeah I want to use C programming language to code - thats why Im doing C courses on Udemy to get grasp of it so that Primer book will be very good for me :).
Great!
Currently learning structs and macro definitions :D.
Excellent!
Always had soft spot for B&W Macs.
I think we all do! I have a Mac Plus, with a hard drive. I first got to use one in 1986 at Uni (1MB), but during the spring vacation in 1988 I got to take one home to learn Hypercard on it and write some educational software. I finally acquired one properly in around 1992 (which I still have, though technically, it's on a permanent loan!).
I think it's gonna be fun to create some sort of game for it :D.
Then we're looking forward to that!

One thing I would add though, if you can find a couple more 1MB 30 pin SIMMs, then I would. It'll be a bit challenging to develop in just 2MB of RAM. You can probably run System 6 in 500K with Multifinder. THINK C 5 needs another 1MB at a minimum. This leaves just 500KB for your running application and the debugger. Tight. With 4MB and System 7.1 => 1MB for the OS, 2MB for ThinkC, then 1MB for your app and the debugger.

There are some suitable ones on eBay:

 
Programming classic macs is super fun and rewarding! I second the The Macintosh Programming Primer, I used it a lot when starting up with my sold system.
 
Yeah I think you're getting good advice here. These machines are quite a lot of fun to code for, IMO.

thats why Im doing C courses on Udemy to get grasp of it so that Primer book will be very good for me

a tiny note of caution here - C has changed more than it looks since the '90s, so not all the good practices you learn in a modern C course will work in an older compiler, and you should always remember that things you are taught in an old C book might not be good practice for writing C for modern systems in modern situations. Sorry if this sounds didactic, but I dread finding '90sisms in modern C at work... :-D
 
Yeah but I'm learning basics of C on these courses - like structs, pointers etc. that is same for loooong time - not getting into newer stuff on modern C.:). Im happy that some people are still into B&W Macs I think they are special :). Many games from that era didnt get release on B&W Macs but still we can make nice homebrew games for it, don't we? :)

Oh I have 2.5 MB machine - so its 0.5 MB for system (6.0.8), 1 MB for Think C so it's about 1 MB for program.

P.S

Mac Plus on Nintendo DSi :D
 

Attachments

  • WNMiKUO5.jpeg
    WNMiKUO5.jpeg
    115.8 KB · Views: 11
Last edited:
Developing on B&W Macs is painful.

You can still target them with a Centris, Quadra or LC475, which give you a 1152x870 display and much faster compilation.
 
Sure you can! Think c will run very well. I do think there is still a charm programming on compact macs even if it is a bit slow and clumsy, I love seeing my plus for this.
 
I think I will develop on Quadra 700 and target Macintosh Plus - it will be more efficent (68040 processor) and comfortable as I can code on 1152x870 resolution and have 8MB of RAM available ;)
 
Last edited:
Ah, yes, that's a really sensible idea. I actually do a lot of my development under emulation for precisely those reasons... more memory, more screen space and more CPU is a good idea. I totally get the allure of doing it on real hardware and I like doing that a lot too but I got too spoiled by modern speeds of compilation... Doing it on a Quadra is a good idea. Good thought as usual from @ymk there...
 
I think I will develop on Quadra 700 and target Macintosh Plus - it will be more efficent (68040 processor) and comfortable as I can code on 1152x870 resolution and have 8MB of RAM available ;)
On balance, a Q700, or emulated Q700 You'll have to bear in mind though that what might appear to be fast and efficient on a Q700, isn't on a Mac Plus. For example, as you want to target a Mac Plus ultimately, then you'll need to target monochrome 1bpp graphics. Secondly, you might need to write specialised sprite routines; or you might want to make use of the double screen buffer on the Mac Plus (which the Q700 doesn't have). Also, memory locality helps on a Q700, because it has a cache, but it doesn't on a Plus, because it has no cache. Conversely, you'll want to bias to 16-bit maths on a Plus, because it's up to 2x faster than 32-bit maths (e.g. add.l d0,d1 takes twice as long as add.w d0,d1 on the Plus, but it's the same on a Q700).

It all depends on how demanding your game is.
 
Yeah, but I plan to transfer my code to Mac Plus to test it on real hardware how it works so I will keep speed of game etc. under control. I am aware that on 68040 things will work much faster so I will need to test code on Mac Plus itself to know how it works there ;). Using Think C 5.0 I think it will force 16 bit maths or I have to specify it somehow?
 
I'm also new at Mac programming but as I understand it you're best off using short and long explicitly instead of relying on int, and if 16 bit performance is faster use shorts whenever appropriate. The compiler may promote the types if appropriate, which is a complex subject I do not understand fully: this discussion may be helpful.

Another utility to consider is THINK Reference, it is really nice to be able to search for toolbox calls quickly and the writers do a great job of translating the Pascal-centric Inside Macintosh into stuff friendlier for C programmers. It also has extra information on the many "gotchas" present with Mac programming.
 
Back
Top