Sweden-Number/miscemu/int13.c

55 lines
1.6 KiB
C
Raw Normal View History

Release 940804 Thu Aug 4 07:18:02 1994 Michael Patra <micky@marie.physik.tu-berlin.de> * [windows/message.c] Implemented WaitMessage() (USER.112). * [if1632/user.spec] Added WaitMessage. * [windows/defwnd.c] WM_ERASEBKGND: Added support for hbrBackground=COLOR_xxx. * [miscemu/int{13,21,2a}.c] * [miscemu/Imakefile] * [signal/loader.c] Added a few basic disk information and diagnostic functions to prevent programs using this function from crashing. All drives are claimed to be remote ones, so direct I/O isn't allowed. * [controls/edit.c] EDIT_WriteText(): Added code to correctly erase the remaining space of the edit-control if the size of the control has changed sinced it's creation. Tue Jul 26 22:05:54 MET DST 1994 Erik Bos <erik@hacktic.nl> * [if1632/mouse.spec] Added mouse.dll entry, no functions. * [loader/resource.c] Bug fix in AccessResource(). * [misc/keyboard.c], added [include/keyboard.h] Changed functions to return more useful values. * [windows/dialog.c] Hacked DIALOG_GetControl() to support resources which have 0xff00 - 0xffff as id. ** Needs to be done properly by someone who knows the NE fileformat ** Jul 29, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte) * [windows/event.c] Add new stub for EnableHGardwareInput() function. * [windows/message.c] Add coding for HWND_BROADCAST in PostMessage(). * [misc/file.c] Add coding for OpenFile() also search in WindowPaths. * [misc/mmsystem.c] * [misc/audio.c] * [misc/mmaux.c] * [misc/mcicda.c] Change #include "linux/soundcard.h" by #include "sys/soundcard.h" Add coding in MMIO functions. Now, mmioDescend() can find WAV chunks. SndPlaySound & MCI_ELEMENT now use MMIO and adjust to proper formats.
1994-08-06 13:22:41 +02:00
#include <stdio.h>
#include <stdlib.h>
#include "msdos.h"
#include "wine.h"
int do_int13(struct sigcontext_struct *context)
{
switch((context->sc_eax >> 8) & 0xff)
{
case 0x00: /* RESET DISK SYSTEM */
case 0x04: /* VERIFY DISK SECTOR(S) */
EAX = (EAX & 0xffff00ff);
break;
case 0x05: /* FORMAT TRACK */
EAX = (EAX & 0xffff00ff) | 0x0c;
SetCflag;
break;
case 0x06: /* FORMAT TRACK AND SET BAD SECTOR FLAGS */
case 0x07: /* FORMAT DRIVE STARTING AT GIVEN TRACK */
EAX = (EAX & 0xffff00ff) | 0x0c;
break;
case 0x08: /* GET DRIVE PARAMETERS */
EAX = (EAX & 0xffff00ff) | ((EDX & 0x00000080)? 0x07: 0x01);
SetCflag;
break;
case 0x09: /* INITIALIZE CONTROLLER WITH DRIVE PARAMETERS */
case 0x0c: /* SEEK TO CYLINDER */
case 0x0d: /* RESET HARD DISKS */
case 0x10: /* CHECK IF DRIVE READY */
case 0x11: /* RECALIBRATE DRIVE */
case 0x14: /* CONTROLLER INTERNAL DIAGNOSTIC */
EAX = (EAX & 0xffff00ff);
break;
case 0x0e: /* READ SECTOR BUFFER (XT only) */
case 0x0f: /* WRITE SECTOR BUFFER (XT only) */
case 0x12: /* CONTROLLER RAM DIAGNOSTIC (XT,PS) */
case 0x13: /* DRIVE DIAGNOSTIC (XT,PS) */
EAX = (EAX & 0xffff00ff) | 0x01;
SetCflag;
break;
default:
IntBarf(0x13, context);
};
return 1;
}