Skip to content

Commit

Permalink
amiga/amiga_m.cpp: impose DDFSTOP HW limit on bits 15-8 writes
Browse files Browse the repository at this point in the history
  • Loading branch information
angelosa committed Jan 25, 2025
1 parent a947564 commit 7441234
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
1 change: 1 addition & 0 deletions hash/amiga_cd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Intro and main menu use [Denise] BPLCON3 SPRESx
Optional [Denise] SHRES mode in gameplay
Editor and HD Install untested
]]></notes>
<!-- TODO: verify assign BrainDamage: "Brain Damage:" before install as Erratum note -->
<info name="usage" value="CD drawer default position needs to scroll right" />
<info name="developer" value="Mind's Eye Entertainment"/>
<part name="cdrom" interface="cdrom">
Expand Down
5 changes: 3 additions & 2 deletions hash/amigaaga_flop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ Some animations seems too fast
<year>1994</year>
<publisher>Virgin Interactive</publisher>
<notes><![CDATA[
Boots to a purple and blue flickering screen, [FDC] dsksync
Boots to a purple and blue flickering screen, [FDC] dsksync (fixed)
[keyboard] eats inputs on copy protection screens
]]></notes>
<info name="usage" value="Requires AGA" />
<info name="usage" value="Requires AGA, sports manual copy protection" />
<part name="flop1" interface="floppy_3_5">
<feature name="part_id" value="Disk 1" />
<dataarea name="flop" size="1049612">
Expand Down
3 changes: 2 additions & 1 deletion src/mame/amiga/amiga_m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,8 @@ void amiga_state::custom_chip_w(offs_t offset, uint16_t data)

case REG_DDFSTOP:
/* impose hardware limits ( HRM, page 75 ) */
data &= (IS_AGA() || IS_ECS()) ? 0xfe : 0xfc;
// amigaaga_flop:aladdin writes 0x0100 here, expecting the HW limit to hit instead
data &= (IS_AGA() || IS_ECS()) ? 0xfffe : 0xfffc;
if (data > 0xd8)
{
logerror("%s: Attempt to overrun DDFSTOP with %04x\n", machine().describe_context(), data);
Expand Down
42 changes: 27 additions & 15 deletions src/mame/amiga/paula.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
DMA driven audio, the floppy controller, a serial receiver/transmitter,
analog inputs and contains the interrupt controller.
References:
- https://www.amigarealm.com/computing/knowledge/hardref/ch5.htm
TODO:
- Inherit FDC, serial and irq controller to here;
- Move Agnus "location" logic out of here;
- low-pass filter control thru Amiga Power LED where available, technically
outside of Paula;
- Verify ADKCON modulation;
- Verify manual mode:
\- AGA roadkill during gameplay, which also has very long period setups,
extremely aliased;
- When a DMA stop occurs, is the correlated channel playback stopped
at the end of the current cycle or as soon as possible like current
implementation?
References:
- https://www.amigarealm.com/computing/knowledge/hardref/ch5.htm
TODO:
- Inherit FDC, serial and irq controller to here;
- Move Agnus "location" logic out of here;
- low-pass filter control thru Amiga Power LED where available, technically
outside of Paula;
- Verify ADKCON modulation;
- Verify manual mode;
- amigaaga_flop:roadkill gameplay sets up incredibly high period (-> low pitch)
samples (engine thrust, bumping into walls);
- When a DMA stop occurs, is the correlated channel playback stopped
at the end of the current cycle or as soon as possible like current
implementation?
******************************************************************************/

Expand Down Expand Up @@ -76,6 +76,18 @@ void paula_device::device_start()

// create the stream
m_stream = stream_alloc(0, 4, clock() / CLOCK_DIVIDER);

save_pointer(STRUCT_MEMBER(m_channel, loc), 4);
save_pointer(STRUCT_MEMBER(m_channel, len), 4);
save_pointer(STRUCT_MEMBER(m_channel, per), 4);
save_pointer(STRUCT_MEMBER(m_channel, vol), 4);
save_pointer(STRUCT_MEMBER(m_channel, curticks), 4);
save_pointer(STRUCT_MEMBER(m_channel, manualmode), 4);
save_pointer(STRUCT_MEMBER(m_channel, curlocation), 4);
save_pointer(STRUCT_MEMBER(m_channel, curlength), 4);
save_pointer(STRUCT_MEMBER(m_channel, dma_enabled), 4);
save_pointer(STRUCT_MEMBER(m_channel, atper), 4);
save_pointer(STRUCT_MEMBER(m_channel, atvol), 4);
}

void paula_device::device_reset()
Expand Down

0 comments on commit 7441234

Please sign in to comment.