diff options
author | Aaron Giles <aaron@aarongiles.com> | 2009-12-05 07:54:11 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2009-12-05 07:54:11 +0000 |
commit | 9eda9e163e06bd85a19a4e06b966cb9829e14488 (patch) | |
tree | e8d368f397da03693dba343dda776b234d320fe0 /src/mame/drivers/tp84.c | |
parent | 320793ee8f09cd0e9963e2f73de6982675cedaae (diff) |
More memory system cleanup. Removed SMH_* macros entirely. In
their place are a series of expanded macros and new memory
installation helpers. Some mappings below (not all are new):
AM_READ(SMH_RAM) -> AM_READONLY
AM_WRITE(SMH_RAM) -> AM_WRITEONLY
AM_READWRITE(SMH_RAM, SMH_RAM) -> AM_RAM
AM_READ(rhandler) AM_WRITE(SMH_RAM) -> AM_RAM_READ(rhandler)
AM_READ(SMH_RAM) AM_WRITE(whandler) -> AM_RAM_WRITE(whandler)
AM_DEVREAD(tag, rhandler) AM_WRITE(SMH_RAM)
-> AM_RAM_DEVREAD(tag, rhandler)
AM_READ(SMH_RAM) AM_DEVWRITE(tag, whandler)
-> AM_RAM_DEVWRITE(tag, whandler)
AM_READ(SMH_ROM) -> AM_ROM
AM_WRITE(SMH_ROM) -> (was a no-op)
AM_READ(SMH_NOP) -> AM_READNOP
AM_WRITE(SMH_NOP) -> AM_WRITENOP
AM_READWRITE(SMH_NOP, SMH_NOP) -> AM_NOP
For dynamic memory handler installation of the various types,
use the new functions:
memory_unmap_read()
memory_unmap_write()
memory_unmap_readwrite() -- unmaps a section of address space
memory_nop_read()
memory_nop_write()
memory_nop_readwrite() -- nops a section of address space
Cleaned up the internals of the address_map_entry structure, and
also normalized the way the address map macros work to remove a
lot of redundancy.
Diffstat (limited to 'src/mame/drivers/tp84.c')
-rw-r--r-- | src/mame/drivers/tp84.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 2e8bf9bab3b..e7db89dc385 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -142,12 +142,12 @@ static ADDRESS_MAP_START( tp84_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x2840, 0x2840) AM_READ_PORT("P2") AM_RANGE(0x2860, 0x2860) AM_READ_PORT("DSW1") AM_RANGE(0x3000, 0x3000) AM_READ_PORT("DSW2") AM_WRITEONLY - AM_RANGE(0x3004, 0x3004) AM_WRITE(SMH_RAM) AM_BASE(&tp84_flipscreen_x) - AM_RANGE(0x3005, 0x3005) AM_WRITE(SMH_RAM) AM_BASE(&tp84_flipscreen_y) + AM_RANGE(0x3004, 0x3004) AM_WRITEONLY AM_BASE(&tp84_flipscreen_x) + AM_RANGE(0x3005, 0x3005) AM_WRITEONLY AM_BASE(&tp84_flipscreen_y) AM_RANGE(0x3800, 0x3800) AM_WRITE(tp84_sh_irqtrigger_w) AM_RANGE(0x3a00, 0x3a00) AM_WRITE(soundlatch_w) - AM_RANGE(0x3c00, 0x3c00) AM_WRITE(SMH_RAM) AM_BASE(&tp84_scroll_x) - AM_RANGE(0x3e00, 0x3e00) AM_WRITE(SMH_RAM) AM_BASE(&tp84_scroll_y) + AM_RANGE(0x3c00, 0x3c00) AM_WRITEONLY AM_BASE(&tp84_scroll_x) + AM_RANGE(0x3e00, 0x3e00) AM_WRITEONLY AM_BASE(&tp84_scroll_y) AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(&tp84_bg_videoram) AM_RANGE(0x4400, 0x47ff) AM_RAM AM_BASE(&tp84_fg_videoram) AM_RANGE(0x4800, 0x4bff) AM_RAM AM_BASE(&tp84_bg_colorram) @@ -168,12 +168,12 @@ static ADDRESS_MAP_START( tp84b_cpu1_map, ADDRESS_SPACE_PROGRAM, 8 ) AM_RANGE(0x1a40, 0x1a40) AM_READ_PORT("P2") AM_RANGE(0x1a60, 0x1a60) AM_READ_PORT("DSW1") AM_RANGE(0x1c00, 0x1c00) AM_READ_PORT("DSW2") AM_WRITENOP - AM_RANGE(0x1c04, 0x1c04) AM_WRITE(SMH_RAM) AM_BASE(&tp84_flipscreen_x) - AM_RANGE(0x1c05, 0x1c05) AM_WRITE(SMH_RAM) AM_BASE(&tp84_flipscreen_y) + AM_RANGE(0x1c04, 0x1c04) AM_WRITEONLY AM_BASE(&tp84_flipscreen_x) + AM_RANGE(0x1c05, 0x1c05) AM_WRITEONLY AM_BASE(&tp84_flipscreen_y) AM_RANGE(0x1e00, 0x1e00) AM_WRITE(tp84_sh_irqtrigger_w) AM_RANGE(0x1e80, 0x1e80) AM_WRITE(soundlatch_w) - AM_RANGE(0x1f00, 0x1f00) AM_WRITE(SMH_RAM) AM_BASE(&tp84_scroll_x) - AM_RANGE(0x1f80, 0x1f80) AM_WRITE(SMH_RAM) AM_BASE(&tp84_scroll_y) + AM_RANGE(0x1f00, 0x1f00) AM_WRITEONLY AM_BASE(&tp84_scroll_x) + AM_RANGE(0x1f80, 0x1f80) AM_WRITEONLY AM_BASE(&tp84_scroll_y) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END |