16 Commits

Author SHA1 Message Date
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
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
d426d0faeb Add settings when adding pci device. 2024-03-03 15:01:39 -07: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
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
16bf46506a New machine: Catalyst (PM7200). 2022-05-21 14:51:27 +02: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
68b8da2182 Add PDM machine factory and the minimal HW. 2020-12-19 10:06:05 +01:00
Maxim Poliakovski
90b2eb712a Implement CLI list subcommand. 2020-10-13 04:24:54 +02:00
Maxim Poliakovski
27f5d981da Remove more unused code. 2020-10-13 04:01:37 +02: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
4f59407cd0 Repair code for powermacg3 presets 2020-08-30 16:14:58 -07:00
dingusdev
14ef7564cd CLI fixes - RAM and GFXMEM work better 2020-08-25 20:07:02 -07:00
Maxim Poliakovski
822f6cafd2 Create machine factory.
It manages various hardware configurations referred to as machines.
2020-03-13 23:09:36 +01:00