MacPaint source? lazarus / 8-Other ---------------------------------------------------------------------- bobc · 2010-08-22 15:36 Hi all I noticed today that the source code for MacPaint has been made available via http://www.computerhistory.org/highlights/macpaint/, although I get an error when trying to download it. The code is written in Apple Pascal, so I immediately wanted to port it to Lazarus, and wondered if anyone else had already done it. It would be fun to have such a classic program running again. ---------------------------------------------------------------------- skalogryz · 2010-08-22 16:25 Quote from: bobc on August 22, 2010, 05:36:30 pmThe code is written in Apple Pascal, so I immediately wanted to port it to Lazarus, and wondered if anyone else had already done it. It would be fun to have such a classic program running again. It has been discussed on Mac-pascal mailing list. It's possible to port the old code to the FPC. But the problem is should use new Quartz2D API, instead of old QuickDraw. To sum things up... it's easier to write a new program from scratch that would look like the old MacPaint, instead of porting the code. ---------------------------------------------------------------------- bobc · 2010-08-23 17:57 Quote from: skalogryz on August 22, 2010, 06:25:32 pmIt has been discussed on Mac-pascal mailing list. Ok, thanks for the info. The Mac-pascal archive appears to be private. The idea was to get the old code running, changing as little as possible of the Pascal code, rather than create a facsimile. I will probably write code to emulate the assembler code which includes the Quickdraw library. ---------------------------------------------------------------------- skalogryz · 2010-08-23 18:10 I'd suggest to subscribe to mac-pascal list Quickdraw library is available on MacOSX though deprecated. ---------------------------------------------------------------------- bobc · 2010-08-23 20:53 Quote from: skalogryz on August 23, 2010, 08:10:49 pmI'd suggest to subscribe to mac-pascal list Done So I have started porting, I am collecting all the unknown interfaces and creating stubs for them. Later I will work out what they do... I've managed to compile about 900 lines out of 5800 so far. ---------------------------------------------------------------------- Troodon · 2010-08-23 21:39 I am just curious--assuming you can successfully port it to Lazarus/FPC, what do you plan to do with it? ---------------------------------------------------------------------- skalogryz · 2010-08-23 21:51 Quote from: bobc on August 23, 2010, 10:53:30 pmDone So I have started porting, I am collecting all the unknown interfaces and creating stubs for them. Later I will work out what they do... I've managed to compile about 900 lines out of 5800 so far. here's the thread about MacPaint http://lists.sonic.net/mailman/private/mac- pascal/2010-July/009100.html hope it would be useful. ---------------------------------------------------------------------- bobc · 2010-08-23 22:13 Quote from: Troodon on August 23, 2010, 11:39:29 pmI am just curious-- assuming you can successfully port it to Lazarus/FPC, what do you plan to do with it? I see it as a "working exhibit" really. It's great to read the oral history and look at the source code, but it would be good if people could actually see it running. I don't imagine anyone would actually use it as a paint program. My first real job was writing Modula2 code on the original IBM PC (twin floppy, no HD!), but we also had a Mac in the office, which was mainly used for writing documents, drawing diagrams, and er, playing games They were both milestones in computing, but the Mac seemed like it was 10 years ahead of the IBM PC. ---------------------------------------------------------------------- Marc · 2010-08-23 22:32 Quote from: bobc on August 23, 2010, 10:53:30 pmI've managed to compile about 900 lines out of 5800 so far. I hope you know about {$mode macpas} ---------------------------------------------------------------------- bobc · 2010-08-24 18:19 Oops! No I didn't. Thanks, that will make things easier After many years of Delphi I've just switched over to FPC/Lazarus, so there'll be a few bumps. Edit: I can now compile the main module (MacPaint.p), I'm left with 156 external functions to implement. These are a mixture of application functions that were written in assembler, part of QuickDraw or OS functions I think.