diff --git a/src/mame/atari/atari400.cpp b/src/mame/atari/atari400.cpp index 9f184ee844e..715ce078956 100644 --- a/src/mame/atari/atari400.cpp +++ b/src/mame/atari/atari400.cpp @@ -275,6 +275,10 @@ public: void xegs(machine_config &config); void a400(machine_config &config); +protected: + void config_ntsc_screen(machine_config &config); + void config_pal_screen(machine_config &config); + private: DECLARE_MACHINE_START(a400); DECLARE_MACHINE_START(a800); @@ -2121,6 +2125,21 @@ void a400_state::a800xl_pia_pb_w(uint8_t data) * **************************************************************/ +// note: both screen setups are actually non-interlaced +void a400_state::config_ntsc_screen(machine_config &config) +{ + // 15.69975KHz x 59.9271 Hz + m_screen->set_raw(XTAL(14'318'181), 912, antic_device::MIN_X, antic_device::MAX_X, 262, antic_device::MIN_Y, antic_device::MAX_Y); + m_gtia->set_region(GTIA_NTSC); +} + +void a400_state::config_pal_screen(machine_config &config) +{ + // 15.55655KHz x 49.86074 Hz, master clock rated at 14.18757 MHz + // TODO: must have bigger vertical overscan, confirm hsync + m_screen->set_raw(XTAL(3'546'800) * 4, 912, antic_device::MIN_X, antic_device::MAX_X, 312, antic_device::MIN_Y, antic_device::MAX_Y); + m_gtia->set_region(GTIA_PAL); +} void a400_state::atari_common_nodac(machine_config &config) { @@ -2131,8 +2150,10 @@ void a400_state::atari_common_nodac(machine_config &config) /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1)); - m_screen->set_visarea(antic_device::MIN_X, antic_device::MAX_X, antic_device::MIN_Y, antic_device::MAX_Y); + //m_screen->set_raw(XTAL(1'797'100), 912, antic_device::MIN_X, antic_device::MAX_X, 262, antic_device::MIN_Y, antic_device::MAX_Y); + // TODO: 312 for PAL + //m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(1)); + //m_screen->set_visarea(antic_device::MIN_X, antic_device::MAX_X, antic_device::MIN_Y, antic_device::MAX_Y); m_screen->set_screen_update("antic", FUNC(antic_device::screen_update)); m_screen->set_palette("palette"); @@ -2209,10 +2230,11 @@ void a400_state::a400(machine_config &config) MCFG_MACHINE_START_OVERRIDE( a400_state, a400 ) - m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); + config_ntsc_screen(config); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); - m_gtia->set_region(GTIA_NTSC); +// m_gtia->set_region(GTIA_NTSC); } // memory map A400 + PAL screen @@ -2225,10 +2247,11 @@ void a400_state::a400pal(machine_config &config) MCFG_MACHINE_START_OVERRIDE( a400_state, a400 ) - m_screen->set_refresh_hz(antic_device::FRAME_RATE_50HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_50HZ); + config_pal_screen(config); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_50HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_50HZ); - m_gtia->set_region(GTIA_PAL); +// m_gtia->set_region(GTIA_PAL); } // memory map A800 + NTSC screen + Right cartslot @@ -2241,10 +2264,11 @@ void a400_state::a800(machine_config &config) MCFG_MACHINE_START_OVERRIDE( a400_state, a800 ) - m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); + config_ntsc_screen(config); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); - m_gtia->set_region(GTIA_NTSC); +// m_gtia->set_region(GTIA_NTSC); A800_CART_SLOT(config, "cartright", a800_right, nullptr); } @@ -2260,10 +2284,11 @@ void a400_state::a800pal(machine_config &config) MCFG_MACHINE_START_OVERRIDE( a400_state, a800 ) - m_screen->set_refresh_hz(antic_device::FRAME_RATE_50HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_50HZ); + config_pal_screen(config); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_50HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_50HZ); - m_gtia->set_region(GTIA_PAL); +// m_gtia->set_region(GTIA_PAL); A800_CART_SLOT(config, "cartright", a800_right, nullptr); } @@ -2281,10 +2306,12 @@ void a400_state::a600xl(machine_config &config) MCFG_MACHINE_START_OVERRIDE( a400_state, a800xl ) - m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); + config_ntsc_screen(config); - m_gtia->set_region(GTIA_NTSC); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); + +// m_gtia->set_region(GTIA_NTSC); m_ram->set_default_size("16K"); } @@ -2303,10 +2330,12 @@ void a400_state::a800xl(machine_config &config) m_ram->set_default_size("64K"); - m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); + config_ntsc_screen(config); - m_gtia->set_region(GTIA_NTSC); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); + +// m_gtia->set_region(GTIA_NTSC); } @@ -2317,10 +2346,11 @@ void a400_state::a800xlpal(machine_config &config) m_maincpu->set_clock(1773000); - m_screen->set_refresh_hz(antic_device::FRAME_RATE_50HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_50HZ); + config_pal_screen(config); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_50HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_50HZ); - m_gtia->set_region(GTIA_PAL); +// m_gtia->set_region(GTIA_PAL); m_pokey->set_clock(1773000); } @@ -2373,15 +2403,16 @@ void a400_state::a5200(machine_config &config) m_pokey->add_route(ALL_OUTPUTS, "speaker", 1.0); ATARI_GTIA(config, m_gtia, 0); - m_gtia->set_region(GTIA_NTSC); +// m_gtia->set_region(GTIA_NTSC); ATARI_ANTIC(config, m_antic, 0); m_antic->set_gtia_tag(m_gtia); MCFG_MACHINE_START_OVERRIDE( a400_state, a5200 ) - m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); - m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); + config_ntsc_screen(config); +// m_screen->set_refresh_hz(antic_device::FRAME_RATE_60HZ); +// m_screen->set_size(antic_device::HWIDTH * 8, antic_device::TOTAL_LINES_60HZ); A5200_CART_SLOT(config, "cartleft", a5200_carts, nullptr); diff --git a/src/mame/atari/gtia.cpp b/src/mame/atari/gtia.cpp index a644a381d85..68f4207060e 100644 --- a/src/mame/atari/gtia.cpp +++ b/src/mame/atari/gtia.cpp @@ -944,7 +944,7 @@ inline void gtia_device::player_render(uint8_t gfx, u8 size_index, uint8_t color // size is the number of bits in *dst to be filled: 1, 2 or 4 // x0 normal width // 01 double width - // 11 quaduple width + // 11 quadruple width // jmpmanjr sets all sizes to 10, still expecting it to be normal width const u8 sizes[4] = { 1, 2, 1, 4 }; const int size = sizes[size_index & 3];