mirror of
https://github.com/holub/mame
synced 2025-06-02 02:49:44 +03:00
vgmplay added Y8950, YMF262 & YMF278B [smf]
This commit is contained in:
parent
700e81c62f
commit
3a502b1090
@ -100,6 +100,16 @@ void y8950_device::device_start()
|
||||
m_timer[1] = timer_alloc(1);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_clock_changed
|
||||
//-------------------------------------------------
|
||||
|
||||
void y8950_device::device_clock_changed()
|
||||
{
|
||||
m_stream->set_sample_rate(clock() / 72);
|
||||
y8950_clock_changed(m_chip, clock(), clock() / 72);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_stop - device-specific stop
|
||||
//-------------------------------------------------
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_clock_changed() override;
|
||||
virtual void device_stop() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
|
@ -2408,6 +2408,11 @@ static void Y8950_deltat_status_reset(void *chip, uint8_t changebits)
|
||||
Y8950->STATUS_RESET(changebits);
|
||||
}
|
||||
|
||||
void y8950_clock_changed(void *chip, uint32_t clock, uint32_t rate)
|
||||
{
|
||||
reinterpret_cast<FM_OPL *>(chip)->clock_changed(clock, rate);
|
||||
}
|
||||
|
||||
void *y8950_init(device_t *device, uint32_t clock, uint32_t rate)
|
||||
{
|
||||
/* emulator create */
|
||||
|
@ -92,6 +92,7 @@ void y8950_set_keyboard_handler(void *chip, OPL_PORTHANDLER_W KeyboardHandler_w,
|
||||
void y8950_set_delta_t_memory(void *chip, void * deltat_mem_ptr, int deltat_mem_size );
|
||||
|
||||
void * y8950_init(device_t *device, uint32_t clock, uint32_t rate);
|
||||
void y8950_clock_changed(void *chip, uint32_t clock, uint32_t rate);
|
||||
void y8950_shutdown(void *chip);
|
||||
void y8950_reset_chip(void *chip);
|
||||
int y8950_write(void *chip, int a, int v);
|
||||
|
@ -1351,7 +1351,7 @@ static void OPL3_initalize(OPL3 *chip)
|
||||
/* logerror("YMF262: freqbase=%f\n", chip->freqbase); */
|
||||
|
||||
/* Timer base time */
|
||||
chip->TimerBase = attotime::from_hz(chip->clock) * (8*36);
|
||||
chip->TimerBase = chip->clock ? attotime::from_hz(chip->clock) * (8 * 36) : attotime::zero;
|
||||
|
||||
/* make fnumber -> increment counter table */
|
||||
for( i=0 ; i < 1024 ; i++ )
|
||||
|
@ -853,6 +853,9 @@ void ymf278b_device::device_clock_changed()
|
||||
{
|
||||
m_stream->set_sample_rate(clock()/768);
|
||||
|
||||
m_clock = clock();
|
||||
m_timer_base = m_clock ? attotime::from_hz(m_clock) * (19 * 36) : attotime::zero;
|
||||
|
||||
// YMF262 related
|
||||
|
||||
int ymf262_clock = clock() / (19/8.0);
|
||||
@ -968,7 +971,7 @@ void ymf278b_device::device_start()
|
||||
m_clock = clock();
|
||||
m_irq_handler.resolve();
|
||||
|
||||
m_timer_base = attotime::from_hz(m_clock) * (19*36);
|
||||
m_timer_base = m_clock ? attotime::from_hz(m_clock) * (19*36) : attotime::zero;
|
||||
m_timer_a = timer_alloc(TIMER_A);
|
||||
m_timer_b = timer_alloc(TIMER_B);
|
||||
m_timer_busy = timer_alloc(TIMER_BUSY_CLEAR);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,9 @@
|
||||
25: RF5C164
|
||||
26: X1-010
|
||||
27: YM2610
|
||||
28: Y8950
|
||||
29: YMF262
|
||||
30: YMF278B
|
||||
-->
|
||||
|
||||
<element name="backdrop"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
|
||||
@ -67,6 +70,9 @@
|
||||
<element name="act_label_rf5c164"><text string="RF5C164" align="1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
<element name="act_label_x1_010"><text string="X1-010" align="1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
<element name="act_label_ym2610"><text string="YM2610" align="1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
<element name="act_label_y8950"><text string="Y8950" align="1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
<element name="act_label_ymf262"><text string="YMF262" align="1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
<element name="act_label_ymf278b"><text string="YMF278B" align="1"><color red="1.0" green="1.0" blue="1.0" /></text></element>
|
||||
|
||||
<element name="static_black2"><rect><color red="0.2" green="0.21" blue="0.23" /></rect></element>
|
||||
|
||||
@ -129,6 +135,9 @@
|
||||
<cpanel name="led_act_25" element="act_led"><bounds x="46" y="4" width="2" height="2" /></cpanel>
|
||||
<cpanel name="led_act_26" element="act_led"><bounds x="46" y="7" width="2" height="2" /></cpanel>
|
||||
<cpanel name="led_act_27" element="act_led"><bounds x="46" y="10" width="2" height="2" /></cpanel>
|
||||
<cpanel name="led_act_28" element="act_led"><bounds x="46" y="13" width="2" height="2" /></cpanel>
|
||||
<cpanel name="led_act_29" element="act_led"><bounds x="46" y="16" width="2" height="2" /></cpanel>
|
||||
<cpanel name="led_act_30" element="act_led"><bounds x="46" y="19" width="2" height="2" /></cpanel>
|
||||
|
||||
<cpanel element="act_label_ay8910"><bounds x="4" y="1.2" width="10" height="1.6" /></cpanel>
|
||||
<cpanel element="act_label_sn76496"><bounds x="4" y="4.2" width="10" height="1.6" /></cpanel>
|
||||
@ -161,6 +170,9 @@
|
||||
<cpanel element="act_label_rf5c164"><bounds x="49" y="4.2" width="10" height="1.6" /></cpanel>
|
||||
<cpanel element="act_label_x1_010"><bounds x="49" y="7.2" width="10" height="1.6" /></cpanel>
|
||||
<cpanel element="act_label_ym2610"><bounds x="49" y="10.2" width="10" height="1.6" /></cpanel>
|
||||
<cpanel element="act_label_y8950"><bounds x="49" y="13.2" width="10" height="1.6" /></cpanel>
|
||||
<cpanel element="act_label_ymf262"><bounds x="49" y="16.2" width="10" height="1.6" /></cpanel>
|
||||
<cpanel element="act_label_ymf278b"><bounds x="49" y="19.2" width="10" height="1.6" /></cpanel>
|
||||
</group>
|
||||
|
||||
<view name="Internal Layout">
|
||||
|
Loading…
Reference in New Issue
Block a user