| 
									
										
										
										
											2013-04-17 23:29:41 -04:00
										 |  |  | // Copyright 2013 Dolphin Emulator Project
 | 
					
						
							|  |  |  | // Licensed under GPLv2
 | 
					
						
							|  |  |  | // Refer to the license.txt file included.
 | 
					
						
							| 
									
										
										
										
											2010-06-09 01:37:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-10 13:54:46 -05:00
										 |  |  | #pragma once
 | 
					
						
							| 
									
										
										
										
											2013-04-13 23:54:02 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-17 05:18:15 -05:00
										 |  |  | #include "Common/Common.h"
 | 
					
						
							| 
									
										
										
										
											2011-01-31 01:28:32 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-16 13:17:32 -07:00
										 |  |  | #include "VideoCommon/CommandProcessor.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-09 01:37:08 +00:00
										 |  |  | class PointerWrap; | 
					
						
							| 
									
										
										
										
											2014-02-04 01:09:57 +01: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 13:17:32 -07:00
										 |  |  | 	using UCPStatusReg = CommandProcessor::UCPStatusReg; | 
					
						
							|  |  |  | 	using UCPCtrlReg = CommandProcessor::UCPCtrlReg; | 
					
						
							|  |  |  | 	using UCPClearReg = CommandProcessor::UCPClearReg; | 
					
						
							| 
									
										
										
										
											2013-04-13 23:54:02 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	struct CPReg | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		UCPStatusReg status;    // 0x00
 | 
					
						
							|  |  |  | 		UCPCtrlReg ctrl;        // 0x02
 | 
					
						
							|  |  |  | 		UCPClearReg clear;      // 0x04
 | 
					
						
							| 
									
										
										
										
											2014-02-04 01:08:36 +01:00
										 |  |  | 		u32 unk0;               // 0x08
 | 
					
						
							|  |  |  | 		u16 unk1;               // 0x0c
 | 
					
						
							| 
									
										
										
										
											2013-04-13 23:54:02 -04:00
										 |  |  | 		u16 token;              // 0x0e
 | 
					
						
							|  |  |  | 		u16 bboxleft;           // 0x10
 | 
					
						
							|  |  |  | 		u16 bboxtop;            // 0x12
 | 
					
						
							|  |  |  | 		u16 bboxright;          // 0x14
 | 
					
						
							|  |  |  | 		u16 bboxbottom;         // 0x16
 | 
					
						
							| 
									
										
										
										
											2014-02-04 01:08:36 +01:00
										 |  |  | 		u32 unk2;               // 0x18
 | 
					
						
							|  |  |  | 		u32 unk3;               // 0x1c
 | 
					
						
							| 
									
										
										
										
											2013-04-13 23:54:02 -04: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 01:09:57 +01:00
										 |  |  | 	void RegisterMMIO(MMIO::Mapping* mmio, u32 base); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-13 23:54:02 -04: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
 |