sd2snes
Publicmrehkopf/sd2snes
Loading…
Imported from GitHub: mrehkopf/sd2snes · commit 5ced134 · license GPL-2.0
Description
SD card based multi-purpose cartridge for the SNES
README
How to build:
a) Build requirements
- make
- libc6-devel (or other supplier of stdlib headers)
- Cortex M3 toolchain
- snescom/sneslink
- Xilinx FPGA synthesis tool (e.g. ISE WebPack)
- PIC assembler
b) Cortex M3 toolchain
- obtain the cm3-toolchain builder: git clone http://snowcat.de/toolchain-cm3.git/
- build the cm3-toolchain. As you are basically building gcc, some tools,
libraries, and headers are required, including but probably not limited to:
- libz-dev
- libcloog-ppl-dev
- texinfo
- libmpfr-dev
- libgmp3-dev
- libmpc-dev
- gawk
- bison
- recode
- flex
- libncurses5-dev
- libexpat-dev
- make
- gcc Package names may differ for your distribution. Newer gccs complain when compiling binutils, so you may have to add '--disable-werror' to the compiler options for binutils in the Makefile. The Makefile will install immediately so make sure you can write to the installation directory.
c) snescom/sneslink 1.7.4.1
d) ISE WebPack 14.7
e) PIC assembler
- e.g. GPUTILS, http://gputils.sourceforge.net/
f) general order of operations
-
program the PIC (cic/supercic/supercic-key.asm)
-
build and program the bootloader.
-
build the firmware and copy it to the memory card
-
build the snes menu and copy it to the memory card
-
build and compress the FPGA configuration and copy it to the memory card
-
insert memory card, power on; the bootloader should begin flashing the firmware and boot it
-
Programming the PIC Use a PIC assembler + programmer of your choice and program a PIC12F629 with cic/supercic/supercic-key.asm. Make sure that the clock source is set to EC_OSC and MCLRE is disabled. After programming you can solder the PIC to the board and short JP401. Open JP401 in case you need to reprogram the PIC on board.
-
Building & programming the bootloader The Makefile is prepared for JTAG programming using OpenOCD 0.4 and an FT2232 based USB-JTAG adapter. Connect a JTAG cable to J401 (14-pin header). The pinout is printed on the board. cd to src/bootldr and make && make program.
-
Building the firmware cd to src/utils and make. cd to src/ and make. You should obtain a firmware file called obj/firmware.img. Copy this file to /sd2snes/firmware.img.
-
Building the SNES menu A seperate README file for this exists in the snes/ directory
-
Building the FPGA configuration Compile the RLE compressor in utils/rle.c: $ gcc -Wall -o rle rle.c
Load verilog/sd2snes/sd2snes.xise in Xilinx ISE (or create your own project). Target is a XC3S400-4PQ208.
IP cores are distributed as source configuration files only. Prior to compiling for the first time you must select the FPGA part ("xc3s400-4pq208") in the Implementation view at the upper left-hand corner, then invoke "Regenerate All Cores" from the Design tab below. Under some circumstances this seems to fail, in which case you need to double-click each core in the hierarchy (the light bulb icons), then click "Generate" in the configuration dialog that comes up.
Afterwards select "main.v" and run "Generate Programming File" from the Design tab below. It is called "main.bit" and resides in the project's root. Compress it using utils/rle.c: $ rle main.bit fpga_base.bit
Copy fpga_base.bit to /sd2snes/fpga_base.bit
No comments yet. Be the first to ask about this board.