mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Be overt about colour direction.
This commit is contained in:
parent
3f12a28f4f
commit
0576451102
@ -856,7 +856,7 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
|
||||
// Check whether a command was blocked on this.
|
||||
if(
|
||||
Storage<personality>::command_ &&
|
||||
Storage<personality>::command_->access == Command::AccessType::WaitForColour
|
||||
Storage<personality>::command_->access == Command::AccessType::WaitForColourReceipt
|
||||
) {
|
||||
Storage<personality>::command_->advance();
|
||||
Storage<personality>::update_command_step(fetch_pointer_.column);
|
||||
@ -1030,7 +1030,7 @@ uint8_t Base<personality>::read_register() {
|
||||
((
|
||||
!Storage<personality>::command_ ||
|
||||
!Storage<personality>::command_->is_cpu_transfer ||
|
||||
Storage<personality>::command_->access == Command::AccessType::WaitForColour
|
||||
Storage<personality>::command_->access == Command::AccessType::WaitForColourReceipt
|
||||
) ? 0x80 : 0x00);
|
||||
|
||||
return
|
||||
|
@ -212,7 +212,7 @@ template <Personality personality> struct Storage<personality, std::enable_if_t<
|
||||
case Command::AccessType::PlotPoint:
|
||||
next_command_step_ = CommandStep::ReadPixel;
|
||||
break;
|
||||
case Command::AccessType::WaitForColour:
|
||||
case Command::AccessType::WaitForColourReceipt:
|
||||
// i.e. nothing to do until a colour is received.
|
||||
next_command_step_ = CommandStep::None;
|
||||
break;
|
||||
|
@ -62,7 +62,7 @@ struct Command {
|
||||
PlotPoint,
|
||||
|
||||
/// Blocks until the next CPU write to the colour register.
|
||||
WaitForColour,
|
||||
WaitForColourReceipt,
|
||||
};
|
||||
AccessType access = AccessType::PlotPoint;
|
||||
int cycles = 0;
|
||||
@ -187,7 +187,7 @@ struct LogicalMoveFromCPU: public Command {
|
||||
switch(access) {
|
||||
default: break;
|
||||
|
||||
case AccessType::WaitForColour:
|
||||
case AccessType::WaitForColourReceipt:
|
||||
cycles = 32;
|
||||
location = context.destination;
|
||||
access = AccessType::PlotPoint;
|
||||
@ -195,7 +195,7 @@ struct LogicalMoveFromCPU: public Command {
|
||||
|
||||
case AccessType::PlotPoint:
|
||||
cycles = 0;
|
||||
access = AccessType::WaitForColour;
|
||||
access = AccessType::WaitForColourReceipt;
|
||||
context.destination.add<0>(context.arguments & 0x4 ? -1 : 1);
|
||||
--context.size.v[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user