Colossal Cave was.. colossal :|

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Colossal Cave was.. colossal :|

Post by stefano »

I UNSUCCESFULLY tried to get a banked version of the 550 pts version of the C version of the Colossal Cave adventure game.
(https://github.com/Quuxplusone/Advent/b ... /ODWY0550/)

The current size of the obj files, trying to squeeze out a little more by involving sdcc (-compiler=sdcc -SO3 --max-allocs-per-node400000):

307146 adv550.o
243341 advdat.o
46842 bank3.o
43553 bank4.o

Ok, I tried it :(
The 4 modules still seem to work on a modern pc when built&linked with gcc, so in case someone is curious I can send/publish the files.
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: Colossal Cave was.. colossal :|

Post by Timmy »

Yes it's colossal, but not *that* colossal :p

There are several ports of Colossal Cave for the Spectrum 48k.

Obviously they were all machine code. Using a modified and smaller version, not the 550pts version, but it is possible.

I think I can get it to 128K but I think I've stopped it halfway. Not in C though, but in my adventure engine written in C, and probably not the 550 version, but one of the PDP versions if I can remember.
Last edited by Timmy on Wed Jul 28, 2021 7:54 pm, edited 1 time in total.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Re: Colossal Cave was.. colossal :|

Post by dom »

stefano wrote: Wed Jul 28, 2021 4:20 pmby involving sdcc (-compiler=sdcc -SO3 --max-allocs-per-node400000):
I admire your patience, how long did take?

Looking at the source it seems to be mostly text which would compress fairly well, but obviously not so well when every bit of text is prefixed by a puts() call.

Using compression, DarwinNE manages to pack a lot into his adventure games: https://github.com/DarwinNE/aws2c
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Re: Colossal Cave was.. colossal :|

Post by stefano »

I think it took 20 minutes, with that max-allocs depth.
Probably the 'colossal' name comes from the original intentions, they had a big computer and wanted to get a big game on it, the memory waste is astonishing, just look at the random messages for the player's death! :D
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: Colossal Cave was.. colossal :|

Post by Timmy »

I thought I'd post my (also unsuccesful) attempt of this back in 2016.

I think I've ported all the texts in 350, but I haven't managed to port all the actions in, so this is an unfinished version.

I wasn't planning to finish it but this is just an example how much smaller it can be.

Before I forget, 128k only.

There is a lot of text in there, check for example the commands 'help', 'instr' and 'info'.
You do not have the required permissions to view the files attached to this post.
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: Colossal Cave was.. colossal :|

Post by Timmy »

I wonder if the 550 (or the 350) version could be made for the Next?

Perhaps it has more memory and can handle the large amount of the text?

(No, I don't know how to make Next games. Can the z88dk compile to the Next?)
Post Reply