|
|
Line 30: |
Line 30: |
|
| |
|
| * It should be written with extensive use of #ifdefs, so if I, say, don't need a virtual keyboard or downscalers for platform Foo, I don't bloat my code. | | * It should be written with extensive use of #ifdefs, so if I, say, don't need a virtual keyboard or downscalers for platform Foo, I don't bloat my code. |
| | |
| | * It should take advantage of the [[Modulare Backends]] project. |
|
| |
|
| === Common Features === | | === Common Features === |
Line 43: |
Line 45: |
| * Possibi for low-res sound (8bit, mono, probably partly implemented in main mixer code for speed) | | * Possibi for low-res sound (8bit, mono, probably partly implemented in main mixer code for speed) |
| * Should hide unneeded options from GUI like MT-32, MIDI device (i.e. those which either don't make sense or are too fat for small devices) | | * Should hide unneeded options from GUI like MT-32, MIDI device (i.e. those which either don't make sense or are too fat for small devices) |
|
| |
| === OSystem changes ===
| |
| Now might be a good time for making OSystem more modular. That is, instead of using subclassing,
| |
| use a "component" approach, were instead of a single monolithic backends interface, we split responsibility for
| |
| various features into several components/modules.
| |
|
| |
| Possible modules include
| |
| * Drawing
| |
| * Sound (possibly allow for custom mixer implementations?)
| |
| * Input (events)
| |
| * Timers (the current code would be left as default implementation, but e.g. Morphos port could override it easily)
| |
| * Mutexes (only used when timers are involved, so could be joint with that)
| |
| * Virtual keyboard
| |
| * Filesystem code (already modular, see backends/fs/)
| |
| * SaveFileManager (already modular)
| |
| * Native MIDI drivers (already modular, backends/midi/)
| |
| * Scaler code (see common/scaler*) -> we already share some scaler code, but that could probably be done in a better way, and maybe some more generic scalers could be added (e.g. a good & fast downscaler).
| |
|
| |
| Note: Modularization must be done in such a way that it doesn't hurt porters -- after all it's meant to *help* them. But many ports are rather monolithic, and actually wouldn't benefit much from being modularized (e.g. the PSP, PS2, Dreamcast, etc. ports) compared to the current situation. I.e. it should be relatively pain free to transit to the new system, and not force anybody to reinvent the wheel.
| |