Lots of great advice here along the lines of "is it really worth your time and energy", but if you really want to tackle it don't focus on the hardware, focus on the existing (proprietary) software, and wrap it with your own libraries to observe and record inputs and outputs.
lp myfile -> input-wrapper -> proprietary-library -> system-library -> printer
| |
---------floss-library---------
As the existing driver is 32-bit there are two options for debugging on a x86_64 platform:
1. A 32-bit virtual-machine install with the printer connected via USB pass-through so the existing driver correctly operates the printer
2. As someone else said, use qemu-system-i386 with a 32-bit chroot minimal install
Look at the source-code of the binary package containing the driver. Identify the proprietary binary blobs (most likely shared libraries) that are included.
Use tools like objdump to identify the names of external functions they import from system libraries (which they'll call), and the functions they export for other tools to call into.
Create basic wrapper libraries with the same names as the system libraries that export the same function names and signatures as the system library.
Have those functions in your wrapper libraries call the same functions in the system libraries and pass through the arguments untouched BUT also have your wrapper functions log/dump/record the function and arguments being passed.
In the same way create wrapper libraries that have the same name as the proprietary blob libraries and export the same functions. Have these functions call into the proprietary libraries and pass arguments untouched, and log/dump/record in the same way.
Use LD_LIBRARY_PATH to have your wrapper libraries loaded and used by the tool used to print - I'd recommend using something basic like "lp".
Do basic text printing to begin with and observe what the proprietary libraries output to the printer in response.
You'll likely see control codes to configure the printer and then possibly the actual ASCII codes of the text unless the driver converts everything to bitmaps before sending. Even then, by printing one character at a time it is usually possibly to determine the data format of bitmaps and the positioning data.
Compare with existing open-source drivers for similar devices from the same manufacturer since there is likely to be a lot of overlap and shared technology/code.
Once you think you've got a handle on it have your wrapper library that pretends to be the proprietary library bypass the proprietary library and directly format and send the data to the system libraries.
As you figure out more of the data format put that into your replacement FLOSS library until the proprietary is no longer required. At that point you can build the FLOSS library for 64-bit and upstream it for everyone to enjoy.
Or just buy a replacement printer that is well supported already!