MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / RT64Context

Method RT64Context

src/main/rt64_render_context.cpp:205–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205zelda64::renderer::RT64Context::RT64Context(uint8_t* rdram, ultramodern::renderer::WindowHandle window_handle, bool debug) {
206 static unsigned char dummy_rom_header[0x40];
207 recompui::set_render_hooks();
208
209 // Set up the RT64 application core fields.
210 RT64::Application::Core appCore{};
211#if defined(_WIN32)
212 appCore.window = window_handle.window;
213#elif defined(__linux__) || defined(__ANDROID__)
214 appCore.window = window_handle;
215#elif defined(__APPLE__)
216 appCore.window.window = window_handle.window;
217 appCore.window.view = window_handle.view;
218#endif
219
220 appCore.checkInterrupts = dummy_check_interrupts;
221
222 appCore.HEADER = dummy_rom_header;
223 appCore.RDRAM = rdram;
224 appCore.DMEM = DMEM;
225 appCore.IMEM = IMEM;
226
227 appCore.MI_INTR_REG = &MI_INTR_REG;
228
229 appCore.DPC_START_REG = &DPC_START_REG;
230 appCore.DPC_END_REG = &DPC_END_REG;
231 appCore.DPC_CURRENT_REG = &DPC_CURRENT_REG;
232 appCore.DPC_STATUS_REG = &DPC_STATUS_REG;
233 appCore.DPC_CLOCK_REG = &DPC_CLOCK_REG;
234 appCore.DPC_BUFBUSY_REG = &DPC_BUFBUSY_REG;
235 appCore.DPC_PIPEBUSY_REG = &DPC_PIPEBUSY_REG;
236 appCore.DPC_TMEM_REG = &DPC_TMEM_REG;
237
238 ultramodern::renderer::ViRegs* vi_regs = ultramodern::renderer::get_vi_regs();
239
240 appCore.VI_STATUS_REG = &vi_regs->VI_STATUS_REG;
241 appCore.VI_ORIGIN_REG = &vi_regs->VI_ORIGIN_REG;
242 appCore.VI_WIDTH_REG = &vi_regs->VI_WIDTH_REG;
243 appCore.VI_INTR_REG = &vi_regs->VI_INTR_REG;
244 appCore.VI_V_CURRENT_LINE_REG = &vi_regs->VI_V_CURRENT_LINE_REG;
245 appCore.VI_TIMING_REG = &vi_regs->VI_TIMING_REG;
246 appCore.VI_V_SYNC_REG = &vi_regs->VI_V_SYNC_REG;
247 appCore.VI_H_SYNC_REG = &vi_regs->VI_H_SYNC_REG;
248 appCore.VI_LEAP_REG = &vi_regs->VI_LEAP_REG;
249 appCore.VI_H_START_REG = &vi_regs->VI_H_START_REG;
250 appCore.VI_V_START_REG = &vi_regs->VI_V_START_REG;
251 appCore.VI_V_BURST_REG = &vi_regs->VI_V_BURST_REG;
252 appCore.VI_X_SCALE_REG = &vi_regs->VI_X_SCALE_REG;
253 appCore.VI_Y_SCALE_REG = &vi_regs->VI_Y_SCALE_REG;
254
255 // Set up the RT64 application configuration fields.
256 RT64::ApplicationConfiguration appConfig;
257 appConfig.useConfigurationFile = false;
258
259 // Create the RT64 application.
260 app = std::make_unique<RT64::Application>(appCore, appConfig);
261
262 // Set initial user config settings based on the current settings.

Callers

nothing calls this directly

Calls 5

map_setup_resultFunction · 0.85
map_graphics_apiFunction · 0.85
compute_max_supported_aaFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected