Skip to content

Commit 7ce0513

Browse files
committed
amiga/paula.cpp: trigger an irq if channel DMA gets disabled during playback
1 parent 33a77cc commit 7ce0513

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

src/mame/amiga/paula.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// license: BSD-3-Clause
2-
// copyright-holders: Aaron Giles, Dirk Best
2+
// copyright-holders: Aaron Giles, Dirk Best, Angelo Salese
33
/******************************************************************************
44
55
MOS Technology/Commodore 8364 "Paula"
@@ -14,16 +14,13 @@
1414
1515
TODO:
1616
- Inherit FDC, serial and irq controller to here;
17-
- Move Agnus "location" logic out of here;
17+
- Move Agnus "location" logic out of here, add AUDxDR / AUDxDSR pin logic;
1818
- low-pass filter control thru Amiga Power LED where available, technically
1919
outside of Paula;
2020
- Verify ADKCON modulation;
2121
- Verify manual mode;
2222
- amigaaga_flop:roadkill gameplay sets up incredibly high period (-> low pitch)
2323
samples (engine thrust, bumping into walls);
24-
- When a DMA stop occurs, is the correlated channel playback stopped
25-
at the end of the current cycle or as soon as possible like current
26-
implementation?
2724
2825
******************************************************************************/
2926

@@ -194,6 +191,13 @@ void paula_device::dmacon_set(u16 data)
194191
if (!chan->dma_enabled && ((data >> channum) & 1))
195192
dma_reload(chan, true);
196193

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

src/mame/amiga/paula.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// license: BSD-3-Clause
2-
// copyright-holders: Aaron Giles, Dirk Best
2+
// copyright-holders: Aaron Giles, Dirk Best, Angelo Salese
33
/***************************************************************************
44
55
MOS Technology/Commodore 8364 "Paula"

src/mame/nec/pc8001.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
// copyright-holders:Curt Coder, Angelo Salese
33
/*
44
5-
http://www2.odn.ne.jp/~haf09260/Pc80/EnrPc.htm
6-
http://home1.catvmics.ne.jp/~kanemoto/n80/inside.html
7-
http://www.geocities.jp/retro_zzz/machines/nec/8001/index.html
5+
References:
6+
- http://www2.odn.ne.jp/~haf09260/Pc80/EnrPc.htm
7+
- http://home1.catvmics.ne.jp/~kanemoto/n80/inside.html
8+
- http://www.geocities.jp/retro_zzz/machines/nec/8001/index.html
9+
- https://oldcrap.org/2024/07/08/nec-pc-8001/
810
911
*/
1012

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

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

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

0 commit comments

Comments
 (0)