diff --git a/Components/9918/Implementation/9918.cpp b/Components/9918/Implementation/9918.cpp index 574fc600a..80c67c833 100644 --- a/Components/9918/Implementation/9918.cpp +++ b/Components/9918/Implementation/9918.cpp @@ -885,12 +885,12 @@ void Base::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] diff --git a/Components/9918/Implementation/YamahaCommands.hpp b/Components/9918/Implementation/YamahaCommands.hpp index 85754d179..f0273b5d4 100644 --- a/Components/9918/Implementation/YamahaCommands.hpp +++ b/Components/9918/Implementation/YamahaCommands.hpp @@ -296,6 +296,20 @@ struct HighSpeedFill: public Rectangle { } }; +struct LogicalFill: public Rectangle { + 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; + } + } +}; + } } }