MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / ide_initialize

Function ide_initialize

src/ide.cpp:1602–1622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1600}
1601
1602void ide_initialize(struct ide_hdf **idetable, int chpair)
1603{
1604 struct ide_hdf *ide0 = idetable[chpair * 2 + 0];
1605 struct ide_hdf *ide1 = idetable[chpair * 2 + 1];
1606
1607 if (!ide0 || !ide1)
1608 return;
1609
1610 ide0->regs0 = &ide0->regs;
1611 ide0->regs1 = &ide1->regs;
1612 ide0->pair = ide1;
1613
1614 ide1->regs1 = &ide1->regs;
1615 ide1->regs0 = &ide0->regs;
1616 ide1->pair = ide0;
1617
1618 ide0->num = chpair * 2 + 0;
1619 ide1->num = chpair * 2 + 1;
1620
1621 reset_device (ide0, true, true);
1622}
1623
1624void alloc_ide_mem (struct ide_hdf **idetable, int max, struct ide_thread_state *its)
1625{

Callers 3

initpcmciaFunction · 0.85
initideFunction · 0.85
init_ideFunction · 0.85

Calls 1

reset_deviceFunction · 0.85

Tested by

no test coverage detected