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>
|
2016-01-13 11:15:30 +00:00
|
|
|
#include <Project64-core/N64System/Mips/Eeprom.h>
|
2015-12-06 09:59:58 +00:00
|
|
|
|
2010-06-14 21:14:58 +00:00
|
|
|
class CPifRam :
|
2015-11-13 13:23:43 +00:00
|
|
|
public CLogging,
|
2016-01-13 21:29:55 +00:00
|
|
|
private CEeprom
|
2010-06-14 21:14:58 +00:00
|
|
|
{
|
|
|
|
public:
|
2016-01-13 21:29:55 +00:00
|
|
|
CPifRam(bool SavesReadOnly);
|
|
|
|
~CPifRam();
|
2010-06-14 21:14:58 +00:00
|
|
|
|
2016-01-13 21:29:55 +00:00
|
|
|
void Reset();
|
2011-01-02 10:40:00 +00:00
|
|
|
|
2016-01-13 21:29:55 +00:00
|
|
|
void PifRamWrite();
|
|
|
|
void PifRamRead();
|
2010-06-14 21:14:58 +00:00
|
|
|
|
2016-01-13 21:29:55 +00:00
|
|
|
void SI_DMA_READ();
|
|
|
|
void SI_DMA_WRITE();
|
2010-06-14 21:14:58 +00:00
|
|
|
|
|
|
|
protected:
|
2015-12-06 09:59:58 +00:00
|
|
|
uint8_t m_PifRom[0x7C0];
|
|
|
|
uint8_t m_PifRam[0x40];
|
2010-06-14 21:14:58 +00:00
|
|
|
|
|
|
|
private:
|
2016-01-18 08:54:39 +00:00
|
|
|
CPifRam(); // Disable default constructor
|
|
|
|
CPifRam(const CPifRam&); // Disable copy constructor
|
|
|
|
CPifRam& operator=(const CPifRam&); // Disable assignment
|
|
|
|
|
|
|
|
enum { CHALLENGE_LENGTH = 0x20 };
|
|
|
|
void ProcessControllerCommand(int32_t Control, uint8_t * Command);
|
|
|
|
void ReadControllerCommand(int32_t Control, uint8_t * Command);
|
|
|
|
void LogControllerPakData(const char * Description);
|
|
|
|
void n64_cic_nus_6105(char challenge[], char response[], int32_t length);
|
2015-01-31 19:27:27 +00:00
|
|
|
};
|