Previous 199869 Revisions Next

r17406 Wednesday 22nd August, 2012 at 18:19:39 UTC by Curt Coder
(MESS) c64 et al: Inherit the bus clock from parent expansion slot. (nw)
[src/mess/drivers]vic10.c vic20.c
[src/mess/machine]c64exp.c cbmiec.c plus4exp.c vic1010.c vic10exp.c vic10exp.h vic20exp.c vic20exp.h

trunk/src/mess/machine/cbmiec.c
r17405r17406
190190    5)  Tei minimum must be 80us for external device to be a listener.
191191*/
192192
193/*
194
195   TODO:
196
197   - refactor into an actual daisy chain instead of this convenient hack
198
199*/
200
193201#include "cbmiec.h"
194202
195203
trunk/src/mess/machine/plus4exp.c
r17405r17406
234234   m_out_dma_cd_func.resolve(m_out_dma_cd_cb, *this);
235235   m_out_irq_func.resolve(m_out_irq_cb, *this);
236236   m_out_aec_func.resolve(m_out_aec_cb, *this);
237
238   // inherit bus clock
239   if (clock() == 0)
240   {
241      plus4_expansion_slot_device *root = machine().device<plus4_expansion_slot_device>(PLUS4_EXPANSION_SLOT_TAG);
242      assert(root);
243      set_unscaled_clock(root->clock());
244   }
237245}
238246
239247
trunk/src/mess/machine/vic20exp.c
r17405r17406
220220   m_out_irq_func.resolve(m_out_irq_cb, *this);
221221   m_out_nmi_func.resolve(m_out_nmi_cb, *this);
222222   m_out_res_func.resolve(m_out_res_cb, *this);
223
224   // inherit bus clock
225   if (clock() == 0)
226   {
227      vic20_expansion_slot_device *root = machine().device<vic20_expansion_slot_device>(VIC20_EXPANSION_SLOT_TAG);
228      assert(root);
229      set_unscaled_clock(root->clock());
230   }
223231}
224232
225233
trunk/src/mess/machine/vic20exp.h
r17405r17406
5757   const vic20_expansion_slot_interface (_name) =
5858
5959
60#define MCFG_VIC20_EXPANSION_SLOT_ADD(_tag, _config, _slot_intf, _def_slot, _def_inp) \
61    MCFG_DEVICE_ADD(_tag, VIC20_EXPANSION_SLOT, 0) \
60#define MCFG_VIC20_EXPANSION_SLOT_ADD(_tag, _clock, _config, _slot_intf, _def_slot, _def_inp) \
61    MCFG_DEVICE_ADD(_tag, VIC20_EXPANSION_SLOT, _clock) \
6262    MCFG_DEVICE_CONFIG(_config) \
6363   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
6464
trunk/src/mess/machine/vic1010.c
r17405r17406
5050//-------------------------------------------------
5151
5252static MACHINE_CONFIG_FRAGMENT( vic1010 )
53   MCFG_VIC20_EXPANSION_SLOT_ADD("slot1", expansion_intf, vic20_expansion_cards, NULL, NULL)
54   MCFG_VIC20_EXPANSION_SLOT_ADD("slot2", expansion_intf, vic20_expansion_cards, NULL, NULL)
55   MCFG_VIC20_EXPANSION_SLOT_ADD("slot3", expansion_intf, vic20_expansion_cards, NULL, NULL)
56   MCFG_VIC20_EXPANSION_SLOT_ADD("slot4", expansion_intf, vic20_expansion_cards, NULL, NULL)
57   MCFG_VIC20_EXPANSION_SLOT_ADD("slot5", expansion_intf, vic20_expansion_cards, NULL, NULL)
58   MCFG_VIC20_EXPANSION_SLOT_ADD("slot6", expansion_intf, vic20_expansion_cards, NULL, NULL)
53   MCFG_VIC20_EXPANSION_SLOT_ADD("slot1", 0, expansion_intf, vic20_expansion_cards, NULL, NULL)
54   MCFG_VIC20_EXPANSION_SLOT_ADD("slot2", 0, expansion_intf, vic20_expansion_cards, NULL, NULL)
55   MCFG_VIC20_EXPANSION_SLOT_ADD("slot3", 0, expansion_intf, vic20_expansion_cards, NULL, NULL)
56   MCFG_VIC20_EXPANSION_SLOT_ADD("slot4", 0, expansion_intf, vic20_expansion_cards, NULL, NULL)
57   MCFG_VIC20_EXPANSION_SLOT_ADD("slot5", 0, expansion_intf, vic20_expansion_cards, NULL, NULL)
58   MCFG_VIC20_EXPANSION_SLOT_ADD("slot6", 0, expansion_intf, vic20_expansion_cards, NULL, NULL)
5959MACHINE_CONFIG_END
6060
6161
trunk/src/mess/machine/c64exp.c
r17405r17406
202202   m_out_nmi_func.resolve(m_out_nmi_cb, *this);
203203   m_out_dma_func.resolve(m_out_dma_cb, *this);
204204   m_out_reset_func.resolve(m_out_reset_cb, *this);
205
206   // inherit bus clock
207   if (clock() == 0)
208   {
209      c64_expansion_slot_device *root = machine().device<c64_expansion_slot_device>(C64_EXPANSION_SLOT_TAG);
210      assert(root);
211      set_unscaled_clock(root->clock());
212   }
205213}
206214
207215
trunk/src/mess/machine/vic10exp.c
r17405r17406
99
1010#include "emu.h"
1111#include "emuopts.h"
12#include "machine/vic10exp.h"
1312#include "formats/cbm_crt.h"
1413#include "formats/imageutl.h"
14#include "machine/vic10exp.h"
1515
1616
1717
r17405r17406
164164   m_out_sp_func.resolve(m_out_sp_cb, *this);
165165   m_out_cnt_func.resolve(m_out_cnt_cb, *this);
166166   m_out_res_func.resolve(m_out_res_cb, *this);
167
168   // inherit bus clock
169   if (clock() == 0)
170   {
171      vic10_expansion_slot_device *root = machine().device<vic10_expansion_slot_device>(VIC10_EXPANSION_SLOT_TAG);
172      assert(root);
173      set_unscaled_clock(root->clock());
174   }
167175}
168176
169177
trunk/src/mess/machine/vic10exp.h
r17405r17406
5858   const vic10_expansion_slot_interface (_name) =
5959
6060
61#define MCFG_VIC10_EXPANSION_SLOT_ADD(_tag, _config, _slot_intf, _def_slot, _def_inp) \
62    MCFG_DEVICE_ADD(_tag, VIC10_EXPANSION_SLOT, 0) \
61#define MCFG_VIC10_EXPANSION_SLOT_ADD(_tag, _clock, _config, _slot_intf, _def_slot, _def_inp) \
62    MCFG_DEVICE_ADD(_tag, VIC10_EXPANSION_SLOT, _clock) \
6363    MCFG_DEVICE_CONFIG(_config) \
6464   MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _def_inp, false)
6565
trunk/src/mess/drivers/vic20.c
r17405r17406
821821
822822   MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vic20_control_port_devices, NULL, NULL)
823823   MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vic20_control_port_devices, NULL, NULL)
824   MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, expansion_intf, vic20_expansion_cards, NULL, NULL)
825824   MCFG_VIC20_USER_PORT_ADD(VIC20_USER_PORT_TAG, user_intf, vic20_user_port_cards, NULL, NULL)
826825
827826   // software lists
r17405r17406
862861   MCFG_SOUND_ADD("dac", DAC, 0)
863862   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
864863
864   // devices
865   MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, MOS6560_CLOCK, expansion_intf, vic20_expansion_cards, NULL, NULL)
866
865867   // software lists
866868   MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
867869   MCFG_SOFTWARE_LIST_FILTER("disk_list", "NTSC")
r17405r17406
889891   MCFG_PALETTE_LENGTH(16)
890892   MCFG_PALETTE_INIT( vic20 )
891893
894   // devices
895   MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, MOS6561_CLOCK, expansion_intf, vic20_expansion_cards, NULL, NULL)
896
892897   // sound hardware
893898   MCFG_SPEAKER_STANDARD_MONO("mono")
894899   MCFG_MOS656X_ADD(M6560_TAG, vic_pal_intf)
trunk/src/mess/drivers/vic10.c
r17405r17406
634634   MCFG_MOS6526R1_ADD(MOS6526_TAG, VIC6566_CLOCK, cia_intf)
635635   MCFG_CASSETTE_ADD(CASSETTE_TAG, cbm_cassette_interface)
636636   MCFG_TIMER_ADD(TIMER_C1531_TAG, cassette_tick)
637   MCFG_VIC10_EXPANSION_SLOT_ADD(VIC10_EXPANSION_SLOT_TAG, expansion_intf, vic10_expansion_cards, NULL, NULL)
637   MCFG_VIC10_EXPANSION_SLOT_ADD(VIC10_EXPANSION_SLOT_TAG, VIC6566_CLOCK, expansion_intf, vic10_expansion_cards, NULL, NULL)
638638
639639   // software list
640640   MCFG_SOFTWARE_LIST_ADD("cart_list", "vic10")

Previous 199869 Revisions Next


© 1997-2024 The MAME Team