Arachnoid GLESv1.1 plugin. Compile and run (a bit glitchy and no frameskip) on the...
[mupen64plus-pandora.git] / source / mupen64plus-video-arachnoid / src / Memory.cpp
CommitLineData
22726e4d 1/******************************************************************************
2 * Arachnoid Graphics Plugin for Mupen64Plus
3 * http://bitbucket.org/wahrhaft/mupen64plus-video-arachnoid/
4 *
5 * Copyright (C) 2007 Kristofer Karlsson, Rickard Niklasson
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *****************************************************************************/
21
22#include "Memory.h"
23
24//-----------------------------------------------------------------------------
25//* Static variables
26//-----------------------------------------------------------------------------
27unsigned long long Memory::m_TMEM[512] = {0};
28
29//-----------------------------------------------------------------------------
30//! Constructor
31//-----------------------------------------------------------------------------
32Memory::Memory()
33{
34
35}
36
37//-----------------------------------------------------------------------------
38//! Destructor
39//-----------------------------------------------------------------------------
40Memory::~Memory()
41{
42
43}
44
45//-----------------------------------------------------------------------------
46//* Initialize
47//! Saves pointers to memory areas, resets segment register, and detects
48//! size of RDRAM.
49//! @param RDRAM Pointer to "Rambus Dynamic Random Access Memory"
50//! @param DMEM Pointer to "RSP Data Memory"
51//-----------------------------------------------------------------------------
52bool Memory::initialize(unsigned char* RDRAM, unsigned char* DMEM)
53{
54 //Save pointer to memory
55 m_RDRAM = RDRAM;
56 m_DMEM = DMEM;
57
58 //Reset Segment
59 for (int i=0; i<16; ++i)
60 {
61 m_segments[i] = 0;
62 }
63
64 //Reset Texture Memory
65 //for (int i=0; i<512; ++i)
66 //{
67 // m_TMEM[i] = 0;
68 //}
69
70 m_RDRAMSize = 0x800000;
71 return true;
72}