Previous 15994 Revisions Next

r11487 Sunday 8th May, 2011 at 18:28:24 UTC by Miodrag Milanović
Sync with MAME (no whatsnew)
[src/emu]addrmap.c addrmap.h memory.c
[src/emu/cpu/psx]psx.c
[src/emu/sound]bsmt2000.c
[src/mame/machine]mie.c
[src/mess/machine]abc77.c abc99.c at_keybc.c comxpl80.c lux10828.c lux21046.c

src/mame/machine/mie.c
r11486r11487
1#define ADDRESS_MAP_MODERN
2
13#include "emu.h"
24#include "mie.h"
35#include "maple-dc.h"
r11486r11487
1618const device_type MIE = &device_creator<mie_device>;
1719const device_type MIE_JVS = &device_creator<mie_jvs_device>;
1820
19static ADDRESS_MAP_START( mie_map, AS_PROGRAM, 8 )
21static ADDRESS_MAP_START( mie_map, AS_PROGRAM, 8, mie_device)
2022   AM_RANGE(0x0000, 0x07ff) AM_ROM
21   AM_RANGE(0x0800, 0x6fff) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, mie_device, read_ff)
22   AM_RANGE(0x7000, 0x7002) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, control_r, control_w) AM_MIRROR(0x07c0)
23   AM_RANGE(0x7003, 0x7003) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, lreg_r, lreg_w) AM_MIRROR(0x07c0)
24   AM_RANGE(0x7004, 0x7023) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, tbuf_r, tbuf_w) AM_MIRROR(0x07c0)
25   AM_RANGE(0x7024, 0x703f) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, mie_device, read_00) AM_MIRROR(0x07c0)
26   AM_RANGE(0x7800, 0x7fff) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, mie_device, read_78xx)
23   AM_RANGE(0x0800, 0x6fff) AM_READ(read_ff)
24   AM_RANGE(0x7000, 0x7002) AM_READWRITE(control_r, control_w) AM_MIRROR(0x07c0)
25   AM_RANGE(0x7003, 0x7003) AM_READWRITE(lreg_r, lreg_w) AM_MIRROR(0x07c0)
26   AM_RANGE(0x7004, 0x7023) AM_READWRITE(tbuf_r, tbuf_w) AM_MIRROR(0x07c0)
27   AM_RANGE(0x7024, 0x703f) AM_READ(read_00) AM_MIRROR(0x07c0)
28   AM_RANGE(0x7800, 0x7fff) AM_READ(read_78xx)
2729   AM_RANGE(0x8000, 0xffff) AM_RAM
2830ADDRESS_MAP_END
2931
30static ADDRESS_MAP_START( mie_port, AS_IO, 8 )
32static ADDRESS_MAP_START( mie_port, AS_IO, 8, mie_device)
3133   ADDRESS_MAP_GLOBAL_MASK(0xff)
32   AM_RANGE(0x00, 0x07) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, gpio_r, gpio_w)
33   AM_RANGE(0x08, 0x08) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, gpiodir_r, gpiodir_w)
34   AM_RANGE(0x0f, 0x0f) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, adc_r, adc_w)
35   AM_RANGE(0x10, 0x10) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, jvs_r, jvs_w)
36   AM_RANGE(0x12, 0x12) AM_DEVWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, jvs_dest_w)
37   AM_RANGE(0x15, 0x15) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, mie_device, jvs_status_r)
38   AM_RANGE(0x30, 0x30) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, irq_enable_r, irq_enable_w)
39   AM_RANGE(0x50, 0x50) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, maple_irqlevel_r, maple_irqlevel_w)
40   AM_RANGE(0x70, 0x70) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, irq_pending_r, irq_pending_w)
41   AM_RANGE(0x90, 0x90) AM_DEVWRITE_MODERN(DEVICE_SELF_OWNER, mie_device, jvs_control_w)
42   AM_RANGE(0x91, 0x91) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, mie_device, jvs_sense_r)
34   AM_RANGE(0x00, 0x07) AM_READWRITE(gpio_r, gpio_w)
35   AM_RANGE(0x08, 0x08) AM_READWRITE(gpiodir_r, gpiodir_w)
36   AM_RANGE(0x0f, 0x0f) AM_READWRITE(adc_r, adc_w)
37   AM_RANGE(0x10, 0x10) AM_READWRITE(jvs_r, jvs_w)
38   AM_RANGE(0x12, 0x12) AM_WRITE(jvs_dest_w)
39   AM_RANGE(0x15, 0x15) AM_READ(jvs_status_r)
40   AM_RANGE(0x30, 0x30) AM_READWRITE(irq_enable_r, irq_enable_w)
41   AM_RANGE(0x50, 0x50) AM_READWRITE(maple_irqlevel_r, maple_irqlevel_w)
42   AM_RANGE(0x70, 0x70) AM_READWRITE(irq_pending_r, irq_pending_w)
43   AM_RANGE(0x90, 0x90) AM_WRITE(jvs_control_w)
44   AM_RANGE(0x91, 0x91) AM_READ(jvs_sense_r)
4345ADDRESS_MAP_END
4446
4547static MACHINE_CONFIG_FRAGMENT( mie )
src/emu/cpu/psx/psx.c
r11486r11487
15291529   AM_RANGE(0x1f801040, 0x1f80105f) AM_READWRITE(psx_sio_r, psx_sio_w)
15301530   AM_RANGE(0x1f801060, 0x1f80106f) AM_RAM
15311531   AM_RANGE(0x1f801070, 0x1f801077) AM_READWRITE(psx_irq_r, psx_irq_w)
1532   AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN(AM_SUBDEVICE("dma"), psxdma_device, read, write)
1532   AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN("dma", psxdma_device, read, write)
15331533   AM_RANGE(0x1f801100, 0x1f80112f) AM_READWRITE(psx_counter_r, psx_counter_w)
15341534   AM_RANGE(0x1f801810, 0x1f801817) AM_READWRITE(psx_gpu_r, psx_gpu_w)
15351535   AM_RANGE(0x1f801820, 0x1f801827) AM_READWRITE(psx_mdec_r, psx_mdec_w)
r11486r11487
15531553   AM_RANGE(0x1f801040, 0x1f80105f) AM_READWRITE(psx_sio_r, psx_sio_w)
15541554   AM_RANGE(0x1f801060, 0x1f80106f) AM_RAM
15551555   AM_RANGE(0x1f801070, 0x1f801077) AM_READWRITE(psx_irq_r, psx_irq_w)
1556   AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN(AM_SUBDEVICE("dma"), psxdma_device, read, write)
1556   AM_RANGE(0x1f801080, 0x1f8010ff) AM_DEVREADWRITE_MODERN("dma", psxdma_device, read, write)
15571557   AM_RANGE(0x1f801100, 0x1f80112f) AM_READWRITE(psx_counter_r, psx_counter_w)
15581558   AM_RANGE(0x1f801810, 0x1f801817) AM_READWRITE(psx_gpu_r, psx_gpu_w)
15591559   AM_RANGE(0x1f801820, 0x1f801827) AM_READWRITE(psx_mdec_r, psx_mdec_w)
src/emu/sound/bsmt2000.c
r11486r11487
4141    Trivia: BSMT stands for "Brian Schmidt's Mouse Trap"
4242
4343***************************************************************************/
44#define ADDRESS_MAP_MODERN
4445
4546#include "emu.h"
4647#include "bsmt2000.h"
r11486r11487
5556//**************************************************************************
5657
5758// program map for the DSP (points to internal ROM)
58static ADDRESS_MAP_START( tms_program_map, AS_PROGRAM, 16 )
59static ADDRESS_MAP_START( tms_program_map, AS_PROGRAM, 16, bsmt2000_device)
5960   ADDRESS_MAP_UNMAP_HIGH
6061   AM_RANGE(0x000, 0xfff) AM_ROM
6162ADDRESS_MAP_END
6263
6364
6465// I/O map for the DSP
65static ADDRESS_MAP_START( tms_io_map, AS_IO, 16 )
66   AM_RANGE(0, 0) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, bsmt2000_device, tms_register_r, tms_rom_addr_w)
67   AM_RANGE(1, 1) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, bsmt2000_device, tms_data_r, tms_rom_bank_w)
68   AM_RANGE(2, 2) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, bsmt2000_device, tms_rom_r)
69   AM_RANGE(3, 3) AM_DEVWRITE_MODERN(DEVICE_SELF_OWNER, bsmt2000_device, tms_left_w)
70   AM_RANGE(7, 7) AM_DEVWRITE_MODERN(DEVICE_SELF_OWNER, bsmt2000_device, tms_right_w)
71   AM_RANGE(TMS32010_BIO, TMS32010_BIO) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, bsmt2000_device, tms_write_pending_r)
66static ADDRESS_MAP_START( tms_io_map, AS_IO, 16, bsmt2000_device)
67   AM_RANGE(0, 0) AM_READWRITE(tms_register_r, tms_rom_addr_w)
68   AM_RANGE(1, 1) AM_READWRITE(tms_data_r, tms_rom_bank_w)
69   AM_RANGE(2, 2) AM_READ(tms_rom_r)
70   AM_RANGE(3, 3) AM_WRITE(tms_left_w)
71   AM_RANGE(7, 7) AM_WRITE(tms_right_w)
72   AM_RANGE(TMS32010_BIO, TMS32010_BIO) AM_READ(tms_write_pending_r)
7273ADDRESS_MAP_END
7374
7475
r11486r11487
8384
8485// default address map for the external memory interface
8586// the BSMT can address a full 32 bits but typically only 24 are used
86static ADDRESS_MAP_START( bsmt2000, AS_0, 8 )
87static ADDRESS_MAP_START( bsmt2000, AS_0, 8, bsmt2000_device)
8788   AM_RANGE(0x00000, 0xffffff) AM_ROM
8889ADDRESS_MAP_END
8990
src/emu/memory.c
r11486r11487
20662066         unmap_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, readorwrite, false);
20672067         break;
20682068
2069      case AMH_DRIVER_DELEGATE:
20702069      case AMH_DEVICE_DELEGATE:
2071         if (data.m_type == AMH_DRIVER_DELEGATE)
2072         {
2073            object = machine().driver_data<driver_device>();
2074            if (object == NULL)
2075               throw emu_fatalerror("Attempted to map a driver delegate in space %s of device '%s' when there is no driver data\n", m_name, m_device.tag());
2076         }
2077         else
2078         {
2079            object = machine().device(data.m_tag);
2080            if (object == NULL)
2081               throw emu_fatalerror("Attempted to map a non-existent device '%s' in space %s of device '%s'\n", data.m_tag, m_name, m_device.tag());
2082         }
2070         object = machine().device(data.m_tag);
2071         if (object == NULL)
2072            throw emu_fatalerror("Attempted to map a non-existent device '%s' in space %s of device '%s'\n", data.m_tag, m_name, m_device.tag());
20832073
20842074         if (readorwrite == ROW_READ)
20852075            switch (data.m_bits)
src/emu/addrmap.c
r11486r11487
5050
5151inline void map_handler_data::set_tag(const device_t &device, const char *tag)
5252{
53   if (tag == NULL)
54      m_tag = NULL;
55   else if (strcmp(tag, DEVICE_SELF) == 0)
53   if (strcmp(tag, DEVICE_SELF) == 0)
5654      m_tag = device.tag();
5755   else if (strcmp(tag, DEVICE_SELF_OWNER) == 0)
5856   {
r11486r11487
6058      m_tag = device.owner()->tag();
6159   }
6260   else
63      m_tag = device.siblingtag(m_derived_tag, tag);
61      m_tag = device.subtag(m_derived_tag, tag);
6462}
6563
6664
r11486r11487
275273{
276274   assert(!func.isnull());
277275   assert(unitmask_is_appropriate(8, unitmask, func.name()));
278   m_read.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;
276   m_read.m_type = AMH_DEVICE_DELEGATE;
279277   m_read.m_bits = 8;
280278   m_read.m_mask = unitmask;
281279   m_read.m_name = func.name();
r11486r11487
288286{
289287   assert(!func.isnull());
290288   assert(unitmask_is_appropriate(8, unitmask, func.name()));
291   m_write.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;;
289   m_write.m_type = AMH_DEVICE_DELEGATE;
292290   m_write.m_bits = 8;
293291   m_write.m_mask = unitmask;
294292   m_write.m_name = func.name();
r11486r11487
377375{
378376   assert(!func.isnull());
379377   assert(unitmask_is_appropriate(16, unitmask, func.name()));
380   m_read.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;;
378   m_read.m_type = AMH_DEVICE_DELEGATE;
381379   m_read.m_bits = 16;
382380   m_read.m_mask = unitmask;
383381   m_read.m_name = func.name();
r11486r11487
390388{
391389   assert(!func.isnull());
392390   assert(unitmask_is_appropriate(16, unitmask, func.name()));
393   m_write.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;;
391   m_write.m_type = AMH_DEVICE_DELEGATE;
394392   m_write.m_bits = 16;
395393   m_write.m_mask = unitmask;
396394   m_write.m_name = func.name();
r11486r11487
479477{
480478   assert(!func.isnull());
481479   assert(unitmask_is_appropriate(32, unitmask, func.name()));
482   m_read.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;;
480   m_read.m_type = AMH_DEVICE_DELEGATE;
483481   m_read.m_bits = 32;
484482   m_read.m_mask = unitmask;
485483   m_read.m_name = func.name();
r11486r11487
492490{
493491   assert(!func.isnull());
494492   assert(unitmask_is_appropriate(32, unitmask, func.name()));
495   m_write.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;;
493   m_write.m_type = AMH_DEVICE_DELEGATE;
496494   m_write.m_bits = 32;
497495   m_write.m_mask = unitmask;
498496   m_write.m_name = func.name();
r11486r11487
581579{
582580   assert(!func.isnull());
583581   assert(unitmask_is_appropriate(64, unitmask, func.name()));
584   m_read.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;;
582   m_read.m_type = AMH_DEVICE_DELEGATE;
585583   m_read.m_bits = 64;
586584   m_read.m_mask = 0;
587585   m_read.m_name = func.name();
r11486r11487
594592{
595593   assert(!func.isnull());
596594   assert(unitmask_is_appropriate(64, unitmask, func.name()));
597   m_write.m_type = (tag == NULL) ? AMH_DRIVER_DELEGATE : AMH_DEVICE_DELEGATE;;
595   m_write.m_type = AMH_DEVICE_DELEGATE;
598596   m_write.m_bits = 64;
599597   m_write.m_mask = 0;
600598   m_write.m_name = func.name();
r11486r11487
718716
719717   // construct the standard map */
720718   if (memintf->address_map(spacenum) != NULL)
721      (*memintf->address_map(spacenum))(*this, device);
719      (*memintf->address_map(spacenum))(*this, *device.owner());
722720
723721   // append the default device map (last so it can be overridden) */
724722   if (spaceconfig->m_default_map != NULL)
src/emu/addrmap.h
r11486r11487
6060   AMH_ROM,
6161   AMH_NOP,
6262   AMH_UNMAP,
63   AMH_DRIVER_DELEGATE,
6463   AMH_DEVICE_DELEGATE,
6564   AMH_LEGACY_SPACE_HANDLER,
6665   AMH_LEGACY_DEVICE_HANDLER,
r11486r11487
858857
859858// driver data base reads
860859#define AM_READ_BASE(_class, _handler) \
861   curentry->set_handler(device, NULL, read_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0)); \
860   curentry->set_handler(device, DEVICE_SELF, read_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0)); \
862861
863862#define AM_READ8_BASE(_class, _handler, _unitmask) \
864   curentry->set_handler(device, NULL, read8_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
863   curentry->set_handler(device, DEVICE_SELF, read8_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
865864
866865#define AM_READ16_BASE(_class, _handler, _unitmask) \
867   curentry->set_handler(device, NULL, read16_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
866   curentry->set_handler(device, DEVICE_SELF, read16_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
868867
869868#define AM_READ32_BASE(_class, _handler, _unitmask) \
870   curentry->set_handler(device, NULL, read32_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
869   curentry->set_handler(device, DEVICE_SELF, read32_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
871870
872871
873872// driver data base writes
874873#define AM_WRITE_BASE(_class, _handler) \
875   curentry->set_handler(device, NULL, write_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0)); \
874   curentry->set_handler(device, DEVICE_SELF, write_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0)); \
876875
877876#define AM_WRITE8_BASE(_class, _handler, _unitmask) \
878   curentry->set_handler(device, NULL, write8_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
877   curentry->set_handler(device, DEVICE_SELF, write8_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
879878
880879#define AM_WRITE16_BASE(_class, _handler, _unitmask) \
881   curentry->set_handler(device, NULL, write16_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
880   curentry->set_handler(device, DEVICE_SELF, write16_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
882881
883882#define AM_WRITE32_BASE(_class, _handler, _unitmask) \
884   curentry->set_handler(device, NULL, write32_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
883   curentry->set_handler(device, DEVICE_SELF, write32_delegate(&_class::_handler, "driver_data::" #_handler, (_class *)0), _unitmask); \
885884
886885
887886// driver data base reads/writes
888887#define AM_READWRITE_BASE(_class, _rhandler, _whandler) \
889   curentry->set_handler(device, NULL, read_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0)); \
888   curentry->set_handler(device, DEVICE_SELF, read_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0)); \
890889
891890#define AM_READWRITE8_BASE(_class, _rhandler, _whandler, _unitmask) \
892   curentry->set_handler(device, NULL, read8_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write8_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
891   curentry->set_handler(device, DEVICE_SELF, read8_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write8_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
893892
894893#define AM_READWRITE16_BASE(_class, _rhandler, _whandler, _unitmask) \
895   curentry->set_handler(device, NULL, read16_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write16_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
894   curentry->set_handler(device, DEVICE_SELF, read16_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write16_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
896895
897896#define AM_READWRITE32_BASE(_class, _rhandler, _whandler, _unitmask) \
898   curentry->set_handler(device, NULL, read32_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write32_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
897   curentry->set_handler(device, DEVICE_SELF, read32_delegate(&_class::_rhandler, "driver_data::" #_rhandler, (_class *)0), write32_delegate(&_class::_whandler, "driver_data::" #_whandler, (_class *)0), _unitmask); \
899898
900899
901900// driver data reads
902901#define AM_READ(_handler) \
903   curentry->set_handler(device, NULL, read_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0)); \
902   curentry->set_handler(device, DEVICE_SELF, read_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0)); \
904903
905904#define AM_READ8(_handler, _unitmask) \
906   curentry->set_handler(device, NULL, read8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
905   curentry->set_handler(device, DEVICE_SELF, read8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
907906
908907#define AM_READ16(_handler, _unitmask) \
909   curentry->set_handler(device, NULL, read16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
908   curentry->set_handler(device, DEVICE_SELF, read16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
910909
911910#define AM_READ32(_handler, _unitmask) \
912   curentry->set_handler(device, NULL, read32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
911   curentry->set_handler(device, DEVICE_SELF, read32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
913912
914913
915914// driver data writes
916915#define AM_WRITE(_handler) \
917   curentry->set_handler(device, NULL, write_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0)); \
916   curentry->set_handler(device, DEVICE_SELF, write_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0)); \
918917
919918#define AM_WRITE8(_handler, _unitmask) \
920   curentry->set_handler(device, NULL, write8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
919   curentry->set_handler(device, DEVICE_SELF, write8_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
921920
922921#define AM_WRITE16(_handler, _unitmask) \
923   curentry->set_handler(device, NULL, write16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
922   curentry->set_handler(device, DEVICE_SELF, write16_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
924923
925924#define AM_WRITE32(_handler, _unitmask) \
926   curentry->set_handler(device, NULL, write32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
925   curentry->set_handler(device, DEVICE_SELF, write32_delegate(&drivdata_class::_handler, "driver_data::" #_handler, (drivdata_class *)0), _unitmask); \
927926
928927
929928// driver data reads/writes
930929#define AM_READWRITE(_rhandler, _whandler) \
931   curentry->set_handler(device, NULL, read_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0)); \
930   curentry->set_handler(device, DEVICE_SELF, read_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0)); \
932931
933932#define AM_READWRITE8(_rhandler, _whandler, _unitmask) \
934   curentry->set_handler(device, NULL, read8_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write8_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
933   curentry->set_handler(device, DEVICE_SELF, read8_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write8_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
935934
936935#define AM_READWRITE16(_rhandler, _whandler, _unitmask) \
937   curentry->set_handler(device, NULL, read16_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write16_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
936   curentry->set_handler(device, DEVICE_SELF, read16_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write16_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
938937
939938#define AM_READWRITE32(_rhandler, _whandler, _unitmask) \
940   curentry->set_handler(device, NULL, read32_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write32_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
939   curentry->set_handler(device, DEVICE_SELF, read32_delegate(&drivdata_class::_rhandler, "driver_data::" #_rhandler, (drivdata_class *)0), write32_delegate(&drivdata_class::_whandler, "driver_data::" #_whandler, (drivdata_class *)0), _unitmask); \
941940
942941
943942// device reads
r11486r11487
10731072
10741073#endif
10751074
1076#define AM_SUBDEVICE(_tag)               device.subdevice(_tag)->tag()
10771075
1076
10781077//**************************************************************************
10791078//  GLOBAL VARIABLES
10801079//**************************************************************************
src/mess/machine/comxpl80.c
r11486r11487
104104
105105static ADDRESS_MAP_START( comxpl80_io, AS_IO, 8, comxpl80_device )
106106   ADDRESS_MAP_UNMAP_HIGH
107   AM_RANGE(0x00, 0x00) AM_DEVWRITE(DEVICE_SELF_OWNER, comxpl80_device, pa_w)
108   AM_RANGE(0x01, 0x01) AM_DEVWRITE(DEVICE_SELF_OWNER, comxpl80_device, pb_w)
109   AM_RANGE(0x02, 0x02) AM_DEVWRITE(DEVICE_SELF_OWNER, comxpl80_device, pc_w)
110   AM_RANGE(0x03, 0x03) AM_DEVREAD(DEVICE_SELF_OWNER, comxpl80_device, pd_r)
107   AM_RANGE(0x00, 0x00) AM_WRITE(pa_w)
108   AM_RANGE(0x01, 0x01) AM_WRITE(pb_w)
109   AM_RANGE(0x02, 0x02) AM_WRITE(pc_w)
110   AM_RANGE(0x03, 0x03) AM_READ(pd_r)
111111ADDRESS_MAP_END
112112
113113
src/mess/machine/abc99.c
r11486r11487
156156//-------------------------------------------------
157157
158158static ADDRESS_MAP_START( abc99_z2_io, AS_IO, 8, abc99_device )
159   AM_RANGE(0x21, 0x21) AM_DEVWRITE(DEVICE_SELF_OWNER, abc99_device, z2_led_w)
159   AM_RANGE(0x21, 0x21) AM_WRITE(z2_led_w)
160160   AM_RANGE(0x30, 0x30) AM_READ_PORT("X0") AM_WRITENOP
161161   AM_RANGE(0x31, 0x31) AM_READ_PORT("X1") AM_WRITENOP
162162   AM_RANGE(0x32, 0x32) AM_READ_PORT("X2") AM_WRITENOP
r11486r11487
173173   AM_RANGE(0x3d, 0x3d) AM_READ_PORT("X13") AM_WRITENOP
174174   AM_RANGE(0x3e, 0x3e) AM_READ_PORT("X14") AM_WRITENOP
175175   AM_RANGE(0x3f, 0x3f) AM_READ_PORT("X15") AM_WRITENOP
176   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE(DEVICE_SELF_OWNER, abc99_device, z2_p1_w)
177   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVREAD(DEVICE_SELF_OWNER, abc99_device, z2_p2_r)
178   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_DEVREAD(DEVICE_SELF_OWNER, abc99_device, z2_t0_r)
179   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_DEVREAD(DEVICE_SELF_OWNER, abc99_device, z2_t1_r)
176   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(z2_p1_w)
177   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(z2_p2_r)
178   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(z2_t0_r)
179   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(z2_t1_r)
180180ADDRESS_MAP_END
181181
182182
r11486r11487
194194//-------------------------------------------------
195195
196196static ADDRESS_MAP_START( abc99_z5_io, AS_IO, 8, abc99_device )
197   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVREAD(DEVICE_SELF_OWNER, abc99_device, z5_p1_r)
198   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVWRITE(DEVICE_SELF_OWNER, abc99_device, z5_p2_w)
199   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_DEVWRITE(DEVICE_SELF_OWNER, abc99_device, z5_t0_w)
200   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_DEVREAD(DEVICE_SELF_OWNER, abc99_device, z5_t1_r)
197   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ(z5_p1_r)
198   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(z5_p2_w)
199   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_WRITE(z5_t0_w)
200   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(z5_t1_r)
201201ADDRESS_MAP_END
202202
203203
src/mess/machine/at_keybc.c
r11486r11487
33    IBM PC AT compatibles 8042 keyboard controller
44
55***************************************************************************/
6#define ADDRESS_MAP_MODERN
67
78#include "emu.h"
89#include "at_keybc.h"
r11486r11487
1617const device_type AT_KEYBOARD_CONTROLLER = &device_creator<at_keyboard_controller_device>;
1718
1819// i/o map for the 8042
19static ADDRESS_MAP_START( at_keybc_io, AS_IO, 8 )
20   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, at_keyboard_controller_device, t0_r)
21   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, at_keyboard_controller_device, t1_r)
22   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVREAD_MODERN(DEVICE_SELF_OWNER, at_keyboard_controller_device, p1_r)
23   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVREADWRITE_MODERN(DEVICE_SELF_OWNER, at_keyboard_controller_device, p2_r, p2_w)
20static ADDRESS_MAP_START( at_keybc_io, AS_IO, 8, at_keyboard_controller_device)
21   AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(t0_r)
22   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(t1_r)
23   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ( p1_r)
24   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(p2_r, p2_w)
2425ADDRESS_MAP_END
25
2626// machine fragment
2727static MACHINE_CONFIG_FRAGMENT( at_keybc )
2828   MCFG_CPU_ADD("at_keybc", I8042, DERIVED_CLOCK(1,1))
src/mess/machine/lux21046.c
r11486r11487
154154
155155static ADDRESS_MAP_START( luxor_55_21046_io, AS_IO, 8, luxor_55_21046_device )
156156   ADDRESS_MAP_UNMAP_HIGH
157   AM_RANGE(0x00, 0x00) AM_MIRROR(0xff0f) AM_DEVREAD(DEVICE_SELF_OWNER, luxor_55_21046_device, _3d_r)
158   AM_RANGE(0x10, 0x10) AM_MIRROR(0xff0f) AM_DEVWRITE(DEVICE_SELF_OWNER, luxor_55_21046_device, _4d_w)
159   AM_RANGE(0x20, 0x20) AM_MIRROR(0xff0f) AM_DEVWRITE(DEVICE_SELF_OWNER, luxor_55_21046_device, _4b_w)
160   AM_RANGE(0x30, 0x30) AM_MIRROR(0xff0f) AM_DEVWRITE(DEVICE_SELF_OWNER, luxor_55_21046_device, _9b_w)
161   AM_RANGE(0x40, 0x40) AM_MIRROR(0xff0f) AM_DEVWRITE(DEVICE_SELF_OWNER, luxor_55_21046_device, _8a_w)
162   AM_RANGE(0x50, 0x50) AM_MIRROR(0xff0f) AM_MASK(0xff00) AM_DEVREAD(DEVICE_SELF_OWNER, luxor_55_21046_device, _9a_r)
157   AM_RANGE(0x00, 0x00) AM_MIRROR(0xff0f) AM_READ(_3d_r)
158   AM_RANGE(0x10, 0x10) AM_MIRROR(0xff0f) AM_WRITE(_4d_w)
159   AM_RANGE(0x20, 0x20) AM_MIRROR(0xff0f) AM_WRITE(_4b_w)
160   AM_RANGE(0x30, 0x30) AM_MIRROR(0xff0f) AM_WRITE(_9b_w)
161   AM_RANGE(0x40, 0x40) AM_MIRROR(0xff0f) AM_WRITE(_8a_w)
162   AM_RANGE(0x50, 0x50) AM_MIRROR(0xff0f) AM_MASK(0xff00) AM_READ(_9a_r)
163163   AM_RANGE(0x60, 0x63) AM_MIRROR(0xff0c) AM_DEVREAD_LEGACY(SAB1793_TAG, wd17xx_r)
164164   AM_RANGE(0x70, 0x73) AM_MIRROR(0xff0c) AM_DEVWRITE_LEGACY(SAB1793_TAG, wd17xx_w)
165165   AM_RANGE(0x80, 0x80) AM_MIRROR(0xff0f) AM_DEVREADWRITE_LEGACY(Z80DMA_TAG, z80dma_r, z80dma_w)
src/mess/machine/lux10828.c
r11486r11487
207207static ADDRESS_MAP_START( luxor_55_10828_io, AS_IO, 8, luxor_55_10828_device )
208208   ADDRESS_MAP_GLOBAL_MASK(0xff)
209209   AM_RANGE(0x70, 0x73) AM_MIRROR(0x0c) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, z80pio_ba_cd_r, z80pio_ba_cd_w)
210   AM_RANGE(0xb0, 0xb3) AM_MIRROR(0x0c) AM_DEVREADWRITE(DEVICE_SELF_OWNER, luxor_55_10828_device, fdc_r, fdc_w)
211   AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE(DEVICE_SELF_OWNER, luxor_55_10828_device, status_w)
212   AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0f) AM_DEVWRITE(DEVICE_SELF_OWNER, luxor_55_10828_device, ctrl_w)
210   AM_RANGE(0xb0, 0xb3) AM_MIRROR(0x0c) AM_READWRITE(fdc_r, fdc_w)
211   AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_WRITE(status_w)
212   AM_RANGE(0xe0, 0xe0) AM_MIRROR(0x0f) AM_WRITE(ctrl_w)
213213ADDRESS_MAP_END
214214
215215
src/mess/machine/abc77.c
r11486r11487
115115//-------------------------------------------------
116116
117117static ADDRESS_MAP_START( abc77_io, AS_IO, 8, abc77_device )
118   AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_DEVWRITE(DEVICE_SELF_OWNER, abc77_device, j3_w)
118   AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_WRITE(j3_w)
119119   AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_READ_PORT("DSW")
120   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVREAD(DEVICE_SELF_OWNER, abc77_device, p1_r)
121   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_DEVWRITE(DEVICE_SELF_OWNER, abc77_device, p2_w)
122   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_DEVREAD(DEVICE_SELF_OWNER, abc77_device, t1_r)
123   AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE(DEVICE_SELF_OWNER, abc77_device, prog_w)
120   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ(p1_r)
121   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(p2_w)
122   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(t1_r)
123   AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_WRITE(prog_w)
124124ADDRESS_MAP_END
125125
126126

Previous 15994 Revisions Next


© 1998-2018 The MESS Team