summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/romload.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2009-03-12 07:43:03 +0000
committer Aaron Giles <aaron@aarongiles.com>2009-03-12 07:43:03 +0000
commiteb539cce9d58a349e0dffff237dc96bb926ca06f (patch)
treee86162a925dfb228169afd2fb6309cba906400c5 /src/emu/romload.c
parentfeb4e2c8b368f5ec7f251e764167fd24708700f3 (diff)
Many casts added to the core files, and various other tweaks
to make them compile as either C or C++.
Diffstat (limited to 'src/emu/romload.c')
-rw-r--r--src/emu/romload.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/romload.c b/src/emu/romload.c
index 5faec25cfe5..140190e4669 100644
--- a/src/emu/romload.c
+++ b/src/emu/romload.c
@@ -125,7 +125,7 @@ void set_disk_handle(const char *region, mame_file *file, chd_file *chdfile)
chd.origfile = file;
/* we're okay, add to the list of disks */
- *chd_list_tailptr = auto_malloc(sizeof(**chd_list_tailptr));
+ *chd_list_tailptr = (open_chd *)auto_malloc(sizeof(**chd_list_tailptr));
**chd_list_tailptr = chd;
chd_list_tailptr = &(*chd_list_tailptr)->next;
}
@@ -165,7 +165,7 @@ const rom_source *rom_first_source(const game_driver *drv, const machine_config
if (config != NULL)
for (device = config->devicelist; device != NULL; device = device->next)
{
- const rom_entry *devromp = device_get_info_ptr(device, DEVINFO_PTR_ROM_REGION);
+ const rom_entry *devromp = (const rom_entry *)device_get_info_ptr(device, DEVINFO_PTR_ROM_REGION);
if (devromp != NULL)
return (rom_source *)device;
}
@@ -191,7 +191,7 @@ const rom_source *rom_next_source(const game_driver *drv, const machine_config *
/* look for further devices with ROM definitions */
for ( ; device != NULL; device = device->next)
{
- const rom_entry *devromp = device_get_info_ptr(device, DEVINFO_PTR_ROM_REGION);
+ const rom_entry *devromp = (const rom_entry *)device_get_info_ptr(device, DEVINFO_PTR_ROM_REGION);
if (devromp != NULL)
return (rom_source *)device;
}
@@ -211,7 +211,7 @@ const rom_entry *rom_first_region(const game_driver *drv, const rom_source *sour
if (source == NULL || rom_source_is_gamedrv(drv, source))
romp = drv->rom;
else
- romp = device_get_info_ptr((const device_config *)source, DEVINFO_PTR_ROM_REGION);
+ romp = (const rom_entry *)device_get_info_ptr((const device_config *)source, DEVINFO_PTR_ROM_REGION);
return (romp != NULL && !ROMENTRY_ISEND(romp)) ? romp : NULL;
}
@@ -757,7 +757,7 @@ static int read_rom_data(rom_load_data *romdata, const rom_entry *romp)
/* use a temporary buffer for complex loads */
tempbufsize = MIN(TEMPBUFFER_MAX_SIZE, numbytes);
- tempbuf = malloc_or_die(tempbufsize);
+ tempbuf = (UINT8 *)malloc_or_die(tempbufsize);
/* chunky reads for complex loads */
skip += groupsize;
@@ -1225,7 +1225,7 @@ static void process_disk_entries(rom_load_data *romdata, const char *regiontag,
/* we're okay, add to the list of disks */
LOG(("Assigning to handle %d\n", DISK_GETINDEX(romp)));
- *chd_list_tailptr = auto_malloc(sizeof(**chd_list_tailptr));
+ *chd_list_tailptr = (open_chd *)auto_malloc(sizeof(**chd_list_tailptr));
**chd_list_tailptr = chd;
chd_list_tailptr = &(*chd_list_tailptr)->next;
}