mirror of
https://github.com/holub/mame
synced 2025-06-18 02:08:56 +03:00
Misc fixes, added DAC to Wyvern F0 (nw)
This commit is contained in:
parent
a7b7edb534
commit
691a078f04
@ -255,22 +255,6 @@ READ8_MEMBER(nycaptor_state::sound_status_r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MACHINE_RESET_MEMBER(nycaptor_state,ta7630)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
double db = 0.0;
|
|
||||||
double db_step = 0.50; /* 0.50 dB step (at least, maybe more) */
|
|
||||||
double db_step_inc = 0.275;
|
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
|
||||||
{
|
|
||||||
double max = 100.0 / pow(10.0, db/20.0 );
|
|
||||||
m_vol_ctrl[15 - i] = max;
|
|
||||||
/*logerror("vol_ctrl[%x] = %i (%f dB)\n", 15 - i, m_vol_ctrl[15 - i], db);*/
|
|
||||||
db += db_step;
|
|
||||||
db_step += db_step_inc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
WRITE8_MEMBER(nycaptor_state::nmi_disable_w)
|
WRITE8_MEMBER(nycaptor_state::nmi_disable_w)
|
||||||
{
|
{
|
||||||
@ -342,7 +326,7 @@ static ADDRESS_MAP_START( nycaptor_slave_map, AS_PROGRAM, 8, nycaptor_state )
|
|||||||
AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("sharedram")
|
AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("sharedram")
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( nycaptor_sound_map, AS_PROGRAM, 8, nycaptor_state )
|
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, nycaptor_state )
|
||||||
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
AM_RANGE(0x0000, 0xbfff) AM_ROM
|
||||||
AM_RANGE(0xc000, 0xc7ff) AM_RAM
|
AM_RANGE(0xc000, 0xc7ff) AM_RAM
|
||||||
AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("ay1", ay8910_device, address_data_w)
|
AM_RANGE(0xc800, 0xc801) AM_DEVWRITE("ay1", ay8910_device, address_data_w)
|
||||||
@ -354,7 +338,7 @@ static ADDRESS_MAP_START( nycaptor_sound_map, AS_PROGRAM, 8, nycaptor_state )
|
|||||||
AM_RANGE(0xd000, 0xd000) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_DEVWRITE("soundlatch2", generic_latch_8_device, write)
|
AM_RANGE(0xd000, 0xd000) AM_DEVREAD("soundlatch", generic_latch_8_device, read) AM_DEVWRITE("soundlatch2", generic_latch_8_device, write)
|
||||||
AM_RANGE(0xd200, 0xd200) AM_READNOP AM_WRITE(nmi_enable_w)
|
AM_RANGE(0xd200, 0xd200) AM_READNOP AM_WRITE(nmi_enable_w)
|
||||||
AM_RANGE(0xd400, 0xd400) AM_WRITE(nmi_disable_w)
|
AM_RANGE(0xd400, 0xd400) AM_WRITE(nmi_disable_w)
|
||||||
AM_RANGE(0xd600, 0xd600) AM_DEVWRITE("soundlatch", generic_latch_8_device, acknowledge_w)
|
AM_RANGE(0xd600, 0xd600) AM_DEVWRITE("dac", dac_byte_interface, write) //otherwise no girl's scream in cycle shooting, see MT03975
|
||||||
AM_RANGE(0xe000, 0xefff) AM_NOP
|
AM_RANGE(0xe000, 0xefff) AM_NOP
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
@ -436,11 +420,6 @@ static ADDRESS_MAP_START( cyclshtg_slave_map, AS_PROGRAM, 8, nycaptor_state )
|
|||||||
AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("sharedram")
|
AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("sharedram")
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
static ADDRESS_MAP_START( cyclshtg_sound_map, AS_PROGRAM, 8, nycaptor_state )
|
|
||||||
AM_RANGE(0xd600, 0xd600) AM_DEVWRITE("dac", dac_byte_interface, write) //otherwise no girl's scream, see MT03975
|
|
||||||
AM_IMPORT_FROM( nycaptor_sound_map )
|
|
||||||
ADDRESS_MAP_END
|
|
||||||
|
|
||||||
READ8_MEMBER(nycaptor_state::unk_r)
|
READ8_MEMBER(nycaptor_state::unk_r)
|
||||||
{
|
{
|
||||||
return machine().rand();
|
return machine().rand();
|
||||||
@ -728,7 +707,6 @@ void nycaptor_state::machine_start()
|
|||||||
membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000);
|
membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x10000, 0x4000);
|
||||||
|
|
||||||
save_item(NAME(m_generic_control_reg));
|
save_item(NAME(m_generic_control_reg));
|
||||||
save_item(NAME(m_vol_ctrl));
|
|
||||||
|
|
||||||
save_item(NAME(m_char_bank));
|
save_item(NAME(m_char_bank));
|
||||||
save_item(NAME(m_palette_bank));
|
save_item(NAME(m_palette_bank));
|
||||||
@ -737,15 +715,13 @@ void nycaptor_state::machine_start()
|
|||||||
|
|
||||||
void nycaptor_state::machine_reset()
|
void nycaptor_state::machine_reset()
|
||||||
{
|
{
|
||||||
MACHINE_RESET_CALL_MEMBER(ta7630);
|
// MACHINE_RESET_CALL_MEMBER(ta7630);
|
||||||
|
|
||||||
m_generic_control_reg = 0;
|
m_generic_control_reg = 0;
|
||||||
|
|
||||||
m_char_bank = 0;
|
m_char_bank = 0;
|
||||||
m_palette_bank = 0;
|
m_palette_bank = 0;
|
||||||
m_gfxctrl = 0;
|
m_gfxctrl = 0;
|
||||||
|
|
||||||
memset(m_vol_ctrl, 0, sizeof(m_vol_ctrl));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( nycaptor )
|
static MACHINE_CONFIG_START( nycaptor )
|
||||||
@ -760,7 +736,7 @@ static MACHINE_CONFIG_START( nycaptor )
|
|||||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) /* IRQ generated by ??? */
|
MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold) /* IRQ generated by ??? */
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,8000000/2)
|
MCFG_CPU_ADD("audiocpu", Z80,8000000/2)
|
||||||
MCFG_CPU_PROGRAM_MAP(nycaptor_sound_map)
|
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||||
MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */
|
MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60) /* IRQ generated by ??? */
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU,2000000)
|
MCFG_DEVICE_ADD("bmcu", TAITO68705_MCU,2000000)
|
||||||
@ -818,6 +794,10 @@ static MACHINE_CONFIG_START( nycaptor )
|
|||||||
// pin 22 Noise Output not mapped
|
// pin 22 Noise Output not mapped
|
||||||
|
|
||||||
// Does the DAC also exist on this board? nycaptor writes 0x80 to 0xd600
|
// Does the DAC also exist on this board? nycaptor writes 0x80 to 0xd600
|
||||||
|
// Update: of course it exists, sound board seems common Taito design.
|
||||||
|
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25) // unknown DAC
|
||||||
|
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
|
||||||
|
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
static MACHINE_CONFIG_START( cyclshtg )
|
static MACHINE_CONFIG_START( cyclshtg )
|
||||||
@ -831,7 +811,7 @@ static MACHINE_CONFIG_START( cyclshtg )
|
|||||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold)
|
MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,8000000/2)
|
MCFG_CPU_ADD("audiocpu", Z80,8000000/2)
|
||||||
MCFG_CPU_PROGRAM_MAP(cyclshtg_sound_map)
|
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||||
MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60)
|
MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60)
|
||||||
|
|
||||||
#ifdef USE_MCU
|
#ifdef USE_MCU
|
||||||
@ -905,7 +885,7 @@ static MACHINE_CONFIG_START( bronx )
|
|||||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold)
|
MCFG_CPU_VBLANK_INT_DRIVER("screen", nycaptor_state, irq0_line_hold)
|
||||||
|
|
||||||
MCFG_CPU_ADD("audiocpu", Z80,8000000/2)
|
MCFG_CPU_ADD("audiocpu", Z80,8000000/2)
|
||||||
MCFG_CPU_PROGRAM_MAP(cyclshtg_sound_map)
|
MCFG_CPU_PROGRAM_MAP(sound_map)
|
||||||
MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60)
|
MCFG_CPU_PERIODIC_INT_DRIVER(nycaptor_state, irq0_line_hold, 2*60)
|
||||||
|
|
||||||
MCFG_QUANTUM_TIME(attotime::from_hz(120))
|
MCFG_QUANTUM_TIME(attotime::from_hz(120))
|
||||||
|
@ -26,6 +26,9 @@ from the bottom speaker and the sound of enemies in the air is heard from the to
|
|||||||
|
|
||||||
Actual game video: http://www.nicozon.net/watch/sm10823430
|
Actual game video: http://www.nicozon.net/watch/sm10823430
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
- TA7630;
|
||||||
|
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
@ -34,6 +37,8 @@ Actual game video: http://www.nicozon.net/watch/sm10823430
|
|||||||
#include "machine/gen_latch.h"
|
#include "machine/gen_latch.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
#include "sound/msm5232.h"
|
#include "sound/msm5232.h"
|
||||||
|
#include "sound/dac.h"
|
||||||
|
#include "sound/volt_reg.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "speaker.h"
|
#include "speaker.h"
|
||||||
|
|
||||||
@ -428,7 +433,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, wyvernf0_state )
|
|||||||
AM_RANGE(0xd000, 0xd000) AM_DEVREADWRITE("soundlatch", generic_latch_8_device, read, write)
|
AM_RANGE(0xd000, 0xd000) AM_DEVREADWRITE("soundlatch", generic_latch_8_device, read, write)
|
||||||
AM_RANGE(0xd200, 0xd200) AM_WRITE(nmi_enable_w)
|
AM_RANGE(0xd200, 0xd200) AM_WRITE(nmi_enable_w)
|
||||||
AM_RANGE(0xd400, 0xd400) AM_WRITE(nmi_disable_w)
|
AM_RANGE(0xd400, 0xd400) AM_WRITE(nmi_disable_w)
|
||||||
AM_RANGE(0xd600, 0xd600) AM_RAM // VOL/BAL?
|
AM_RANGE(0xd600, 0xd600) AM_DEVWRITE("dac", dac_byte_interface, write)
|
||||||
AM_RANGE(0xe000, 0xefff) AM_ROM // space for diagnostics ROM
|
AM_RANGE(0xe000, 0xefff) AM_ROM // space for diagnostics ROM
|
||||||
ADDRESS_MAP_END
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
@ -672,26 +677,30 @@ static MACHINE_CONFIG_START( wyvernf0 )
|
|||||||
|
|
||||||
// coin, fire, lift-off
|
// coin, fire, lift-off
|
||||||
MCFG_SOUND_ADD("ay1", YM2149, 3000000) // YM2149 clock ??, pin 26 ??
|
MCFG_SOUND_ADD("ay1", YM2149, 3000000) // YM2149 clock ??, pin 26 ??
|
||||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||||
|
|
||||||
// lift-off, explosion (saucers), boss alarm
|
// lift-off, explosion (saucers), boss alarm
|
||||||
MCFG_SOUND_ADD("ay2", YM2149, 3000000) // YM2149 clock ??, pin 26 ??
|
MCFG_SOUND_ADD("ay2", YM2149, 3000000) // YM2149 clock ??, pin 26 ??
|
||||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||||
|
|
||||||
// music
|
// music
|
||||||
MCFG_SOUND_ADD("msm", MSM5232, 2000000) // ?
|
MCFG_SOUND_ADD("msm", MSM5232, 2000000) // ?
|
||||||
MCFG_MSM5232_SET_CAPACITORS(0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6) /* default 0.39 uF capacitors (not verified) */
|
MCFG_MSM5232_SET_CAPACITORS(0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6, 0.39e-6) /* default 0.39 uF capacitors (not verified) */
|
||||||
MCFG_SOUND_ROUTE(0, "mono", 1.0) // pin 28 2'-1
|
MCFG_SOUND_ROUTE(0, "mono", 0.5) // pin 28 2'-1
|
||||||
MCFG_SOUND_ROUTE(1, "mono", 1.0) // pin 29 4'-1
|
MCFG_SOUND_ROUTE(1, "mono", 0.5) // pin 29 4'-1
|
||||||
MCFG_SOUND_ROUTE(2, "mono", 1.0) // pin 30 8'-1
|
MCFG_SOUND_ROUTE(2, "mono", 0.5) // pin 30 8'-1
|
||||||
MCFG_SOUND_ROUTE(3, "mono", 1.0) // pin 31 16'-1
|
MCFG_SOUND_ROUTE(3, "mono", 0.5) // pin 31 16'-1
|
||||||
MCFG_SOUND_ROUTE(4, "mono", 1.0) // pin 36 2'-2
|
MCFG_SOUND_ROUTE(4, "mono", 0.5) // pin 36 2'-2
|
||||||
MCFG_SOUND_ROUTE(5, "mono", 1.0) // pin 35 4'-2
|
MCFG_SOUND_ROUTE(5, "mono", 0.5) // pin 35 4'-2
|
||||||
MCFG_SOUND_ROUTE(6, "mono", 1.0) // pin 34 8'-2
|
MCFG_SOUND_ROUTE(6, "mono", 0.5) // pin 34 8'-2
|
||||||
MCFG_SOUND_ROUTE(7, "mono", 1.0) // pin 33 16'-2
|
MCFG_SOUND_ROUTE(7, "mono", 0.5) // pin 33 16'-2
|
||||||
// pin 1 SOLO 8' not mapped
|
// pin 1 SOLO 8' not mapped
|
||||||
// pin 2 SOLO 16' not mapped
|
// pin 2 SOLO 16' not mapped
|
||||||
// pin 22 Noise Output not mapped
|
// pin 22 Noise Output not mapped
|
||||||
|
|
||||||
|
MCFG_SOUND_ADD("dac", DAC_8BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) // unknown DAC
|
||||||
|
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
|
||||||
|
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@ -42,7 +42,6 @@ public:
|
|||||||
|
|
||||||
/* misc */
|
/* misc */
|
||||||
int m_generic_control_reg;
|
int m_generic_control_reg;
|
||||||
int m_vol_ctrl[16];
|
|
||||||
int m_gametype;
|
int m_gametype;
|
||||||
int m_mask;
|
int m_mask;
|
||||||
|
|
||||||
@ -92,7 +91,6 @@ public:
|
|||||||
virtual void machine_start() override;
|
virtual void machine_start() override;
|
||||||
virtual void machine_reset() override;
|
virtual void machine_reset() override;
|
||||||
virtual void video_start() override;
|
virtual void video_start() override;
|
||||||
DECLARE_MACHINE_RESET(ta7630);
|
|
||||||
uint32_t screen_update_nycaptor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
uint32_t screen_update_nycaptor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||||
int nycaptor_spot( );
|
int nycaptor_spot( );
|
||||||
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );
|
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri );
|
||||||
|
Loading…
Reference in New Issue
Block a user