Author Topic: SCI0: SCI0 Interpreter with added PKWare DCL Implode compression (comp_method=3)  (Read 1133 times)

0 Members and 11 Guests are viewing this topic.

Offline robbo007

Hi guys,
On my quest to save hard disk space for my project after many hours of pulling my hair out I've managed to get a working version of the SCI0 Interpreter with added PKWare DCL Implode compression (comp_method=3) and only using a 6kb of memory footprint. Maybe someone else could do this better using less memory?

### Memory footprint (decompressor in SCIV.EXE)

4096-byte dictionary window : 4096 bytes
Fixed decode tables         : ~1800 bytes (compile-time constants)
State overhead              :  ~200 bytes
TOTAL                       : ~6096 bytes (~6KB)

I've also written a makevols.exe that compresses each resource with DCL Implode. Both are attached if anyone wants to test them.







Offline lskovlun

How much of this memory footprint is in heap, and how much is in hunk?

Offline Kawa

How much of this memory footprint is in heap, and how much is in hunk?
I don't think I understand the question. The decompressor is not itself a resource, and once uncompressed for use the resources are as big as always. Right?

Offline lskovlun

How much of this memory footprint is in heap, and how much is in hunk?
I don't think I understand the question. The decompressor is not itself a resource, and once uncompressed for use the resources are as big as always. Right?
The buffers can be allocated near (= in the data segment, preventing that space from being used for the heap) or far (= hunk).

Offline robbo007

Hi guys,
The patch costs the game zero heap and about 6KB of hunk, which matches how Sierra's own SCI16 engine handles this (it keeps the whole DCL work buffer in a far hunk Handle with zero near-heap use).
Hope that helps.

Offline cosmicr

Pretty neat, what's the compression ratio like? Imagine if Police Quest 2 was on just one disk etc... that would have been a game changer (literally!) back in the day.

Are there any SCI0 games that push the limit of the hunk memory?

Offline lskovlun

They almost certainly would have on some configurations. I think most SCI0 games required only 512KB of conventional memory? Not everyone had 640KB. And then there's various TSRs.
In fact these games also technically required an 8MHz processor, but I found that they ran passably on our 4.77MHz machine.

Offline cosmicr

Yeah I could have sworn I played KQ4, PQ2 and CB on my Tandy 1000 with 256k ram. I might be misremembering.

Offline lskovlun

They had this feature where you could monitor how much hunk was used at any given time. There was also a minHunk= directive in resource.cfg, which was checked on startup. Do some thorough playtesting, and you'll know what to set that value to.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.067 seconds with 22 queries.