2021-07-22 22:43:07 +00:00
|
|
|
//
|
|
|
|
// Blitter.cpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 22/07/2021.
|
|
|
|
// Copyright © 2021 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "Blitter.hpp"
|
|
|
|
|
|
|
|
//#define NDEBUG
|
|
|
|
#define LOG_PREFIX "[Blitter] "
|
|
|
|
#include "../../Outputs/Log.hpp"
|
|
|
|
|
|
|
|
using namespace Amiga;
|
|
|
|
|
|
|
|
void Blitter::set_control(int index, uint16_t value) {
|
|
|
|
LOG("Set control " << index << " to " << PADHEX(4) << value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_first_word_mask(uint16_t value) {
|
|
|
|
LOG("Set first word mask: " << PADHEX(4) << value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_last_word_mask(uint16_t value) {
|
|
|
|
LOG("Set last word mask: " << PADHEX(4) << value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_size(uint16_t value) {
|
2021-08-10 11:17:01 +00:00
|
|
|
width_ = (width_ & ~0x3f) | (value & 0x3f);
|
|
|
|
height_ = (height_ & ~0x3ff) | (value >> 6);
|
|
|
|
LOG("Set size to " << std::dec << width_ << ", " << height_);
|
2021-07-22 22:43:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_minterms(uint16_t value) {
|
|
|
|
LOG("Set minterms " << PADHEX(4) << value);
|
2021-08-10 11:17:01 +00:00
|
|
|
minterms_ = value & 0xff;
|
2021-07-22 22:43:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_vertical_size(uint16_t value) {
|
|
|
|
LOG("Set vertical size " << PADHEX(4) << value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_horizontal_size(uint16_t value) {
|
|
|
|
LOG("Set horizontal size " << PADHEX(4) << value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_modulo(int channel, uint16_t value) {
|
|
|
|
LOG("Set modulo size " << channel << " to " << PADHEX(4) << value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Blitter::set_data(int channel, uint16_t value) {
|
|
|
|
LOG("Set data " << channel << " to " << PADHEX(4) << value);
|
|
|
|
}
|
|
|
|
|
|
|
|
uint16_t Blitter::get_status() {
|
|
|
|
LOG("Returned dummy status");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2021-08-10 11:17:01 +00:00
|
|
|
bool Blitter::advance() {
|
2021-09-16 23:56:28 +00:00
|
|
|
if(!height_) return false;
|
|
|
|
|
|
|
|
printf("!!! %08x\n", pointer_[3]);
|
2021-09-16 12:24:52 +00:00
|
|
|
ram_[pointer_[3] & ram_mask_] = 0xffff;
|
2021-09-17 01:01:37 +00:00
|
|
|
height_ = 0;
|
2021-09-16 23:56:28 +00:00
|
|
|
|
|
|
|
return true;
|
2021-07-22 22:43:07 +00:00
|
|
|
}
|