amiga/amiga_m.cpp: disable DMA reload on SPRxPOS (Copper) writes

This commit is contained in:
angelosa 2025-01-06 21:36:23 +01:00
parent 71fe25f95b
commit b5ffdb3e08
3 changed files with 27 additions and 11 deletions

View File

@ -1689,9 +1689,9 @@ ATK test: C:0 H:U Bad
<year>1991</year>
<publisher>Team 17</publisher>
<notes><![CDATA[
Throws "amiga_fdc_device::live_run - cur_live.bit_counter > 8" after credits display
Throws "amiga_fdc_device::live_run - cur_live.bit_counter > 8" after credits display (worked around)
Motor keeps spinning badly on disk swap screen(s) (verify)
No player sprite, red dots incorrectly drawn on several elements during gameplay (namely alien enemies)
Glitchy [Copper] on bottom part of screen, may use SKIP
ATK test: OK
]]></notes>
<part name="flop1" interface="floppy_3_5">
@ -2726,7 +2726,7 @@ ATK test: failed
<publisher>Virgin</publisher>
<notes><![CDATA[
Guru Meditation 00000004.00001970 at bootup
[Copper] cuts bottom part of screen badly during gameplay
[Copper] cuts bottom part of screen badly during gameplay, uses SKIP
ATK test: OK
]]></notes>
<part name="flop1" interface="floppy_3_5">
@ -7829,7 +7829,7 @@ Fatal errors in ipf_decode::generate_timings type 4
new68k: white screen
Title screen background glitches out [Copper]
Map screen mosaic effect is off [Copper]
Gameplay has no [Denise] sprites [Copper]
Gameplay missing [Denise] lives counter, missing background [Copper]
https://codetapper.com/amiga/sprite-tricks/brian-the-lion/
ATK test: OK
]]></notes>
@ -43752,9 +43752,10 @@ ATK test: OK
<publisher>Psygnosis</publisher>
<notes><![CDATA[
Red screen, [FDC] dsksync (fixed)
Title screen shows with foreground garbage, [Copper] sprites
Title screen shows with foreground garbage, bad [FDC] data?
https://codetapper.com/amiga/sprite-tricks/shadow-of-the-beast/
Hangs during first intro in gameplay, verify [DSKDAT R] access
Hangs during first intro in gameplay
Split up [Denise] bitplanes on a top row, [Copper]?
ATK test: failed
]]></notes>
<part name="flop1" interface="floppy_3_5">
@ -49335,8 +49336,9 @@ ATK test: OK
<year>1993</year>
<publisher>Team 17</publisher>
<notes><![CDATA[
Red screen [FDC] dsksync
Has serious GFX pitch issues on gameplay, no sprites with a500p (update: regressed with a500 too, [Copper]?)
Red screen [FDC] dsksync (fixed?)
a500: no main sprite (works with a500p, a1200)
[Copper] cuts bottom part of screen badly during gameplay, may use SKIP
ATK test: failed
]]></notes>
<part name="flop1" interface="floppy_3_5">

View File

@ -1545,9 +1545,21 @@ void amiga_state::custom_chip_w(offs_t offset, uint16_t data)
case REG_SPR0DATA: case REG_SPR1DATA: case REG_SPR2DATA: case REG_SPR3DATA:
case REG_SPR4DATA: case REG_SPR5DATA: case REG_SPR6DATA: case REG_SPR7DATA:
{
/* enable comparitor on writes here */
sprite_enable_comparitor((offset - REG_SPR0DATA) / 4, true);
break;
}
case REG_SPR0POS: case REG_SPR1POS: case REG_SPR2POS: case REG_SPR3POS:
case REG_SPR4POS: case REG_SPR5POS: case REG_SPR6POS: case REG_SPR7POS:
{
// a bunch of games override position thru copper
// suprfrog, abreed, brian, jimpower (lives counter)
int which = (offset - REG_SPR0POS) / 4;
m_sprite_dma_reload_mask &= ~(1 << which);
break;
}
case REG_DDFSTRT:
/* impose hardware limits ( HRM, page 75 ) */

View File

@ -607,14 +607,16 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline)
// this is also unaffected by LACE
if ((raw_scanline & 1) == 0)
{
const int min_x = 0x18 << 1;
const int max_x = 0x34 << 1;
// TODO: refine
// Sprite DMA loads first two words at $14 + num * 4, other 2 words at $18 + num * 4
// NOTE: position $28 for sprite 4 has a typo on HRM diagram
// non-zero DMA fetches are required by:
// - beast gameplay, suprfrog player sprite, abreed (top left counter)
if (x >= 0x18 && x <= 0x34 && (x & 3) == 0)
// - beast gameplay, abreed (top left counter)
if (x >= min_x && x <= max_x && (x & 7) == 0)
{
int num = (x - 0x18) >> 2;
int num = (x - min_x) >> 3;
//printf("%d %02x\n", num, x);
update_sprite_dma(raw_scanline >> 1, num);
}