Explorar el Código

copyright headers for AVR firmware

Maximilian Rehkopf hace 14 años
padre
commit
02e9bfb756
Se han modificado 34 ficheros con 472 adiciones y 72 borrados
  1. 1 1
      src/Makefile
  2. 6 0
      src/avrcompat.h
  3. 5 0
      src/config
  4. 7 1
      src/config.h
  5. 5 0
      src/diskio.c
  6. 5 0
      src/diskio.h
  7. 5 0
      src/eeprom.c
  8. 5 0
      src/eeprom.h
  9. 25 2
      src/fileops.c
  10. 25 2
      src/fileops.h
  11. 25 1
      src/filetypes.c
  12. 29 6
      src/filetypes.h
  13. 25 3
      src/fpga.c
  14. 24 2
      src/fpga.h
  15. 36 12
      src/fpga_spi.c
  16. 25 1
      src/fpga_spi.h
  17. 8 8
      src/led.c
  18. 8 8
      src/led.h
  19. 11 11
      src/main.c
  20. 25 2
      src/memory.c
  21. 25 2
      src/memory.h
  22. 25 2
      src/smc.c
  23. 24 4
      src/smc.h
  24. 24 2
      src/snes.c
  25. 24 2
      src/snes.h
  26. 5 0
      src/spi.c
  27. 5 0
      src/spi.h
  28. 5 0
      src/timer.c
  29. 5 0
      src/timer.h
  30. 5 0
      src/uart.c
  31. 5 0
      src/uart.h
  32. 5 0
      src/ustring.h
  33. 5 0
      src/utils.c
  34. 5 0
      src/utils.h

+ 1 - 1
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

+ 6 - 0
src/avrcompat.h

@@ -1,3 +1,9 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+
+   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 <ingo@akana.de>
 

+ 5 - 0
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 <otakon@gmx.net>
+#
+# 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 <ingo@akana.de>

+ 7 - 1
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 <otakon@gmx.net>
+   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 <ingo@akana.de>
 
    Inspiration and low-level SD/MMC access based on code from MMC2IEC

+ 5 - 0
src/diskio.c

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/diskio.h

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/eeprom.c

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/eeprom.h

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 25 - 2
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 <otakon@gmx.net>
+   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 <util/delay.h>
 #include "config.h"

+ 25 - 2
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 <otakon@gmx.net>
+   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

+ 25 - 1
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 <otakon@gmx.net>
+   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 <stdio.h>
 #include <string.h>

+ 29 - 6
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 <otakon@gmx.net>
+   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;
 
 

+ 25 - 3
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 <otakon@gmx.net>
+   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!
 
 /*
 

+ 24 - 2
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 <otakon@gmx.net>
+   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

+ 36 - 12
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 <otakon@gmx.net>
+   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)
 	
 */
 

+ 25 - 1
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 <otakon@gmx.net>
+   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)

+ 8 - 8
src/led.c

@@ -1,10 +1,12 @@
-/* sd2iec - SD/MMC to Commodore serial bus interface/controller
-   Copyright (C) 2007-2009  Ingo Korb <ingo@akana.de>
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <avr/io.h>

+ 8 - 8
src/led.h

@@ -1,10 +1,12 @@
-/* sd2iec - SD/MMC to Commodore serial bus interface/controller
-   Copyright (C) 2007-2009  Ingo Korb <ingo@akana.de>
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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

+ 11 - 11
src/main.c

@@ -1,10 +1,12 @@
-/* sd2iec - SD/MMC to Commodore serial bus interface/controller
-   Copyright (C) 2007-2009  Ingo Korb <ingo@akana.de>
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <stdio.h>
@@ -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();
 

+ 25 - 2
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 <otakon@gmx.net>
+   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 <stdint.h>
 #include <avr/pgmspace.h>

+ 25 - 2
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 <otakon@gmx.net>
+   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

+ 25 - 2
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 <otakon@gmx.net>
+   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 <avr/io.h>
 #include <util/delay.h>

+ 24 - 4
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 <otakon@gmx.net>
+   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

+ 24 - 2
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 <otakon@gmx.net>
+   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 <avr/io.h>
 #include "avrcompat.h"

+ 24 - 2
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 <otakon@gmx.net>
+   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

+ 5 - 0
src/spi.c

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/spi.h

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/timer.c

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/timer.h

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/uart.c

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/uart.h

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/ustring.h

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/utils.c

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>
 

+ 5 - 0
src/utils.h

@@ -1,3 +1,8 @@
+/* sd2snes - SD card based universal cartridge for the SNES
+   Copyright (C) 2009-2010 Maximilian Rehkopf <otakon@gmx.net>
+   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 <ingo@akana.de>