Commit Graph
2771 Commits
Author SHA1 Message Date
Maxim Poliakovski 94e0691caa scsi*cmds: undo temporary renames. 2026-07-31 01:21:20 +02:00
Maxim Poliakovski 958bd0f8e6 cdromdrive: remove implementations of SCSI commands.
This source should contain anything related to
the physical properties of a CD/DVD drive like
mechanical capabilities, formats supported as well as
handling of the underlying images.
2026-07-31 01:08:03 +02:00
Maxim Poliakovski b2bd9efbaa atapicdrom: use generic MODE_SENSE_x implementation. 2026-07-31 00:54:23 +02:00
Maxim Poliakovski 99ce46d510 scsicdromcmds: implement CD-ROM audio control page. 2026-07-31 00:38:39 +02:00
Maxim Poliakovski 78c438884c scsiphysinterface: rename set_eject_state to set_lock_state. 2026-07-30 23:56:16 +02:00
Maxim Poliakovski 87633e7fdf scsicdromcmds: add CD capabilities and mechanical status page. 2026-07-30 23:00:44 +02:00
Maxim Poliakovski 57d97370f1 cdromdrive: add mechanical properties and capabilities. 2026-07-30 23:00:25 +02:00
Maxim Poliakovski 045e6d9d7f atapicdrom: use generic SCSI commands, part 1. 2026-07-30 18:47:32 +02:00
Maxim Poliakovski 90b53a61ad atapibasedevice: implement ATAPI PHY for ScsiPhysInterface.
This permits reusing of generic SCSI commands that
don't contain anything related to the particular
physical layer.
2026-07-30 13:55:12 +02:00
dingusdev 7658707bd3 Add missing return statements 2026-07-29 18:49:54 -07:00
Maxim Poliakovski aad05628ea scsiphysinterface: add sense_key to set_status().
SCSI devices don't need that because it's usually stored
internally and returned during REQUEST SENSE command.
On the contrary, ATAPI devices always report sense key
in the upper bits of the error register.
2026-07-30 01:27:45 +02:00
Maxim Poliakovski 520518f2ac scsiblockcmds: improve a couple of logging messages. 2026-07-30 01:27:26 +02:00
joevt f5dbb4fa43 macio: Add more names for feature control bits. Alpha104b 2026-07-24 20:58:21 -07:00
dingusdev 79f1edc102 Adding additional regs in AMIC 2026-07-24 20:58:04 -07:00
Tim Jarzombekandjoevt 3ecf59233c amic: Make RcvDma fields unique_ptr like XmitDma.
From earlier commit:
"amic: Emulate SCC receive DMA registers instead of returning random
values."

Co-Authored-By: joevt <joevt@shaw.ca>
2026-07-24 07:44:02 -07:00
joevt baeed79f12 amic: Add all the SCC DMA registers. 2026-07-23 20:56:53 -07:00
dingusdev f1c46cdc6d Last minute typo fixes 2026-07-24 00:32:06 +02:00
joevt 0779a171e0 scsi.h: add more defs to ScsiMessage and ScsiExtMessage. 2026-07-24 00:32:06 +02:00
Maxim Poliakovski b9e94b20b4 Revert "Appending ATA device identification stub"
ATAPI devices should NOT implement ATA IDENTIFY DRIVE
command (ECh) to avoid their false identification as ATA
drives. They should implement ATAPI IDENTIFY DEVICE
command (A1h) instead.

This reverts commit da7c8a4579.
2026-07-18 17:03:23 +02:00
joevt fd9899ae87 dbdma: xfer_quad improvements and fixes.
- Make the method call less confusing.
  - Use cur_host instead of passing cmd_struct.
  - Pass a boolean to differentiate LOAD_QUAD and STORE_QUAD.
- Use xfer_size instead of req_count for res_count.
- Don't LOAD_QUAD to read-only DBDMA command.
2026-07-15 07:52:16 -07:00
joevt ff911cc056 dbdma: Add is_active to more methods. 2026-07-15 07:11:18 -07:00
joevt 7af1235b8e dbdma: Flush only applies to INPUT commands. 2026-07-14 20:25:11 -07:00
joevt 06ea4a844e dbdma: Add is_active. 2026-07-14 20:23:41 -07:00
joevt 813350f14a dbdma: Remove superfluous update_irq method. 2026-07-14 19:57:37 -07:00
joevt 4bcd96e6b1 dbdma: Save current dbdma cmd host address.
Use the saved address for finish_cmd.
2026-07-14 19:24:03 -07:00
joevt 83775309e9 dbdma: Set res_count at beginning of command.
Don't need to reset it at the end of a command.
2026-07-14 18:52:22 -07:00
joevt 2a3b6d9cb7 dmacore: Rename is_ready.
So that it is not confused with other contexts.
2026-07-14 18:48:10 -07:00
joevt 538970d659 openfirmware.md: Add note about PCI2 PRSNT bits. 2026-07-14 18:45:38 -07:00
joevt fce52eacfb dbdma: Remove interpret_cmd result. 2026-07-14 07:59:22 -07:00
dingusdev a832d9cf90 Version 1.04b Prep 2026-07-13 10:37:28 -07:00
dingusdev e5b8ff49e4 Restore clearing CH_STAT_FLUSH
This is still required so that the MacTest Pro (Nov. 99) CD can boot up.
2026-07-13 08:30:35 -07:00
dingusdev 5e7c660622 Merge pull request #193 from mihaip/upstream-ati-blit
atirage: Implement source rectangle blitting
2026-07-13 07:39:51 -07:00
Mihai Parparita d9d7257d46 atirage: Also set the draw_fb flag for fill_rect
Happened to notice that we were not marking the framebuffer as dirty
when doing this update. Liekly not an issue in practice since there are
usually other updates, but might as well be correct.
2026-07-12 22:42:17 -07:00
Mihai Parparita 8cecc9b20b atirage: Implement source rectangle blitting
Implement the accelerated same-format source-copy operation (used by the
Mac OS X Public Beta when dragging windows).

