mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +00:00
Merge branch 'master' into ZXSpectrum
This commit is contained in:
commit
f37f89a7d3
@ -350,11 +350,14 @@ class Base {
|
||||
|
||||
case MemoryAccess::Write:
|
||||
if(master_system_.cram_is_selected) {
|
||||
// Adjust the palette.
|
||||
// Adjust the palette. In a Master System blue has a slightly different
|
||||
// scale; cf. https://www.retrorgb.com/sega-master-system-non-linear-blue-channel-findings.html
|
||||
constexpr uint8_t rg_scale[] = {0, 85, 170, 255};
|
||||
constexpr uint8_t b_scale[] = {0, 104, 170, 255};
|
||||
master_system_.colour_ram[ram_pointer_ & 0x1f] = palette_pack(
|
||||
uint8_t(((read_ahead_buffer_ >> 0) & 3) * 255 / 3),
|
||||
uint8_t(((read_ahead_buffer_ >> 2) & 3) * 255 / 3),
|
||||
uint8_t(((read_ahead_buffer_ >> 4) & 3) * 255 / 3)
|
||||
rg_scale[(read_ahead_buffer_ >> 0) & 3],
|
||||
rg_scale[(read_ahead_buffer_ >> 2) & 3],
|
||||
b_scale[(read_ahead_buffer_ >> 4) & 3]
|
||||
);
|
||||
|
||||
// Schedule a CRAM dot; this is scheduled for wherever it should appear
|
||||
|
@ -169,7 +169,7 @@ template<bool is_zx81> class ConcreteMachine:
|
||||
}
|
||||
if(!(address & 2)) nmi_is_enabled_ = false;
|
||||
if(!(address & 1)) nmi_is_enabled_ = is_zx81;
|
||||
if(!nmi_is_enabled_) z80_.set_wait_line(false);
|
||||
if(is_zx81 && !nmi_is_enabled_) z80_.set_wait_line(false);
|
||||
|
||||
// The below emulates the ZonX AY expansion device.
|
||||
if constexpr (is_zx81) {
|
||||
|
@ -43,7 +43,7 @@
|
||||
// Issue each test file.
|
||||
for(NSURL *url in tests) {
|
||||
// Compare against a file set if one has been supplied.
|
||||
if(_fileSet && ![_fileSet containsObject:[[url path] lastPathComponent]]) continue;
|
||||
if(_fileSet && ![_fileSet containsObject:[url lastPathComponent]]) continue;
|
||||
NSLog(@"Testing %@", url);
|
||||
[self testJSONAtURL:url];
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class EmuTOS: public ComparativeBusHandler {
|
||||
const std::vector<ROMMachine::ROM> rom_names = {{"AtariST", "", image.UTF8String, 0, 0 }};
|
||||
const auto roms = CSROMFetcher()(rom_names);
|
||||
NSString *const traceLocation = [[NSBundle bundleForClass:[self class]] pathForResource:trace ofType:@"trace.txt.gz"];
|
||||
_machine = std::make_unique<EmuTOS>(*roms[0], traceLocation.UTF8String);
|
||||
_machine = std::make_unique<EmuTOS>(*roms[0], traceLocation.fileSystemRepresentation);
|
||||
_machine->run_for(HalfCycles(length));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user