Godzil 0ea53495b0 Merge branch 'develop' into merging пре 10 година
..
bootldr 0ea53495b0 Merge branch 'develop' into merging пре 10 година
tests 0ea53495b0 Merge branch 'develop' into merging пре 10 година
utils 1d928e7091 Merge branch 'udev' into develop пре 10 година
Makefile 1d928e7091 Merge branch 'udev' into develop пре 10 година
README 3f2e4e37db menu: rename menu.a65 to filesel.a65; add required library to README пре 10 година
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 година
cic.c 97aef4a2d3 Firmware: gather+display system information пре 12 година
cic.h 97aef4a2d3 Firmware: gather+display system information пре 12 година
cli.c 1d928e7091 Merge branch 'udev' into develop пре 10 година
cli.h d4b7d9630b cic interface, cli for real this time... пре 13 година
clock.c 28949ac307 Firmware: preparations for USB пре 10 година
clock.h 28949ac307 Firmware: preparations for USB пре 10 година
conf2h.awk e121b34cf4 Initial Commit пре 15 година
config 443f7b138c Firmware: update version number to 0.1.5 пре 11 година
config.h 28949ac307 Firmware: preparations for USB пре 10 година
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 2eeaaefcef Firmware/SD: implement FatFs CTRL_SYNC ioctl (issue #4) пре 12 година
faulthandler.c fa28f6035e mk2 fw wip пре 13 година
ff.c f4b8d57810 Firmware/FatFs: make f_gets break on NUL character as well пре 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 0ea53495b0 Merge branch 'develop' into merging пре 10 година
filetypes.h 11bf7ffd5b firmware: case-insensitive system directory hiding пре 12 година
flash.cfg d9abb0811e begin ARM firmware пре 13 година
flash.script c97278c3d6 Firmware: adjust to reduced bootloader size пре 12 година
fpga.c f7d393451a Firmware: timeouts for FPGA configuration; LED flash codes for various FPGA related errors пре 10 година
fpga.h 3bf7788693 Firmware: remove now unused mcu_ovr statements пре 12 година
fpga_spi.c 0ea53495b0 Merge branch 'develop' into merging пре 10 година
fpga_spi.h c204aa9a0b Firmware/FPGA: replace magic numbers with constants пре 11 година
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 f7d393451a Firmware: timeouts for FPGA configuration; LED flash codes for various FPGA related errors пре 10 година
led.h f7d393451a Firmware: timeouts for FPGA configuration; LED flash codes for various FPGA related errors пре 10 година
lpc1754.cfg c380ce9503 Adjust OpenOCD configuration for more recent versions пре 10 година
lpc1754.ld c97278c3d6 Firmware: adjust to reduced bootloader size пре 12 година
main.c 0ea53495b0 Merge branch 'develop' into merging пре 10 година
memory.c 0ea53495b0 Merge branch 'develop' into merging пре 10 година
memory.h 0ea53495b0 Merge branch 'develop' into merging пре 10 година
msu1.c 1d928e7091 Merge branch 'udev' into develop пре 10 година
msu1.h 1183718234 Firmware: ST0010 support + peripheral enable switches пре 13 година
openocd-usb.cfg c4ef438cac Update openocd interface to match my own interface пре 11 година
power.c 28949ac307 Firmware: preparations for USB пре 10 година
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 година
sdnative.c 1d928e7091 Merge branch 'udev' into develop пре 10 година
sdnative.h 2eeaaefcef Firmware/SD: implement FatFs CTRL_SYNC ioctl (issue #4) пре 12 година
smc.c 0ea53495b0 Merge branch 'develop' into merging пре 10 година
smc.h c8b24a9618 Firmware: fix loading of partial-size BS dumps пре 10 година
snes.c 1d928e7091 Merge branch 'udev' into develop пре 10 година
snes.h 023901cab2 Firmware: refactor SNES reset pulse пре 12 година
snesboot.h 9eebd5cd73 Firmware: embed new SNES boot message code пре 12 година
sort.c 5939b6e581 Firmware: sort by entire filename, not just first 20 characters пре 11 година
sort.h fa28f6035e mk2 fw wip пре 13 година
spi.c d9e1680800 Firmware: remove SPI speed switching пре 12 година
spi.h d9e1680800 Firmware: remove SPI speed switching пре 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 b67e2a5c77 Firmware: clean up clock/timer init пре 11 година
timer.h d88fbb6124 firmware/timer: move constants to header files пре 12 година
uart.c 1d928e7091 Merge branch 'udev' into develop пре 10 година
uart.h 1d928e7091 Merge branch 'udev' into develop пре 10 година
xmodem.c 1d928e7091 Merge branch 'udev' into develop пре 10 година
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
- 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
* 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