mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-29 12:50:28 +00:00
Centralises responsibility for picking irrelevant numbers for a computer-style monitor.
This commit is contained in:
parent
af976b8b3d
commit
019474300d
@ -571,7 +571,7 @@ class ConcreteMachine:
|
|||||||
GPIP 0: centronics busy
|
GPIP 0: centronics busy
|
||||||
*/
|
*/
|
||||||
mfp_->set_port_input(
|
mfp_->set_port_input(
|
||||||
0x80 | // b7: Monochrome monitor detect (0 = is monochrome).
|
0x00 | // b7: Monochrome monitor detect (0 = is monochrome).
|
||||||
0x40 | // b6: RS-232 ring indicator.
|
0x40 | // b6: RS-232 ring indicator.
|
||||||
(dma_->get_interrupt_line() ? 0x00 : 0x20) | // b5: FD/HS interrupt (0 = interrupt requested).
|
(dma_->get_interrupt_line() ? 0x00 : 0x20) | // b5: FD/HS interrupt (0 = interrupt requested).
|
||||||
((keyboard_acia_->get_interrupt_line() || midi_acia_->get_interrupt_line()) ? 0x00 : 0x10) | // b4: Keyboard/MIDI interrupt (0 = interrupt requested).
|
((keyboard_acia_->get_interrupt_line() || midi_acia_->get_interrupt_line()) ? 0x00 : 0x10) | // b4: Keyboard/MIDI interrupt (0 = interrupt requested).
|
||||||
|
@ -121,13 +121,13 @@ const int load_delay_period = CYCLE(4); // Amount of time after DE that observe
|
|||||||
}
|
}
|
||||||
|
|
||||||
Video::Video() :
|
Video::Video() :
|
||||||
crt_(2048, 2, Outputs::Display::Type::PAL50, Outputs::Display::InputDataType::Red4Green4Blue4),
|
// crt_(2048, 2, Outputs::Display::Type::PAL50, Outputs::Display::InputDataType::Red4Green4Blue4),
|
||||||
// crt_(896, 1, 500, Outputs::Display::ColourSpace::YIQ, 100, 50, 5, false, Outputs::Display::InputDataType::Red4Green4Blue4),
|
crt_(896, 1, 500, 5, Outputs::Display::InputDataType::Red4Green4Blue4),
|
||||||
video_stream_(crt_, palette_) {
|
video_stream_(crt_, palette_) {
|
||||||
|
|
||||||
// Show a total of 260 lines; a little short for PAL but a compromise between that and the ST's
|
// Show a total of 260 lines; a little short for PAL but a compromise between that and the ST's
|
||||||
// usual output height of 200 lines.
|
// usual output height of 200 lines.
|
||||||
crt_.set_visible_area(crt_.get_rect_for_area(33, 260, 440, 1700, 4.0f / 3.0f));
|
// crt_.set_visible_area(crt_.get_rect_for_area(33, 260, 440, 1700, 4.0f / 3.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video::set_ram(uint16_t *ram, size_t size) {
|
void Video::set_ram(uint16_t *ram, size_t size) {
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Debug"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
enableASanStackUseAfterReturn = "YES"
|
enableASanStackUseAfterReturn = "YES"
|
||||||
|
@ -161,6 +161,18 @@ CRT::CRT( int cycles_per_line,
|
|||||||
set_new_display_type(cycles_per_line, display_type);
|
set_new_display_type(cycles_per_line, display_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CRT::CRT(int cycles_per_line,
|
||||||
|
int clocks_per_pixel_greatest_common_divisor,
|
||||||
|
int height_of_display,
|
||||||
|
int vertical_sync_half_lines,
|
||||||
|
Outputs::Display::InputDataType data_type) {
|
||||||
|
scan_target_modals_.input_data_type = data_type;
|
||||||
|
scan_target_modals_.cycles_per_line = cycles_per_line;
|
||||||
|
scan_target_modals_.clocks_per_pixel_greatest_common_divisor = clocks_per_pixel_greatest_common_divisor;
|
||||||
|
set_new_timing(cycles_per_line, height_of_display, Outputs::Display::ColourSpace::YIQ, 1, 1, vertical_sync_half_lines, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// MARK: - Sync loop
|
// MARK: - Sync loop
|
||||||
|
|
||||||
Flywheel::SyncEvent CRT::get_next_vertical_sync_event(bool vsync_is_requested, int cycles_to_run_for, int *cycles_advanced) {
|
Flywheel::SyncEvent CRT::get_next_vertical_sync_event(bool vsync_is_requested, int cycles_to_run_for, int *cycles_advanced) {
|
||||||
|
@ -123,6 +123,15 @@ class CRT {
|
|||||||
bool should_alternate,
|
bool should_alternate,
|
||||||
Outputs::Display::InputDataType data_type);
|
Outputs::Display::InputDataType data_type);
|
||||||
|
|
||||||
|
/*! Constructs a monitor-style CRT — one that will take only an RGB or monochrome signal, and therefore has
|
||||||
|
no colour space or colour subcarrier frequency. This monitor will automatically map colour bursts to the black level.
|
||||||
|
*/
|
||||||
|
CRT(int cycles_per_line,
|
||||||
|
int clocks_per_pixel_greatest_common_divisor,
|
||||||
|
int height_of_display,
|
||||||
|
int vertical_sync_half_lines,
|
||||||
|
Outputs::Display::InputDataType data_type);
|
||||||
|
|
||||||
/*! Exactly identical to calling the designated constructor with colour subcarrier information
|
/*! Exactly identical to calling the designated constructor with colour subcarrier information
|
||||||
looked up by display type.
|
looked up by display type.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user