Lines Matching defs:cdemu
148 write_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.active, 0x00);
156 return read_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.active);
164 return read_byte(ebda_seg,(uint16_t)&EbdaData->cdemu.emulated_drive);
175 cdemu_t __far *cdemu;
177 cdemu = ebda_seg :> &EbdaData->cdemu;
195 //@todo: maybe our cdemu struct should match El Torito to allow memcpy()?
197 write_byte(DS,SI+0x01,cdemu->media);
198 write_byte(DS,SI+0x02,cdemu->emulated_drive);
199 write_byte(DS,SI+0x03,cdemu->controller_index);
200 write_dword(DS,SI+0x04,cdemu->ilba);
201 write_word(DS,SI+0x08,cdemu->device_spec);
202 write_word(DS,SI+0x0a,cdemu->buffer_segment);
203 write_word(DS,SI+0x0c,cdemu->load_segment);
204 write_word(DS,SI+0x0e,cdemu->sector_count);
205 write_byte(DS,SI+0x10,cdemu->vdevice.cylinders);
206 write_byte(DS,SI+0x11,cdemu->vdevice.spt);
207 write_byte(DS,SI+0x12,cdemu->vdevice.heads);
212 cdemu->active = 0; // bye bye
279 cdemu_t __far *cdemu;
282 cdemu = ebda_seg :> &EbdaData->cdemu;
359 cdemu->media = buffer[0x21];
363 cdemu->emulated_drive = 0xE0;
366 cdemu->emulated_drive = 0x00;
368 cdemu->emulated_drive = 0x80;
370 cdemu->controller_index = device / 2;
371 cdemu->device_spec = device % 2;
377 cdemu->load_segment = boot_segment;
378 cdemu->buffer_segment = 0x0000;
381 cdemu->sector_count = nbsectors;
390 cdemu->ilba = lba;
393 cdemu->emulated_drive, cdemu->media, cdemu->ilba);
413 cdemu->emulated_drive, cdemu->media, cdemu->ilba);
415 switch (cdemu->media) {
417 cdemu->vdevice.spt = 15;
418 cdemu->vdevice.cylinders = 80;
419 cdemu->vdevice.heads = 2;
422 cdemu->vdevice.spt = 18;
423 cdemu->vdevice.cylinders = 80;
424 cdemu->vdevice.heads = 2;
427 cdemu->vdevice.spt = 36;
428 cdemu->vdevice.cylinders = 80;
429 cdemu->vdevice.heads = 2;
432 cdemu->vdevice.spt = read_byte(boot_segment,446+6)&0x3f;
433 cdemu->vdevice.cylinders = (read_byte(boot_segment,446+6)<<2) + read_byte(boot_segment,446+7) + 1;
434 cdemu->vdevice.heads = read_byte(boot_segment,446+5) + 1;
437 BX_DEBUG_ELTORITO("VCHS=%u/%u/%u\n", cdemu->vdevice.cylinders,
438 cdemu->vdevice.heads, cdemu->vdevice.spt);
440 if (cdemu->media != 0) {
442 if (cdemu->emulated_drive == 0x00)
449 if (cdemu->media != 0)
450 cdemu->active = 0x01;
453 return (cdemu->emulated_drive*0x100)+0;
474 cdemu_t __far *cdemu;
477 cdemu = ebda_seg :> &EbdaData->cdemu;
485 device = cdemu->controller_index * 2;
486 device += cdemu->device_spec;
491 if (!cdemu->active || (cdemu->emulated_drive != GET_DL())) {
537 vspt = cdemu->vdevice.spt;
538 vcylinders = cdemu->vdevice.cylinders;
539 vheads = cdemu->vdevice.heads;
540 ilba = cdemu->ilba;
610 vspt = cdemu->vdevice.spt;
611 vcylinders = cdemu->vdevice.cylinders - 1;
612 vheads = cdemu->vdevice.heads - 1;
622 switch (cdemu->media) {
629 if (cdemu->media < 4) {