1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-03 11:30:02 +00:00

Add logical fill.

This commit is contained in:
Thomas Harte 2023-02-04 10:31:41 -05:00
parent 34722bae89
commit 46d009f27b
2 changed files with 16 additions and 2 deletions

View File

@ -885,12 +885,12 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
case 0b0110: break; // TODO: srch. [search horizontally for a colour]
case 0b0111: Begin(Line); break; // LINE
case 0b1000: break; // TODO: lmmv. [logical move, VDP to VRAM]
case 0b1000: Begin(LogicalFill); break; // LMMV [logical move, VDP to VRAM, i.e. solid-colour fill]
case 0b1001: break; // TODO: lmmm. [logical move, VRAM to VRAM]
case 0b1010: break; // TODO: lmcm. [logical move, VRAM to CPU]
case 0b1011: Begin(LogicalMoveFromCPU); break; // LMMC [logical move, CPU to VRAM]
case 0b1100: Begin(HighSpeedFill); break; // HMMV [high-speed move, VDP to VRAM]
case 0b1100: Begin(HighSpeedFill); break; // HMMV [high-speed move, VDP to VRAM, i.e. single-byte fill]
case 0b1101: break; // TODO: hmmm. [high-speed move, VRAM to VRAM]
case 0b1110: break; // TODO: ymmm. [high-speed move, y only, VRAM to VRAM]
case 0b1111: break; // TODO: hmmc. [high-speed move, CPU to VRAM]

View File

@ -296,6 +296,20 @@ struct HighSpeedFill: public Rectangle<false, false> {
}
};
struct LogicalFill: public Rectangle<false, false> {
LogicalFill(CommandContext &context) : Rectangle(context) {
cycles = 64;
access = AccessType::PlotPoint;
}
void advance(int pixels_per_byte) final {
cycles = 72;
if(!advance_pixel(pixels_per_byte)) {
cycles += 64;
}
}
};
}
}
}