Supports raw 8, 15, 16, and 32 bpp copies. Rejects unsupported mixes,
format conversions, partial write masks, color comparison, and source
trajectory modes.
2026-07-12 22:41:30 -07:00
dingusdev 42e617fde9 Merge pull request #192 from mihaip/upstream-ata-dma-take2
ata: Implement DMA transfers
2026-07-11 17:52:36 -07:00
Mihai Parparita 017a4a48b1 atahd: Implement hard disk DMA commands
Add read/write DMA command support to ATA hard disks (can mostly reuse the PIO paths).
2026-07-11 17:45:41 -07:00
Mihai Parparita bf1c9654c4 ata: Implement reusable DMA data transfers
Implement push_data in AtaBaseDevice using the device transfer buffer and
post-transfer callback.

Advance the read data pointer across DMA pulls so a transfer can span
multiple DBDMA descriptors, and clear the DMA state when transfers finish.
2026-07-11 17:44:48 -07:00
dingusdev 6c48fc1f91 BigMac: Typo squatting 2026-07-10 19:58:56 -07:00
joevt e259d8e2b2 machinealchemy: fix box id & emmo. 2026-07-08 14:39:34 +02:00
joevt 3d25cc592d machinegazelle: fix box id & emmo. 2026-07-08 14:17:08 +02:00
dingusdev da7c8a4579 Appending ATA device identification stub 2026-07-07 20:11:22 -07:00
Maxim Poliakovski bf2f7e5217 machinetnt: fix IOBus address for Board register 2.
Also file a bug in Open Firmware 1.0.5 that reads
PCI2 PRSNT bits from wrong location.
2026-07-08 04:05:54 +02:00
Maxim Poliakovski 5f49182c5b atapibasedevice: update two log messages. 2026-07-08 00:26:32 +02:00
joevt d4cb1fe872 machinegazelle: Add pm5500 and tam machines. 2026-07-07 17:01:35 +02:00
Maxim Poliakovski f8a2b19947 machinealchemy: activate factory tests if requested.
Please note that factory tests don't work
out of the box in Alchemy due to a bug in POST.
You need to patch the ROM first.
2026-07-07 13:50:22 +02:00
Maxim Poliakovski 2db1cc160e machinegossamer: activate factory tests if requested. 2026-07-07 13:50:22 +02:00
Maxim Poliakovski b81920fcb2 maciotwo: remove everything related to EMMO.
EMMO should be activated in the particular machine expert
because the location of that bit is board specific.
2026-07-07 13:38:52 +02:00
Mihai Parparita 01eb1356f5 utils: Use mmap for disk images in deterministic mode (#190)
We were reading the entire disk image into a stringstream for
deterministic mode, which is slow and memory-intensive. Instead on POSIX
hosts we can use `mmap` to lazily map the disk image into memory, allowing
it to be streamed in as the guest actually needs data from it.

Helps with iteration speed when debugging via deterministic mode.
2026-07-07 11:06:55 +02:00
Mihai Parparita f964359738 ata: Demote split DMA pull diagnostic
Mac OS X Public Beta commonly drives one ATA DMA transfer through
multiple DBDMA descriptors, so a single ATA pull can be smaller or larger
than the current descriptor request without indicating an error.

Reduce the logging level to avoid logspam during boot.
2026-07-07 11:06:55 +02:00
Mihai Parparita 36420c55b9 dbdma: Report residual descriptor byte counts
We were treating resCount as a "result" count, but it's actually a "residual"
count that reports how many bytes from a descriptor were not transferred
when processing a command. We now correctly handle partial descriptors.

This ended up being necessary for the 10.0 public beta bringup too (the
`AppleUltra66ATA::stopDma` implementation in xnu-103 computes the number
of bytes transferred by subtracting `resCount` from `reqCount`).
2026-07-07 11:06:55 +02:00