Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot restore game: F_READ unimplemented #22

Closed
skx opened this issue Apr 15, 2024 · 0 comments · Fixed by #24
Closed

Cannot restore game: F_READ unimplemented #22

skx opened this issue Apr 15, 2024 · 0 comments · Fixed by #24
Assignees
Labels
application This shows up in a specific application

Comments

@skx
Copy link
Owner

skx commented Apr 15, 2024

To load ZORK, and other z-machine games, I had to implement the random-read functionality.

It seems that when save-states are used the sequential-read operations are required. To save a game we need to implement F_WRITE (logged in #21), and to restore a game we need F_READ which this issue covers.

Assuming we can successfully write a saved game we current see a failure attempting to load it:

>restore
Load SAVE disk then enter file name.
(default file name is ZORK1.SAV).
Type <ENTER> to continue  > FOO

{"time":"2024-04-15T22:15:23.074815567+03:00","level":"ERROR","msg":"Unimplemented syscall","syscall":20,"syscallHex":"0x14"}
Error running ZORK1.COM: UNIMPLEMENTED

@skx skx added the application This shows up in a specific application label Apr 15, 2024
@skx skx self-assigned this Apr 15, 2024
skx added a commit that referenced this issue Apr 16, 2024
This pull-request implements (sequential) file writing operations,
which allow Zork to save its game-state.  I've not yet implemented
F-READ (which is tracked in #22) but confirmed the save loads in
another emulator.

This closes #21:

```
>inventory
You are carrying:
  A glass bottle
  The glass bottle contains:
    A quantity of water
  A leaflet

>look
Kitchen
You are in the kitchen of the white house. A table seems to
have been used recently for the preparation of food. A passage
leads to the west and a dark staircase can be seen leading
upward. A dark chimney leads down and to the east is a small
window which is open.
On the table is an elongated brown sack, smelling of hot
peppers.

>save
Load SAVE disk then enter file name.
(default file name is ZORK1.SAV).
Type <ENTER> to continue  > FOO

Load Game Disk if it was removed.
Type <ENTER> to continue >

Ok.

>quit
Your score is 10 (total of 350 points), in 18 moves.
This gives you the rank of Beginner.
Do you wish to leave the game? (Y is affirmative): >y
```
@skx skx mentioned this issue Apr 16, 2024
@skx skx closed this as completed in #24 Apr 16, 2024
@skx skx closed this as completed in 6cfbee2 Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application This shows up in a specific application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant