163 Commits

Author SHA1 Message Date
Maxim Poliakovski
f6f11e81e9 Switch AMIC SCSI DMA to the new DMA API. 2025-04-01 04:02:51 +02:00
joevt
1166fda3e0 heathrow: Connect mesh. 2025-03-30 07:58:34 -07:00
joevt
a0edc825fb macio: Add comment for MIO_OH_FC_IN_USE_LED flag. 2025-03-25 21:44:35 -07:00
joevt
20e7dfb0e1 macio: Log unsupported DMA channels once.
For debugging. No need to spam the log.
2025-03-25 21:39:49 -07:00
joevt
637c20e3cf grandcentral: Handle bit-flipping of MAC address.
If the ENET ROM begins with 0x10, then the bits of each byte are flipped 7..0 -> 0..7 which means the MAC address will begin with 0x08.
A MAC address beginning with 0x08 can be bit-flipped or not bit-flipped.
A MAC address cannot begin with 0x10.
I have a `dump-device-tree` output for a Power Mac 9500 with MAC address beginning with 08-00-07 (OUI for "Apple, Inc."). I don't know if it's using the bit-flipped ROM (starting with 10) or not bit-flipped ROM (starting with 08).
Most of the other `dump-device-tree` outputs I've seen have a MAC address beginning with an OUI for "Apple, Inc." that begins with 00.
2025-03-24 06:39:55 -07:00
Maxim Poliakovski
a7386a648e macio.h: remove unused class members. 2025-03-14 17:52:48 +01:00
dingusdev
77503df677 Code clean-up 2025-03-12 07:58:32 -07:00
joevt
ccea8ae8d1 Fix spelling of NuBus. 2025-03-08 18:19:48 -07:00
Maxim Poliakovski
bcb453e7ea Named constants for PCI IDs for MacIO ASICs. 2025-02-26 19:31:22 +01:00
joevt
744c0d39b5 amic: Make interrupt flags atomic. 2025-02-23 15:35:29 -07:00
joevt
9fbb705595 ohare: Restore NVRAM to subdevices.
It was accidentally removed in previous conflict resolution.
2025-02-17 06:03:57 -07:00
joevt
063a9a6859 machinegazelle: Update ohare to heathrow standard.
Add feature_control.
Add Ide0.
Remove Ide1.
Add Mesh.
Remove built-in Ethernet.
Add Swim3.
Implement device and DMA interrupts.
Fill in dma read and write methods.
Add ESCC compatible addressing.
2025-02-16 10:11:42 -07:00
joevt
101bb826f1 Make irq_id 64 bits.
- So that DMA and other interrupts can fit without overlap.
- To simplify conversion to interrupt mask.
- To reduce variables, defines, and code.
2025-02-10 06:49:39 -07:00
Rairii
662166d7c6 heathrow: Add Media Bay ID accessor.
So that a machine can override the mb_id.
2025-02-09 16:51:42 -07:00
joevt
2f30395d00 Break long lines.
Make them 130 characters or less.
2025-01-30 06:30:51 -07:00
joevt
f42b239713 heathrow: Use mask, not minus, for address decode. 2024-12-07 10:12:01 -07:00
joevt
bfc51b8967 heathrow: Add missing this. 2024-12-07 10:04:15 -07:00
joevt
9c66a56a65 heathrow: Replace res with value. 2024-12-07 09:58:55 -07:00
dingusdev
1c95619aa4 Assign ESCC B RCV DMA 2024-12-06 05:47:06 -07:00
dingusdev
81ebc40158 Add ESCC B RCV DMA
Diagnosing issues in booting up Mac OS 9.0.4 for Beige G3
2024-12-04 21:11:47 -07:00
joevt
1bf4073fa7 macio: Range check scc compatible register index.
Also, non-compatible registers don't begin until 0x60 for SCC compatible addressing.
2024-12-04 21:03:09 -07:00
Maxim Poliakovski
85d5b10f61 sc53c94: switch to the new DMA API. 2024-12-03 11:37:18 +01:00
Mihai Parparita
4479387580 Remove using namespace std from remaining header files
It's somewhat of an anti-pattern, and can lead to conflicts with
other symbols (e.g. the Windows build failure in https://github.com/dingusdev/dingusppc/actions/runs/11762906342/job/32766290288,
I removed `using namespace std` from timermanager.h to fix that one).
2024-11-30 20:01:09 -08:00
joevt
e7eb1c8a66 Fix PCI interrupts and add devices.
- Use interrupt source instead of IRQ ID in the IrqMap.
- Add a get_interrupt_controller method to mirror the set_interrupt_controller method.
- Have PCI hosts use pcihost_device_postinit to add PCI devices. This was moved from bandit's device_postinit and allows for duplicate devices by appending the slot to the registered device name.
- Fix interrupts of Pippin.

Fix interrupts of cmd646
- Make it work like other PCI devices.
- IntDetails is built into the pcibase base class.
- IntDetails is initialized by calling pci_interrupt.
- pci_interrupt checks the "enable interrupts" flag before doing an interrupt.
2024-11-12 07:04:55 -07:00
joevt
e707d1f27a Remove slashes from PCI device names.
So they are not mistaken for path separators.
2024-11-11 21:28:51 -07:00
joevt
9a2303c495 pci: Replace pci_name with get_name.
It's redundant to have two names.
2024-11-11 21:28:23 -07:00
joevt
6154b7cbe2 amic: Add modem port transmit DMA read. 2024-11-11 21:10:17 -07:00
Maxim Poliakovski
c6116fcc88 grandcentral: pass Curio DREQ state to its DMA channel.
Bit 5 of the channel status register of the SCSI0 DMA channel
reflects the DREQ signal from Curio.
The old SCSI API still used in some Macintosh applications
- most notably HD SC Setup and Drive Setup - relies on this API
and that signal to be implemented.
2024-11-03 15:10:33 +01:00
Maxim Poliakovski
64a5a17df0 heathrow: fix interrupt masking.
Use int_mask1/int_mask2 directly without changing int_events1/int_events2.
That permits interrupt generation on int_mask1/int_mask2 changes.
2024-09-28 23:17:14 +02:00
Maxim Poliakovski
a649a688e7 grandcentral: fix interrupt masking.
Use int_mask directly without changing int_events.
That permits interrupt generation on int_mask changes.
2024-09-28 23:17:14 +02:00
Maxim Poliakovski
211f8adc0e Improve MACE stub. 2024-07-23 01:39:15 +02:00
Maxim Poliakovski
3fe6e3c09e grandcentral: more elegant MeshStub with less checks. 2024-07-19 01:31:36 +02:00
Maxim Poliakovski
ba9fcd100d mesh: extend stub to a full implementation. 2024-07-15 03:34:43 +02:00
Maxim Poliakovski
f13f4e0023 grandcentral: break long lines. 2024-07-15 02:56:24 +02:00
joevt
14f75d834a macio: Add list of OHare/Heathrow bits. 2024-04-12 19:54:34 -07:00
Maxim Poliakovski
45d2c8854d Revert "macio: Add fatman bits register."
This reverts commit 8aaf211c5b9f3d34c49c48d9fca59c4a0a96ca04.
2024-04-11 17:18:20 +02:00
joevt
1c5009fcb0 amic: Add more registers. 2024-04-10 20:59:34 -07:00
joevt
8aaf211c5b macio: Add fatman bits register.
This register is used in the control ndrv to detect presence of connected S-Video or composite video display.
2024-04-10 20:48:29 -07:00
joevt
be27ceed00 machinetnt: Remove sixty6 and mesh properties.
Use the presence of the devices in the MachineDescription to determine these.
2024-04-10 20:19:43 -07:00
dingusdev
475f894582 Comment out log message 2024-04-02 19:21:56 -07:00
joevt
7007e002e6 macio: Make interrupt flags atomic.
So they can be modified by other threads.
2024-04-02 19:05:57 -07:00
joevt
4395ce01d7 ohare: Update name of Mesh device. 2024-03-30 17:56:19 -07:00
joevt
2c097da12d grandcentral: Add escc DMA. 2024-03-30 14:55:24 -07:00
joevt
5f316dc7a4 grandcentral: Adjust audio in DMA logging. 2024-03-30 12:49:33 -07:00
joevt
1d9b0f7fa5 macio: Add MIO_AUX_CTRL enum. 2024-03-28 07:10:05 -07:00
joevt
4c9b125cc8 amic: Add modem port transmit DMA. 2024-03-14 08:05:42 -07:00
joevt
e1e00c951b sc53c94: Split real_dma_xfer.
Create real_dma_xfer_out and real_dma_xfer_in methods.
2024-03-14 08:01:07 -07:00
joevt
31036b8dee grandcentral: Add sound in DMA. 2024-03-09 06:03:33 -07:00
joevt
6f231f3367 grandcentral: IOBus changes.
- Add IOBusDevice (nvram_addr_hi_dev) for NVRAM addr hi.
- Add IOBusDevice (nvram_dev) for NVRAM data.
- Make all IOBusDevices use the same code.
- Log error if 4 least significant bits of offset are not zero.
- Correctly byte swap the value before passing it to the IOBusDevice.
- When reading, duplicate the bytes in a word or dword like a real Power Mac does.
2024-03-09 06:02:23 -07:00
Mihai Parparita
f218a38294 Ensure that AMIC pseudo-VBL timer is stopped when the object is destroyed. 2024-03-07 23:31:44 -08:00