tape hooks don't check CARRY flag to be set for LOAD and cleared for VERIFY. result is when VERIFY is requested, LOAD is performed instead.
test tap http://sindik.at/~ub880d/tmp/loadtest.tap , code is:
cpu z80undoc relaxed on org 32768 xor a ld ix,0x4000 ld de,0x1b00 ld a,255 ; scf ;scf for load, no carry for verify call 0x556 ret
this program shouldn't load headless screen (included in the tap). but fuse with enabled tape traps loads it.
Thanks, applied in [r5311].
Related
Commit: [r5311]
On fuse-emulator-devel, Alberto Garcia reports a problem with this patch:
Last edit: Fredrick Meunier 2016-06-02
Thanks to Berto's report, I've had another look at this change and I believe we are being caught by a longstanding bug introduced in 2004 with [patches:#41] Fix up registers on tape load trap in [r2137].
trap_load_block() was already intended to cover the verify case so [patches:#337] should not have been required, but [patches:#41] added the line
which hardcodes the value of the verify flag (the C flag in the F' register) before it is later tested for verify behaviour.
The attached patch fix_verify_with_tape_traps.patch removes tape_traps_verify.diff and restores the older verify detection code.
This keeps loadtest.tap working with the verify being done by the tape trap but isn't enough alone to sort out what's going on with Lone Wolf 3.
The Lone Wolf 3 tap looks broken to me - it seems to set the verify flag for several of the blocks which won't load under any situation. My guess is that this tap has been preparared and only tested by using it with systems that shortcut loading for tap blocks like emulator traps or ESXDOS TAP loading etc.
The Lone Wolf 3 tzx on the other hand seems to have problematic encoding. Doing some experiments changing its encoding to pzx I can get it to load (only tested without accelleration), but I will need to do some more tests to work out what exactly is the difference between the broken tzx and working pzx versions I have in order to decide whether that is resolvable with a Fuse patch. My gut feel is that this will boil down to a problem with the tzx encoding of Lone Wolf 3 rather than Fuse.
Related
Commit: [r2137]
Patches:
#337Patches:
#41Answer for tap file is here:
first "call 0xfcc4" is to load header, second to load data of block, but there is "or a" at 0xFE10, so carry is reset. changing the instruction to "scf" game loads correctly.
Last edit: ub880d 2016-06-02
How come it is working with Fuse 1.1.1 then ? :-? I'm still unable to load it with the latest trunk.
Alberto, it is not a bug that you cannot load the tape. The bug is if you can load the tap.
I already posted my analysis of the loader code in the tap.
If you disable the tape traps in emulator it is not possible to load the tape even in 1.1.1 (which is correct behavior).
Last edit: ub880d 2016-06-04
Ah sorry, you're right!
Comitted fix_verify_with_tape_traps.patch in [r5586] and [r5587].
Related
Commit: [r5586]
Commit: [r5587]
Following up on the tzx issues in [bugs:#352] Problems loading Lone Wolf 3 - The Mirror of Death.tzx as they seem to be separate.
Related
Bugs: #352