mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +00:00
Merge branch 'master' into LessACIAState
This commit is contained in:
commit
ccce127f13
@ -71,7 +71,8 @@ class ConcreteMachine:
|
||||
Memory::Fuzz(ram_);
|
||||
|
||||
std::vector<ROMMachine::ROM> rom_descriptions = {
|
||||
{"AtariST", "the TOS ROM", "tos100.img", 192*1024, 0x1a586c64}
|
||||
// {"AtariST", "the UK TOS 1.00 ROM", "tos100.img", 192*1024, 0x1a586c64}
|
||||
{"AtariST", "the UK TOS 1.04 ROM", "tos104.img", 192*1024, 0xa50d1d43}
|
||||
};
|
||||
const auto roms = rom_fetcher(rom_descriptions);
|
||||
if(!roms[0]) {
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "../../../Outputs/Log.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
using namespace Atari::ST;
|
||||
|
||||
@ -377,9 +378,13 @@ void Video::Shifter::flush_output(OutputMode next_mode) {
|
||||
case OutputMode::Sync: crt_.output_sync(duration_); break;
|
||||
case OutputMode::Blank: crt_.output_blank(duration_); break;
|
||||
case OutputMode::Border: {
|
||||
uint16_t *const colour_pointer = reinterpret_cast<uint16_t *>(crt_.begin_data(1));
|
||||
if(colour_pointer) *colour_pointer = border_colour_;
|
||||
crt_.output_level(duration_);
|
||||
// if(!border_colour_) {
|
||||
// crt_.output_blank(duration_);
|
||||
// } else {
|
||||
uint16_t *const colour_pointer = reinterpret_cast<uint16_t *>(crt_.begin_data(1));
|
||||
if(colour_pointer) *colour_pointer = border_colour_;
|
||||
crt_.output_level(duration_);
|
||||
// }
|
||||
} break;
|
||||
case OutputMode::Pixels: {
|
||||
crt_.output_data(duration_, pixel_pointer_);
|
||||
@ -428,9 +433,34 @@ void Video::Shifter::output_border(int duration, OutputBpp bpp) {
|
||||
}
|
||||
|
||||
void Video::Shifter::output_pixels(int duration, OutputBpp bpp) {
|
||||
// If the shifter is empty, redirect this to an output_level call.
|
||||
// If the shifter is empty and there's no pixel buffer at present,
|
||||
// redirect this to an output_level call. Otherwise, do a quick
|
||||
// memset-type fill, since the special case has been detected anyway.
|
||||
if(!output_shifter_) {
|
||||
output_border(duration, bpp);
|
||||
if(!pixel_buffer_) {
|
||||
output_border(duration, bpp);
|
||||
} else {
|
||||
duration_ += duration;
|
||||
|
||||
switch(bpp_) {
|
||||
case OutputBpp::One: {
|
||||
const size_t pixels = size_t(duration << 1);
|
||||
memset(&pixel_buffer_[pixel_pointer_], 0, pixels * sizeof(uint16_t));
|
||||
pixel_pointer_ += pixels;
|
||||
} break;
|
||||
|
||||
default:
|
||||
case OutputBpp::Four:
|
||||
assert(!(duration & 1));
|
||||
duration >>= 1;
|
||||
case OutputBpp::Two: {
|
||||
while(duration--) {
|
||||
pixel_buffer_[pixel_pointer_] = palette_[0];
|
||||
++pixel_pointer_;
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableASanStackUseAfterReturn = "YES"
|
||||
|
Loading…
Reference in New Issue
Block a user