From 41ba883fb6597b84eeb32a8bfe578d6e4c615700 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 28 Jan 2023 22:47:27 -0500 Subject: [PATCH] Honour direction, start transfer immediately. --- Components/9918/Implementation/YamahaCommands.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Components/9918/Implementation/YamahaCommands.hpp b/Components/9918/Implementation/YamahaCommands.hpp index 3ffc8a115..26a1b1949 100644 --- a/Components/9918/Implementation/YamahaCommands.hpp +++ b/Components/9918/Implementation/YamahaCommands.hpp @@ -175,8 +175,9 @@ struct LogicalMoveFromCPU: public Command { start_x_ = context.destination.v[0]; width_ = context.size.v[0]; - cycles = 64; - access = AccessType::WaitForColour; + // This command is started with the first colour ready to transfer. + cycles = 32; + access = AccessType::PlotPoint; is_cpu_transfer = true; } @@ -193,15 +194,15 @@ struct LogicalMoveFromCPU: public Command { case AccessType::PlotPoint: cycles = 0; access = AccessType::WaitForColour; - ++location.v[0]; + context.destination.add<0>(context.arguments & 0x4 ? -1 : 1); --context.size.v[0]; if(!context.size.v[0]) { cycles = 64; context.size.v[0] = width_; - location.v[0] = start_x_; + context.destination.v[0] = start_x_; - ++location.v[1]; + context.destination.add<1>(context.arguments & 0x8 ? -1 : 1); --context.size.v[1]; } break;