ObjFW on the Wii
Created: 27.04.2013 00:14 UTC
It's been quite a while since I last blogged something that's not a release announcement, so I decided that I'm going to use this blog in the future to give a report on the status of my projects. Today, I am going to show some progress I made on ObjFW in the past few days.
Recently, I got a Wii for 50€ from eBay. It was sold as being broken, though it
really wasn't (the DVD drive was said to not accept any discs, however, simply
using a small screw driver to push it in worked. After that, even ejecting it
and inserting a DVD the normal way worked). So it was only a matter of time
until I ported ObjFW to it. At first, I was stuck with weird crashes, which
turned out to be a typo in OFSystemInfo
and resulted in it always
returning 0 as page size. Of course, in a lot of places, the page size is used
to allocate a buffer, and naturally, this would fail. But still, it was hard to
find out that this was causing the crashes, so it took me some time. After
that, the rest was easy. I added a lot of new checks to configure in order to
have it easier to port ObjFW in the future (there were a lot of places were it
was assumed that it's a POSIX system if it's not Win32
- this is no longer the case now) which are already in Git. I even have code
here that sets up a console and waits for some input after all tests have
been run (otherwise, it would return to the Homebrew Channel without having a
chance to read anyting) and it also pauses the output until a button is pressed
if a test failed, so that those aren't missed. However, this code is not in Git
yet, because I still need to implement file system access and tests requiring
files are just disabled for now. After that, I will commit it and implement
threads and sockets (so for now, --disable-threads
and
--disable-sockets
are required).
Anyway, a picture is worth a thousand words, so here's one of my Wii having
successfully ran all ObjFW tests (except files, sockets and threads, of course
- but I'm confident those will follow in the next few days):
Edit: The Wii port is now committed. However, threads and sockets are not implemented yet, but files are.