Jump to navigation Jump to search


979 bytes added, 12:44, 24 February 2010
Updated loadable module task
=== Implemented support for loadable modules on small devices ===
''Technical Contact'': [[User:Fingolfin|Max Horn]] | [[User:Bluddy|Yotam Barnoy]]
ScummVM by now contains about two dozen engines for different adventure games. Each of these takes up lots of storage space in the ScummVM binary, and hence also RAM, even if not used. Since both are scarce resources on some of our smaller targets (e.g. the Nintendo DS, which only has 4 MB RAM), this leads to problems. Some of the ports work around this by shipping multiple ScummVM binaries, each with a different subset of engines. This is not ideal, as it means more work for the developers and is confusing to users.
Putting all engines into lodable loadable modules reduces memory usage, as this way during game play only a single module needs to be in RAM. ScummVM itself is prepared for loadable module support. In fact several of our ports, notably the Windows, Linux and Mac OS X ports, already support loadable modules. This is easy for them as the operating system already provides loadable modules. But this is not the case on systems like the Dreamcast, Nintendo Gamecube & DS & Wii, the PlayStation Portable, Symbian and others.
''The Task:''
Implement support for loadable modules for at least two "small" targets where this is currently not possible. For the Dreamcast, Marcus Comstedt solved this by implementing [ a module loader] on his own. Yotam Barnoy built on Marcus' work and made [ a similar loader] for the PSP. You can should probably use this version as a starting point.
There is The module loader consists of a [ linker script] which is used to generate custom loadable modules "manually". Furthermore, he implemented we use a custom loader for [ ELF binaries] which takes care of the run-tinke time linking.
The original Dreamcast code is for Sh processors, and the PSP code runs on a MIPS processor. You would have to adapt this these to generated generate and load ELF binaries for ARM processors (for Nintendo DS, WinCE, Symbian, GP2x), or MIPS processors (PS2 and PSP), or PowerPC (Nintendo Wii & Gamecube), or the PS2's version of the MIPS. The original Dreamcast code is for Sh processors.  Ideally, your code is should be generic enough to be usable for all these platforms, but at least . With two examples of these four the loader already in existence, this should quite doable. Another factor to consider is that should be supportedyou wish to build the loader for very memory-starved platforms such as the Nintendo DS, you will have to ensure it deal with an issue within the ScummVm architecture. Currently, the loadable modules are all initially loaded into memory. When a game is generic enoughchosen by the user, the irrelevant modules are erased from memory. In order for the modules to fit into the limited Nintendo DS RAM, this method will have to change -- only one module should be loaded into memory at a time.
''Required Skills:''
* Good C++ skills.
* Some knowledge of the ELF binary format (great documentation is available on the net, start e.g. [ at Wikipedia]).
* Any of the listed "small" devices (Nintendo DS, Wii, Gamecube, PS2, PSP, Dreamcast, GP2x, any WinCE or Symbian device supporting ScummVM, ...); -- ideally multiple. Or figure out how to setup compilers for them.* Basic knowledge regarding the target architecture, be it [ ARM], [ PowerPC], or [ MIPS].
=== Small Devices Backend ===


Navigation menu