
Rana Dorada Run is an endless-runner game rendered directly to a VGA monitor (640x480 @ 60 Hz, 25.175 MHz pixel clock) through the TinyVGA PMOD. The player is a Panamanian golden frog (rana dorada) that runs through the jungle and must jump over logs, bamboo stalks and crabs, while staying on the ground when a toucan flies by at head height. All characters and graphics are original.
The design has no frame buffer. Every pixel is computed on the fly by comparing the beam position (pix_x, pix_y) from the sync generator with the position of each object. The frog and the obstacles are small 2-colour sprites stored as combinational ROMs and scaled 2x; the bamboo, the parallax hills, the scrolling ground, the night stars and the 7-segment-style score digits are generated procedurally.
The game state is updated once per frame by a single-cycle enable pulse in the clk domain (no derived clocks). The frog follows a simple ballistic model: an initial upward velocity and a gravity of 1 px/frame², doubled when the button is released early, so a long press gives a high jump and a short tap a low one. Two obstacle slots scroll to the left and are respawned off-screen with a type and an extra distance taken from an 8-bit LFSR, always keeping a minimum gap so that every situation can be cleared. Collisions are pixel-exact: a flag is set whenever a frog pixel and an obstacle pixel are drawn at the same time during the scan, and it is evaluated at the end of the frame.
The score is a 3-digit BCD counter shown in the top-right corner. Every 100 points the scrolling speed increases (from 4 to 7 px/frame) and the time of day changes from day to afternoon, sunset and finally night with stars. Toucans only start appearing after 100 points.
The controls are read from a Gamepad PMOD through the official gamepad_pmod driver (serial latch/clock/data on ui[4:6]), or from a single push button on ui[0]; both are synchronized to the system clock.
uo[7:0]) and a VGA monitor that accepts 640x480 @ 60 Hz.ui[7:0]), orui[0] (with a pull-down resistor), or simply DIP switch 1 on the demo board (works, but is less comfortable).tt_um_malex1269_rana_dorada and click SELECT.The same setup from the MicroPython REPL:
from ttboard.mode import RPMode
tt.shuttle.tt_um_malex1269_rana_dorada.enable()
tt.mode = RPMode.ASIC_MANUAL_INPUTS
tt.clock_project_PWM(25_175_000)
| Action | Gamepad PMOD | Push button / DIP 1 |
|---|---|---|
| Start / restart | Up, A or B | press ui[0] |
| Jump | Up, A or B | press ui[0] |
| High jump | hold the button | hold ui[0] high |
| Low jump | tap the button | short pulse on ui[0] |
The design runs in the Tiny Tapeout VGA Playground (https://vga-playground.com/?preset=gamepad): replace the contents of project.v with src/project.v from this repository (keeping gamepad_pmod.v and hvsync_generator.v), enable gamepad mode with the controller icon next to the ui_in buttons, click on the game screen and use the Up arrow or the a / b keys. Shift+R resets the design. The Playground runs slower than real time, so the game looks slower than on the chip.
ui[0].| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Jump button | R1 | |
| 1 | G1 | ||
| 2 | B1 | ||
| 3 | VSync | ||
| 4 | Gamepad PMOD latch | R0 | |
| 5 | Gamepad PMOD clock | G0 | |
| 6 | Gamepad PMOD data | B0 | |
| 7 | HSync |