mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-09 05:25:01 +00:00
Adjusts vertical timing for display height.
This commit is contained in:
@@ -191,11 +191,27 @@ void TMS9918::run_for(const HalfCycles cycles) {
|
|||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
// Latch scrolling position, if necessary.
|
// Latch scrolling position, if necessary.
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
if(write_pointer_.column < 61 && end_column >= 61) {
|
if(is_sega_vdp(personality_)) {
|
||||||
if(!write_pointer_.row) {
|
if(write_pointer_.column < 61 && end_column >= 61) {
|
||||||
master_system_.latched_vertical_scroll = master_system_.vertical_scroll;
|
if(!write_pointer_.row) {
|
||||||
|
master_system_.latched_vertical_scroll = master_system_.vertical_scroll;
|
||||||
|
|
||||||
|
if(master_system_.mode4_enable) {
|
||||||
|
mode_timing_.pixel_lines = 192;
|
||||||
|
if(mode2_enable_ && mode1_enable_) mode_timing_.pixel_lines = 224;
|
||||||
|
if(mode2_enable_ && mode3_enable_) mode_timing_.pixel_lines = 240;
|
||||||
|
|
||||||
|
mode_timing_.sprite_terminator = 0xd0;
|
||||||
|
if(mode_timing_.pixel_lines != 192) {
|
||||||
|
mode_timing_.sprite_terminator = 0xf0;
|
||||||
|
}
|
||||||
|
mode_timing_.first_vsync_line = (mode_timing_.total_lines + mode_timing_.pixel_lines) >> 1;
|
||||||
|
|
||||||
|
mode_timing_.end_of_frame_interrupt_position.row = mode_timing_.pixel_lines + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
line_buffer.latched_horizontal_scroll = master_system_.horizontal_scroll;
|
||||||
}
|
}
|
||||||
line_buffer.latched_horizontal_scroll = master_system_.horizontal_scroll;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -280,9 +280,6 @@ class Base {
|
|||||||
|
|
||||||
if(is_sega_vdp(personality_) && master_system_.mode4_enable) {
|
if(is_sega_vdp(personality_) && master_system_.mode4_enable) {
|
||||||
screen_mode_ = ScreenMode::SMSMode4;
|
screen_mode_ = ScreenMode::SMSMode4;
|
||||||
mode_timing_.pixel_lines = 192;
|
|
||||||
if(mode2_enable_ && mode1_enable_) mode_timing_.pixel_lines = 224;
|
|
||||||
if(mode2_enable_ && mode3_enable_) mode_timing_.pixel_lines = 240;
|
|
||||||
mode_timing_.maximum_visible_sprites = 8;
|
mode_timing_.maximum_visible_sprites = 8;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user