1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Attempt YMMM.

This commit is contained in:
Thomas Harte 2023-03-08 23:12:02 -05:00
parent 82659e7924
commit 2913368a06
3 changed files with 12 additions and 6 deletions

View File

@ -934,7 +934,7 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
case 0b1100: Begin(HighSpeedFill); break; // HMMV [high-speed move, VDP to VRAM, i.e. single-byte fill]. case 0b1100: Begin(HighSpeedFill); break; // HMMV [high-speed move, VDP to VRAM, i.e. single-byte fill].
case 0b1101: Begin(Move<MoveType::HighSpeed>); break; // HMMM [high-speed move, VRAM to VRAM]. case 0b1101: Begin(Move<MoveType::HighSpeed>); break; // HMMM [high-speed move, VRAM to VRAM].
case 0b1110: break; // TODO: ymmm. [high-speed move, y only, VRAM to VRAM] case 0b1110: Begin(Move<MoveType::YOnly>); break; // YMMM [high-speed move, y only, VRAM to VRAM].
case 0b1111: Begin(MoveFromCPU<false>); break; // HMMC [high-speed move, CPU to VRAM]. case 0b1111: Begin(MoveFromCPU<false>); break; // HMMC [high-speed move, CPU to VRAM].
} }
#undef Begin #undef Begin

View File

@ -440,12 +440,16 @@ template <Personality personality> struct Base: public Storage<personality> {
Storage<personality>::update_command_step(access_column); Storage<personality>::update_command_step(access_column);
} break; } break;
case CommandStep::ReadSourceByte: case CommandStep::ReadSourceByte: {
context.latched_colour.set(source[command_address(context.source, context.arguments & 0x10)]); Vector source_vector = context.source;
if(Storage<personality>::command_->y_only) {
source_vector.v[0] = context.destination.v[0];
}
context.latched_colour.set(source[command_address(source_vector, context.arguments & 0x10)]);
Storage<personality>::minimum_command_column_ = access_column + 24; Storage<personality>::minimum_command_column_ = access_column + 24;
Storage<personality>::next_command_step_ = CommandStep::WriteByte; Storage<personality>::next_command_step_ = CommandStep::WriteByte;
break; } break;
case CommandStep::WriteByte: case CommandStep::WriteByte:
destination[command_address(context.destination, context.arguments & 0x20)] = context.latched_colour.has_value() ? context.latched_colour.colour : context.colour.colour; destination[command_address(context.destination, context.arguments & 0x20)] = context.latched_colour.has_value() ? context.latched_colour.colour : context.colour.colour;

View File

@ -118,6 +118,7 @@ struct Command {
AccessType access = AccessType::PlotPoint; AccessType access = AccessType::PlotPoint;
int cycles = 0; int cycles = 0;
bool is_cpu_transfer = false; bool is_cpu_transfer = false;
bool y_only = false;
/// Current command parameters. /// Current command parameters.
CommandContext &context; CommandContext &context;
@ -342,6 +343,7 @@ template <MoveType type> struct Move: public Rectangle<type == MoveType::Logical
Move(CommandContext &context) : Rectangle(context) { Move(CommandContext &context) : Rectangle(context) {
Command::access = is_logical ? Command::AccessType::CopyPoint : Command::AccessType::CopyByte; Command::access = is_logical ? Command::AccessType::CopyPoint : Command::AccessType::CopyByte;
Command::cycles = is_y_only ? 0 : 64; Command::cycles = is_y_only ? 0 : 64;
Command::y_only = is_y_only;
} }
void advance(int pixels_per_byte) final { void advance(int pixels_per_byte) final {