1 /* RetroArch - A frontend for libretro. 2 * Copyright (C) 2010-2014 - Hans-Kristian Arntzen 3 * copyright (c) 2011-2017 - Daniel De Matteis 4 * copyright (c) 2016-2017 - Brad Parker 5 * 6 * RetroArch is free software: you can redistribute it and/or modify it under the terms 7 * of the GNU General Public License as published by the Free Software Found- 8 * ation, either version 3 of the License, or (at your option) any later version. 9 * 10 * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 * PURPOSE. See the GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License along with RetroArch. 15 * If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef __FPGA_COMMON_H 19 #define __FPGA_COMMON_H 20 21 #define NUMBER_OF_WRITE_FRAMES 1//XPAR_AXIVDMA_0_NUM_FSTORES 22 #define STORAGE_SIZE NUMBER_OF_WRITE_FRAMES * ((1920*1080)<<2) 23 #define FRAME_SIZE (STORAGE_SIZE / NUMBER_OF_WRITE_FRAMES) 24 25 #define FB_WIDTH 1920 26 #define FB_HEIGHT 1080 27 28 typedef struct RegOp 29 { 30 int fd; 31 void *ptr; 32 int only_mmap; 33 int only_munmap; 34 } RegOp; 35 36 typedef struct fpga 37 { 38 bool rgb32; 39 bool menu_rgb32; 40 unsigned menu_width; 41 unsigned menu_height; 42 unsigned menu_pitch; 43 unsigned video_width; 44 unsigned video_height; 45 unsigned video_pitch; 46 unsigned video_bits; 47 unsigned menu_bits; 48 49 RegOp regOp; 50 volatile unsigned *framebuffer; 51 unsigned char *menu_frame; 52 } fpga_t; 53 54 #endif 55