diff --git a/hash/amiga_cd.xml b/hash/amiga_cd.xml index f5e393fc3e357..b7cfdce619c21 100644 --- a/hash/amiga_cd.xml +++ b/hash/amiga_cd.xml @@ -108,8 +108,9 @@ cd32: unsupported [Akiko] close tray after CD32 BIOS plays back music, will othe APC & TCP diff --git a/hash/amigaaga_flop.xml b/hash/amigaaga_flop.xml index 73f83e3058f1e..e3500194ac60c 100644 --- a/hash/amigaaga_flop.xml +++ b/hash/amigaaga_flop.xml @@ -8,6 +8,9 @@ license:CC0-1.0 The software listed here is not designed for use on systems without the AGA chipset and will not function. + + Note: + - Please use [Lisa] / [Alice] tag where issues are specifically for amiga/amigaaga.cpp --> @@ -2529,7 +2532,7 @@ Red screen when "Out to lunch is loading" displays, [FDC] 1995 21st Century Entertainment @@ -3638,7 +3641,7 @@ ATK test: C:0 H:U Bad 1996 21st Century @@ -4990,8 +4993,8 @@ Pressing TAB key will switch to NTSC mode (?), which cuts off bottom of screen Edgar Vigdal diff --git a/src/mame/amiga/agnus_copper.cpp b/src/mame/amiga/agnus_copper.cpp index 852aed154b02c..fe030477f5a32 100644 --- a/src/mame/amiga/agnus_copper.cpp +++ b/src/mame/amiga/agnus_copper.cpp @@ -233,10 +233,14 @@ void agnus_copper_device::copins_w(u16 data) //************************************************************************** // executed on scanline == 0 -void agnus_copper_device::vblank_sync() +void agnus_copper_device::vblank_sync(bool state) { - set_pc(0, true); - m_xpos_state = 0; + if (state) + { + set_pc(0, true); + m_xpos_state = 0; + } + m_vertical_blank = state; } // check current copper cycle at end of scanline @@ -343,7 +347,7 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy, // - suprfrog & abreed (bottom playfield rows). // - beast, biochall and cd32 bios wants this to be 0x5c const bool horizontal_blank = xpos <= 0x5c; - const int move_offset = horizontal_blank ? 0 : std::max(num_planes - 4, 0); + const int move_offset = horizontal_blank || m_vertical_blank ? 0 : std::max(num_planes - 4, 0); m_pending_offset = word0; m_pending_data = word1; @@ -376,7 +380,7 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy, if ((word1 & 1) == 0) { const bool horizontal_blank = xpos <= 0x5c; - const int wait_offset = horizontal_blank ? 0 : std::max(num_planes - 4, 0) + 1; + const int wait_offset = horizontal_blank || m_vertical_blank ? 0 : std::max(num_planes - 4, 0) + 1; LOGINST(" WAIT %04x & %04x (currently %04x, num planes %d +%d)\n", m_waitval, diff --git a/src/mame/amiga/agnus_copper.h b/src/mame/amiga/agnus_copper.h index 064b7ee6e8068..30e0d9be79540 100644 --- a/src/mame/amiga/agnus_copper.h +++ b/src/mame/amiga/agnus_copper.h @@ -32,7 +32,7 @@ class agnus_copper_device : public device_t void copcon_w(u16 data); // getters/setters - void vblank_sync(); + void vblank_sync(bool state); int execute_next(int xpos, int ypos, bool is_blitter_busy, int num_planes); void suspend_offset(int xpos, int hblank_width); int restore_offset(); @@ -72,6 +72,7 @@ class agnus_copper_device : public device_t u16 m_pending_offset; u16 m_pending_data; u16 m_xpos_state; + bool m_vertical_blank; }; diff --git a/src/mame/amiga/amiga.h b/src/mame/amiga/amiga.h index c9638e68a2959..b7f18bde8aa08 100644 --- a/src/mame/amiga/amiga.h +++ b/src/mame/amiga/amiga.h @@ -434,6 +434,9 @@ class amiga_state : public driver_device void amiga_palette(palette_device &palette) const; uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + bool get_screen_standard(); + int get_screen_vblank_line(); void update_screenmode(); TIMER_CALLBACK_MEMBER( scanline_callback ); diff --git a/src/mame/amiga/amiga_v.cpp b/src/mame/amiga/amiga_v.cpp index 552e9686da075..b96cf93a98e71 100644 --- a/src/mame/amiga/amiga_v.cpp +++ b/src/mame/amiga/amiga_v.cpp @@ -493,7 +493,7 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline) CUSTOM_REG(REG_VPOSR) ^= VPOSR_LOF; // reset copper and ham color - m_copper->vblank_sync(); + m_copper->vblank_sync(true); m_ham_color = CUSTOM_REG(REG_COLOR00); } @@ -526,6 +526,10 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline) scanline /= 2; + // notify copper that we are not in vblank anymore + if (scanline == get_screen_vblank_line()) + m_copper->vblank_sync(false); + m_last_scanline = scanline; /* all sprites off at the start of the line */ @@ -904,17 +908,24 @@ uint32_t amiga_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, return 0; } -void amiga_state::update_screenmode() +bool amiga_state::get_screen_standard() { - bool pal; - - // first let's see if we're PAL or NTSC + // we support dynamic switching between PAL and NTSC, determine mode from register if (m_agnus_id >= AGNUS_HR_PAL) - // we support dynamic switching between PAL and NTSC, determine mode from register - pal = CUSTOM_REG(REG_BEAMCON0) & 0x20; - else - // old agnus, agnus id determines PAL or NTSC - pal = !(m_agnus_id & 0x10); + return CUSTOM_REG(REG_BEAMCON0) & 0x20; + + // old agnus, agnus id determines PAL or NTSC + return !(m_agnus_id & 0x10); +} + +int amiga_state::get_screen_vblank_line() +{ + return get_screen_standard() ? amiga_state::VBLANK_PAL : amiga_state::VBLANK_NTSC; +} + +void amiga_state::update_screenmode() +{ + bool pal = get_screen_standard(); // basic height & vblank length int height = pal ? SCREEN_HEIGHT_PAL : SCREEN_HEIGHT_NTSC; diff --git a/src/mame/amiga/amigaaga.cpp b/src/mame/amiga/amigaaga.cpp index f99134e3728d7..3fd177213e5b9 100644 --- a/src/mame/amiga/amigaaga.cpp +++ b/src/mame/amiga/amigaaga.cpp @@ -486,7 +486,7 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline) if (CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE) CUSTOM_REG(REG_VPOSR) ^= VPOSR_LOF; - m_copper->vblank_sync(); + m_copper->vblank_sync(true); m_ham_color = CUSTOM_REG(REG_COLOR00); } @@ -519,6 +519,9 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline) scanline /= 2; + if (scanline == get_screen_vblank_line()) + m_copper->vblank_sync(false); + m_last_scanline = scanline; /* all sprites off at the start of the line */ @@ -608,7 +611,7 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline) x, m_last_scanline & 0xff, bool(BIT(CUSTOM_REG(REG_DMACON), 14)), // BBUSY - planes + bitplane_fmode ? 0 : planes ); save_color0 = CUSTOM_REG(REG_COLOR00); if (m_genlock_color != 0xffff)