mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Attempt YMMM.
This commit is contained in:
parent
82659e7924
commit
2913368a06
@ -930,12 +930,12 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
|
||||
case 0b1000: Begin(LogicalFill); break; // LMMV [logical move, VDP to VRAM, i.e. solid-colour fill].
|
||||
case 0b1001: Begin(Move<MoveType::Logical>); break; // LMMM [logical move, VRAM to VRAM].
|
||||
case 0b1010: break; // TODO: lmcm. [logical move, VRAM to CPU]
|
||||
case 0b1011: Begin(MoveFromCPU<true>); break; // LMMC [logical move, CPU to VRAM].
|
||||
case 0b1011: Begin(MoveFromCPU<true>); break; // LMMC [logical move, CPU to VRAM].
|
||||
|
||||
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 0b1110: break; // TODO: ymmm. [high-speed move, y only, VRAM to VRAM]
|
||||
case 0b1111: Begin(MoveFromCPU<false>); break; // HMMC [high-speed move, CPU 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].
|
||||
}
|
||||
#undef Begin
|
||||
|
||||
|
@ -440,12 +440,16 @@ template <Personality personality> struct Base: public Storage<personality> {
|
||||
Storage<personality>::update_command_step(access_column);
|
||||
} break;
|
||||
|
||||
case CommandStep::ReadSourceByte:
|
||||
context.latched_colour.set(source[command_address(context.source, context.arguments & 0x10)]);
|
||||
case CommandStep::ReadSourceByte: {
|
||||
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>::next_command_step_ = CommandStep::WriteByte;
|
||||
break;
|
||||
} break;
|
||||
|
||||
case CommandStep::WriteByte:
|
||||
destination[command_address(context.destination, context.arguments & 0x20)] = context.latched_colour.has_value() ? context.latched_colour.colour : context.colour.colour;
|
||||
|
@ -118,6 +118,7 @@ struct Command {
|
||||
AccessType access = AccessType::PlotPoint;
|
||||
int cycles = 0;
|
||||
bool is_cpu_transfer = false;
|
||||
bool y_only = false;
|
||||
|
||||
/// Current command parameters.
|
||||
CommandContext &context;
|
||||
@ -342,6 +343,7 @@ template <MoveType type> struct Move: public Rectangle<type == MoveType::Logical
|
||||
Move(CommandContext &context) : Rectangle(context) {
|
||||
Command::access = is_logical ? Command::AccessType::CopyPoint : Command::AccessType::CopyByte;
|
||||
Command::cycles = is_y_only ? 0 : 64;
|
||||
Command::y_only = is_y_only;
|
||||
}
|
||||
|
||||
void advance(int pixels_per_byte) final {
|
||||
|
Loading…
Reference in New Issue
Block a user