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."

42 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...
    2. Re:No server available by n1ywb · · Score: 2

      No, a Telegard BBS.

      --
      -73, de n1ywb
      www.n1ywb.com
  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?

    3. Re:Actually it's just one text file by hcs_$reboot · · Score: 2

      They cut the download service when they realized they were actually giving away too much of the latest code

      --
      Slashdot, fix the reply notifications... You won't get away with it...
    4. Re:Actually it's just one text file by advid.net · · Score: 2
      erratum

      Those signs actualy read Translate server error.

      Anyway, this is off topic, but still so funny...

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

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

    --
    Korma: Good
  5. when software was fast... by Anonymous Coward · · Score: 2, Insightful

    ...and good. I miss those times.

    I miss stuff which opened instantly and worked quickly. Where a faster PC actually meant things getting done quicker, rather than an opportunity to shim in another layer of crapware designed by a 3rd party half way across the world to find its way into your ever-less-steady stack of shit.

    Windows 95 on a PC from 2000 runs way faster than XP on a 2010 PC, and both are faster than Windows Vista/7/8 on a modern PC. Why don't people make that effort any more? It's not as if using shitty pre-built components saves development time: learning all their quirks and bugs is often more time-consuming than just rewriting from scratch. Is it just that Twenty-First Century Capitalism thing where every useless leech has to take a cut, so it would be Unholy to properly develop in-house and on-shore?

    1. Re:when software was fast... by WillAdams · · Score: 2

      Yeah, I had occasion to use machines w/ fairly similar hardware specs (internal-clock multiplied 25MHz bus CPUs) running Windows 95, Mac OS 7 and NeXTstep 3.1 --- only the NeXT Cube would be considered usable by today's standards (and if it were still running, I'd still be using WriteNow to draft written correspondence and poste.app to print envelopes).

      I really wish Apple had preserved more of NeXTstep in Mac OS X, or that there were easily accessible options to strip down the features to a parity w/ OPENSTEP 4.2 --- the performance of which on 200MHz+ machines was unbelievable.

      William

      --
      Sphinx of black quartz, judge my vow.
    2. Re:when software was fast... by Anonymous Coward · · Score: 2, Insightful

      You miss the point. You shouldn't need 8GB of ram and an SSD just so a typical application can seem snappy. It is great that that such technology is available and affordable today, but that may not always be the case.

      Having programed on computers with as little as 4k of ram, 8GB just seems insane. Nobody should need that unless they are running something like an enterprise database, doing atomic modeling of a nuclear explosion, or running an FPS that is more realistic than going outside and shooting people.

    3. 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.

  6. 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.

  7. Re:What's this weird hidden splash file in MacPain by godunc · · Score: 2, Interesting

    Interestingly this code is supposedly in there. (According to the comments on the page). Somebody should check the Adobe code...

  8. 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

  9. Re:Pascal ? by owlman17 · · Score: 2

    Shouldn't be too much of a stretch since this was written using Free Pascal.

  10. 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 bill_mcgonigle · · Score: 2

      The print industry itself may not be large enough to give CMYK attention, but when you consider all the clients they have...

      And yet nobody has cared enough in the past decade to hire a few developers to add CMYK support. When the motion picture industry wanted more out of GIMP they hired the programmers to get it done (and they forked as well, but that was a matter of governance).

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    5. 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.

  11. 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.
  12. Re:Pascal ? by larry+bagina · · Score: 2

    Apple made the choice. Pascal was the standard development language for Lisa and MacOS.

    --
    Do you even lift?

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

  13. 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.

  14. 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.

  15. 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.

  16. 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.

    2. Re:Run in emulator by Anonymous Coward · · Score: 2, Informative

      By the way, the included makefile has unresolved dependencies and you would need to write a new makefile for it.

    3. Re:Run in emulator by Em+Adespoton · · Score: 2

      You can still get the MacApp framework with MPW from Apple. I've also still got a copy somewhere on my DVD archive of old ADC floppies.

  17. 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; }
  18. Re:Aspirations by DJCouchyCouch · · Score: 4, Insightful

    I love tapioca!

  19. 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
  20. Photoshop history lesson by mveloso · · Score: 2

    Note that Photoshop 1.0 was a one-man app...and Knoll still works on Lightroom.

    People today don't realize how mind-blowing Photoshop was back in the day. Nobody in real life did image editing - it was all airbrushing, paste-up, etc.

    Anyway, good reading:

    http://www.theverge.com/2013/2/13/3959868/photoshop-is-a-city-for-everyone-how-adobe-endlessly-rebuilds-its

  21. Re:How much of this is still in use? by tehcyder · · Score: 2

    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.

    But wouldn't it be educational for someone who was going to write a word processor to see what you could achieve with 640K RAM and 720K floppy disk storage limits?

    --
    To have a right to do a thing is not at all the same as to be right in doing it
  22. Re:What's this weird hidden splash file in MacPain by godunc · · Score: 2, Interesting

    Supposedly it's in macpaint...according to the comments section of the story.

  23. Re:Pascal ? by xpax666 · · Score: 2

    A smart programmer. It's a shame that language-wise things have gone so far downhill since then.

  24. Re:Pascal ? by xpax666 · · Score: 2

    Actually, that was Delphi. Turbo Pascal was one of the first IDEs for DOS.

  25. Re:Pascal ? by tgrigsby · · Score: 2

    Turbo Pascal rocked. Ignoring all the "it's pascal so it must suck" idiocy being posted, Turbo Pascal changed PC programming. The only compilers besides MASM were too expensive for a college student to touch and slower than Christmas to compile, but TP was $99 and screaming fast. I got a copy and that started a 25 year career in programming, almost exclusively using Borland products and building just about everything you can imagine with them. I get it that Photoshop was first written to run on Apple, but TP was more than just a hobby compiler, and really the best choice at the time for doing any serious work on a PC.

    --
    *** *** You're just jealous 'cause the voices talk to me... ***