mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-04 01:57:54 +00:00
Clarify meaning of STOP.
This commit is contained in:
parent
12bd71cfe1
commit
1ef34b1f18
@ -905,12 +905,9 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
|
|||||||
|
|
||||||
#define Begin(x) Storage<personality>::command_ = std::make_unique<Commands::x>(Storage<personality>::command_context_);
|
#define Begin(x) Storage<personality>::command_ = std::make_unique<Commands::x>(Storage<personality>::command_context_);
|
||||||
switch(value >> 4) {
|
switch(value >> 4) {
|
||||||
// All codes not listed below are invalid; just abandon
|
// All codes not listed below are invalid; treat them as STOP.
|
||||||
// whatever's going on, if anything.
|
default:
|
||||||
//
|
case 0b0000: Storage<personality>::command_ = nullptr; break; // STOP.
|
||||||
// There's also no need to list STOP below as it was
|
|
||||||
// handled above.
|
|
||||||
default: break;
|
|
||||||
|
|
||||||
case 0b0100: break; // TODO: point. [read a pixel colour]
|
case 0b0100: break; // TODO: point. [read a pixel colour]
|
||||||
case 0b0101: Begin(PointSet); break; // PSET [plot a pixel].
|
case 0b0101: Begin(PointSet); break; // PSET [plot a pixel].
|
||||||
@ -934,13 +931,12 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
|
|||||||
|
|
||||||
// Kill the command immediately if it's done in zero operations
|
// Kill the command immediately if it's done in zero operations
|
||||||
// (e.g. a line of length 0).
|
// (e.g. a line of length 0).
|
||||||
if(!Storage<personality>::command_) {
|
if(!Storage<personality>::command_ && (value >> 4)) {
|
||||||
LOG("TODO: Yamaha command " << PADHEX(2) << +value);
|
LOG("TODO: Yamaha command " << PADHEX(2) << +value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seed timing information if a command was found.
|
// Seed timing information if a command was found.
|
||||||
Storage<personality>::update_command_step(fetch_pointer_.column);
|
Storage<personality>::update_command_step(fetch_pointer_.column);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user