summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/megacd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/megacd.cpp')
-rw-r--r--src/mame/machine/megacd.cpp42
1 files changed, 12 insertions, 30 deletions
diff --git a/src/mame/machine/megacd.cpp b/src/mame/machine/megacd.cpp
index a1b74c69cd7..6780593dcb7 100644
--- a/src/mame/machine/megacd.cpp
+++ b/src/mame/machine/megacd.cpp
@@ -16,26 +16,6 @@
#define DMA_PRG (0x0500)
#define DMA_WRAM (0x0700)
-// irq3 timer
-#define CHECK_SCD_LV3_INTERRUPT \
- if (m_lc89510_temp->get_segacd_irq_mask() & 0x08) \
- { \
- m_scdcpu->set_input_line(3, HOLD_LINE); \
- }
-// from master
-#define CHECK_SCD_LV2_INTERRUPT \
- if (m_lc89510_temp->get_segacd_irq_mask() & 0x04) \
- { \
- m_scdcpu->set_input_line(2, HOLD_LINE); \
- }
-
-// gfx convert
-#define CHECK_SCD_LV1_INTERRUPT \
- if (m_lc89510_temp->get_segacd_irq_mask() & 0x02) \
- { \
- m_scdcpu->set_input_line(1, HOLD_LINE); \
- }
-
#define SEGACD_IRQ3_TIMER_SPEED (attotime::from_nsec(m_irq3_timer_reg*30720))
@@ -60,16 +40,19 @@ IRQ_CALLBACK_MEMBER(sega_segacd_device::segacd_sub_int_callback)
TIMER_DEVICE_CALLBACK_MEMBER( sega_segacd_device::irq3_timer_callback )
{
- CHECK_SCD_LV3_INTERRUPT
+ if (m_lc89510_temp->get_segacd_irq_mask() & 0x08)
+ m_scdcpu->set_input_line(3, HOLD_LINE);
+
m_irq3_timer->adjust(SEGACD_IRQ3_TIMER_SPEED);
}
-
+// GFX conversion
TIMER_DEVICE_CALLBACK_MEMBER( sega_segacd_device::stamp_timer_callback )
{
//printf("stamp_timer_callback\n");
- CHECK_SCD_LV1_INTERRUPT
+ if (m_lc89510_temp->get_segacd_irq_mask() & 0x02)
+ m_scdcpu->set_input_line(1, HOLD_LINE);
segacd_conversion_active = 0;
@@ -513,10 +496,9 @@ void sega_segacd_device::scd_a12000_halt_reset_w(offs_t offset, uint16_t data, u
if (ACCESSING_BITS_8_15)
{
- if (m_a12000_halt_reset_reg & 0x0100)
- {
- CHECK_SCD_LV2_INTERRUPT
- }
+ // from master CPU
+ if (m_a12000_halt_reset_reg & 0x0100 && m_lc89510_temp->get_segacd_irq_mask() & 0x04)
+ m_scdcpu->set_input_line(2, HOLD_LINE);
if (m_a12000_halt_reset_reg & 0x8000)
{
@@ -1802,13 +1784,13 @@ void sega_segacd_device::device_reset()
m_total_scanlines = 262;
- // HACK!!!! timegal, anettfut, roadaven end up with the SubCPU waiting in a loop for *something*
+ // HACK!!!! timegal, anettfut, roadaven/rbfx end up with the SubCPU waiting in a loop for *something*
// overclocking the CPU, even at the point where the game is hung, allows them to continue and boot
// I'm not sure what the source of this timing problem is, it's not using IRQ3 or StopWatch at the
// time. Changing the CDHock timer to 50hz from 75hz also stops the hang, but then the video is
// too slow and has bad sound. -- Investigate!
-
- m_scdcpu->set_clock_scale(1.5000f);
+ // Update: removed, otherwise megacdj and megacd2j will black screen with no cdrom inserted.
+ //m_scdcpu->set_clock_scale(1.5000f);
// initialize some stuff on reset