Project for computer organization and design course, implementing a simple popular game flappy bird in FPGA. It takes me one week to learn about bus, VRAM and write program and I've learned a lot.
The system is logically divided into two parts: hardware (three base parts of computer: IO, CPU, memory) and software (assemble game flappy bird based on MIPS).
The hardware environment is built step by step during 13 exps. However, in order to meet interaction needs of this game, some extra modules and functions have been added.
Simply speaking, there are five major modules: input, output, control, data path and memory.
Input: enable to input data through keyboard, buttons, switches Keyboard is based on PS/2.
Output: enable to output info into 7-segs, monitor, LEDs
Monitor is 640x480.
Control & Data Path: decode and implement instructions
Instructions have been implemented by now are listed below: add, sub, or, xor, nor, and, slt, addi, ori, xori, nori, lw, sw, beq, bne, slti, j, jal, jr, jalr, lui, sll
Memory: store assemble program, pictures, or be used as VRAM.
Based on supported instructions above, an assemble program is written to run flappy bird.
You can directly use project file in folder ISEproject
or build new project with folder modules
and coe
.
In modules
are all hardware modules. Most of them are in Verilog HDL and you can modify them free, while some are hard cores involved in IO function.
In coe
are initlization file for RAM. Some pictures can be find at folder picture
and original assemble program is flappybird_final.asm
. If you already have built a hardware project, you can write you own application like tank war or whatever else by easily changing coes.
Only support single player. Player can manipulate bird by switches or keyboard. Score is displayed in 7-segs.
There is a splash screen problem when playing since I write all four pillars and then erase pixels to process openings. I haven't change the algorithm because otherwise it will be much more complex and believe current process method is enough.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。