summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/witch.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2011-03-27 07:37:24 +0000
committer Aaron Giles <aaron@aarongiles.com>2011-03-27 07:37:24 +0000
commit202d7680a44bec9fa1016e8ba6eeaaba51ef15ab (patch)
tree6021eb4c3d7324779eaeeab30875f68d42ea2348 /src/mame/drivers/witch.c
parent382e3998b1ca12e6af774cc2652ae515f526ff44 (diff)
Created new enum type address_spacenum for specifying an address
space by index. Update functions and methods that accepted an address space index to take an address_spacenum instead. Note that this means you can't use a raw integer in ADDRESS_SPACE macros, so instead of 0 use the enumerated AS_0. Standardized the project on the shortened constants AS_* over the older ADDRESS_SPACE_*. Removed the latter to prevent confusion. Also centralized the location of these definitions to memory.h.
Diffstat (limited to 'src/mame/drivers/witch.c')
-rw-r--r--src/mame/drivers/witch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mame/drivers/witch.c b/src/mame/drivers/witch.c
index 5a3ea5e4683..a01a4dd48c4 100644
--- a/src/mame/drivers/witch.c
+++ b/src/mame/drivers/witch.c
@@ -459,7 +459,7 @@ static const ym2203_interface ym2203_interface_1 =
NULL
};
-static ADDRESS_MAP_START( map_main, ADDRESS_SPACE_PROGRAM, 8 )
+static ADDRESS_MAP_START( map_main, AS_PROGRAM, 8 )
AM_RANGE(0x0000, UNBANKED_SIZE-1) AM_ROM
AM_RANGE(UNBANKED_SIZE, 0x7fff) AM_ROMBANK("bank1")
AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym1", ym2203_r, ym2203_w)
@@ -478,7 +478,7 @@ static ADDRESS_MAP_START( map_main, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( map_sub, ADDRESS_SPACE_PROGRAM, 8 )
+static ADDRESS_MAP_START( map_sub, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE("ym1", ym2203_r, ym2203_w)
AM_RANGE(0x8008, 0x8009) AM_DEVREADWRITE("ym2", ym2203_r, ym2203_w)
@@ -868,7 +868,7 @@ static DRIVER_INIT(witch)
UINT8 *ROM = (UINT8 *)machine->region("maincpu")->base();
memory_set_bankptr(machine, "bank1", &ROM[0x10000+UNBANKED_SIZE]);
- memory_install_read8_handler(machine->device("sub")->memory().space(ADDRESS_SPACE_PROGRAM), 0x7000, 0x700f, 0, 0, prot_read_700x);
+ memory_install_read8_handler(machine->device("sub")->memory().space(AS_PROGRAM), 0x7000, 0x700f, 0, 0, prot_read_700x);
state->bank = -1;
}