Previous 15994 Revisions Next

r14976 Friday 20th April, 2012 at 07:12:37 UTC by Miodrag Milanović
Fix for 16 bit device callbacks by Judge (nw)
[src/emu]devcb.h
[src/mess/drivers]a2600.c

src/emu/devcb.h
r14975r14976
117117
118118// static template for a read16 stub function that calls through a given READ16_MEMBER
119119template<class _Class, UINT16 (_Class::*_Function)(address_space &, offs_t, UINT16)>
120UINT16 devcb_stub16(device_t *device, offs_t offset)
120UINT16 devcb_stub(device_t *device, offs_t offset, UINT16 mask=0xffff)
121121{
122122   _Class *target = downcast<_Class *>(device);
123   return (target->*_Function)(*device->machine().memory().first_space(), offset, 0xffff);
123   return (target->*_Function)(*device->machine().memory().first_space(), offset, mask);
124124}
125125
126126// static template for a write_line stub function that calls through a given WRITE_LINE_MEMBER
r14975r14976
141141
142142// static template for a write16 stub function that calls through a given WRITE16_MEMBER
143143template<class _Class, void (_Class::*_Function)(address_space &, offs_t, UINT16, UINT16)>
144void devcb_stub16(device_t *device, offs_t offset, UINT16 data)
144void devcb_stub(device_t *device, offs_t offset, UINT16 data, UINT16 mask=0xffff)
145145{
146146   _Class *target = downcast<_Class *>(device);
147   (target->*_Function)(*device->machine().memory().first_space(), offset, data, 0xffff);
147   (target->*_Function)(*device->machine().memory().first_space(), offset, data, mask);
148148}
149149
150150#define DEVCB_NULL                        { DEVCB_TYPE_NULL }
src/mess/drivers/a2600.c
r14975r14976
15661566
15671567static const tia_interface a2600_tia_interface =
15681568{
1569   DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_read_input_port),
1569   DEVCB_DRIVER_MEMBER(a2600_state, a2600_read_input_port),
15701570   DEVCB_DRIVER_MEMBER(a2600_state, a2600_get_databus_contents),
1571   DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_tia_vsync_callback)
1571   DEVCB_DRIVER_MEMBER(a2600_state, a2600_tia_vsync_callback)
15721572};
15731573
15741574static const tia_interface a2600_tia_interface_pal =
15751575{
1576   DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_read_input_port),
1576   DEVCB_DRIVER_MEMBER(a2600_state, a2600_read_input_port),
15771577   DEVCB_DRIVER_MEMBER(a2600_state, a2600_get_databus_contents),
1578   DEVCB_NULL,//DEVCB_DRIVER_MEMBER(a2600_state, a2600_tia_vsync_callback_pal)
1578   DEVCB_DRIVER_MEMBER(a2600_state, a2600_tia_vsync_callback_pal)
15791579};
15801580
15811581

Previous 15994 Revisions Next


© 1998-2018 The MESS Team