pla.h
1 /* 2 Copyright Frank Bösing, 2017 3 4 This file is part of Teensy64. 5 6 Teensy64 is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Teensy64 is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Teensy64. If not, see <http://www.gnu.org/licenses/>. 18 19 Diese Datei ist Teil von Teensy64. 20 21 Teensy64 ist Freie Software: Sie können es unter den Bedingungen 22 der GNU General Public License, wie von der Free Software Foundation, 23 Version 3 der Lizenz oder (nach Ihrer Wahl) jeder späteren 24 veröffentlichten Version, weiterverbreiten und/oder modifizieren. 25 26 Teensy64 wird in der Hoffnung, dass es nützlich sein wird, aber 27 OHNE JEDE GEWÄHRLEISTUNG, bereitgestellt; sogar ohne die implizite 28 Gewährleistung der MARKTFÄHIGKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. 29 Siehe die GNU General Public License für weitere Details. 30 31 Sie sollten eine Kopie der GNU General Public License zusammen mit diesem 32 Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>. 33 34 */ 35 36 #ifndef Teensy64_pla_h_ 37 #define Teensy64_pla_h_ 38 39 #define CONSTROM const 40 41 #define MEM_BASIC_ROM 0xA000 42 #define MEM_CHARSET_ROM 0xD000 43 #define MEM_KERNAL_ROM 0xE000 44 45 #define MEM_VIC 0xD000 46 #define MEM_VICCOLOR 0xD800 47 #define MEM_SID 0xD400 48 #define MEM_CIA1 0xDC00 49 #define MEM_CIA2 0xDD00 50 51 //C64 Memory/Device access (PLA) 52 53 /* READ */ 54 typedef uint8_t (*r_ptr_t)( uint32_t address ); //Funktionspointer auf uint8_t foo(uint16_t address); 55 typedef r_ptr_t rarray_t[256]; //Array von Funktionspointern 56 typedef rarray_t * r_rarr_ptr_t; //Pointer auf Array von Funktionspointern 57 58 /* WRITE */ 59 typedef void (*w_ptr_t)( uint32_t address, uint8_t value ); //Funktionspointer auf void foo( uint16_t address, uint8_t value ); 60 typedef w_ptr_t warray_t[256]; //Array von Funktionspointern 61 typedef warray_t * w_rarr_ptr_t; //Pointer auf Array von Funktionspointern 62 63 64 void resetPLA(void); 65 66 #endif