From 02e9bfb75615d44e45e40a58a718fe8e5b585dd7 Mon Sep 17 00:00:00 2001 From: Maximilian Rehkopf Date: Tue, 26 Jan 2010 23:52:18 +0100 Subject: [PATCH] copyright headers for AVR firmware --- src/Makefile | 2 +- src/avrcompat.h | 6 ++++++ src/config | 5 +++++ src/config.h | 8 +++++++- src/diskio.c | 5 +++++ src/diskio.h | 5 +++++ src/eeprom.c | 5 +++++ src/eeprom.h | 5 +++++ src/fileops.c | 27 +++++++++++++++++++++++++-- src/fileops.h | 27 +++++++++++++++++++++++++-- src/filetypes.c | 26 +++++++++++++++++++++++++- src/filetypes.h | 35 +++++++++++++++++++++++++++++------ src/fpga.c | 28 +++++++++++++++++++++++++--- src/fpga.h | 26 ++++++++++++++++++++++++-- src/fpga_spi.c | 48 ++++++++++++++++++++++++++++++++++++------------ src/fpga_spi.h | 26 +++++++++++++++++++++++++- src/led.c | 16 ++++++++-------- src/led.h | 16 ++++++++-------- src/main.c | 22 +++++++++++----------- src/memory.c | 27 +++++++++++++++++++++++++-- src/memory.h | 27 +++++++++++++++++++++++++-- src/smc.c | 27 +++++++++++++++++++++++++-- src/smc.h | 28 ++++++++++++++++++++++++---- src/snes.c | 26 ++++++++++++++++++++++++-- src/snes.h | 26 ++++++++++++++++++++++++-- src/spi.c | 5 +++++ src/spi.h | 5 +++++ src/timer.c | 5 +++++ src/timer.h | 5 +++++ src/uart.c | 5 +++++ src/uart.h | 5 +++++ src/ustring.h | 5 +++++ src/utils.c | 5 +++++ src/utils.h | 5 +++++ 34 files changed, 472 insertions(+), 72 deletions(-) diff --git a/src/Makefile b/src/Makefile index 5d80539..1aa2435 100644 --- a/src/Makefile +++ b/src/Makefile @@ -101,7 +101,7 @@ FORMAT = ihex TARGET = $(OBJDIR)/sd2snes # List C source files here. (C dependencies are automatically generated.) -SRC = main.c ff.c utils.c timer.c led.c diskio.c sdcard.c spi.c crc7.c snes.c fpga.c memory.c crc16.c fileops.c fpga_spi.c smc.c filetypes.c +SRC = main.c ff.c utils.c led.c diskio.c sdcard.c spi.c crc7.c snes.c fpga.c memory.c crc16.c fileops.c fpga_spi.c smc.c filetypes.c ifeq ($(CONFIG_UART_DEBUG),y) SRC += uart.c diff --git a/src/avrcompat.h b/src/avrcompat.h index 814182d..839a6c1 100644 --- a/src/avrcompat.h +++ b/src/avrcompat.h @@ -1,3 +1,9 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + + This file was adapted from sd2iec, written by Ingo Korb, original + disclaimer follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/config b/src/config index 3db936b..09978ac 100644 --- a/src/config +++ b/src/config @@ -1,4 +1,9 @@ # This may not look like it, but it's a -*- makefile -*- +# sd2snes - SD card based universal cartridge for the SNES +# Copyright (C) 2009-2010 Maximilian Rehkopf +# +# This file was adapted from sd2iec, written by Ingo Korb. +# Original disclaimer follows: # # sd2iec - SD/MMC to Commodore serial bus interface/controller # Copyright (C) 2007-2009 Ingo Korb diff --git a/src/config.h b/src/config.h index 29f8e53..99d0f41 100644 --- a/src/config.h +++ b/src/config.h @@ -1,4 +1,10 @@ -/* sd2iec - SD/MMC to Commodore serial bus interface/controller +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ +/* + sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb Inspiration and low-level SD/MMC access based on code from MMC2IEC diff --git a/src/diskio.c b/src/diskio.c index b539516..091508c 100644 --- a/src/diskio.c +++ b/src/diskio.c @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/diskio.h b/src/diskio.h index e2e8f2b..770c3b4 100644 --- a/src/diskio.h +++ b/src/diskio.h @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/eeprom.c b/src/eeprom.c index 1ddfbef..ff5a8a1 100644 --- a/src/eeprom.c +++ b/src/eeprom.c @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/eeprom.h b/src/eeprom.h index 127baca..657e2f4 100644 --- a/src/eeprom.h +++ b/src/eeprom.h @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/fileops.c b/src/fileops.c index d0eb8b7..75d8e03 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -1,5 +1,28 @@ -// insert cool lengthy disclaimer here -// fileops.c: convenience +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + fileops.c: simple file access functions +*/ #include #include "config.h" diff --git a/src/fileops.h b/src/fileops.h index bab51bc..68b0bf4 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -1,5 +1,28 @@ -// insert cool lenghty disclaimer here -// fileops.h +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + fileops.h: simple file access functions +*/ #ifndef FILEOPS_H #define FILEOPS_H diff --git a/src/filetypes.c b/src/filetypes.c index 60e027c..a3618a3 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -1,4 +1,28 @@ -// insert cool lengthy disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + filetypes.c: directory scanning and file type detection +*/ #include #include diff --git a/src/filetypes.h b/src/filetypes.h index 703ea0a..6cb443b 100644 --- a/src/filetypes.h +++ b/src/filetypes.h @@ -1,15 +1,38 @@ -// insert cool lengthy disclaimer here -// filetypes.h: fs scanning and file identification +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + filetypes.h: directory scanning and file type detection +*/ #ifndef FILETYPES_H #define FILETYPES_H #include "ff.h" typedef enum { - TYPE_UNKNOWN = 0, /* 0 */ - TYPE_SMC, /* 1 */ - TYPE_SRM, /* 2 */ - TYPE_SPC /* 3 */ + TYPE_UNKNOWN = 0, /* 0 */ + TYPE_SMC, /* 1 */ + TYPE_SRM, /* 2 */ + TYPE_SPC /* 3 */ } SNES_FTYPE; diff --git a/src/fpga.c b/src/fpga.c index 4968a50..918b5f1 100644 --- a/src/fpga.c +++ b/src/fpga.c @@ -1,7 +1,29 @@ -// insert cool lenghty disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + fpga.c: FPGA (re)configuration +*/ -// fpga.c: FPGA (re)programming -// XXX TODO move SPI functions to fpga_spi.c! /* diff --git a/src/fpga.h b/src/fpga.h index c904532..d17c334 100644 --- a/src/fpga.h +++ b/src/fpga.h @@ -1,6 +1,28 @@ -// insert cool lenghty disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion -// fpga.h + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + fpga.h: FPGA (re)configuration +*/ #ifndef FPGA_H #define FPGA_H diff --git a/src/fpga_spi.c b/src/fpga_spi.c index d7affbf..abbaa30 100644 --- a/src/fpga_spi.c +++ b/src/fpga_spi.c @@ -1,20 +1,44 @@ -// insert cool lengthy disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + fpga_spi.h: functions for SPI ctrl, SRAM interfacing and feature configuration +*/ /* - fpga_spi.c: SPI functions for SRAM interfacing and mapper config SPI commands - cmd param function + cmd param function ============================================= - 00 bb[hh[ll]] set address to 0xbb0000, 0xbbhh00, or 0xbbhhll - 10 bbhhll set SNES input address mask to 0xbbhhll - 2s bbhhll set SRAM address mask for chip #s to 0xbbhhll - 3m - set mapper to m - 0=HiROM, 1=LoROM - 80 - read with increment - 81 - read w/o increment - 90 {xx}* write xx with increment - 91 {xx}* write xx w/o increment + 00 bb[hh[ll]] set address to 0xbb0000, 0xbbhh00, or 0xbbhhll + 10 bbhhll set SNES input address mask to 0xbbhhll + 20 bbhhll set SRAM address mask to 0xbbhhll + 3m - set mapper to m + 0=HiROM, 1=LoROM, 2=ExHiROM, 7=Menu + 80 - read with increment + 81 - read w/o increment + 90 {xx}* write xx with increment + 91 {xx}* write xx w/o increment + F0 - receive test token (to see if FPGA is alive) */ diff --git a/src/fpga_spi.h b/src/fpga_spi.h index c5ece17..5606144 100644 --- a/src/fpga_spi.h +++ b/src/fpga_spi.h @@ -1,4 +1,28 @@ -// insert cool lengthy disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + fpga_spi.h: functions for SPI ctrl, SRAM interfacing and feature configuration +*/ #define FPGA_SS_HIGH() do {PORTC |= _BV(PC7);} while (0) #define FPGA_SS_LOW() do {PORTC &= ~_BV(PC7);} while (0) diff --git a/src/led.c b/src/led.c index 124abfb..f30782e 100644 --- a/src/led.c +++ b/src/led.c @@ -1,10 +1,12 @@ -/* sd2iec - SD/MMC to Commodore serial bus interface/controller - Copyright (C) 2007-2009 Ingo Korb +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion - Inspiration and low-level SD/MMC access based on code from MMC2IEC - by Lars Pontoppidan et al., see sdcard.c|h and config.h. + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. - FAT filesystem access based on code from ChaN and Jim Brain, see ff.c|h. + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,9 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - led.c: LED handling - + led.c: LED control */ #include diff --git a/src/led.h b/src/led.h index 72b657a..dab1eff 100644 --- a/src/led.h +++ b/src/led.h @@ -1,10 +1,12 @@ -/* sd2iec - SD/MMC to Commodore serial bus interface/controller - Copyright (C) 2007-2009 Ingo Korb +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion - Inspiration and low-level SD/MMC access based on code from MMC2IEC - by Lars Pontoppidan et al., see sdcard.c|h and config.h. + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. - FAT filesystem access based on code from ChaN and Jim Brain, see ff.c|h. + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,9 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - led.h: Definitions for the LEDs - + led.c: LED control */ #ifndef LED_H diff --git a/src/main.c b/src/main.c index cbfae76..146a698 100644 --- a/src/main.c +++ b/src/main.c @@ -1,10 +1,12 @@ -/* sd2iec - SD/MMC to Commodore serial bus interface/controller - Copyright (C) 2007-2009 Ingo Korb +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion - Inspiration and low-level SD/MMC access based on code from MMC2IEC - by Lars Pontoppidan et al., see sdcard.c|h and config.h. + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. - FAT filesystem access based on code from ChaN and Jim Brain, see ff.c|h. + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,9 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - main.c: Lots of init calls for the submodules - + main.c: initialization and flow */ #include @@ -36,7 +36,7 @@ #include "diskio.h" #include "ff.h" #include "led.h" -#include "timer.h" +/* #include "timer.h" */ #include "fpga.h" #include "uart.h" #include "ustring.h" @@ -153,11 +153,11 @@ int main(void) { spi_none(); snes_reset(1); uart_init(); - sei(); // suspected to reset the AVR when inserting an SD card + sei(); _delay_ms(100); disk_init(); snes_init(); - timer_init(); +/* timer_init(); */ uart_puts_P(PSTR("\nsd2snes " VERSION)); uart_putcrlf(); diff --git a/src/memory.c b/src/memory.c index 51b197d..49d0868 100644 --- a/src/memory.c +++ b/src/memory.c @@ -1,5 +1,28 @@ -// insert cool lengthy disclaimer here -// memory.c: SRAM operations +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + memory.c: RAM operations +*/ #include #include diff --git a/src/memory.h b/src/memory.h index 44b58d2..a8598a3 100644 --- a/src/memory.h +++ b/src/memory.h @@ -1,5 +1,28 @@ -// insert cool lengthy disclaimer here -// memory.h +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + memory.h: RAM operations +*/ #ifndef MEMORY_H #define MEMORY_H diff --git a/src/smc.c b/src/smc.c index 576baa0..11cb2e7 100644 --- a/src/smc.c +++ b/src/smc.c @@ -1,5 +1,28 @@ -// insert cool lengthy disclaimer here -// filetypes.c: File support +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion + + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + smc.c: SMC file related operations +*/ #include #include diff --git a/src/smc.h b/src/smc.h index 5f7c070..ae57a5b 100644 --- a/src/smc.h +++ b/src/smc.h @@ -1,8 +1,28 @@ -// insert cool lengthy disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion -/* - * smc.h: data structures for SNES ROM images - */ + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + smc.h: SMC file structures +*/ #ifndef SMC_H #define SMC_H diff --git a/src/snes.c b/src/snes.c index 0f76387..e765fd1 100644 --- a/src/snes.c +++ b/src/snes.c @@ -1,6 +1,28 @@ -// insert cool lengthy disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion -// snes.c: SNES hardware control (resetting) + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + snes.c: SNES hardware control and monitoring +*/ #include #include "avrcompat.h" diff --git a/src/snes.h b/src/snes.h index 488537d..48be5d4 100644 --- a/src/snes.h +++ b/src/snes.h @@ -1,6 +1,28 @@ -// insert cool lenghty disclaimer here +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + AVR firmware portion -// snes.h + Inspired by and based on code from sd2iec, written by Ingo Korb et al. + See sdcard.c|h, config.h. + + FAT file system access based on code by ChaN, Jim Brain, Ingo Korb, + see ff.c|h. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License only. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + snes.h: SNES hardware control and monitoring +*/ #ifndef SNES_H #define SNES_H diff --git a/src/spi.c b/src/spi.c index a492fbc..263bd6f 100644 --- a/src/spi.c +++ b/src/spi.c @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/spi.h b/src/spi.h index 44f0695..d1d39fc 100644 --- a/src/spi.h +++ b/src/spi.h @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/timer.c b/src/timer.c index 799d013..c4befc9 100644 --- a/src/timer.c +++ b/src/timer.c @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/timer.h b/src/timer.h index 3a97dd5..af94ed7 100644 --- a/src/timer.h +++ b/src/timer.h @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/uart.c b/src/uart.c index ec8d088..b1cf791 100644 --- a/src/uart.c +++ b/src/uart.c @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/uart.h b/src/uart.h index 5861285..11a05c4 100644 --- a/src/uart.h +++ b/src/uart.h @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/ustring.h b/src/ustring.h index 4ccddce..0e17787 100644 --- a/src/ustring.h +++ b/src/ustring.h @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/utils.c b/src/utils.c index 6404e81..dd62a20 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb diff --git a/src/utils.h b/src/utils.h index 766b5b9..a6ae177 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,3 +1,8 @@ +/* sd2snes - SD card based universal cartridge for the SNES + Copyright (C) 2009-2010 Maximilian Rehkopf + This file was adapted from sd2iec, written by Ingo Korb. + Original copyright header follows: +*/ /* sd2iec - SD/MMC to Commodore serial bus interface/controller Copyright (C) 2007-2009 Ingo Korb