Login
You're viewing the post.lurk.org public feed.
  • Jun 26, 2026, 1:48 PM

    Due to illness, I was unable to present at INIT HELLO 2026. In this thread I will post my slides and what I was planning to say about them.

    COPY OF A COPY: How I set out to fix a 40-year-old bug in Copy II Plus and ended up rebuilding the entire application (and fixing the bug)

    🧵

    #AppleII #retrocomputing

    💬 4🔄 44⭐ 68

Replies

  • Jun 26, 2026, 1:56 PM

    This quote has been circulating recently, from a 1985 paper that was part of a conversation at the time about what a computer program *is*. Is it the source code? Or the final executable binary? Or the sum of its versions? Or the people who wrote it?

    I've been programming for over 40 years, and I can tell you with great confidence that Naur was right. When I'm building software, first and foremost what I'm building is me.

    Accepting that programs will not only
have to be designed and produced, but
also modified so as to cater for
changing demands, it is concluded that
the proper, primary aim of programming
is, not to produce programs, but to have
the programmers build theories of the
manner in which the problems at hand are
solved by program execution.

        "Programming as Theory Building"
                        1985, Peter Naur
    💬 6🔄 105⭐ 110
  • Jun 26, 2026, 1:59 PM

    ...which is a roundabout way of saying that, obviously, I did not use any so-called "AI" products in this project, for the same reason you don't take a forklift to the gym to lift weights for you.

    The effort is the point.

    No AI
    💬 1🔄 16⭐ 35
  • 💬 1🔄 8⭐ 17
  • Jun 26, 2026, 2:04 PM

    Funny story: last year at INIT HELLO, Stavros sat down next to me and casually said "I have the source code to Copy II Plus on this laptop; would you like it?"

    I don't remember every line in Ghostbusters, when someone asks you if you want the source code to Copy II Plus, you say yes.

    💬 1🔄 1⭐ 19
  • Jun 26, 2026, 2:08 PM

    So I've spent the past year poring through the Copy II Plus source code. Like all mature products created by multiple people over the course of a decade, the code is battle-scarred and disheveled and occasionally hilarious.

    It has a fatal error routine named OUCH.

    OUCH     JSR   HOME
         JSR   ERRMSG
         JSR   CROUT
         JSR   CLOSE
         LDA   #$43       ;PRESS
         JSR   PRINT
         JMP   GETKEY
    💬 2🔄 6⭐ 16
  • Jun 26, 2026, 2:10 PM

    The routine to launch the separate bit copy program is named MIKE, presumably after Michael Brown, the founder of Central Point Software and the original author of the bit copy program.

    JSR   CHOOZ1
         STA   :COPYOPT
         CMP   #2
         BCC   :MIKE    ;0,1 ->BitCopies

         ...

*
* ****** JUMP TO BIT COPIER ********
*
:MIKE    JSR   HOME
         LDY   #$FF
         STY   DOSNOW
         DEY
         STY   SRCTAR
         LDA   :COPYOPT
         CLC
         ADC   #$0F
         JSR   PRINT    ;BIT COPY 5.25
                        ;or BIT COPY 3.5
    💬 1🔄 1⭐ 7
  • Jun 26, 2026, 2:16 PM

    But as with many things, the real gold is in the comments. By 1989, Copy II Plus was a world-class, mature product that was used everywhere and therefore had to deal with everything. Hardware bugs, software bugs, cosmic rays, you name it. One common problem on the Apple II was hardware drivers using addresses in main memory for their own purposes, sometimes even assuming their values were persistent. Hilarity did not ensue.

    *
* SIDER FIRMWARE PUTS A $4C AT $3D0
*
* 3D6 - 3EB RESERVED FOR PRODOS
*           RAM-BASED DRIVERS
*
    💬 1🔄 1⭐ 7
  • Jun 26, 2026, 2:18 PM

    I think "enhanced //c" here means the ones with the Zip Chip accelerator built-in. We had similar problems in Total Replay.

    *
*  WARNING: ENHANCED APPLE //C CHANGES
*  LOCATIONS $00 - $08 AT RESET
*  MUST MAKE SURE VARIABLES AT
*  $00 - $08 ARE NOT NEEDED AFTER RESET
*
    💬 1🔄 0⭐ 3
  • Jun 26, 2026, 2:20 PM

    The IIgs was very backward-compatible. Couple of edge cases, probably nothing to worry about. Unless you're Copy II Plus and need to worry about everything.

    *
