Example #1
0
static void image_exit(running_machine *machine)
{
	int i, j, indx;

	/* unload all devices */
	image_unload_all(FALSE);
	image_unload_all(TRUE);

	indx = 0;

	if (Machine->devices)
	{
		for (i = 0; Machine->devices[i].type < IO_COUNT; i++)
		{
			for (j = 0; j < Machine->devices[i].count; j++)
			{
				/* call the exit handler if appropriate */
				if (Machine->devices[i].exit)
					Machine->devices[i].exit(&images[indx + j]);

				tagpool_exit(&images[indx + j].tagpool);
			}
			indx += Machine->devices[i].count;
		}
	}
}
Example #2
0
static void floppy_close_internal(floppy_image *floppy, int close_file)
{
    assert(floppy);

    floppy_track_unload(floppy);
    if (close_file)
        io_generic_close(&floppy->io);
    if (floppy->loaded_track_data)
        free(floppy->loaded_track_data);
    tagpool_exit(&floppy->tags);

    free(floppy);
}
Example #3
0
void image_exit(void)
{
	int i, j, indx;

	indx = 0;

	if (Machine->devices)
	{
		for (i = 0; Machine->devices[i].type < IO_COUNT; i++)
		{
			for (j = 0; j < Machine->devices[i].count; j++)
			{
				/* call the exit handler if appropriate */
				if (Machine->devices[i].exit)
					Machine->devices[i].exit(&images[indx + j]);

				tagpool_exit(&images[indx + j].tagpool);
			}
			indx += Machine->devices[i].count;
		}
	}
}