summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/devcpu.h
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-08-01 21:04:03 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-08-01 21:04:03 +0000
commitfe47da274ec3305f787cc8fbd6c23cb868a18551 (patch)
treec1cb1ca69ae2090ca090f3ef6e62b9aaf60ae3aa /src/emu/devcpu.h
parentfdf30b568e7addcf355c557b446f9c55d0a04f1e (diff)
Return to type safety. Changed address maps back into functions that build
up the definition, rather than the whole tokenizing system, which lost type checking. Added a new module addrmap.c which implements the address map classes, and changed the macros to call methods on the address_map and address_map_entry classes which are strongly typed. Fixed a few incorrectly specified memory map entries along the way. Please double-check to make sure the behavior is expected in: twincobr.c, lordgun.c, galaxold.c. This change also means that since the address_maps are now constructor functions, they are detected when not used, so a number of #ifdef UNUSED_CODE were added around dangling address map definitions. Also included with this change: - removed cputag_clocks_to_attotime() and cputag_attotime_to_clocks() in favor of just expanding the class - same for cputag_suspend() and cputag_resume()
Diffstat (limited to 'src/emu/devcpu.h')
-rw-r--r--src/emu/devcpu.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h
index 8d1010b35e4..f974d455fd4 100644
--- a/src/emu/devcpu.h
+++ b/src/emu/devcpu.h
@@ -304,7 +304,6 @@ const device_type name = basename##_device_config::static_alloc_device_config
#define cpu_set_input_line_vector device_set_input_line_vector
#define cpu_set_input_line_and_vector device_set_input_line_and_vector
#define cpu_set_irq_callback device_set_irq_callback
-#define cpu_spin_until_int device_spin_until_int
#define cpu_get_address_space device_get_space
@@ -320,11 +319,6 @@ const device_type name = basename##_device_config::static_alloc_device_config
#define cputag_get_address_space(mach, tag, spc) downcast<cpu_device *>((mach)->device(tag))->space(spc)
#define cputag_get_clock(mach, tag) (mach)->device(tag)->unscaled_clock()
#define cputag_set_clock(mach, tag, clock) (mach)->device(tag)->set_unscaled_clock(clock)
-#define cputag_clocks_to_attotime(mach, tag, clocks) (mach)->device(tag)->clocks_to_attotime(clocks)
-#define cputag_attotime_to_clocks(mach, tag, duration) (mach)->device(tag)->attotime_to_clocks(duration)
-
-#define cputag_suspend(mach, tag, reason, eat) device_suspend((mach)->device(tag), reason, eat)
-#define cputag_resume(mach, tag, reason) device_resume((mach)->device(tag), reason)
#define cputag_set_input_line(mach, tag, line, state) downcast<cpu_device *>((mach)->device(tag))->set_input_line(line, state)
#define cputag_set_input_line_and_vector(mach, tag, line, state, vec) downcast<cpu_device *>((mach)->device(tag))->set_input_line_and_vector(line, state, vec)
@@ -384,14 +378,14 @@ union cpuinfo
cpu_string_io_func import_string; // CPUINFO_FCT_IMPORT_STRING
cpu_string_io_func export_string; // CPUINFO_FCT_EXPORT_STRING
int * icount; // CPUINFO_PTR_INSTRUCTION_COUNTER
- const addrmap8_token * internal_map8; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap16_token * internal_map16; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap32_token * internal_map32; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap64_token * internal_map64; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
- const addrmap8_token * default_map8; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
- const addrmap16_token * default_map16; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
- const addrmap32_token * default_map32; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
- const addrmap64_token * default_map64; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ address_map_constructor internal_map8; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ address_map_constructor internal_map16; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ address_map_constructor internal_map32; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ address_map_constructor internal_map64; // DEVINFO_PTR_INTERNAL_MEMORY_MAP
+ address_map_constructor default_map8; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ address_map_constructor default_map16; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ address_map_constructor default_map32; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
+ address_map_constructor default_map64; // DEVINFO_PTR_DEFAULT_MEMORY_MAP
};