Thursday, June 17, 2010
Wiz-tle while you work (bad pun)
After a small amount of testing/altering of the PS2 code, I began work on the GP2x-Wiz this week! On the debug front, I've gotten some help from the GP2x forums to get the Wiz to "pretend" to be a USB serial converter and I've successfully logged onto my Wiz via kermit. Booting ScummVM from remote via kermit isn't quite working well yet, but it's close. On the coding front, I've written a plugin linker script (I don't think I'll have to use a custom linker for the main engine like I did with the PS2 code). I've also decided to prototype the custom ELF loader for the Wiz using a Makefile instead of configure since I might be making significant changes to building. I have a Makefile now that successfully builds ScummVM for the Wiz with static plugins, and am working on the loader.
Sunday, June 13, 2010
PS2 plugins working
Work went much better after getting debugging facilities running on the PS2. I discovered the problem seemed to be in how the plugins were linked. After making changes to plugin.ld over the weekend, dynamic modules seem to work correctly, at least for the SCUMM and SKY engines, on the PS2. I'll be doing a bit more testing, but things look good!
Tomorrow I plan to better comment out the altered linker scripts with documentation of what the changes are intended to do. Also, after discussing things with Yotam (my main mentor), I've decided to alter my schedule and begin work this week on the GP2x Wiz ELF loader/linker (instead of the work of abstracting a generic ELF loader). After work on the GP2x Wiz is done, I'll be more able to know what things can be abstracted and what things can't.
The altered schedule (which was approved by my mentor) is up on my wiki page: http://wiki.scummvm.org/index.php/User:Toneman
Thursday, June 10, 2010
Debug!
I've been hitting problem after problem getting good debugging support going on the PS2. Lesson learned, I've sent off e-mails to the porters for GP2X-Wiz and DS so I'll be more prepared when it comes to how to print debug output, etc. on those systems :-)
Tuesday, June 8, 2010
The Work So Far
A summary of my work so far on ScummVM:
- After a bit more hassle than expected (which involved things like changing some toolchain installation scripts to use older svn revisions), I got the necessary toolchains/libraries to successfully cross-compile ScummVM for the PS2, DS, and GP2x-Wiz.
- I copied the psp-provider, elf32.h, and psploader code into the ps2 backend and began tweaking them for the PS2.
- The simplest of these "tweaks" was just changing references to "PSP" to "PS2" :-)
- Tweaks so far also included removing psp-specific things from the ps2 loader (like code that I believe was there to ensure the psp didn't suspend during a load) and in some cases replacing calls to code in the psp toolchain with calls to code in the ps2 toolchain (also being sure to replace "includes" that reference psp toolchain files with "includes" that reference ps2 toolchain files).
- I got the default ps2 cross-compiler ld linker script using ee-ld --verbose and tweaked it in a similar fashion to the way the default psp linker was tweaked for the psp plugins (Yotam provided the default psp linker) to generate plugin.ld (for linking together game engine plugins) and main_prog.ld (for linking together the main engine).
- I tested main_prog.ld with static plugins and found that ScummVM didn't launch on the PS2 using the modified default ps2 linker. I saw in the PS2 Makefile that the default linker was switched out using -T with a "linkfile" in the PS2 toolchain. I remade main_prog.ld and plugin.ld by modifying this instead and it successfully launched again.
- I modified the main (in systemps2.cpp) to check if Dynamic Modules are enabled and, if so, to call PluginManager::instance().addPluginProvider(new PS2PluginProvider()).
- I have spent much of my time making tweaks to Makefile.ps2 (i.e. learning how different compiler flags/Defines affect the building, adding plugin variables, directing that the linker use my linker scripts, ensuring that the ps2loader is compiled and linked, etc.)
- I was getting linker errors concerning the GP-relative data section being over-filled when I enabled Dynamic Modules. I don't see a good reason why this is the case but for now I have used -G0 flags in the Makefile to direct the cross-compiler not to put anything in the GP-relative section.
At this point, compiling with Dynamic Modules turned off works as well as always, so at least my modifications haven't broken anything! :-). With Dynamic Modules turned on, yesterday morning ScummVM booted and let you specify a "Plugins Path" in the options, but failed to find engines for any of the games even though the plugins for those engines were linked. After making some modifications to the makefile and fixing some typos in the loader yesterday, ScummVM won't even boot anymore with Dynamic Modules turned on (might be a simple typo or something more sinister). In light of this, I'm planning to modify my schedule a bit after discussing it with my mentor, but progress is being made!
Note: I've made a number of modifications since my last commit but am holding off on committing code until ScummVM is at least launching again on the PS2.
Sunday, June 6, 2010
Some Success!
Got ScummVM on the PS2 building with dynamic modules enabled (plugins linking, too!) Now to start actually testing on the PS2.
Friday, June 4, 2010
A modicum of progress
Finally got the main engine linking without errors when dynamic modules are turned on for the PS2! Now to get everything else working... I think I'll be working this weekend :-)
Wednesday, June 2, 2010
link or swim
I've been having trouble getting the modified "plugin.ld" script to work when compiling the PS2 port with dynamic modules enabled. I'm going to spend a couple of hours now reading a hundred pages of GNU linker documentation. Having a more thorough understanding of the linker should help since I don't completely get what the default linker is doing :)
Subscribe to:
Posts (Atom)
