Being for the Benefit of RAM that’s tight

For the benefit of anyone interested in what I’ll be working on this summer for ScummVM as part of Google Summer of Code, here’s a (slightly) modified copy of my GSoC application:

Title: Implementing Support for Loadable Modules on MIPS and ARM-based platforms
Student: Anthony Puccinelli
Abstract: ScummVM has grown to include support for adventure games running on many different engines. This much-appreciated support has unfortunately bloated the size of the ScummVM binary and the space it takes up in RAM, which is a problem for small devices that don’t have much RAM to work with. To alleviate this issue, custom module loaders can be written for these devices that enable them to only load one needed engine into RAM at a time, depending on the game selected.
Content:
  • Name: Tony Puccinelli
  • Email: tony.puccinelli@gmail.com
  • Mentor: Yotam Barnoy
  • Co-mentor: John Willis
  • Deliverables:
    • Write a linker script and custom ELF loader to provide full support for loadable modules in ScummVM’s PS2 Port, using the pre-existing PSP code as a starting point.
    • Abstract parent “ELF Loader” class to be inherited by targets that support loadable modules.
    • Implement support for loadable modules on the GP2x, an ARM target.
    • Implement support for loadable modules on the DS with the aid of the ARM-based GP2x code.
  • Benefits to the ScummVM Community:
    • Helps to reduce memory usage for the ports involved, which could especially help the RAM-deprived DS port to be more functional with games like “The Dig” and “Full Throttle”.
    • Will help eliminate the need for confusing and difficult alternate versions of the ScummVM binary that hold some subset of the game engines ScummVM supports.
    • Generic “ELF loader” will lay the groundwork for loadable module support in other ports in the near-future.
  • Project Schedule: I’m utterly swamped by coursework this semester, so I can’t commit to coding work until the official start of gsoc according to their timeline (May 24th). I aim to be finished with the project on August 13th to leave a little time for some refining/testing/debugging work the last weekend of the program. I’m interested in continuing to contribute to the ScummVM project after gsoc is over as well, perhaps by attempting to more fully support the DS. A more detailed schedule follows (I am currently planning to work 7-8 hours a day M-F. This schedule is DEFINITELY subject to change as I imagine I will have to be quite flexible if unforeseen problems arise):
    • Week 0 (May 17 – May 21):
      • Poke around ScummVM code 🙂
      • Ensure I am up and running with homebrew on the DS, PS2, and GP2x.
    • Week 1 (May 24 – May 28):
      • Tweak PSP loader code for PS2.
      • Write custom GNU linker script and modify PS2 port’s Makefile to get plugins to build properly.
    • Week 2 (May 31 – June 4):
      • Finish/Debug Week 1 task.
    • Week 3 (June 7 – June 11):
      • Generalize an “ELF Loader” that all ports can inherit (this may be similar to “elf32.h”).
    • Week 4 (June 14 – June 18):
      • Finish/Debug Week 3 task.
    • Week 5 (June 21 – June 25):
      • Better familiarize myself with ARM.
      • Write a GP2x loader.
      • Utilize GP2x’s Linux capabilities to aid in debugging.
    • Week 6 (June 28 – July 2):
      • Continue work on GP2x loader.
      • Start writing linker script and modify Makefile to get plugins to build properly on GP2x.
    • Week 7 (July 5 – July 9):
      • Finish Week 5 and 6 tasks.
    • Week 8 (July 12 – July 16):
      • Begin work on DS loader/linker.
      • Modify loader to load only the engine of the desired game instead of loading all of them, then deleting.
    • Week 9 (July 19 – July 23):
      • Continue work on the DS.
    • Week 10 (July 26 – July 30):
      • Continue work on the DS.
    • Week 11 (August 2 – August 6):
      • Finish work on DS.
      • If time allows, begin turning audio codecs into loadable modules (work that might continue after gsoc).
    • Week 12 (August 9 – August 13):
      • Final Testing/Debugging/Refinement phase.
  • Availability: I plan to treat this as a full-time job, and will thus make myself available to work 35-40 hours a week. I have made no other major commitments this Summer and am willing to up the time I work each week if necessary. I am also willing to add more to the project if it turns out work goes quicker than expected (though from my prior programming experience, I’ve found it is far easier to underestimate how much time a task will take than to overestimate it).
  • Skype ID: toneman73
  • Phone Number: (916) 616-5265
  • Timezone: Pacific Standard Time (I’m in California)
  • Bio: I am a Junior CS major and English minor at UC Berkeley and a long-time user of ScummVM. I am passionate about interactive storytelling and love adventure games for their focus on smart dialogue and tongue-in-cheek humor (In fact, a friend and I are VERY slowly beginning work on a point ‘n’ click adventure of our own using Adventure Game Studio). On the technical side of things, I am well-versed in MIPS as I’ve not only written MIPS code, but have written an assembler that translates a simplified, 16-bit version of MIPS dubbed CAL16 into machine language. I’ve also designed a circuit (using LogiSIM) that can take a CAL16 program into RAM and run it. Thus, the PS2 task is right up my alley. My current coursework involves writing a Python compiler in C++ and implementing features like caching and virtual memory mechanisms, CPU scheduling, multi-threaded processes, etc. into a simple OS dubbed Nachos. These projects are, I feel, uniquely preparing me for the type of work I’d be doing with this task, work that specifically concerns the hardware/software boundary. Thanks very much for your consideration; I’m looking forward to the possibility of working on this project, as it is one I’ve respected and used for years.