From fbfa26ad5ea10a85fb3c82ac69272092de746115 Mon Sep 17 00:00:00 2001
From: Thomas Harte <thomas.harte@gmail.com>
Date: Thu, 26 Jan 2023 12:55:08 -0500
Subject: [PATCH] Minor steps towards implementing `Line`.

---
 Components/9918/Implementation/9918.cpp         |  5 +++++
 .../9918/Implementation/YamahaCommands.hpp      | 17 +++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/Components/9918/Implementation/9918.cpp b/Components/9918/Implementation/9918.cpp
index 09d475f84..44c5f44fc 100644
--- a/Components/9918/Implementation/9918.cpp
+++ b/Components/9918/Implementation/9918.cpp
@@ -915,6 +915,11 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
 					case 0b1111:	break;	// TODO: hmmc.
 				}
 
+				// Seed timing information if a command was found.
+				if(Storage<personality>::command_) {
+					// TODO.
+				}
+
 				// TODO: record logical mode.
 			break;
 		}
diff --git a/Components/9918/Implementation/YamahaCommands.hpp b/Components/9918/Implementation/YamahaCommands.hpp
index 2b469f878..e67f8b31c 100644
--- a/Components/9918/Implementation/YamahaCommands.hpp
+++ b/Components/9918/Implementation/YamahaCommands.hpp
@@ -52,11 +52,20 @@ struct Command {
 namespace Commands {
 
 struct Line: public Command {
-	using Command::Command;
+	public:
+		Line(CommandContext &context) : Command(context) {
+			// Set up Bresenham constants.
+		}
 
-	bool next() {
-		return false;
-	}
+		bool next() {
+			// Should implement Bresenham with cadence:
+			//
+			//	88 cycles before the next read; 24 to write.
+			//	Add 32 extra cycles if a minor-axis step occurs.
+			return false;
+		}
+
+	private:
 };
 
 }