1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-04 01:57:54 +00:00

Resolves various GCC-reported issues.

This commit is contained in:
Thomas Harte 2020-11-19 22:21:20 -05:00
parent 3512352c32
commit 2c9ce116a2
4 changed files with 9 additions and 9 deletions

View File

@ -248,6 +248,7 @@ template <typename TimeUnit> class VideoSwitches {
case CharacterROM::IIe:
return ROMMachine::ROM(machine_name, "the Apple IIe character ROM", "apple2eu-character.rom", 4*1024, 0x816a86f1);
default: // To appease GCC.
case CharacterROM::EnhancedIIe:
return ROMMachine::ROM(machine_name, "the Enhanced Apple IIe character ROM", "apple2e-character.rom", 4*1024, 0x2651014d);

View File

@ -8,6 +8,7 @@
#include "Sound.hpp"
#include <cassert>
#include <cstdio>
// TODO: is it safe not to check for back-pressure in pending_stores_?

View File

@ -50,10 +50,12 @@ class GLU: public Outputs::Speaker::SampleSource {
// Assumed: on most modern architectures, an atomic 64-bit read or
// write can be achieved locklessly.
struct MemoryWrite {
MemoryWrite() : enabled(false) {}
uint32_t time;
uint16_t address;
uint8_t value;
bool enabled = false;
bool enabled;
};
static_assert(sizeof(MemoryWrite) == 8);
constexpr static int StoreBufferSize = 16384;

View File

@ -382,20 +382,16 @@ uint16_t *VideoBase::output_double_text(uint16_t *target, int start, int end, in
}
uint16_t *VideoBase::output_super_high_res(uint16_t *target, int start, int end, int row) const {
// TODO: both the palette and the mode byte should have been fetched by now, and just be
// available. I haven't implemented that yet, so the below just tries to show _something_.
// The use of appleii_palette is complete nonsense, as is the assumption of two pixels per byte.
const int row_address = row * 160 + 0x12000;
// TODO: line_control_ & 0x20 should enable or disable colour fill mode.
if(line_control_ & 0x80) {
for(int c = start * 4; c < end * 4; c++) {
const uint8_t source = ram_[row_address + c];
target[0] = palette_[(source >> 6) & 0x3 + 0x8];
target[1] = palette_[(source >> 4) & 0x3 + 0xc];
target[2] = palette_[(source >> 2) & 0x3 + 0x0];
target[3] = palette_[(source >> 0) & 0x3 + 0x4];
target[0] = palette_[0x8 + (source >> 6) & 0x3];
target[1] = palette_[0xc + (source >> 4) & 0x3];
target[2] = palette_[0x0 + (source >> 2) & 0x3];
target[3] = palette_[0x4 + (source >> 0) & 0x3];
target += 4;
}
} else {