mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Minor tidying up
This commit is contained in:
		
							parent
							
								
									26e90a99cd
								
							
						
					
					
						commit
						cf985631e0
					
				
					 7 changed files with 27 additions and 14 deletions
				
			
		
							
								
								
									
										8
									
								
								TODO
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								TODO
									
										
									
									
									
								
							|  | @ -4,8 +4,7 @@ | ||||||
| ✔ CPU @done(19-08-13 15:41) | ✔ CPU @done(19-08-13 15:41) | ||||||
| ✔ Memory @done(19-08-13 15:41) | ✔ Memory @done(19-08-13 15:41) | ||||||
|     ☐ Page tables |     ☐ Page tables | ||||||
|     ✘ Skip N3DS RAM if unused @cancelled(20-01-03 15:26) |     ✔ Skip N3DS RAM if unused @done(20-01-03 23:26) | ||||||
|         Since no n3ds support, leave this for now |  | ||||||
| ✔ DSP @done(19-12-28 16:57) | ✔ DSP @done(19-12-28 16:57) | ||||||
|     Memory only |     Memory only | ||||||
| ✔ Service manager @started(19-12-23 00:36) @done(19-12-23 11:38) @lasted(11h2m3s) | ✔ Service manager @started(19-12-23 00:36) @done(19-12-23 11:38) @lasted(11h2m3s) | ||||||
|  | @ -99,7 +98,7 @@ | ||||||
|         ✔ AM @started(19-12-24 23:17) @done(19-12-24 23:53) @lasted(36m8s) |         ✔ AM @started(19-12-24 23:17) @done(19-12-24 23:53) @lasted(36m8s) | ||||||
|         ✔ APT @done(19-12-25 21:41) |         ✔ APT @done(19-12-25 21:41) | ||||||
|         ✔ BOSS @started(19-12-25 21:48) @done(19-12-25 23:18) @lasted(1h30m14s) |         ✔ BOSS @started(19-12-25 21:48) @done(19-12-25 23:18) @lasted(1h30m14s) | ||||||
|         ☐ CAM @started(19-12-26 10:37) |         ✔ CAM @started(19-12-26 10:37) @done(20-01-03 23:38) @lasted(1w1d13h1m50s) | ||||||
|             Need to check capture_result |             Need to check capture_result | ||||||
|         ✔ CECD @done(20-01-01 23:58) |         ✔ CECD @done(20-01-01 23:58) | ||||||
|         ✔ CFG @done(20-01-02 00:44) |         ✔ CFG @done(20-01-02 00:44) | ||||||
|  | @ -111,7 +110,8 @@ | ||||||
|         ✔ FRD @done(19-12-26 19:09) |         ✔ FRD @done(19-12-26 19:09) | ||||||
|         ✔ FS @done(19-12-27 11:46) |         ✔ FS @done(19-12-27 11:46) | ||||||
|         ✔ GSP @done(19-12-30 12:45) |         ✔ GSP @done(19-12-30 12:45) | ||||||
|             ☐ Fix the global weak_ptr to gsp |             ✔ Fix the global weak_ptr to gsp @done(20-01-04 00:29) | ||||||
|  |                 Didn't quite 'fix' it but worked around it | ||||||
|         ✔ HID @done(19-12-30 14:46) |         ✔ HID @done(19-12-30 14:46) | ||||||
|         ✔ HTTP @done(19-12-30 15:18) |         ✔ HTTP @done(19-12-30 15:18) | ||||||
|         ✔ IR @done(19-12-30 16:06) |         ✔ IR @done(19-12-30 16:06) | ||||||
|  |  | ||||||
|  | @ -31,6 +31,7 @@ | ||||||
| #include "core/hle/kernel/process.h" | #include "core/hle/kernel/process.h" | ||||||
| #include "core/hle/kernel/thread.h" | #include "core/hle/kernel/thread.h" | ||||||
| #include "core/hle/service/fs/archive.h" | #include "core/hle/service/fs/archive.h" | ||||||
|  | #include "core/hle/service/gsp/gsp.h" | ||||||
| #include "core/hle/service/service.h" | #include "core/hle/service/service.h" | ||||||
| #include "core/hle/service/sm/sm.h" | #include "core/hle/service/sm/sm.h" | ||||||
| #include "core/hw/gpu.h" | #include "core/hw/gpu.h" | ||||||
|  | @ -213,8 +214,8 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo | ||||||
| 
 | 
 | ||||||
|     timing = std::make_unique<Timing>(); |     timing = std::make_unique<Timing>(); | ||||||
| 
 | 
 | ||||||
|     kernel = std::make_unique<Kernel::KernelSystem>(*memory, *timing, |     kernel = std::make_unique<Kernel::KernelSystem>( | ||||||
|                                                     [this] { PrepareReschedule(); }, system_mode); |         *memory, *timing, [this] { PrepareReschedule(); }, system_mode); | ||||||
| 
 | 
 | ||||||
