project64/Source/Project64-core/N64System/Mips/PifRam.h

64 lines
1.8 KiB
C
Raw Normal View History

2012-12-19 09:30:18 +00:00
/****************************************************************************
* *
2015-11-10 05:21:49 +00:00
* Project64 - A Nintendo 64 emulator. *
2012-12-19 09:30:18 +00:00
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
2015-12-06 09:59:58 +00:00
#include <Project64-core/Logging.h>
#include "Eeprom.h"
class CPifRamSettings
{
protected:
CPifRamSettings();
virtual ~CPifRamSettings();
bool bShowPifRamErrors() const
2015-03-29 17:19:28 +00:00
{
return m_bShowPifRamErrors;
}
private:
static void RefreshSettings(void*);
static bool m_bShowPifRamErrors;
static int m_RefCount;
};
class CPifRam :
public CLogging,
private CPifRamSettings,
private CEeprom
{
public:
CPifRam(bool SavesReadOnly);
~CPifRam();
void Reset();
void PifRamWrite();
void PifRamRead();
void SI_DMA_READ();
void SI_DMA_WRITE();
protected:
2015-12-06 09:59:58 +00:00
uint8_t m_PifRom[0x7C0];
uint8_t m_PifRam[0x40];
private:
#define CHALLENGE_LENGTH 0x20
2015-12-06 09:59:58 +00:00
void ProcessControllerCommand ( int Control, uint8_t * Command );
void ReadControllerCommand ( int Control, uint8_t * Command );
void LogControllerPakData ( char * Description );
void n64_cic_nus_6105 (char challenge[], char response[], int length);
2015-01-31 19:27:27 +00:00
};