src/osd/windows/winsocket.c
| r12364 | r12365 | |
| 105 | 105 | |
| 106 | 106 | file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) |
| 107 | 107 | { |
| 108 | | ssize_t result; |
| 108 | int result; |
| 109 | 109 | char line[80]; |
| 110 | 110 | struct timeval timeout; |
| 111 | 111 | fd_set readfds; |
| r12364 | r12365 | |
| 116 | 116 | |
| 117 | 117 | if (select(file->socket + 1, &readfds, NULL, NULL, &timeout) < 0) |
| 118 | 118 | { |
| 119 | | sprintf(line, "%s : %s : %d ", __func__, __FILE__, __LINE__); |
| 119 | sprintf(line, "win_read_socket : %s : %d ", __FILE__, __LINE__); |
| 120 | 120 | perror(line); |
| 121 | 121 | return win_error_to_mame_file_error(errno); |
| 122 | 122 | } |
| r12364 | r12365 | |
| 143 | 143 | |
| 144 | 144 | file_error win_write_socket(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual) |
| 145 | 145 | { |
| 146 | | ssize_t result; |
| 146 | int result; |
| 147 | 147 | result = send(file->socket, (const char*)buffer, count, 0); |
| 148 | 148 | if (result < 0) |
| 149 | 149 | { |
src/emu/cpu/i86/instr286.c
| r12364 | r12365 | |
| 452 | 452 | if (!CODE(r) || !SEGDESC(r)) throw TRAP(GENERAL_PROTECTION_FAULT,(IDXTBL(gatesel)+(hwint&&1))); |
| 453 | 453 | if (DPL(r)>CPL) throw TRAP(GENERAL_PROTECTION_FAULT,(IDXTBL(gatesel)+(hwint&&1))); |
| 454 | 454 | if (!PRES(r)) throw TRAP(SEG_NOT_PRESENT,(IDXTBL(gatesel)+(hwint&&1))); |
| 455 | | if (GATEOFF(desc) > LIMIT(gatedesc)) throw TRAP(GENERAL_PROTECTION_FAULT,(hwint&&1)); |
| 455 | if (GATEOFF(desc) > LIMIT(gatedesc)) throw TRAP(GENERAL_PROTECTION_FAULT,(int)(hwint&&1)); |
| 456 | 456 | |
| 457 | 457 | if (!CONF(r)&&(DPL(r)<CPL)) { // inner call |
| 458 | 458 | UINT16 tss_ss, tss_sp, oldss, oldsp; |
src/mess/machine/ti99/ti99_hd.c
| r12364 | r12365 | |
| 79 | 79 | { |
| 80 | 80 | UINT32 lba; |
| 81 | 81 | mfmhd_state *hd = get_safe_token(harddisk); |
| 82 | | harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive"); |
| 82 | harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive")); |
| 83 | 83 | hard_disk_file *file = drive->get_hard_disk_file(); |
| 84 | 84 | |
| 85 | 85 | *sector_length = 256; |
| r12364 | r12365 | |
| 115 | 115 | { |
| 116 | 116 | UINT32 lba; |
| 117 | 117 | mfmhd_state *hd = get_safe_token(harddisk); |
| 118 | | harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive"); |
| 118 | harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive")); |
| 119 | 119 | hard_disk_file *file = drive->get_hard_disk_file(); |
| 120 | 120 | |
| 121 | 121 | if (file==NULL) |
| r12364 | r12365 | |
| 180 | 180 | void ti99_mfm_harddisk_read_track(device_t *harddisk, int head, UINT8 **pbuffer, int *data_count) |
| 181 | 181 | { |
| 182 | 182 | mfmhd_state *hd = get_safe_token(harddisk); |
| 183 | | harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive"); |
| 183 | harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive")); |
| 184 | 184 | |
| 185 | 185 | /* We assume an interleave of 3 for 32 sectors. */ |
| 186 | 186 | int step = 3; |
| r12364 | r12365 | |
| 317 | 317 | |
| 318 | 318 | UINT32 lba; |
| 319 | 319 | mfmhd_state *hd = get_safe_token(harddisk); |
| 320 | | harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive"); |
| 320 | harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive")); |
| 321 | 321 | hard_disk_file *file = drive->get_hard_disk_file(); |
| 322 | 322 | |
| 323 | 323 | /* printf("ti99_hd write track c=%d h=%d\n", hd->current_cylinder, head); */ |
| r12364 | r12365 | |
| 417 | 417 | |
| 418 | 418 | UINT8 ti99_mfm_harddisk_status(device_t *harddisk) |
| 419 | 419 | { |
| 420 | | UINT8 status = 0; |
| 421 | | harddisk_image_device *drive; |
| 422 | | mfmhd_state *hd = get_safe_token(harddisk); |
| 423 | | drive = harddisk->subdevice<harddisk_image_device>("drive"); |
| 420 | UINT8 status = 0; |
| 421 | mfmhd_state *hd = get_safe_token(harddisk); |
| 422 | harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive")); |
| 424 | 423 | hard_disk_file *file = drive->get_hard_disk_file(); |
| 425 | 424 | |
| 426 | 425 | if (file!=NULL) |
| r12364 | r12365 | |
| 441 | 440 | |
| 442 | 441 | void ti99_mfm_harddisk_seek(device_t *harddisk, int direction) |
| 443 | 442 | { |
| 444 | | harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive"); |
| 443 | harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive")); |
| 445 | 444 | mfmhd_state *hd = get_safe_token(harddisk); |
| 446 | 445 | const hard_disk_info *info; |
| 447 | 446 | hard_disk_file *file = drive->get_hard_disk_file(); |
| r12364 | r12365 | |
| 468 | 467 | |
| 469 | 468 | void ti99_mfm_harddisk_get_next_id(device_t *harddisk, int head, chrn_id_hd *id) |
| 470 | 469 | { |
| 471 | | harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive"); |
| 470 | harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive")); |
| 472 | 471 | mfmhd_state *hd = get_safe_token(harddisk); |
| 473 | 472 | const hard_disk_info *info; |
| 474 | 473 | hard_disk_file *file; |
src/mess/drivers/myb3k.c
| r12364 | r12365 | |
| 118 | 118 | { |
| 119 | 119 | /* TODO: complete guesswork! (it just does a 0x24 -> 0x20 in there) */ |
| 120 | 120 | wd17xx_set_drive(device,data & 3); |
| 121 | | floppy_mon_w(floppy_get_device(device->machine(), data & 3), (!data & 4) ? 1: 0); |
| 121 | floppy_mon_w(floppy_get_device(device->machine(), data & 3), !(data & 4) ? 1: 0); |
| 122 | 122 | floppy_drive_set_ready_state(floppy_get_device(device->machine(), data & 3), data & 0x4,0); |
| 123 | 123 | //wd17xx_set_side(dev,(data & 0x10)>>4); |
| 124 | 124 | } |