static void destroy(RomMapperGIde* rm) { int portBase; portBase = (boardGetType() == BOARD_SVI) ? 0x40:0x60; ioPortUnregister(portBase | 0x04); ioPortUnregister(portBase | 0x05); ioPortUnregister(portBase | 0x06); ioPortUnregister(portBase | 0x07); ioPortUnregister(portBase | 0x08); ioPortUnregister(portBase | 0x09); ioPortUnregister(portBase | 0x0a); ioPortUnregister(portBase | 0x0b); ioPortUnregister(portBase | 0x0c); ioPortUnregister(portBase | 0x0d); ioPortUnregister(portBase | 0x0e); ioPortUnregister(portBase | 0x0f); deviceManagerUnregister(rm->deviceHandle); debugDeviceUnregister(rm->debugHandle); harddiskIdeDestroy(rm->hdide); free(rm); }
static void destroy(RomMapperRsIde* rm) { ioPortUnregister(0x14); ioPortUnregister(0x15); ioPortUnregister(0x16); ioPortUnregister(0x17); deviceManagerUnregister(rm->deviceHandle); debugDeviceUnregister(rm->debugHandle); harddiskIdeDestroy(rm->hdide); i8255Destroy(rm->i8255); free(rm); }
void sunriseIdeDestroy(SunriseIde* ide) { harddiskIdeDestroy(ide->hdide[0]); harddiskIdeDestroy(ide->hdide[1]); free(ide); }