# This may not look like it, but it's a -*- makefile -*-
#
# sd2iec - SD/MMC to Commodore serial bus interface/controller
# Copyright (C) 2007-2012  Ingo Korb <ingo@akana.de>
#
# Inspiration and low-level SD/MMC access based on code from MMC2IEC
#   by Lars Pontoppidan et al., see sdcard.c|h and config.h.
#
#  FAT filesystem access based on code from ChaN, see tff.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
#
#  config: User-configurable options to simplify hardware changes and/or
#          reduce the code/ram requirements of the code.
#
#
# This file is included in the main sd2iec Makefile and also parsed
# into autoconf.h.

# MCU to compile for
CONFIG_MCU=atmega644p

# Use the -relax parameter when linking?
# Passing -O9 and -relax to the linker saves ~650 bytes of flash,
# but the option is broken in certain binutils versions.
# (known troublemakers: binutils 2.17, 2.18 seems fine)
CONFIG_LINKER_RELAX=n

# MCU frequency in Hz - the fastloader code is hardcoded for 8MHz
CONFIG_MCU_FREQ=8000000

# Add a bootloader signature
CONFIG_BOOTLOADER=n

# Value of the signature word
CONFIG_BOOT_DEVID=0x49454321


# Enable UART debugging - requires 24 bytes plus buffer size in RAM
CONFIG_UART_DEBUG=n

# Baud rate of the UART, not used if CONFIG_UART_DEBUG is disabled
CONFIG_UART_BAUDRATE=19200

# log2 of the UART buffer size, i.e. 6 for 64, 7 for 128, 8 for 256 etc.
CONFIG_UART_BUF_SHIFT=6

# Output a hex dump of all received commands via serial?
# Not used if CONFIG_UART_DEBUG is disabled.
CONFIG_COMMAND_CHANNEL_DUMP=y


# Enable Turbodisk soft fastloader support
# This option requires an external crystal oscillator!
CONFIG_LOADER_TURBODISK=y

# Enable Final Cartridge III fast loader
CONFIG_LOADER_FC3=y

# Enable Dreamload fast loader
CONFIG_LOADER_DREAMLOAD=y

# Enable ULoad Model 3 fast loader
CONFIG_LOADER_ULOAD3=y

# Enable G.I. Joe fast loader
CONFIG_LOADER_GIJOE=y

# Enable Epyx Fast Load cartridge fast loader
CONFIG_LOADER_EPYXCART=y

# Enable GEOS fast loaders
CONFIG_LOADER_GEOS=y

# Enable Wheels fast loaders (requires CONFIG_LOADER_GEOS=y)
CONFIG_LOADER_WHEELS=y

# Enable Nippon fast loader
CONFIG_LOADER_NIPPON=y

# Enable (some) Action Replay 6 fast loaders
CONFIG_LOADER_AR6=y

# Enable ELoad Version 1 fast loader
CONFIG_LOADER_ELOAD1=y

# Select which hardware to compile for
# Valid values:
#   1 - custom configuration in config.h
#   2 - Shadowolf MMC2IEC PCBs version 1.x
#   3 - original MMC2IEC
#   4 - uIEC
#   5 - Shadowolf sd2iec PCBs version 1.x
#   6 - unused, was NKC-modified MMC2IEC
#   7 - uIEC/SD
CONFIG_HARDWARE_VARIANT=1
CONFIG_HARDWARE_NAME=sd2iec-example

# Number of retries if the SD communication fails
CONFIG_SD_AUTO_RETRIES=10

# Use CRC checks for all SD data transmissions?
CONFIG_SD_DATACRC=y

# Use two SD cards? Works only if SD2 hardware definitions
# in config.h are present for the selected hardware variant.
CONFIG_TWINSD=y

# Additional storage device support
# You don't need to enable the "native" storage device of your hardware
# here, the build system will add that itself (requires definitions in
# config.h).
#
# At this time no hardware is set up to support storage devices other than
# its native one.
#
# Add SD support
#CONFIG_ADD_SD=y
# Add ATA support
#CONFIG_ADD_ATA=y
# Add DataFlash support
#CONFIG_ADD_DF=y

# Length of error message buffer - 1571 uses 36 bytes
# Increased to 46 because the long version message can be a bit long
CONFIG_ERROR_BUFFER_SIZE=46

# Length of command/filename buffer - 1571 uses 42 bytes
# The buffer is actually 2 bytes larger to simplify parsing.
CONFIG_COMMAND_BUFFER_SIZE=120

# Number of sector buffers (256 byte+a bit of overhead)
#  In general: More buffers -> More open files at the same time
CONFIG_BUFFER_COUNT=6

# Size of the EEPROM user area
CONFIG_EEPROM_SIZE=512

# Offset of the EEPROM user area
CONFIG_EEPROM_OFFSET=512

# Track the stack size
# Warning: This option increases the code size a lot.
CONFIG_STACK_TRACKING=n

# Maximum number of partitions
CONFIG_MAX_PARTITIONS=2

# Real Time Clock option
# Valid values are:
#   0 - None
#   1 - software RTC
#   2 - PCF8563 using softi2c
CONFIG_RTC_VARIANT=0

# I2C display
CONFIG_REMOTE_DISPLAY=y

# Display buffer size
# This buffer is used as temporary space when sending commands to
# the display. Longer texts will be truncated.
CONFIG_DISPLAY_BUFFER_SIZE=40

# Capture unknown loaders to file
#CONFIG_CAPTURE_LOADERS=y
#CONFIG_CAPTURE_BUFFER_SIZE=3000
