michalsc / Emu68

M68K emulation for AArch64/AArch32
Mozilla Public License 2.0
380 stars 41 forks source link

Lha fix #273

Closed michalsc closed 8 months ago

michalsc commented 8 months ago

LhA has a bug where it is in some cases attempting to backward find either zero or '/' character traversing the memory from address 4GB - 1 down. We have blocked such reads by returning 0xffffffff value, which would be the case when no response is on the CPU data bus and the whole bus is provided with pull-up resistors.

Unfortunately this lead to LhA doing 256MB byte-reads for every decompressed file, making it awfully slow.

This change fixed the returned "trash" data, so that we satisfy our illegal accesses and at the same time allow LhA to run.