Jump to content
IGNORED

New Infocom style adventure - The Locked Room


Shift838

Recommended Posts

2 minutes ago, jindroush said:

Now what do you mean by 'swapping'?

Flipping the disk over/inserting Disk 2/whatever.


For that matter, my own copy of Zork I from BITD, that I bought new in 1985 or so, is singe-sided, too, and runs on a stock 48K 800.

  • Like 1
Link to comment
Share on other sites

1 minute ago, DrVenkman said:

my own copy of Zork I from BITD, that I bought new in 1985 or so, is singe-sided

Yep, when I take single sided 'rel 26' Zork ATR, it's 0x10-1F8F interpreter. Just after it is a story file:
Z-code version:           3
Interpreter flags:        Display score/moves
Release number:           26
Size of resident memory:  48eb
Start PC:                 49d9
Dictionary address:       37f0
Object table address:     02ae
Global variables address: 2228
Size of dynamic memory:   2e26
Game flags:               None
Serial number:            820803
Abbreviations address:    01ee
File size:                128bc
Checksum:                 05c5

From this is obvious that 0x1F80 + 0x128Bc = 0x1483C -> dec 84 028 bytes, which fits on one SD side.
I believe that any Z3 game can be modified to be ran from single sided ATR / other media, there's no magic in this, double sided just split story file between resident part, which is on first disk and high memory, which is loaded on-needed-basis from second disk.
To cut this short - any Z3 file from any source could be used as 'single sided'. The maximum length of Z3 story is 128K.

Link to comment
Share on other sites

27 minutes ago, drpeter said:

I was just wondering if someone already had the build tools to hand.

I have something (being fossil, just a batch file calling masm, windows build of Inform and a short Perl script), which builds me a final game ATR from sources. It's not production quality though, so if you have any game in mind, just drop me .z3 story file and I'll send you ATR. I did that for my own use when I tried to prove I can make Czech (we have all those goddamned accented characters, flexing and whatnot not found in English) Inform game. Which I, mildly-successfully, have proven.

  • Like 1
Link to comment
Share on other sites

8 hours ago, jindroush said:

Yep, when I take single sided 'rel 26' Zork ATR, it's 0x10-1F8F interpreter. Just after it is a story file:
Z-code version:           3
Interpreter flags:        Display score/moves
Release number:           26
Size of resident memory:  48eb
Start PC:                 49d9
Dictionary address:       37f0
Object table address:     02ae
Global variables address: 2228
Size of dynamic memory:   2e26
Game flags:               None
Serial number:            820803
Abbreviations address:    01ee
File size:                128bc
Checksum:                 05c5

From this is obvious that 0x1F80 + 0x128Bc = 0x1483C -> dec 84 028 bytes, which fits on one SD side.
I believe that any Z3 game can be modified to be ran from single sided ATR / other media, there's no magic in this, double sided just split story file between resident part, which is on first disk and high memory, which is loaded on-needed-basis from second disk.
To cut this short - any Z3 file from any source could be used as 'single sided'. The maximum length of Z3 story is 128K.

do you have a script or program that takes the Z3 file and makes it into a bootable ATR?

 

 

Link to comment
Share on other sites

11 minutes ago, jindroush said:

Yep, very ugly Perl script currently making only SD ATRs.

are you willing to share it with some instructions, i would like to see if my z3 file i have that is not booting will make a bootable ATR

Link to comment
Share on other sites

4 minutes ago, Shift838 said:

are you willing to share it with some instructions, i would like to see if my z3 file i have that is not booting will make a bootable ATR

As I wrote here:

it works without basic - I used Z3 you shared on ifdb.org
I'll check out tomorrow (midnight here) if it's possible to de-uglize it a bit ;)

Edited by jindroush
Link to comment
Share on other sites

9 hours ago, jindroush said:

Yep. But there is a computation of cache size. Cached sector numbers are stored in $600-$67F (low) and $680-$6FF (high). $80 is maximum number, but this is computed as a number of pages between end of resident part and memtop page. And that could overflow for short stories, as there is no test.

This is the exact problem why the Locked Room riddle does not work with 48 KB (by 2 pages). If you boot it with only 32 KB of RAM, it works and by inserting BASIC, the remaining RAM is only 40 KB. Since DOSINI is set to the correct start address, entering DOS will then run the game.

 

I'll try to create a hack which modifies the cache allocation in a way that it never tries to allocate more than $80 buffers.

Stay tuned.

  • Like 1
Link to comment
Share on other sites

1 minute ago, DjayBee said:

I'll try to create a hack which modifies the cache allocation in a way that it never tries to allocate more than $80 buffers.

I've got this done already, as I have z3 interpreter in .asm. When I was trying if my czech localization works, it wouldn't - so I had to modify the interpreter a bit.

        LDA    byte_BC
        CLC
        ADC    zvar_game_file_hi
        STA    zvar_b9
        JSR    get_max_free_mempage
        SEC
        SBC    zvar_b9
        BCC    loc_915

.ifdef OVERFLOW_PROTECT
        ;if in this place, number of pages available in RAM is greater than $80
        ;whole disk caching would go bonkers (as there are allocated only 4x$80 bytes for two word storage)
        ;this is computed as space between last sector of resident memory and MEMTOP
        CMP    #$80
        BEQ    not_too_much
        BCC    not_too_much
        LDA    #$80
not_too_much:
        
.endif

 

  • Like 1
Link to comment
Share on other sites

Yes, this is what I also want to do but from my understanding of the code it must be set to #$7F because the original result (bcc not_too_much) is incremented by 1 to get the number of cache buffers. 

 

Furthermore I wanted to hack the OP's original interpreter. 

Link to comment
Share on other sites

This image should work on any RAM configuration starting from 16 KB:

 

locked_atari8bit[f].atr

 

To patch the interpreter itself permanently do the following replacements with a hex editor like HxD:

 

Right at the beginning (in the ATR from offset $0028)

original: A9 08 85 0B 18 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

patch:    A9 08 85 0B A2 05 BD 29 07 9D 30 01 CA 10 F7 18 60 C8 84 BD 4C 9A 09

 

and a little farther in the program (ATR offset $0217)

original: A8 C8 84 BD A8 84 BF A9 FF 91 C4 4C 9A 09

patch:    10 02 A9 7F A8 84 BF A9 FF 91 C4 4C 30 01

 

 

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

Regarding the build process, Z3 games for 8bit Atari could be created with this toolchain
https://github.com/ByteProject/Puddle-BuildTools

It looks huge and complicated, but should be able to auto-create images needed, using original Infocom interpreters, including large games with double-disk targets.

On the side note:
I had a bit of time to check the releases I have, so now I have extracted 3 different single-sided interpreters and 6 double disk interpreters. Most of the double disk interpreters have built in version information, which you can get by running $verify command from game.
Few games got more than one release from Infocom. I was able to find these:
1 version: Ballyhoo, Cutthroats, Sorcerer, Spellbreaker, Fooblitzky, Hollywood Hijinx, Infidel, Leather Goddesses, Moonmist, Planetfall, Plundered Hearts, Seastalker, Stationfall, Suspect, Lurking Horror, Witness (16 games)
2 versions: Enchanter, Starcross, Wishbringer (3 games)
3 versions: Deadline, Suspended, HHtG, Zork III (4 games)
4 versions: Zork II (1 game)
5 versions: Zork I (1 game)
So totally 25 titles in 43 releases. All of these are Z3.
The latest releases are Lurking Horror (870506) and Plundered Hearts (870730). Both use double disk interpreter G.

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...