1 /*************************************************************************** 2 * Copyright (C) 2016 by iCatButler * 3 * * 4 * This program is free software; you can redistribute it and/or modify * 5 * it under the terms of the GNU General Public License as published by * 6 * the Free Software Foundation; either version 2 of the License, or * 7 * (at your option) any later version. * 8 * * 9 * This program is distributed in the hope that it will be useful, * 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 * GNU General Public License for more details. * 13 * * 14 * You should have received a copy of the GNU General Public License * 15 * along with this program; if not, write to the * 16 * Free Software Foundation, Inc., * 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 18 ***************************************************************************/ 19 20 /************************************************************************** 21 * pgxp_mem.h 22 * PGXP - Parallel/Precision Geometry Xform Pipeline 23 * 24 * Created on: 07 Jun 2016 25 * Author: iCatButler 26 ***************************************************************************/ 27 28 #ifndef _PGXP_MEM_H_ 29 #define _PGXP_MEM_H_ 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 36 #include "pgxp_types.h" 37 38 void PGXP_InitMem(void); 39 40 char* PGXP_GetMem(); // return pointer to precision memory 41 u32 PGXP_ConvertAddress(u32 addr); 42 43 PGXP_value* GetPtr(u32 addr); 44 PGXP_value* ReadMem(u32 addr); 45 46 void ValidateAndCopyMem(PGXP_value* dest, u32 addr, u32 value); 47 void ValidateAndCopyMem16(PGXP_value* dest, u32 addr, u32 value, int sign); 48 49 void WriteMem(PGXP_value* value, u32 addr); 50 void WriteMem16(PGXP_value* src, u32 addr); 51 52 void PGXP_SetLastDMA(u32 addr); 53 u32 PGXP_GetLastDMA(); 54 55 #ifdef __cplusplus 56 } 57 #endif 58 59 #endif//_PGXP_MEM_H_ 60