File size: 3,033 Bytes
d51d09c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | # Chromatic FPGA
This repository houses the ModRetro Chromatic's FPGA design files.
For more information about the ModRetro Chromatic, please see visit [ModRetro.com](https://modretro.com/).
## Setup
### Repository
This project builds upon the open source work provided by the Game Boy `MiSTer` project. When checking out this repository, make sure to run the following command as this repository submodules the Game Boy `MiSTer` project.
```bash
git submodule update --init --recursive
```
### Gowin Development Environment
**The Gowin FPGA Designer v1.9.9.03 must be used.** Using Gowin IDE v1.9.10.X or newer is currently not supported by this build.
You will also need to apply for a local license with Gowin through their website:
https://www.gowinsemi.com/en/support/license
The license expires after one year and will require reactivation.
You will receive an email within a few minutes with a `.lic` file attached. Run the Gowin IDE and install the license when it prompts you. You'll need to close and re-open the GOWIN IDE if everything was successful.
## Building
Once in the IDE, load `evt1_x2.gprj` project and click on the green recycle-like button icon to run synthesis and PnR. This will take about 5-10 minutes to complete.
## Flashing
Flashing can be performed using the official [Gowin Programmer](https://www.gowinsemi.com/en/) software or the [`openFPGALoader`](https://github.com/trabucayre/openFPGALoader) utility through the Chromatic's USB interface. The Gowin Programmer requires the installation of the GWU2X device driver.
Note:
1. The Chromatic must be powered on for either tool to detect the FPGA. This means the power switch is in the **ON** position.
2. If using `openFPGALoader`, the tool must be compiled with support for the Gowin GWU2X cable.
### Example Using `openFPGALoader`
**Detect the Chromatic FPGA While Powered On**
```bash
openFPGALoader --detect --cable gwu2x
```
You will see an output similar to:
```
empty
User requested: 6000000 real frequency is 6000000
index 0:
idcode 0x1281b
manufacturer Gowin
family GW5A
model GW5A-25
irlength 8
```
**Flashing the Chromatic**
```bash
openFPGALoader --write-flash --cable gwu2x --reset <file>
```
Here, `<file>` refers to the generated bitstream file. This file can be found at `esp32t/impl/pnr/evt1_x2.fs`.
## Custom Modifications
When modifying the RTL design, please also update the 14-bit FPGA version within [esp32t/src/rtl/BSP/system_monitor.sv] around line 384 (see `version`).
This will ensure you can always using the [ModRetro Update Tool](https://modretro.com/pages/downloads#mrupdater) to restore your Chromatic to the latest official release.
## Issues
Please submit all issues and bug reports through our [Contact Form](https://modretro.com/pages/contact).
## Attributions
- [GOWIN Semiconductor](https://www.gowinsemi.com/en/)
- [MiSTer](https://github.com/MiSTer-devel/Gameboy_MiSTer)
## Special Thanks
- [rayjt9] For their palette improvements to the BootROM.
|