Commit Graph

168 Commits

Author SHA1 Message Date
joevt
bf4ee72c0f machinetnt: Chaos is optional.
It's not used for Power Mac 9500/9600.
2024-12-08 12:39:07 -07:00
joevt
3124b10eaa Implement DIMM properties. 2024-12-08 12:26:14 -07: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
7a55a81186 pcihost: Fix pci_unregister_device.
Remove the device from the hosts dev_map.
Remove the device from the Machine object.
2024-11-29 07:31:23 -07:00
Maxim Poliakovski
b3f2a6cf20 machineyosemite: remove non-existent Rage128 connection. 2024-11-22 21:29:23 +01:00
Mihai Parparita
a941836a4d Add support for specifying properties of dynamically-registered devices via the command line
The previous approach of traversing the machine and its device tree
at startup to register CLI11 options was not working for dynamically
registered devices like PCI cards. This meant that options like
gfxmem_size or mon_id from the video cards could not be set.

Switch to instead registering in MachineFactory a hook function that
provides CLI flag values. We can call it when registering any property,
whether at startup or dynamically.
2024-11-21 22:58:36 -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
Maxim Poliakovski
b3eb1f6419 machineyosemite: register stock hard drive. 2024-10-09 14:50:44 +02:00
Maxim Poliakovski
2132922c7b machineyosemite: attach CMD646 Ultra ATA controller. 2024-10-09 14:49:59 +02:00
Keith Kaisershot
ec9987aab6 machinepippin: replace Mouse with AppleJack
Leave a keyboard attached for compatibility.
2024-10-06 23:45:27 -07:00
Keith Kaisershot
6696248158 adbbus: decouple ADB devices from CUDA
AdbMouse and AdbKeyboard are subdevices of the CUDA device alongside AdbBus.
This doesn't make sense because conceptually, ADB devices hang off of the ADB
bus, not CUDA itself. An ADB bus can exist without a CUDA present, for example
Egret on older 68K Macs and the PMU on newer Power Macs. Therefore, make the ADB
device list a subhierarchy of AdbBus instead. Add a new "adb_devices" property
belonging to AdbBus that can allow users to specify ADB devices on the command
line at machine creation time, independent of the emulated bus's host. Make this
property default to "Mouse,Keyboard" to preserve existing behavior.
2024-10-06 23:20:10 -07:00
Maxim Poliakovski
de727db4c6 machineyosemite: use PCI slot names that better match device tree properties. 2024-08-29 13:19:00 +02:00
Maxim Poliakovski
671cd0c5da machineyosemite: set PCI IRQ maps. 2024-08-29 00:16:59 +02:00
Maxim Poliakovski
bda85a66df machinetnt: populate RAM banks from properties. 2024-07-22 17:45:48 +02:00
Maxim Poliakovski
e4294d78bf machinepdm: use the real decrementer frequency. 2024-05-23 17:23:22 +02:00
Maxim Poliakovski
a18658fc16 machinetnt: break long lines. 2024-05-07 08:40:08 +02:00
joevt
9a489d13f4 machinetnt: Add 604 cpu option. 2024-04-24 06:48:52 -07:00
Maxim Poliakovski
dfd4d82693 machinepippin: connect Taos. 2024-04-22 00:15:29 +02:00
joevt
4b965c623b machinetnt: Add more Power Macs. 2024-04-10 20:36:59 -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
joevt
4f45d7de35 cpu: Add cpu options to ppc_cpu_init.
The first option is a flag that enables MPC601 (POWER) instructions for CPUs that are not MPC601.
This can be useful for the following reasons:
1) To produce results similar to classic Mac OS which emulates MPC601 instructions on CPUs that don't implement MPC601 instructions. This option is used to compare the risu traces produced in Mac OS 9 on a G3 or G4 with DPPC.
2) May increase performance in apps that use POWER instructions on emulated machines with CPUs that are not MPC601. It is not known if any such apps exist but there could be since Apple included MPC601 emulation in classic Mac OS.
2024-04-10 06:43:18 -07:00
Maxim Poliakovski
1c8702d67a Add missing credits. 2024-04-09 01:51:51 +02:00
Maxim Poliakovski
bdd441b1b6 Add machinepippin.cpp to /machines. 2024-04-08 00:56:00 +02:00
joevt
74274f164d G3 CPU upgrade property. 2024-04-04 19:05:59 -07:00
joevt
5c2bd0b3bb machines: Don't override existing properties. 2024-04-04 19:04:33 -07:00
joevt
d0a5a1e7be Add ability to override built-in GPU. 2024-04-04 19:04:06 -07:00
joevt
98e1787f93 machines: Remove duplicate gfxmem_size properties. 2024-04-01 18:28:13 -07:00
Maxim Poliakovski
ea4564c827 machinepdm: implement extended RAM. 2024-03-26 00:39:33 +01:00
joevt
fd961f9ff9 Fix Analyzer warnings.
In Xcode, type Command-Shift-B to analyze every source file or Command-Shift-Control-B to analyze the current source file.

