Monobolag is a monopoly inspired clone running on a microcoded CPU+VGA Processor implemented in VHDL with custom assembly language and assembler. The project runs on a Nexys3 FPGA development board with a 640x480 VGA screen and requires a hexadecimal numpad peripheral device. Programming is done via UART cable with a assembled bin file using the custom assembler. This project was made as a part of the project course TSEA83 Computer Hardware and Architecture at Linköpings University. This integrated computer is not perfect. There are timing issues with memory access, no pipeline massively reducing speed and no interrupt support. Although these limitation where made to meet deadlines and the software was designed with this in mind.
The assembler works for most instructions but supports only 1 file at the moment and a "data" json file. There are minor bugs in the assemlber relating to labels containing other labels as substrings.
To start the game, the Nexys3 card must first be programmed. Run make monobolag.prog`` and if necessary, generate the bitgen file with
make monobolag.bitgen`` in the same folder then run the previous command.
To program the design with the monobolag program, navigate to the src folder in the assembler branch. From here run program.py
with a .bin
file as the first argument which has been generated by the monoler.py
assembler. There is a ready-made monobolag.bin``` or else monobolag is compiled with
monoler.py which takes a ``.asm
file and associated ``.json data file. To restart the game, the computer is reprogrammed with ````program.py
.
Example of how to compile and program in Linux.
python3 monoler.py monobolag/monobolag.src monobolag/monobolag.json
sudo python3 program.py output.bin
Example of how to program directly with a ready-made monobolag file.
sudo python3 program.py monobolag.bin
The VHDL code is constructed after these block diagrams describing the processor.
This is an overview of the processor construction.
CPU construction which gets programmed from the UART, sends data to VRAM, reads input from hex numpad.
Controls the CPU if there is a program signal sent over UART from a external device (like a laptop)
Overview of the VGA motor diagram which reads pixel data from sprites ROM and VRAM.
Subdiagram of pixel chooser PIX which interleaves pixel data from sprite ROM and VRAM.
Subdiagram of sprite ROM where monobolag game sprites are saved.