Commit Graph

65 Commits

Author SHA1 Message Date
OBattler
bc5ac4a699 Reverted Direct3D to 2048x2048 buffer and suppressed the EGA/(S)VGA overscan, if enabled, in 2048x modes, fixes Direct3D freezes;
Improved the BusLogic incoming mailbox code;
The BusLogic callback is now three-phases and outgoing mailbox interrupts are emulated correctly;
Fixed the CD-ROM command READ DISC INFORMATION (0x51), fixes NetBSD crashing 86Box with segmentation fault when using the AHA-154x;
Added the CD-ROM command PAUSE/RESUME ALT (0xC2).
2017-01-24 01:03:23 +01:00
OBattler
bd28cc5e57 Disabled the IDE logging again. 2017-01-21 17:52:27 +01:00
OBattler
0dd769d727 ATA PACKET COMMAND now correctly callbacks+aborts when issued on a hard disk, fixes hard disk problems with a DOS CD-ROM driver loaded. 2017-01-21 17:48:45 +01:00
OBattler
3f612ab71a IDE dword reads and writes reverted to original operation, fixes the last hard disk problems;
ATAPI CD-ROM word reads no longer incorrectly discard the upper 16 bits, fixes the CD-ROM problems;
Significantly rewrote parts of the AHA-154x and BusLogic emulation, NT 3.1 RTM and MS-DOS drivers now works correctly;
The function in cdrom.c to read data blocks from the disc now correctly advances the position of the sector to read in non-passthrough mode, fixes multiblock reads from directly mounted ISO's;
Both ATAPI and SCSI now always check for Unit Attention and Not Ready on command execution.
2017-01-20 23:53:19 +01:00
OBattler
0548d8f9c8 Essentially reverted 8-bit IDE data reads and writes to old operation, fixes the hard disk bug;
SCSI LUN is now selectable for the CD-ROM drives;
Made sure every BusLogic RequestSetup ends in a StartMailbox sooner or later, fixes freezes with the DOS BusLogic drivers;
Commented out execess logging from mem.c;
Applied the mainline PCem commit that fixes the Bahamas64 on some boards.
2017-01-18 21:51:03 +01:00
OBattler
6b86549b7e Modified empty IDE channel handling, should hopefully reduce problems;
Fixed several ATAPI CD-ROM bugs;
Added some missing CPL override checks to the MMU translate functions;
Tertiary and quaternary IDE controllers are now automatically disabled if not a single device is attached to them;
Changed sleep time on compile from 10 seconds to 2 seconds.
2017-01-17 19:41:42 +01:00
OBattler
1802f8ea50 Status is now hardwired to 0x30 instead of 0x10 for empty IDE channels. 2017-01-17 01:14:37 +01:00
OBattler
082c4e9ff8 Fixed some compile-breaking errors. 2017-01-17 00:04:49 +01:00
OBattler
7e54cc4436 Two instances of the IDE code setting the error register did not set it in the cdrom struct if drive is CD-ROM, now they do, fixes CD-ROM booting on the Intel Advanced/ATX and possibly other things;
Fixed IDE and ATAPI 8-bit data reads and writes by rewriting the IDE and CD-ROM PIO data read and write code so that the base code is now 8-bit;
Added some compiler directives that if set, will enable togglable logging and log breakpoints;
Empty IDE channels now always report a status of 0x10 rather than 0x20, and do it on port 3F6h/376h/36Eh/3EEh too, fixes OAKCDROM.SYS infinite loop when hitting an empty IDE channel.
2017-01-17 00:01:59 +01:00
OBattler
4f7fd84229 Overhauled and unified CD-ROM emulation;
Four CD-ROM drives are now emulated;
ATAPI DMA is now emulated;
Unified CD-ROM pass through to host drive handling;
Applied all (applicable) mainline PCem commits.
2017-01-16 01:49:19 +01:00
OBattler
6349953413 Fixed a bug from the previous commit and changed some fseek's in ide.c to fseeko64. 2017-01-05 19:48:51 +01:00
OBattler
bb89a07a63 Sanitized the buffer zeroing on REQUEST SENSE for both ATAPI and SCSI. 2017-01-05 04:46:50 +01:00
OBattler
66838be5f9 Multiple ATAPI bugfixes. 2017-01-05 04:36:37 +01:00
OBattler
d2be2fcc81 Reimplemented the READ SUBCHANNEL command for both ATAPI and SCSI. 2017-01-04 22:33:49 +01:00
OBattler
a8bc5133ec The ATAPI implementation of the READ SUBCHANNEL command now correctly issues INVALDI FIELD IN CMD PACKET and not ILLEGAL OPCODE. 2017-01-04 21:44:01 +01:00
OBattler
d70c27a7f1 Response to the IDE/ATA packet command is now instant, fixes Rhapsody DR1. 2017-01-04 20:37:31 +01:00
OBattler
c7ffcee87e Added a forgotten semicolon in ide.c . 2017-01-04 06:35:11 +01:00
OBattler
0dc379404c CD-ROM is no longer reloaded if not in ejected/empty state;
ATAPI commands that accept a buffer length allocation now send no data if the allocated length is 0.
2017-01-04 06:33:18 +01:00
OBattler
6af40b5b16 Added a few keyboard controller commands used by the AMI BIOS'es;
The port 92 handler in mem.c now flushes MMU cache when toggling the A20 gate;
Added ability to reload previous disc after ejecting it;
Fixed the START/STOP UNIT command for both SCSI and ATAPI;
Applied mainline PCem commit: All XT models can now use 64kb RAM. Patch from ecksemmess .
2017-01-04 05:58:44 +01:00
OBattler
8fcc49cd31 Modified ATAPI and SCSI disc change handling. 2017-01-02 04:38:53 +01:00
TC1995
61b8ff9a71 More bugfixes to the Buslogic and SCSI layer, still need to understand why the f**k it doesn't issue the Request Sense command when necessary 2016-12-30 00:42:54 +01:00
OBattler
a0b7d55312 Implemented ATAPI and SCSI SEEK (6) command. 2016-12-29 20:49:01 +01:00
OBattler
03ee24cc6c Quaternary IDE controller now works properly;
Significantly cleaned up ide.c;
Made disc_img.c actually compile again.
2016-12-29 20:40:24 +01:00
OBattler
17e2cd6776 Added a quaternary IDE controller on ports 1E8-1EF/3EE;
The tertiary and quaternary IDE controllers are now fully configurable;
The IRQ of the RTL8029AS network card is now configurable;
CopyQM floppy images are now supported.
2016-12-28 23:34:00 +01:00
OBattler
e7934a1229 Moved some SCSI CD-ROM errors to the command byte/CDB decoder;
SCSI CD-ROM now correctly sets status phase on error;
SCSI CD-ROM now correctly errors on bad command.
2016-12-26 03:21:43 +01:00
OBattler
92c44cb89f Changed the IOCtl implementation of READ TRACK INFORMATION so that it returns if it succeded or failed, so the ATAPI and SCSI controllers can then act accordingly. 2016-12-25 17:52:17 +01:00
OBattler
4d71ebaf67 Another fix for READ TRACK INFORMATION. 2016-12-25 17:46:06 +01:00
OBattler
e9327bbc84 Fixed both the ATAPI and SCSI implementations of the READ TRACK INFORMATION command. 2016-12-25 17:38:01 +01:00
TC1995
88298809c5 Added Read Track Information command in ATAPI and SCSI.
Removed unused scsi_cmds.h header.
2016-12-25 16:36:27 +01:00
OBattler
c7443b47b5 ATAPI BAD COMMAND response now correctly sets IDE sector count to 3;
ATAPI READ TOC PMA ATIP command now uses direct SCSI passthrough when using IOCtl on Windows;
ATAPI READ TOC PMA ATIP command now supports non-MSF raw mode;
ATAPI READ TOC PMA ATIP command now returns the given maximum length if the actual length of the data is above it;
ATAPI READ TOC PMA ATPI command on Windows IOCtl now returns size of data in the returned buffer's header.
2016-12-25 01:57:56 +01:00
OBattler
645efe1f7d Slightly modified CD-ROM disc change handling and behavior of the REQUEST SENSE command. 2016-12-23 21:35:39 +01:00
TC1995
abf009e541 Renamed Adaptec 154x adapter source to Buslogic as now it emulates the Buslogic BT-540B SCSI adapter.
Moved CD-ROM read data buffer declaration and definitions to SCSI source files and headers, but still applying to IDE when needed.
SCSI Read commands now return the correct sectors on callback.
DMA bug fixes.
2016-12-23 17:11:59 +01:00
OBattler
dc46480aa4 Applied all mainline PCem commits;
Added experimental NVidia Riva TNT2 emulation (patch from MoochMcGee);
ASUS P/I-P54TP4XE, ASUS P/I-P55T2P4, and ASUS P/I-P55TVP4 are back;
National Semiconductor PC87306 Super I/O chip now correctly reenables devices after a chip power cycle;
Several FDC improvements and the behavior is now a bit closer to real hardware (based on actual tests);
Added MR Intel Advanced/ATX with Microid Research BIOS with support for 4 floppy drives and up to 4 IDE controllers;
Added floppy drives 3 and 4, bringing the maximum to 4;
You can now connect hard disks to the tertiary IDE controller;
Correct undocumented behavior of the LEA instruction with register is back on 286 and later CPU's;
Pentium-rea models with Intel chipsets now have port 92 (with alternate reset and alternate A20 toggle);
Overhauled DMA channel read and write routines and fixed cascading;
Improved IMG detection of a bad BPB (or complete lack of a BPB);
Added preliminary emulation of PS/2 1.44 MB and PC-98 1.25 MB 3-mode drives (both have an inverted DENSEL pin);
Removed the incorrect Amstrad mouse patch from TheCollector1995;
Fixed ATAPI CD-ROM disk change detection;
Windows IOCTL CD-ROM handler now tries to use direct SCSI passthrough for more things, including obtaining CD-ROM capacity;
The Diamond Stealth32 (ET4000/W32p) now also works correctly on the two Award SiS 496/497 boxes;
The (S)VGA handler now converts 6-bit RAMDAC RGB channels to standard 8-bit RGB using a lookup table generated at emulator start, calculated using the correct intensity conversion method and treating intensity 64 as equivalent to 63;
Moved a few options from the Configuration dialog box to the menu;
SIO, PIIX, and PIIX3 now have the reset control register on port CF9 as they should;
Several bugfixes.
2016-12-23 03:16:24 +01:00
OBattler
413fba4b16 Redid the ATAPI READ CD command completely and fixed IOCTL raw sector reading;
Added the ATAPI READ CD MSF command;
UNIT ATTENTION is now a condition above the SCSI/ATAPI senses so that non-UNIT ATTENTION senses can still be reported if said condition is present, should they occur;
Applies mainline PCem commit: Added code generation for RMW versions of INC/DEC.
2016-11-17 20:41:27 +01:00
OBattler
e46631e47b Reworked the menus so they're more logically grouped;
Removed the lone Misc menu and mvoed Status to Settings;
Added a SCSI CD-ROM option to the menu;
Removed the atapi_cdrom_enabled option and replaced any usage of it with !scsi_cdrom_enabled;
Disabling/enabling the CD-ROM drive is now separate from the drive's contents;
The tertiary IDE controller now never gets enabled is the CD-ROM drive is either disabled or SCSI.
2016-11-13 05:39:21 +01:00
TC1995
0f035b42ea Added preliminary Adaptec 154x emulation, needs fixing in the Read 10 command.
Made ATAPI derived from SCSI.
Added proper S/G emulation for SCSI DMA.
Added SCSI CD-ROM emulation, preserving all the former ATAPI commands as well.
2016-11-12 15:06:38 +01:00
OBattler
6e2b91c3d1 Pretty much all timer counters are now 32-bit again;
Fixed FDI stream parameters passed to the 86F handler, FDI stream images now read correctly again;
The National Semiconductors PC87306 SuperI/O chip now supports enhanced FDC mode.
2016-11-07 06:39:20 +01:00
OBattler
e280faa2d6 86F format handler updated to 86F version 2.0 and bit by bit handling;
FDI stream images are now also handled by the 86F handler;
Both floppy drives' motors now spin separately;
Added Plantronics ColorPlus emulation per patch from PCem forum;
Applied all mainline PCem commits;
Fixed several bugs.
2016-11-02 22:39:07 +01:00
OBattler
ac1a282799 IDE fixes from TheCollector1995. 2016-10-08 20:59:13 +02:00
OBattler
d3d26999f6 Added support for TD0 (Teledisk) floppy images;
Fixed support for Japanese HDI hard disk images;
Attempt to mix DOS 4.x DOSSHELL mouse issues.
2016-09-29 21:54:34 +02:00
OBattler
bde171e81b Hard disk parameters dialog boxes now allow you to specify size in MB or select a predefined type from a combo box;
Japanese HDI hard disk images are now supproted;
FDC FORMAT command now CRC's the correct data, fixes formatting inserted IMG's;
FDC SEEK command now no longer incorrectly reports invalid status when HDSEL (head select) is 1, fixes booting from inserted floppies of any format on boards other than ASUS P/I-P55TVP4.
2016-09-25 21:39:21 +02:00
OBattler
a0f6257c36 The CD-ROM now correctly identifies as supporting DMA. 2016-09-15 14:32:26 +02:00
Melissa Goad
090c4c9545 Add busmastering DMA for ATAPI drives 2016-09-15 01:08:45 -05:00
Jackson Bryn
291ac890e2 Add copyrights for all files to comply with the GPL v2. 2016-08-14 22:27:13 -04:00
OBattler
9a4cd321d6 Moved emulator_version #define to 86box.h and #included it in all files that use that #define. 2016-08-15 04:01:36 +02:00
OBattler
929d34d4b4 Removed all references to PCem;
Added Japanese FDI support;
Added more extensions to floppy image selection.
2016-08-15 03:26:37 +02:00
OBattler
1433d9a073 Applied both mainline PCem commits;
Fixed the RTL8029AS again (one of my "fixes" broke it);
RTL8029AS PCI register 4 is now written to;
Added incomplete (and currently commented out) emulation of the AWE64 PCI;
Replaced sector-based floppy emulation with more accurate code.
2016-08-15 01:34:46 +02:00
OBattler
bad439278d Removed ide->select , read native max now operates correctly via ide->head . 2016-08-10 06:15:52 +02:00
OBattler
ee9f6baf9a IDE selected channel is now reflected correctly in ide->select . 2016-08-10 06:01:25 +02:00
OBattler
455254064b Fixed the READ NATIVE MAX command. 2016-08-10 05:48:33 +02:00