Slashdot Mirror


For Your Inspection: Source Code For Photoshop 1.0

gbooch writes "With the permission of Adobe Systems, the Computer History Museum has made available the source code for Photoshop version 1.0.1, comprising about 128,000 lines of code within 179 files, most of which is in Pascal, the remainder in 68000 assembly language. This the kind of code I aspire to write. The Computer History Museum has earlier made available the source code to MacPaint."

24 of 176 comments (clear)

  1. What's this weird hidden splash file in MacPaint? by Anonymous Coward · · Score: 5, Funny

    I'll just compile and run it to see.

    Well, it doesn't seem to show anythALL HAIL STEVE JOBS! STEVE JOBS IS MY MASTER!

  2. No server available by Dan+East · · Score: 5, Funny

    503 Service Unavailable
    No server is available to handle this request.

    At least they still have servers available to tell us that they don't have servers available.

    --
    Better known as 318230.
    1. Re:No server available by hcs_$reboot · · Score: 4, Funny

      For the sake of consistency, they use the same servers they originally had to deliver photoshop 1.0.1

      --
      Slashdot, fix the reply notifications... You won't get away with it...
  3. Actually it's just one text file by Trailer+Trash · · Score: 4, Funny

    Here, I'll post it here to save you time:

    503 Service Unavailable

    No server is available to handle this request.

    Not sure what language that's in.

    1. Re:Actually it's just one text file by Anonymous Coward · · Score: 3, Funny

      Not sure what language that's in.

      My vote would be 'English'...

    2. Re:Actually it's just one text file by advid.net · · Score: 3, Interesting

      Your answer remind me the 404 not found painted on shop signs in Asia.

      They weren't an intented joke, were they?

  4. Re:Pascal ? by biodata · · Score: 4, Informative

    Turbo Pascal was pretty much the first decent IDE for Windows AFAIR.

    --
    Korma: Good
  5. Re:Pascal ? by ImdatS · · Score: 5, Informative

    Photoshop 1 was only available on a Mac. I remember receiving the first "public beta" (Photoshop 0.9) some time in 1990 or so and it was awesome - jawdroppping awesome...

    In any case, you would use MPW (Macintosh Programmer's Workshop) those days, which I think is still one of the best team-development tools. And the language-of-choice (well, in fact, nearly the only choice) for developing on a Mac at those days was Pascal + Assembler.

    So, it makes sense that this code is Pascal.

  6. Re:What Functionality? by egr · · Score: 3, Informative

    According to this version table CMYK arrived at 2.0
    http://en.wikipedia.org/wiki/Adobe_Photoshop_version_history

  7. Gimp by Stele · · Score: 4, Funny

    Hopefully the Gimp folks can make some use of this.

    1. Re:Gimp by ssam · · Score: 4, Funny

      unless there is a clear licence allowing them to use the code, they would probably be wise not to look at it at all.

    2. Re:Gimp by serviscope_minor · · Score: 3, Informative

      Hopefully the Gimp folks can make some use of this.

      Certainly, because GIMP won't be a success until it natively supports CMYK like photoshop.

      [ for the impaired, GIMP does and this version of photoshop does not, and noone outside the print industry gives a damn ]

      --
      SJW n. One who posts facts.
    3. Re:Gimp by inamorty · · Score: 3, Funny

      I'm pretty sure they were making a joke.

      After using the Gimp, it's difficult to dispute this.

    4. Re:Gimp by PhunkySchtuff · · Score: 3, Informative

      Professionals in print production and publishing aren't using CMYK these days. Modern print-production workflows use RGB images (as they have a wider gamut thant CMYK) and use ICC profiles to convert to CMYK at the time it's printed. This way, when the colours are separated, they're done with the intent of the device that will actually be printing the output, not with some generic RGB to CMYK conversion in Photoshop.

      If you are working with CMYK images on your computer, you have made decisions about UCR and GCR and ink density that are at best educated guesses as you often have no idea what equipment will be printing your output. Once you've separated it to CMYK, if you need to print it on a different device that has different characteristics, you're in trouble.

      Now, whether or not GIMP is a suitable substitute for Photoshop is another argument altogether, but these days it doesn't hinge on CMYK support.

  8. Re:Still Down by AmIAnAi · · Score: 5, Informative

    Some kind soul put up this mirror on GitHub.

    --
    Any sufficiently advanced bug is indistinguishable from a feature.
  9. Re:How much of this is still in use? by Lunix+Nutcase · · Score: 4, Informative

    No. Photoshop was long ago rewritten into C++. That's not to say that some of the current code might not have some basis on the original code, but it's doubtful it's that much.

  10. Re:Still Down by larry+bagina · · Score: 3, Informative

    Seems to be a few mirrors on pirate bay, too.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  11. Re:How much of this is still in use? by ledow · · Score: 3, Informative

    Highly unlikely. Photoshop 1.0 was 1990 and it was an application. That's like expecting Windows 3.0 to be using the same code as Windows 8 - sure there might be some similarity but most of Windows 3.0 and its features don't even exist in Windows any more (and haven't for many, many years).

    With an application, it's also much easier to just rewrite every version - the only "compatibility" you have to worry about is that you can read the old files generated by the program (writing new file formats is common practice, but you need to be able to read the previous ones back in even if just for a one-time conversion). Think the very first Word for Windows versus Word 2013 / 365. The program itself doesn't even open files that old any more (compatibility only goes back to Word 97/2000 at best nowadays), so the likelihood of any code being more than vaguely similar is almost zero.

    Plus, given that the original is in Pascal and 68k assembler, the chance is basically zero. At the point that it had to be rewritten for newer languages / platforms (even if they ran 68k code, it's unlikely to be perfectly compatible), the old code would be ditched and used - at best - as a reference to how the program used to work.

    Code evolves or dies. This code-drop is pretty ancient in computing terms and won't be of any practical use any more - like when they released the original Prince of Persia source in assembler. At best, you could use it as a reference to make a pixel-for-pixel identical version by rewriting it in a sensible language and making sure it is equivalent to the old code, but that's about the only use of it.

    Have a look here:

    http://creativebits.org/the_first_version_of_photoshop

    You could just about put some text into it. It's like looking at the source code to Word for DOS 5 and saying "Is this any good to anyone?" No. Not really. Maybe 20 years ago, but now it's so obsolete we don't even use the program itself, let alone the code that makes it, and haven't for 15 years.

  12. Run in emulator by jbeaupre · · Score: 5, Funny

    Has anybody run it in a 68k Mac emulator? It would be interesting to see a performance comparison between modern PhotoShop running natively and version 1 running on an emulator.

    --
    The world is made by those who show up for the job.
    1. Re:Run in emulator by sgraesser · · Score: 3, Informative

      The Photoshop code can not be compiled/linked without also having a copy of Apple's MacApp framework. Since the code is written in Object Pascal, you would probably need version 2.0 or earlier of the MacApp framework in order to compile the code using MPW.

  13. Re:Pascal ? by Megane · · Score: 4, Informative

    Actually it's pretty close (UCSD dialect) until you get to the OBJECT keyword. Apple made full use of their Memory Manager for Object Pascal, which had a linear address space and supported relocatable objects, while Borland had a horrible memory allocator and was stuck with the 80x86 real-mode memory model and 640k limit. So they implemented "Object Pascal" as some kind of horrible C++ish hack. It was really and truly awful compared to the Object Pascal that Apple had already produced, though I hear they filed down some of the worst warts by the time of Delphi.

    Oddly, this code didn't make use of the Pascal UNIT system for its own code, instead using multiple levels of include files, with the main code for a unit in "foo.inc1.p". This was probably done to make it work well with makefiles. Back in the day it took long enough to compile that you really didn't want to re-compile anything you didn't have to, and if you did things the "proper" way, code and headers would be in the same file, causing a lot of unnecessary recompilation.

    --
    #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  14. Re:Aspirations by DJCouchyCouch · · Score: 4, Insightful

    I love tapioca!

  15. Re:Aspirations by Applekid · · Score: 3, Funny

    Yeah, C++, C#, VB.NET and F# are ALL dying languages. Fucking moron.

    F# ? I agree it's not dying, but only because it never lived.

    --
    More Twoson than Cupertino
  16. Re:when software was fast... by JDG1980 · · Score: 3

    Any games on a machine with 4k of RAM are going to be pretty much text only.

    Nonsense. The original NES only had 4K of RAM (2K of general purpose memory and 2K of video memory). The code itself, of course, was on cartridge ROMs (as was the tile data).

    You can easily get a decent game to run with 4K of RAM if you have a tile-based raster graphics chip and are coding efficiently in 8-bit assembly language. Back in the 1980s it was done all the time.