Budge 3D Module Disassembly

In 1980, California Pacific Computer published Bill Budge's 3-D Graphics System and Game Tool. The program let you enter 3D shapes as a collection of points and edges (no faces), then generated a "module" that provided a graphics library along with the encoded shape data.

The graphics library allowed you to scale, rotate, position, and then draw 3D shapes on the hi-res screen. Support for page-flipping was automatic. The transformations used clever table lookups to avoid multiplication, and only provided orthographic projection to avoid having to do the perspective divide.

The module can be configured to work with arrays in Applesoft BASIC, Integer BASIC, or directly from assembly language. Rendering can be done with simple draw/erase or with "XOR" mode, which flips bits (so if you draw the same line twice, it disappears). You can also add a hi-res character generator (HRCG).

I created a module with a couple of shapes, configured for Applesoft interface, XOR drawing, and HRCG enabled. I disassembled it with 6502bench SourceGen.

Since not everyone has a Windows PC, I've used SourceGen's "export" feature to generate HTML output. This is not expected to assemble. (If you want sources you can assemble, SourceGen can generate code for 64tass, ACME, cc65, and Merlin 32.) I formatted this one with Merlin pseudo-ops and local variables, and enabled cycle counts.

I have a bit of history with this one. Back in September 2015, while working on fdraw, I disassembled a few programs to see how their line-drawing code compared to mine. I created a test module with the tool, and generated an assembly listing using CiderPress, but quickly got frustrated. Even though there's not a lot of code, much of it is self-modifying and makes extensive use of tables, and jumping around in the file to keep track of everything was annoying.

Three years later, when I was finishing up the first version of SourceGen, I created a project for the test module. This went much better, but I ran into a different problem: zero-page locations are used for different purposes in different parts of the code. I couldn't give them one global name and still make sense of what I was looking at.

Another year later, in September 2019, SourceGen v1.3 has local variable tables. The disassembly finally looks the way it should.

Copyright 2019 by Andy McFadden

Back to list of disassembly projects