summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/drivers/uzebox.c
diff options
context:
space:
mode:
author Felipe CorrĂȘa da Silva Sanches <fsanches@metamaquina.com.br>2015-06-13 10:42:53 -0300
committer Felipe CorrĂȘa da Silva Sanches <fsanches@metamaquina.com.br>2015-06-16 15:17:20 -0300
commit9a27b57c07a23509f4f7fc3b93e3f5c2679e293c (patch)
tree7686f19cd4a8c1ddede96422b53ecb05c696ccb9 /src/mess/drivers/uzebox.c
parente3fdd3f0335fc6ba632b792c448d941f2bd514e9 (diff)
uzebox: adding sound emulation (It works but with terrible performance. Uzebox's DrMario song is recognizable even though the sound is choppy, full of noise).
When running with -wavwrite the resulting file plays nicely on a music player. The sound is much better, but still contains a high frequency noisy sort of hiss.
Diffstat (limited to 'src/mess/drivers/uzebox.c')
-rw-r--r--src/mess/drivers/uzebox.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mess/drivers/uzebox.c b/src/mess/drivers/uzebox.c
index a3b09b7621e..550f74bcafd 100644
--- a/src/mess/drivers/uzebox.c
+++ b/src/mess/drivers/uzebox.c
@@ -32,13 +32,15 @@ public:
m_maincpu(*this, "maincpu"),
m_cart(*this, "cartslot"),
m_ctrl1(*this, "ctrl1"),
- m_ctrl2(*this, "ctrl2")
+ m_ctrl2(*this, "ctrl2"),
+ m_dac(*this, "dac")
{ }
required_device<avr8_device> m_maincpu;
required_device<generic_slot_device> m_cart;
required_device<snes_control_port_device> m_ctrl1;
required_device<snes_control_port_device> m_ctrl2;
+ required_device<dac_device> m_dac;
DECLARE_READ8_MEMBER(port_a_r);
DECLARE_WRITE8_MEMBER(port_a_w);
@@ -168,7 +170,10 @@ WRITE8_MEMBER(uzebox_state::port_d_w)
// --x- x--- NC
// ---- -x-- power
// ---- --xx UART MIDI
-
+ if ((m_port_d ^ data) & 0x80)
+ {
+ m_dac->write_unsigned8((data & 0x80) ? 0x3F: 0);
+ }
m_port_d = data;
}
@@ -302,4 +307,4 @@ ROM_START( uzebox )
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
-CONS(2010, uzebox, 0, 0, uzebox, uzebox, driver_device, 0, "Belogic", "Uzebox", GAME_NO_SOUND | GAME_NOT_WORKING)
+CONS(2010, uzebox, 0, 0, uzebox, uzebox, driver_device, 0, "Belogic", "Uzebox", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING)