mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
-timetrv: Hooked up 1-bit audio DAC. [Ryan Holtz] (#9476)
Co-authored-by: MooglyGuy <mog@home>
This commit is contained in:
parent
bd8779ece4
commit
c3162e739d
@ -28,6 +28,7 @@ CPU is an Intel 80188
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/ins8250.h"
|
||||
#include "machine/ldv4200hle.h"
|
||||
#include "sound/dac.h"
|
||||
#include "emupal.h"
|
||||
#include "speaker.h"
|
||||
|
||||
@ -46,6 +47,7 @@ public:
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_uart(*this, "uart")
|
||||
, m_laserdisc(*this, "laserdisc")
|
||||
, m_audiodac(*this, "audiodac")
|
||||
, m_digits(*this, "digit%u", 0U)
|
||||
, m_decimals(*this, "decimal%u", 0U)
|
||||
, m_cube_lamp(*this, "cube_lamp")
|
||||
@ -61,6 +63,7 @@ private:
|
||||
void timetrv_io(address_map &map);
|
||||
|
||||
void ppi1_pc_w(uint8_t data);
|
||||
void tmrout1_w(int state);
|
||||
|
||||
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
@ -69,9 +72,10 @@ private:
|
||||
required_shared_ptr<uint8_t> m_led_vram_lo;
|
||||
required_shared_ptr<uint8_t> m_led_vram_hi;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<i80188_cpu_device> m_maincpu;
|
||||
required_device<ns16450_device> m_uart;
|
||||
required_device<pioneer_ldv4200hle_device> m_laserdisc;
|
||||
required_device<dac_1bit_device> m_audiodac;
|
||||
output_finder<16> m_digits;
|
||||
output_finder<16> m_decimals;
|
||||
output_finder<> m_cube_lamp;
|
||||
@ -86,6 +90,16 @@ void timetrv_state::machine_start()
|
||||
m_player_lamps.resolve();
|
||||
}
|
||||
|
||||
void timetrv_state::tmrout1_w(int state)
|
||||
{
|
||||
static int old_state = 1;
|
||||
if (state != old_state)
|
||||
{
|
||||
printf("T1: %d\n", state);
|
||||
}
|
||||
old_state = state;
|
||||
}
|
||||
|
||||
void timetrv_state::ppi1_pc_w(uint8_t data)
|
||||
{
|
||||
// Bit 3: 2P Start lamp
|
||||
@ -298,6 +312,8 @@ void timetrv_state::timetrv(machine_config &config)
|
||||
I80188(config, m_maincpu, 16_MHz_XTAL); // Confirmed from PCB layout diagram
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &timetrv_state::timetrv_map);
|
||||
m_maincpu->set_addrmap(AS_IO, &timetrv_state::timetrv_io);
|
||||
m_maincpu->tmrout0_handler().set(m_audiodac, FUNC(dac_1bit_device::write));
|
||||
m_maincpu->tmrout1_handler().set(FUNC(timetrv_state::tmrout1_w));
|
||||
// interrupts are generated by internally-driven timers
|
||||
|
||||
EEPROM_2816(config, "eeprom");
|
||||
@ -324,6 +340,8 @@ void timetrv_state::timetrv(machine_config &config)
|
||||
m_laserdisc->serial_tx().set(m_uart, FUNC(ns16450_device::rx_w));
|
||||
|
||||
/* sound hardware */
|
||||
DAC_1BIT(config, m_audiodac, 0).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
}
|
||||
|
||||
@ -353,5 +371,5 @@ ROM_END
|
||||
|
||||
|
||||
|
||||
GAMEL( 1991, timetrv, 0, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND, layout_timetrv )
|
||||
GAMEL( 1991, timetrv2, timetrv, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND, layout_timetrv ) // Different frame indices; Europe?
|
||||
GAMEL( 1991, timetrv, 0, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 1)", MACHINE_SUPPORTS_SAVE, layout_timetrv )
|
||||
GAMEL( 1991, timetrv2, timetrv, timetrv, timetrv, timetrv_state, empty_init, ORIENTATION_FLIP_Y, "Virtual Image Productions (Sega license)", "Time Traveler (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING, layout_timetrv ) // Different frame indices; Europe?
|
||||
|
Loading…
Reference in New Issue
Block a user