Commit graph

4877 commits

Author SHA1 Message Date
Fabian
27e6994abb refactor old debug code, make sure there's no require calls to capstone/wabt (#631) 2025-07-02 15:01:19 +07:00
Fabian
ccdc7b6b14 haiku beta4 only boots reliably with acpi 2025-07-02 15:01:19 +07:00
Fabian
be8530cf05 mention ISO 9660 generator 2025-07-02 15:01:19 +07:00
Fabian
9af729f56c simplify mouse speed code: don't modify deltas 2025-07-02 15:01:19 +07:00
Fabian
5831d23fe3 add missing LOG_VGA 2025-07-02 15:01:19 +07:00
Fabian
fe3757fe5b smsw: mask (triggers assertion otherwise) 2025-07-02 15:01:19 +07:00
Fabian
1ab04fe419 SMC: log written value 2025-07-02 15:01:19 +07:00
Fabian
80917ab8b9 rewrite some assertions to speed up port io in debug mode 2025-07-02 15:01:19 +07:00
Fabian
8daade0267 minor: remove export 2025-07-02 15:01:19 +07:00
Fabian
0eec29652b hide change cdrom button if no cdrom 2025-06-12 19:40:09 +07:00
Fabian
0d627a22f3 update reactos (#1321)
thanks @SuperMaxusa
2025-06-12 19:40:09 +07:00
Fabian
8c4d38219b remove incorrect assertion 2025-06-12 01:14:36 +07:00
Fabian
9a72cb43a6 duplicate 67h prefix is allowed and does nothing 2025-06-11 22:15:24 +07:00
Fabian
fff0df6665 include msdos image for tests, and use curl over wget 2025-06-11 21:36:51 +07:00
Fabian
8feebbb5cb generate iso files on demand 2025-06-11 19:44:11 +07:00
Fabian
b8875ff12b update state images for cdrom insert/eject support at runtime 2025-06-11 19:44:11 +07:00
Fabian
a4b86d85e2 create empty disks and second hard drive 2025-06-10 17:45:00 +07:00
Fabian
f28837785b add tests for cdrom+hda+hdb 2025-06-10 17:43:20 +07:00
Fabian
05acfb12eb add cdrom insert/eject test 2025-06-10 17:41:45 +07:00
Fabian
a4e4967683 less bold 2025-06-10 16:45:37 +07:00
Fabian
6d54013976 minor: add missing LOG_DISK 2025-06-10 15:39:58 +07:00
Fabian
aa6bfcfb32 fix boot order url parameter 2025-06-10 14:36:03 +07:00
Fabian
258f98560b don't error on floppy command 0x14 (fiwix) 2025-06-09 14:47:55 +07:00
Fabian
c8facf37f5 add note on chromium bug 2025-06-09 14:47:55 +07:00
Fabian
44fb0d57ea reduce verbosity of cpu logging 2025-06-09 14:47:55 +07:00
Fabian
45c4a7d0e1 make exit button preserve settings 2025-06-09 14:47:55 +07:00
Fabian
ed34b06339 add Chokanji 4 2025-06-09 14:47:55 +07:00
Fabian
1a0f31e34f add SqueakNOS 2025-06-09 14:47:55 +07:00
Fabian
f81470a762 minor 2025-06-09 14:47:55 +07:00
Fabian
197d43cb76 fix profile name 2025-06-09 14:47:55 +07:00
Christian Schnell
10bb5bc0fa raise IRQ only if IRQ bit in DOR is enabled
The floppy controller's Digital Output Register (DOR) is a read/writeable
8 bit register. Amongst other things, this register allows the guest to
reset the floppy controller ("nRESET" bit 0x8) and to enable/disable the
use of the controller's IRQ line ("IRQ" bit 0x4). Note that the "nRESET"
bit is negated ("not RESET").

The floppy controller is expected to raise an IRQ when exiting the RESET
state, meaning when the guest changes the nRESET bit from 0 to 1.

That is what is currently done in the DOR write handler in floppy.js.

But the floppy controller is also expected to raise IRQs only if the IRQ
bit in DOR is set, and this was not considered in the DOR write handler.

This commit changes the DOR write handler to raise the IRQ only if the
IRQ bit is also set in the new DOR value received from the guest.
2025-06-09 14:35:16 +07:00
Fabian
d603a779db minor cleanup 2025-06-07 21:33:46 +07:00
Fabian
2ea8ff0baf make ide changes compatible with old state images 2025-06-07 21:33:46 +07:00
Christian Schnell
cb3274c7ee fixed misdeclared register locations of BAR1 and BAR3
There was an overlap in the PCI space register declarations of the Floppy and the IDE controller. Since the conflicting registers were used exclusively by the two controllers this was fine, but 9front prints out this boot warning message:

    ioalloc: 3f0 - 3f5 floppy: clashes with: 3f4 - 3f5 PCI.0.31.0

Note that "PCI.0.31.0" is our IDE controller (with pci_id 0x1f).

Problem: IDE actually uses only register address 0x3f6, but declared BAR1 for address range 0x3f4-0x3f7 which overlaps with the Floppy controller (the same with BAR3 and its address range of 0x374-0x377, but there was no overlap with other devices here).

Fix:
- changed BAR1 base address from 0x3f4 to 0x3f6 and its size from 4 to 1
- changed BAR3 base address from 0x374 to 0x376 and its size from 4 to 1

This commit fixes that problem and the 9front boot message from above.
2025-06-07 21:33:46 +07:00
Christian Schnell
1f855f85ee write RTC CMOS data only for master drives 2025-06-07 21:33:46 +07:00
Christian Schnell
ba2186ee49 improved identify packet 2025-06-07 21:33:46 +07:00
Christian Schnell
20521979e7 added ATAPI command "START STOP UNIT" (W95)
Adds support to eject a CD from within Windows 95 through the context menu of the CD icon.

Before this commit eject was only supported externally through the v86 API.
2025-06-07 21:33:46 +07:00
Christian Schnell
50945b3d16 set "CD Not Ready" condition in ATAPI commands as specified in MMC-3
A few ATAPI commands did not return an error (CD Not Ready condition) with ejected medium as specified in MMC-3 (https://www.t10.org/ftp/t10/document.97/97-108r0.pdf).

Adding these to our subset of ATAPI commands improved the FreeDOS 1.4 situation around eject/insert a bit (the problem really is eject, insert always works given the medium is ejected). Waiting around 20-30 sec after eject seems to work reliably.
2025-06-07 21:33:46 +07:00
Christian Schnell
ef0b306732 added ATAPI command "PAUSE" (W95)
The minor change from yesterday changed Win95's behaviour such that it now issues an ATAPI command ("PAUSE") that wasn't implemented yet which led to Win95 crashing in v86 Debug mode. Added that command and now it works again.
2025-06-07 21:33:46 +07:00
Christian Schnell
28cfa1501b added ATAPI signature in ATA commands "READ SECTORS" and "IDENTIFY DEVICE" 2025-06-07 21:33:46 +07:00
Christian Schnell
5a7d8948d8 added references to ACS-3 from ATA/ATAPI-8 2025-06-07 21:33:46 +07:00
Christian Schnell
06d9b9bf92 removed CPU.devices.hda 2025-06-07 21:33:46 +07:00
Christian Schnell
f601daf748 added ATAPI command flags 2025-06-07 21:33:46 +07:00
Christian Schnell
50c153e6c2 improved register handling based on ACS-3 (ATA/ATAPI-8) 2025-06-07 21:33:46 +07:00
Christian Schnell
8e95ee4f64 minor fix 2025-06-07 21:33:46 +07:00
Christian Schnell
0dff08dfa6 changed CPU.devices.cdrom and .hda to point to their IDEInterface objects
- changed cdrom and hda to point to the drive's IDEInterface instead of its parent IDEChannel
- added boolean method IDEInterface.has_disk() to query whether a Compact Disk is inserted or not
- the IDEController object and the CD-ROM device are now created unconditionally
2025-06-07 21:33:46 +07:00
Christian Schnell
b1e45723df removed overly verbose I/O BAR debug output 2025-06-07 21:33:46 +07:00
Christian Schnell
b71ebced7d reduced debug log output some more 2025-06-07 21:33:46 +07:00
Christian Schnell
eb374437e3 made the debug output more comprehensible
Debug log messages in ide.js are currently at maximum granularity and emitted at a very high volume.

Under rare conditions this output can be very useful, else it clutters the view and makes comprehension of and reasoning about the runtime behaviour too challenging.

Changes:

- Erros and warnings are always logged, as well as important IDE state-related messages.
- Debug log messages are now split into 5 categories, 4 of them (the highly specific and also high-frequency ones) are optional and by default disabled.
- The 4 optional categories are REG_IO (log messages related to register I/O), IRQ, RW (read/write data) and RW_DMA (read/write data with DMA).
- ATA/ATAPI commands are always logged unless they fall into one of the 4 optional categories.
- Commands are logged with their name and including the full register state before and after command execution (input and output arguments).

Normal debug log output (with all 4 optional categories disabled, the default) is now mostly reduced to the actual ATA/ATAPI command flow with input/output command arguments, enough so that it's much easier to understand what happens.

The 4 optional debug categories can only be enabled programmatically in ide.js, they are meant to be used in advanced debugging sessions.
2025-06-07 21:33:46 +07:00
Christian Schnell
0cd7ea7a3d added IDEInterface.ata_abort_command() to reduce code duplication 2025-06-07 21:33:46 +07:00