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

Heavy dynamic memory requirement #2

Open
jpcompton opened this issue Sep 11, 2020 · 6 comments
Open

Heavy dynamic memory requirement #2

jpcompton opened this issue Sep 11, 2020 · 6 comments

Comments

@jpcompton
Copy link

Not a true bug, but maybe an unintended consequence: the way you've implemented this particular game, there's a much heavier dynamic memory requirement than your other gamebooks, so it's not possible to convert it to a playable C64 title with Ozmoo. (Your previous ZIL implementations have all worked well in that interpreter.)

Reading file wartorn.z5...
Dynmem blocks: 87
$zmachine_memory_size = 207656
$story_size = 207872
acme-crossass-code-0-r273-trunk/acme --setpc 2049 -DCACHE_PAGES=4 -DSTACK_PAGES=4 -DZ5=1 -DCONF_TRK=1 --cpu 6510 --format cbm -DBGCOL=8 -DFGCOL=4 -DBORDERCOL=0 -DBGCOLDM=2 -DFGCOLDM=5 -DBORDERCOLDM=0 -DSMALLBLOCK=1 -DVMEM=1 -DALLRAM=1 -l "ozmoo/temp/acme_labels.txt" --outfile "ozmoo/temp/ozmoo" ozmoo.asm
Interpreter size: 11215 bytes.
ERROR: Dynamic memory is too big (44544 bytes), would pass $D000. Maximum dynmem size is 37888 bytes.
@jpcompton
Copy link
Author

jpcompton commented Sep 13, 2020

So, I did a brute-force find-and-replace turning all 1200+ <LTABLEs into <PLTABLEs.

The good news is that the resulting .z5 binary (attached below) works for quite a while in Ozmoo! (up to a point, anyway, I did eventually get an error message, attached)

The bad news is that the resulting .z5 binary crashes after a few [more]s in WIndows Frotz with a "Store out of dynamic memory" message!

wartorn_pltable.zip

image

@jpcompton
Copy link
Author

Not sure if you still look at the ZIL Discord, but Jesse just dropped some knowledge and recommendations (including highlighting some other issues about a combat bug): https://discord.com/channels/602406342363316226/602418155641503744/755118938387382353

@daelsepara
Copy link
Owner

Thanks. Will take a look.

@daelsepara
Copy link
Owner

daelsepara commented Sep 16, 2020

I did the LTABLE -> PLTABLE conversions on some LTABLEs and indeed, it does the trick. Also tested it on oozmo. I also got the "Store out of dynamic memory" at one point and it seems to happen on story sections where some PLTABLEs are being modified or written to. I reverted these tables back to LTABLE. I also fixed story sections that had incorrect choices (in the attached image, the story section was using the wrong menu) or types or requirements.

Also made fixes to the COMBAT-MONSTER routine (changing PUTs to PUTPs).

I put in another release with these fixes. I'm keeping this issue open for now as I still need to test this on Windows. Thanks again.

@fredrikr
Copy link

I (barely) managed to build this with Ozmoo for C64 now. It requires turning off all bells and whistles and deep knowledge of Ozmoo to do it, so it's not perfect. It's easier on the other platforms supported by Ozmoo, where the dynamic memory can be larger.

@daelsepara
Copy link
Owner

I will have to review this again and revert back some of the PLTABLEs to LTABLEs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants