From da71adddddcca3f5dd73744408a7bda39dd06b0c Mon Sep 17 00:00:00 2001 From: Asnivor Date: Thu, 22 Mar 2018 17:06:52 +0000 Subject: [PATCH] ZXHawk: Fixed TZX block ID 0x33 deserialization (was causing some games to not be parsed properly) --- .../SinclairSpectrum/Media/Tape/TzxSerializer.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TzxSerializer.cs b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TzxSerializer.cs index 8b3bc9e1ec..91b5037426 100644 --- a/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TzxSerializer.cs +++ b/BizHawk.Emulation.Cores/Computers/SinclairSpectrum/Media/Tape/TzxSerializer.cs @@ -1274,14 +1274,19 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum t.PauseInMS = 0; - _position += 2; - int blockLen = GetWordValue(data, 0); + // first byte contains number of HWINFOs + int infos = data[_position]; + + _position += 1; + + // now starts the HW infos (each block 3 bytes) + for (int i = 0; i < infos; i++) + { + _position += 3; + } // add to tape _datacorder.DataBlocks.Add(t); - - // advance to next block - _position += blockLen; } #endregion