# Seekers of Wump

**URL:** <http://selectbutton.net/t/seekers-of-wump/14313>\
**Category:** King of Posters\
**Created:** [November 18, 2023, 11:54am UTC](http://selectbutton.net/t/seekers-of-wump/14313 "2023-11-18T11:54:49Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![artee](http://selectbutton.net/user_avatar/selectbutton.net/artee/32/284596_2.png) [@artee](http://selectbutton.net/u/artee)\
**Post date:** [November 20, 2023, 3:50am UTC](http://selectbutton.net/t/seekers-of-wump/14313/13 "2023-11-20T03:50:10Z")

</div>

> [@spinnylights](#):
>
> Wow, does the BASIC really carry over that easily? The original _Wumpus_ listing does read in a kind of “asm-like” way…with its `IF`/`ELSE`/`FOR`/`GOTO`/`RETURN` for control flow and blocks of static data interleaved with code and so on…but I imagine that how easy it would ultimately be would depend a lot on the programming environment. Naturally the BASIC elides the details of memory management—in some ways I feel like it has the atmosphere of a high-level interpreted language too. (Very odd in a way by modern standards. 😛 )

BASIC is a relatively straightforward imperative language, so adapting the control flow is relatively simple. Constant `data` arrays can just be baked into the ROM with `db` statements. `GOTO` is just an unconditional jump. `GOSUB/RETURN` are just normal instructions for almost any processor.\* And `IF/ELSE/FOR` are just different flavors of a conditional branch. Reorganizing the code is largely unnecessary, except for legibility.

Of course, how many assembly instructions correlate to one line of BASIC varies wildly. Something like `690 o = 1` is still a one-liner in F8 assembly, while something like `610 on j-1 goto 615,625,625,635,635` requires baking a jump table into the rom, multiple instructions to load the address from it, and then doing the jump, which is probably 10 lines of assembly, at least. (I can’t remember what line tripped me up, but it might (maybe) have been that one, actually.)

\* On the F8, they are actually much less normal than you’d want, but for simple programs it’s not _too_ much of an issue.

> [@spinnylights](#):
>
> What are your ideas? Is it okay if I ask? 😅 I’m really curious to know what other people speculate about or whatnot when they think about this game.

The Channel F has a rudimentary, low-resolution/low-bitdepth framebuffer (write-only). One interesting thing about it is that one of the offscreen columns is used to provide _row attributes_: you can either have a row be in color (with a choice of three different backdrop colors), or have a row be in black and white.

My main thought with this is that you could force the rows the player is not on to be monochrome, creating the impression of darkness. Perhaps some trickery could be done with the loss of color information as well — maybe the map could come with some hazards pre-marked (e.g. pits), but also have some red herrings (e.g. harmless boulders). The player could place markers on the map at suspicious places. Each of the obstacles would look identical without color, so part of the cognitive load would be keeping track of what is what (and perhaps also dealing with the bat switching things on harder difficulties).

Anyhow, thinking about this made me feel like whipping up a simple mockup:

![image](https://dlcn7yodlhcnn.cloudfront.net/original/4X/c/0/8/c08df84e6dd7c9967e8761d9bbb39cfc34501d64.png)

With the system using a frame-buffer, it would also be quite trivial to have the maze be revealed in a fog-of-war style like an RTS, rather than having the whole maze revealed from the start, like this perhaps:

![image](https://dlcn7yodlhcnn.cloudfront.net/original/4X/7/b/a/7ba67ccb20ffada8b3f1055dc57065853eb037fc.png)

(Another completely different idea would be to have it be largely faithful to the original game, but presented as a rudimentary first-person dungeon crawler, but that seems like an idea that’s probably been done before already.)

> [@spinnylights](#):
>
> Sure it is!! 🤠 What was your print routine like? Can I ask? 😛 I know you don’t have the source anymore but do you remember it in broad strokes at least? How did you encode the text?

You could simply declare ASCII text strings in the assembly like `dc "TEXT"`, though one caveat is that the assembler did not automatically null-terminate the strings, so if you wanted to encode your strings that way you’d have to type it like `dc "TEXT", 0`. (I guess you could also manually encode your strings like Pascal strings (length then text, with no terminator), but that would use up an extra register for counting.)

The string function wasn’t too weird — load a letter, bail if we ran into a `\0`, adjust the ASCII code to match the internal table (subtract by some constant), call the `blit` function, increment the x position by 6, and then repeat. IIRC, the blit function was interesting because it modified the x and y positions while drawing, so it had to reset those back to their original position at the end of each call. Oh, and since the blit function I used was 1 bit-per-pixel, it took an argument to specify the FG/BG colors, so by extension the print string function took the same arguments as well.

The graphics themselves were 1 bit-per-pixel bitmaps, with the rows bitpacked together. A weird optimization I had considered was to have the letters be 5x5 pixels (25 bits), but pack them into 3 bytes (instead of 4) by having the bottom-right pixel of each character take from the top-left pixel of the next. I’m pretty sure I labbed it out as being possible at one point, but it looks like I was using a 5x6 pixel font, so I don’t think I was that desperate for space.

> [@spinnylights](#):
>
> With only 4K available (is that right?) I imagine that would be a serious consideration! It must be interesting to develop for a console like that.

Most commercial Channel F games were only 2K, though back in the day that was fairly common. Most early Atari 2600 games were also 2K, with only later releases upgrading to 4K and beyond. There are a handful of Channel F games that are 3K or 4K or even 6K, but ultimately the relative lack of larger titles of more expert craftsmanship was due to the system’s failure in the marketplace (I rambled a bit about this point [here](https://selectbutton.net/t/tuning-in-to-channel-f/9827)).

(Speaking of the 2600, it’s funny that the 2600 can only have 4 KB carts before needing to resort to bankswitching, while the Channel F has a full 64 KB address space that it could work with, in theory.)

The real memory limitation with the Channel F is actually the RAM — it has _none_. Instead, it has a scratchpad of 64 registers (1 byte each) inside the processor itself. A register known as the ISAR (indirect scratchpad access register) allows indirection to be applied to the scratchpad (though it has some odd quirks). Some carts have a healthy amount of built-in RAM, though the instructions and semantics for reading from the scratchpad and actual memory are entirely different things.

> [@spinnylights](#):
>
> Yes truly, for instance I wonder what it smells like 😳

Slightly musty and sweaty, with a strong undercurrent of pleasant wet earth, and an inexplicable hint of citrus.

Random thought: I think it’s fairly likely that the Grue in Zork and the bat in Atari’s Adventure both stem from this game.

---

_[View the full topic](http://selectbutton.net/t/seekers-of-wump/14313)._