For pseudo_dma_read report FIFO underrun and init data_word in that case.
2024-03-24 12:56:11 -07:00
joevt
a5aac5754c machinetnt: Add Bandit2 option. 2024-03-20 07:38:56 -07:00
joevt
23903a969d Add get_comp_by_name_optional. 2024-03-20 07:38:48 -07:00
joevt
78020c4794 Add Bandit2 and properties for Chaos. 2024-03-20 07:38:39 -07:00
joevt
1f9f2d2cf1 sixty6: Add support for sixty6 video output. 2024-03-14 20:06:55 -07:00
joevt
939d6d42bb machineproperties: More binary property values. 2024-03-14 19:16:54 -07:00
joevt
45a9d45e3f Add SCSI devices.
scsibus has a new method attach_scsi_devices which is used by all machines to populate a SCSI bus with one or more hard drives or CD-ROM drives.

HDDs are specified by the hdd_img property.
CDs are specified by the cdr_img property.
Multiple images are delimited by a colon :

attach_scsi_devices is called by the scsi controller after the scsi controller has attached itself to the scsi bus.
The bus suffix is applied to the property name.
Curio has no suffix so it will use hdd_img and cdr_img properties.
Mesh is expected to have a suffix of 2 so it will use hdd_img2 and cdr_img2 properties.

HDDs will skip SCSI ID 3 unless 7 HDDs are added, in which case, the seventh HDD will use ID 3.
CDs will start at SCSI ID 3, go to 7, then down to 0.
SCSI IDs are skipped if a device is already using that SCSI ID.

ScsiCdrom and ScsiHD no longer use REGISTER_DEVICE or DeviceDescription or PropMap which is normal for devices that can have multiple instances.
2024-03-14 19:12:11 -07:00
Mihai Parparita
cfca42e577 Add basic support for multiple hard disks in the 6100
We treat the hdd_img parameter as a colon-separated list of disk
images and create additional SCSI HD devices as needed.
2024-03-14 19:11:54 -07:00
joevt
b0d33a5385 Add pmg3twr machine description. 2024-03-09 17:48:04 -07:00
joevt
6d23e18c11 pci: Add PCI CardBus bridge.
PCCard is used by PowerBook G3 Wallstreet in Open Firmware 2.0.1.
CardBus is probed in New World Macs starting from at least Open Firmware 4.1.9f1 sometime after Open Firmware 3.1.1.

- Create PCIBase from common stuff in PCIDevice.
- Add PCIBridgeBase. These have a primary bus number, secondary bus number, and subordinate bus number which are used to determine if PCI type 1 config cycle should be passed.
- Change PCIBridge to use PCIBridgeBase instead of PCIDevice.
- Add PCICardBusBridge which uses PCIBridgeBase.
2024-03-03 16:00:55 -07:00
joevt
214b52a96a machinefactory: Fix spelling. 2024-03-03 15:13:29 -07:00
joevt
d426d0faeb Add settings when adding pci device. 2024-03-03 15:01:39 -07:00
joevt
e81ac6f61e Add PERCH slot.
So you can connect a USB controller or whatever to it.
2024-03-02 16:02:19 -07:00
joevt
1e78512c95 Rename Curio and Mesh. 2024-03-02 11:12:45 -07:00
joevt
15e132c824 cmake: Add header files in CMakeLists.txt.
So they will appear in Xcode project.

mkdir -p dingusppc/build-xcode
cd       dingusppc/build-xcode
cmake -G Xcode ..
xcodebuild -configuration Release
2024-03-01 19:41:43 -07:00
joevt
1fc551fae0 Fix yosemite machine description name. 2024-02-20 01:54:03 +01:00
joevt
8baf722343 Spelling. 2024-02-20 01:53:32 +01:00
Maxim Poliakovski
cf14144d5b machinetnt: add Power Macintosh 7300. 2024-02-12 02:45:29 +01:00
joevt
833534bdaa machinecatalyst: Cleanup board register 1. 2024-02-11 23:11:10 +01:00
Maxim Poliakovski
ad58d102df machinecatalyst: implement board register 1. 2024-01-30 00:34:24 +01:00
Maxim Poliakovski
9847f5ba6c machinecatalyst: remove video properties.
They will be implemented in the Platinum source.
2024-01-30 00:34:24 +01:00
Mihai Parparita
e36e1cf282 machinepdm: fix machine ID
Handle 4 byte reads from the machine ID MMIO region. Also change the 6100
machine ID to match the one used by MAME.
2023-12-29 23:31:16 +00:00