A remake of Konami's Dance Dance Revolution, written entirely in assembly for an 8-bit PIC16F1789 microcontroller. The PIC generates the PAL video signal for a TV and synthesizes the music itself, with no dedicated video or sound chip.
IMG_4071.mov
- 104×144 pixel display (up to 416×576 with enough RAM)
- Main menu with a persistent high score
- 1 map with its own song
- Heart system: game over after 3 missed arrows
- New songs are easy to add in
music.s, for the menu or for new maps
📄 For the full details, see
report.pdfand theelectrical_schematic.pdf.
The PIC bit-bangs a composite video signal that follows the PAL-G standard. Pixels go out at 1 pixel every 4 instruction cycles:
- A full byte (8 pixels) is loaded into the PORTC latch every 8 pixels.
- For each pixel, the latch is shifted left and written back.
Only the MSB of PORTC is wired to the video output.
Good intro to PAL generation on a PIC: Rickard Gunee's page.
Music is generated from scratch with one of the PIC's PSMC modules. See music.s / music.inc for details.
Menu at startup · Menu after a new high score · In-game with score and hearts
Requirements: MPLAB X IDE with the pic-as assembler (user guide), a PICkit programmer and a PIC16F1789.
git clone git@github.com:shormat/pic-dance.git
cd pic-dance/code
make # build
make flash # flash through the PICkitNew to PIC assembly? Start with this exercise sheet.
code/ Assembly sources (main, video, draw, music, inputs, game logic) + Makefile
documentation/ Datasheets (PIC, TV, MOSFET, LED, speaker, PAL standard…)
illustrations/ Screenshots
core_dumped/ Debugging captures (compilation, game logic crashes & fixes)
report.pdf Full project report
electrical_schematic.pdf
- Faster pixel output: up to 1 pixel per instruction cycle, if there is enough RAM.
- Use all of PORTC: only 1 of its 8 pins drives the video right now, so the other 7 are wasted.
- Cheaper music updates: the music routine checks for an update every frame, even though the current song only needs one every 5 frames.
Project for the INFO2055 (Embedded Systems) course taught by Prof. Boigelot at ULiège. Final grade: 20/20.
- Saïd Hormat-Allah
- Simon Gardier
- Camille Trinh
- Arthur Graillet
⚠️ Copying any part of this code, even partially, for the INFO2055/APRI0007 course is not allowed.


