mirror of
				https://github.com/N64Recomp/N64ModernRuntime.git
				synced 2025-10-30 08:02:29 +00:00 
			
		
		
		
	Fixed bitpattern pointer for osContInit and removed shader cache functionality (#69)
This commit is contained in:
		
							parent
							
								
									ef6e84cb8a
								
							
						
					
					
						commit
						d5c81d0a6b
					
				
					 7 changed files with 7 additions and 19 deletions
				
			
		|  | @ -16,8 +16,11 @@ extern "C" void osContInit_recomp(uint8_t* rdram, recomp_context* ctx) { | |||
|     PTR(OSMesgQueue) mq = _arg<0, PTR(OSMesgQueue)>(rdram, ctx); | ||||
|     PTR(u8) bitpattern = _arg<1, PTR(u8)>(rdram, ctx); | ||||
|     PTR(OSContStatus) data = _arg<2, PTR(OSContStatus)>(rdram, ctx); | ||||
|     u8 bitpattern_local = 0; | ||||
| 
 | ||||
|     s32 ret = osContInit(PASS_RDRAM mq, bitpattern, data); | ||||
|     s32 ret = osContInit(PASS_RDRAM mq, &bitpattern_local, data); | ||||
| 
 | ||||
|     MEM_B(0, bitpattern) = bitpattern_local; | ||||
| 
 | ||||
|     _return<s32>(ctx, ret); | ||||
| } | ||||
|  |  | |||
|  | @ -551,7 +551,6 @@ bool wait_for_game_started(uint8_t* rdram, recomp_context* context) { | |||
| 
 | ||||
|                 save_type = game_entry.save_type; | ||||
|                 ultramodern::init_saving(rdram); | ||||
|                 ultramodern::load_shader_cache(game_entry.cache_data); | ||||
| 
 | ||||
|                 try { | ||||
|                     game_entry.entrypoint(rdram, context); | ||||
|  |  | |||
|  | @ -72,7 +72,6 @@ namespace ultramodern { | |||
|                 virtual void shutdown() = 0; | ||||
|                 virtual uint32_t get_display_framerate() const = 0; | ||||
|                 virtual float get_resolution_scale() const = 0; | ||||
|                 virtual void load_shader_cache(std::span<const char> cache_binary) = 0; | ||||
| 
 | ||||
|             protected: | ||||
|                 SetupResult setup_result; | ||||
|  |  | |||
|  | @ -297,7 +297,7 @@ u32 osVirtualToPhysical(PTR(void) addr); | |||
| 
 | ||||
| /* Controller interface */ | ||||
| 
 | ||||
| s32 osContInit(RDRAM_ARG PTR(OSMesgQueue), PTR(u8), PTR(OSContStatus)); | ||||
| s32 osContInit(RDRAM_ARG PTR(OSMesgQueue), u8*, PTR(OSContStatus)); | ||||
| s32 osContReset(RDRAM_ARG PTR(OSMesgQueue), PTR(OSContStatus)); | ||||
| s32 osContStartQuery(RDRAM_ARG PTR(OSMesgQueue)); | ||||
| s32 osContStartReadData(RDRAM_ARG PTR(OSMesgQueue)); | ||||
|  |  | |||
|  | @ -85,7 +85,6 @@ void sleep_until(const std::chrono::high_resolution_clock::time_point& time_poin | |||
| uint32_t get_target_framerate(uint32_t original); | ||||
| uint32_t get_display_refresh_rate(); | ||||
| float get_resolution_scale(); | ||||
| void load_shader_cache(std::span<const char> cache_data); | ||||
| void trigger_config_action(); | ||||
| 
 | ||||
| // Audio
 | ||||
|  |  | |||
|  | @ -34,11 +34,7 @@ struct SwapBuffersAction { | |||
| struct UpdateConfigAction { | ||||
| }; | ||||
| 
 | ||||
| struct LoadShaderCacheAction { | ||||
|     std::span<const char> data; | ||||
| }; | ||||
| 
 | ||||
| using Action = std::variant<SpTaskAction, SwapBuffersAction, UpdateConfigAction, LoadShaderCacheAction>; | ||||
| using Action = std::variant<SpTaskAction, SwapBuffersAction, UpdateConfigAction>; | ||||
| 
 | ||||
| static struct { | ||||
|     struct { | ||||
|  | @ -248,10 +244,6 @@ float ultramodern::get_resolution_scale() { | |||
|     return resolution_scale.load(); | ||||
| } | ||||
| 
 | ||||
| void ultramodern::load_shader_cache(std::span<const char> cache_data) { | ||||
|     events_context.action_queue.enqueue(LoadShaderCacheAction{cache_data}); | ||||
| } | ||||
| 
 | ||||
| void ultramodern::trigger_config_action() { | ||||
|     events_context.action_queue.enqueue(UpdateConfigAction{}); | ||||
| } | ||||
|  | @ -321,9 +313,6 @@ void gfx_thread_func(uint8_t* rdram, moodycamel::LightweightSemaphore* thread_re | |||
|                     old_config = new_config; | ||||
|                 } | ||||
|             } | ||||
|             else if (const auto* load_shader_cache_action = std::get_if<LoadShaderCacheAction>(&action)) { | ||||
|                 renderer_context->load_shader_cache(load_shader_cache_action->data); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -82,8 +82,7 @@ static void __osContGetInitData(u8* pattern, OSContStatus *data) { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| extern "C" s32 osContInit(RDRAM_ARG PTR(OSMesgQueue) mq, PTR(u8) bitpattern_, PTR(OSContStatus) data_) { | ||||
|     u8 *bitpattern = TO_PTR(u8, bitpattern_); | ||||
| extern "C" s32 osContInit(RDRAM_ARG PTR(OSMesgQueue) mq, u8* bitpattern, PTR(OSContStatus) data_) { | ||||
|     OSContStatus *data = TO_PTR(OSContStatus, data_); | ||||
| 
 | ||||
|     max_controllers = MAXCONTROLLERS; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Wiseguy
						Wiseguy