Commit Graph

102 Commits

Author SHA1 Message Date
OBattler
a59dc8e436 CD-ROM code clean-ups, also reduces memory usage by a further about 2 MB. 2018-03-17 20:32:20 +01:00
OBattler
f8f889b72c Fixed a minor issue in hdc_ide.c;
Fixed SCSI DMA command termination in the CD-ROM and Iomega ZIP code.
2018-03-16 22:46:05 +01:00
OBattler
3b62e83315 Ported some IDE and ATAPI-related improvements from PCem;
Fixed the ATI 18800 emulation;
More tweaks to reduce RAM usage.
2018-03-15 22:57:24 +01:00
OBattler
16c722b32f Realistic CD-ROM timings on ATAPI PIO, ATAPI DMA, SCSI NCR 53c810, and SCSI Adaptec/Buslogic;
Added ability to select emulated CD-ROM drive speed;
The Adaptec and BusLogic SCSI controllers are no longer threaded;
Two fixes in video/vid_s3.c.
2018-03-07 20:06:08 +01:00
OBattler
ffc7ee4ccd Ported over the CD-ROM, Iomega ZIP, and RTC fixes from PCem and disabled Iomega ZIP logging. 2018-02-27 23:55:28 +01:00
OBattler
b92a259e4d Fixed two more bugs reported by waltje. 2018-02-25 09:18:32 +01:00
OBattler
6cab207231 CD-ROM and Iomega ZIP PIO request length is now reduced if it is bigger than the remaining amount of bytes to transfer;
Fixed CD-ROM sector reading from CUE/BIN images with 2048-byte sectors;
Fixed existing CD-ROM Mode 2 support and adding support for the remaining variants of Mode 2;
The Windows CD-ROM IOCTL code now correctly determines the track type, fixes CD Audio over IOCTL;
Applied all PCem sound-related commits;
Sound Blaster 16/AWE32 mixer effects now also apply to CD Audio when the Sound Blaster 16 or AWE32 is selected.
2018-02-15 23:14:44 +01:00
OBattler
cfe2912aec The CD-ROM READ SUBCHANNEL command now takes into account the allocated length given in the CDB, fixes some infinite DMA loop problems with NCR 810 SCSI CD-ROM drivers;
Removed some MODE SELECT-related leftovers from cdrom.c and scsi_disk.c.
2018-01-25 20:17:56 +01:00
OBattler
2dce0de749 Fixed bugs in the Settings dialog regarding channel/ID/LUN tracking;
Fixed the MODE SELECT (6) command for CD-ROM and SCSI disk;
Implemented REQUEST SENSE with DESC bit set for SCSI disk;
Implemented the SCSI RESERVE, SCSI RELEASE, and SEND DIAGNOSTIC commands for SCSI disk.
2018-01-24 18:38:43 +01:00
OBattler
5318bc08d8 The FDC is now a device_t, and the FDC code has been cleaned up;
Merged floppy.c and fdd.c and renamed floppy_*.c (the floppy image format handlers) to fdd_*.c;
Reading the AT or PS/2 keyboard controller status no longer clears the transmit timeout bit, fixes error 8601 (mouse error) on the IBM PS/2 Model 80;
MMU translate and DMA physical reads and writes now go through _mem_exec instead of directly to ram[], should fix the last remaining problems with remapped mappings;
Implemented the Sound gain dialog;
Added the resource for the "New floppy image" dialog and the needed functions for the functionality of exporting the currently mounted floppy image as 86F, both of which should be finished in the next commit;
Applied the CD-ROM fixes from the PCem commit;
Added the "Keep ratio" option for full screen stretch.
2018-01-17 18:43:36 +01:00
OBattler
845c8ed4bd Improved passing of scan codes to the emulated keyboards;
Fixed Sound Blaster 16 and earlier CD-ROM volume registers (and made them no longer default to 0);
Serial mouse now resets the FIFO before sending the ID, fixes mouse detection after clipping and moving the mouse;
Rewritten CD-ROM and SCSI disk Mode Select handling and changed things regarding Mode Sense as well, also fixes emulator segmentation faults when anything attempts to do a Mode Select;
Fixed the Microsoft InPort mouse emulation (used the Bochs code as reference for the polling/state update code), now it actually moves;
The PCjr initialization now sets the XT scan code table, makes the keyboard actually work on the PCjr again;
Several bugfixes regarding the Read CD commands, fixes CD Audio in digital mode on Windows ME;
Finally properly fixed the regular CD Audio MSF/LBA conversion mess;
Applied all applicable PCem commits.
2018-01-13 22:56:13 +01:00
OBattler
444fa519a7 Fixed CD-ROM temporary buffer freeing and made the SCSI phase and SCSI status variable per-SCSI-device rather than two single global variables. 2018-01-06 22:47:41 +01:00
OBattler
19c5e93a3c Two minor bugfixes in the NCR 53C810 code;
Slightly changed the FDC's timer usage;
Added an #include to cdrom.c that should be there.
2017-12-10 19:36:41 +01:00
OBattler
f050810e2f Added the NCR 53C810 PCI SCSI controller;
Fixed the behavior of the CD-ROM GET CONFIGURATION command when unimplemented features are requested;
Fixed the behavior of the CD-ROM READ DVD STRUCTURE command in some situations and made it correctly report 05/30/02 for incompatible format;
Reworked the PS/2 Model 80 Type 2 memory handling a bit;
The emulator now allocates the few MB of space needed for pages for the entire 4 GB RAM space at the startup and only memset's it to 0 on hard reset - should make sure DMA page reads from/writes to memory-mapped devices no longer crash the emulator on invalidating the memory range;
Applied app applicable PCem patches;
The PS/1 Model 2133 now also applies PS/2-style NMI mask handling - fixes the 486 recompiler on this machine;
Added the missing #include of "cpu/cpu.h" in io.c, fixes compiling when I/O tracing is enabled.
2017-12-10 15:16:24 +01:00
waltje
c7946fbce7 Fix logging issues. 2017-12-10 02:54:20 -05:00
OBattler
772955bf59 The PS/2 Model 80 memory expansion board initialization now correctly sets up the RAM mappings;
The per-device log functions now all call pclog().
2017-12-05 23:35:35 +01:00
waltje
ce1bab2967 Cleanups to make all logging functions use stdlog instead of stdout.
The new --logfile (-L) commandline option sets a file to log to.
The new --debug (-D) forces output to stderr if no logfile is given.
2017-11-24 02:24:06 -05:00
OBattler
4484011767 The CD-ROM READ DISC INFORMATION command now takes the allocated length field into account when determining the length of data to send, fixes Kurumin Linux on ATAPI DMA. 2017-11-20 05:53:08 +01:00
waltje
7c67e867c8 Major commit, cleaning a lot of old stuff.
IBM.H is gone, video stuff re-organized. Keyboard stuff reorganized.
Machines that have their own video, mouse and/or keyboard now have all this in their machine file.
Fixed and other cleanups here and there.
2017-11-05 02:00:50 -05:00
waltje
f5d4436672 Fixing some warnings (that may have caused bugs in s3_virge and voodoo) and other fixes. Removed Mingw64 makefile. 2017-11-03 03:16:11 -05:00
OBattler
afb96a79da Fixed the CD-ROM warning per waltje's request. 2017-11-03 01:34:02 +01:00
OBattler
9ea0163bb7 Rewritten the PIIX IDE Bus Master operation, ReactOS now boots using IDE DMA and ATAPI DMA;
Fixed the IDE device detection hang with > 8 GB hard disks;
Rewritten the SMC FDC37C932FR Super I/O chip emulation;
Added an early implementation of the PIIX4, currently not in the makefile because nothing uses it right now.
2017-10-26 20:37:39 +02:00
OBattler
45204350b4 IDE hard disks and ATAPI CD-ROMS with DMA support now report as supporting UDMA modes, for the sake of future-proofing things;
Changed the CD-ROM capabilities MODE SENSE page a bit;
Applied the S3 Trio and SVGA changes from PCem;
Fixed saving of the video renderer settings;
Fixed DirectDraw full screen;
Fixed crashes on soft reset in full screen.
2017-10-25 02:17:27 +02:00
OBattler
2f2785c1c9 Fixed ATAPI PIO multi-phased transfers - fixes the catalog read error in Windows 2000;
Fixed the last remaining ATAPI DMA bugs;
Fixed IDE hard disk DMA;
Fixed PIIX bus master DMA read and write;
The Settings dialog now accepts more than 16 heads for IDE hard disks;
Added the IDE READ DMA ALT and WRITE DMA ALT commands;
Reenabled current CHS translation reporting, with bugfixes, hopefully the bugfixes will prevent certain larger hard disks from being detected as 250 MB.
2017-10-24 04:15:05 +02:00
OBattler
bffc39ddbf Fixed some bugs in cdrom.c;
Fixed (hopefully) pass through in the Windows CD-ROM IOCtl code;
Fixed the legacy I/O address handling on the BT-958D, now it behaves correctly - legacy I/O address disabled by default, can be enabled in AutoSCSI (removed the setting from the device config struct);
The BT-958D PCI-configured I/O space now correctly gets 32 ports and not 4.
2017-10-23 01:36:00 +02:00
OBattler
f087130fe9 Fixed CD-ROM ATAPI DMA and made ATAPI PIO much less of a mess;
Fixed MCA write bugs for the AHA-1640 and BT-640;
Fixed a warning in the PC87306 Super I/O chip emulation;
Each renderer now only has a 32-bit blitter - video_blit_memtoscreen_8() now only converts buffer to buffer32 and then calls video_blit_memtoscreen(), 8-bit blitters are now gone.
2017-10-22 03:16:52 +02:00
OBattler
86c439c14b Merge branch 'master' of https://github.com/OBattler/86Box 2017-10-16 17:33:29 +02:00
OBattler
e10d751ca3 Fixed ATAPI CD-ROM. 2017-10-16 17:33:01 +02:00
waltje
3572f7a34d Minor fixes for C/C++ inter-operation. 2017-10-16 04:54:57 -04:00
OBattler
5beaeef831 Small bugfix in cdrom.c, should fix ATAPI PIO sector reading again. 2017-10-16 06:41:26 +02:00
OBattler
ed865610e9 A dynamic recompiler block's validity is now separate from its starting code address, should fix most of the known recompiler fatals;
The CD-ROM buffer is now dynamically malloc'd;
Did a lot of bugfixing in cdrom.c and scsi_disk.c, Debian 8's modprobe aha1542 and the NT 3.10.404.1 Trantor 310b driver now work;
Fixed the IDE IRQ/MIRQ mess and ATAPI DMA transfer length;
Fixed the operation of mmutranslate() a bit;
Commented out several instances of excess logging;
Applied the mainline PCem commit prefetch commit;
Readded missing Sound Blaster DSP MIDI behavior and gave it the correct MPU struct;
All non-IBM 486 machines now correctly have the VLB flag set.
2017-10-16 06:19:18 +02:00
OBattler
7581474aab The AHA/BusLogic reset controllers' BIOS commands now return 0x80 (no device present error) for CD-ROM drives if the device is market as not supporting CD-ROM boot, fixes sending of WRITE (10) to CD-ROM drives followed by hang;
The CD-ROM and SCSI disk REQUEST SENSE commands no longer incorrectly set the phase to status;
REQUEST SENSE with non-data direction control byte is now treated as a request to send sense bytes from the command directly to the sense buffer;
SCSI and SLiRP threads now terminate themselves again when out of the while loop;
SCSI and SLiRP mutexes are now closed when the threads terminate themselves;
Fixed a bug causing the "Press F12+F8 or middle mouse button to release" string on the title bar to get corrupt.
2017-10-14 18:52:25 +02:00
OBattler
2792da5432 Refactored AHA-154x and BusLogic emulation and made them use a common core;
Fixed AHA-154x scatter/gather transfers;
Two-phased SCSI read-direction commands;
Made scsi_bus.c use a dynamically malloc'd buffer instead of a giant fixed-size buffer;
The AHA-154x/BusLogic thread now uses mutexes;
The BusLogic BT-545C is now the BT-545S;
Added the BusLogic BT-542BH;
The AHA-1542CF now again uses the v2.11 BIOS as the CD booting now works;
Applied PCem commit that adds NMI support to the recompiler;
Applied PCem commit that adds the IBM XT 286;
Applied PCem commits that have to do with sound, including the ES1371;
Fixed the NCR5380 output data register;
Moved the SLiRP mutex stuff from win.c to the appropriate network files;
Added sanity checks to everything in win_thread.c.
2017-10-14 07:03:19 +02:00
waltje
e9bd160ad1 More general cleanups and bugfixes. 2017-10-13 02:45:04 -04:00
waltje
724e5c44df More cleanups to separate main code from platform support and UI support, plus a few bugfixes. 2017-10-12 14:26:28 -04:00
waltje
c7cb446684 Another round of cleanups - the main code no longer refers to, let alone uses, anything in the platform folder - completely separated! 2017-10-11 05:43:09 -04:00
OBattler
4484ce9597 Two-phased SCSI write-direction commands on the AHA and BusLogic SCSI controllers, fixes residual lengths for such commands;
Cleaned up the handlers for the BusLogic Execute SCSI Command command;
Made the AHA-1542CF use version 2.01 of the BIOS;
The CD-ROM GET EVENT STATUS NOTIFICATION fix is back.
2017-10-11 01:17:41 +02:00
waltje
bd89e66b7b Separated main code from UI and PLATform support code, plus other generally small fixes here and there. 2017-10-10 03:16:59 -04:00
OBattler
344109c271 Fixed the CD-ROM GET EVENT STATUS NOTIFICATION command. 2017-10-10 00:43:37 +02:00
waltje
efc129eb22 Fixed come crashes (AHA1542, general with SB tips) etc. 2017-10-09 03:19:10 -04:00
OBattler
65dca51e23 The SCSI phase is now set to status at the beginning of cdrom_command() and scsi_hd_command() as well as in scsi_device_target_command(), in order to prevent the SCSI bus being perpetually stuck in command phase in case of error; fixes the DOS Trantor SCSI CD-ROM driver. 2017-10-09 02:35:12 +02:00
OBattler
02bbfb26eb Timers are now 64-bit. 2017-10-09 01:48:36 +02:00
waltje
c902d553f1 More cleanups, integrating win.c and multilanguage support, initial UI API cleanup. 2017-10-08 19:15:31 -04:00
OBattler
05e3dbbb48 Added three NCR5380-based SCSI controllers (in dev branch);
Two-phases SCSI disk write direction commands (needed for the NCR5380);
Renamed cdrom_ioctl.c/h to win_cdrom_ioctl.c/h and moved them to win/;
Moved some CD-ROM and floppy initialization blocks to the appropriate files.
2017-10-08 05:04:38 +02:00
waltje
2b37b7fbfb Major changes to NVR, system initialization (pc.c), and what goes on in the Windows startup (win.c.) Not fully done yet, but good enough for a first commit. 2017-10-07 00:49:53 -04:00
waltje
633adc6b02 Another big change, this time to the NVR. It has been re-done, integrated with the RTC code, and is now ready to be used by other, non-AT-compatible systems, including an ISA card for PC/XT. 2017-10-03 16:28:26 -04:00
waltje
63c532d940 Even more cleanups. Also renamed hdd/ to disk/ as that makes more sense. Machines with an Internal HDC (usually IDE) can now also select an alternative one instead. 2017-10-02 02:21:38 -04:00
waltje
2dbf5409c0 Changes to allow for auto- or selectable Internal HD controller, and some other minor changes. 2017-10-01 16:29:27 -04:00
waltje
9d9f5fdd58 Separation of HDD (disks) and HDC (disk controllers) with major cleanup. IDE remains same until Kotori finishes that part. 2017-09-30 16:58:41 -04:00
waltje
43b055b5ee Another massive cleanup run. Ibm.h no longer includes system header files. ROM loading simplified, and moved from mem.c to rom.c. Fixes in Makefile. Corrected mamy wrong includes. Removed old junk from days long gone. First phase of new SCAT chipset driver - no longer gives errors in BIOS, but NOT DONE YET. 2017-09-25 04:33:16 -04:00