
This is a multiplayer reaction time game with VGA display output (640×480 @ 60 Hz). The design supports two game modes and one or two players.
mode_game = 0): Any button press after the stimulus appears counts as a valid response.mode_game = 1): Only the button corresponding to the highlighted quadrant is correct. The target quadrant is selected randomly using a 16-bit LFSR.mode_player = 0): Single round; result is displayed immediately after the button press.mode_player = 1): P1 plays first, then P2 plays the same type of round. After both finish, the winner is determined by comparing reaction times (with validity — a wrong button in Target Match counts as a loss).The game controller is an 8-state FSM:
The 25 MHz clock is prescaled to a 1 ms tick by a 25,000-cycle counter in core_timer. The reaction counter increments on each tick while in STIMULUS state, saturating at 9,999 ms. The random delay counter loads lfsr[11:0] + 1000 on game start and decrements each ms.
The screen is divided into regions using 32×32 pixel tiles:
rst_n = 0 for several cycles to reset, then release (rst_n = 1).For 2-player mode: after P1's result screen, press Start to hand off to P2. After P2 reacts, the winner is displayed.
To test false start: press any reaction button before the stimulus appears. The screen turns red with "EARLY".
| Pin | Signal | Description |
|---|---|---|
ui_in[1] |
button_0 |
Reaction button 0 (TOP quadrant) |
ui_in[2] |
button_1 |
Reaction button 1 (LEFT quadrant) |
ui_in[3] |
button_2 |
Reaction button 2 (CENTER quadrant) |
ui_in[4] |
button_3 |
Reaction button 3 (RIGHT quadrant) |
ui_in[5] |
start |
Start / advance button |
ui_in[6] |
mode_game |
0 = Classic, 1 = Target Match |
ui_in[7] |
mode_player |
0 = 1-Player, 1 = 2-Player |
uo_out[1:0] |
vga_r[1:0] |
VGA red channel (2-bit) |
uo_out[3:2] |
vga_g[1:0] |
VGA green channel (2-bit) |
uo_out[5:4] |
vga_b[1:0] |
VGA blue channel (2-bit) |
uo_out[6] |
vga_hsync |
VGA horizontal sync |
uo_out[7] |
vga_vsync |
VGA vertical sync |
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | vga_r[1] | ||
| 1 | button_0 | vga_g[1] | |
| 2 | button_1 | vga_b[1] | |
| 3 | button_2 | vga_vsync | |
| 4 | button_3 | vga_r[0] | |
| 5 | start | vga_g[0] | |
| 6 | mode_game | vga_b[0] | |
| 7 | mode_player | vga_hsync |