Disassembly of Superior Software's Stranded

discuss text & graphic adventures for Acorns. level 9, robico & epic led this field
Post Reply
User avatar
tautology
Posts: 389
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Disassembly of Superior Software's Stranded

Post by tautology » Thu May 09, 2019 9:18 pm

I've put up the (80%) commented disassembly of Superior's Stranded that I've been working on for the past week. It's not quite complete, but I could probably write an interpreter for it with what I know (including graphics).

It's not the best adventure, but the way it does messages, rooms and object logic is interesting.

It's also the first one that I've used Ghidra fully for, which does make it easier than my old tactic of exporting from 6502dis and search and replace.

Anyway disassembly as a .html file and a simple Python script to export the messages/rooms can be found at: https://github.com/tautology0/textadven ... r/Stranded

I will put this up as a blog post at some point.

User avatar
lurkio
Posts: 2147
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Disassembly of Superior Software's Stranded

Post by lurkio » Sat May 11, 2019 6:44 pm

tautology wrote:
Thu May 09, 2019 9:18 pm
I've put up the (80%) commented disassembly of Superior's Stranded that I've been working on for the past week.
:shock: =D> =D>

This is great! Very intriguing.

tautology wrote:
Thu May 09, 2019 9:18 pm
It's not quite complete, but I could probably write an interpreter for it with what I know (including graphics).
An explanation of how it draws graphics would be interesting.

tautology wrote:
Thu May 09, 2019 9:18 pm
It's not the best adventure, but the way it does messages, rooms and object logic is interesting.
Do tell! I probably won't understand it all, but I'll have a good go!

tautology wrote:
Thu May 09, 2019 9:18 pm
It's also the first one that I've used Ghidra fully for, which does make it easier than my old tactic of exporting from 6502dis and search and replace.
Any tips on setting up Ghidra..? Not that I really have the skills to go into a disassembling frenzy, but others might, perhaps.

tautology wrote:
Thu May 09, 2019 9:18 pm
Anyway disassembly as a .html file and a simple Python script to export the messages/rooms can be found at: https://github.com/tautology0/textadven ... r/Stranded
Github doesn't seem to let hosted HTML pages be rendered in-browser, so I've (temporarily?) put the disassembly up on AWS for those interested in having a look:

tautology wrote:
Thu May 09, 2019 9:18 pm
I will put this up as a blog post at some point.
Please do!

=D> =D>
Last edited by lurkio on Sat May 11, 2019 6:45 pm, edited 2 times in total.

User avatar
tautology
Posts: 389
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Re: Disassembly of Superior Software's Stranded

Post by tautology » Sun May 12, 2019 9:54 pm

Unfortunately I've got a couple of weeks of busyness so won't have time to do much more on it, but to answer some questions:

Graphics are plotted with OSWRCH statements, using VDU 25. They stored in a compressed fashion as described below. The graphics window is set to be &80 - &480, &1c0 -&3c0; this makes it possible to stored X and Y in a byte each. Each instruction is:
byte mode: the mode of command ( 0 = DRAW, 2 = MOVE, 5 = FILL, 7 = TEXT). The first two bits are the background colour
byte X: X co-ord << 2
byte Y: Y co-ord << 2

There are extra bits for FILL and TEXT which I didn't quite work out, but will be revisiting.

The strangeness is that way that rooms, messages and commands are implemented. Normally rooms and messages are separate data structures. In this there's a base of messages with a flag to say that this message is a room. Each room has a set of simplistic byte code to tell it what to do with a certain command. For example:

Code: Select all

01 01       NORTH: GO(1)
C1 07 04    If verb 07 and have parachute in inventory goto 04
81 07 07    If verb 07 and not have parachute in inventory goto 07
Where the destination may have its own code. It's very strange and took me a while to work out.

I've got blog post half written, but had to put it on hold whilst I did a few work and home life things.

User avatar
tautology
Posts: 389
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Re: Disassembly of Superior Software's Stranded

Post by tautology » Thu Jun 06, 2019 10:39 pm

I've updated my decode script (in python) and added a JSON version of the decoded data; this shows the weird way it does rooms and messages.

For example:

Code: Select all

		{
			"location": 21,
			"message": "17 (You are in the main control room. There is a slot for a fuel capsule and a lever.)",
			"image": 8,
			"flags": 3,
			"actions": ["IF VERB=NORTH GOTO 18", "IF VERB=PULL LEVE AND INROOM(FUEL) GOTO 23", "IF VERB=PULL LEVE AND INROOM(FUEL) GOTO 22"]
		},
		{
			"location": 22,
			"message": "18 (Nothing happens. You notice that a fuel gauge shows zero.)",
			"image": 0,
			"flags": 0,
			"actions": ["GOTO 21"]
		},

sirbod
Posts: 995
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Disassembly of Superior Software's Stranded

Post by sirbod » Fri Jun 14, 2019 3:01 pm

tautology wrote:
Thu May 09, 2019 9:18 pm
It's also the first one that I've used Ghidra fully for, which does make it easier than my old tactic of exporting from 6502dis and search and replace.
I used Ghidra to strip off the manual based protection from the Arc version of Simon the Sorcerer a few months back. I'd previously spent many days trying unsuccessfully to remove it via assembler dumps / code tracing, but it only took a few hours with Ghidra - a very useful piece of software, I especially like the ability to name functions and the way it previews sub functions if you hover over the branch.

User avatar
tautology
Posts: 389
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Re: Disassembly of Superior Software's Stranded

Post by tautology » Mon Jun 17, 2019 10:21 pm

My first attempt to render the graphics semi-natively. I translated my dumped graphics instructions to a simple basic program and ran it on BeebEm emulating a Master (as flood fill is built in).

It's not quite perfect - something's a wee bit off with the colours, I suspect it's because I'm using the Master's built in flood fill rather than doing it exactly how the program is doing it.

The "characters" are not quite defined yet (the sun in the above image), not because I don't know how to do it, I just haven't bothered to set it up yet...
screen.png

User avatar
b_b_c_m_i_c_r_o_2
Posts: 251
Joined: Sun Jun 25, 2006 10:15 pm
Contact:

Re: Disassembly of Superior Software's Stranded

Post by b_b_c_m_i_c_r_o_2 » Sun Jul 28, 2019 3:43 pm

This piqued my curiosity. thanks :)

User avatar
lurkio
Posts: 2147
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Disassembly of Superior Software's Stranded

Post by lurkio » Mon Jul 29, 2019 2:05 pm

tautology wrote:
Mon Jun 17, 2019 10:21 pm
My first attempt to render the graphics semi-natively.
Nice work!

=D> =D>

User avatar
tautology
Posts: 389
Joined: Wed Sep 01, 2010 2:26 pm
Contact:

Re: Disassembly of Superior Software's Stranded

Post by tautology » Tue Jul 30, 2019 7:37 pm

I've pretty much completed the disassembly, I just need to update the github and finish the modern version of it.

The game is really simple, except for the very basic bytecode scheme it uses.

Post Reply