Previous 199869 Revisions Next

r29187 Wednesday 2nd April, 2014 at 15:47:12 UTC by Miodrag Milanović
no handler usage is possible in devcb so removing not used code (nw)
[src/emu]devcb.c devcb.h

trunk/src/emu/devcb.c
r29186r29187
396396
397397
398398//-------------------------------------------------
399//  from_read8space - helper to convert from a device
400//  line read value to an 8-bit value
401//-------------------------------------------------
402
403UINT8 devcb_resolved_read8::from_read8space(offs_t offset, UINT8 mem_mask)
404{
405   return (*m_helper.read8_space)(*m_object.space, offset, 0xff);
406}
407
408
409//-------------------------------------------------
410399//  from_read8device - helper to convert from a device
411400//  line read value to an 8-bit value
412401//-------------------------------------------------
r29186r29187
546535
547536
548537//-------------------------------------------------
549//  to_write8space - helper to convert to an 8-bit
550//  memory read value from a line value
551//-------------------------------------------------
552
553void devcb_resolved_write8::to_write8space(offs_t offset, UINT8 data, UINT8 mem_mask)
554{
555   (*m_helper.write8_space)(*m_object.space, offset, data, mem_mask);
556}
557
558
559//-------------------------------------------------
560538//  to_write8device - helper to convert to an 8-bit
561539//  memory read value from a line value
562540//-------------------------------------------------
trunk/src/emu/devcb.h
r29186r29187
3434        write_line_device_func: (device, data)
3535        read8_device_func:      (device, offset)
3636        write8_device_func:     (device, offset, data)
37        read8_space_func:       (space, offset)
38        write8_space_func:      (space, offset, data)
3937        read16_device_func:     (device, offset)
4038        write16_device_func:    (device, offset, data)
41        read16_space_func:      (space, offset)
42        write16_space_func:     (space, offset, data)
4339        read32_device_func:     (device, offset)
4440        write32_device_func:    (device, offset, data)
45        read32_space_func:      (space, offset)
46        write32_space_func:     (space, offset, data)
4741        read64_device_func:     (device, offset)
4842        write64_device_func:    (device, offset, data)
49        read64_space_func:      (space, offset)
50        write64_space_func:     (space, offset, data)
5143
5244***************************************************************************/
5345
r29186r29187
165157#define DEVCB_NULL                              { DEVCB_TYPE_NULL }
166158
167159// line or read/write handlers for the driver device
168#define DEVCB_DRIVER_LINE_MEMBER(cls,memb)      { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, &devcb_line_stub<cls, &cls::memb>, NULL, NULL }
169#define DEVCB_DRIVER_MEMBER(cls,memb)           { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub<cls, &cls::memb>, NULL }
170#define DEVCB_DRIVER_MEMBER16(cls,memb)         { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub16<cls, &cls::memb>, NULL }
171#define DEVCB_DRIVER_MEMBER32(cls,memb)         { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub32<cls, &cls::memb>, NULL }
172//#define DEVCB_DRIVER_MEMBER64(cls,memb)         { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub64<cls, &cls::memb>, NULL }
160#define DEVCB_DRIVER_LINE_MEMBER(cls,memb)      { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, &devcb_line_stub<cls, &cls::memb>, NULL }
161#define DEVCB_DRIVER_MEMBER(cls,memb)           { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub<cls, &cls::memb> }
162#define DEVCB_DRIVER_MEMBER16(cls,memb)         { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub16<cls, &cls::memb> }
163#define DEVCB_DRIVER_MEMBER32(cls,memb)         { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub32<cls, &cls::memb> }
164//#define DEVCB_DRIVER_MEMBER64(cls,memb)         { DEVCB_TYPE_DEVICE, 0, ":", #cls "::" #memb, NULL, &devcb_stub64<cls, &cls::memb> }
173165
174166// line or read/write handlers for another device
175#define DEVCB_DEVICE_LINE_MEMBER(tag,cls,memb)  { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, &devcb_line_stub<cls, &cls::memb>, NULL, NULL }
176#define DEVCB_DEVICE_MEMBER(tag,cls,memb)       { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub<cls, &cls::memb>, NULL }
177#define DEVCB_DEVICE_MEMBER16(tag,cls,memb)     { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub16<cls, &cls::memb>, NULL }
178#define DEVCB_DEVICE_MEMBER32(tag,cls,memb)     { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub32<cls, &cls::memb>, NULL }
179//#define DEVCB_DEVICE_MEMBER64(tag,cls,memb)     { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub64<cls, &cls::memb>, NULL }
167#define DEVCB_DEVICE_LINE_MEMBER(tag,cls,memb)  { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, &devcb_line_stub<cls, &cls::memb>, NULL }
168#define DEVCB_DEVICE_MEMBER(tag,cls,memb)       { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub<cls, &cls::memb> }
169#define DEVCB_DEVICE_MEMBER16(tag,cls,memb)     { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub16<cls, &cls::memb> }
170#define DEVCB_DEVICE_MEMBER32(tag,cls,memb)     { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub32<cls, &cls::memb> }
171//#define DEVCB_DEVICE_MEMBER64(tag,cls,memb)     { DEVCB_TYPE_DEVICE, 0, tag, #cls "::" #memb, NULL, &devcb_stub64<cls, &cls::memb> }
180172
181173// constant values
182#define DEVCB_CONSTANT(value)                   { DEVCB_TYPE_CONSTANT, value, NULL, NULL, NULL, NULL }
174#define DEVCB_CONSTANT(value)                   { DEVCB_TYPE_CONSTANT, value, NULL, NULL, NULL }
183175#define DEVCB_LINE_GND                          DEVCB_CONSTANT(0)
184176#define DEVCB_LINE_VCC                          DEVCB_CONSTANT(1)
185177
186#define DEVCB_UNMAPPED                          { DEVCB_TYPE_UNMAP, 0, NULL, NULL, NULL, NULL }
178#define DEVCB_UNMAPPED                          { DEVCB_TYPE_UNMAP, 0, NULL, NULL, NULL }
187179
188180// read handlers for an I/O port by tag
189#define DEVCB_INPUT_PORT(tag)                   { DEVCB_TYPE_IOPORT, 0, (tag), NULL, NULL, NULL, NULL }
181#define DEVCB_INPUT_PORT(tag)                   { DEVCB_TYPE_IOPORT, 0, (tag), NULL, NULL, NULL }
190182
191183// write handlers for a CPU input line
192#define DEVCB_CPU_INPUT_LINE(tag,line)          { DEVCB_TYPE_INPUT_LINE, (line), (tag), NULL, NULL, NULL, NULL }
184#define DEVCB_CPU_INPUT_LINE(tag,line)          { DEVCB_TYPE_INPUT_LINE, (line), (tag), NULL, NULL, NULL }
193185
194186
195187
r29186r29187
218210   UINT8 *                 null_indicator;
219211   read_line_device_func   read_line;
220212   read8_device_func       read8_device;
221   read8_space_func        read8_space;
222213   read16_device_func      read16_device;
223   read16_space_func       read16_space;
224214   read32_device_func      read32_device;
225   read32_space_func       read32_space;
226215   read64_device_func      read64_device;
227   read64_space_func       read64_space;
228216};
229217
230218union devcb_resolved_write_helpers
r29186r29187
232220   UINT8 *                 null_indicator;
233221   write_line_device_func  write_line;
234222   write8_device_func      write8_device;
235   write8_space_func       write8_space;
236223   write16_device_func     write16_device;
237   write16_space_func      write16_space;
238224   write32_device_func     write32_device;
239   write32_space_func      write32_space;
240225   write64_device_func     write64_device;
241   write64_space_func      write64_space;
242226   int                     input_line;
243227};
244228
r29186r29187
254238   const char *            name;           // name of the target function
255239   read_line_device_func   readline;       // read line function
256240   read8_device_func       readdevice;     // read device function
257   read8_space_func        readspace;      // read space function
258241};
259242
260243
r29186r29187
304287   const char *            name;           // name of the target function
305288   write_line_device_func  writeline;      // write line function
306289   write8_device_func      writedevice;    // write device function
307   write8_space_func       writespace;     // write space function
308290};
309291
310292
r29186r29187
355337   const char *            name;           // name of the target function
356338   read_line_device_func   readline;       // read line function
357339   read8_device_func       readdevice;     // read device function
358   read8_space_func        readspace;      // read space function
359340};
360341
361342
r29186r29187
386367private:
387368   // internal helpers
388369   UINT8 from_port(offs_t offset, UINT8 mem_mask);
389   UINT8 from_read8space(offs_t offset, UINT8 mem_mask);
390370   UINT8 from_read8device(offs_t offset, UINT8 mem_mask);
391371   UINT8 from_readline(offs_t offset, UINT8 mem_mask);
392372   UINT8 from_constant(offs_t offset, UINT8 mem_mask);
r29186r29187
410390   const char *            name;           // name of the target function
411391   write_line_device_func  writeline;      // write line function
412392   write8_device_func      writedevice;    // write device function
413   write8_space_func       writespace;     // write space function
414393};
415394
416395
r29186r29187
442421   // internal helpers
443422   void to_null(offs_t offset, UINT8 data, UINT8 mem_mask);
444423   void to_port(offs_t offset, UINT8 data, UINT8 mem_mask);
445   void to_write8space(offs_t offset, UINT8 data, UINT8 mem_mask);
446424   void to_write8device(offs_t offset, UINT8 data, UINT8 mem_mask);
447425   void to_writeline(offs_t offset, UINT8 data, UINT8 mem_mask);
448426   void to_input(offs_t offset, UINT8 data, UINT8 mem_mask);
r29186r29187
466444   const char *            name;           // name of the target function
467445   read_line_device_func   readline;       // read line function
468446   read16_device_func      readdevice;     // read device function
469   read16_space_func       readspace;      // read space function
470447};
471448
472449
r29186r29187
520497   const char *            name;           // name of the target function
521498   write_line_device_func  writeline;      // write line function
522499   write16_device_func     writedevice;    // write device function
523   write16_space_func      writespace;     // write space function
524500};
525501
526502
r29186r29187
574550   const char *            name;           // name of the target function
575551   read_line_device_func   readline;       // read line function
576552   read32_device_func      readdevice;     // read device function
577   read32_space_func       readspace;      // read space function
578553};
579554
580555
r29186r29187
628603   const char *            name;           // name of the target function
629604   write_line_device_func  writeline;      // write line function
630605   write32_device_func     writedevice;    // write device function
631   write32_space_func      writespace;     // write space function
632606};
633607
634608
r29186r29187
682656   const char *            name;           // name of the target function
683657   read_line_device_func   readline;       // read line function
684658   read64_device_func      readdevice;     // read device function
685   read64_space_func       readspace;      // read space function
686659};
687660
688661
r29186r29187
736709   const char *            name;           // name of the target function
737710   write_line_device_func  writeline;      // write line function
738711   write64_device_func     writedevice;    // write device function
739   write64_space_func      writespace;     // write space function
740712};
741713
742714

Previous 199869 Revisions Next


© 1997-2024 The MAME Team