unittester: Implement 0x03 "Verify Screen Snapshot Rectangle"

Basic quick tests show that this is probably consistent with command 0x02.
This commit is contained in:
GreaseMonkey
2024-01-08 12:07:14 +13:00
parent f35dd20974
commit 30aacb2a1a
2 changed files with 58 additions and 25 deletions

View File

@@ -49,8 +49,6 @@ Set the I/O base address to 0xFFFF using the above method.
### Executing commands
**TODO: IMPLEMENT ME!**
The ports at IOBASE+0x00 and IOBASE+0x01 are all 8 bits wide.
Writing to IOBASE+0x00 cancels any in-flight commands and sends a new command.
@@ -145,8 +143,6 @@ Output:
### 0x03: Verify Screen Snapshot Rectangle
**TODO: IMPLEMENT ME!**
As per 0x02 "Read Screen Snapshot Rectangle", except instead of returning the pixel data, it returns a CRC-32 of the data.
The CRC is as per zlib's `crc32()` function. Specifically, one uses a right-shifting Galois LFSR with a polynomial of 0xEDB88320, bytes XORed against the least significant byte, the initial seed is 0xFFFFFFFF, and all bits of the output are inverted.