Welcome! If you’re looking to create your own custom firmware for DMA cards, you’ve come to the right place. There’s a lot of misinformation and gatekeeping surrounding this topic, often because people sell firmware for hundreds of dollars. This guide aims to demystify the process and provide you with the tools and knowledge needed to create custom firmware and avoid anti-cheat detection.
Prerequisites
Before diving in, ensure you have the following tools and resources:
- Xilinx Vivado: The latest version (requires an AMD account) Download Vivado
- Visual Studio Community: Download Visual Studio
- Default Firmware Source Code: Found on ufrisk’s GitHub repo
- Xilinx PCIe Documentation: Read the documentation
Initial Customization
Step 1: Setting Up Your Environment
- Install Vivado and Visual Studio: Follow the standard installation process for both tools.
- Download the Firmware Source: Clone or download the firmware source code from the provided GitHub link.
Step 2: Customizing the Firmware
- Open the Firmware Project:
- Launch Visual Studio and open the
PCIeSquirrel
folder.
- Launch Visual Studio and open the
- Search and Modify Functions:
- Press
CTRL+F
to search for specific lines of code. - Locate
rw[20] <= 1;
in thepcileech_pcie_cfg_a7.sv
file. - Change lines 208 and 209 to:verilogCopy code
rw[20] <= 1; rw[21] <= 1;
- Modify the Device Serial Number (DSN) on line 215:verilogCopy code
rw[127:64] <= 64'h00000000xxxxxxxx; // +008: cfg_dsn
Changexxxxxxxx
to a unique identifier.
- Press
Generating the Project
Step 3: Building the Vivado Project
- Open the TCL Shell:
- Navigate to the project folder using
cd
.bashCopy codecd C:/Users/XXXX/Desktop/PCIeSquirrel
- Generate the Vivado project:bashCopy code
source vivado_generate_project.tcl -notrace
- Navigate to the project folder using
- Open the Project in Vivado:
- Double-click the
pcileech_squirrel.xpr
file to open it in Vivado.
- Double-click the
Customizing Within Vivado
Step 4: Modifying PCIe Parameters
- Navigate to the IP Core:
- In the project manager, open the file tree to
pcileech_squirrel_top\i_pcileech_pci_a7
. - Double-click
i_pcie_7x_0
to customize the IP.
- In the project manager, open the file tree to
- Update Device IDs:
- In the IDs tab, modify the following parameters to match your desired device:
- Vendor ID:
10EB
- Device ID:
3029
- Revision ID:
09
- Subsystem Vendor ID:
10EB
- Subsystem ID:
0008
- Vendor ID:
- Adjust class codes if mimicking a different device type.
- In the IDs tab, modify the following parameters to match your desired device:
- Lock the IP Core:
- In the TCL Console, lock the core:tclCopy code
set_property is_managed false [get_files pcie_7x_0.xci]
- In the TCL Console, lock the core:tclCopy code
Advanced Customization
Step 5: Changing BAR Address and MSI/PCI Pointers
- Modify BAR Address:
- Search for
bar_0
in Visual Studio:jsonCopy code"bar_0": [ { "value": "FFFFF000", "resolve_type": "generated", "usage": "all" } ],
- Change the address to mimic a physical device.
- Search for
- Update MSI/PCI Pointers:
- Run synthesis in Vivado to generate strings.
- In Visual Studio, search and modify MSI/PCI pointers.
Final Steps
Step 6: Building the Firmware
- Generate Bitstream:
- In Vivado, select
Generate Bitstream
. - Once complete, locate the firmware file:
pcileech_squirrel_top.bin
.
- In Vivado, select
Flashing the Firmware
Step 7: Flashing the DMA Card
- Prepare for Flashing:
- Ensure the DMA card is connected to the JTAG port.
- Use OpenOCD for Flashing:
- Open the command prompt and navigate to the
flash_screamer
folder.bashCopy codecd Desktop/flash_screamer
- Flash the firmware:bashCopy code
..\openocd\bin\openocd.exe -f flash_screamer_squirrel.cfg
- Open the command prompt and navigate to the
- Verify Successful Flashing:
- Confirm the firmware has been flashed by checking for the
Found flash device
message.
- Confirm the firmware has been flashed by checking for the
Frequently Asked Questions
- Which DMA card should I get? For budget-friendly options, choose 35T. For faster and newer cards, go for 75T.
- What firmware do I need for my DMA card? 35T uses Squirrel, and 75T uses EnigmaX1.
- Can I flash the same firmware on a new card? Yes, as long as the prototype chip is the same.
- What are the minimum specs for my second computer? USB 3.0 and at least 6GB RAM.
- How do I flash my firmware? Use OpenOCD or the relevant tool for your specific DMA card model.
Congratulations on completing the custom firmware for your DMA card! Remember, this guide is for educational purposes, you are responsible for anything that happens to your card or computer.
Credit to garagedweller at UnknownCheats for the original guide.