Fixed gtrak10 video. (#10022)

* Fixed gtrak10 video.
* fix visible area 
* fix display of finish line, disable hack
This commit is contained in:
couriersud 2022-07-02 14:48:44 +02:00 committed by GitHub
parent 5cae050f60
commit 16058c2380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 22 deletions

View File

@ -89,6 +89,7 @@ void fixedfreq_monitor_state::update_sync_channel(const time_type &time, const d
const auto avg_line_dur = (time - m_last_field_time) * m_desc.m_fieldcount / (m_last_y + 1);
m_last_field_time = time;
m_sig_field = avg_line_dur * 0.75 > m_last_line_duration;
LOG("%d %f %f %f\n", m_sig_field, m_last_line_duration, avg_line_dur, time);
}
if (!has_fields || (m_sig_field == 0))
{
@ -107,12 +108,12 @@ void fixedfreq_monitor_state::update_sync_channel(const time_type &time, const d
if (m_sig_vsync)
LOG("Hsync in vsync\n");
//LOG("HSYNC up %d\n", m_last_x);
// FIXME: pixels > 50 filters some spurious hysnc on line 23/24 in breakout
// FIXME: pixels > 0 filters some spurious hysnc on line 23/24 in breakout
// The hsync signal transition from high to low is 7 pixels too
// early, goes up again after 6.8 pix and down after 7.2 pix.
// Therefore we need to filter early low to high transitions
// and base hsync on the start of the hsync signal.
if (!m_sig_vsync && (m_last_x > m_desc.m_hscale * 100))
if (!m_sig_vsync && (m_last_x > 0))
{
m_last_y += m_desc.m_fieldcount;
m_last_x = 0;

View File

@ -107,17 +107,8 @@ namespace {
#define TANK_HTOTAL (952)
#define TANK_VTOTAL (262)
#define GTRAK10_VIDCLOCK 14318181
#define GTRAK10_VIDCLOCK (14318181 / 2)
#define GTRAK10_HTOTAL 451
//#define GTRAK10_HTOTAL 902
// 451 only displays half of the frame
// should be GTRAK10_HTOTAL 902 but that causes screen to disappear after 1 frame,
// possibly fixfreq.h vsync filter/vsync time constant formula
// double vsync_filter_timeconst() const noexcept
// {
//// //return (double) (m_monitor_clock) / ((double) m_hbackporch * vsync_width()); // original formula
// return (double) (m_monitor_clock) / (double) (hvisible_width()); // vsync will work with gtrak10
// }
#define GTRAK10_VTOTAL 521
class atarikee_state : public driver_device
@ -293,26 +284,27 @@ void gtrak10_state::gtrak10(machine_config &config)
Pixel Clock = 14.318MHz
Horiz Total = 451
Horiz Front Porch = 0
Horiz Sync = 1
Horiz Back Porch = 31
Horiz Front Porch = ?
Horiz Sync = 32
Horiz Back Porch = ?
Vert Total = 521
Vert Front Porch = 0
Vert Sync = 8
Vert Back Porch = 0
Vert Front Porch = ?
Vert Sync = 4
Vert Back Porch = ?
*/
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
FIXFREQ(config, m_video).set_screen("screen");
m_video->set_monitor_clock(GTRAK10_VIDCLOCK);
// Length of active video, end of front-porch, end of sync signal, end of line/frame
m_video->set_horz_params(GTRAK10_HTOTAL*1 - 32, GTRAK10_HTOTAL*1 - 32, GTRAK10_HTOTAL*1 - 31, GTRAK10_HTOTAL*1);
//m_video->set_horz_params(GTRAK10_HTOTAL - 32, GTRAK10_HTOTAL - 32, GTRAK10_HTOTAL - 31, GTRAK10_HTOTAL);
m_video->set_vert_params( GTRAK10_VTOTAL - 8, GTRAK10_VTOTAL - 8, GTRAK10_VTOTAL, GTRAK10_VTOTAL);
m_video->set_horz_params(GTRAK10_HTOTAL - 96, GTRAK10_HTOTAL - 64, GTRAK10_HTOTAL - 32, GTRAK10_HTOTAL);
m_video->set_vert_params( GTRAK10_VTOTAL - 32, GTRAK10_VTOTAL - 8, GTRAK10_VTOTAL - 4, GTRAK10_VTOTAL);
m_video->set_fieldcount(2);
m_video->set_threshold(1.0);
m_video->set_gain(1.50);
m_video->set_vsync_threshold(0.1);
m_video->set_horz_scale(2);
}
static INPUT_PORTS_START( gtrak10 )

View File

@ -15,8 +15,10 @@
// To fill in some questions about the gtrak10 schematic, referencing the lemans schematic is helpful.
// Couriersud: No jumping here
// FXIME: Remove hack completely
// use this hack to stop horizontal jumping due to netlist timing problems
#define HORIZ_COUNTER_ADJ_HACK // use 1 less than normal 450, substitute 1V instead of 2V, changes netlist timing
//#define HORIZ_COUNTER_ADJ_HACK // use 1 less than normal 450, substitute 1V instead of 2V, changes netlist timing
#define GTRAK10_CLOCK 14318181