Added macros to access ROM and MACHINE_DRIVER by name.

This commit is contained in:
Curt Coder 2008-11-26 20:45:18 +00:00
parent 0df0ba2bc4
commit 4094a61f7a
2 changed files with 6 additions and 2 deletions

View File

@ -189,8 +189,11 @@ union _machine_config_token
/* start/end tags for the machine driver */
#define MACHINE_DRIVER_NAME(_name) \
machine_config_##_name
#define MACHINE_DRIVER_START(_name) \
const machine_config_token machine_config_##_name[] = {
const machine_config_token MACHINE_DRIVER_NAME(_name)[] = {
#define MACHINE_DRIVER_END \
TOKEN_UINT32_PACK1(MCONFIG_TOKEN_END, 8) };

View File

@ -220,7 +220,8 @@ struct _rom_load_data
/* ----- start/stop macros ----- */
#define ROM_START(name) static const rom_entry rom_##name[] = {
#define ROM_NAME(name) rom_##name
#define ROM_START(name) static const rom_entry ROM_NAME(name)[] = {
#define ROM_END { NULL, NULL, 0, 0, ROMENTRYTYPE_END } };