Commit Graph

14 Commits

Author SHA1 Message Date
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
3c5a0ad8c1 Add BlockStorageDevice class. 2023-06-18 23:27:10 +02:00
Maxim Poliakovski
cf0d361918 Merge 'hard-disks' branch. 2023-04-17 01:20:38 +02:00
Maxim Poliakovski
101a8d33b0 Manage Windows build dependencies with vcpkg. 2023-01-08 22:27:13 +01:00
dingusdev
58908621e6 IDE refinements 2022-12-05 08:42:51 -07:00
dingusdev
aa1d23e08b Fixed hard disk support
Compiles, still unfinished
2022-10-22 11:41:52 -07:00
Maxim Poliakovski
f39188beb1 Initial support for floppy disk images. 2021-12-04 14:22:02 +01:00
Maxim Poliakovski
87b8e1759a Connect ESCC to AMIC and Heathrow. 2021-10-25 22:19:45 +02:00
Maxim Poliakovski
6a756df5e3 Add MACE Ethernet emulation stub. 2021-10-24 21:02:30 +02:00
Maxim Poliakovski
9329d56d83 Move devices into dedicated subdirectories. 2021-10-23 20:17:47 +02:00
Maxim Poliakovski
84e111290f Fix includes for loguru and SDL. 2021-09-16 00:46:38 +02:00
Maxim Poliakovski
ea5b0d9f52 atirage: framebuffer rendering and various improvements. 2021-09-11 21:02:46 +02:00
Maxim Poliakovski
e59939541e WIP: initial Cubeb integration. 2020-05-15 02:44:00 +02:00
Maxim Poliakovski
4e4d0370be Modularize build system.
This way object files can be shared accross multiple executables.
2020-02-03 14:36:37 +01:00