macca
Posts: 149
Joined: Tue Oct 16, 2012 9:14 am

Abbaye des Morts game and libraries ported to baremetal

Sat Oct 11, 2014 8:16 am

Hi,

Over the past weeks I worked on porting this game to baremetal, and now I have released a first version based on the original source code made by David "Nevat" Lara for GNU/Linux. For those who don't know, Abbaye des Morts is a freeware platform game made by LocoMalito (with the help of Gryzor87 in music side) in 2010.

The source code repository is hosted on Github:
https://github.com/maccasoft/raspberry-pi

Go to the release tab to download a precompiled binary ready to be copied to an SD card.

The compiled file is completely self contained, it uses the original graphics and sound files linked directly to the binary executable (no filesystem support). It uses the keyboard and csud USB library for input, analog-only (PWM) audio output.

The repository also contains working ports of the libraries required to compile the source code almost unchanged:

libpng - PNG image file format library
libogg - OGG file format library
libvorbis - OGG Vorbis audio decode library
SDL2 - Simple Directmedia Library
SDL2_image - Image decoding support library for SDL2
SDL2_mixer - Audio mixer support library for SDL2
zlib - Z compression library
csud - Chadder's Simple USB Driver

The libraries are integral ports of the original source code, just recompiled. SDL has most of the features disabled, only video, audio and events can be used reliably. It uses software-only rendering directly to the framebuffer with doublebuffer and vertical sync support, and uses csud to provide keyboard events.

Any help or suggestions to enhance and improve the performances and features of these libraries is very welcome.

I wish to thank all those in this forum provided informations and code to work with the baremetal hardware resources (boot code, framebuffer, pwm audio, etc.), the core kernel code is derived from various sources found on this forum. Thank you all.

Hope you enjoy.

Marco.

User avatar
ulysess
Posts: 310
Joined: Thu Aug 02, 2012 6:35 am
Location: Spain
Contact: Website

Re: Abbaye des Morts game and libraries ported to baremetal

Fri Oct 31, 2014 8:02 am

I love this game!

I've got a tutorial to compile it on Raspberry Pi (SDL1) here: http://misapuntesde.com/post.php?id=162

Your version is awesome, but only respond to one key press. After that, the keyboard doesn't work. Any idea?

Thks in advance.

PS: Do you have any idea about Allegro? I'd like you try to compile a great game called Captain 'S', if you wish: http://computeremuzone.com/ficha.php?id=754&l=en

:D
  • PiKISS for Raspberry Pi: https://github.com/jmcerrejon/PiKISS
  • Blog: https://misapuntesde.com/
  • Patreon: https://www.patreon.com/cerrejon?fan_landing=true
  • Twitter: https://twitter.com/ulysess10
  • Discord: https://discord.gg/Y7WFeC5

macca
Posts: 149
Joined: Tue Oct 16, 2012 9:14 am

Re: Abbaye des Morts game and libraries ported to baremetal

Fri Oct 31, 2014 10:36 am

ulysess wrote: Your version is awesome, but only respond to one key press. After that, the keyboard doesn't work. Any idea?
Could be an issue with CSUD (the USB driver), it is known that not all keyboards are working correctly with it. I'm using a Logitech K120 keyboard and it is working, another keyboard (a wireless combo keyboard-usb) is not working at all. I'm looking to replace the driver.

If you have a NES game controller, you can try to hook it up as explained by petRockBlog here http://blog.petrockblock.com/2012/10/21 ... o-adapter/ it should work.
ulysess wrote: PS: Do you have any idea about Allegro? I'd like you try to compile a great game called Captain 'S', if you wish: http://computeremuzone.com/ficha.php?id=754&l=en
Yes, I came across Allegro in my reseraches, looked a bit into it but haven't tried to compile for baremetal, yet.

macca
Posts: 149
Joined: Tue Oct 16, 2012 9:14 am

Re: Abbaye des Morts game and libraries ported to baremetal

Wed Nov 12, 2014 9:36 am

ulysess wrote:Your version is awesome, but only respond to one key press. After that, the keyboard doesn't work. Any idea?
The project is now using the new USPi USB library that should have a better compatibility with keyboards. Both my keyboards, the Logitech and the wireless combo are working well now.

Check it out:
https://github.com/maccasoft/raspberry- ... e_20141112

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Abbaye des Morts game and libraries ported to baremetal

Wed Nov 12, 2014 3:47 pm

I had no idea the bare metal stuff had come this far. looks like a fun game, too.
note: I may or may not know what I'm talking about...

Return to “Bare metal, Assembly language”