+ /* Loop through each byte */
+ for (i = 0; i < Size; i++)
+ {
+ BYTE Result = 0xFF;
+
+ /* This should always return a plane 0 address for read mode 1 */
+ VideoAddress = VgaTranslateReadAddress(Address + i);
+
+ for (j = 0; j < VGA_NUM_BANKS; j++)
+ {
+ /* Don't consider ignored banks */
+ if (!(VgaGcRegisters[VGA_GC_COLOR_IGNORE_REG] & (1 << j))) continue;
+
+ if (VgaGcRegisters[VGA_GC_COLOR_COMPARE_REG] & (1 << j))
+ {
+ /* Comparing with 11111111 */
+ Result &= VgaMemory[j * VGA_BANK_SIZE + LOWORD(VideoAddress)];
+ }
+ else
+ {
+ /* Comparing with 00000000 */
+ Result &= ~(VgaMemory[j * VGA_BANK_SIZE + LOWORD(VideoAddress)]);
+ }
+ }