mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +00:00
Corrects Macintosh aspect ratio (and framing).
This commit is contained in:
parent
39aae34323
commit
f6f9024631
@ -89,7 +89,7 @@ void z8530::write(int address, std::uint8_t value) {
|
||||
break;
|
||||
|
||||
case 9: // Master interrupt and reset register; also shared between both channels.
|
||||
LOG("[SCC] TODO: master interrupt and reset register " << PADHEX(2) << int(value));
|
||||
LOG("[SCC] Master interrupt and reset register: " << PADHEX(2) << int(value));
|
||||
master_interrupt_control_ = value;
|
||||
break;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ uint8_t IWM::read(int address) {
|
||||
//
|
||||
case CA2|CA1: // Single- or double-sided drive.
|
||||
LOG("single- or double-sided drive)");
|
||||
sense = drives_[active_drive_] && (drives_[active_drive_]->get_head_count() == 1) ? 0x00 : 0x80;
|
||||
sense = drives_[active_drive_] && (drives_[active_drive_]->get_head_count() == 1) ? 0x80 : 0x00;
|
||||
break;
|
||||
|
||||
case CA2|CA1|CA0: // Drive installed. (per the Mac Plus ROM)
|
||||
|
@ -102,7 +102,7 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
|
||||
Memory::PackBigEndian16(*roms[0], rom_);
|
||||
|
||||
// Randomise memory contents.
|
||||
Memory::Fuzz(ram_, sizeof(ram_));
|
||||
Memory::Fuzz(ram_, sizeof(ram_) / sizeof(*ram_));
|
||||
|
||||
// Attach the drives to the IWM.
|
||||
iwm_.iwm.set_drive(0, &drives_[0]);
|
||||
|
@ -40,7 +40,8 @@ Video::Video(uint16_t *ram, DeferredAudio &audio, DriveSpeedAccumulator &drive_s
|
||||
ram_(ram) {
|
||||
|
||||
crt_.set_display_type(Outputs::Display::DisplayType::RGB);
|
||||
crt_.set_visible_area(Outputs::Display::Rect(0.02f, 0.025f, 0.94f, 0.94f));
|
||||
crt_.set_visible_area(Outputs::Display::Rect(0.08f, -0.025f, 0.82f, 0.82f));
|
||||
crt_.set_aspect_ratio(1.73f); // The Mac uses a non-standard scanning area.
|
||||
}
|
||||
|
||||
void Video::set_scan_target(Outputs::Display::ScanTarget *scan_target) {
|
||||
|
@ -69,7 +69,7 @@
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableASanStackUseAfterReturn = "YES"
|
||||
|
@ -78,6 +78,11 @@ void CRT::set_new_data_type(Outputs::Display::InputDataType data_type) {
|
||||
scan_target_->set_modals(scan_target_modals_);
|
||||
}
|
||||
|
||||
void CRT::set_aspect_ratio(float aspect_ratio) {
|
||||
scan_target_modals_.aspect_ratio = aspect_ratio;
|
||||
scan_target_->set_modals(scan_target_modals_);
|
||||
}
|
||||
|
||||
void CRT::set_visible_area(Outputs::Display::Rect visible_area) {
|
||||
scan_target_modals_.visible_area = visible_area;
|
||||
scan_target_->set_modals(scan_target_modals_);
|
||||
|
@ -146,6 +146,10 @@ class CRT {
|
||||
*/
|
||||
void set_new_data_type(Outputs::Display::InputDataType data_type);
|
||||
|
||||
/*! Sets the CRT's intended aspect ratio — 4.0/3.0 by default.
|
||||
*/
|
||||
void set_aspect_ratio(float aspect_ratio);
|
||||
|
||||
/*! Output at the sync level.
|
||||
|
||||
@param number_of_cycles The amount of time to putput sync for.
|
||||
|
@ -23,7 +23,7 @@ void ScanTarget::set_uniforms(ShaderType type, Shader &target) const {
|
||||
case ShaderType::Composition: break;
|
||||
default:
|
||||
target.set_uniform("rowHeight", GLfloat(1.05f / modals_.expected_vertical_lines));
|
||||
target.set_uniform("scale", GLfloat(modals_.output_scale.x), GLfloat(modals_.output_scale.y));
|
||||
target.set_uniform("scale", GLfloat(modals_.output_scale.x), GLfloat(modals_.output_scale.y) * modals_.aspect_ratio * (3.0f / 4.0f));
|
||||
target.set_uniform("phaseOffset", GLfloat(modals_.input_data_tweaks.phase_linked_luminance_offset));
|
||||
|
||||
const float clocks_per_angle = float(modals_.cycles_per_line) * float(modals_.colour_cycle_denominator) / float(modals_.colour_cycle_numerator);
|
||||
|
@ -190,6 +190,9 @@ struct ScanTarget {
|
||||
struct {
|
||||
uint16_t x, y;
|
||||
} output_scale;
|
||||
|
||||
/// Describes the intended display aspect ratio.
|
||||
float aspect_ratio = 4.0f / 3.0f;
|
||||
};
|
||||
|
||||
/// Sets the total format of input data.
|
||||
|
@ -289,7 +289,15 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
||||
}
|
||||
|
||||
#ifdef LOG_TRACE
|
||||
should_log |= (program_counter_.full - 4) == 0x401A84;
|
||||
const uint32_t fetched_pc = (program_counter_.full - 4)&0xffffff;
|
||||
|
||||
//1300
|
||||
should_log = (fetched_pc >= 0x400D9A) && (fetched_pc <= 0x400EAA);
|
||||
// == 0x0003ea);
|
||||
// should_log |=
|
||||
// (((program_counter_.full - 4)&0xffffff) == 0x418CDE) || // E_Sony_RdData
|
||||
// (((program_counter_.full - 4)&0xffffff) == 0x4182DC) || // E_Sony_ReSeek
|
||||
// (((program_counter_.full - 4)&0xffffff) == 0x418C18); // E_Sony_RdAddr
|
||||
//4176b6
|
||||
// should_log |= (program_counter_.full - 4) == 0x418A0A;//0x41806A;//180A2;
|
||||
// should_log = ((program_counter_.full - 4) >= 0x417D9E) && ((program_counter_.full - 4) <= 0x419D96);
|
||||
|
Loading…
x
Reference in New Issue
Block a user