Commit Graph

148 Commits

Author SHA1 Message Date
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
dingusdev
2a0f391113 Compilation fix for machineproperties.cpp 2023-12-17 20:04:10 -07:00
Maxim Poliakovski
fa04cde25d machinetnt: more control of machine configuration. 2023-12-10 00:19:44 +01:00
Maxim Poliakovski
ada68ffc71 machinegossamer: add primary IDE hard disk drive. 2023-11-22 17:35:14 +01:00
Mihai Parparita
e5c50640e3 machinebase: fully initialize devices registered by other devices
postinit_devices() may cause additional devices to be registered
(e.g. PCI hosts will register their cards). We were not calling
device_postinit on those devices, because the iterator over the
device map was set up at the start of the loop.

Keep looping until we've actually initialized all devices in the map.
2023-11-08 00:11:41 -08: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
Mihai Parparita
1f7edfdb3b Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.

This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).

For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.

The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.

[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-10-25 22:25:53 -07:00
Maxim Poliakovski
c2cd076662 machinebase: fix log statement warning. 2023-07-23 16:50:14 +02:00
dingusdev
d11d693b52 Compilation fix for VS 2023-06-19 22:36:09 -07:00
Maxim Poliakovski
357fc3a73a machineyosemite: attach ATAPI CD-ROM. 2023-06-18 23:44:12 +02:00
Maxim Poliakovski
1051a7fb9b machinegossamer: attach ATAPI CD-ROM. 2023-06-18 23:43:08 +02:00
Maxim Poliakovski
3a7e3c1986 Initial support for device path properties. 2023-06-18 23:15:08 +02:00
Maxim Poliakovski
f809124a2e Improve SCSI bus registration. 2023-05-30 19:46:27 +02:00
Maxim Poliakovski
c543d0936c machineyosemite: add SCSI0 bus. 2023-04-24 22:57:16 +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
422639411d Initial Burgundy sound codec emulation. 2023-02-25 18:14:42 +01: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
Maxim Poliakovski
fdf0ebbf6c machineyosemite: implement RAM modules. 2023-02-15 02:36:40 +01:00
Maxim Poliakovski
196154bb7b machineyosemite: use Heathrow as I/O controller for now. 2023-02-15 02:36:40 +01:00
Maxim Poliakovski
92c558f44b Initial Yosemite emulation. 2023-02-15 02:36:40 +01:00