Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Graphics Open Source Software

For Your Inspection: Source Code For Photoshop 1.0 176

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."
This discussion has been archived. No new comments can be posted.

For Your Inspection: Source Code For Photoshop 1.0

Comments Filter:
  • by Anonymous Coward on Thursday February 14, 2013 @09:50AM (#42894997)

    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!

    • Re: (Score:2, Interesting)

      by godunc ( 1836034 )
      Interestingly this code [folklore.org] is supposedly in there. (According to the comments on the page). Somebody should check the Adobe code...
      • by Megane ( 129182 )
        I don't see anything about Mac Paint (or Adobe or Photoshop) anywhere on that page. And someone modded you up for that?
        • Re: (Score:2, Interesting)

          by godunc ( 1836034 )
          Supposedly it's in macpaint...according to the comments section of the story.
  • by Anonymous Coward

    Their site has been toast since yesterday and now you turn the /. hose at it? Poor IT guys gonna have a bad day.

  • by Anonymous Coward

    ... in this code.

  • by Dan East ( 318230 ) on Thursday February 14, 2013 @10:02AM (#42895059) Journal

    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.

  • by Trailer Trash ( 60756 ) on Thursday February 14, 2013 @10:04AM (#42895075) Homepage

    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.

  • This the kind of story I aspire to write

  • This is a cool piece of history, though I wonder how much real functionality was in the original 1.0 version. Were they doing CMYK back then? Anyway, I want to check it out, but I don't anticipate seeing many technical marvels.

  • by Anonymous Coward

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

    • Speak for yourself. I'm using Windows 8 on a core 2 duo Dell (so not exactly cutting edge). I've upped the RAM to 8GB and put in a half decent SSD. Everything opens and runs nice and fast.

      (no, not a shill, check my comment history)

      • Re: (Score:2, Insightful)

        by Anonymous Coward

        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.

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

          Well ignoring the fact that people do run database and do modelling of all sorts of things on PCS, just the last mentioned justifies the high hardware specifications on today's PCs.

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

          • by JDG1980 ( 2438906 ) on Thursday February 14, 2013 @03:22PM (#42899321)

            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.

      • by Hatta ( 162192 )

        Anything will run fast if you throw gobs of hardware at it.

    • by Anonymous Coward

      There are a number of factors:
      * Programmers are lazy. They don't give a damn about quality; they just push for tools to make _their_ jobs easier. Bloat? Not their problem.
      * Corporations are lazy. If their software sucks, just throw more hardware at it. Somebody else's problem.
      * Users are lazy. Long gone are the days that programmers and users greatly overlapped. And current users continue to be deluded that as their computers get older, they run slower. No, they don't. If they _appear_ to be r

    • Loading "Pirate Adventure" onto an Atari 800 from a cassette drive in 1980 was neither quick nor instantaneous. Plugging in the Star Raiders ROM, on the other hand, was.

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

      There are some positive trends found of today too. For example Win7 is more or less as smooth as XP. Win8 runs even a nudge faster. Web browsers are fighting for the crown of fastest JavaScript and rendering engine. Boot up times in all OSes have improved tremendously. For all the awesome things we get to do, the tradeoffs aren't that bad IMO. Also, the fact that we are pushing the boundaries of single CPU core performance, motivates to pay attention to performance issues.

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

      Windows 7 is actually faster than XP on most systems. The trend towards ever-increasing bloat peaked around the time of Vista, and ever since then, the increased concern with power efficiency and the rise of mobile devices has led to a rollback.

      As for Windows 95, of course it runs faster; it's right on the bare metal and is written mostly in assembly. Remember, Windows 9x has no sec

      • by dfghjk ( 711126 )

        Windows 95 was a quick and dirty hack? It has no security? It was needed due to limitations in hardware? You're an idiot.

        Windows 95 was a monumental effort at the time. It included Plug and Play for the very first time, a feature which took literally years for the industry to develop. It had a substantially new UI, a completely new OS integral to Windows, it ran DOS apps in a virtual 86 environment, it was preemptive and had protected memory (although that was not new to Windows). Windows was the OPPO

  • by Anonymous Coward

    by geeks around the world who think $700+ is a bit much for the latest version when they can hack on 1.0's source code for free.

  • Does this put the source code into the public domain - and thus now might it be possible to port it to other architectures?

    • by newsdee ( 629448 )

      I googled around and could not find any ports of MacPaint (the earlier source code release).
      Has anybody attempted it?

      • Doubtful, unless they wanted to get sued for copyright infringement for violating the source code license. Since its license also is:

        Source code in the Museum Collection

        Note: This material is Copyright ©1984 Apple Inc. and is made available only for non-commercial use.

        Neither of the source code is under a license that allows distributing it or a derivative.

    • Of course it doesn't. Adobe has not relinquished their rights to it.

    • To add. Here is the copyright statement in the source files:

      {Photoshop version 1.0.1, file: About.r
      Computer History Museum, www.computerhistory.org
      This material is (C)Copyright 1990 Adobe Systems Inc.
      It may not be distributed to third parties.

      It is licensed for non-commercial use according to
      www.computerhistory.org/softwarelicense/photoshop/ }

      And from the linked license:

      1. Grant of License. Conditioned upon your compliance with the terms and conditions of this Agreement, the Museum grants you a non-exclusive and non-transferable license for a single user, solely for your individual, personal and non-commercial purposes, (a) to load and install the Software; (b) to compile, modify and create modifications or enhancements of the Software or any of its components (“Derivative Works”); and (c) to run the Software or Derivative Works on simulators or hardware. The Museum and its licensors reserve all rights in the Software not expressly granted to you in this Agreement.

      2. Restrictions. Except as expressly specified in this Agreement, you may not: (a) transfer, sublicense, lease, lend, rent or otherwise distribute the Software or Derivative Works to any third party; or (b) make the functionality of the Software or Derivative Works available to multiple users through any means, including, but not limited to, by uploading the Software to a network or file-sharing service or through any hosting, application services provider, service bureau, software-as-a-service (SaaS) or any other type of services. You acknowledge and agree that portions of the Software, including, but not limited to, the source code and the specific design and structure of individual modules or programs, constitute or contain trade secrets of Museum and its licensors.

      3. Ownership. The copy of the Software is licensed, not sold. The Museum and its licensors retain ownership of the copy of the Software itself, including all intellectual property rights therein. The Software is protected by United States copyright law and international treaties. You will not delete or in any manner alter the copyright, trademark, confidentiality and other proprietary rights notices or markings or limited or restricted rights legends appearing on the Software as delivered to you.

      The only thing you're allowed to do is view and modify it for your own personal use. You cannot distribute the software or derivative works based on it.

  • Gimp (Score:5, Funny)

    by Stele ( 9443 ) on Thursday February 14, 2013 @10:38AM (#42895351) Homepage

    Hopefully the Gimp folks can make some use of this.

    • Re:Gimp (Score:5, Funny)

      by ssam ( 2723487 ) on Thursday February 14, 2013 @10:50AM (#42895463)

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

    • Re:Gimp (Score:4, Informative)

      by serviscope_minor ( 664417 ) on Thursday February 14, 2013 @11:05AM (#42895597) Journal

      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 ]

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

        From the GIMP FAQ:

        When can we see native CMYK support?

        It is clear from the product vision that GIMP eventually needs to support CMYK, but it is impossible to say when someone finds the free time and motivation to add it. In the meantime it is possible to work with CMYK to some extent using plug-ins, such as the Separate+ plug-in.

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

        You're partially right. I'm part of a genetic research group, and I've had to work with people that need to make CMYK materials to send to publishers because apparently the print industry they work with requests it so the publisher demands it from us. So there is a trickle down effect in some cases. The print industry itself may not be large enough to give CMYK attention, but when you consider all the clients they have...

        • 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).

      • noone outside the print industry gives a damn

        Another way of putting it is that "no one outside professionals who want to actually publish their work gives a damn."

        You can pretend that everything is just published on the internet and printing is just something old people do all you like, it is simply not the case yet.

        • Re: (Score:2, Informative)

          You can pretend that everything is just published on the internet and printing is just something old people do all you like, it is simply not the case yet.

          No, I actually stand by my claim.

          Only the people at the high end of the print and design industry actually care about things like colour matching and quality.

          There are huge swaths of businesses who print stuff who apparently just do not care one bit. Just look around at all the random signage and posters printed for anything that's not a huge advertising

          • Our "Marketing" manager is the same way. The visual atrocities she calls datasheets hurt to look at they are so bad - cheesy drop shadows with hard noisy edges, thumbnail gifs blown up 10x and vastly distorted out of proportion, because you know you HAVE to fill the entire placeholder frame. One time she was going to have a 8' x 18' tradeshow booth wall printed from a powerpoint slide of some godawful 90's clipart and giant Times New Roman text. This was for a 2011 show mind you.
        • Re:Gimp (Score:4, Informative)

          by PhunkySchtuff ( 208108 ) <kai@automatic[ ]om.au ['a.c' in gap]> on Thursday February 14, 2013 @04:45PM (#42900705) Homepage

          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.

      • Considering that for the first one or two decades of Photoshops existance, the print industry was the main purchaser of photoshop (or the design industry, which would then send finished files to the print industry), it's been a pretty important feature. OK, it wasn't there in version 1.0, but soon thereafter. Yes, now more and more design work is done for online audiences, but many companies do in fact blend their online and offline marketing pieces.

        CMYK is an incredibly important feature; maybe slashdotter

  • Would Photoshop CS 6 (or wherever they are these days) still contain code from the 1.0 days?

    • by Lunix Nutcase ( 1092239 ) on Thursday February 14, 2013 @10:56AM (#42895523)

      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.

    • by ledow ( 319597 ) on Thursday February 14, 2013 @11:13AM (#42895665) Homepage

      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 [creativebits.org]

      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.

      • by Anonymous Coward

        With an application, it's also much easier to just rewrite every version

        You're joking right? Rewriting something as complex as Photoshop with every single version? Photoshop that has 10s of millions of lines of code. HAHAHAHAHAHAHA. I nominate this for the "Most Idiotic Post of the Week".

        • Yeah, it is ridiculous to think they would scrap all the code for every version. He does have a point though. Unlike an OS, an application only needs to open the file formats, so certain functionality can be totally rewritten if needed. There is no inertia from inter-operability with other applications slowing the rate of change of the codebase.

          The code is not going to be rewritten every version, but it certainly can change faster than OS code.
        • by ledow ( 319597 )

          And this one has 128,000 lines code, as titled in the article summary.

          I have that in an incomplete game that's basically just an pretty isometric sprite blitter at the moment. Given 128,000 lines of PASCAL and assembler, I think my first task WOULD be to rewrite them in something decent and more suited to the task. The time you save would overcome any conversion time.

          And the fact is that by version 3, they HAD rewritten the application entirely - in a completely different language.

      • 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?

      • Besides the fact that every consumer windows starting with XP is based upon the NT kernel, with the consumery stuff rewritten and layered on top.

        The win 1 -> 3.11 -> 95 -> 98 -> ME line was retired, thankfully, after ME.

  • by jbeaupre ( 752124 ) on Thursday February 14, 2013 @11:13AM (#42895673)

    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.

    • Re: (Score:3, Informative)

      by sgraesser ( 579449 )
      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.
      • Re: (Score:2, Informative)

        by Anonymous Coward

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

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

    • I suspect it won't be too long before someone figures out how to build it, and posts instructions.

  • Okay, while we wait for the slag that was the hosts servers to cool and solidify-- why the heck did the paging on the home page change? It used to be going back a "day" would put use unique URL based on the date. So if I reloaded the page a day later, it would still show the same group of articles.

    Now it has changed to ?page=1, where 1 means "1 page back from the most recent set of articles". So if I go back a page, then come back later and refresh-- I get a completely different set of articles-- somew
  • What would be required to actually build it? I already have a 68k Mac, so the hardware is covered.
    • by armanox ( 826486 )

      I have one too, and was wondering the same thing (just dusted off my Powerbook 540c last night. Now I need to find the powerbrick.)

  • Ran that sucker on a MacII with 8bit color at SVA's computer lab when it was on the East side 21st street...
    Bruce Wands and Burt Monroy were both very excited about this product as it was much more powerful than "Digital Darkroom".

  • by mveloso ( 325617 ) on Thursday February 14, 2013 @12:52PM (#42896731)

    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 [theverge.com]

  • The Computer History museum has a quite interesting YouTube channel [youtube.com] too.
  • Source code on the internet? Not safe from Michael Hardy.

    http://youfailit.net/?p=49 [youfailit.net]

    http://better-explorer.com/blog/a-word-about-michael-hardy-copycat/ [better-explorer.com]

    This person likes to take peoples source code, recompile it with minimal changes (usually just taking the author out and putting in his name) and then sell it.

    Recently hit the Apple II scene trying to pass off Byte Magazines Solitare Game as his own, asking how to make copyright materials then wanting the person who wrong Lemmings for the Apple IIGS to unprot

    • by Nyder ( 754090 )

      Source code on the internet? Not safe from Michael Hardy.

      http://youfailit.net/?p=49 [youfailit.net]

      http://better-explorer.com/blog/a-word-about-michael-hardy-copycat/ [better-explorer.com]

      This person likes to take peoples source code, recompile it with minimal changes (usually just taking the author out and putting in his name) and then sell it.

      Recently hit the Apple II scene trying to pass off Byte Magazines Solitare Game as his own, asking how to make copyright materials then wanting the person who wrong Lemmings for the Apple IIGS to unprotect it for him. lol.

      Anyways, great reading about a loser who profits via others work. But a source code thief and will find Michael Hardy's Photoshopped Photoshop 1.0 coming out soon!

      fuck, I can't type to save my life.

      he ask how to make copyright symbol, not materials. doh!

It is easier to write an incorrect program than understand a correct one.

Working...