Godzil 9076d475cd Commit my latest changes 12 年之前
..
bootldr 9076d475cd Commit my latest changes 12 年之前
tests 485be7017a Remove error on warn until all warn are corrected 12 年之前
utils 9076d475cd Commit my latest changes 12 年之前
Makefile 9076d475cd Commit my latest changes 12 年之前
README 65e26cb0c3 basic build instructions 12 年之前
bits.h 4bc455f12b SD acceleration, display file size in menu (fw side) 13 年之前
ccsbcs.c 40248e61af mk2 fw wip 13 年之前
cfg.c 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] 12 年之前
cfg.h 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] 12 年之前
cfgware.h 91d8637dfe Firmware: embed updated sd2sneslite into firmware 12 年之前
cic.c 97aef4a2d3 Firmware: gather+display system information 12 年之前
cic.h 97aef4a2d3 Firmware: gather+display system information 12 年之前
cli.c 2c57eebadc Add function to test sram. (function is empty for now) 12 年之前
cli.h d4b7d9630b cic interface, cli for real this time... 13 年之前
clock.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu 13 年之前
clock.h 40248e61af mk2 fw wip 13 年之前
conf2h.awk 90432c32f0 Same as bootloader strftime is not compatible with non gnu awk 12 年之前
config 9076d475cd Commit my latest changes 12 年之前
config.h 76562649bd Correct baudrate on normal application. 12 年之前
crc.S 31d9e1a1d2 some sanity checks, early status messages 13 年之前
crc.h 40248e61af mk2 fw wip 13 年之前
crc16.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu 13 年之前
crc16.h bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu 13 年之前
crc32.c 46a42fe5ac mk2 fw: iap preparation, so96 mapper, reduce db size, delay with real sleep mode, cli 13 年之前
crc32.h 220b8c32a4 SaveRAM+directory CRC16 -> CRC32 13 年之前
diskio.h e2e628d6fb preliminary MSU-1 audio support 13 年之前
faulthandler.c fa28f6035e mk2 fw wip 13 年之前
ff.c b8f4c9b584 Firmware: optimize non-sector-aligned SD DMA reads (bugfix) 12 年之前
ff.h 3fda86125c firmware: speed up directory scanning 12 年之前
ffconf.h 39f1548dbd firmware: add feature to run previously loaded file 12 年之前
fileops.c 39f1548dbd firmware: add feature to run previously loaded file 12 年之前
fileops.h 39f1548dbd firmware: add feature to run previously loaded file 12 年之前
filetypes.c 4904dfe464 firmware: add some debug messages 12 年之前
filetypes.h 3fda86125c firmware: speed up directory scanning 12 年之前
flash.cfg d9abb0811e begin ARM firmware 13 年之前
flash.script c97278c3d6 Firmware: adjust to reduced bootloader size 12 年之前
fpga.c 9076d475cd Commit my latest changes 12 年之前
fpga.h 3bf7788693 Firmware: remove now unused mcu_ovr statements 12 年之前
fpga_spi.c b272a6fc1c Firmware: optimize non-sector-aligned SD DMA reads 12 年之前
fpga_spi.h afc26397b1 Firmware: region override (patch register $213f) 12 年之前
init.gdb 40248e61af mk2 fw wip 13 年之前
integer.h f063cb31f9 mk2 fw wip (cleanup indent+comment) 13 年之前
irq.c e99c5eb863 firmware: add missing irq.c 13 年之前
led.c 3ecf4954a0 firmware: add some FPGA sanity checks; fix led_panic behavior 12 年之前
led.h b7654290a1 LED PWM 13 年之前
lpc1754.cfg 40a2ae00fb Firmware/build: Be more OpenOCD 0.4.0 friendly 12 年之前
lpc1754.ld c97278c3d6 Firmware: adjust to reduced bootloader size 12 年之前
main.c 9076d475cd Commit my latest changes 12 年之前
memory.c 9076d475cd Commit my latest changes 12 年之前
memory.h 2c57eebadc Add function to test sram. (function is empty for now) 12 年之前
msu1.c da2386e453 Firmware/MSU1: stop DAC at end of audio file 12 年之前
msu1.h 1183718234 Firmware: ST0010 support + peripheral enable switches 13 年之前
openocd-usb.cfg 734567ff9b Update openocd interface to match my own interface 12 年之前
power.c 72b9444861 firmware: initial power management 13 年之前
power.h 72b9444861 firmware: initial power management 13 年之前
printf.c fa28f6035e mk2 fw wip 13 年之前
reset.cfg db45a5afaf mk2 fw wip 13 年之前
rle.c d7efa83e71 firmware: RLE 13 年之前
rle.h d7efa83e71 firmware: RLE 13 年之前
rtc.c bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu 13 年之前
rtc.h bfe9a91d07 firmware: adjustments for Mk.II Rev.C; enable timesetting from SNES menu 13 年之前
sdcard.h 83f3307680 mk2 fw wip 13 年之前
sdnative.c 424e1642ea firmware/SD: explicitly pull up SD clock line 12 年之前
sdnative.h d00b072e5f firmware: query reset button in timer ISR 12 年之前
smc.c 3436ccf46a Firmware: improve map detection 12 年之前
smc.h 3436ccf46a Firmware: improve map detection 12 年之前
snes.c 9076d475cd Commit my latest changes 12 年之前
snes.h 39f1548dbd firmware: add feature to run previously loaded file 12 年之前
snesboot.h 9eebd5cd73 Firmware: embed new SNES boot message code 12 年之前
sort.c 4bc455f12b SD acceleration, display file size in menu (fw side) 13 年之前
sort.h fa28f6035e mk2 fw wip 13 年之前
spi.c fcac85d19b Firmware: minor cleanups/comments 12 年之前
spi.h d0e349a145 Firmware/SPI: move status register bit constants to spi.h 12 年之前
startup.S d9abb0811e begin ARM firmware 13 年之前
sysinfo.c 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] 12 年之前
sysinfo.h 0f3138124e add missing files cfg.[ch] and sysinfo.[ch] 12 年之前
tests.h 747e04e010 firmware: add tests.h 13 年之前
timer.c d88fbb6124 firmware/timer: move constants to header files 12 年之前
timer.h d88fbb6124 firmware/timer: move constants to header files 12 年之前
uart.c e2e628d6fb preliminary MSU-1 audio support 13 年之前
uart.h 561477ec53 SD native write support (still needs error handling), DB creation update (display file sizes) 13 年之前
xmodem.c f6df5e1158 Firmware: remove magic number for XModem block size 12 年之前
xmodem.h f6df5e1158 Firmware: remove magic number for XModem block size 12 年之前

