MicroCoreLabs wrote: ↑Sun Aug 28, 2022 7:36 am
Could we try a few experiments?
Try deleting one of the good files within the zip-file and then try to extract the "bad" file which previously had the bad CRC. I would like to know if the problem is the location of the file in the zip-file or if the problem is the file itself. Deleting one of the files may cause the position of the "bad" file to move and get different results.
Another experiment is to just extract the "bad" file and not the other files. I'm interested to know if there is an issue with PKUNZIP usage of memory or if the issue is just with this file.
I have carried out two experiments:
- Bubble_fit.png (4.23 KiB) Viewed 7330 times
The first one, deleting almost all files from the
zip, keeping the previous one (
BUBBLE.EXE) to the one that was extracted wrong (
BUBBOB.DAT). As a result, again
BUBBOB.DAT and
SPRITES.ECF have been extracted wrong... however the wrong bytes have changed.
Secondly, I also deleted the previous file (
BUBBLE.EXE), and in this case the situation has changed.
BUBBOB.DAT and
SPRITES.ECF were extracted fine but
SPRITES.CCF which was extracted fine before, is now not.
Therefore, it seems conclusive that there is a problem with
PKUNZIP's memory usage, as you suggest. However, I'm not quite sure how to debug it to find the exact reason.
MicroCoreLabs wrote:
I also have a question for the 8086 experts: I was reviewing my microcode for LES (opcode 0xC4) and I was wondering what happens when the second word fetch crosses the segment boundary... I believe my microcode will wrap to the beginning of the same segment but maybe I should instead fetch the first word of the next segment?
Which is correct for the LES[DI],BX when the address is [1000:FFFE] ?
A) DI = memory_word @0x1FFFE
ES = memory_word @0x10000
B) DI = memory_word @0x1FFFE
ES = memory_word @0x20000
I believe that the MCL86 will implement option A because the segment registers are contained in the BUI and can only be changed by the EU.
Furthermore, what if the BX is an odd address at the end of the segment so that the second byte of the word spans the end of the segment? Does the word-fetch wrap to the beginning of the same segment, or does the segment also get incremented. And then what happens to the ES word fetch?
I don't quite know how to test this. Provide me with a complete instruction set and I could compare between
PCEm and
PCXT core.
The
DOS debug doesn't seem to support the
LES [DI], BX instruction as you put it, what would be the equivalent to make it work in this basic debugger?:
- dos_debug.png (1.78 KiB) Viewed 7330 times