Commit Graph
79 Commits
Author SHA1 Message Date
Maxim Poliakovski 0e03cac082 Move memaccess.h to core/* 2026-06-07 20:32:46 +02:00
joevt e70ab21787 machinefactory: Make a faster adler32. 2026-06-06 07:35:12 -07:00
joevt 9dc3cb978e machinefactory: Use print_all_info. 2026-04-15 19:47:09 -07:00
joevt 0bf6f8b47f romidentity: Add Old World ROM 64-bit checksum.
The 32-bit checksum of Old World ROMs only covers the first 3 MiB.
Some Old World ROMs may have differences only in the last 1 MiB.
Therefore, include the 64-bit checksum which covers all 4 MiB.

Verify ROM size before trying to read from config_info.
2026-04-11 18:29:45 -07:00
dingusdev 213dd4c16e Update copyright info further 2026-01-30 08:12:04 -07:00
Maxim Poliakovski e75ee8d32a Update copyright year. 2026-01-30 12:15:00 +01:00
joevt 3639f40eb0 Create machine should clear device map on error. 2025-11-16 08:09:18 -07:00
joevt 47e56614af romidentity: Powerbook 190cs is a 68K ROM. 2025-11-16 08:00:53 -07:00
joevt 6ca2a0a29b romidentity: No ROMRelease for ROMVersion < 0x7A.
ROMRelease 0x6000 is probably a BRA.W instruction.
2025-11-16 07:57:00 -07:00
Maxim Poliakovski c3448e1e7c machinepdm: support for pluggable PDS/VDS devices.
Processor direct slot (PDS) is the only expansion
slot available in PDM. It accepts a few Apple PDS
cards as well as Nubus cards attached using a special
adapter. The attached device is handled as it would
be a standard Nubus device plugged into the pseudo slot $E.

Video direct slot (VDS) in Cold Fusion is the same
thing as the PDS slot in PDM.
VDS usually carries either the HPV or the Planaria
video expansion card.

Virtual Nubus cards can be attached to the PDS/VDS
slot using the "--pds=[DeviceName]" option.
2025-11-15 23:48:26 +01:00
joevt 0b4487d6b7 Create a HWComponent for each machine.
class Machine (subclass of HWComponent) will serve as the root device of
a machine.
Its sub-device list will take the place of the machine device list.
Its create method will take the place of the machine init function.
Its properties will take the place of the machine properties.
This change removes extra loops for the machine devices and properties.
2025-11-15 21:58:47 +01:00
joevt 8f3b4ffa05 machinefactory: Output leading zeros of checksum. 2025-11-10 07:41:34 -07:00
joevt c1197423b4 machinefactory: Move rom identity. 2025-07-11 01:44:18 +02:00
joevt b447193a22 machinefactory: More rom info. 2025-07-07 19:42:00 -07:00
joevt ca77b141a6 machinefactory: iMac G4 has 4.4.1f1. 2025-05-30 19:05:43 -07:00
joevt f7b88cf5ee machinefactory: Set cout fill to right.
Always set the fill direction explicitly in case someone set it to left elsewhere.
2025-04-28 07:05:32 -07:00
dingusdevandRairii 15baf9a2a0 Add Bondi (iMac G3)
Co-Authored-By: Rairii <2650838+Wack0@users.noreply.github.com>
2025-03-28 18:31:00 -07:00
joevt ccea8ae8d1 Fix spelling of NuBus. 2025-03-08 18:19:48 -07:00
joevt 2f30395d00 Break long lines.
Make them 130 characters or less.
2025-01-30 06:30:51 -07:00
joevt 355738d42b machinefactory: ROM identification changes.
Read ROM file once.
Identify 68K and New World ROMs.
Improve identification of Old World ROMs.
Perform checksum checks.
Identify the ROM even if the user specifies a machine option.
2024-12-15 18:53:48 -07:00
joevt 3124b10eaa Implement DIMM properties. 2024-12-08 12:26:14 -07: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
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
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 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 78020c4794 Add Bandit2 and properties for Chaos. 2024-03-20 07:38:39 -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
joevt 214b52a96a machinefactory: Fix spelling. 2024-03-03 15:13:29 -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 8baf722343 Spelling. 2024-02-20 01:53:32 +01:00
Mihai Parparita 35c86ad6bf Clean up #includes
Result of running IWYU (https://include-what-you-use.org/) and
applying most of the suggestions about unncessary includes and
forward declarations.

Was motivated by observing that <thread> was being included in
ppcopcodes.cpp even though it was unused (found while researching
the use of threads), but seems generally good to help with build
times and correctness.
2023-11-03 00:33:47 -07:00
Maxim Poliakovski 3a7e3c1986 Initial support for device path properties. 2023-06-18 23:15:08 +02:00
Maxim Poliakovski 03595c3940 Merge remote-tracking branch 'origin/machine-yosemite' 2023-04-21 12:49:58 +02:00
Maxim Poliakovski cf0d361918 Merge 'hard-disks' branch. 2023-04-17 01:20:38 +02:00
Maxim Poliakovski 299f0d3a9f Accept 1MB New World Boot ROMs. 2023-02-15 02:36:40 +01:00
joevt 64fec88436 Fix compiler warnings: cast loses precision.
Use explicit cast when converting large integer types to smaller integer types when it is known that the most significant bytes are not required.
For pcidevice, check the ROM file size before casting to int. We'll allow expansion ROM sizes up to 4MB but usually they are 64K, sometimes 128K, rarely 256K.
for machinefactory, change the type to size_t so that it can correctly get the size of files that are larger than 4GB; it already checks the file size is 4MB before we need to cast to uint32_t.
For floppyimg, check the image size before casting to int. For raw images, only allow files up to 2MB. For DiskCopy42 images, it already checks the file size, so do the cast after that.
2023-01-11 01:17:12 -08:00
Maxim Poliakovski 585c5fd4ca Guess low-level floppy disk format based on image size.
Also add fdd_fmt property for manually specifying disk
format.
2022-11-17 18:03:18 +01:00
Maxim Poliakovski 5f0358a347 Implement basic SCSI CD-ROM emulation. 2022-11-14 00:55:05 +01:00
dingusdev ee9573327c Reorganized hard disk code
Not compiling yet.
2022-10-08 16:51:54 -07:00
Maxim Poliakovski 336ea14422 machinefactory: don't crash when property help is missing. 2022-08-19 19:44:10 +02:00
joevt b76bfedf4b Remove unnecessary linefeeds from log
To remove blank lines in the dingusppc.log file or in the console output when -d is used.
2022-08-14 05:26:56 -07:00
Maxim Poliakovski 3c062443f6 PDM: factory test control. 2022-07-20 01:36:05 +02:00
Maxim Poliakovski b9fb0b9c5f Switch fdd_wr_prot to BinProperty. 2022-07-19 23:48:17 +02:00
Maxim Poliakovski c0078ce97d Refactor MachineBase and MachineFactory classes.
Adding new machines is much easier now.
A significant amount of duplicated code has been reduced.
2022-07-18 20:27:34 +02:00
Maxim Poliakovski 913944c607 platinum: implement video controller registers. 2022-06-09 23:16:03 +02:00
Maxim Poliakovski e0b94e0b47 ESCC: connect NULL and STDIO backends. 2022-05-07 21:47:22 +02:00
Maxim Poliakovski be4f835e6c New machine: Catalyst (PM7200). 2022-05-07 21:47:14 +02:00
dingusdev 8d3427c475 Proper write protection settings 2022-02-27 22:41:59 -07:00