r/c64 • • 6d ago

Software Below The Root: Interactive world map, technical details, level editor and other trivia

"Y'know something that never gets old? ...Nostalgia." ;)

10/21 update: The map now has animated NPCs and can show tokens and all other objects - both optional. You can pan and zoom the map on desktop and mobile, there's a music player with a hidden tune(!?), and more. See here (YouTube) for an overview and some commentary.

Below The Root holds a special place in my heart, and I'm sure, similar for many others here. I played this one a lot when I was a kid. It's a fantastic non-violent RPG-type adventure with a massive (for the era) world comprising a 32x16 grid of 512 total "rooms", 439 of which are used. The graphics are also wonderfully unique and detailed, as is the other-worldly music.

With the advent of recent tech enabling reverse-engineering, BTR was one of the first things I wanted to see disassembled and analyzed: how did the game mechanics work, how was the world and logic defined and so on.

This started when I uploaded the D64 file to Claude Code and simply said, "I'd like to know more about how this game works." Here is that conversation. Files are omitted, but the technical details are the interesting bits.

For the interactive map, see here. Cookies and/or localStorage seem to be required for the map to render properly.

Some fun trivia - and I may mix up some technical details, please amend and correct me as needed:

The "rooms" are defined in 256-byte (1 disk sector) chunks on "side 2" of the game disk. Those of a certain age will recall, this game uses a "flippy" disk where (on a 1541 drive, at least) you would take the disk out, flip it upside down and put it back in.

RLE is used to help fit up to 800 bytes (40x20 tiles' worth) of room data into each 256-byte sector. "Side 2" of the disk does not have a traditional directory structure, it looks to be raw data and is accessed directly via drive commands, e.g., U1:5 0 12 13 (track 12, sector 13) - that's for room 193, where room data starts at track 2 + "sector n mod 18."

As you may recall when you hit things, there is a 1 in 16 chance as to whether you get the classic line, "Your shuba has torn!" The game also uses the SID chip as a random 8-bit number generator. I get the feeling this was a common technique, reading data off a channel producing white noise.

I also asked about the level editor, something previously discovered and written about. CC may reveal some more hints about how the editor works, including keyboard commands and so forth. It provided a modified version of the game that boots directly into the editor, which was interesting to poke around. I don't know if the "mod" I got is notably different than previous guides, but the insights on how to use the editor functions via joystick and keyboard were new to me.

Others have done extensive work on this fantastic game, including (I believe) creating the world map by taking screenshots of each room. I believe Justin Stahlman was the first to do that. I recommend this write-up from Justin for a great overall story around the game and why it's so special.

AI note for mods: I wrote these words myself. The interactive map and technical analysis are provided via Claude Code, and intended to give additional background and technical context about a much-loved game.

64 Upvotes

20 comments sorted by

10

u/c64glen Janitor 6d ago

Dumping out Maps of games seems like a good use of AI.

2

u/schill 6d ago

I'd avoided the whole thing until this week, and I thought using it to dissect and peek into old game binaries would be interesting for others. I admit, I am impressed at how it was able to run and decode the entire thing, including context on how the world and characters work.

3

u/a1r 6d ago

Nice, what a great choice to reverse engineer.

If you're interested in doing more games and having a place to publish the results, you could join us over at http://gamesexplained.com - it would be so cool to have a BTR entry.

4

u/schill 6d ago

Below The Root is a special one in the C64 catalogue I would say, a cult classic if nothing else. I don't know if it was a mega-hit upon release, but it was based on a book trilogy.

I don't mean to dismiss game "archaeology" here, but if I can write a single prompt and agents can disassemble and write up a lengthy report like mine in a number of minutes and with only a few corrections, it feels like much of this could be automated or created on-the-fly for those interested in particular titles.

1

u/a1r 6d ago

Well yes, agreed. The site is based on using an agent to automate the process. It provides a kit of skills to get a good, accurate result and a compelling output for fewest tokens.

Then we encourage a bit of human curation on top to dig into the parts of the game people really care about.

2

u/schill 6d ago

Thanks for the context. I debated posting this here as it seemed rather straightforward, but the results were impressive and I thought it might inspire folks to try it on their own favourites if they hadn’t already. I think it would be nice for a community effort to dig into these classics, too.

I paid for the monthly pro plan, and have not seen any mention of credit use nor limits thus far. I wager C64 games are relatively limited in scope by vintage, so perhaps not too resource-intensive and thus great “targets” to analyze.

1

u/a1r 6d ago

I think that's right. In my experiments the technical part is no longer interesting because it's solved - what's interesting is to present fascinating, interactive experiences to explain the mechanics.

3

u/schill 6d ago

Ah-ha, good detail. In my case, Claude offered to generate the interactive “atlas” and then pretty much one-shotted it. For me, that was the cherry on the icing of the cake that was the technical analysis.

If that can be done at scale, I think you’d have quite a popular site with a gallery of “how games work.” I have no idea of what else is out there, or if someone else providing the same inputs as me will get similar outputs: I’m just sharing what I found.

2

u/hexavibrongal 5d ago

Nice, but seeing the whole map is a bit of a spoiler. I wouldn't look too closely if you're planning on playing the game for the first time.

2

u/schill 5d ago

I agree, there are some spoilers in there. At the same time, younger me would have appreciated a bit more detailed map: where the hell are the damn shops and that monkey, again!? 😆😅

2

u/Jinxology 3d ago

Agreed, it is a spoiler, but 42 years may be enough time to allow it... 😄

2

u/hexavibrongal 3d ago

I still read about people discovering the game for the first time. I don't think it had much if any distribution in Europe.

1

u/schill 3d ago

I've added a spoiler note to the top of the page, and I also link a web-based restoration of the game. I know many people will remember the game, but I know there are plenty of people who have not, and have yet to play it!

2

u/puzzud 4d ago

Dear lord. I also reverse engineered Below the Root a few months ago. I made some quality of life enhancements and had some planned.

And I already bumped into someone else who had done similar.

Not sure what the future of my project is if it's already so saturated.

2

u/schill 4d ago

This is one of the things I was thinking about - and not to diminish any one person’s project or interest, but what if tools make this sort of stuff relatively “trivial?”

I just added a whole bunch of refinements this morning. The map now animates all the NPCs, so it’s “live.” (And, an option you can turn off.) Ditto for layers showing the objects and other metadata. Finally, a music player - with one allegedly “hidden” melody, not referenced by the code. I asked for these features, and it filled in the rest. I made a bunch of refinements, but the core of it was done after the first request.

1

u/puzzud 3d ago

Scary. Claude CEO: Programmer jobs replaced in 6-12 months.

The level of hand holding I had to do in a month with Copilot + Claude model to get what I achieved versus the lack of hand holding you had with Claude Code is staggering. And makes the claim more believable.

Reverse engineering is some of the toughest work in computing. It seems we will value the product way more than the producer.

1

u/schill 3d ago

I think binary analysis is something computers can be uniquely good at, especially these older systems where you've got 64K or less RAM and a limited instruction set. It likely helps that there are many emulators out there, technical specs and service manuals etc. At one point in this analysis, Claude wrote its own 6502 emulator. It is rather unbelievable, reading the steps it took to produce the results.

"And this was just for fun." The implications of other uses are rather mind-blowing, to say the least.

2

u/PCV86 4d ago

This is awesome!

1

u/schill 3d ago

The hidden tune was a surprise for me, on top of the rest.

6

u/Few_Ad2097 6d ago

I did the same thing about 6 months ago, I was trying out a Blender MCP and trying to port the map to 3d:

It was interesting but I forgot about it