Previous 15994 Revisions Next

r12365 Thursday 28th July, 2011 at 15:18:18 UTC by Miodrag Milanović
Fix for VS2010 compile (no whatsnew)
[src/emu/cpu/i86]instr286.c
[src/emu/machine]ctronics.c
[src/mess/drivers]myb3k.c
[src/mess/machine]amigafdc.c tms9902.c
[src/mess/machine/ti99]ti99_hd.c
[src/osd/windows]winsocket.c

src/osd/windows/winsocket.c
r12364r12365
105105
106106file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
107107{
108   ssize_t result;
108   int result;
109109   char line[80];
110110   struct timeval timeout;
111111   fd_set readfds;
r12364r12365
116116
117117   if (select(file->socket + 1, &readfds, NULL, NULL, &timeout) < 0)
118118   {
119      sprintf(line, "%s : %s : %d ", __func__, __FILE__,  __LINE__);
119      sprintf(line, "win_read_socket : %s : %d ", __FILE__,  __LINE__);
120120      perror(line);
121121      return win_error_to_mame_file_error(errno);
122122   }
r12364r12365
143143
144144file_error win_write_socket(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
145145{
146   ssize_t result;
146   int result;
147147   result = send(file->socket, (const char*)buffer, count, 0);
148148   if (result < 0)
149149   {
src/emu/cpu/i86/instr286.c
r12364r12365
452452      if (!CODE(r) || !SEGDESC(r)) throw TRAP(GENERAL_PROTECTION_FAULT,(IDXTBL(gatesel)+(hwint&&1)));
453453      if (DPL(r)>CPL) throw TRAP(GENERAL_PROTECTION_FAULT,(IDXTBL(gatesel)+(hwint&&1)));
454454      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));
456456
457457      if (!CONF(r)&&(DPL(r)<CPL)) {  // inner call
458458         UINT16 tss_ss, tss_sp, oldss, oldsp;
src/emu/machine/ctronics.c
r12364r12365
101101   centronics->strobe = TRUE;
102102
103103   /* get printer device */
104   centronics->printer = device->subdevice<printer_image_device>("printer");
104   centronics->printer = downcast<printer_image_device *>(device->subdevice("printer"));
105105
106106   /* resolve callbacks */
107107   centronics->out_ack_func.resolve(intf->out_ack_func, *device);
src/mess/machine/ti99/ti99_hd.c
r12364r12365
7979{
8080   UINT32 lba;
8181   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"));
8383   hard_disk_file *file = drive->get_hard_disk_file();
8484
8585   *sector_length = 256;
r12364r12365
115115{
116116   UINT32 lba;
117117   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"));
119119   hard_disk_file *file = drive->get_hard_disk_file();
120120
121121   if (file==NULL)
r12364r12365
180180void ti99_mfm_harddisk_read_track(device_t *harddisk, int head, UINT8 **pbuffer, int *data_count)
181181{
182182   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"));
184184
185185   /* We assume an interleave of 3 for 32 sectors. */
186186   int step = 3;
r12364r12365
317317
318318   UINT32 lba;
319319   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"));
321321   hard_disk_file *file = drive->get_hard_disk_file();
322322
323323   /* printf("ti99_hd write track c=%d h=%d\n", hd->current_cylinder, head); */
r12364r12365
417417
418418UINT8 ti99_mfm_harddisk_status(device_t *harddisk)
419419{
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"));
424423   hard_disk_file *file = drive->get_hard_disk_file();
425424
426425   if (file!=NULL)
r12364r12365
441440
442441void ti99_mfm_harddisk_seek(device_t *harddisk, int direction)
443442{
444   harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive");
443   harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive"));
445444   mfmhd_state *hd = get_safe_token(harddisk);
446445   const hard_disk_info *info;
447446   hard_disk_file *file = drive->get_hard_disk_file();
r12364r12365
468467
469468void ti99_mfm_harddisk_get_next_id(device_t *harddisk, int head, chrn_id_hd *id)
470469{
471   harddisk_image_device *drive = harddisk->subdevice<harddisk_image_device>("drive");
470   harddisk_image_device *drive = downcast<harddisk_image_device *>(harddisk->subdevice("drive"));
472471   mfmhd_state *hd = get_safe_token(harddisk);
473472   const hard_disk_info *info;
474473   hard_disk_file *file;
src/mess/machine/amigafdc.c
r12364r12365
116116      fdc->fdc_status[id].len = 0;
117117      fdc->fdc_status[id].ptr = 0;
118118      if (id==0) {
119         fdc->fdc_status[id].f = device->subdevice<floppy_image_device>(FLOPPY_0);
119         fdc->fdc_status[id].f = downcast<floppy_image_device *>(device->subdevice(FLOPPY_0));
120120      } else {
121         fdc->fdc_status[id].f = device->subdevice<floppy_image_device>(FLOPPY_1);
121         fdc->fdc_status[id].f = downcast<floppy_image_device *>(device->subdevice(FLOPPY_1));
122122      }
123123      fdc->fdc_status[id].tracklen = MAX_TRACK_BYTES;
124124      fdc->fdc_status[id].dma_timer->reset(  );
src/mess/machine/tms9902.c
r12364r12365
176176static void field_interrupts(device_t *device)
177177{
178178   tms9902_t *tms9902 = get_token(device);
179   int new_int = (tms9902->DSCH && tms9902->DSCENB)
179   bool new_int = (tms9902->DSCH && tms9902->DSCENB)
180180                     || (tms9902->RBRL && tms9902->RIENB)
181181                     || (tms9902->XBRE && tms9902->XBIENB)
182182                     || (tms9902->TIMELP && tms9902->TIMENB);
src/mess/drivers/myb3k.c
r12364r12365
118118{
119119   /* TODO: complete guesswork! (it just does a 0x24 -> 0x20 in there) */
120120   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);
122122   floppy_drive_set_ready_state(floppy_get_device(device->machine(), data & 3), data & 0x4,0);
123123   //wd17xx_set_side(dev,(data & 0x10)>>4);
124124}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team