old computer challenge 2026


summary

for this year's occ i have a few projects in mind:

  1. implement varvara for 68k macintosh computers
  2. port uxn-lfb to NetBSD's framebuffer
  3. finally get around to working on my uxn roguelike

(the first project is my main plan, but if i get stuck i'll work on the others instead.)

computer-wise i'll be using:

the oldest of these machines (the cube) is about 25 years old. system 7 is 35 years old.

both the thinkpad and ideapad are about 15 years old.

i plan to post a log of my work and maybe also some longer form writing if i get to it.


varvara for system 7

i'm currently using think c and resedit inside an 80 MB disk image. i'm using minivmac to emulate a macintosh plus (motorola 68000, 4 megabytes of RAM, system 7).

so far i have a demo application that defines a couple menus and correctly implements Quit.

i expect to do the bulk of the work next week but give myself permission to "cheat" and get started this weekend if i feel like it!


daily log

days: 1 2 3 4 5 6 7

jul 5

We're still in the "demo project" phase where I haven't bothered changing the name of anything yet. My goal is to be able to open a ROM file, read its bytes into an array, display how many bytes those were in a window, and successfully quit the program.

Screenshot of minivmac running on NetBSD. We see an open project folder with a Think C file called 'Demo 1'.

So far Think C has been pretty nice. Unfortunately it seems like the full documentation had to be purchased separately (and I don't have it) so I have to guess around a bit for some APIs. But there are a lot of good Macintosh PDFs on the internet and I've been able to find enough sample code to get by.

Screenshot of minivmac running on NetBSD. We see a demo.c file open in a code editor.

System 7 seems very well-designed and its mostly been a pleasure, but things are surprisingly low level. Every click on every UI element has to be handled by the applicaiton, so I'm ending up writing tons of handlers, using tons of #define numeric constants, and similar.

Screenshot of minivmac running on NetBSD. We see the compiled demo program running, and using a built-in open file dialog box.

jul 6

I had less time today than yesterday but still made some progress:

One exciting thing is that even after allocating all the stacks and memory, the entire program is currently only using 384K of RAM (though I will probably have to add another 44K once I implement Varvara's screen device). The emulated Macintosh Plus has 4096K available.

Screenshot of minivmac running on NetBSD. We see the 'About This Macintosh' window showing memory use. Demo1 is using 384K, THINK C is using 1000K, and System Software is using 1034K.

The best reference I've found for all of this are the Inside Macintosh manuals, which can still be found on archive.org. The documentation is for Pascal but it's still pretty helpful since the C types and functions are usually similar. I still haven't found a good API reference for THINK C which is a bit frustrating but not a big problem (yet).

Onwards!

jul 7

Today I got all the instructions implemented. Uxn has 32 base instructions, each of which has 8 variants (3 independent mode bit flags). I chose to implement the short mode variants separately (to avoid having to abstract over char and unsigned short) and then had the code I wrote take the keep and return flags into account.

I got some output displaying in the window, but did not succeed in having my test ROM actually run.

Some next steps to think about:

Currently the execution model is to run until BRK. I may need to dive deeper into events and cooperative multi-tasking but that's something for another day.

jul 8

It runs!

Today I had the first successful run of a simple ROM which prints "ABC\n" and exits:

   byte    description               effect
   ----    -----------               ------
    a0     inst: LIT2                load 2 bytes
    41     data: 'A' (0x41)          -
    18     data: console/out port    -
    17     inst: DEO                 print 'A'
    a0     inst: LIT2                load 2 bytes
    42     data: 'B' (0x42)          -
    18     data: console/out port    -
    17     inst: DEO                 print 'B'
    a0     inst: LIT2                load 2 bytes
    43     data: 'C' (0x43)          -
    18     data: console/out port    -
    17     inst: DEO                 print 'C'
    a0     inst: LIT2                load 2 bytes
    0a     data: '\n' (0x0a)         -
    18     data: console/out port    -
    17     inst: DEO                 print '\n'
    a0     inst: LIT2                load 2 bytes
    80     data: 0x80                -
    0f     data: system/exit port    -
    17     inst: DEO                 set exit code 0
    00     inst: BRK                 halt and exit
Screenshot of minivmac running on NetBSD. We see a window.

so we have pretty good evidence that at least these instructions are working properly.

additionally, i started researching the proper way to display and update a lot of text. (previously, i was just splatting characters one after another onto the window without any logic for positioning, wrapping, etc.) it seems like the "right" way to do this is with a TextEdit object (even for read-only text).

i got a basic text area set up with a fixed-width font and figure out how to update it. tomorrow i will try to replace the ad-hoc drawing code and test some more interesting ROMs. i also need to start supporting control characters like tabs and newlines correctly.

Screenshot of minivmac running on NetBSD. We see a window.

jul 9

I did not make much progress today.

My goal was to fully-integrate the new TextEdit widgets but I hit a problem with the different Rect instances and their semantics -- my TextEdit demo from yesterday works fine but when I tried to expand the rectangle to cover the entire window (and remove the previous string-drawing code) it stopped showing anything.

I didn't have enough time to get to the bottom of it, but my guesses so far are:

  1. The coordinates are absolute and I need to be more careful (i.e. starting at 0 is probably wrong).
  2. I'm somehow failing to initialize some state or style information which TEStylNew needs
  3. I'm making a more fundamental misunderstanding

At one point I found some sample text editor code someone else posted on the internet, but I can't seem to find it now. Just part of the "challenge" of Old Computer Challenge I guess! ;)

jul 10

nothing yet

jul 11

nothing yet

Fri Jul 3 12:50:25 PM EDT 2026