2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2009 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:29:41 +00:00
|
|
|
// Refer to the license.txt file included.
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2013-04-14 03:54:02 +00:00
|
|
|
|
2014-09-08 01:06:58 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2011-01-31 01:28:32 +00:00
|
|
|
|
2014-06-16 20:17:32 +00:00
|
|
|
#include "VideoCommon/CommandProcessor.h"
|
|
|
|
|
2010-06-09 01:37:08 +00:00
|
|
|
class PointerWrap;
|
2014-02-04 00:09:57 +00:00
|
|
|
namespace MMIO { class Mapping; }
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2011-02-03 19:55:30 +00:00
|
|
|
namespace SWCommandProcessor
|
2010-06-09 01:37:08 +00:00
|
|
|
{
|
2014-06-16 20:17:32 +00:00
|
|
|
using UCPStatusReg = CommandProcessor::UCPStatusReg;
|
|
|
|
using UCPCtrlReg = CommandProcessor::UCPCtrlReg;
|
|
|
|
using UCPClearReg = CommandProcessor::UCPClearReg;
|
2013-04-14 03:54:02 +00:00
|
|
|
|
|
|
|
struct CPReg
|
|
|
|
{
|
|
|
|
UCPStatusReg status; // 0x00
|
|
|
|
UCPCtrlReg ctrl; // 0x02
|
|
|
|
UCPClearReg clear; // 0x04
|
2014-02-04 00:08:36 +00:00
|
|
|
u32 unk0; // 0x08
|
|
|
|
u16 unk1; // 0x0c
|
2013-04-14 03:54:02 +00:00
|
|
|
u16 token; // 0x0e
|
|
|
|
u16 bboxleft; // 0x10
|
|
|
|
u16 bboxtop; // 0x12
|
|
|
|
u16 bboxright; // 0x14
|
|
|
|
u16 bboxbottom; // 0x16
|
2014-02-04 00:08:36 +00:00
|
|
|
u32 unk2; // 0x18
|
|
|
|
u32 unk3; // 0x1c
|
2013-04-14 03:54:02 +00:00
|
|
|
u32 fifobase; // 0x20
|
|
|
|
u32 fifoend; // 0x24
|
|
|
|
u32 hiwatermark; // 0x28
|
|
|
|
u32 lowatermark; // 0x2c
|
|
|
|
u32 rwdistance; // 0x30
|
|
|
|
u32 writeptr; // 0x34
|
|
|
|
u32 readptr; // 0x38
|
|
|
|
u32 breakpt; // 0x3c
|
|
|
|
};
|
|
|
|
|
|
|
|
// Init
|
|
|
|
void Init();
|
|
|
|
void Shutdown();
|
|
|
|
void DoState(PointerWrap &p);
|
|
|
|
|
2014-02-04 00:09:57 +00:00
|
|
|
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
|
|
|
|
2013-04-14 03:54:02 +00:00
|
|
|
bool RunBuffer();
|
|
|
|
void RunGpu();
|
|
|
|
|
|
|
|
// for CGPFIFO
|
|
|
|
void GatherPipeBursted();
|
|
|
|
void UpdateInterrupts(u64 userdata);
|
|
|
|
void UpdateInterruptsFromVideoBackend(u64 userdata);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2011-03-16 22:48:17 +00:00
|
|
|
void SetRendering(bool enabled);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2011-02-03 19:55:30 +00:00
|
|
|
} // end of namespace SWCommandProcessor
|