README

How to build:

a) Build requirements
* make
* 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. Some tools, libraries, and headers are required,
including but probably not limited to:
- libz-dev
- libcloog-ppl-dev
- texinfo
- libmpfr-dev
- libgmp3-dev
- gawk
- bison
- recode
- flex
- libncurses5-dev
- libexpat-dev
- make
- gcc
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
* http://bisqwit.iki.fi/source/snescom.html

d) ISE WebPack
* http://www.xilinx.com/products/design-tools/ise-design-suite/ise-webpack.htm

e) PIC assembler
* e.g. GPUTILS, http://gputils.sourceforge.net/

f) general order of operations
1) program the PIC (cic/supercic/supercic-key.asm)
2) build and program the bootloader.
3) build the firmware and copy it to the memory card
4) build the snes menu and copy it to the memory card
5) build and compress the FPGA configuration and copy it to the memory card
6) insert memory card, power on; the bootloader should begin flashing the
firmware and boot it

1) 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.

2) 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.

3) 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.

4) Building the SNES menu
snescom is required.
cd to snes/ and make.
Copy the resulting file menu.bin to /sd2snes/menu.bin.

5) 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.
Generate the programming file and compress it using utils/rle.c:
$ rle main.bit fpga_base.bit

Copy fpga_base.bit to /sd2snes/fpga_base.bit