mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 08:31:11 +00:00
Attempt to enable high-speed fill.
This commit is contained in:
parent
8f5c7fcabc
commit
5d4c49c913
@ -42,7 +42,7 @@ enum class ScreenMode {
|
||||
constexpr int pixels_per_byte(ScreenMode mode) {
|
||||
switch(mode) {
|
||||
default:
|
||||
case ScreenMode::Blank: return 0;
|
||||
case ScreenMode::Blank: return 1;
|
||||
case ScreenMode::Text: return 6;
|
||||
case ScreenMode::MultiColour: return 2;
|
||||
case ScreenMode::ColouredText: return 8;
|
||||
|
@ -22,7 +22,7 @@ struct Vector {
|
||||
template <int offset, bool high> void set(uint8_t value) {
|
||||
constexpr uint8_t mask = high ? (offset ? 0x3 : 0x1) : 0xff;
|
||||
constexpr int shift = high ? 8 : 0;
|
||||
v[offset] = (v[offset] & ~(mask << shift)) | (value << shift);
|
||||
v[offset] = (v[offset] & ~(mask << shift)) | ((value & mask) << shift);
|
||||
}
|
||||
|
||||
template <int offset> void add(int amount) {
|
||||
@ -258,17 +258,16 @@ struct HighSpeedFill: public Command {
|
||||
}
|
||||
|
||||
bool done() final {
|
||||
return true;
|
||||
return !context.size.v[1] || !width_;
|
||||
}
|
||||
|
||||
void advance(int pixels_per_byte) final {
|
||||
cycles = 48;
|
||||
|
||||
// TODO: step at byte speed, not pixel speed.
|
||||
advance_axis<0>(pixels_per_byte);
|
||||
--context.size.v[0];
|
||||
context.size.v[0] -= pixels_per_byte;
|
||||
|
||||
if(!context.size.v[0]) {
|
||||
if(!(context.size.v[0] & ~(pixels_per_byte - 1))) {
|
||||
cycles += 56;
|
||||
context.size.v[0] = width_;
|
||||
context.destination.v[0] = start_x_;
|
||||
|
Loading…
Reference in New Issue
Block a user