Skip to content

Commit

Permalink
amiga/agnus_copper.cpp: 0x5c is actual h blank minimum position
Browse files Browse the repository at this point in the history
  • Loading branch information
angelosa committed Jan 14, 2025
1 parent ed86f1d commit faeca8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/mame/amiga/agnus_copper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,9 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy,
return xpos;
}
// delay write to the next available DMA slot if not in blanking area
// - bchvolly (title), suprfrog & abreed (bottom playfield rows)
const bool horizontal_blank = xpos < 0x47;
// - 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);

m_pending_offset = word0;
Expand Down Expand Up @@ -358,7 +359,7 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy,
/* handle a wait */
if ((word1 & 1) == 0)
{
const bool horizontal_blank = xpos < 0x47;
const bool horizontal_blank = xpos <= 0x5c;
const int wait_offset = horizontal_blank ? 0 : std::max(num_planes - 4, 0) + 1;

LOGINST(" WAIT %04x & %04x (currently %04x, num planes %d +%d)\n",
Expand Down
8 changes: 7 additions & 1 deletion src/mame/amiga/amiga_m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,11 @@ void amiga_state::aga_map(address_map &map)

void amiga_state::custom_chip_reset()
{
// TODO: not entirely correct
// - OCS Denise returns open bus
// - ECS Denise should return 0xff << 8 | ID
// - AGA Lisa bits 15-10 are jumper selectable (at least on A4000), returns 0xfc << 8 | ID
// cfr. https://eab.abime.net/showpost.php?p=627136&postcount=59
CUSTOM_REG(REG_DENISEID) = m_denise_id;
CUSTOM_REG(REG_VPOSR) = m_agnus_id << 8;
CUSTOM_REG(REG_DDFSTRT) = 0x18;
Expand Down Expand Up @@ -1367,7 +1372,8 @@ uint16_t amiga_state::custom_chip_r(offs_t offset)
temp = CUSTOM_REG(REG_CLXDAT);
if (!machine().side_effects_disabled())
CUSTOM_REG(REG_CLXDAT) = 0;
// - "Barney [& Freddy] Mouse" requires bit 15 high all the time
// Undocumented bit 15 always high
// - "Barney [& Freddy] Mouse" will always detect a player-enemy hit out of iframe cycles otherwise
return temp | (1 << 15);

case REG_DENISEID:
Expand Down

0 comments on commit faeca8f

Please sign in to comment.