* A Smartport call on GS clobbers
* locations $57 - $5A.
* Avoid 'em!
*
    💬 1🔄 1⭐ 5
  • 💬 1🔄 1⭐ 11
  • Jun 26, 2026, 2:29 PM

    So what we have, after 40 years, is a pile of source code. Which is amazing -- for 99% of programs we don't even have that. But if a program is a living thing in the minds of the people who make it, then we don't have that.

    Could we recreate it?

    We have the source code

  but not the people who understood it
    💬 1🔄 1⭐ 10
  • Jun 26, 2026, 2:35 PM

    To understand this pile of code, we have to understand how it was "modified so as to cater for changing demands." And for that, we start by looking at how Copy II Plus evolved over the course of a decade.

    This is Copy II Plus version 1.0, preserved only recently by @A2_Canada. I had some thoughts at the time: mastodon.social/@a2_4am/111174

    screenshot of "Copy II Plus Diskette Duplication Program" with slot/drive options and nothing else
    💬 1🔄 0⭐ 7
  • 💬 2🔄 0⭐ 7
  • Jun 26, 2026, 2:46 PM

    Version 2 was a little better, with the innovation that it could try to automatically find data on half tracks and copy them without additional parameters. (Thanks to @txgx42 for finding documentation on this.)

    screenshot of "Copy II Plus Version 2 Diskette Duplication Program" with slot/drive, end track, and half track options
    COPY II PLUS instruction manual

NOTES FOR VERSION 2

HALF-TRACKS - Copy II Plus Version 2 will automatically copy most diskettes protected using half-tracks. If it finds an unused track it will start looking on half-track boundaries. ...
    💬 1🔄 0⭐ 4
  • Jun 26, 2026, 2:48 PM

    Version 3 was a little better and introduced modifiable parameters that users could set to copy specific disks.

    screenshot of "Copy II Plus Version 3.0" with slot/drive, start/end track, track increment, and "/ to modify" additional parameters
    💬 1🔄 0⭐ 4
  • Jun 26, 2026, 2:55 PM

    Copy II Plus 3 was still only a bit copy program, but Central Point saw the market for a more general set of file and disk utilities for users to manage their own data files, back up their own data disks, and back up unprotected disks. Their first attempt was The Filer, with a menu of functions that will look familiar to people who know what comes next.

    screenshot of "The Filer Version 1.1" with main menu options Catalog, Copy Files, Delete Files, Lock Files, Unlock Files, Copy Disk, Copy DOS, Change Booting Program, and Set Slot/Drive
    💬 1🔄 0⭐ 4
  • Jun 26, 2026, 3:11 PM

    What came next was version 4.0, which Computist magazine called "an excellent multi-function disk utility package, as well as a bit copy program." The bit copier was finally improved enough to be a serious contender. All functionality from The Filer was folded in, and it added power user features like Track/Sector Map, Undelete Files, and Sector Editor.

    It was wildly popular.

    screenshot of Copy II Plus 4.0, with main menu functions Catalog Disk, Copy, Bit Copy, Delete, Lock/Unlock Files, Rename Files, Format Disk, Verify, Track/Sector Map, View Files, Fix File Sizes, Change Boot Program, Undelete Files, Sector Editor, New Disk Info, and Boot Disk
    💬 1🔄 0⭐ 6
  • Jun 26, 2026, 3:15 PM

    Whereas most file utilities (including their own Filer) required you to type filenames, Copy II Plus 4 introduced an interactive catalog display that let you select multiple files on disk, then operate on all of them in one shot. (You could also enter filenames, including wildcard patterns!) This core UI design was reused by all functions.

    screenshot of "Delete Files" interface with disk catalog showing file types, sizes and names, with three files marked for deletion
    💬 1🔄 1⭐ 5
  • Jun 26, 2026, 3:18 PM

    In operations where order mattered, like Copy Files, you could even reorder the marked files. If you've ever cared about the order your files are stored on disk, it's time to schedule a colonoscopy.

    screenshot of "Copy Files" with list of file types, sizes, and names, with 5 files selected and notated in order
    💬 1🔄 2⭐ 15
  • Jun 26, 2026, 3:28 PM

    Three other important points about Copy II Plus 4, which are hard to see in screenshots:

    - it supported copying files between DOS 3.2 (13-sector) and DOS 3.3 (16-sector) disks, which was a messy transition that the Apple II world was still dealing with at the time
    - it ran in 48K
    - it copied an unprotected disk in 12 passes, which was a lot of disk swapping if you only had one disk drive. An unavoidable downside to having a lot of memory-resident code is there's less room for data.

    💬 1🔄 0⭐ 7
  • Jun 26, 2026, 1:58 PM

    @a2_4am This. But sadly most schools only teach the how-to stuff, not necessarily fostering the critical thinking and 'hacker' mindset that us old school programmers had back then. As a result, stuff gets silo'd, stovepiped, and/or reused in ways that lead to bloated code that's often very easy for a baddie to fuck with from the outside.

    💬 0🔄 1⭐ 4
  • Jun 26, 2026, 4:44 PM

    @a2_4am Was Locksmith the one with a built-in list of software titles for which it had a copy protection circumvention?

    💬 1🔄 0⭐ 2
  • 💬 0🔄 0⭐ 2
  • Jun 26, 2026, 2:33 PM

    @a2_4am I suspect that this is the kind of guidance that sadly, we still need to provide sw devs these days b/c many aren't able to figure that out on their own.

    💬 0🔄 1⭐ 2
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 1
  • 💬 0🔄 0⭐ 0
  • Jun 27, 2026, 3:30 PM

    @a2_4am

    I mention this paper once a week regularly to Gen Alpha’s and their minds are blown

    And then that the project that generated the insight was iirc some point of sale program (developers once made normal salaries only?) is the second gut punch.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 1