diff --git a/src/devices/machine/spg2xx.cpp b/src/devices/machine/spg2xx.cpp index f6e9097446c..fcbaaa4da26 100644 --- a/src/devices/machine/spg2xx.cpp +++ b/src/devices/machine/spg2xx.cpp @@ -470,6 +470,25 @@ void spg2xx_device::apply_saturation(const rectangle &cliprect) } } +void spg2xx_device::apply_fade(const rectangle &cliprect) +{ + const uint16_t fade_offset = m_video_regs[0x30] << 1; + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + rgbtriad_t *src = &m_screenbuf[cliprect.min_x + 320 * y]; + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) + { + const uint16_t r = (uint16_t)src->r - fade_offset; + const uint16_t g = (uint16_t)src->g - fade_offset; + const uint16_t b = (uint16_t)src->b - fade_offset; + src->r = (r > src->r ? 0 : r); + src->g = (g > src->g ? 0 : g); + src->b = (b > src->b ? 0 : b); + src++; + } + } +} + #if SPG2XX_VISUAL_AUDIO_DEBUG uint32_t spg2xx_device::debug_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { @@ -518,6 +537,11 @@ uint32_t spg2xx_device::screen_update(screen_device &screen, bitmap_rgb32 &bitma apply_saturation(cliprect); } + if (m_video_regs[0x30] != 0) + { + apply_fade(cliprect); + } + bitmap.fill(0, cliprect); for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { @@ -857,7 +881,7 @@ READ16_MEMBER(spg2xx_device::io_r) case 0x1c: // Video line counter val = m_screen->vpos(); - verboselog(4, "io_r: Video Line = %04x\n", val); + verboselog(5, "io_r: Video Line = %04x\n", val); break; case 0x20: // System Control @@ -1513,37 +1537,37 @@ READ16_MEMBER(spg2xx_device::audio_r) break; case AUDIO_MAIN_VOLUME: - verboselog(0, "audio_r: Main Volume: %04x\n", data); + verboselog(5, "audio_r: Main Volume: %04x\n", data); break; case AUDIO_CHANNEL_FIQ_ENABLE: - verboselog(0, "audio_r: Channel FIQ Enable: %04x\n", data); + verboselog(5, "audio_r: Channel FIQ Enable: %04x\n", data); break; case AUDIO_CHANNEL_FIQ_STATUS: - verboselog(0, "audio_r: Channel FIQ Acknowledge: %04x\n", data); + verboselog(5, "audio_r: Channel FIQ Acknowledge: %04x\n", data); break; case AUDIO_BEAT_BASE_COUNT: - verboselog(0, "audio_r: Beat Base Count: %04x\n", data); + verboselog(5, "audio_r: Beat Base Count: %04x\n", data); break; case AUDIO_BEAT_COUNT: - verboselog(0, "audio_r: Beat Count: %04x\n", data); + verboselog(5, "audio_r: Beat Count: %04x\n", data); break; case AUDIO_ENVCLK0: case AUDIO_ENVCLK1: - verboselog(0, "audio_r: Envelope Interval %d (lo): %04x\n", offset == AUDIO_ENVCLK0 ? 0 : 1, data); + verboselog(5, "audio_r: Envelope Interval %d (lo): %04x\n", offset == AUDIO_ENVCLK0 ? 0 : 1, data); break; case AUDIO_ENVCLK0_HIGH: case AUDIO_ENVCLK1_HIGH: - verboselog(0, "audio_r: Envelope Interval %d (hi): %04x\n", offset == AUDIO_ENVCLK0_HIGH ? 0 : 1, data); + verboselog(5, "audio_r: Envelope Interval %d (hi): %04x\n", offset == AUDIO_ENVCLK0_HIGH ? 0 : 1, data); break; case AUDIO_ENV_RAMP_DOWN: - verboselog(0, "audio_r: Envelope Fast Ramp Down: %04x\n", data); + verboselog(5, "audio_r: Envelope Fast Ramp Down: %04x\n", data); break; case AUDIO_CHANNEL_STOP: @@ -1551,15 +1575,15 @@ READ16_MEMBER(spg2xx_device::audio_r) break; case AUDIO_CHANNEL_ZERO_CROSS: - verboselog(0, "audio_r: Channel Zero-Cross Enable: %04x\n", data); + verboselog(5, "audio_r: Channel Zero-Cross Enable: %04x\n", data); break; case AUDIO_CONTROL: - verboselog(0, "audio_r: Control: %04x\n", data); + verboselog(5, "audio_r: Control: %04x\n", data); break; case AUDIO_COMPRESS_CTRL: - verboselog(0, "audio_r: Compressor Control: %04x\n", data); + verboselog(5, "audio_r: Compressor Control: %04x\n", data); break; case AUDIO_CHANNEL_STATUS: @@ -1567,67 +1591,67 @@ READ16_MEMBER(spg2xx_device::audio_r) break; case AUDIO_WAVE_IN_L: - verboselog(0, "audio_r: Wave In (L) / FIFO Write Data: %04x\n", data); + verboselog(5, "audio_r: Wave In (L) / FIFO Write Data: %04x\n", data); break; case AUDIO_WAVE_IN_R: - verboselog(0, "audio_r: Wave In (R) / Software Channel FIFO IRQ Control: %04x\n", data); + verboselog(5, "audio_r: Wave In (R) / Software Channel FIFO IRQ Control: %04x\n", data); break; case AUDIO_WAVE_OUT_L: - verboselog(0, "audio_r: Wave Out (L): %04x\n", data); + verboselog(5, "audio_r: Wave Out (L): %04x\n", data); break; case AUDIO_WAVE_OUT_R: - verboselog(0, "audio_r: Wave Out (R): %04x\n", data); + verboselog(5, "audio_r: Wave Out (R): %04x\n", data); break; case AUDIO_CHANNEL_REPEAT: - verboselog(0, "audio_r: Channel Repeat Enable: %04x\n", data); + verboselog(5, "audio_r: Channel Repeat Enable: %04x\n", data); break; case AUDIO_CHANNEL_ENV_MODE: - verboselog(0, "audio_r: Channel Envelope Enable: %04x\n", data); + verboselog(5, "audio_r: Channel Envelope Enable: %04x\n", data); break; case AUDIO_CHANNEL_TONE_RELEASE: - verboselog(0, "audio_r: Channel Tone Release Enable: %04x\n", data); + verboselog(5, "audio_r: Channel Tone Release Enable: %04x\n", data); break; case AUDIO_CHANNEL_ENV_IRQ: - verboselog(0, "audio_r: Channel Envelope IRQ Status: %04x\n", data); + verboselog(5, "audio_r: Channel Envelope IRQ Status: %04x\n", data); break; case AUDIO_CHANNEL_PITCH_BEND: - verboselog(0, "audio_r: Channel Pitch Bend Enable: %04x\n", data); + verboselog(5, "audio_r: Channel Pitch Bend Enable: %04x\n", data); break; case AUDIO_SOFT_PHASE: - verboselog(0, "audio_r: Software Channel Phase: %04x\n", data); + verboselog(5, "audio_r: Software Channel Phase: %04x\n", data); break; case AUDIO_ATTACK_RELEASE: - verboselog(0, "audio_r: Attack/Release Time Control: %04x\n", data); + verboselog(5, "audio_r: Attack/Release Time Control: %04x\n", data); break; case AUDIO_EQ_CUTOFF10: - verboselog(0, "audio_r: EQ Cutoff Frequency 0/1: %04x\n", data); + verboselog(5, "audio_r: EQ Cutoff Frequency 0/1: %04x\n", data); break; case AUDIO_EQ_CUTOFF32: - verboselog(0, "audio_r: EQ Cutoff Frequency 2/3: %04x\n", data); + verboselog(5, "audio_r: EQ Cutoff Frequency 2/3: %04x\n", data); break; case AUDIO_EQ_GAIN10: - verboselog(0, "audio_r: EQ Cutoff Gain 0/1: %04x\n", data); + verboselog(5, "audio_r: EQ Cutoff Gain 0/1: %04x\n", data); break; case AUDIO_EQ_GAIN32: - verboselog(0, "audio_r: EQ Cutoff Gain 2/3: %04x\n", data); + verboselog(5, "audio_r: EQ Cutoff Gain 2/3: %04x\n", data); break; default: - verboselog(0, "audio_r: Unknown register %04x = %04x\n", 0x3000 + offset, data); + verboselog(5, "audio_r: Unknown register %04x = %04x\n", 0x3000 + offset, data); break; } } @@ -1636,95 +1660,95 @@ READ16_MEMBER(spg2xx_device::audio_r) switch (offset & AUDIO_CHAN_OFFSET_MASK) { case AUDIO_WAVE_ADDR: - verboselog(0, "audio_r: Channel %d: Wave Addr (lo): %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Wave Addr (lo): %04x\n", channel, data); break; case AUDIO_MODE: - verboselog(0, "audio_r: Channel %d: Mode: %04x (ADPCM:%d, 16M:%d, TONE:%d, LADDR_HI:%04x, WADDR_HI:%04x)\n", channel, data, + verboselog(5, "audio_r: Channel %d: Mode: %04x (ADPCM:%d, 16M:%d, TONE:%d, LADDR_HI:%04x, WADDR_HI:%04x)\n", channel, data, get_adpcm_bit(channel), get_16bit_bit(channel), get_tone_mode(channel), get_loop_addr_high(channel), get_wave_addr_high(channel)); break; case AUDIO_LOOP_ADDR: - verboselog(0, "audio_r: Channel %d: Loop Addr: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Loop Addr: %04x\n", channel, data); break; case AUDIO_PAN_VOL: - verboselog(0, "audio_r: Channel %d: Pan/Vol: %04x (PAN:%02x, VOL:%02x)\n", channel, data, + verboselog(5, "audio_r: Channel %d: Pan/Vol: %04x (PAN:%02x, VOL:%02x)\n", channel, data, get_pan(channel), get_volume(channel)); break; case AUDIO_ENVELOPE0: - verboselog(0, "audio_r: Channel %d: Envelope0: %04x (RPTPER:%d, TARGET:%02x, SIGN:%d, INC:%02x)\n", channel, data, + verboselog(5, "audio_r: Channel %d: Envelope0: %04x (RPTPER:%d, TARGET:%02x, SIGN:%d, INC:%02x)\n", channel, data, get_repeat_period_bit(channel), get_envelope_target(channel), get_envelope_sign_bit(channel), get_envelope_inc(channel)); break; case AUDIO_ENVELOPE_DATA: - verboselog(0, "audio_r: Channel %d: Envelope Data: %04x (CNT:%d, EDD:%02x)\n", channel, data, + verboselog(5, "audio_r: Channel %d: Envelope Data: %04x (CNT:%d, EDD:%02x)\n", channel, data, get_envelope_count(channel), get_edd(channel)); break; case AUDIO_ENVELOPE1: - verboselog(0, "audio_r: Channel %d: Envelope1 Data: %04x (RPTCNT:%02x, RPT:%d, LOAD:%02x)\n", channel, data, + verboselog(5, "audio_r: Channel %d: Envelope1 Data: %04x (RPTCNT:%02x, RPT:%d, LOAD:%02x)\n", channel, data, get_envelope_repeat_count(channel), get_envelope_repeat_bit(channel), get_envelope_load(channel)); break; case AUDIO_ENVELOPE_ADDR_HIGH: - verboselog(0, "audio_r: Channel %d: Envelope Addr (hi): %04x (IRQADDR:%03x, IRQEN:%d, EADDR_HI:%02x)\n", channel, data, + verboselog(5, "audio_r: Channel %d: Envelope Addr (hi): %04x (IRQADDR:%03x, IRQEN:%d, EADDR_HI:%02x)\n", channel, data, get_audio_irq_addr(channel), get_audio_irq_enable_bit(channel), get_envelope_addr_high(channel)); break; case AUDIO_ENVELOPE_ADDR: - verboselog(0, "audio_r: Channel %d: Envelope Addr (lo): %04x \n", channel, data); + verboselog(5, "audio_r: Channel %d: Envelope Addr (lo): %04x \n", channel, data); break; case AUDIO_WAVE_DATA_PREV: - verboselog(0, "audio_r: Channel %d: Wave Data Prev: %04x \n", channel, data); + verboselog(5, "audio_r: Channel %d: Wave Data Prev: %04x \n", channel, data); break; case AUDIO_ENVELOPE_LOOP_CTRL: - verboselog(0, "audio_r: Channel %d: Envelope Loop Ctrl: %04x (RDOFFS:%02x, EAOFFS:%03x)\n", channel, data, + verboselog(5, "audio_r: Channel %d: Envelope Loop Ctrl: %04x (RDOFFS:%02x, EAOFFS:%03x)\n", channel, data, get_rampdown_offset(channel), get_envelope_eaoffset(channel)); break; case AUDIO_WAVE_DATA: - verboselog(0, "audio_r: Channel %d: Wave Data: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Wave Data: %04x\n", channel, data); break; case AUDIO_ADPCM_SEL: - verboselog(0, "audio_r: Channel %d: ADPCM Sel: %04x (ADPCM36:%d, POINTNUM:%02x\n", channel, data, + verboselog(5, "audio_r: Channel %d: ADPCM Sel: %04x (ADPCM36:%d, POINTNUM:%02x\n", channel, data, get_adpcm36_bit(channel), get_point_number(channel)); break; case AUDIO_PHASE_HIGH: - verboselog(0, "audio_r: Channel %d: Phase High: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Phase High: %04x\n", channel, data); break; case AUDIO_PHASE_ACCUM_HIGH: - verboselog(0, "audio_r: Channel %d: Phase Accum High: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Phase Accum High: %04x\n", channel, data); break; case AUDIO_TARGET_PHASE_HIGH: - verboselog(0, "audio_r: Channel %d: Target Phase High: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Target Phase High: %04x\n", channel, data); break; case AUDIO_RAMP_DOWN_CLOCK: - verboselog(0, "audio_r: Channel %d: Rampdown Clock: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Rampdown Clock: %04x\n", channel, data); break; case AUDIO_PHASE: - verboselog(0, "audio_r: Channel %d: Phase: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Phase: %04x\n", channel, data); break; case AUDIO_PHASE_ACCUM: - verboselog(0, "audio_r: Channel %d: Phase Accum: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Phase Accum: %04x\n", channel, data); break; case AUDIO_TARGET_PHASE: - verboselog(0, "audio_r: Channel %d: Target Phase: %04x\n", channel, data); + verboselog(5, "audio_r: Channel %d: Target Phase: %04x\n", channel, data); break; case AUDIO_PHASE_CTRL: - verboselog(0, "audio_r: Channel %d: Phase Ctrl: %04x (TIMESTEP:%d, SIGN:%d, OFFSET:%03x\n", channel, data, + verboselog(5, "audio_r: Channel %d: Phase Ctrl: %04x (TIMESTEP:%d, SIGN:%d, OFFSET:%03x\n", channel, data, get_phase_time_step(channel), get_phase_sign_bit(channel), get_phase_offset(channel)); break; @@ -1750,7 +1774,7 @@ WRITE16_MEMBER(spg2xx_device::audio_w) { case AUDIO_CHANNEL_ENABLE: { - verboselog(0, "audio_w: Channel Enable: %04x\n", data); + verboselog(5, "audio_w: Channel Enable: %04x\n", data); const uint16_t changed = m_audio_regs[AUDIO_CHANNEL_STATUS] ^ data; for (uint32_t channel_bit = 0; channel_bit < 16; channel_bit++) { @@ -1788,29 +1812,29 @@ WRITE16_MEMBER(spg2xx_device::audio_w) } case AUDIO_MAIN_VOLUME: - verboselog(0, "audio_w: Main Volume: %04x\n", data); + verboselog(5, "audio_w Main Volume: %04x\n", data); m_audio_regs[offset] = data & AUDIO_MAIN_VOLUME_MASK; break; case AUDIO_CHANNEL_FIQ_ENABLE: - verboselog(0, "audio_w: Channel FIQ Enable: %04x\n", data); + verboselog(5, "audio_w Channel FIQ Enable: %04x\n", data); m_audio_regs[offset] = data & AUDIO_CHANNEL_FIQ_ENABLE_MASK; break; case AUDIO_CHANNEL_FIQ_STATUS: - verboselog(0, "audio_w: Channel FIQ Acknowledge: %04x\n", data); + verboselog(5, "audio_w Channel FIQ Acknowledge: %04x\n", data); m_audio_regs[offset] &= ~(data & AUDIO_CHANNEL_FIQ_STATUS_MASK); break; case AUDIO_BEAT_BASE_COUNT: - verboselog(0, "audio_w: Beat Base Count: %04x\n", data); + verboselog(5, "audio_w Beat Base Count: %04x\n", data); m_audio_regs[offset] = data & AUDIO_BEAT_BASE_COUNT_MASK; m_audio_curr_beat_base_count = m_audio_regs[offset]; break; case AUDIO_BEAT_COUNT: { - verboselog(0, "audio_w: Beat Count: %04x\n", data); + verboselog(5, "audio_w Beat Count: %04x\n", data); const uint16_t old = m_audio_regs[offset]; m_audio_regs[offset] &= ~(data & AUDIO_BIS_MASK); m_audio_regs[offset] &= AUDIO_BIS_MASK; @@ -1827,7 +1851,7 @@ WRITE16_MEMBER(spg2xx_device::audio_w) case AUDIO_ENVCLK0: case AUDIO_ENVCLK1: { - verboselog(0, "audio_w: Envelope Interval %d (lo): %04x\n", offset == AUDIO_ENVCLK0 ? 0 : 1, data); + verboselog(5, "audio_w Envelope Interval %d (lo): %04x\n", offset == AUDIO_ENVCLK0 ? 0 : 1, data); const uint16_t old = m_audio_regs[offset]; m_audio_regs[offset] = data; const uint16_t changed = old ^ m_audio_regs[offset]; @@ -1851,7 +1875,7 @@ WRITE16_MEMBER(spg2xx_device::audio_w) case AUDIO_ENVCLK0_HIGH: case AUDIO_ENVCLK1_HIGH: { - verboselog(0, "audio_w: Envelope Interval %d (hi): %04x\n", offset == AUDIO_ENVCLK0_HIGH ? 0 : 1, data); + verboselog(5, "audio_w Envelope Interval %d (hi): %04x\n", offset == AUDIO_ENVCLK0_HIGH ? 0 : 1, data); const uint16_t old = m_audio_regs[offset]; m_audio_regs[offset] = data; const uint16_t changed = old ^ m_audio_regs[offset]; @@ -1873,7 +1897,7 @@ WRITE16_MEMBER(spg2xx_device::audio_w) case AUDIO_ENV_RAMP_DOWN: { - verboselog(0, "audio_w: Envelope Fast Ramp Down: %04x\n", data); + verboselog(5, "audio_w Envelope Fast Ramp Down: %04x\n", data); const uint16_t old = m_audio_regs[offset]; m_audio_regs[offset] = data & AUDIO_ENV_RAMP_DOWN_MASK; const uint16_t changed = old ^ m_audio_regs[offset]; @@ -1897,17 +1921,17 @@ WRITE16_MEMBER(spg2xx_device::audio_w) } case AUDIO_CHANNEL_STOP: - verboselog(0, "audio_w: Channel Stop Status: %04x\n", data); + verboselog(5, "audio_w Channel Stop Status: %04x\n", data); m_audio_regs[offset] &= ~(data & AUDIO_CHANNEL_STOP_MASK); break; case AUDIO_CHANNEL_ZERO_CROSS: - verboselog(0, "audio_w: Channel Zero-Cross Enable: %04x\n", data); + verboselog(5, "audio_w Channel Zero-Cross Enable: %04x\n", data); m_audio_regs[offset] = data & AUDIO_CHANNEL_ZERO_CROSS_MASK; break; case AUDIO_CONTROL: - verboselog(0, "audio_w: Control: %04x (SOFTCH:%d, COMPEN:%d, NOHIGH:%d, NOINT:%d, EQEN:%d\n", data + verboselog(5, "audio_w Control: %04x (SOFTCH:%d, COMPEN:%d, NOHIGH:%d, NOINT:%d, EQEN:%d\n", data , (data & AUDIO_CONTROL_SOFTCH_MASK) ? 1 : 0 , (data & AUDIO_CONTROL_COMPEN_MASK) ? 1 : 0 , (data & AUDIO_CONTROL_NOHIGH_MASK) ? 1 : 0 @@ -1917,92 +1941,92 @@ WRITE16_MEMBER(spg2xx_device::audio_w) break; case AUDIO_COMPRESS_CTRL: - verboselog(0, "audio_w: Compressor Control: %04x\n", data); + verboselog(5, "audio_w Compressor Control: %04x\n", data); m_audio_regs[offset] = data; break; case AUDIO_CHANNEL_STATUS: - verboselog(0, "audio_w: Channel Status (read-only): %04x\n", data); + verboselog(5, "audio_w Channel Status (read-only): %04x\n", data); break; case AUDIO_WAVE_IN_L: - verboselog(0, "audio_w: Wave In (L) / FIFO Write Data: %04x\n", data); + verboselog(5, "audio_w Wave In (L) / FIFO Write Data: %04x\n", data); m_audio_regs[offset] = data; break; case AUDIO_WAVE_IN_R: - verboselog(0, "audio_w: Wave In (R) / Software Channel FIFO IRQ Control: %04x\n", data); + verboselog(5, "audio_w Wave In (R) / Software Channel FIFO IRQ Control: %04x\n", data); m_audio_regs[offset] = data; break; case AUDIO_WAVE_OUT_L: - verboselog(0, "audio_w: Wave Out (L): %04x\n", data); + verboselog(5, "audio_w Wave Out (L): %04x\n", data); m_audio_regs[offset] = data; break; case AUDIO_WAVE_OUT_R: - verboselog(0, "audio_w: Wave Out (R): %04x\n", data); + verboselog(5, "audio_w Wave Out (R): %04x\n", data); m_audio_regs[offset] = data; break; case AUDIO_CHANNEL_REPEAT: - verboselog(0, "audio_w: Channel Repeat Enable: %04x\n", data); + verboselog(5, "audio_w Channel Repeat Enable: %04x\n", data); m_audio_regs[offset] = data & AUDIO_CHANNEL_REPEAT_MASK; break; case AUDIO_CHANNEL_ENV_MODE: - verboselog(0, "audio_w: Channel Envelope Enable: %04x\n", data); + verboselog(5, "audio_w Channel Envelope Enable: %04x\n", data); m_audio_regs[offset] = data & AUDIO_CHANNEL_ENV_MODE_MASK; break; case AUDIO_CHANNEL_TONE_RELEASE: - verboselog(0, "audio_w: Channel Tone Release Enable: %04x\n", data); + verboselog(5, "audio_w Channel Tone Release Enable: %04x\n", data); m_audio_regs[offset] = data & AUDIO_CHANNEL_TONE_RELEASE_MASK; break; case AUDIO_CHANNEL_ENV_IRQ: - verboselog(0, "audio_w: Channel Envelope IRQ Acknowledge: %04x\n", data); + verboselog(5, "audio_w Channel Envelope IRQ Acknowledge: %04x\n", data); m_audio_regs[offset] &= ~data & AUDIO_CHANNEL_ENV_IRQ_MASK; break; case AUDIO_CHANNEL_PITCH_BEND: - verboselog(0, "audio_w: Channel Pitch Bend Enable: %04x\n", data); + verboselog(5, "audio_w Channel Pitch Bend Enable: %04x\n", data); m_audio_regs[offset] = data & AUDIO_CHANNEL_PITCH_BEND_MASK; break; case AUDIO_SOFT_PHASE: - verboselog(0, "audio_w: Software Channel Phase: %04x\n", data); + verboselog(5, "audio_w Software Channel Phase: %04x\n", data); m_audio_regs[offset] = data; break; case AUDIO_ATTACK_RELEASE: - verboselog(0, "audio_w: Attack/Release Time Control: %04x\n", data); + verboselog(5, "audio_w Attack/Release Time Control: %04x\n", data); m_audio_regs[offset] = data; break; case AUDIO_EQ_CUTOFF10: - verboselog(0, "audio_w: EQ Cutoff Frequency 0/1: %04x\n", data); + verboselog(5, "audio_w EQ Cutoff Frequency 0/1: %04x\n", data); m_audio_regs[offset] = data & AUDIO_EQ_CUTOFF10_MASK; break; case AUDIO_EQ_CUTOFF32: - verboselog(0, "audio_w: EQ Cutoff Frequency 2/3: %04x\n", data); + verboselog(5, "audio_w EQ Cutoff Frequency 2/3: %04x\n", data); m_audio_regs[offset] = data & AUDIO_EQ_CUTOFF32_MASK; break; case AUDIO_EQ_GAIN10: - verboselog(0, "audio_w: EQ Cutoff Gain 0/1: %04x\n", data); + verboselog(5, "audio_w EQ Cutoff Gain 0/1: %04x\n", data); m_audio_regs[offset] = data & AUDIO_EQ_GAIN10_MASK; break; case AUDIO_EQ_GAIN32: - verboselog(0, "audio_w: EQ Cutoff Gain 2/3: %04x\n", data); + verboselog(5, "audio_w EQ Cutoff Gain 2/3: %04x\n", data); m_audio_regs[offset] = data & AUDIO_EQ_GAIN32_MASK; break; default: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Unknown register %04x = %04x\n", 0x3000 + offset, data); + verboselog(5, "audio_w Unknown register %04x = %04x\n", 0x3000 + offset, data); break; } } @@ -2012,29 +2036,29 @@ WRITE16_MEMBER(spg2xx_device::audio_w) { case AUDIO_WAVE_ADDR: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Wave Addr (lo): %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Wave Addr (lo): %04x\n", channel, data); break; case AUDIO_MODE: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Mode: %04x (ADPCM:%d, 16M:%d, TONE:%d, LADDR_HI:%04x, WADDR_HI:%04x)\n", channel, data, + verboselog(5, "audio_w Channel %d: Mode: %04x (ADPCM:%d, 16M:%d, TONE:%d, LADDR_HI:%04x, WADDR_HI:%04x)\n", channel, data, get_adpcm_bit(channel), get_16bit_bit(channel), get_tone_mode(channel), get_loop_addr_high(channel), get_wave_addr_high(channel)); break; case AUDIO_LOOP_ADDR: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Loop Addr: %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Loop Addr: %04x\n", channel, data); break; case AUDIO_PAN_VOL: m_audio_regs[offset] = data & AUDIO_PAN_VOL_MASK; - verboselog(0, "audio_w: Channel %d: Pan/Vol: %04x (PAN:%02x, VOL:%02x)\n", channel, data, + verboselog(5, "audio_w Channel %d: Pan/Vol: %04x (PAN:%02x, VOL:%02x)\n", channel, data, get_pan(channel), get_volume(channel)); break; case AUDIO_ENVELOPE0: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Envelope0: %04x (RPTPER:%d, TARGET:%02x, SIGN:%d, INC:%02x)\n", channel, data, + verboselog(5, "audio_w Channel %d: Envelope0: %04x (RPTPER:%d, TARGET:%02x, SIGN:%d, INC:%02x)\n", channel, data, get_repeat_period_bit(channel), get_envelope_target(channel), get_envelope_sign_bit(channel), get_envelope_inc(channel)); break; @@ -2046,40 +2070,40 @@ WRITE16_MEMBER(spg2xx_device::audio_w) case AUDIO_ENVELOPE1: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Envelope1 Data: %04x (RPTCNT:%02x, RPT:%d, LOAD:%02x)\n", channel, data, + verboselog(5, "audio_w Channel %d: Envelope1 Data: %04x (RPTCNT:%02x, RPT:%d, LOAD:%02x)\n", channel, data, get_envelope_repeat_count(channel), get_envelope_repeat_bit(channel), get_envelope_load(channel)); break; case AUDIO_ENVELOPE_ADDR_HIGH: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Envelope Addr (hi): %04x (IRQADDR:%03x, IRQEN:%d, EADDR_HI:%02x)\n", channel, data, + verboselog(5, "audio_w Channel %d: Envelope Addr (hi): %04x (IRQADDR:%03x, IRQEN:%d, EADDR_HI:%02x)\n", channel, data, get_audio_irq_addr(channel), get_audio_irq_enable_bit(channel), get_envelope_addr_high(channel)); break; case AUDIO_ENVELOPE_ADDR: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Envelope Addr (lo): %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Envelope Addr (lo): %04x\n", channel, data); break; case AUDIO_WAVE_DATA_PREV: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Wave Data Prev: %04x \n", channel, data); + verboselog(5, "audio_w Channel %d: Wave Data Prev: %04x \n", channel, data); break; case AUDIO_ENVELOPE_LOOP_CTRL: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Envelope Loop Ctrl: %04x (RDOFFS:%02x, EAOFFS:%03x)\n", channel, data, + verboselog(5, "audio_w Channel %d: Envelope Loop Ctrl: %04x (RDOFFS:%02x, EAOFFS:%03x)\n", channel, data, get_rampdown_offset(channel), get_envelope_eaoffset(channel)); break; case AUDIO_WAVE_DATA: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Wave Data: %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Wave Data: %04x\n", channel, data); break; case AUDIO_ADPCM_SEL: m_audio_regs[offset] = data & AUDIO_ADPCM_SEL_MASK; - verboselog(0, "audio_w: Channel %d: ADPCM Sel: %04x (ADPCM36:%d, POINTNUM:%02x\n", channel, data, + verboselog(5, "audio_w Channel %d: ADPCM Sel: %04x (ADPCM36:%d, POINTNUM:%02x\n", channel, data, get_adpcm36_bit(channel), get_point_number(channel)); break; @@ -2092,17 +2116,17 @@ WRITE16_MEMBER(spg2xx_device::audio_w) case AUDIO_PHASE_ACCUM_HIGH: m_audio_regs[offset] = data & AUDIO_PHASE_ACCUM_HIGH_MASK; - verboselog(0, "audio_w: Channel %d: Phase Accum High: %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Phase Accum High: %04x\n", channel, data); break; case AUDIO_TARGET_PHASE_HIGH: m_audio_regs[offset] = data & AUDIO_TARGET_PHASE_HIGH_MASK; - verboselog(0, "audio_w: Channel %d: Target Phase High: %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Target Phase High: %04x\n", channel, data); break; case AUDIO_RAMP_DOWN_CLOCK: m_audio_regs[offset] = data & AUDIO_RAMP_DOWN_CLOCK_MASK; - verboselog(0, "audio_w: Channel %d: Rampdown Clock: %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Rampdown Clock: %04x\n", channel, data); break; case AUDIO_PHASE: @@ -2114,23 +2138,23 @@ WRITE16_MEMBER(spg2xx_device::audio_w) case AUDIO_PHASE_ACCUM: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Phase Accum: %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Phase Accum: %04x\n", channel, data); break; case AUDIO_TARGET_PHASE: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Target Phase: %04x\n", channel, data); + verboselog(5, "audio_w Channel %d: Target Phase: %04x\n", channel, data); break; case AUDIO_PHASE_CTRL: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Channel %d: Phase Ctrl: %04x (TIMESTEP:%d, SIGN:%d, OFFSET:%03x\n", channel, data, + verboselog(5, "audio_w Channel %d: Phase Ctrl: %04x (TIMESTEP:%d, SIGN:%d, OFFSET:%03x\n", channel, data, get_phase_time_step(channel), get_phase_sign_bit(channel), get_phase_offset(channel)); break; default: m_audio_regs[offset] = data; - verboselog(0, "audio_w: Unknown register %04x = %04x\n", 0x3000 + offset, data); + verboselog(5, "audio_w Unknown register %04x = %04x\n", 0x3000 + offset, data); break; } } diff --git a/src/devices/machine/spg2xx.h b/src/devices/machine/spg2xx.h index ba6c4078f02..731deecc34d 100644 --- a/src/devices/machine/spg2xx.h +++ b/src/devices/machine/spg2xx.h @@ -391,6 +391,7 @@ protected: void do_sprite_dma(uint32_t len); void apply_saturation(const rectangle &cliprect); + void apply_fade(const rectangle &cliprect); void blit(const rectangle &cliprect, uint32_t xoff, uint32_t yoff, uint32_t attr, uint32_t ctrl, uint32_t bitmap_addr, uint16_t tile); void blit_page(const rectangle &cliprect, int depth, uint32_t bitmap_addr, uint16_t *regs); void blit_sprite(const rectangle &cliprect, int depth, uint32_t base_addr);