mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +03:00
* 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:
parent
4bdccc433f
commit
dbd1965d0e
@ -1205,13 +1205,13 @@ void construct_address_map(address_map *map, const machine_config *drv, int cpun
|
|||||||
|
|
||||||
/* start by constructing the internal CPU map */
|
/* start by constructing the internal CPU map */
|
||||||
if (internal_map)
|
if (internal_map)
|
||||||
map = (*internal_map)(map);
|
map = (*internal_map)(Machine, map);
|
||||||
|
|
||||||
/* construct the standard map */
|
/* construct the standard map */
|
||||||
if (drv->cpu[cpunum].construct_map[spacenum][0])
|
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])
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -608,15 +608,15 @@ struct _address_space
|
|||||||
void construct_address_map(address_map *map, const machine_config *drv, int cpunum, int spacenum);
|
void construct_address_map(address_map *map, const machine_config *drv, int cpunum, int spacenum);
|
||||||
|
|
||||||
/* ----- a typedef for pointers to these functions ----- */
|
/* ----- 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 */
|
/* use this to declare external references to a machine driver */
|
||||||
#define ADDRESS_MAP_EXTERN(_name) \
|
#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 ----- */
|
/* ----- macros for starting, ending, and setting map flags ----- */
|
||||||
#define ADDRESS_MAP_START(_name,_space,_bits) \
|
#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 *); \
|
extern read##_bits##_machine_func port_tag_to_handler##_bits(const char *); \
|
||||||
typedef read##_bits##_machine_func _rmf_t; \
|
typedef read##_bits##_machine_func _rmf_t; \
|
||||||
@ -700,15 +700,15 @@ address_map *construct_map_##_name(address_map *map) \
|
|||||||
map->base = (void **)(base = _base); \
|
map->base = (void **)(base = _base); \
|
||||||
|
|
||||||
#define AM_BASE_MEMBER(_struct, _member) \
|
#define AM_BASE_MEMBER(_struct, _member) \
|
||||||
if (Machine != NULL && Machine->driver_data != NULL) \
|
if (machine != NULL && machine->driver_data != NULL) \
|
||||||
map->base = (void **)(base = &((_struct *)Machine->driver_data)->_member);\
|
map->base = (void **)(base = &((_struct *)machine->driver_data)->_member);\
|
||||||
|
|
||||||
#define AM_SIZE(_size) \
|
#define AM_SIZE(_size) \
|
||||||
map->size = _size; \
|
map->size = _size; \
|
||||||
|
|
||||||
#define AM_SIZE_MEMBER(_struct, _member) \
|
#define AM_SIZE_MEMBER(_struct, _member) \
|
||||||
if (Machine != NULL && Machine->driver_data != NULL) \
|
if (machine != NULL && machine->driver_data != NULL) \
|
||||||
map->size = &((_struct *)Machine->driver_data)->_member; \
|
map->size = &((_struct *)machine->driver_data)->_member; \
|
||||||
|
|
||||||
/* ----- common shortcuts ----- */
|
/* ----- common shortcuts ----- */
|
||||||
#define AM_READWRITE(_read,_write) AM_READ(_read) AM_WRITE(_write)
|
#define AM_READWRITE(_read,_write) AM_READ(_read) AM_WRITE(_write)
|
||||||
|
@ -1940,10 +1940,10 @@ static int remove_clear_extent(const render_bounds *bounds)
|
|||||||
INT32 *max = &clear_extents[MAX_CLEAR_EXTENTS];
|
INT32 *max = &clear_extents[MAX_CLEAR_EXTENTS];
|
||||||
INT32 *last = &clear_extents[clear_extent_count];
|
INT32 *last = &clear_extents[clear_extent_count];
|
||||||
INT32 *ext = &clear_extents[0];
|
INT32 *ext = &clear_extents[0];
|
||||||
INT32 boundsx0 = ceil(bounds->x0);
|
INT32 boundsx0 = (UINT32) ceil(bounds->x0);
|
||||||
INT32 boundsx1 = floor(bounds->x1);
|
INT32 boundsx1 = (INT32) floor(bounds->x1);
|
||||||
INT32 boundsy0 = ceil(bounds->y0);
|
INT32 boundsy0 = (INT32) ceil(bounds->y0);
|
||||||
INT32 boundsy1 = floor(bounds->y1);
|
INT32 boundsy1 = (INT32) floor(bounds->y1);
|
||||||
INT32 y0, y1 = 0;
|
INT32 y0, y1 = 0;
|
||||||
|
|
||||||
/* loop over Y extents */
|
/* loop over Y extents */
|
||||||
|
Loading…
Reference in New Issue
Block a user