Hackaday | Belgrade is completely sold old. If you don't have a ticket, you can't get your hands on this awesome badge. But you can still win some stuff for hacking it!
This Belgrade Badge Demoscene contest challenges you to write the best firmware you can and we'll demo your work at the conference.
Here's How to Enter:
- Start a project page for your entry
- Use the file hosting feature to upload your code (either .C and .H files, or a precompiled .hex file)
- Use the dropdown box on your project page to submit it to the Belgrade Badge Demoscene contest.
How Do I Write Code without Having a Badge?
There is a software emulator already set up for that. Check out this repo from GitHub:
It uses the SDL2 library to show the hardware badge's LED matrix, and to react to button presses. Write your own code in the bh-badge-animate.c (and .h) files, test them using the software emulator, then iterate until you have something you want to show off.
Demoscene at Conference and Prizes
The day of the conferece we'll be showing off badge hacks done by conference attendees. During this presentation, we'll have "badge surrogates" download your code onto their badge and present it at the conference.
Judging will be at the sole discretion of the Hackaday Staff on hand for the conference. We will pick several top winners and send them a copy of the Hackaday Omnibus.
Demoscene is awesome, and we can't wait to recap all of the submission on the front page. You only have a couple of weeks to pull this together. Better get started right away!
I'm working on putting together a sample project page as an entry (check back soon for that) and already have the code for this finished. You can check that out in my own demo repo. Just remember, submitting the code is the minimum you have to do, but it's wise to describe what you have accomplished so that your badge surrogate can do the best job of showing it off at the conference.
I'm Way Too Hardcore to Use Your Emulator
Don't want to do the hand-holding that goes along with the C framework? Great! Clone the official firmware and see what you can do. Fair warning -- this code is not yet bug free. We'll be working on it right down to the day of the conference so don't forget pull changes back into your code base once in a while.
Those attending the conference, or who just want closer access to the hardware but still want to write in C should check out the MPLABX Framework. This is specifically designed to work with the new bootloader/kernel hybrid which Voja Antonic has implemented.
Advance info about bootloader/kernel compliance (thar be dragons here):
This is only for very advanced users (and geeks who are curious). Ignore this if you don't fall into those categories as this is all taken care of by the software emulator, or if you choose to use it, the MPLABX framework.
Voja's work is quite interesting. It handles all of the low-level hardware issues, like display scanning, button debounce, sleep more, and tx/rx using the IR communcations on the badge. The MPLABX Framework above takes care of all the connections needed to work with the bootloader. Here's a synopsis of that:
- Compiled code should have a code offset of 0x180C and prohibit use of ROM ranges 0x0000-0x180B
- Memory should be mapped to match the bootloader (find that information in this header file)
- Interrupt Vectors:
- The booloader handles interrupts and redirects high and low priority to 0x1800 and 0x1806 respectively
- Your code must catch those calls at those address and ultimately redirect them to 0x1008
- In this way you can add your own hardware interrupts and service them. All of this is demonstrated in the main C file of the MPLABX framework.