Even though the game does not need an operating system, it still requires bootcode.bin and start.elf.
The fixed point version of Bresenham's algorithm looks really nice on x86, but it uses integer division, so implementing it on an ARMv6 (no div instruction) would be quite painful.
Absolutely. I'm surprised that having to work around no 'div' is seen as painful compared to writing the rest of the game using 3D in assembly !
Learning on 6502/Z80 meant most everything was from first principles, and although I'd hate to regress so far today (head would hurt) it really was a great way to start.
Fully agree - children have amazing capacity to learn complex things. It's one reason why I'm nervous about code clubs using Scratch; the children can cope with more, so why limit them?
Wow that brings back memories of building games on a TRS-80 Model I in z80 assembly!
Good show, I've often felt low level was a dying art, perhaps I'm wrong and stuff like this will push people to learn what a register is and what "flags" are.. :-)
Very impressive. How things have changed - we did nothing quite so fun and practical in first year computing at Imperial back in 1995!
Plus, now I feel old :)
And here I am sitting here, with little x86 asm and z80 asm knowledge, reversing windows binaries and messing with Pokémon arbitrary code execution exploits. (optimizing my payloads for the 8F/"ws m" exploit is fun though!)
Been meaning to learn ARM asm for some time, but haven't got around to it.
I have added a more informative README and fixed a couple of issues that prevented the game from running. In case you need any more help, could we move this discussion to GitHub issues?
Thanks! It currently only works on Linux, so depending on your distro, you need to install the SDL package. If you're using Debian or Ubuntu (or derivatives), it will be sufficient to install the libsdl-dev and cmake packages using apt-get. Then create a build directory and use CMake to generate makefiles then build the emulator with make.
To set up the build environment, follow these instructions:
cd /dir/to/PiEmu/
mkdir build
cd build
cmake ..
make
These instructions are also on the README.md for PiEmu in-case anyone else is wondering how to get it building.
To add to this, the latest "official" Raspberry Pi toolchain is at https://github.com/raspberrypi/tools. You probably want the one without hf in the name.
serialvelocity - am I correct in assuming you're building for softfp?
I have to say, this assignment in general has been my favourite part of first year (my group extended our assembler to look enough like GNU as that we could assemble the output of GCC, so we could compile CSUD).
Nice work - love it (might play it at some point to see if I'm any good).
Looking at this project, I feel very very very dumb. I've been using computers for 2 decades and programming for 1 and I can't even imagine doing something like this!
Reading this comment made me very very sad. I've been programming computers for over 3 decades, and this is how we started off in my day. The "MyComputerification" of IT education during the 90's has a lot to answer for...
"Bare Metal" - does this mean the RPi can run blob-free?
A possible improvement I suggest is to gfx_draw_line in gfx.s - using a fixed-point algorithm could be simpler and faster: http://hbfs.wordpress.com/2009/07/28/faster-than-bresenhams-...