* pass running_machine parameter to construct_map_##_name, i.e. ADDRESS_MAP_START

* Change "Machine->" to "machine->" in AM_BASE_MEMBER, AM_SIZE_MEMBER
* Pass Machine in construct_address_map

This is not perfect yet, but there is no need any longer to include deprecat.h in drivers using AM_*_MEMBER.
This commit is contained in:
Couriersud 2008-03-05 22:01:37 +00:00
parent 4bdccc433f
commit dbd1965d0e
3 changed files with 14 additions and 14 deletions

View File

@ -1205,13 +1205,13 @@ void construct_address_map(address_map *map, const machine_config *drv, int cpun
/* start by constructing the internal CPU map */
if (internal_map)
map = (*internal_map)(map);
map = (*internal_map)(Machine, map);
/* construct the standard map */
if (drv->cpu[cpunum].construct_map[spacenum][0])
map = (*drv->cpu[cpunum].construct_map[spacenum][0])(map);
map = (*drv->cpu[cpunum].construct_map[spacenum][0])(Machine, map);
if (drv->cpu[cpunum].construct_map[spacenum][1])
map = (*drv->cpu[cpunum].construct_map[spacenum][1])(map);
map = (*drv->cpu[cpunum].construct_map[spacenum][1])(Machine, map);
}

View File

@ -608,15 +608,15 @@ struct _address_space
void construct_address_map(address_map *map, const machine_config *drv, int cpunum, int spacenum);
/* ----- a typedef for pointers to these functions ----- */
typedef address_map *(*construct_map_t)(address_map *map);
typedef address_map *(*construct_map_t)(running_machine *machine, address_map *map);
/* use this to declare external references to a machine driver */
#define ADDRESS_MAP_EXTERN(_name) \
address_map *construct_map_##_name(address_map *map) \
address_map *construct_map_##_name(running_machine *machine, address_map *map) \
/* ----- macros for starting, ending, and setting map flags ----- */
#define ADDRESS_MAP_START(_name,_space,_bits) \
address_map *construct_map_##_name(address_map *map) \
address_map *construct_map_##_name(running_machine *machine, address_map *map) \
{ \
extern read##_bits##_machine_func port_tag_to_handler##_bits(const char *); \
typedef read##_bits##_machine_func _rmf_t; \
@ -700,15 +700,15 @@ address_map *construct_map_##_name(address_map *map) \
map->base = (void **)(base = _base); \
#define AM_BASE_MEMBER(_struct, _member) \
if (Machine != NULL && Machine->driver_data != NULL) \
map->base = (void **)(base = &((_struct *)Machine->driver_data)->_member);\
if (machine != NULL && machine->driver_data != NULL) \
map->base = (void **)(base = &((_struct *)machine->driver_data)->_member);\
#define AM_SIZE(_size) \
map->size = _size; \
#define AM_SIZE_MEMBER(_struct, _member) \
if (Machine != NULL && Machine->driver_data != NULL) \
map->size = &((_struct *)Machine->driver_data)->_member; \
if (machine != NULL && machine->driver_data != NULL) \
map->size = &((_struct *)machine->driver_data)->_member; \
/* ----- common shortcuts ----- */
#define AM_READWRITE(_read,_write) AM_READ(_read) AM_WRITE(_write)

View File

@ -1940,10 +1940,10 @@ static int remove_clear_extent(const render_bounds *bounds)
INT32 *max = &clear_extents[MAX_CLEAR_EXTENTS];
INT32 *last = &clear_extents[clear_extent_count];
INT32 *ext = &clear_extents[0];
INT32 boundsx0 = ceil(bounds->x0);
INT32 boundsx1 = floor(bounds->x1);
INT32 boundsy0 = ceil(bounds->y0);
INT32 boundsy1 = floor(bounds->y1);
INT32 boundsx0 = (UINT32) ceil(bounds->x0);
INT32 boundsx1 = (INT32) floor(bounds->x1);
INT32 boundsy0 = (INT32) ceil(bounds->y0);
INT32 boundsy1 = (INT32) floor(bounds->y1);
INT32 y0, y1 = 0;
/* loop over Y extents */