Skip to content

Commit

Permalink
amiga/paula.cpp: trigger an irq if channel DMA gets disabled during p…
Browse files Browse the repository at this point in the history
…layback
  • Loading branch information
angelosa committed Jan 31, 2025
1 parent 33a77cc commit 7ce0513
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
14 changes: 9 additions & 5 deletions src/mame/amiga/paula.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// license: BSD-3-Clause
// copyright-holders: Aaron Giles, Dirk Best
// copyright-holders: Aaron Giles, Dirk Best, Angelo Salese
/******************************************************************************
MOS Technology/Commodore 8364 "Paula"
Expand All @@ -14,16 +14,13 @@
TODO:
- Inherit FDC, serial and irq controller to here;
- Move Agnus "location" logic out of here;
- Move Agnus "location" logic out of here, add AUDxDR / AUDxDSR pin logic;
- 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 @@ -194,6 +191,13 @@ void paula_device::dmacon_set(u16 data)
if (!chan->dma_enabled && ((data >> channum) & 1))
dma_reload(chan, true);

// https://eab.abime.net/showthread.php?t=109529
// if channel DMA gets disabled while in progress then make sure to issue an irq at the
// end of current sample
// - gunbee, 6sense, amigames:fayoh*.lha will otherwise hang with stuck note.
if (chan->dma_enabled && !((data >> channum) & 1) && chan->curlength)
chan->manualmode = true;

chan->dma_enabled = bool(BIT(data, channum));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/mame/amiga/paula.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// license: BSD-3-Clause
// copyright-holders: Aaron Giles, Dirk Best
// copyright-holders: Aaron Giles, Dirk Best, Angelo Salese
/***************************************************************************
MOS Technology/Commodore 8364 "Paula"
Expand Down
17 changes: 10 additions & 7 deletions src/mame/nec/pc8001.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// copyright-holders:Curt Coder, Angelo Salese
/*
http://www2.odn.ne.jp/~haf09260/Pc80/EnrPc.htm
http://home1.catvmics.ne.jp/~kanemoto/n80/inside.html
http://www.geocities.jp/retro_zzz/machines/nec/8001/index.html
References:
- http://www2.odn.ne.jp/~haf09260/Pc80/EnrPc.htm
- http://home1.catvmics.ne.jp/~kanemoto/n80/inside.html
- http://www.geocities.jp/retro_zzz/machines/nec/8001/index.html
- https://oldcrap.org/2024/07/08/nec-pc-8001/
*/

Expand Down Expand Up @@ -814,17 +816,17 @@ ROM_START( pc8001 )
ROM_DEFAULT_BIOS("v110")
// PCB pictures shows divided by 3 ROMs (and 4th socket unpopulated)
// D2364C ROMs from a pc8001b PCB:
// - p12019-106.u10 072NBASIC
// - p11219-105.u11 073NBASIC
// - p12029-106.u12 171NBASIC
// - p12019-106.ic10 072NBASIC
// - p11219-105.ic11 073NBASIC
// - p12029-106.ic12 171NBASIC
ROM_SYSTEM_BIOS( 0, "v101", "N-BASIC v1.01" )
ROMX_LOAD( "n80v101.rom", 0x00000, 0x6000, BAD_DUMP CRC(a2cc9f22) SHA1(6d2d838de7fea20ddf6601660d0525d5b17bf8a3), ROM_BIOS(0) )
ROM_SYSTEM_BIOS( 1, "v102", "N-BASIC v1.02" )
ROMX_LOAD( "n80v102.rom", 0x00000, 0x6000, BAD_DUMP CRC(ed01ca3f) SHA1(b34a98941499d5baf79e7c0e5578b81dbede4a58), ROM_BIOS(1) )
ROM_SYSTEM_BIOS( 2, "v110", "N-BASIC v1.10" )
ROMX_LOAD( "n80v110.rom", 0x00000, 0x6000, BAD_DUMP CRC(1e02d93f) SHA1(4603cdb7a3833e7feb257b29d8052c872369e713), ROM_BIOS(2) )
// empty socket, cfr. notes in header for usage instructions
ROM_LOAD_OPTIONAL( "exprom.u13", 0x6000, 0x2000, NO_DUMP )
ROM_LOAD_OPTIONAL( "exprom.ic13", 0x6000, 0x2000, NO_DUMP )

ROM_REGION( 0x800, CGROM_TAG, 0)
ROM_LOAD( "font.rom", 0x000, 0x800, CRC(56653188) SHA1(84b90f69671d4b72e8f219e1fe7cd667e976cf7f) )
Expand Down Expand Up @@ -852,6 +854,7 @@ ROM_START( pc8001mk2sr )
ROM_REGION (0x10000, N80SR_ROM_TAG, ROMREGION_ERASEFF )
// N80SR-BASIC v1.0
ROM_LOAD( "n80_3.rom", 0x0000, 0xa000, BAD_DUMP CRC(d99ef247) SHA1(9bfa5009d703cd31caa734d932d2a847d74cbfa6) )
// TODO: empty socket at ic77

ROM_REGION( 0x2000, CGROM_TAG, 0)
ROM_LOAD( "font80sr.rom", 0x000000, 0x001000, CRC(784c0b17) SHA1(565dc8e5e46b1633cb434d12b4d8b3a662546b33) )
Expand Down

0 comments on commit 7ce0513

Please sign in to comment.