Commit Graph

69 Commits

Author SHA1 Message Date
RichardG867
a3ad407a21 hdd_image: Enter missing image mode on other open failures as well 2024-11-07 13:02:52 -03:00
RichardG867
558176e454 hdd_image: Don't return read error on out-of-bounds reads 2024-11-03 11:22:27 -03:00
RichardG867
2184a982f8 MiniVHD: Report read/write errors 2024-10-29 15:14:27 -03:00
RichardG867
cc9c48711a hdd_image: Improve I/O error detection 2024-10-29 14:15:08 -03:00
RichardG867
94e5fded31 hdd_image: Populate last sector for failed images 2024-10-29 12:12:01 -03:00
RichardG867
416125390b hdd_image: Add framework for reporting I/O errors, and stop removing drives with locked images 2024-10-29 11:41:59 -03:00
OBattler
8c705b4ad1 Flush on writes to hard disk images, fixes partition creation on the Samsung SPC7700LP-W. 2024-09-24 04:32:46 +02:00
Mike Swanson
00354749f2 Use ftruncate on Unix to create hard disk images quickly
Instead of writing out disk blocks slowly across the entire volume,
just use the ftruncate function to create a file instantly at the
desired size.

Depending on file system, this can either result in identical results
to the old code just faster (eg: ZFS and btrfs with compression
enabled), sparse files (most native Unix file systems without
compression, eg ext4 and UFS), or a full non-sparse file like before
(creating an image on FAT).
2024-09-02 22:52:24 -07:00
OBattler
01d066ce4c MiniVHD: Some initialization sanitizations. 2024-03-08 22:37:18 +01:00
Jasmine Iwanek
7342c0a77a More linting in src/disk 2023-08-22 23:54:06 -04:00
RichardG867
e36d7662d6 disk: MVHD_ERR_TIMESTAMP is non-fatal, fixes #3206 2023-08-05 18:10:57 -03:00
Jasmine Iwanek
1116aadb6f Another round of sonarlint work 2023-07-04 10:53:44 -04:00
Jasmine Iwanek
21adfd4d50 Next round of sonarlint cleanups 2023-06-26 18:28:13 -04:00
Jasmine Iwanek
ba9327f5b1 VHD: Store disk type in config and use it when auto-creating an image file 2023-05-30 17:39:42 -04:00
Jasmine Iwanek
ed1b369abd Yet more sonarlint fixes 2023-05-29 06:21:17 -04:00
Jasmine Iwanek
0e0ba399c6 Remove unneeded includes and correct others 2023-04-12 06:40:11 -04:00
Jasmine Iwanek
0a453b9697 Fix missing stdbool.h includes in src/disk 2023-04-12 06:40:11 -04:00
Jasmine Iwanek
1860700eab Fix some small issues 2023-01-07 17:02:23 -05:00
Jasmine Iwanek
bd75bc141a Header cleanups
Tabs to spaces
Consistency
2022-11-13 21:15:47 -05:00
Cacodemon345
335f58cbf6 hdd_image: Try to reopen existing disk image next time
Fixes #1766.
2022-11-12 22:04:50 +06:00
Jasmine Iwanek
696f6f7e2f clang-format in src/disk/ 2022-09-18 17:19:22 -04:00
OBattler
cb54e1f90f Fixed the HDD image code. 2022-07-10 21:49:04 +02:00
Adrien Moulin
24f11448f2 Optimize hdd_image read/write
About 30-40% speedup
2022-07-10 13:50:01 +02:00
David Hrdlička
e60af6c29d Clean up plat.h a bit 2022-04-20 01:03:39 +02:00
Alexander Babikov
1a6d596fea Remove the now-redundant LARGEFILE macro definitions 2022-04-14 07:10:20 +05:00
Cacodemon345
7dc84e0f67 qt: Fix HDD path relativization on Windows 2022-03-04 01:25:34 +06:00
Jasmine Iwanek
4674756664 More newline and whitespace cleanups 2022-02-20 16:26:40 -05:00
OBattler
5dace5e657 Fixed warnings introduced by the UTF-8 conversion. 2021-04-01 00:04:59 +02:00
David Hrdlička
dfbbe08a07 rewrite the emulator to use UTF-8 internally 2021-03-30 09:46:49 +02:00
OBattler
f86ab08395 The geometry is now obtained normally. 2020-11-21 16:19:08 +01:00
OBattler
77d7c0fb81 VHD fixes. 2020-11-20 23:59:04 +01:00
Stephen McKinney
617b44d54f Fix whitespace. 2020-11-18 21:10:33 -06:00
Stephen McKinney
d91056586e Add VHD support. 2020-11-17 23:31:38 -06:00
Stephen McKinney
3085b1579f Remove existing VHD code. 2020-11-17 00:42:52 -06:00
David Hrdlička
9acb489a1d MSVC and Windows SDK compatibility 2020-04-04 12:45:47 +02:00
David Hrdlička
a505894a10 Move all include files to src/include
- 86Box's own headers go to /86box
- munt's public interface goes to /mt32emu
- all slirp headers go to /slirp (might want to consider using only its public inteface)
- single file headers from other projects go in include root
2020-03-29 19:53:29 +02:00
Daniel Gurney
0c509fd551 Remove version tree-wide 2020-03-25 00:46:02 +02:00
OBattler
490c04fcae Current WIP code. 2020-02-29 19:12:23 +01:00
David Hrdlička
a575bd7e8b fix more issues reported by coverity 2020-01-15 18:48:22 +01:00
OBattler
932ad5595a Fixed the third batch of problems. 2020-01-15 04:58:28 +01:00
OBattler
af023ff5dd Fixed the second batch of problems 2020-01-15 03:48:33 +01:00
OBattler
8749776144 Fixed the first batch of problems. 2020-01-15 03:04:59 +01:00
OBattler
34bf074e8d Fixed a resource leak in the VHD part of the hard disk image code. 2020-01-15 00:45:15 +01:00
OBattler
84659f6b01 Fixed a resource leak in the hard disk image code. 2020-01-14 23:08:13 +01:00
OBattler
1a770142bd And another one. 2020-01-14 21:00:45 +01:00
OBattler
f45419d796 Added another sanity fatal() to the hard disk image code. 2020-01-14 20:59:54 +01:00
OBattler
19345158a6 Added a sanity fatal() to the hard disk image code. 2020-01-14 20:55:13 +01:00
OBattler
552a87ea3d Added the IBM 5161 ISA expansion for PC and XT;
Cleaned up the parallel port emulation, added IRQ support, and made enabling/disabling per port;
Added the Award 430NX and the Intel Classic/PCI (Alfredo, 420TX);
Finished the 586MC1;
Added 8087 emulation;
Moved Cyrix 6x86'es to the Dev branch;
Sanitized/cleaned up memregs.c/h and intel.c/h;
Split the chipsets from machines and sanitized Port 92 emulation;
Added support for the 15bpp mode to the Compaq ATI 28800;
Moved the MR 386DX and 486 machines to the Dev branch;
Ported the new dynamic recompiler from PCem, but it remains in Dev branch until after v2.00;
Ported the new timer code from PCem;
Cleaned up the CPU table of unused stuff and better optimized its structure;
Ported the Open-XT and Open-AT from VARCem, the Open-AT is in the Dev branch;
Ported the XT MFM controller rewrite and adding of more controllers (incl. two RLL ones), from VARCem;
Added the AHA-1540A and the BusTek BT-542B;
Moved the Sumo SCSI-AT to the Dev branch;
Minor IDE, FDC, and floppy drive code clean-ups;
Made NCR 5380/53C400-based cards' BIOS address configurable;
Got rid of the legacy romset variable;
Unified (video) buffer and buffer32 into one and make the unified buffer 32-bit;
Added the Amstead PPC512 per PCem patch by John Elliott;
Switched memory mapping granularity from 16k to 4k (less than 1k not possible due to internal pages);
Rewrote the CL-GD 54xx blitter, fixes Win-OS/2 on the 54x6 among other thing;
Added the Image Manager 1024 and Professional Graphics Controller per PCem patch by John Elliott and work done on VARCem;
Added Headland HT-216, GC-205 and Video 7 VGA 1024i emulation based on PCem commit;
Implemented the fuction keys for the Toshiba T1000/T1200/T3100 enhancement;
Amstrad MegaPC does now works correctly with non-internal graphics card;
The SLiRP code no longer casts a packed struct type to a non-packed struct type;
The Xi8088 and PB410a no longer hang on 86Box when PS/2 mouse is not present;
The S3 Virge on BeOS is no longer broken (was broken by build #1591);
OS/2 2.0 build 6.167 now sees key presses again;
Xi8088 now work on CGA again;
86F images converted from either the old or new variants of the HxC MFM format now work correctly;
Hardware interrupts with a vector of 0xFF are now handled correctly;
OPTi 495SX boards no longer incorrectly have 64 MB maximum RAM when 32 MB is correct;
Fixed VNC keyboard input bugs;
Fixed AT RTC periodic interrupt - Chicago 58s / 73f / 73g  / 81 MIDI play no longer hangs with the build's own VTD driver;
Fixed mouse polling with internal mice - Amstrad and Olivetti mice now work correctly;
Triones ATAPI DMA driver now correctly reads a file at the end of a CD image with a sectors number not divisible by 4;
Compaq Portable now works with all graphics cards;
Fixed various MDSI Genius bugs;
Added segment limit checks and improved page fault checks for several CPU instructions - Memphis 15xx WINSETUP and Chicago 58s WINDISK.CPL no longer issue a GPF, and some S3 drivers that used to have glitches, now work correctly;
Further improved the 808x emulation, also fixes the noticably choppy sound when using 808x CPU's, also fixes #355;
OS/2 installer no logner locks up on splash screen on PS/2 Model 70 and 80, fixes #400.
Fixed several Amstead bugs, GEM no longer crashes on the Amstrad 1640, fixes #391.
Ported John Elliott's Amstrad fixes and improvement from PCem, and fixed the default language so it's correctly Engliish, fixes #278, fixes #389.
Fixed a minor IDE timing bug, fixes #388.
Fixed Toshiba T1000 RAM issues, fixes #379.
Fixed EGA/(S)VGA overscan border handling, fixes #378;
Got rid of the now long useless IDE channel 2 auto-removal, fixes #370;
Fixed the BIOS files used by the AMSTRAD PC1512, fixes #366;
Ported the Unicode CD image file name fix from VARCem, fixes #365;
Fixed high density floppy disks on the Xi8088, fixes #359;
Fixed some bugs in the Hercules emulation, fixes #346, fixes #358;
Fixed the SCSI hard disk mode sense pages, fixes #356;
Removed the AMI Unknown 386SX because of impossibility to identify the chipset, closes #349;
Fixed bugs in the serial mouse emulation, fixes #344;
Compiled 86Box binaries now include all the required .DLL's, fixes #341;
Made some combo boxes in the Settings dialog slightly wider, fixes #276.
2019-09-20 14:02:30 +02:00
OBattler
3a8bd15b9d Extensive rework of SCSI and ATAPI devices and numerous bug fixes and cleanups;
Extensive rework of CD-ROM image handling;
The settings save code now forces some devices' (SCSI disk, CD-ROM, etc.) pointers to NULL before resetting the machine - fixes segmentation faults after changing settings;
Added the NCR 53c825A and 53c875 SCSI controllers;
Fixed IDE/ATAPI DMA;
Slight changed to PCI IDE bus master operation.
2018-10-30 13:32:25 +01:00
OBattler
cfc626f111 Change to logging - when logging is disabled, the logging functions are now #define'd to nothing, so the compiler ignores the lines that call them completely, seems to slightly speed up the emulator; note that the logging in vid_table.c has not been changed yet, because this file on my local tree currently contains other WIP changes. 2018-10-19 00:39:32 +02:00