mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +03:00
From: AGEMAME Development [agemame@gmail.com]
Sent: Monday, May 11, 2009 10:36 AM To: submit@mamedev.org Subject: MPU4 lamp smoothing Lamp output in MPU4.c smoothed. Redrawing now only occurs on the peaks of the 50Hz AC Power. (Based on documentation from FME Forever) (After fixing the silly beginnner C errors)
This commit is contained in:
parent
6dfeee8520
commit
93245f1816
@ -4,6 +4,7 @@
|
|||||||
This is the core driver, no video specific stuff should go in here.
|
This is the core driver, no video specific stuff should go in here.
|
||||||
This driver holds all the mechanical games.
|
This driver holds all the mechanical games.
|
||||||
|
|
||||||
|
05-2009: Miscellaneous lamp fixes, based on data from FME Forever.
|
||||||
09-2007: Haze: Added Deal 'Em video support.
|
09-2007: Haze: Added Deal 'Em video support.
|
||||||
03-08-2007: J Wallace: Removed audio filter for now, since sound is more accurate without them.
|
03-08-2007: J Wallace: Removed audio filter for now, since sound is more accurate without them.
|
||||||
Connect 4 now has the right sound.
|
Connect 4 now has the right sound.
|
||||||
@ -294,6 +295,7 @@ static int lamp_col;
|
|||||||
static int ic23_active;
|
static int ic23_active;
|
||||||
static int led_extend;
|
static int led_extend;
|
||||||
static int serial_card_connected;
|
static int serial_card_connected;
|
||||||
|
static int multiplex_smooth;
|
||||||
static emu_timer *ic24_timer;
|
static emu_timer *ic24_timer;
|
||||||
static TIMER_CALLBACK( ic24_timeout );
|
static TIMER_CALLBACK( ic24_timeout );
|
||||||
|
|
||||||
@ -394,7 +396,15 @@ static void update_lamps(void)
|
|||||||
mpu4_draw_led(8, pled_segs[0]);
|
mpu4_draw_led(8, pled_segs[0]);
|
||||||
mpu4_draw_led(9, pled_segs[1]);
|
mpu4_draw_led(9, pled_segs[1]);
|
||||||
}
|
}
|
||||||
draw_lamps();
|
|
||||||
|
/* Lamp smoothing, this draws lamps only at the peaks of the AC power that would light them */
|
||||||
|
if ((multiplex_smooth == (input_strobe - 1))||((multiplex_smooth == 7) && (input_strobe == 0))||(multiplex_smooth == input_strobe))
|
||||||
|
{
|
||||||
|
draw_lamps();
|
||||||
|
mpu4_draw_led(input_strobe, led_segs[input_strobe]);
|
||||||
|
multiplex_smooth = input_strobe;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -540,7 +550,6 @@ static WRITE8_DEVICE_HANDLER( pia_ic3_porta_w )
|
|||||||
if(ic23_active)
|
if(ic23_active)
|
||||||
{
|
{
|
||||||
lamp_strobe = data;
|
lamp_strobe = data;
|
||||||
update_lamps();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,7 +561,6 @@ static WRITE8_DEVICE_HANDLER( pia_ic3_portb_w )
|
|||||||
if(ic23_active)
|
if(ic23_active)
|
||||||
{
|
{
|
||||||
lamp_strobe2 = data;
|
lamp_strobe2 = data;
|
||||||
update_lamps();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1731,10 +1739,10 @@ static DRIVER_INIT (m_gmball)
|
|||||||
static TIMER_DEVICE_CALLBACK( gen_50hz )
|
static TIMER_DEVICE_CALLBACK( gen_50hz )
|
||||||
{
|
{
|
||||||
/* Although reported as a '50Hz' signal, the fact that both rising and
|
/* Although reported as a '50Hz' signal, the fact that both rising and
|
||||||
falling edges of the pulse are used, the timer actually gives a 100Hz
|
falling edges of the pulse are used means the timer actually gives a 100Hz
|
||||||
oscillating signal.*/
|
oscillating signal.*/
|
||||||
signal_50hz = signal_50hz?0:1;
|
signal_50hz = signal_50hz?0:1;
|
||||||
|
update_lamps();
|
||||||
pia6821_ca1_w(devtag_get_device(timer->machine, "pia_ic4"), 0, signal_50hz); /* signal is connected to IC4 CA1 */
|
pia6821_ca1_w(devtag_get_device(timer->machine, "pia_ic4"), 0, signal_50hz); /* signal is connected to IC4 CA1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,18 +74,49 @@
|
|||||||
<color red="0.1" green="0.1" blue="0.1" />
|
<color red="0.1" green="0.1" blue="0.1" />
|
||||||
</disk>
|
</disk>
|
||||||
</element>
|
</element>
|
||||||
<element name="arrow" defstate="0">
|
|
||||||
<text string="->" state="1">
|
<element name="C" defstate="0">
|
||||||
|
<text string="C" state="1">
|
||||||
<color red="1.0" green="1.0" blue="0.0" />
|
<color red="1.0" green="1.0" blue="0.0" />
|
||||||
<bounds x="0" y="0.1" width="1" height="0.8" />
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
</text>
|
</text>
|
||||||
</element>
|
</element>
|
||||||
<element name="target" defstate="0">
|
|
||||||
|
<element name="O" defstate="0">
|
||||||
<text string="O" state="1">
|
<text string="O" state="1">
|
||||||
<color red="1.0" green="0.0" blue="0.0" />
|
<color red="1.0" green="0.0" blue="0.0" />
|
||||||
<bounds x="0" y="0.1" width="1" height="0.8" />
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
</text>
|
</text>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
|
<element name="N" defstate="0">
|
||||||
|
<text string="N" state="1">
|
||||||
|
<color red="1.0" green="0.0" blue="0.0" />
|
||||||
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="E" defstate="0">
|
||||||
|
<text string="E" state="1">
|
||||||
|
<color red="1.0" green="0.0" blue="0.0" />
|
||||||
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="T" defstate="0">
|
||||||
|
<text string="T" state="1">
|
||||||
|
<color red="1.0" green="0.0" blue="0.0" />
|
||||||
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
|
||||||
|
<element name="4" defstate="0">
|
||||||
|
<text string="4" state="1">
|
||||||
|
<color red="1.0" green="0.0" blue="0.0" />
|
||||||
|
<bounds x="0" y="0.1" width="1" height="0.8" />
|
||||||
|
</text>
|
||||||
|
</element>
|
||||||
|
|
||||||
<element name="vfd0">
|
<element name="vfd0">
|
||||||
<led16segsc>
|
<led16segsc>
|
||||||
<color red="0" green="0.6" blue="1.0" />
|
<color red="0" green="0.6" blue="1.0" />
|
||||||
@ -493,28 +524,28 @@
|
|||||||
<bounds x="48" y="42" width="7" height="7"/>
|
<bounds x="48" y="42" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
|
|
||||||
<backdrop name="lamp7" element="arrow" state="0">
|
<backdrop name="lamp7" element="C" state="0">
|
||||||
<bounds x="0" y="48" width="7" height="7"/>
|
<bounds x="0" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
<backdrop name="lamp15" element="arrow" state="0">
|
<backdrop name="lamp15" element="O" state="0">
|
||||||
<bounds x="8" y="48" width="7" height="7"/>
|
<bounds x="8" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
<backdrop name="lamp23" element="arrow" state="0">
|
<backdrop name="lamp23" element="N" state="0">
|
||||||
<bounds x="16" y="48" width="7" height="7"/>
|
<bounds x="16" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
<backdrop name="lamp31" element="arrow" state="0">
|
<backdrop name="lamp31" element="N" state="0">
|
||||||
<bounds x="24" y="48" width="7" height="7"/>
|
<bounds x="24" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
<backdrop name="lamp39" element="arrow" state="0">
|
<backdrop name="lamp39" element="E" state="0">
|
||||||
<bounds x="32" y="48" width="7" height="7"/>
|
<bounds x="32" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
<backdrop name="lamp47" element="arrow" state="0">
|
<backdrop name="lamp47" element="C" state="0">
|
||||||
<bounds x="40" y="48" width="7" height="7"/>
|
<bounds x="40" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
<backdrop name="lamp55" element="arrow" state="0">
|
<backdrop name="lamp55" element="T" state="0">
|
||||||
<bounds x="48" y="48" width="7" height="7"/>
|
<bounds x="48" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
<backdrop name="lamp63" element="target" state="0">
|
<backdrop name="lamp63" element="4" state="0">
|
||||||
<bounds x="56" y="48" width="7" height="7"/>
|
<bounds x="56" y="48" width="7" height="7"/>
|
||||||
</backdrop>
|
</backdrop>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user