|     if (Settings::values.use_cpu_jit) { |     if (Settings::values.use_cpu_jit) { | ||||||
| #ifdef ARCHITECTURE_x86_64 | #ifdef ARCHITECTURE_x86_64 | ||||||
|  | @ -413,6 +414,9 @@ void System::serialize(Archive& ar, const unsigned int file_version) { | ||||||
|     ar & dsp_core->GetDspMemory(); |     ar & dsp_core->GetDspMemory(); | ||||||
|     ar&* memory.get(); |     ar&* memory.get(); | ||||||
|     ar&* kernel.get(); |     ar&* kernel.get(); | ||||||
|  | 
 | ||||||
|  |     // This needs to be set from somewhere - might as well be here!
 | ||||||
|  |     Service::GSP::SetGlobalModule(*this); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void System::Save(std::ostream& stream) const { | void System::Save(std::ostream& stream) const { | ||||||
|  |  | ||||||
|  | @ -830,8 +830,7 @@ private: | ||||||
|             ar& completion_event; |             ar& completion_event; | ||||||
|             ar& buffer_error_interrupt_event; |             ar& buffer_error_interrupt_event; | ||||||
|             ar& vsync_interrupt_event; |             ar& vsync_interrupt_event; | ||||||
|             // TODO: Check if this is ever needed:
 |             // Ignore capture_result. In-progress captures might be affected but this is OK.
 | ||||||
|             // ar & capture_result;
 |  | ||||||
|             ar& dest_process; |             ar& dest_process; | ||||||
|             ar& dest; |             ar& dest; | ||||||
|             ar& dest_size; |             ar& dest_size; | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| 
 | 
 | ||||||
| namespace Service::GSP { | namespace Service::GSP { | ||||||
| 
 | 
 | ||||||
| static std::weak_ptr<GSP_GPU> gsp_gpu; // TODO: Fix this for the love of god
 | static std::weak_ptr<GSP_GPU> gsp_gpu; | ||||||
| 
 | 
 | ||||||
| void SignalInterrupt(InterruptId interrupt_id) { | void SignalInterrupt(InterruptId interrupt_id) { | ||||||
|     auto gpu = gsp_gpu.lock(); |     auto gpu = gsp_gpu.lock(); | ||||||
|  | @ -27,4 +27,8 @@ void InstallInterfaces(Core::System& system) { | ||||||
|     std::make_shared<GSP_LCD>()->InstallAsService(service_manager); |     std::make_shared<GSP_LCD>()->InstallAsService(service_manager); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void SetGlobalModule(Core::System& system) { | ||||||
|  |     gsp_gpu = system.ServiceManager().GetService<GSP_GPU>("gsp::Gpu"); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| } // namespace Service::GSP
 | } // namespace Service::GSP
 | ||||||
|  |  | ||||||
|  | @ -23,4 +23,6 @@ namespace Service::GSP { | ||||||
| void SignalInterrupt(InterruptId interrupt_id); | void SignalInterrupt(InterruptId interrupt_id); | ||||||
| 
 | 
 | ||||||
| void InstallInterfaces(Core::System& system); | void InstallInterfaces(Core::System& system); | ||||||
|  | 
 | ||||||
|  | void SetGlobalModule(Core::System& system); | ||||||
| } // namespace Service::GSP
 | } // namespace Service::GSP
 | ||||||
|  |  | ||||||
|  | @ -444,6 +444,7 @@ private: | ||||||
| 
 | 
 | ||||||
|     template <class Archive> |     template <class Archive> | ||||||
|     void serialize(Archive& ar, const unsigned int) { |     void serialize(Archive& ar, const unsigned int) { | ||||||
|  |         ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); | ||||||
|         ar& shared_memory; |         ar& shared_memory; | ||||||
|         ar& active_thread_id; |         ar& active_thread_id; | ||||||
|         ar& first_initialization; |         ar& first_initialization; | ||||||
|  |  | ||||||
|  | @ -18,6 +18,7 @@ | ||||||
| #include "core/hle/kernel/process.h" | #include "core/hle/kernel/process.h" | ||||||
| #include "core/hle/lock.h" | #include "core/hle/lock.h" | ||||||
| #include "core/memory.h" | #include "core/memory.h" | ||||||
|  | #include "core/settings.h" | ||||||
| #include "video_core/renderer_base.h" | #include "video_core/renderer_base.h" | ||||||
| #include "video_core/video_core.h" | #include "video_core/video_core.h" | ||||||
| 
 | 
 | ||||||
|  | @ -84,15 +85,17 @@ private: | ||||||
|     friend class boost::serialization::access; |     friend class boost::serialization::access; | ||||||
|     template <class Archive> |     template <class Archive> | ||||||
|     void serialize(Archive& ar, const unsigned int file_version) { |     void serialize(Archive& ar, const unsigned int file_version) { | ||||||
|         ar& boost::serialization::make_binary_object(fcram.get(), Memory::FCRAM_N3DS_SIZE); |         bool save_n3ds_ram = Settings::values.is_new_3ds; | ||||||
|  |         ar& save_n3ds_ram; | ||||||
|         ar& boost::serialization::make_binary_object(vram.get(), Memory::VRAM_SIZE); |         ar& boost::serialization::make_binary_object(vram.get(), Memory::VRAM_SIZE); | ||||||
|         // TODO: When n3ds support is added, put this back in
 |         ar& boost::serialization::make_binary_object( | ||||||
|         // ar& boost::serialization::make_binary_object(n3ds_extra_ram.get(),
 |             fcram.get(), save_n3ds_ram ? Memory::FCRAM_N3DS_SIZE : Memory::FCRAM_SIZE); | ||||||
|         //                                              Memory::N3DS_EXTRA_RAM_SIZE);
 |         ar& boost::serialization::make_binary_object( | ||||||
|         ar& current_page_table; |             n3ds_extra_ram.get(), save_n3ds_ram ? Memory::N3DS_EXTRA_RAM_SIZE : 0); | ||||||
|         ar& cache_marker; |         ar& cache_marker; | ||||||
|         ar& page_table_list; |         ar& page_table_list; | ||||||
|         // dsp is set from Core::System at startup
 |         // dsp is set from Core::System at startup
 | ||||||
|  |         // current page table set from current process?
 | ||||||
|     } |     } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue