Commit Graph

49 Commits

Author SHA1 Message Date
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
b0d33a5385 Add pmg3twr machine description. 2024-03-09 17:48:04 -07:00
Maxim Poliakovski
ada68ffc71 machinegossamer: add primary IDE hard disk drive. 2023-11-22 17:35:14 +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
1051a7fb9b machinegossamer: attach ATAPI CD-ROM. 2023-06-18 23:43:08 +02:00
Maxim Poliakovski
f809124a2e Improve SCSI bus registration. 2023-05-30 19:46:27 +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
5d7450df90 heathrow: locate sound HW by type.
That allows using sound codecs other than Screamer with Heathrow.
2023-02-25 18:14:42 +01:00
joevt
b472123746 Standardize PCIDevice slot_id for PCIHost.
PCIHost
- PCIHosts (bandit and grackle) now use device number and function number for identifying attached PCIDevices. A macro DEV_FUN is added to calculate this new slot_id. Bandit no longer uses IDSEL. Grackle no longer uses only device number.

machinecatalyst, machinegossamer, machinetnt
- Use DEV_FUN to attach PCI devices by device number and function number.
2023-02-05 06:57:04 -08:00
Maxim Poliakovski
bcd443779a machinegossamer: add internal SCSI bus. 2023-01-25 20:56:51 +01:00
Maxim Poliakovski
136aeca8f2 Fix Gossamer system register. 2023-01-11 23:49:20 +01:00
Maxim Poliakovski
8d01440558 Improve previous (cosmetics & code duplication). 2023-01-11 23:36:16 +01:00
joevt
b61a7c4aea Log something from machine initialization.
The machine type and its corresponding source file name should appear once in the log output.
2023-01-11 01:17:12 -08:00
joevt
2f08a0b327 Fix Gossamer machineID allocation size.
When the allocation is logged, it will look appear like this:
Added mmio region 0xFF000004..0xFF000FFF (Machine-id)
instead of like this:
Added mmio region 0xFF000004..0xFF001003 (Machine-id)
2023-01-11 00:05:23 -08:00
dingusdev
58908621e6 IDE refinements 2022-12-05 08:42:51 -07:00
dingusdev
311538b81d Fix IDE functionality 2022-11-26 21:34:54 -07:00
joevt
fca6cb11b6 Add info for possible grackle PCI devices
Devices that are not probed by Open Firmware might still be usable by Mac OS X or Linux if they can enumerate PCI devices without using Open Firmware's device tree.
A patch in nvramrc can make Open Firmware probe all the devices.
The point is that the emulation does not need to be limited to 5 slots.
2022-08-22 17:07:50 -07:00
Maxim Poliakovski
c5ecdb840d machinegossamer: proper system & clocks configuration. 2022-08-15 14:51:37 +02:00
Maxim Poliakovski
0dbcda5710 machinegossamer: system register definitions. 2022-08-15 14:50:49 +02:00
joevt
93fae1ee68 Merge remote-tracking branch 'upstream/master' 2022-08-14 16:38:51 -07:00
Maxim Poliakovski
3f3af68582 machinegossamer: add Whisper ID PROM. 2022-08-14 23:01:55 +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
eecb5a0f42 machinegossamer: add Athens I2C device. 2022-08-11 01:45:32 +02:00
Maxim Poliakovski
c3939e3b25 Gossamer: factory test control. 2022-07-20 20:08:37 +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
5668fc161f macio: fix SWIM3 register space accesses. 2022-06-13 23:15:48 +02:00
Maxim Poliakovski
1d86375061 Implement MPC601 style RTC. 2022-03-28 18:26:47 +02:00
dingusdev
80a4864a92 Floppy disk write protection 2022-02-24 07:33:30 -07:00
Maxim Poliakovski
5e2f2b12e4 Properly connect Superdrive to SWIM3 and machines. 2022-02-06 15:23:30 +01:00
Maxim Poliakovski
c1208b398e Add posti-initialization to HW components. 2022-01-21 12:42:05 +01:00
Maxim Poliakovski
f39188beb1 Initial support for floppy disk images. 2021-12-04 14:22:02 +01:00
Maxim Poliakovski
c0cd6eb38f Add missing licence headers, update license date. 2021-10-23 21:00:31 +02:00
Maxim Poliakovski
9329d56d83 Move devices into dedicated subdirectories. 2021-10-23 20:17:47 +02:00
Maxim Poliakovski
e052eb4a87 Merge branch 'atirage-hacks'. 2021-09-25 23:16:38 +02:00
Maxim Poliakovski
84e111290f Fix includes for loguru and SDL. 2021-09-16 00:46:38 +02:00
Maxim Poliakovski
68b8da2182 Add PDM machine factory and the minimal HW. 2020-12-19 10:06:05 +01:00
Maxim Poliakovski
c81c00f918 Make properties overridable from the command line. 2020-10-09 12:25:12 +02:00
Maxim Poliakovski
599659495b Initial CLI11 integration. 2020-09-26 02:38:22 +02:00
dingusdev
14ef7564cd CLI fixes - RAM and GFXMEM work better 2020-08-25 20:07:02 -07:00
Maxim Poliakovski
39a643aff6 Merge branch 'machines'
Also disable SDL for now because it produces build errors.
2020-06-03 18:21:51 +02:00
Waqar Ahmed
0ab9380be3 clang-format everything 2020-05-12 23:55:45 +05:00
Maxim Poliakovski
f7d67a91e0 New AWAC and sound server implementation. 2020-05-08 23:12:04 +02:00
Maxim Poliakovski
a8c6298545 devices: skeleton for ATI Rage emulation. 2020-03-31 18:48:04 +02:00
dingusdev
60ffa5bfac Initial attempt at fixing SDL2 building for Windows 2020-03-22 20:15:12 -07:00
Maxim Poliakovski
0044610038 Add SPD SDRAM emulation. 2020-03-15 14:44:33 +01:00
Maxim Poliakovski
14156dd32b Introduce subdevices interface. 2020-03-14 15:39:34 +01:00
Maxim Poliakovski
d53400ebae Introduce base class HWComponent. 2020-03-14 14:26:30 +01:00
Maxim Poliakovski
822f6cafd2 Create machine factory.
It manages various hardware configurations referred to as machines.
2020-03-13 23:09:36 +01:00