First real release of the tape disassembler

69 views
Skip to first unread message

Bill E

unread,
Sep 23, 2025, 10:54:20 AM9/23/25
to [PiDP-1]
This is a really useful tool for figuring out random program tapes that don't have source. It's a two-pass disassembler that can produce either an annotated listing or produce real MACRO code that can be edited and assembled. It has been tested with several tapes doing full round trip (disassemble tape, use macro1 to assemble, run the binary) testing.
This isn't to say there are no bugs, so please report any issues. The binary in the tar is for the rPi. If you want an x86, just compile one. See the README.md for important info!
It currently only recognizes the basic set of IOTs, but any unknown IOT will be properly emitted as 'IOT!xxxxx' so MACRO will recognize it. I'll add more on request, just tell me the IOT instruction format and the name to use for it, e.g., 'iot nn74 is cfd', or add it yourself to the disassembler and update me.
Enjoy, Bill

PS - Oscar, feel free to add to the repo and distribution.
dissasembler.tar.gz

Oscar Vermeulen

unread,
Sep 23, 2025, 12:47:22 PM9/23/25
to [PiDP-1]
Bill,

Thank you! I added it to the pidp1 package. 

But I think I have a problem (problem being either me or a bug):

/opt/pidp1/tapes$ disassemble_tape -md circle.rim
Starting pass one
State is START
New state is RIM
RIM start
000101 marked as used
000102 marked as used
000103 marked as used
000104 marked as used
000105 marked as used
000106 marked as used
000107 marked as used
000110 marked as used
000111 marked as used
000112 marked as used
000113 marked as used
000114 marked as used
New state is LOOKING
RIM end, start addr is 0100
000000 marked as used
Created by disasemble_tape -m circle.rim
Pass two started
     start 0

What am I doing wrong?
BTW - if you want, put the disassembler in its own github and you do not need me to put updates in the pidp1 package manually. Although I am more than happy to do that!

Kind regards,

Oscar.

Bill E

unread,
Sep 23, 2025, 4:49:19 PM9/23/25
to [PiDP-1]
In macro mode, any RIM loader is skipped because it's usually the BIN loader and macro1 automatically adds it. However, it seems that occasionally programs are just pure RIM, like circle. In this case, tell the disassembler to keep the RIM part, disassemble_tape -mk circle.rim, where 'k' keeps the RIM, i.e. emits its code which is the program. Oh, and as you can see, the -d flag is useful only to me.

Bill

Oscar Vermeulen

unread,
Sep 24, 2025, 8:32:14 AM9/24/25
to [PiDP-1]
Bill,

Get it! I should get back to my tape visualizer program and make it mark BIN loader code to separate it out from actual program code. Looking at PDP-1 tapes is quite confusing to me still.

Kind regards,

Oscar.

Oscar Vermeulen

unread,
Sep 24, 2025, 8:46:40 AM9/24/25
to [PiDP-1]
Next question, I wanted to disassemble the Kalah program - it initiates the board game display onscreen, but then something IO related gets stuck. Both in simh and the pdp1 simulator. So the -i option was tempting.

But the disassembler goes through the loader at 7700 alright, then reports:

007775 marked as used
007776 marked as used
007777 marked as used
New state is LOOKING
RIM end, start addr is 7755
BIN start, addr 0671
Malformed BIN start, no 2nd DIO  at tape position 650

This is with the attached tape, and "disassemble_tape -mdik kalah.bin". 
I know the tape loads alright on the PiDP-1, insofar as it gets to drawing an empty game board on the Type 30. 
Anything I'm doing wrong with the disassembler?

Kind regards,

Oscar.

DEC.pdp_1.1961.102645673.pdf
kalah_lab.txt
kalah.bin

Bill E

unread,
Sep 24, 2025, 11:00:08 AM9/24/25
to [PiDP-1]
Disassembler now in github with some fixes to properly handle what look like instructions but are actually data.
Oscar, this should hopefully fix your issue, it fixed some of mine.
Feel free to add it to your repo if you want.
Github:


Bill

Oscar Vermeulen

unread,
Sep 24, 2025, 12:25:35 PM9/24/25
to [PiDP-1]
Great - I have included your disassembler as a submodule, so it gets installed with the pidp-1, thank you!

I still get the error with the kalah.bin (I added it as an attachment to my previous post if you want to look into it):

007776 marked as used
007777 marked as used
New state is LOOKING
RIM end, start addr is 7755
BIN start, addr 0671
Malformed BIN start, no 2nd DIO  at tape position 650

Kind regards,

Oscar.

Bill E

unread,
Sep 24, 2025, 3:07:59 PM9/24/25
to [PiDP-1]

I debugged the kalah.bin issue and the problem is that this program uses a totally non-standard loader.
The beginning is RIM format, but what it loads isn't the usual BIN loader.
No idea why it's different, but I can't deduce random loader formats.
If it turns out that this loader is used frequently, then I can try to figure it out. Otherwise, sorry.

Bill

Bill E

unread,
Sep 24, 2025, 5:35:56 PM9/24/25
to [PiDP-1]

A new feature has been added, on github now. It now allows 'raw' mode to allow disassembly of tapes that don't have standard BIN blocks, such as kahla.bin. The entire tape is treated as instructions and output, but without knowing what addresses the code resides in. This is primarily for researching such programs, but with some effort it might be possible to add location directives for macro1. Oscar, if you're inclined to spend the time, you can use this to decipher the kahla.bin stuff.
Bill
Reply all
Reply to author
Forward
0 new messages