PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)
Fork of PokittoLib by
Pokitto_settings.h@4:ecf2fe370c1c, 2017-09-19 (annotated)
- Committer:
- Pokitto
- Date:
- Tue Sep 19 13:42:25 2017 +0000
- Revision:
- 4:ecf2fe370c1c
- Parent:
- 0:e8b8f36b4505
- Child:
- 5:9b96eaceeb30
- Child:
- 6:ea7377f3d1af
My_settings.h added;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pokitto | 0:e8b8f36b4505 | 1 | /**************************************************************************/ |
Pokitto | 0:e8b8f36b4505 | 2 | /*! |
Pokitto | 0:e8b8f36b4505 | 3 | @file Pokitto_settings.h |
Pokitto | 0:e8b8f36b4505 | 4 | @author Jonne Valola |
Pokitto | 0:e8b8f36b4505 | 5 | |
Pokitto | 0:e8b8f36b4505 | 6 | @section LICENSE |
Pokitto | 0:e8b8f36b4505 | 7 | |
Pokitto | 0:e8b8f36b4505 | 8 | Software License Agreement (BSD License) |
Pokitto | 0:e8b8f36b4505 | 9 | |
Pokitto | 0:e8b8f36b4505 | 10 | Copyright (c) 2016, Jonne Valola |
Pokitto | 0:e8b8f36b4505 | 11 | All rights reserved. |
Pokitto | 0:e8b8f36b4505 | 12 | |
Pokitto | 0:e8b8f36b4505 | 13 | Redistribution and use in source and binary forms, with or without |
Pokitto | 0:e8b8f36b4505 | 14 | modification, are permitted provided that the following conditions are met: |
Pokitto | 0:e8b8f36b4505 | 15 | 1. Redistributions of source code must retain the above copyright |
Pokitto | 0:e8b8f36b4505 | 16 | notice, this list of conditions and the following disclaimer. |
Pokitto | 0:e8b8f36b4505 | 17 | 2. Redistributions in binary form must reproduce the above copyright |
Pokitto | 0:e8b8f36b4505 | 18 | notice, this list of conditions and the following disclaimer in the |
Pokitto | 0:e8b8f36b4505 | 19 | documentation and/or other materials provided with the distribution. |
Pokitto | 0:e8b8f36b4505 | 20 | 3. Neither the name of the copyright holders nor the |
Pokitto | 0:e8b8f36b4505 | 21 | names of its contributors may be used to endorse or promote products |
Pokitto | 0:e8b8f36b4505 | 22 | derived from this software without specific prior written permission. |
Pokitto | 0:e8b8f36b4505 | 23 | |
Pokitto | 0:e8b8f36b4505 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY |
Pokitto | 0:e8b8f36b4505 | 25 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
Pokitto | 0:e8b8f36b4505 | 26 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Pokitto | 0:e8b8f36b4505 | 27 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY |
Pokitto | 0:e8b8f36b4505 | 28 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
Pokitto | 0:e8b8f36b4505 | 29 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
Pokitto | 0:e8b8f36b4505 | 30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
Pokitto | 0:e8b8f36b4505 | 31 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
Pokitto | 0:e8b8f36b4505 | 32 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
Pokitto | 0:e8b8f36b4505 | 33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Pokitto | 0:e8b8f36b4505 | 34 | */ |
Pokitto | 0:e8b8f36b4505 | 35 | /**************************************************************************/ |
Pokitto | 0:e8b8f36b4505 | 36 | |
Pokitto | 0:e8b8f36b4505 | 37 | |
Pokitto | 0:e8b8f36b4505 | 38 | #ifndef POKITTO_SETTINGS_H |
Pokitto | 0:e8b8f36b4505 | 39 | #define POKITTO_SETTINGS_H |
Pokitto | 0:e8b8f36b4505 | 40 | |
Pokitto | 4:ecf2fe370c1c | 41 | #include "My_settings.h" |
Pokitto | 4:ecf2fe370c1c | 42 | |
Pokitto | 0:e8b8f36b4505 | 43 | #ifdef PROJ_BOARDREV |
Pokitto | 0:e8b8f36b4505 | 44 | #define POK_BOARDREV PROJ_BOARDREV // which revision of Pokitto board |
Pokitto | 0:e8b8f36b4505 | 45 | #else |
Pokitto | 0:e8b8f36b4505 | 46 | #define POK_BOARDREV 2 // default is boardrev 2 (the 4-layer board) |
Pokitto | 0:e8b8f36b4505 | 47 | #endif |
Pokitto | 0:e8b8f36b4505 | 48 | |
Pokitto | 0:e8b8f36b4505 | 49 | /** LOGO */ |
Pokitto | 0:e8b8f36b4505 | 50 | #ifdef PROJ_STARTUPLOGO |
Pokitto | 0:e8b8f36b4505 | 51 | #define POK_DISPLAYLOGO PROJ_STARTUPLOGO// if enabled, show logo at start |
Pokitto | 0:e8b8f36b4505 | 52 | #else |
Pokitto | 0:e8b8f36b4505 | 53 | #define POK_DISPLAYLOGO 1 |
Pokitto | 0:e8b8f36b4505 | 54 | #endif |
Pokitto | 0:e8b8f36b4505 | 55 | |
Pokitto | 0:e8b8f36b4505 | 56 | #define POK_ENABLE_REFRESHWITHWAIT 0 // choose whether waiting in application refreshes display or not |
Pokitto | 0:e8b8f36b4505 | 57 | #define POK_ENABLE_FPSCOUNTER 0 // turn off to save some cpu |
Pokitto | 0:e8b8f36b4505 | 58 | #define POK_ENABLE_SD 1 // Define true to include SD library |
Pokitto | 0:e8b8f36b4505 | 59 | #define POK_LOADER_COUNTDOWN 3 //how many seconds waiting for C press for loader |
Pokitto | 0:e8b8f36b4505 | 60 | |
Pokitto | 0:e8b8f36b4505 | 61 | #ifndef PROJ_ENABLE_SOUND |
Pokitto | 0:e8b8f36b4505 | 62 | #define POK_ENABLE_SOUND 1 |
Pokitto | 0:e8b8f36b4505 | 63 | #else |
Pokitto | 0:e8b8f36b4505 | 64 | #define POK_ENABLE_SOUND PROJ_ENABLE_SOUND |
Pokitto | 0:e8b8f36b4505 | 65 | #endif |
Pokitto | 0:e8b8f36b4505 | 66 | |
Pokitto | 0:e8b8f36b4505 | 67 | #ifndef PROJ_GBSOUND |
Pokitto | 4:ecf2fe370c1c | 68 | #if POK_ENABLE_SOUND > 0 |
Pokitto | 4:ecf2fe370c1c | 69 | #define POK_GBSOUND 0 |
Pokitto | 4:ecf2fe370c1c | 70 | #endif |
Pokitto | 0:e8b8f36b4505 | 71 | #else |
Pokitto | 0:e8b8f36b4505 | 72 | #define POK_GBSOUND PROJ_GBSOUND |
Pokitto | 0:e8b8f36b4505 | 73 | #endif |
Pokitto | 0:e8b8f36b4505 | 74 | |
Pokitto | 0:e8b8f36b4505 | 75 | |
Pokitto | 0:e8b8f36b4505 | 76 | #ifndef PROJ_STREAMING_MUSIC |
Pokitto | 4:ecf2fe370c1c | 77 | #if POK_ENABLE_SOUND > 0 |
Pokitto | 4:ecf2fe370c1c | 78 | #define POK_STREAMING_MUSIC 1 // Define true to stream music from SD |
Pokitto | 4:ecf2fe370c1c | 79 | #endif |
Pokitto | 0:e8b8f36b4505 | 80 | #else |
Pokitto | 0:e8b8f36b4505 | 81 | #define POK_STREAMING_MUSIC PROJ_STREAMING_MUSIC |
Pokitto | 0:e8b8f36b4505 | 82 | #endif // PROJ_STREAMING_MUSIC |
Pokitto | 0:e8b8f36b4505 | 83 | |
Pokitto | 0:e8b8f36b4505 | 84 | #ifndef PROJ_ENABLE_SYNTH |
Pokitto | 0:e8b8f36b4505 | 85 | #define POK_ENABLE_SYNTH 0 |
Pokitto | 0:e8b8f36b4505 | 86 | #else |
Pokitto | 0:e8b8f36b4505 | 87 | #define POK_ENABLE_SYNTH PROJ_ENABLE_SYNTH |
Pokitto | 0:e8b8f36b4505 | 88 | #endif // PROJ_ENABLE_SYNTH |
Pokitto | 0:e8b8f36b4505 | 89 | |
Pokitto | 0:e8b8f36b4505 | 90 | |
Pokitto | 0:e8b8f36b4505 | 91 | /** CONSOLE **/ |
Pokitto | 0:e8b8f36b4505 | 92 | #define POK_USE_CONSOLE 1 //if debugging console is available or not |
Pokitto | 0:e8b8f36b4505 | 93 | #define POK_CONSOLE_VISIBLE_AT_STARTUP 1 // whaddaya think ? |
Pokitto | 0:e8b8f36b4505 | 94 | #define POK_CONSOLE_INTERVAL 1000 // interval in ms how often console is drawn |
Pokitto | 0:e8b8f36b4505 | 95 | #if POK_USE_CONSOLE > 0 // this prevents trying to log messages if console is disabled |
Pokitto | 0:e8b8f36b4505 | 96 | #define POK_CONSOLE_LOG_BUTTONS 0 // if console logs keypresses |
Pokitto | 0:e8b8f36b4505 | 97 | #define POK_CONSOLE_LOG_COLLISIONS 1 // if console logs collisions |
Pokitto | 0:e8b8f36b4505 | 98 | #endif // POK_USE_CONSOLE |
Pokitto | 0:e8b8f36b4505 | 99 | #define CONSOLEBUFSIZE 20 |
Pokitto | 0:e8b8f36b4505 | 100 | #define POK_SHOW_VOLUME 0 // volumebar drawn after console if enabled |
Pokitto | 0:e8b8f36b4505 | 101 | #define VOLUMEBAR_TIMEOUT 10 // frames before disappearing |
Pokitto | 0:e8b8f36b4505 | 102 | |
Pokitto | 0:e8b8f36b4505 | 103 | /** PROJECT LIBRARY TYPE **/ |
Pokitto | 0:e8b8f36b4505 | 104 | // Tiled mode can NOT be buffered mode (fast mode, arduboy mode, gamebuino mode etc) |
Pokitto | 0:e8b8f36b4505 | 105 | #if PROJ_TILEDMODE > 0 |
Pokitto | 0:e8b8f36b4505 | 106 | #define POK_TILEDMODE 1 |
Pokitto | 0:e8b8f36b4505 | 107 | #ifdef PROJ_TILEWIDTH |
Pokitto | 0:e8b8f36b4505 | 108 | #define POK_TILE_W PROJ_TILEWIDTH |
Pokitto | 0:e8b8f36b4505 | 109 | #else |
Pokitto | 0:e8b8f36b4505 | 110 | #define POK_TILE_W 11 |
Pokitto | 0:e8b8f36b4505 | 111 | #endif // PROJ_TILEWIDTH |
Pokitto | 0:e8b8f36b4505 | 112 | #if POK_TILE_W == 11 |
Pokitto | 0:e8b8f36b4505 | 113 | #define POK_TILES_X 20 |
Pokitto | 0:e8b8f36b4505 | 114 | #define LCDWIDTH 220 |
Pokitto | 0:e8b8f36b4505 | 115 | #elif POK_TILE_W == 12 |
Pokitto | 0:e8b8f36b4505 | 116 | #define POK_TILES_X 18 |
Pokitto | 0:e8b8f36b4505 | 117 | #define LCDWIDTH 216 |
Pokitto | 0:e8b8f36b4505 | 118 | #elif POK_TILE_W == 8 |
Pokitto | 0:e8b8f36b4505 | 119 | #define POK_TILES_X 27 |
Pokitto | 0:e8b8f36b4505 | 120 | #define LCDWIDTH 216 |
Pokitto | 0:e8b8f36b4505 | 121 | #elif POK_TILE_W == 32 |
Pokitto | 0:e8b8f36b4505 | 122 | #define POK_TILES_X 6 |
Pokitto | 0:e8b8f36b4505 | 123 | #define LCDWIDTH 220 |
Pokitto | 0:e8b8f36b4505 | 124 | #elif POK_TILE_W == 10 |
Pokitto | 0:e8b8f36b4505 | 125 | #define POK_TILES_X 22 |
Pokitto | 0:e8b8f36b4505 | 126 | #define LCDWIDTH 220 |
Pokitto | 0:e8b8f36b4505 | 127 | #elif POK_TILE_W == 14 |
Pokitto | 0:e8b8f36b4505 | 128 | #define POK_TILES_X 15 |
Pokitto | 0:e8b8f36b4505 | 129 | #define LCDWIDTH 210 |
Pokitto | 0:e8b8f36b4505 | 130 | #endif |
Pokitto | 0:e8b8f36b4505 | 131 | #ifdef PROJ_TILEHEIGHT |
Pokitto | 0:e8b8f36b4505 | 132 | #define POK_TILE_H PROJ_TILEHEIGHT |
Pokitto | 0:e8b8f36b4505 | 133 | #else |
Pokitto | 0:e8b8f36b4505 | 134 | #define POK_TILE_H 11 |
Pokitto | 0:e8b8f36b4505 | 135 | #endif // PROJ_TILEHEIGHT |
Pokitto | 0:e8b8f36b4505 | 136 | #if POK_TILE_H == 11 |
Pokitto | 0:e8b8f36b4505 | 137 | #define POK_TILES_Y 16 |
Pokitto | 0:e8b8f36b4505 | 138 | #define LCDHEIGHT 176 |
Pokitto | 0:e8b8f36b4505 | 139 | #elif POK_TILE_H == 12 |
Pokitto | 0:e8b8f36b4505 | 140 | #define POK_TILES_Y 14 |
Pokitto | 0:e8b8f36b4505 | 141 | #define LCDHEIGHT 168 |
Pokitto | 0:e8b8f36b4505 | 142 | #elif POK_TILE_H == 8 |
Pokitto | 0:e8b8f36b4505 | 143 | #define POK_TILES_Y 22 |
Pokitto | 0:e8b8f36b4505 | 144 | #define LCDHEIGHT 176 |
Pokitto | 0:e8b8f36b4505 | 145 | #elif POK_TILE_H == 32 |
Pokitto | 0:e8b8f36b4505 | 146 | #define POK_TILES_Y 5 |
Pokitto | 0:e8b8f36b4505 | 147 | #define LCDHEIGHT 176 |
Pokitto | 0:e8b8f36b4505 | 148 | #elif POK_TILE_H == 10 |
Pokitto | 0:e8b8f36b4505 | 149 | #define POK_TILES_Y 17 |
Pokitto | 0:e8b8f36b4505 | 150 | #define LCDHEIGHT 170 |
Pokitto | 0:e8b8f36b4505 | 151 | #elif POK_TILE_H == 14 |
Pokitto | 0:e8b8f36b4505 | 152 | #define POK_TILES_Y 12 |
Pokitto | 0:e8b8f36b4505 | 153 | #define LCDHEIGHT 168 |
Pokitto | 0:e8b8f36b4505 | 154 | #endif |
Pokitto | 0:e8b8f36b4505 | 155 | #else |
Pokitto | 0:e8b8f36b4505 | 156 | #if PROJ_GAMEBUINO > 0 |
Pokitto | 0:e8b8f36b4505 | 157 | #define POK_GAMEBUINO_SUPPORT PROJ_GAMEBUINO // Define true to support Gamebuino library calls |
Pokitto | 0:e8b8f36b4505 | 158 | #define PROJ_SCREENMODE MODE_GAMEBUINO_16COLOR |
Pokitto | 0:e8b8f36b4505 | 159 | #define POK_STRETCH 1 |
Pokitto | 0:e8b8f36b4505 | 160 | #define PICOPALETTE 0 |
Pokitto | 0:e8b8f36b4505 | 161 | #define POK_COLORDEPTH 4 |
Pokitto | 0:e8b8f36b4505 | 162 | #else |
Pokitto | 0:e8b8f36b4505 | 163 | #if PROJ_ARDUBOY > 0 |
Pokitto | 0:e8b8f36b4505 | 164 | #define POK_ARDUBOY_SUPPORT PROJ_ARDUBOY // Define true to support Arduboy library calls |
Pokitto | 0:e8b8f36b4505 | 165 | #define PROJ_SCREENMODE MODE_ARDUBOY_16COLOR |
Pokitto | 0:e8b8f36b4505 | 166 | #define POK_COLORDEPTH 1 |
Pokitto | 0:e8b8f36b4505 | 167 | #define POK_STRETCH 1 |
Pokitto | 0:e8b8f36b4505 | 168 | #define POK_FPS 20 |
Pokitto | 0:e8b8f36b4505 | 169 | #define PICOPALETTE 0 |
Pokitto | 0:e8b8f36b4505 | 170 | #else |
Pokitto | 0:e8b8f36b4505 | 171 | #if PROJ_RBOY > 0 |
Pokitto | 0:e8b8f36b4505 | 172 | #define PROJ_SCREENMODE MODE_GAMEBUINO_16COLOR |
Pokitto | 0:e8b8f36b4505 | 173 | #define POK_COLORDEPTH 1 |
Pokitto | 0:e8b8f36b4505 | 174 | #define POK_STRETCH 0 |
Pokitto | 0:e8b8f36b4505 | 175 | #define POK_FPS 40 |
Pokitto | 0:e8b8f36b4505 | 176 | #define PICOPALETTE 0 |
Pokitto | 0:e8b8f36b4505 | 177 | #else |
Pokitto | 0:e8b8f36b4505 | 178 | #if PROJ_GAMEBOY > 0 |
Pokitto | 0:e8b8f36b4505 | 179 | #define PROJ_SCREENMODE MODE_GAMEBOY |
Pokitto | 0:e8b8f36b4505 | 180 | #define POK_COLORDEPTH 2 |
Pokitto | 0:e8b8f36b4505 | 181 | #define POK_STRETCH 0 |
Pokitto | 0:e8b8f36b4505 | 182 | #define POK_FPS 6 |
Pokitto | 0:e8b8f36b4505 | 183 | #define PICOPALETTE 0 |
Pokitto | 0:e8b8f36b4505 | 184 | #else |
Pokitto | 0:e8b8f36b4505 | 185 | #define POK_GAMEBUINO_SUPPORT 0 |
Pokitto | 0:e8b8f36b4505 | 186 | #define POK_GAMEBOY_SUPPORT 0 |
Pokitto | 0:e8b8f36b4505 | 187 | #define POK_ARDUBOY_SUPPORT 0 |
Pokitto | 0:e8b8f36b4505 | 188 | #define PICOPALETTE 0 |
Pokitto | 0:e8b8f36b4505 | 189 | #define POK_COLORDEPTH 4 |
Pokitto | 0:e8b8f36b4505 | 190 | #endif // PROJ_GAMEBOY |
Pokitto | 0:e8b8f36b4505 | 191 | #endif // PROJ_RBOY |
Pokitto | 0:e8b8f36b4505 | 192 | #endif // PROJ_ARDUBOY |
Pokitto | 0:e8b8f36b4505 | 193 | #endif // PROJ_GAMEBUINO |
Pokitto | 0:e8b8f36b4505 | 194 | #endif // PROJ_TILEDMODE |
Pokitto | 0:e8b8f36b4505 | 195 | |
Pokitto | 0:e8b8f36b4505 | 196 | /** SCREEN MODES TABLE -- DO NOT CHANGE THESE **/ |
Pokitto | 0:e8b8f36b4505 | 197 | |
Pokitto | 0:e8b8f36b4505 | 198 | #define POK_LCD_W 220 //<- do not change !! |
Pokitto | 0:e8b8f36b4505 | 199 | #define POK_LCD_H 176 //<- do not change !! |
Pokitto | 0:e8b8f36b4505 | 200 | |
Pokitto | 0:e8b8f36b4505 | 201 | #define MODE_NOBUFFER 0 //Size: 0 |
Pokitto | 0:e8b8f36b4505 | 202 | #define BUFSIZE_NOBUFFER 0 |
Pokitto | 0:e8b8f36b4505 | 203 | #define MODE_HI_4COLOR 1 //Size: 9680 |
Pokitto | 0:e8b8f36b4505 | 204 | #define BUFSIZE_HI_4 9680 |
Pokitto | 0:e8b8f36b4505 | 205 | #define MODE_FAST_16COLOR 2 //Size: 4840 |
Pokitto | 0:e8b8f36b4505 | 206 | #define BUFSIZE_FAST_16 4840 |
Pokitto | 0:e8b8f36b4505 | 207 | #define MODE_HI_16COLOR 3 |
Pokitto | 0:e8b8f36b4505 | 208 | #define BUFSIZE_HI_16 19360 |
Pokitto | 0:e8b8f36b4505 | 209 | #define MODE_GAMEBUINO_16COLOR 4 //Size: 2016 |
Pokitto | 0:e8b8f36b4505 | 210 | #define BUFSIZE_GAMEBUINO_16 2016 |
Pokitto | 0:e8b8f36b4505 | 211 | #define MODE_ARDUBOY_16COLOR 5 //Size: 4096 |
Pokitto | 0:e8b8f36b4505 | 212 | #define BUFSIZE_ARDUBOY_16 4096 |
Pokitto | 0:e8b8f36b4505 | 213 | #define MODE_HI_MONOCHROME 6 //Size: 4840 |
Pokitto | 0:e8b8f36b4505 | 214 | #define BUFSIZE_HI_MONO 4840 |
Pokitto | 0:e8b8f36b4505 | 215 | #define MODE_HI_GRAYSCALE 7 //Size: 9680 |
Pokitto | 0:e8b8f36b4505 | 216 | #define BUFSIZE_HI_GS 9680 |
Pokitto | 0:e8b8f36b4505 | 217 | #define MODE_GAMEBOY 8 |
Pokitto | 0:e8b8f36b4505 | 218 | #define BUFSIZE_GAMEBOY 5760 |
Pokitto | 0:e8b8f36b4505 | 219 | #define MODE_UZEBOX 9 |
Pokitto | 0:e8b8f36b4505 | 220 | #define MODE_TVOUT 10 |
Pokitto | 0:e8b8f36b4505 | 221 | #define MODE_LAMENES 11 |
Pokitto | 0:e8b8f36b4505 | 222 | #define BUFSIZE_LAMENES 7680 |
Pokitto | 0:e8b8f36b4505 | 223 | #define MODE_256_COLOR 12 |
Pokitto | 0:e8b8f36b4505 | 224 | #define BUFSIZE_MODE_12 4176 // 72 x 58 |
Pokitto | 0:e8b8f36b4505 | 225 | // Tiled modes |
Pokitto | 0:e8b8f36b4505 | 226 | #define MODE_TILED_1BIT 1001 |
Pokitto | 0:e8b8f36b4505 | 227 | #define MODE_TILED_8BIT 1002 |
Pokitto | 0:e8b8f36b4505 | 228 | |
Pokitto | 0:e8b8f36b4505 | 229 | |
Pokitto | 0:e8b8f36b4505 | 230 | |
Pokitto | 0:e8b8f36b4505 | 231 | /** SCREENMODE - USE THIS SELECTION FOR YOUR PROJECT **/ |
Pokitto | 0:e8b8f36b4505 | 232 | |
Pokitto | 0:e8b8f36b4505 | 233 | #if POK_TILEDMODE > 0 |
Pokitto | 0:e8b8f36b4505 | 234 | #ifndef PROJ_TILEBITDEPTH |
Pokitto | 0:e8b8f36b4505 | 235 | #define PROJ_TILEBITDEPTH 8 //default tiling mode is 256 color mode! |
Pokitto | 0:e8b8f36b4505 | 236 | #endif // PROJ_TILEBITDEPTH |
Pokitto | 0:e8b8f36b4505 | 237 | #if PROJ_TILEBITDEPTH == 1 |
Pokitto | 0:e8b8f36b4505 | 238 | #define POK_SCREENMODE MODE_TILED_1BIT |
Pokitto | 0:e8b8f36b4505 | 239 | #define POK_COLORDEPTH 1 |
Pokitto | 0:e8b8f36b4505 | 240 | #else |
Pokitto | 0:e8b8f36b4505 | 241 | #define POK_SCREENMODE MODE_TILED_8BIT |
Pokitto | 0:e8b8f36b4505 | 242 | #define POK_COLORDEPTH 8 |
Pokitto | 0:e8b8f36b4505 | 243 | #endif // PROJ_TILEBITDEPTH |
Pokitto | 0:e8b8f36b4505 | 244 | #else |
Pokitto | 0:e8b8f36b4505 | 245 | #ifndef PROJ_SCREENMODE |
Pokitto | 0:e8b8f36b4505 | 246 | #ifdef PROJ_HIRES |
Pokitto | 0:e8b8f36b4505 | 247 | #if PROJ_HIRES > 0 |
Pokitto | 0:e8b8f36b4505 | 248 | #define POK_SCREENMODE MODE_HI_4COLOR |
Pokitto | 0:e8b8f36b4505 | 249 | #define POK_COLORDEPTH 2 |
Pokitto | 0:e8b8f36b4505 | 250 | #elif PROJ_HICOLOR > 0 |
Pokitto | 0:e8b8f36b4505 | 251 | #define POK_SCREENMODE MODE_256_COLOR |
Pokitto | 0:e8b8f36b4505 | 252 | #define POK_COLORDEPTH 8 |
Pokitto | 0:e8b8f36b4505 | 253 | #else |
Pokitto | 0:e8b8f36b4505 | 254 | #define POK_SCREENMODE MODE_FAST_16COLOR |
Pokitto | 0:e8b8f36b4505 | 255 | #define POK_COLORDEPTH 4 |
Pokitto | 0:e8b8f36b4505 | 256 | #endif // PROJ_HIRES |
Pokitto | 0:e8b8f36b4505 | 257 | #else |
Pokitto | 0:e8b8f36b4505 | 258 | #define POK_SCREENMODE MODE_FAST_16COLOR |
Pokitto | 0:e8b8f36b4505 | 259 | #define POK_COLORDEPTH 4 |
Pokitto | 0:e8b8f36b4505 | 260 | #endif // PROJ_HIRES |
Pokitto | 0:e8b8f36b4505 | 261 | #else |
Pokitto | 0:e8b8f36b4505 | 262 | #define POK_SCREENMODE PROJ_SCREENMODE |
Pokitto | 0:e8b8f36b4505 | 263 | #endif |
Pokitto | 0:e8b8f36b4505 | 264 | #endif // POK_TILEDMODE |
Pokitto | 0:e8b8f36b4505 | 265 | |
Pokitto | 0:e8b8f36b4505 | 266 | /* DEFINE SCREENMODE AS THE MAXIMUM SCREEN SIZE NEEDED BY YOUR APP ... SEE SIZES LISTED ABOVE */ |
Pokitto | 0:e8b8f36b4505 | 267 | |
Pokitto | 0:e8b8f36b4505 | 268 | /** AUTOMATIC COLOR DEPTH SETTING - DO NOT CHANGE **/ |
Pokitto | 0:e8b8f36b4505 | 269 | #ifndef POK_COLORDEPTH |
Pokitto | 0:e8b8f36b4505 | 270 | #define POK_COLORDEPTH 4 // 1...5 is valid |
Pokitto | 0:e8b8f36b4505 | 271 | #endif // POK_COLORDEPTH |
Pokitto | 0:e8b8f36b4505 | 272 | |
Pokitto | 0:e8b8f36b4505 | 273 | /** AUTOMATIC SCREEN BUFFER SIZE CALCULATION - DO NOT CHANGE **/ |
Pokitto | 0:e8b8f36b4505 | 274 | #if POK_SCREENMODE == 0 |
Pokitto | 0:e8b8f36b4505 | 275 | #define POK_SCREENBUFFERSIZE 0 |
Pokitto | 0:e8b8f36b4505 | 276 | #define LCDWIDTH POK_LCD_W |
Pokitto | 0:e8b8f36b4505 | 277 | #define LCDHEIGHT POK_LCD_H |
Pokitto | 0:e8b8f36b4505 | 278 | #define POK_BITFRAME 0 |
Pokitto | 0:e8b8f36b4505 | 279 | #elif POK_SCREENMODE == MODE_HI_MONOCHROME |
Pokitto | 0:e8b8f36b4505 | 280 | #define POK_SCREENBUFFERSIZE POK_LCD_W*POK_LCD_H*POK_COLORDEPTH/8 |
Pokitto | 0:e8b8f36b4505 | 281 | #define LCDWIDTH POK_LCD_W |
Pokitto | 0:e8b8f36b4505 | 282 | #define LCDHEIGHT POK_LCD_H |
Pokitto | 0:e8b8f36b4505 | 283 | #define POK_BITFRAME 4840 |
Pokitto | 0:e8b8f36b4505 | 284 | #elif POK_SCREENMODE == MODE_HI_16COLOR |
Pokitto | 0:e8b8f36b4505 | 285 | #define POK_SCREENBUFFERSIZE POK_LCD_W*POK_LCD_H/2 |
Pokitto | 0:e8b8f36b4505 | 286 | #define LCDWIDTH 220 |
Pokitto | 0:e8b8f36b4505 | 287 | #define LCDHEIGHT 176 |
Pokitto | 0:e8b8f36b4505 | 288 | #define POK_BITFRAME 4840 |
Pokitto | 0:e8b8f36b4505 | 289 | #elif POK_SCREENMODE == MODE_HI_4COLOR || POK_SCREENMODE == MODE_HI_GRAYSCALE |
Pokitto | 0:e8b8f36b4505 | 290 | #define POK_SCREENBUFFERSIZE POK_LCD_W*POK_LCD_H*POK_COLORDEPTH/4 |
Pokitto | 0:e8b8f36b4505 | 291 | #define LCDWIDTH POK_LCD_W |
Pokitto | 0:e8b8f36b4505 | 292 | #define LCDHEIGHT POK_LCD_H |
Pokitto | 0:e8b8f36b4505 | 293 | #define POK_BITFRAME 4840 |
Pokitto | 0:e8b8f36b4505 | 294 | #elif POK_SCREENMODE == MODE_FAST_16COLOR |
Pokitto | 0:e8b8f36b4505 | 295 | #define POK_SCREENBUFFERSIZE (POK_LCD_W/2)*(POK_LCD_H/2)*POK_COLORDEPTH/8 |
Pokitto | 0:e8b8f36b4505 | 296 | #define XCENTER POK_LCD_W/4 |
Pokitto | 0:e8b8f36b4505 | 297 | #define YCENTER POK_LCD_H/4 |
Pokitto | 0:e8b8f36b4505 | 298 | #define LCDWIDTH 110 |
Pokitto | 0:e8b8f36b4505 | 299 | #define LCDHEIGHT 88 |
Pokitto | 0:e8b8f36b4505 | 300 | #define POK_BITFRAME 1210 |
Pokitto | 0:e8b8f36b4505 | 301 | #elif POK_SCREENMODE == MODE_256_COLOR |
Pokitto | 0:e8b8f36b4505 | 302 | #define POK_SCREENBUFFERSIZE 72*58 |
Pokitto | 0:e8b8f36b4505 | 303 | #define XCENTER 36 |
Pokitto | 0:e8b8f36b4505 | 304 | #define YCENTER 29 |
Pokitto | 0:e8b8f36b4505 | 305 | #define LCDWIDTH 72 |
Pokitto | 0:e8b8f36b4505 | 306 | #define LCDHEIGHT 58 |
Pokitto | 0:e8b8f36b4505 | 307 | #define POK_BITFRAME 72*58 |
Pokitto | 0:e8b8f36b4505 | 308 | #elif POK_SCREENMODE == MODE_GAMEBUINO_16COLOR |
Pokitto | 0:e8b8f36b4505 | 309 | #define POK_SCREENBUFFERSIZE (84/2)*(48/2)*POK_COLORDEPTH/8 |
Pokitto | 0:e8b8f36b4505 | 310 | #define LCDWIDTH 84 |
Pokitto | 0:e8b8f36b4505 | 311 | #define LCDHEIGHT 48 |
Pokitto | 0:e8b8f36b4505 | 312 | #define POK_BITFRAME 504 |
Pokitto | 0:e8b8f36b4505 | 313 | #elif POK_SCREENMODE == MODE_ARDUBOY_16COLOR |
Pokitto | 0:e8b8f36b4505 | 314 | #define POK_SCREENBUFFERSIZE (128/2)*(64/2)*POK_COLORDEPTH/8 |
Pokitto | 0:e8b8f36b4505 | 315 | #define LCDWIDTH 128 |
Pokitto | 0:e8b8f36b4505 | 316 | #define LCDHEIGHT 64 |
Pokitto | 0:e8b8f36b4505 | 317 | #define POK_BITFRAME 1024 |
Pokitto | 0:e8b8f36b4505 | 318 | #elif POK_SCREENMODE == MODE_LAMENES |
Pokitto | 0:e8b8f36b4505 | 319 | #define POK_SCREENBUFFERSIZE (128)*(120)*POK_COLORDEPTH/8 |
Pokitto | 0:e8b8f36b4505 | 320 | #define LCDWIDTH 128 |
Pokitto | 0:e8b8f36b4505 | 321 | #define LCDHEIGHT 120 |
Pokitto | 0:e8b8f36b4505 | 322 | #define POK_BITFRAME 1210 |
Pokitto | 0:e8b8f36b4505 | 323 | #elif POK_SCREENMODE == MODE_GAMEBOY |
Pokitto | 0:e8b8f36b4505 | 324 | #define POK_SCREENBUFFERSIZE (160)*(144)/4 |
Pokitto | 0:e8b8f36b4505 | 325 | #define LCDWIDTH 160 |
Pokitto | 0:e8b8f36b4505 | 326 | #define LCDHEIGHT 144 |
Pokitto | 0:e8b8f36b4505 | 327 | #define POK_BITFRAME 2880 |
Pokitto | 0:e8b8f36b4505 | 328 | #else |
Pokitto | 0:e8b8f36b4505 | 329 | #define POK_SCREENBUFFERSIZE 0 |
Pokitto | 0:e8b8f36b4505 | 330 | #endif // POK_SCREENMODE |
Pokitto | 0:e8b8f36b4505 | 331 | |
Pokitto | 0:e8b8f36b4505 | 332 | #ifndef POK_STRETCH |
Pokitto | 0:e8b8f36b4505 | 333 | #define POK_STRETCH 1 // Stretch Gamebuino display |
Pokitto | 0:e8b8f36b4505 | 334 | #endif |
Pokitto | 0:e8b8f36b4505 | 335 | #ifndef POK_FPS |
Pokitto | 0:e8b8f36b4505 | 336 | #define POK_FPS 20 |
Pokitto | 0:e8b8f36b4505 | 337 | #endif |
Pokitto | 0:e8b8f36b4505 | 338 | #define POK_FRAMEDURATION 1000/POK_FPS |
Pokitto | 0:e8b8f36b4505 | 339 | |
Pokitto | 0:e8b8f36b4505 | 340 | /** SCROLL TEXT VS. WRAP AROUND WHEN PRINTING **/ |
Pokitto | 0:e8b8f36b4505 | 341 | #define SCROLL_TEXT 1 |
Pokitto | 0:e8b8f36b4505 | 342 | |
Pokitto | 0:e8b8f36b4505 | 343 | /** AUDIO **/ |
Pokitto | 0:e8b8f36b4505 | 344 | #define POK_AUD_PIN P2_19 |
Pokitto | 0:e8b8f36b4505 | 345 | #define POK_AUD_PWM_US 31 |
Pokitto | 0:e8b8f36b4505 | 346 | #define POK_AUD_FREQ 11025 //16000 //14285 //24000 // 14285 // 57143 // 8000 //11025// audio update frequency in Hz |
Pokitto | 0:e8b8f36b4505 | 347 | #define POK_CINC_MULTIPLIER 2 // multiplies synth cycle table |
Pokitto | 0:e8b8f36b4505 | 348 | #define POK_STREAMFREQ_HALVE 0 // if true, stream update freq is half audio freq |
Pokitto | 0:e8b8f36b4505 | 349 | #define POK_STREAM_LOOP 1 //master switch |
Pokitto | 0:e8b8f36b4505 | 350 | |
Pokitto | 0:e8b8f36b4505 | 351 | #define POK_USE_DAC 1 // is DAC in use in this project |
Pokitto | 0:e8b8f36b4505 | 352 | #define POK_USE_EXT 0 // if extension port is in use or not |
Pokitto | 0:e8b8f36b4505 | 353 | #define POK_STREAM_TO_DAC 1 // 1 = stream from SD to DAC, synthesizer to PWM, 0 = opposite |
Pokitto | 0:e8b8f36b4505 | 354 | |
Pokitto | 0:e8b8f36b4505 | 355 | |
Pokitto | 0:e8b8f36b4505 | 356 | #define POK_BACKLIGHT_PIN P2_2 |
Pokitto | 0:e8b8f36b4505 | 357 | #define POK_BACKLIGHT_INITIALVALUE 0.3f |
Pokitto | 0:e8b8f36b4505 | 358 | |
Pokitto | 0:e8b8f36b4505 | 359 | #define POK_BATTERY_PIN1 P0_22 // read battery level through these pins |
Pokitto | 0:e8b8f36b4505 | 360 | #define POK_BATTERY_PIN2 P0_23 |
Pokitto | 0:e8b8f36b4505 | 361 | |
Pokitto | 0:e8b8f36b4505 | 362 | #define POK_BTN_A_PIN P1_9 |
Pokitto | 0:e8b8f36b4505 | 363 | #define POK_BTN_B_PIN P1_4 |
Pokitto | 0:e8b8f36b4505 | 364 | #define POK_BTN_C_PIN P1_10 |
Pokitto | 0:e8b8f36b4505 | 365 | #define POK_BTN_UP_PIN P1_13 |
Pokitto | 0:e8b8f36b4505 | 366 | #define POK_BTN_DOWN_PIN P1_3 |
Pokitto | 0:e8b8f36b4505 | 367 | #define POK_BTN_LEFT_PIN P1_25 |
Pokitto | 0:e8b8f36b4505 | 368 | #define POK_BTN_RIGHT_PIN P1_7 |
Pokitto | 0:e8b8f36b4505 | 369 | |
Pokitto | 0:e8b8f36b4505 | 370 | #define UPBIT 0 |
Pokitto | 0:e8b8f36b4505 | 371 | #define DOWNBIT 1 |
Pokitto | 0:e8b8f36b4505 | 372 | #define LEFTBIT 2 |
Pokitto | 0:e8b8f36b4505 | 373 | #define RIGHTBIT 3 |
Pokitto | 0:e8b8f36b4505 | 374 | #define ABIT 4 |
Pokitto | 0:e8b8f36b4505 | 375 | #define BBIT 5 |
Pokitto | 0:e8b8f36b4505 | 376 | #define CBIT 6 |
Pokitto | 0:e8b8f36b4505 | 377 | |
Pokitto | 0:e8b8f36b4505 | 378 | #endif // POKITTO_SETTINGS_H |
Pokitto | 0:e8b8f36b4505 | 379 |