| 1 | #cxx . . $ `<file>/libretro.cpp`/include "mednafen/mednafen.h"cxx . . $ `<file>/mednafen/mednafen.h`/ |
| 2 | #include "mednafen/mempatcher.h"cxx . . $ `<file>/mednafen/mempatcher.h`/ |
| 3 | #include "mednafen/git.h"cxx . . $ `<file>/mednafen/git.h`/ |
| 4 | #include "mednafen/general.h"cxx . . $ `<file>/mednafen/general.h`/ |
| 5 | #include "libretro.h"cxx . . $ `<file>/libretro.h`/ |
| 6 | |
| 7 | static MDFNGIcxx . . $ MDFNGI# *gamecxx . . $ game.; |
| 8 | |
| 9 | struct retro_perf_callback perf_cbcxx . . $ perf_cb.; |
| 10 | retro_get_cpu_features_t perf_get_cpu_features_cbcxx . . $ perf_get_cpu_features_cb. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 11 | retro_log_printf_t log_cbcxx . . $ log_cb.; |
| 12 | static retro_video_refresh_t video_cbcxx . . $ video_cb.; |
| 13 | static retro_audio_sample_t audio_cbcxx . . $ audio_cb.; |
| 14 | static retro_audio_sample_batch_t audio_batch_cbcxx . . $ audio_batch_cb.; |
| 15 | static retro_environment_t environ_cbcxx . . $ environ_cb.; |
| 16 | static retro_input_poll_t input_poll_cbcxx . . $ input_poll_cb.; |
| 17 | static retro_input_state_t input_state_cbcxx . . $ input_state_cb.; |
| 18 | |
| 19 | static bool overscancxx . . $ overscan.; |
| 20 | static double last_sound_ratecxx . . $ last_sound_rate.; |
| 21 | static MDFN_PixelFormatcxx . . $ MDFN_PixelFormat# last_pixel_formatcxx . . $ last_pixel_format.; |
| 22 | |
| 23 | static MDFN_Surfacecxx . . $ MDFN_Surface# *surfcxx . . $ surf.; |
| 24 | |
| 25 | /* Mednafen - Multi-system Emulator |
| 26 | * |
| 27 | * This program is free software; you can redistribute it and/or modify |
| 28 | * it under the terms of the GNU General Public License as published by |
| 29 | * the Free Software Foundation; either version 2 of the License, or |
| 30 | * (at your option) any later version. |
| 31 | * |
| 32 | * This program is distributed in the hope that it will be useful, |
| 33 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 34 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 35 | * GNU General Public License for more details. |
| 36 | * |
| 37 | * You should have received a copy of the GNU General Public License |
| 38 | * along with this program; if not, write to the Free Software |
| 39 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 40 | */ |
| 41 | |
| 42 | #include "mednafen/vb/vb.h"cxx . . $ `<file>/mednafen/vb/vb.h`/ |
| 43 | #include "mednafen/vb/timer.h"cxx . . $ `<file>/mednafen/vb/timer.h`/ |
| 44 | #include "mednafen/vb/vsu.h"cxx . . $ `<file>/mednafen/vb/vsu.h`/ |
| 45 | #include "mednafen/vb/vip.h"cxx . . $ `<file>/mednafen/vb/vip.h`/ |
| 46 | #ifdef WANT_DEBUGGER |
| 47 | #include "mednafen/vb/debug.h" |
| 48 | #endif |
| 49 | #include "mednafen/vb/input.h"cxx . . $ `<file>/mednafen/vb/input.h`/ |
| 50 | #include "mednafen/general.h"cxx . . $ `<file>/mednafen/general.h`/ |
| 51 | #include "mednafen/mempatcher.h"cxx . . $ `<file>/mednafen/mempatcher.h`/ |
| 52 | #if 0 |
| 53 | #include <iconv.h> |
| 54 | #endif |
| 55 | |
| 56 | enumcxx . . $ $anonymous_type_7c5848edf34a82b1_0# |
| 57 | { |
| 58 | ANAGLYPH_PRESET_DISABLEDcxx . . $ ANAGLYPH_PRESET_DISABLED. = 0, |
| 59 | ANAGLYPH_PRESET_RED_BLUEcxx . . $ ANAGLYPH_PRESET_RED_BLUE., |
| 60 | ANAGLYPH_PRESET_RED_CYANcxx . . $ ANAGLYPH_PRESET_RED_CYAN., |
| 61 | ANAGLYPH_PRESET_RED_ELECTRICCYANcxx . . $ ANAGLYPH_PRESET_RED_ELECTRICCYAN., |
| 62 | ANAGLYPH_PRESET_RED_GREENcxx . . $ ANAGLYPH_PRESET_RED_GREEN., |
| 63 | ANAGLYPH_PRESET_GREEN_MAGENTAcxx . . $ ANAGLYPH_PRESET_GREEN_MAGENTA., |
| 64 | ANAGLYPH_PRESET_YELLOW_BLUEcxx . . $ ANAGLYPH_PRESET_YELLOW_BLUE., |
| 65 | }; |
| 66 | |
| 67 | static const uint32cxx . . $ uint32# AnaglyphPreset_Colorscxx . . $ AnaglyphPreset_Colors.[][2] = |
| 68 | { |
| 69 | { 0, 0 }, |
| 70 | { 0xFF0000, 0x0000FF }, |
| 71 | { 0xFF0000, 0x00B7EB }, |
| 72 | { 0xFF0000, 0x00FFFF }, |
| 73 | { 0xFF0000, 0x00FF00 }, |
| 74 | { 0x00FF00, 0xFF00FF }, |
| 75 | { 0xFFFF00, 0x0000FF }, |
| 76 | }; |
| 77 | |
| 78 | |
| 79 | int32cxx . . $ int32# VB_InDebugPeekcxx . . $ VB_InDebugPeek.; |
| 80 | |
| 81 | static uint32cxx . . $ uint32# VB3DModecxx . . $ VB3DMode.; |
| 82 | |
| 83 | static Blip_Buffercxx . . $ Blip_Buffer# sbufcxx . . $ sbuf.[2]; |
| 84 | |
| 85 | static uint8cxx . . $ uint8# *WRAMcxx . . $ WRAM. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 86 | |
| 87 | static uint8cxx . . $ uint8# *GPRAMcxx . . $ GPRAM. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 88 | static uint32cxx . . $ uint32# GPRAM_Maskcxx . . $ GPRAM_Mask.; |
| 89 | |
| 90 | static uint8cxx . . $ uint8# *GPROMcxx . . $ GPROM. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 91 | static uint32cxx . . $ uint32# GPROM_Maskcxx . . $ GPROM_Mask.; |
| 92 | |
| 93 | V810cxx . . $ V810# *VB_V810cxx . . $ VB_V810. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 94 | |
| 95 | VSUcxx . . $ VSU# *VB_VSUcxx . . $ VB_VSU. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 96 | static uint32cxx . . $ uint32# VSU_CycleFixcxx . . $ VSU_CycleFix.; |
| 97 | |
| 98 | static uint8cxx . . $ uint8# WCRcxx . . $ WCR.; |
| 99 | |
| 100 | static int32cxx . . $ int32# next_vip_tscxx . . $ next_vip_ts., next_timer_tscxx . . $ next_timer_ts., next_input_tscxx . . $ next_input_ts.; |
| 101 | |
| 102 | |
| 103 | static uint32cxx . . $ uint32# IRQ_Assertedcxx . . $ IRQ_Asserted.; |
| 104 | |
| 105 | static INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! void RecalcIntLevelcxx . . $ RecalcIntLevel(49f6e7a06ebc5aa8).(void) |
| 106 | { |
| 107 | int ilevel = -1; |
| 108 | |
| 109 | for(int i = 4; i >= 0; i--) |
| 110 | { |
| 111 | if(IRQ_Assertedcxx . . $ IRQ_Asserted. & (1 << i)) |
| 112 | { |
| 113 | ilevel = i; |
| 114 | break; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | VB_V810cxx . . $ VB_V810.->SetIntcxx . . $ V810#SetInt(d4f767463ce0a6b3).(ilevel); |
| 119 | } |
| 120 | |
| 121 | void VBIRQ_Assertcxx . . $ VBIRQ_Assert(918ebd27a9ddbad3).(int source, bool assert) |
| 122 | { |
| 123 | assertcxx . . $ `<external>/4398592474888995393/assert.h:102:11`!(source >= 0 && source <= 4); |
| 124 | |
| 125 | IRQ_Assertedcxx . . $ IRQ_Asserted. &= ~(1 << source); |
| 126 | |
| 127 | if(assert) |
| 128 | IRQ_Assertedcxx . . $ IRQ_Asserted. |= 1 << source; |
| 129 | |
| 130 | RecalcIntLevelcxx . . $ RecalcIntLevel(49f6e7a06ebc5aa8).(); |
| 131 | } |
| 132 | |
| 133 | |
| 134 | |
| 135 | static uint8cxx . . $ uint8# HWCTRL_Readcxx . . $ HWCTRL_Read(30bc2cfa027d42f8).(v810_timestamp_tcxx . . $ v810_timestamp_t# ×tamp, uint32cxx . . $ uint32# A) |
| 136 | { |
| 137 | uint8cxx . . $ uint8# ret = 0; |
| 138 | |
| 139 | if(A & 0x3) |
| 140 | { |
| 141 | puts("HWCtrl Bogus Read?"); |
| 142 | return(ret); |
| 143 | } |
| 144 | |
| 145 | switch(A & 0xFF) |
| 146 | { |
| 147 | default: printf("Unknown HWCTRL Read: %08x\n", A); |
| 148 | break; |
| 149 | |
| 150 | case 0x18: |
| 151 | case 0x1C: |
| 152 | case 0x20: ret = TIMER_Readcxx . . $ TIMER_Read(e2f0398b1413fe22).(timestamp, A); |
| 153 | break; |
| 154 | |
| 155 | case 0x24: ret = WCRcxx . . $ WCR. | 0xFC; |
| 156 | break; |
| 157 | |
| 158 | case 0x10: |
| 159 | case 0x14: |
| 160 | case 0x28: ret = VBINPUT_Readcxx . . $ VBINPUT_Read(30bc2cfa027d42f8).(timestamp, A); |
| 161 | break; |
| 162 | |
| 163 | } |
| 164 | |
| 165 | return(ret); |
| 166 | } |
| 167 | |
| 168 | static void HWCTRL_Writecxx . . $ HWCTRL_Write(b1c7ce297c54e4c4).(v810_timestamp_tcxx . . $ v810_timestamp_t# ×tamp, uint32cxx . . $ uint32# A, uint8cxx . . $ uint8# V) |
| 169 | { |
| 170 | if(A & 0x3) |
| 171 | { |
| 172 | puts("HWCtrl Bogus Write?"); |
| 173 | return; |
| 174 | } |
| 175 | |
| 176 | switch(A & 0xFF) |
| 177 | { |
| 178 | default: printf("Unknown HWCTRL Write: %08x %02x\n", A, V); |
| 179 | break; |
| 180 | |
| 181 | case 0x18: |
| 182 | case 0x1C: |
| 183 | case 0x20: TIMER_Writecxx . . $ TIMER_Write(a068a01e505c3b0c).(timestamp, A, V); |
| 184 | break; |
| 185 | |
| 186 | case 0x24: WCRcxx . . $ WCR. = V & 0x3; |
| 187 | break; |
| 188 | |
| 189 | case 0x10: |
| 190 | case 0x14: |
| 191 | case 0x28: VBINPUT_Writecxx . . $ VBINPUT_Write(b1c7ce297c54e4c4).(timestamp, A, V); |
| 192 | break; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | uint8cxx . . $ uint8# MDFN_FASTCALLcxx . . $ `mednafen/mednafen-types.h:27:13`! MemRead8cxx . . $ MemRead8(30bc2cfa027d42f8).(v810_timestamp_tcxx . . $ v810_timestamp_t# ×tamp, uint32cxx . . $ uint32# A) |
| 197 | { |
| 198 | uint8cxx . . $ uint8# ret = 0; |
| 199 | A &= (1 << 27) - 1; |
| 200 | |
| 201 | //if((A >> 24) <= 2) |
| 202 | // printf("Read8: %d %08x\n", timestamp, A); |
| 203 | |
| 204 | switch(A >> 24) |
| 205 | { |
| 206 | case 0: ret = VIP_Read8cxx . . $ VIP_Read8(30bc2cfa027d42f8).(timestamp, A); |
| 207 | break; |
| 208 | |
| 209 | case 1: break; |
| 210 | |
| 211 | case 2: ret = HWCTRL_Readcxx . . $ HWCTRL_Read(30bc2cfa027d42f8).(timestamp, A); |
| 212 | break; |
| 213 | |
| 214 | case 3: break; |
| 215 | case 4: break; |
| 216 | |
| 217 | case 5: ret = WRAMcxx . . $ WRAM.[A & 0xFFFF]; |
| 218 | break; |
| 219 | |
| 220 | case 6: if(GPRAMcxx . . $ GPRAM.) |
| 221 | ret = GPRAMcxx . . $ GPRAM.[A & GPRAM_Maskcxx . . $ GPRAM_Mask.]; |
| 222 | else |
| 223 | printf("GPRAM(Unmapped) Read: %08x\n", A); |
| 224 | break; |
| 225 | |
| 226 | case 7: ret = GPROMcxx . . $ GPROM.[A & GPROM_Maskcxx . . $ GPROM_Mask.]; |
| 227 | break; |
| 228 | } |
| 229 | return(ret); |
| 230 | } |
| 231 | |
| 232 | uint16cxx . . $ uint16# MDFN_FASTCALLcxx . . $ `mednafen/mednafen-types.h:27:13`! MemRead16cxx . . $ MemRead16(6a3a2f833beb20d3).(v810_timestamp_tcxx . . $ v810_timestamp_t# ×tamp, uint32cxx . . $ uint32# A) |
| 233 | { |
| 234 | uint16cxx . . $ uint16# ret = 0; |
| 235 | |
| 236 | A &= (1 << 27) - 1; |
| 237 | |
| 238 | //if((A >> 24) <= 2) |
| 239 | // printf("Read16: %d %08x\n", timestamp, A); |
| 240 | |
| 241 | |
| 242 | switch(A >> 24) |
| 243 | { |
| 244 | case 0: ret = VIP_Read16cxx . . $ VIP_Read16(6a3a2f833beb20d3).(timestamp, A); |
| 245 | break; |
| 246 | |
| 247 | case 1: break; |
| 248 | |
| 249 | case 2: ret = HWCTRL_Readcxx . . $ HWCTRL_Read(30bc2cfa027d42f8).(timestamp, A); |
| 250 | break; |
| 251 | |
| 252 | case 3: break; |
| 253 | |
| 254 | case 4: break; |
| 255 | |
| 256 | case 5: ret = LoadU16_LEcxx . . $ LoadU16_LE(7cce449bb1bc4dad).((uint16cxx . . $ uint16# *)&WRAMcxx . . $ WRAM.[A & 0xFFFF]); |
| 257 | break; |
| 258 | |
| 259 | case 6: if(GPRAMcxx . . $ GPRAM.) |
| 260 | ret = LoadU16_LEcxx . . $ LoadU16_LE(7cce449bb1bc4dad).((uint16cxx . . $ uint16# *)&GPRAMcxx . . $ GPRAM.[A & GPRAM_Maskcxx . . $ GPRAM_Mask.]); |
| 261 | else printf("GPRAM(Unmapped) Read: %08x\n", A); |
| 262 | break; |
| 263 | |
| 264 | case 7: ret = LoadU16_LEcxx . . $ LoadU16_LE(7cce449bb1bc4dad).((uint16cxx . . $ uint16# *)&GPROMcxx . . $ GPROM.[A & GPROM_Maskcxx . . $ GPROM_Mask.]); |
| 265 | break; |
| 266 | } |
| 267 | return(ret); |
| 268 | } |
| 269 | |
| 270 | void MDFN_FASTCALLcxx . . $ `mednafen/mednafen-types.h:27:13`! MemWrite8cxx . . $ MemWrite8(b1c7ce297c54e4c4).(v810_timestamp_tcxx . . $ v810_timestamp_t# ×tamp, uint32cxx . . $ uint32# A, uint8cxx . . $ uint8# V) |
| 271 | { |
| 272 | A &= (1 << 27) - 1; |
| 273 | |
| 274 | //if((A >> 24) <= 2) |
| 275 | // printf("Write8: %d %08x %02x\n", timestamp, A, V); |
| 276 | |
| 277 | switch(A >> 24) |
| 278 | { |
| 279 | case 0: VIP_Write8cxx . . $ VIP_Write8(b1c7ce297c54e4c4).(timestamp, A, V); |
| 280 | break; |
| 281 | |
| 282 | case 1: VB_VSUcxx . . $ VB_VSU.->Writecxx . . $ VSU#Write(1d21b704d38112cf).((timestamp + VSU_CycleFixcxx . . $ VSU_CycleFix.) >> 2, A, V); |
| 283 | break; |
| 284 | |
| 285 | case 2: HWCTRL_Writecxx . . $ HWCTRL_Write(b1c7ce297c54e4c4).(timestamp, A, V); |
| 286 | break; |
| 287 | |
| 288 | case 3: break; |
| 289 | |
| 290 | case 4: break; |
| 291 | |
| 292 | case 5: WRAMcxx . . $ WRAM.[A & 0xFFFF] = V; |
| 293 | break; |
| 294 | |
| 295 | case 6: if(GPRAMcxx . . $ GPRAM.) |
| 296 | GPRAMcxx . . $ GPRAM.[A & GPRAM_Maskcxx . . $ GPRAM_Mask.] = V; |
| 297 | break; |
| 298 | |
| 299 | case 7: // ROM, no writing allowed! |
| 300 | break; |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | void MDFN_FASTCALLcxx . . $ `mednafen/mednafen-types.h:27:13`! MemWrite16cxx . . $ MemWrite16(f235d607a429c96e).(v810_timestamp_tcxx . . $ v810_timestamp_t# ×tamp, uint32cxx . . $ uint32# A, uint16cxx . . $ uint16# V) |
| 305 | { |
| 306 | A &= (1 << 27) - 1; |
| 307 | |
| 308 | //if((A >> 24) <= 2) |
| 309 | // printf("Write16: %d %08x %04x\n", timestamp, A, V); |
| 310 | |
| 311 | switch(A >> 24) |
| 312 | { |
| 313 | case 0: VIP_Write16cxx . . $ VIP_Write16(f235d607a429c96e).(timestamp, A, V); |
| 314 | break; |
| 315 | |
| 316 | case 1: VB_VSUcxx . . $ VB_VSU.->Writecxx . . $ VSU#Write(1d21b704d38112cf).((timestamp + VSU_CycleFixcxx . . $ VSU_CycleFix.) >> 2, A, V); |
| 317 | break; |
| 318 | |
| 319 | case 2: HWCTRL_Writecxx . . $ HWCTRL_Write(b1c7ce297c54e4c4).(timestamp, A, V); |
| 320 | break; |
| 321 | |
| 322 | case 3: break; |
| 323 | |
| 324 | case 4: break; |
| 325 | |
| 326 | case 5: StoreU16_LEcxx . . $ StoreU16_LE(9c42bc65687727f9).((uint16cxx . . $ uint16# *)&WRAMcxx . . $ WRAM.[A & 0xFFFF], V); |
| 327 | break; |
| 328 | |
| 329 | case 6: if(GPRAMcxx . . $ GPRAM.) |
| 330 | StoreU16_LEcxx . . $ StoreU16_LE(9c42bc65687727f9).((uint16cxx . . $ uint16# *)&GPRAMcxx . . $ GPRAM.[A & GPRAM_Maskcxx . . $ GPRAM_Mask.], V); |
| 331 | break; |
| 332 | |
| 333 | case 7: // ROM, no writing allowed! |
| 334 | break; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | static void FixNonEventscxx . . $ FixNonEvents(49f6e7a06ebc5aa8).(void) |
| 339 | { |
| 340 | if(next_vip_tscxx . . $ next_vip_ts. & 0x40000000) |
| 341 | next_vip_tscxx . . $ next_vip_ts. = VB_EVENT_NONONOcxx . . $ `mednafen/vb/vb.h:26:9`!; |
| 342 | |
| 343 | if(next_timer_tscxx . . $ next_timer_ts. & 0x40000000) |
| 344 | next_timer_tscxx . . $ next_timer_ts. = VB_EVENT_NONONOcxx . . $ `mednafen/vb/vb.h:26:9`!; |
| 345 | |
| 346 | if(next_input_tscxx . . $ next_input_ts. & 0x40000000) |
| 347 | next_input_tscxx . . $ next_input_ts. = VB_EVENT_NONONOcxx . . $ `mednafen/vb/vb.h:26:9`!; |
| 348 | } |
| 349 | |
| 350 | static void EventResetcxx . . $ EventReset(49f6e7a06ebc5aa8).(void) |
| 351 | { |
| 352 | next_vip_tscxx . . $ next_vip_ts. = VB_EVENT_NONONOcxx . . $ `mednafen/vb/vb.h:26:9`!; |
| 353 | next_timer_tscxx . . $ next_timer_ts. = VB_EVENT_NONONOcxx . . $ `mednafen/vb/vb.h:26:9`!; |
| 354 | next_input_tscxx . . $ next_input_ts. = VB_EVENT_NONONOcxx . . $ `mednafen/vb/vb.h:26:9`!; |
| 355 | } |
| 356 | |
| 357 | static INLINEcxx . . $ `mednafen/mednafen-types.h:21:11`! int32cxx . . $ int32# CalcNextTScxx . . $ CalcNextTS(b126dc7c1de90089).(void) |
| 358 | { |
| 359 | int32cxx . . $ int32# next_timestamp = next_vip_tscxx . . $ next_vip_ts.; |
| 360 | |
| 361 | if(next_timestamp > next_timer_tscxx . . $ next_timer_ts.) |
| 362 | next_timestamp = next_timer_tscxx . . $ next_timer_ts.; |
| 363 | |
| 364 | if(next_timestamp > next_input_tscxx . . $ next_input_ts.) |
| 365 | next_timestamp = next_input_tscxx . . $ next_input_ts.; |
| 366 | |
| 367 | return(next_timestamp); |
| 368 | } |
| 369 | |
| 370 | static void RebaseTScxx . . $ RebaseTS(d4f767463ce0a6b3).(const v810_timestamp_tcxx . . $ v810_timestamp_t# timestamp) |
| 371 | { |
| 372 | //printf("Rebase: %08x %08x %08x\n", timestamp, next_vip_ts, next_timer_ts); |
| 373 | |
| 374 | assertcxx . . $ `<external>/4398592474888995393/assert.h:102:11`!(next_vip_ts > timestamp); |
| 375 | assertcxx . . $ `<external>/4398592474888995393/assert.h:102:11`!(next_timer_ts > timestamp); |
| 376 | assertcxx . . $ `<external>/4398592474888995393/assert.h:102:11`!(next_input_ts > timestamp); |
| 377 | |
| 378 | next_vip_tscxx . . $ next_vip_ts. -= timestamp; |
| 379 | next_timer_tscxx . . $ next_timer_ts. -= timestamp; |
| 380 | next_input_tscxx . . $ next_input_ts. -= timestamp; |
| 381 | } |
| 382 | |
| 383 | void VB_SetEventcxx . . $ VB_SetEvent(3e454b8ccf442868).(const int type, const v810_timestamp_tcxx . . $ v810_timestamp_t# next_timestamp) |
| 384 | { |
| 385 | //assert(next_timestamp > VB_V810->v810_timestamp); |
| 386 | |
| 387 | if(type == VB_EVENT_VIPcxx . . $ VB_EVENT_VIP.) |
| 388 | next_vip_tscxx . . $ next_vip_ts. = next_timestamp; |
| 389 | else if(type == VB_EVENT_TIMERcxx . . $ VB_EVENT_TIMER.) |
| 390 | next_timer_tscxx . . $ next_timer_ts. = next_timestamp; |
| 391 | else if(type == VB_EVENT_INPUTcxx . . $ VB_EVENT_INPUT.) |
| 392 | next_input_tscxx . . $ next_input_ts. = next_timestamp; |
| 393 | |
| 394 | if(next_timestamp < VB_V810cxx . . $ VB_V810.->GetEventNTcxx . . $ V810#GetEventNT(b126dc7c1de90089).()) |
| 395 | VB_V810cxx . . $ VB_V810.->SetEventNTcxx . . $ V810#SetEventNT(d4f767463ce0a6b3).(next_timestamp); |
| 396 | } |
| 397 | |
| 398 | |
| 399 | static int32cxx . . $ int32# MDFN_FASTCALLcxx . . $ `mednafen/mednafen-types.h:27:13`! EventHandlercxx . . $ EventHandler(7864480464b09eea).(const v810_timestamp_tcxx . . $ v810_timestamp_t# timestamp) |
| 400 | { |
| 401 | if(timestamp >= next_vip_tscxx . . $ next_vip_ts.) |
| 402 | next_vip_tscxx . . $ next_vip_ts. = VIP_Updatecxx . . $ VIP_Update(7864480464b09eea).(timestamp); |
| 403 | |
| 404 | if(timestamp >= next_timer_tscxx . . $ next_timer_ts.) |
| 405 | next_timer_tscxx . . $ next_timer_ts. = TIMER_Updatecxx . . $ TIMER_Update(7864480464b09eea).(timestamp); |
| 406 | |
| 407 | if(timestamp >= next_input_tscxx . . $ next_input_ts.) |
| 408 | next_input_tscxx . . $ next_input_ts. = VBINPUT_Updatecxx . . $ VBINPUT_Update(7864480464b09eea).(timestamp); |
| 409 | |
| 410 | return(CalcNextTScxx . . $ CalcNextTS(b126dc7c1de90089).()); |
| 411 | } |
| 412 | |
| 413 | // Called externally from debug.cpp in some cases. |
| 414 | void ForceEventUpdatescxx . . $ ForceEventUpdates(d4f767463ce0a6b3).(const v810_timestamp_tcxx . . $ v810_timestamp_t# timestamp) |
| 415 | { |
| 416 | next_vip_tscxx . . $ next_vip_ts. = VIP_Updatecxx . . $ VIP_Update(7864480464b09eea).(timestamp); |
| 417 | next_timer_tscxx . . $ next_timer_ts. = TIMER_Updatecxx . . $ TIMER_Update(7864480464b09eea).(timestamp); |
| 418 | next_input_tscxx . . $ next_input_ts. = VBINPUT_Updatecxx . . $ VBINPUT_Update(7864480464b09eea).(timestamp); |
| 419 | |
| 420 | VB_V810cxx . . $ VB_V810.->SetEventNTcxx . . $ V810#SetEventNT(d4f767463ce0a6b3).(CalcNextTScxx . . $ CalcNextTS(b126dc7c1de90089).()); |
| 421 | //printf("FEU: %d %d %d\n", next_vip_ts, next_timer_ts, next_input_ts); |
| 422 | } |
| 423 | |
| 424 | static void VB_Powercxx . . $ VB_Power(49f6e7a06ebc5aa8).(void) |
| 425 | { |
| 426 | memset(WRAMcxx . . $ WRAM., 0, 65536); |
| 427 | |
| 428 | VIP_Powercxx . . $ VIP_Power(49f6e7a06ebc5aa8).(); |
| 429 | VB_VSUcxx . . $ VB_VSU.->Powercxx . . $ VSU#Power(49f6e7a06ebc5aa8).(); |
| 430 | TIMER_Powercxx . . $ TIMER_Power(49f6e7a06ebc5aa8).(); |
| 431 | VBINPUT_Powercxx . . $ VBINPUT_Power(49f6e7a06ebc5aa8).(); |
| 432 | |
| 433 | EventResetcxx . . $ EventReset(49f6e7a06ebc5aa8).(); |
| 434 | IRQ_Assertedcxx . . $ IRQ_Asserted. = 0; |
| 435 | RecalcIntLevelcxx . . $ RecalcIntLevel(49f6e7a06ebc5aa8).(); |
| 436 | VB_V810cxx . . $ VB_V810.->Resetcxx . . $ V810#Reset(49f6e7a06ebc5aa8).(); |
| 437 | |
| 438 | VSU_CycleFixcxx . . $ VSU_CycleFix. = 0; |
| 439 | WCRcxx . . $ WCR. = 0; |
| 440 | |
| 441 | |
| 442 | ForceEventUpdatescxx . . $ ForceEventUpdates(d4f767463ce0a6b3).(0); //VB_V810->v810_timestamp); |
| 443 | } |
| 444 | |
| 445 | static void SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).(const char *name) |
| 446 | { |
| 447 | if(!strcasecmp(name, "vb.3dmode")) |
| 448 | { |
| 449 | // FIXME, TODO (complicated) |
| 450 | //VB3DMode = MDFN_GetSettingUI("vb.3dmode"); |
| 451 | //VIP_Set3DMode(VB3DMode); |
| 452 | } |
| 453 | else if(!strcasecmp(name, "vb.disable_parallax")) |
| 454 | { |
| 455 | VIP_SetParallaxDisablecxx . . $ VIP_SetParallaxDisable(b45ddcbc8423892c).(MDFN_GetSettingBcxx . . $ MDFN_GetSettingB(c5f7da30cbc0f4e9).("vb.disable_parallax")); |
| 456 | } |
| 457 | else if(!strcasecmp(name, "vb.anaglyph.lcolor") || !strcasecmp(name, "vb.anaglyph.rcolor") || |
| 458 | !strcasecmp(name, "vb.anaglyph.preset") || !strcasecmp(name, "vb.default_color")) |
| 459 | |
| 460 | { |
| 461 | uint32cxx . . $ uint32# lcolor = MDFN_GetSettingUIcxx . . $ MDFN_GetSettingUI(751346f8406fd082).("vb.anaglyph.lcolor"), rcolor = MDFN_GetSettingUIcxx . . $ MDFN_GetSettingUI(751346f8406fd082).("vb.anaglyph.rcolor"); |
| 462 | int preset = MDFN_GetSettingIcxx . . $ MDFN_GetSettingI(3c95bd14d5d5d286).("vb.anaglyph.preset"); |
| 463 | |
| 464 | if(preset != ANAGLYPH_PRESET_DISABLEDcxx . . $ ANAGLYPH_PRESET_DISABLED.) |
| 465 | { |
| 466 | lcolor = AnaglyphPreset_Colorscxx . . $ AnaglyphPreset_Colors.[preset][0]; |
| 467 | rcolor = AnaglyphPreset_Colorscxx . . $ AnaglyphPreset_Colors.[preset][1]; |
| 468 | } |
| 469 | VIP_SetAnaglyphColorscxx . . $ VIP_SetAnaglyphColors(b4d55b1286ff73e8).(lcolor, rcolor); |
| 470 | VIP_SetDefaultColorcxx . . $ VIP_SetDefaultColor(cb2f890c2fdad230).(MDFN_GetSettingUIcxx . . $ MDFN_GetSettingUI(751346f8406fd082).("vb.default_color")); |
| 471 | } |
| 472 | else if(!strcasecmp(name, "vb.input.instant_read_hack")) |
| 473 | { |
| 474 | VBINPUT_SetInstantReadHackcxx . . $ VBINPUT_SetInstantReadHack(b45ddcbc8423892c).(MDFN_GetSettingBcxx . . $ MDFN_GetSettingB(c5f7da30cbc0f4e9).("vb.input.instant_read_hack")); |
| 475 | } |
| 476 | else if(!strcasecmp(name, "vb.instant_display_hack")) |
| 477 | VIP_SetInstantDisplayHackcxx . . $ VIP_SetInstantDisplayHack(b45ddcbc8423892c).(MDFN_GetSettingBcxx . . $ MDFN_GetSettingB(c5f7da30cbc0f4e9).("vb.instant_display_hack")); |
| 478 | else if(!strcasecmp(name, "vb.allow_draw_skip")) |
| 479 | VIP_SetAllowDrawSkipcxx . . $ VIP_SetAllowDrawSkip(b45ddcbc8423892c).(MDFN_GetSettingBcxx . . $ MDFN_GetSettingB(c5f7da30cbc0f4e9).("vb.allow_draw_skip")); |
| 480 | else |
| 481 | abortcxx . . $ abort(15d318a79ddce9e0).(); |
| 482 | |
| 483 | |
| 484 | } |
| 485 | |
| 486 | struct VB_HeaderInfocxx . . $ VB_HeaderInfo# |
| 487 | { |
| 488 | char game_titlecxx . . $ VB_HeaderInfo#game_title.[256]; |
| 489 | uint32cxx . . $ uint32# game_codecxx . . $ VB_HeaderInfo#game_code.; |
| 490 | uint16cxx . . $ uint16# manf_codecxx . . $ VB_HeaderInfo#manf_code.; |
| 491 | uint8cxx . . $ uint8# versioncxx . . $ VB_HeaderInfo#version.; |
| 492 | }; |
| 493 | |
| 494 | static void ReadHeadercxx . . $ ReadHeader(4cdc66acf0804f35).(MDFNFILEcxx . . $ MDFNFILE# *fp, VB_HeaderInfocxx . . $ VB_HeaderInfo# *hi) |
| 495 | { |
| 496 | #if 0 |
| 497 | iconv_t sjis_ict = iconv_open("UTF-8", "shift_jis"); |
| 498 | |
| 499 | if(sjis_ict != (iconv_t)-1) |
| 500 | { |
| 501 | char *in_ptr, *out_ptr; |
| 502 | size_t ibl, obl; |
| 503 | |
| 504 | ibl = 20; |
| 505 | obl = sizeof(hi->game_title) - 1; |
| 506 | |
| 507 | in_ptr = (char*)GET_FDATA_PTR(fp) + (0xFFFFFDE0 & (GET_FSIZE_PTR(fp) - 1)); |
| 508 | out_ptr = hi->game_title; |
| 509 | |
| 510 | iconv(sjis_ict, (ICONV_CONST char **)&in_ptr, &ibl, &out_ptr, &obl); |
| 511 | iconv_close(sjis_ict); |
| 512 | |
| 513 | *out_ptr = 0; |
| 514 | |
| 515 | MDFN_RemoveControlChars(hi->game_title); |
| 516 | MDFN_trim(hi->game_title); |
| 517 | } |
| 518 | else |
| 519 | hi->game_title[0] = 0; |
| 520 | |
| 521 | hi->game_code = MDFN_de32lsb(fp->data + (0xFFFFFDFB & (fp->size - 1))); |
| 522 | hi->manf_code = MDFN_de16lsb(fp->data + (0xFFFFFDF9 & (fp->size - 1))); |
| 523 | hi->version = fp->data[0xFFFFFDFF & (fp->size - 1)]; |
| 524 | #endif |
| 525 | } |
| 526 | |
| 527 | static bool TestMagiccxx . . $ TestMagic(ac45b4c5cbf1681).(const char *name, MDFNFILEcxx . . $ MDFNFILE# *fp) |
| 528 | { |
| 529 | if(!strcasecmp(GET_FEXTS_PTRcxx . . $ `mednafen/mednafen.h:23:9`!(fp), "vb") || !strcasecmp(GET_FEXTS_PTRcxx . . $ `mednafen/mednafen.h:23:9`!(fp), "vboy")) |
| 530 | return(true); |
| 531 | |
| 532 | return(false); |
| 533 | } |
| 534 | |
| 535 | struct VBGameEntrycxx . . $ VBGameEntry# |
| 536 | { |
| 537 | uint32cxx . . $ uint32# checksumscxx . . $ VBGameEntry#checksums.[16]; |
| 538 | const char *titlecxx . . $ VBGameEntry#title.; |
| 539 | uint32cxx . . $ uint32# patch_addresscxx . . $ VBGameEntry#patch_address.[512]; |
| 540 | }; |
| 541 | |
| 542 | static const struct VBGameEntrycxx . . $ VBGameEntry# VBGamescxx . . $ VBGames.[] = |
| 543 | { |
| 544 | { { 0xbb71b522 } , "3D Tetris (US)", { 0xFFF1E740, |
| 545 | 0xfff1e75a, |
| 546 | 0xfff5c958, |
| 547 | 0xfff5c9a4, |
| 548 | 0xfff5c9b6, |
| 549 | 0xfff677a6, |
| 550 | 0xfff677f0, |
| 551 | 0xfff6c72a, |
| 552 | 0xfffeffc2, |
| 553 | 0xfff6df22, |
| 554 | 0xfff6e01a, |
| 555 | 0xfff6e20a, |
| 556 | 0xfff6e302, |
| 557 | 0xfff6e5e4, |
| 558 | 0xfff6eb34, |
| 559 | 0xfff6eb8a, |
| 560 | 0xfff00cd0, |
| 561 | 0xfffd9508, |
| 562 | 0xfffdad90, |
| 563 | 0xfffd9f1c, |
| 564 | 0xfffca7a2, |
| 565 | 0xfffca986, |
| 566 | 0xfffcaad4, |
| 567 | 0xfffcacb0, |
| 568 | 0xfff3dbc6, |
| 569 | 0xfff3dc58, |
| 570 | 0xfff3ca1a, |
| 571 | 0xfff3effe, |
| 572 | 0xfff3f06c, |
| 573 | 0xfff3f122, |
| 574 | 0xfff3f2da, |
| 575 | 0xfff3c9d8, |
| 576 | 0xfff01892, |
| 577 | 0xfff017f4, |
| 578 | 0xfff016c8, |
| 579 | 0xfff4677c, |
| 580 | 0xfff4620a, |
| 581 | 0xfff3503e, |
| 582 | 0xfff3f97a, |
| 583 | 0xfff3fae0, |
| 584 | 0xfff01270, |
| 585 | 0xfff473c8, |
| 586 | 0xfff472dc, |
| 587 | 0xfff0160a, |
| 588 | 0xfff6e112, |
| 589 | 0xfff6e7d2, |
| 590 | 0xfffc1730, |
| 591 | 0xfff3f1e6, |
| 592 | 0xfffc22da, |
| 593 | 0xfffc20a2, |
| 594 | 0xfffc2378, |
| 595 | 0xfff36152, |
| 596 | 0xfff37120, |
| 597 | 0xfff378b4, |
| 598 | 0xfffc1b44, |
| 599 | 0xfffc1b8e, |
| 600 | 0xfff3f258, |
| 601 | 0xfff3655c, |
| 602 | 0xfffd9902, |
| 603 | 0xfff49b60, |
| 604 | 0xfff86ef0, |
| 605 | 0xfff3cf08, |
| 606 | 0xfff5894c, |
| 607 | 0xfff3cec2, |
| 608 | 0xfff5a73e, |
| 609 | 0xfff400ce, |
| 610 | 0xfff3c2ec, |
| 611 | 0xfff5b5c2, |
| 612 | 0xfff5b64a, |
| 613 | 0xfffd2968, |
| 614 | 0xfffd2ca0, |
| 615 | 0xfffd2be0, |
| 616 | 0xfffd2b40, |
| 617 | 0xfffd2d10, |
| 618 | 0xfffd2d26, |
| 619 | 0xfff5a6a0, |
| 620 | 0xfff5a564, |
| 621 | 0xfffd9800, |
| 622 | 0xfffd9a04, |
| 623 | 0xfffd9b30, |
| 624 | 0xfffcd8d0, |
| 625 | 0xfffcd830, |
| 626 | 0xfffc15a4, |
| 627 | 0xfff4b5f2, |
| 628 | 0xfff3f346, |
| 629 | 0xfff374ae, |
| 630 | 0xfff3fa42, |
| 631 | 0xfff3720c, |
| 632 | 0xfff38298, |
| 633 | 0xfff38370, |
| 634 | 0xfff2b8a2, |
| 635 | 0xfff2bf52, |
| 636 | 0xfff0199a, |
| 637 | 0xfff01dc0, |
| 638 | 0xfffd169e, |
| 639 | 0xfffd19d6, |
| 640 | 0xfffd1876, |
| 641 | 0xfffd1a46, |
| 642 | 0xfffd1a5c, |
| 643 | 0xfff676b6, |
| 644 | 0xfff675fc, |
| 645 | 0xfff37b48, |
| 646 | 0xfffc246e, |
| 647 | 0xfffc24b8, |
| 648 | 0xfff365e8, |
| 649 | 0xfff2dfa0, |
| 650 | 0xfff36674, |
| 651 | 0xfff36700, |
| 652 | 0xfff598f4, |
| 653 | 0xfff59992, |
| 654 | 0xfff59c2a, |
| 655 | 0xfff59c74, |
| 656 | 0xfff4709a, |
| 657 | 0xfff46eec, |
| 658 | 0xfff4714c, |
| 659 | 0xfff4b808, |
| 660 | 0xfff3f3b2, |
| 661 | 0xfffdaeda, |
| 662 | 0xfffdb044, |
| 663 | 0xfffdae36, |
| 664 | 0xfff4b698, |
| 665 | 0xfff4b73c, |
| 666 | 0xfff49c06, |
| 667 | 0xfffdb322, |
| 668 | 0xfffdb18c, |
| 669 | 0xfff4ba68, |
| 670 | 0xfff4b8d2, |
| 671 | 0xfff474aa, |
| 672 | 0xfffd1916, |
| 673 | 0xfff3d0ac, |
| 674 | 0xfff477ac, |
| 675 | 0xfff3d2ca, |
| 676 | 0xfff476c0, |
| 677 | 0xfff5a41e, |
| 678 | 0xfff5a04c, |
| 679 | 0xfff4788e, |
| 680 | 0xfffc1392, |
| 681 | 0xfffc14f8, |
| 682 | } }, |
| 683 | |
| 684 | { { 0xe81a3703 }, "Bound High!", { 0x0703181A , 0x070229BE, 0x07002CA6, |
| 685 | 0x07024f20, |
| 686 | 0x070317ae, |
| 687 | 0x07030986, |
| 688 | 0x070309ca, |
| 689 | 0x07031968, |
| 690 | 0x07030ad2, |
| 691 | 0x07030b16, |
| 692 | 0x070319be, |
| 693 | 0x07031a20, |
| 694 | 0x070296b4, |
| 695 | 0x0702984e, |
| 696 | 0x07029888, |
| 697 | 0x070298d0, |
| 698 | 0x07029910, |
| 699 | 0x070299ce, |
| 700 | 0x07030c3a, |
| 701 | 0x07030dfc, |
| 702 | 0x07030e52, |
| 703 | 0x07030eb4, |
| 704 | 0x070250fa, |
| 705 | 0x07025148, |
| 706 | 0x07025776, |
| 707 | 0x070257c6, |
| 708 | 0x07025828, |
| 709 | 0x07021dc0, |
| 710 | 0x07021e50, |
| 711 | 0x070008e6, |
| 712 | 0x0700155c, |
| 713 | 0x070005f4, |
| 714 | 0x07022a08, |
| 715 | 0x07031e2e, |
| 716 | 0x07032308, |
| 717 | 0x0703234a, |
| 718 | 0x070323ac, |
| 719 | 0x0703a27a, |
| 720 | 0x0703a754, |
| 721 | 0x0703a77c, |
| 722 | 0x0703a7b4, |
| 723 | 0x0703a816, |
| 724 | 0x07002104, |
| 725 | 0x070028e2, |
| 726 | 0x0700299e, |
| 727 | 0x070029d8, |
| 728 | 0x07001782, |
| 729 | 0x07001912, |
| 730 | 0x070024da, |
| 731 | 0x070347e6, |
| 732 | 0x07035ec4, |
| 733 | 0x07035f16, |
| 734 | 0x07035f78, |
| 735 | 0x0702d152, |
| 736 | 0x0702d19a, |
| 737 | 0x0702d548, |
| 738 | 0x0702d5cc, |
| 739 | 0x07001c30, |
| 740 | 0x0702e97e, |
| 741 | 0x0702e9bc, |
| 742 | 0x070009b2, |
| 743 | 0x07030422, |
| 744 | 0x070305fc, |
| 745 | 0x0703064c, |
| 746 | 0x070306ae, |
| 747 | 0x07026c80, |
| 748 | 0x07027618, |
| 749 | 0x07027656, |
| 750 | 0x07001a92, |
| 751 | 0x0702eff8, |
| 752 | 0x0702f4e6, |
| 753 | 0x0702f54e, |
| 754 | 0x0702f5b0, |
| 755 | 0x07025df6, |
| 756 | 0x07025fb2, |
| 757 | 0x07026036, |
| 758 | 0x0702e01a, |
| 759 | 0x0702e090, |
| 760 | 0x0702e114, |
| 761 | 0x0702e8ea, |
| 762 | 0x07001440, |
| 763 | 0x0702c46e, |
| 764 | 0x0702c4b6, |
| 765 | 0x0702c9e4, |
| 766 | 0x0702ca6e, |
| 767 | 0x0702a532, |
| 768 | 0x0702a5bc, |
| 769 | 0x0702aba0, |
| 770 | 0x0702b4ce, |
| 771 | 0x0702b536, |
| 772 | } }, |
| 773 | |
| 774 | { { 0xc9710a36} , "Galactic Pinball", { 0xFFF4018A, |
| 775 | 0xfff40114, |
| 776 | 0xfff51886, |
| 777 | 0xfff51abe, |
| 778 | 0xfff4b704, |
| 779 | 0xfff4ec7a, |
| 780 | 0xfff53708, |
| 781 | 0xfff53a3c, |
| 782 | }}, |
| 783 | |
| 784 | { { 0x2199af41 }, "Golf (US)", { 0xFFE0141A, 0xFFE097C4, 0xFFE1F47A, 0xFFE0027E, 0xFFE05CA0, 0xFFE014A0, |
| 785 | 0xffe00286, |
| 786 | 0xffe013d0, |
| 787 | 0xffe013f0, |
| 788 | 0xffe01482, |
| 789 | 0xffe01004, |
| 790 | 0xffe01024, |
| 791 | 0xffe00d30, |
| 792 | 0xffe00d50, |
| 793 | 0xffe00db4, |
| 794 | 0xffe00dd4, |
| 795 | 0xffe13efe, |
| 796 | 0xffe13f62, |
| 797 | 0xffe13fd2, |
| 798 | 0xffe01744, |
| 799 | 0xffe01764, |
| 800 | 0xffe05c90, |
| 801 | 0xffe017b2, |
| 802 | 0xffe017d2, |
| 803 | 0xffe01930, |
| 804 | 0xffe01950, |
| 805 | 0xffe01c4a, |
| 806 | 0xffe01c6a, |
| 807 | 0xffe01cb8, |
| 808 | 0xffe01cd8, |
| 809 | 0xffe01dce, |
| 810 | 0xffe01de8, |
| 811 | 0xffe01e5a, |
| 812 | 0xffe01e7a, |
| 813 | 0xffe1409e, |
| 814 | 0xffe02450, |
| 815 | 0xffe02470, |
| 816 | 0xffe024b0, |
| 817 | 0xffe024d0, |
| 818 | 0xffe02530, |
| 819 | 0xffe02550, |
| 820 | 0xffe0257e, |
| 821 | 0xffe0259e, |
| 822 | 0xffe1429c, |
| 823 | 0xffe027c4, |
| 824 | 0xffe027e4, |
| 825 | 0xffe13f2a, |
| 826 | 0xffe097a4, |
| 827 | 0xffe181bc, |
| 828 | 0xffe1ce40, |
| 829 | 0xffe1ce60, |
| 830 | 0xffe07e80, |
| 831 | 0xffe07ea0, |
| 832 | 0xffe07ec0, |
| 833 | 0xffe07ee0, |
| 834 | 0xffe0810e, |
| 835 | 0xffe08158, |
| 836 | 0xffe1e468, |
| 837 | 0xffe1e488, |
| 838 | 0xffe2198c, |
| 839 | 0xffe09a96, |
| 840 | 0xffe09ab6, |
| 841 | 0xffe1f7be, |
| 842 | 0xffe1f7de, |
| 843 | 0xffe1f8ae, |
| 844 | 0xffe1f9d6, |
| 845 | 0xffe1fa18, |
| 846 | 0xffe1fa38, |
| 847 | 0xffe05c68, |
| 848 | 0xffe05c78, |
| 849 | 0xffe14344, |
| 850 | 0xffe09e06, |
| 851 | 0xffe16d8a, |
| 852 | 0xffe16daa, |
| 853 | 0xffe21712, |
| 854 | 0xffe1f37a, |
| 855 | 0xffe1f39a, |
| 856 | 0xffe1f624, |
| 857 | 0xffe1f666, |
| 858 | 0xffe1f686, |
| 859 | 0xffe141f8, |
| 860 | 0xffe151d2, |
| 861 | 0xffe17622, |
| 862 | } }, |
| 863 | |
| 864 | { { 0xefd0ac36 }, "Innsmouth House (Japan)", { 0x070082F4, |
| 865 | 0x07017546, |
| 866 | 0x07016f9a, |
| 867 | 0x07017558, |
| 868 | 0x07016fac, |
| 869 | 0x07017692, |
| 870 | 0x070176a4, |
| 871 | }}, |
| 872 | |
| 873 | { { 0xa44de03c, 0x81af4d6d /*[b1]*/, 0xb15d706e /*(Enable Cheats Hack)*/, 0x79a99f3c /*[T+Ger1.0_KR155E]*/ }, "Jack Bros (US)", { 0x070001A6 }}, |
| 874 | { { 0xcab61e8b }, "Jack Bros (Japan)", { |
| 875 | 0x07000192, |
| 876 | } }, |
| 877 | |
| 878 | // Is 0xbf0d0ab0 the bad dump? |
| 879 | { { 0xa47de78c, 0xbf0d0ab0 }, "Mario Clash", { 0xFFFF5BB4, 0xFFFE6FF0, 0xFFFE039E, |
| 880 | 0xfffdd786, |
| 881 | 0xfffdd76c, |
| 882 | 0xffff5bc6, |
| 883 | 0xffff73a4, |
| 884 | 0xffff73b6, |
| 885 | 0xfffdd836, |
| 886 | 0xfffdd848, |
| 887 | 0xffff916c, |
| 888 | 0xffff917e, |
| 889 | 0xfffe7002, |
| 890 | 0xfffe7c36, |
| 891 | 0xfffe7c48, |
| 892 | 0xffff44f4, |
| 893 | 0xffff4506, |
| 894 | 0xfffe03b0, |
| 895 | 0xffff2514, |
| 896 | 0xffff2526, |
| 897 | 0xffff9be2, |
| 898 | 0xffff9bf4, |
| 899 | } }, |
| 900 | |
| 901 | { { 0x7ce7460d }, "Mario's Tennis", { 0xFFF8017C, 0xFFF90FEA, 0xFFF86DFA, 0xFFF873D6, 0xFFF9301C, |
| 902 | 0xfff801a2, |
| 903 | 0xfff90f98, |
| 904 | 0xfff90fae, |
| 905 | 0xfff90fc8, |
| 906 | 0xfff914c4, |
| 907 | 0xfff9150e, |
| 908 | 0xfff82a00, |
| 909 | 0xfff82a1a, |
| 910 | 0xfff82a38, |
| 911 | 0xfff86b98, |
| 912 | 0xfff86e66, |
| 913 | 0xfff871a2, |
| 914 | 0xfff8d9b6, |
| 915 | 0xfff8da5a, |
| 916 | 0xfff8dcf8, |
| 917 | 0xfff87aa8, |
| 918 | 0xfff93c86, |
| 919 | 0xfff93ca8, |
| 920 | 0xfff93ce0, |
| 921 | 0xfff94338, |
| 922 | 0xfff93158, |
| 923 | } }, |
| 924 | |
| 925 | { { 0xdf4d56b4 }, "Nester's Funky Bowling (US)", { 0xFFE00B78, 0xFFE00D82, 0xFFE0105A, 0xFFE00FCE, |
| 926 | 0xffe00f6a, |
| 927 | 0xffe00f72, |
| 928 | 0xffe00ddc, |
| 929 | 0xffe0089e, |
| 930 | 0xffe00fba, |
| 931 | 0xffe03702, |
| 932 | 0xffe01064, |
| 933 | 0xffe0c024, |
| 934 | 0xffe00bba, |
| 935 | 0xffe0d86c, |
| 936 | 0xffe0d51c, |
| 937 | } }, |
| 938 | |
| 939 | { { 0x19bb2dfb, 0x25fb89bb /*[b1]*/, 0x21d224af /*[h1]*/, 0xc767fe4b /*[h2]*/ }, "Panic Bomber (US)", { 0x07001FE8, |
| 940 | 0x07001f34, |
| 941 | 0x07001fc6, |
| 942 | } }, |
| 943 | |
| 944 | // Japan and US versions probably use the same code. |
| 945 | { { 0xaa10a7b4, 0x7e85c45d }, "Red Alarm", { 0x202CE, 0x070202B4, |
| 946 | 0x070202e2, |
| 947 | 0x07020642, |
| 948 | 0x0702074c, |
| 949 | 0x07001f50, |
| 950 | 0x0703ca0a, |
| 951 | 0x07045c9e, |
| 952 | 0x0703326a, |
| 953 | 0x07031aae, |
| 954 | 0x070328a4, |
| 955 | 0x07032e5e, |
| 956 | 0x0703748e, |
| 957 | 0x07035868, |
| 958 | 0x07035948, |
| 959 | 0x07031c88, |
| 960 | 0x0703786a, |
| 961 | 0x0703628e, |
| 962 | 0x07035b20, |
| 963 | 0x07035bc0, |
| 964 | 0x07033856, |
| 965 | 0x07037370, |
| 966 | 0x07031a2e, |
| 967 | 0x070373c4, |
| 968 | 0x0703cfd8, |
| 969 | 0x0703d03c, |
| 970 | 0x0703d0a4, |
| 971 | 0x0702eae2, |
| 972 | 0x0703ce00, |
| 973 | 0x07044f02, |
| 974 | 0x07041922, |
| 975 | 0x07041df0, |
| 976 | 0x0701ba38, |
| 977 | 0x07045176, |
| 978 | 0x07044f8c, |
| 979 | 0x0703c926, |
| 980 | 0x0703c940, |
| 981 | 0x0703c712, |
| 982 | 0x0703c73c, |
| 983 | 0x07023158, |
| 984 | 0x070231d6, |
| 985 | 0x0702320c, |
| 986 | 0x07020a60, |
| 987 | 0x0700489c, |
| 988 | 0x07032174, |
| 989 | 0x070324ca, |
| 990 | 0x0702ef56, |
| 991 | 0x070414b0, |
| 992 | 0x0702052e, |
| 993 | 0x070321a6, |
| 994 | 0x070321fe, |
| 995 | 0x07032224, |
| 996 | 0x07021866, |
| 997 | 0x07021aa4, |
| 998 | 0x07021b36, |
| 999 | 0x07021b5e, |
| 1000 | 0x07021b88, |
| 1001 | 0x0703c6ba, |
| 1002 | 0x0703cb3c, |
| 1003 | 0x0703c67a, |
| 1004 | 0x070412d2, |
| 1005 | 0x0704132a, |
| 1006 | 0x07041428, |
| 1007 | 0x07020d2e, |
| 1008 | 0x07020d48, |
| 1009 | 0x0703755a, |
| 1010 | 0x070375ac, |
| 1011 | 0x070375da, |
| 1012 | 0x07020aaa, |
| 1013 | 0x0701ba8a, |
| 1014 | 0x07041b0c, |
| 1015 | 0x070355d8, |
| 1016 | 0x07051ce0, |
| 1017 | 0x070049e0, |
| 1018 | 0x070049fa, |
| 1019 | 0x07004a94, |
| 1020 | 0x07020fb8, |
| 1021 | 0x07021046, |
| 1022 | 0x070210dc, |
| 1023 | 0x07004bc2, |
| 1024 | 0x07004ac0, |
| 1025 | 0x07041640, |
| 1026 | 0x07041698, |
| 1027 | 0x07041744, |
| 1028 | 0x07020eb0, |
| 1029 | 0x070208bc, |
| 1030 | 0x07020db6, |
| 1031 | 0x07020e40, |
| 1032 | 0x07004b28, |
| 1033 | 0x070417c0, |
| 1034 | 0x07041d3c, |
| 1035 | 0x07035f18, |
| 1036 | |
| 1037 | 0x07022bd2, |
| 1038 | 0x07020504, |
| 1039 | 0x070419a4, |
| 1040 | 0x07041a78, |
| 1041 | } }, |
| 1042 | |
| 1043 | { { 0x44788197 }, "SD Gundam Dimension War (Japan)", { |
| 1044 | 0xfff296de, |
| 1045 | 0xfff2970a, |
| 1046 | 0xfff29730, |
| 1047 | 0xfff298b0, |
| 1048 | 0xfff298fa, |
| 1049 | 0xfff29aac, |
| 1050 | 0xfff29af2, |
| 1051 | 0xfff29b1a, |
| 1052 | 0xfff065ba, |
| 1053 | 0xfff29b56, |
| 1054 | 0xfff29cd6, |
| 1055 | 0xfff4b7aa, |
| 1056 | 0xfff4b8e4, |
| 1057 | 0xfff4b9e2, |
| 1058 | 0xfff4ba2e, |
| 1059 | 0xfff4bbba, |
| 1060 | 0xfff2824c, |
| 1061 | 0xfff2835a, |
| 1062 | 0xfff2848e, |
| 1063 | 0xfff28aa4, |
| 1064 | 0xfff28b20, |
| 1065 | 0xfff28d66, |
| 1066 | 0xfff28e5c, |
| 1067 | 0xfff28e76, |
| 1068 | 0xfff065e6, |
| 1069 | 0xfff29504, |
| 1070 | 0xfff5869e, |
| 1071 | 0xfff58134, |
| 1072 | 0xfff563e4, |
| 1073 | 0xfff5687e, |
| 1074 | 0xfff19686, |
| 1075 | 0xfff196e6, |
| 1076 | 0xfff19726, |
| 1077 | 0xfff1974e, |
| 1078 | 0xfff1a3a2, |
| 1079 | 0xfff1083e, |
| 1080 | 0xfff140b2, |
| 1081 | 0xfff1372c, |
| 1082 | 0xfff13c0e, |
| 1083 | 0xfff13c70, |
| 1084 | 0xfff166f2, |
| 1085 | 0xfff18010, |
| 1086 | 0xfff18070, |
| 1087 | 0xfff18604, |
| 1088 | 0xfff10654, |
| 1089 | 0xfff44a7a, |
| 1090 | 0xfff44a90, |
| 1091 | 0xfff44ab4, |
| 1092 | 0xfff44af8, |
| 1093 | 0xfff4bd2e, |
| 1094 | 0xfff4517a, |
| 1095 | 0xfff439e6, |
| 1096 | 0xfff43e92, |
| 1097 | 0xfff43ea8, |
| 1098 | 0xfff43ecc, |
| 1099 | 0xfff43ef8, |
| 1100 | 0xfff442ee, |
| 1101 | 0xfff444c8, |
| 1102 | 0xfff1995c, |
| 1103 | 0xfff191ce, |
| 1104 | 0xfff264d4, |
| 1105 | 0xfff267ae, |
| 1106 | 0xfff489aa, |
| 1107 | 0xfff489ee, |
| 1108 | 0xfff48a32, |
| 1109 | 0xfff48a76, |
| 1110 | 0xfff48aba, |
| 1111 | 0xfff48ccc, |
| 1112 | 0xfff48dae, |
| 1113 | 0xfff493f2, |
| 1114 | 0xfff49422, |
| 1115 | 0xfff494c0, |
| 1116 | 0xfff49620, |
| 1117 | 0xfff4a822, |
| 1118 | 0xfff4a940, |
| 1119 | 0xfff4aa46, |
| 1120 | 0xfff4ab2a, |
| 1121 | 0xfff1b3b6, |
| 1122 | 0xfff1b3fc, |
| 1123 | 0xfff1b456, |
| 1124 | 0xfff1b496, |
| 1125 | 0xfff1b4d6, |
| 1126 | 0xfff1b516, |
| 1127 | 0xfff1b556, |
| 1128 | 0xfff1bc6e, |
| 1129 | 0xfff1bc94, |
| 1130 | 0xfff1bcaa, |
| 1131 | 0xfff1bcce, |
| 1132 | 0xfff1bcf6, |
| 1133 | 0xfff1bd0c, |
| 1134 | 0xfff1bd48, |
| 1135 | 0xfff1bdca, |
| 1136 | 0xfff1be2a, |
| 1137 | 0xfff1bed6, |
| 1138 | 0xfff26c88, |
| 1139 | 0xfff4ac00, |
| 1140 | 0xfff4ad68, |
| 1141 | 0xfff4b0f8, |
| 1142 | 0xfff26a70, |
| 1143 | 0xfff26b18, |
| 1144 | 0xfff1bf5e, |
| 1145 | 0xfff26dbe, |
| 1146 | 0xfff26e54, |
| 1147 | 0xfff441c4, |
| 1148 | 0xfff2d548, |
| 1149 | 0xfff2d630, |
| 1150 | 0xfff2d67c, |
| 1151 | 0xfff2d6c0, |
| 1152 | 0xfff2d750, |
| 1153 | 0xfff2d7de, |
| 1154 | 0xfff2d872, |
| 1155 | 0xfff2d90e, |
| 1156 | 0xfff2d9bc, |
| 1157 | 0xfff2da64, |
| 1158 | 0xfff2daec, |
| 1159 | 0xfff2db74, |
| 1160 | 0xfff2dc1c, |
| 1161 | 0xfff2dc94, |
| 1162 | 0xfff2dd32, |
| 1163 | 0xfff2ddf4, |
| 1164 | 0xfff2df4c, |
| 1165 | 0xfff3017a, |
| 1166 | 0xfff3091c, |
| 1167 | 0xfff271f2, |
| 1168 | 0xfff272a0, |
| 1169 | 0xfff4be52, |
| 1170 | 0xfff4bf06, |
| 1171 | 0xfff4bf36, |
| 1172 | 0xfff4bf5e, |
| 1173 | 0xfff4c4fe, |
| 1174 | 0xfff19852, |
| 1175 | 0xfff44b38, |
| 1176 | 0xfff44e4a, |
| 1177 | 0xfff44f4c, |
| 1178 | 0xfff0edc0, |
| 1179 | 0xfff0f142, |
| 1180 | } }, |
| 1181 | |
| 1182 | { { 0xfa44402d }, "Space Invaders VC (Japan)", { |
| 1183 | 0xfff80154, |
| 1184 | 0xfff87e04, |
| 1185 | 0xfff87e18, |
| 1186 | } }, |
| 1187 | |
| 1188 | // Is 0xc2211fcc a bad dump? |
| 1189 | { {0x60895693, 0xc2211fcc, 0x7cb69b3a /*[T+Eng]*/ }, "Space Squash (Japan)", { |
| 1190 | 0x0701a97e, |
| 1191 | } }, |
| 1192 | |
| 1193 | { { 0x6ba07915, 0x41fb63bf /*[b1]*/ }, "T&E Virtual Golf (Japan)", { |
| 1194 | 0x0700027e, |
| 1195 | 0x07000286, |
| 1196 | 0x070013d0, |
| 1197 | 0x070013f0, |
| 1198 | 0x0700141a, |
| 1199 | 0x07001004, |
| 1200 | 0x07001024, |
| 1201 | 0x07000d30, |
| 1202 | 0x07000d50, |
| 1203 | 0x07000db4, |
| 1204 | 0x07000dd4, |
| 1205 | 0x07013c4e, |
| 1206 | 0x07013cb2, |
| 1207 | 0x07013d22, |
| 1208 | 0x07001718, |
| 1209 | 0x07001738, |
| 1210 | 0x07001a32, |
| 1211 | 0x07001a52, |
| 1212 | 0x07005988, |
| 1213 | 0x07005998, |
| 1214 | 0x07001aa0, |
| 1215 | 0x07001ac0, |
| 1216 | 0x07001bb6, |
| 1217 | 0x07001bd0, |
| 1218 | 0x07001c36, |
| 1219 | 0x07001c56, |
| 1220 | 0x07013dee, |
| 1221 | 0x0700223c, |
| 1222 | 0x0700225c, |
| 1223 | 0x0700229c, |
| 1224 | 0x070022bc, |
| 1225 | 0x07013fec, |
| 1226 | 0x070024ee, |
| 1227 | 0x0700250e, |
| 1228 | 0x07013c7a, |
| 1229 | 0x0700947c, |
| 1230 | 0x0700949c, |
| 1231 | 0x07009ade, |
| 1232 | 0x0702162c, |
| 1233 | 0x07017e2c, |
| 1234 | 0x0701cae0, |
| 1235 | 0x0701cb00, |
| 1236 | 0x07007b70, |
| 1237 | 0x07007b90, |
| 1238 | 0x07007bb0, |
| 1239 | 0x07007bd0, |
| 1240 | 0x07007dfe, |
| 1241 | 0x07007e48, |
| 1242 | 0x0701e108, |
| 1243 | 0x0701e128, |
| 1244 | 0x07017280, |
| 1245 | 0x0700976e, |
| 1246 | 0x0700978e, |
| 1247 | 0x0701f45e, |
| 1248 | 0x0701f47e, |
| 1249 | 0x0701f54e, |
| 1250 | 0x0701f676, |
| 1251 | 0x0701f6b8, |
| 1252 | 0x0701f6d8, |
| 1253 | 0x07005960, |
| 1254 | 0x07005970, |
| 1255 | 0x07014094, |
| 1256 | 0x070169e6, |
| 1257 | 0x07016a06, |
| 1258 | 0x07013f48, |
| 1259 | 0x0701f01a, |
| 1260 | 0x0701f03a, |
| 1261 | 0x0701f11a, |
| 1262 | 0x0701f2c4, |
| 1263 | 0x0701f306, |
| 1264 | 0x0701f326, |
| 1265 | 0x07014f22, |
| 1266 | 0x07007982, |
| 1267 | 0x070079a2, |
| 1268 | } }, |
| 1269 | |
| 1270 | { { 0x36103000, 0xa6e0d6db /*[T+Ger.4b_KR155E]*/, 0x126123ad /*[T+Ger1.0_KR155E]*/ }, "Teleroboxer", { |
| 1271 | 0xfff2c408, |
| 1272 | 0xfff2c3f2, |
| 1273 | 0xfff2b626, |
| 1274 | 0xfff2c2ee, |
| 1275 | 0xfff2c2ae, |
| 1276 | 0xfff2b71c, |
| 1277 | 0xfff2b736, |
| 1278 | 0xfff2c1da, |
| 1279 | 0xfff2c21a, |
| 1280 | 0xfff2c36c, |
| 1281 | 0xfff2b876, |
| 1282 | 0xfff2b996, |
| 1283 | 0xfff2b9b0, |
| 1284 | 0xfff2b970, |
| 1285 | 0xfff2baf4, |
| 1286 | 0xfff2bb50, |
| 1287 | 0xfff2bc7e, |
| 1288 | 0xfff2bc9c, |
| 1289 | 0xfff6c2a2, |
| 1290 | 0xfff6c386, |
| 1291 | 0xfff6c39c, |
| 1292 | 0xfff6ad22, |
| 1293 | 0xfff0304c, |
| 1294 | 0xfff03b8e, |
| 1295 | 0xfff042ce, |
| 1296 | 0xfff04782, |
| 1297 | 0xfff04c5c, |
| 1298 | 0xfff04d90, |
| 1299 | 0xfff11242, |
| 1300 | 0xfff12f4a, |
| 1301 | 0xfff141b8, |
| 1302 | 0xfff04192, |
| 1303 | 0xfff0414c, |
| 1304 | 0xfff0616c, |
| 1305 | 0xfff069d0, |
| 1306 | 0xfff07912, |
| 1307 | 0xfff1a980, |
| 1308 | 0xfff1dc7e, |
| 1309 | 0xfff1f060, |
| 1310 | 0xfff22c92, |
| 1311 | 0xfff2ae50, |
| 1312 | 0xfff2af42, |
| 1313 | 0xfff2af60, |
| 1314 | 0xfff2e08c, |
| 1315 | 0xfff32112, |
| 1316 | 0xfff3213a, |
| 1317 | 0xfff2e9aa, |
| 1318 | |
| 1319 | 0xfff2e66c, |
| 1320 | 0xfff2eb50, |
| 1321 | 0xfff2eb6e, |
| 1322 | 0xfff29f8c, |
| 1323 | 0xfff2a1e4, |
| 1324 | 0xfff2a36e, |
| 1325 | 0xfff2a38c, |
| 1326 | 0xfff339b0, |
| 1327 | 0xfff339c6, |
| 1328 | 0xfff25802, |
| 1329 | 0xfff25a1e, |
| 1330 | 0xfff2637c, |
| 1331 | 0xfff2745c, |
| 1332 | 0xfff27a74, |
| 1333 | 0xfff29010, |
| 1334 | 0xfff04014, |
| 1335 | |
| 1336 | 0xfff32368, |
| 1337 | 0xfff32382, |
| 1338 | 0xfff32398, |
| 1339 | 0xfff325ea, |
| 1340 | 0xfff325a4, |
| 1341 | 0xfff32668, |
| 1342 | 0xfff326c0, |
| 1343 | 0xfff326fc, |
| 1344 | 0xfff32730, |
| 1345 | 0xfff32764, |
| 1346 | 0xfff32798, |
| 1347 | 0xfff327c2, |
| 1348 | 0xfff327f0, |
| 1349 | 0xfff0811c, |
| 1350 | 0xfff083ac, |
| 1351 | 0xfff098e4, |
| 1352 | |
| 1353 | 0xfff0ed12, |
| 1354 | 0xfff0f114, |
| 1355 | 0xfff0f7aa, |
| 1356 | 0xfff101f0, |
| 1357 | 0xfff102ae, |
| 1358 | 0xfff108be, |
| 1359 | 0xfff0a568, |
| 1360 | 0xfff0aa78, |
| 1361 | 0xfff0be3c, |
| 1362 | 0xfff043a4, |
| 1363 | 0xfff0435e, |
| 1364 | 0xfff0dcf8, |
| 1365 | 0xfff0dcb2, |
| 1366 | |
| 1367 | 0xfff054a4, |
| 1368 | 0xfff05706, |
| 1369 | 0xfff05934, |
| 1370 | 0xfff23ad2, |
| 1371 | 0xfff23b76, |
| 1372 | 0xfff2420e, |
| 1373 | |
| 1374 | 0xfff5d454, |
| 1375 | 0xfff5d51a, |
| 1376 | 0xfff5d550, |
| 1377 | 0xfff30eac, |
| 1378 | } }, |
| 1379 | |
| 1380 | { { 0x40498f5e }, "Tobidase! Panibomb (Japan)", { |
| 1381 | 0x07001fe4, |
| 1382 | 0x07001f30, |
| 1383 | 0x07001fc2, |
| 1384 | } }, |
| 1385 | |
| 1386 | { { 0x133e9372 }, "VB Wario Land", { 0x1c232e, 0x1BFB98, 0x1C215C, 0x1C27C6, |
| 1387 | 0xfffc2814, |
| 1388 | 0xfffbf49a, |
| 1389 | 0xfffbf48c, |
| 1390 | 0xfffc45bc, |
| 1391 | 0xfffc2956, |
| 1392 | } }, |
| 1393 | |
| 1394 | // Good grief(probably not even all of them!): |
| 1395 | { { 0x3ccb67ae }, "V-Tetris (Japan)", { 0xFFFA2ED4, 0xFFFA9FDC, 0xFFFA776A, 0xFFFA341C, 0xFFFABAB2, 0xFFFACCAE, 0xFFF8B38A, 0xFFFA9C14, 0xFFF8F086, 0xFFF925FE, |
| 1396 | 0xfffa2e58, |
| 1397 | 0xfffa2e78, |
| 1398 | 0xfffa2e98, |
| 1399 | 0xfffa2f02, |
| 1400 | 0xfffa2f32, |
| 1401 | 0xfffa2fb6, |
| 1402 | 0xfffa2fd4, |
| 1403 | 0xfff965e4, |
| 1404 | 0xfffa9f6c, |
| 1405 | 0xfffa9f8c, |
| 1406 | 0xfffa9fac, |
| 1407 | 0xfffaa026, |
| 1408 | 0xfffaa044, |
| 1409 | 0xfffa76c6, |
| 1410 | 0xfffa7704, |
| 1411 | 0xfffa7724, |
| 1412 | 0xfffa7a2a, |
| 1413 | 0xfffa7aba, |
| 1414 | 0xfffa30d4, |
| 1415 | 0xfffa30f2, |
| 1416 | 0xfffa3142, |
| 1417 | 0xfffa3158, |
| 1418 | 0xfffa3268, |
| 1419 | 0xfffa33c0, |
| 1420 | 0xfffa33f4, |
| 1421 | 0xfffa34b6, |
| 1422 | 0xfffa35dc, |
| 1423 | 0xfffa35f2, |
| 1424 | 0xfffa3684, |
| 1425 | 0xfffa369a, |
| 1426 | 0xfffa376e, |
| 1427 | 0xfffa3784, |
| 1428 | 0xfffa3918, |
| 1429 | 0xfffa3930, |
| 1430 | 0xfffa3946, |
| 1431 | 0xfffa39e4, |
| 1432 | 0xfffa3a4e, |
| 1433 | 0xfffa3ba6, |
| 1434 | 0xfffa3bea, |
| 1435 | 0xfffa3c00, |
| 1436 | 0xfffa3cde, |
| 1437 | 0xfffa3db4, |
| 1438 | 0xfffa3de0, |
| 1439 | 0xfffa3dfe, |
| 1440 | 0xfffaba16, |
| 1441 | 0xfffaba44, |
| 1442 | 0xfffaba76, |
| 1443 | 0xfffabc48, |
| 1444 | 0xfffabf3e, |
| 1445 | 0xfffac0f6, |
| 1446 | 0xfffac45e, |
| 1447 | 0xfffac59e, |
| 1448 | 0xfffac904, |
| 1449 | 0xfffaca44, |
| 1450 | 0xfffaca94, |
| 1451 | 0xfffacbc0, |
| 1452 | 0xfffacbf0, |
| 1453 | 0xfffacc2c, |
| 1454 | 0xfffad262, |
| 1455 | 0xfffacfe6, |
| 1456 | 0xfffad01c, |
| 1457 | 0xfffad296, |
| 1458 | 0xfffad2f0, |
| 1459 | 0xfff8b012, |
| 1460 | 0xfff8b2de, |
| 1461 | 0xfff8b2f2, |
| 1462 | 0xfff8b31e, |
| 1463 | 0xfff8b33e, |
| 1464 | 0xfff8bf62, |
| 1465 | 0xfff8c20e, |
| 1466 | 0xfff8b98e, |
| 1467 | 0xfff8bc4e, |
| 1468 | 0xfff8c554, |
| 1469 | 0xfff8c800, |
| 1470 | 0xfff8c824, |
| 1471 | 0xfff8c842, |
| 1472 | 0xfff8d15e, |
| 1473 | 0xfff8d188, |
| 1474 | 0xfff8d1c0, |
| 1475 | 0xfff8d1f6, |
| 1476 | 0xfff8d5da, |
| 1477 | 0xfff8d25e, |
| 1478 | 0xfff8d27c, |
| 1479 | 0xfffa9b98, |
| 1480 | 0xfffa9bb8, |
| 1481 | 0xfffa9bd8, |
| 1482 | 0xfffa9f22, |
| 1483 | 0xfffa9f40, |
| 1484 | 0xfff9233c, |
| 1485 | 0xfff923d0, |
| 1486 | 0xfff923e4, |
| 1487 | 0xfff9244a, |
| 1488 | 0xfff92492, |
| 1489 | 0xfff924b2, |
| 1490 | 0xfff8f056, |
| 1491 | 0xfff8f46a, |
| 1492 | 0xfff9250e, |
| 1493 | 0xfff925ba, |
| 1494 | 0xfff925e0, |
| 1495 | 0xfff94036, |
| 1496 | 0xfff92f56, |
| 1497 | 0xfff93d72, |
| 1498 | 0xfff9409c, |
| 1499 | 0xfff94270, |
| 1500 | 0xfff928c0, |
| 1501 | 0xfff92920, |
| 1502 | 0xfff92940, |
| 1503 | 0xfff9296e, |
| 1504 | 0xfff929c8, |
| 1505 | 0xfff92a74, |
| 1506 | 0xfff92a9c, |
| 1507 | 0xfff92aba, |
| 1508 | 0xfff9265c, |
| 1509 | 0xfff92688, |
| 1510 | 0xfff926ba, |
| 1511 | 0xfff926e6, |
| 1512 | 0xfff92712, |
| 1513 | 0xfff8f7b0, |
| 1514 | 0xfff8f886, |
| 1515 | 0xfff8f8a8, |
| 1516 | 0xfff8f96a, |
| 1517 | 0xfff8f998, |
| 1518 | 0xfff8fae0, |
| 1519 | 0xfff8faf6, |
| 1520 | 0xfff8fb14, |
| 1521 | 0xfff8fba4, |
| 1522 | 0xfff8fcd0, |
| 1523 | 0xfff8fd0c, |
| 1524 | 0xfff8fd9c, |
| 1525 | 0xfff8fe4c, |
| 1526 | 0xfff8ff7a, |
| 1527 | 0xfff8ffc8, |
| 1528 | 0xfff90058, |
| 1529 | 0xfff90108, |
| 1530 | 0xfff90236, |
| 1531 | 0xfff90284, |
| 1532 | 0xfff90314, |
| 1533 | 0xfff903c4, |
| 1534 | 0xfff904f2, |
| 1535 | 0xfff90540, |
| 1536 | 0xfff905d0, |
| 1537 | 0xfff90680, |
| 1538 | 0xfff907ae, |
| 1539 | 0xfff907fc, |
| 1540 | 0xfff9088c, |
| 1541 | 0xfff908ae, |
| 1542 | 0xfff908de, |
| 1543 | 0xfff909cc, |
| 1544 | 0xfff8f4c6, |
| 1545 | 0xfff8f586, |
| 1546 | 0xfff8f59a, |
| 1547 | 0xfff8f5bc, |
| 1548 | 0xfff8f5ec, |
| 1549 | 0xfff8f642, |
| 1550 | 0xfff8f714, |
| 1551 | 0xfff8f740, |
| 1552 | 0xfff8f77c, |
| 1553 | 0xfff940f4, |
| 1554 | 0xfff9411a, |
| 1555 | 0xfff94134, |
| 1556 | 0xfffad91e, |
| 1557 | 0xfff94152, |
| 1558 | 0xfffad98a, |
| 1559 | 0xfffad9f8, |
| 1560 | 0xfffada66, |
| 1561 | 0xfffadad8, |
| 1562 | 0xfffadb4a, |
| 1563 | 0xfffadbbc, |
| 1564 | 0xfffadc2e, |
| 1565 | 0xfffadc7e, |
| 1566 | 0xfffb72e2, |
| 1567 | 0xfff94172, |
| 1568 | 0xfff941a6, |
| 1569 | 0xfffa79b0, |
| 1570 | 0xfffa7924, |
| 1571 | 0xfffabd9e, |
| 1572 | 0xfffabe32, |
| 1573 | 0xfffabe54, |
| 1574 | 0xfffabee8, |
| 1575 | 0xfffabf18, |
| 1576 | 0xfffac11a, |
| 1577 | 0xfffac2c2, |
| 1578 | 0xfffac41a, |
| 1579 | 0xfffac5c0, |
| 1580 | 0xfffac5d6, |
| 1581 | 0xfffac768, |
| 1582 | 0xfffac8c0, |
| 1583 | 0xfffaca66, |
| 1584 | 0xfffacc78, |
| 1585 | 0xfffaddb2, |
| 1586 | 0xfffade64, |
| 1587 | 0xfffadf18, |
| 1588 | 0xfffadfcc, |
| 1589 | 0xfffae084, |
| 1590 | 0xfffae13c, |
| 1591 | 0xfffae1f4, |
| 1592 | 0xfffae2ac, |
| 1593 | 0xfffae2d8, |
| 1594 | 0xfffa6dda, |
| 1595 | 0xfffa6dfa, |
| 1596 | 0xfffa6e24, |
| 1597 | 0xfffa6e62, |
| 1598 | 0xfffa6e82, |
| 1599 | 0xfff9c9e2, |
| 1600 | 0xfff9ca02, |
| 1601 | 0xfff9ca2e, |
| 1602 | 0xfff9cbd4, |
| 1603 | 0xfff9cc14, |
| 1604 | 0xfff9ccba, |
| 1605 | 0xfff9cce6, |
| 1606 | 0xfff9cd8c, |
| 1607 | 0xfff9cdea, |
| 1608 | 0xfff9ce86, |
| 1609 | 0xfff9cea4, |
| 1610 | 0xfffa6f46, |
| 1611 | 0xfffa6f70, |
| 1612 | 0xfffa6fae, |
| 1613 | 0xfffa6fce, |
| 1614 | 0xfff944fe, |
| 1615 | 0xfff9453a, |
| 1616 | 0xfff945bc, |
| 1617 | 0xfff94604, |
| 1618 | 0xfff946b0, |
| 1619 | 0xfff946d6, |
| 1620 | 0xfff946f4, |
| 1621 | 0xfff9616a, |
| 1622 | 0xfff95e7e, |
| 1623 | 0xfff950be, |
| 1624 | 0xfff961d0, |
| 1625 | 0xfff964f8, |
| 1626 | 0xfff948ca, |
| 1627 | 0xfff948ea, |
| 1628 | 0xfff94918, |
| 1629 | 0xfff94972, |
| 1630 | 0xfff94a1e, |
| 1631 | 0xfff94a46, |
| 1632 | 0xfff94a64, |
| 1633 | 0xfff962d2, |
| 1634 | 0xfff962f8, |
| 1635 | 0xfff96312, |
| 1636 | 0xfff96330, |
| 1637 | 0xfffb7226, |
| 1638 | 0xfff96350, |
| 1639 | 0xfff96384, |
| 1640 | 0xfff9652a, |
| 1641 | 0xfff96554, |
| 1642 | 0xfffa706a, |
| 1643 | 0xffface1a, |
| 1644 | 0xffface50, |
| 1645 | 0xffface70, |
| 1646 | 0xfff8c238, |
| 1647 | 0xfff8c3a4, |
| 1648 | 0xfff8c3ce, |
| 1649 | 0xfff8c536, |
| 1650 | 0xfff8de2a, |
| 1651 | 0xfff8de54, |
| 1652 | 0xfff8de8e, |
| 1653 | 0xfff8dec6, |
| 1654 | 0xfff8e284, |
| 1655 | 0xfff8df1e, |
| 1656 | 0xfff8df3c, |
| 1657 | 0xfffa9dce, |
| 1658 | 0xfffa9e56, |
| 1659 | 0xfff943a2, |
| 1660 | 0xfff94454, |
| 1661 | 0xfff944e8, |
| 1662 | 0xfff9486a, |
| 1663 | 0xfff8cc76, |
| 1664 | 0xfff8cca0, |
| 1665 | 0xfff8ccda, |
| 1666 | 0xfff8cd12, |
| 1667 | 0xfff8d0d0, |
| 1668 | 0xfff8cd6a, |
| 1669 | 0xfff8cd88, |
| 1670 | 0xfff8dda4, |
| 1671 | 0xfff8d8bc, |
| 1672 | 0xfff8ddc8, |
| 1673 | 0xfff8ddf0, |
| 1674 | 0xfff8c8de, |
| 1675 | 0xfff8cbaa, |
| 1676 | 0xfff8cbbe, |
| 1677 | 0xfff8cbe8, |
| 1678 | 0xfff8cc10, |
| 1679 | 0xfff8d0f4, |
| 1680 | 0xfff8d11c, |
| 1681 | 0xfff8e2a8, |
| 1682 | 0xfff8e2d0, |
| 1683 | 0xfff8bc6c, |
| 1684 | 0xfff8bf2c, |
| 1685 | 0xfff8bf44, |
| 1686 | 0xfff8f680, |
| 1687 | 0xfff8e4f8, |
| 1688 | 0xfff8e518, |
| 1689 | 0xfff8e5ce, |
| 1690 | 0xfff8e606, |
| 1691 | 0xfff8ed2e, |
| 1692 | 0xfff8eb30, |
| 1693 | 0xfff8efa6, |
| 1694 | 0xfff8efd0, |
| 1695 | 0xfff8f012, |
| 1696 | 0xfff9cdb2, |
| 1697 | 0xfffa146a, |
| 1698 | 0xfffa169c, |
| 1699 | 0xfffa16ca, |
| 1700 | 0xfffa16fa, |
| 1701 | 0xfffa1766, |
| 1702 | 0xfffa179e, |
| 1703 | 0xfffa21d8, |
| 1704 | 0xfffa2272, |
| 1705 | 0xfffa2290, |
| 1706 | 0xfffa22a6, |
| 1707 | 0xfffa24d4, |
| 1708 | 0xfff8df6e, |
| 1709 | 0xfff8df98, |
| 1710 | 0xfff8dfc6, |
| 1711 | 0xfff8cdba, |
| 1712 | 0xfff8cde4, |
| 1713 | 0xfff8ce12, |
| 1714 | 0xfff8d2ae, |
| 1715 | 0xfff8d2d8, |
| 1716 | 0xfff8d30e, |
| 1717 | } }, |
| 1718 | |
| 1719 | { { 0x4c32ba5e, 0xdc8c0bf4 /*[h1]*/ }, "Vertical Force (US)", { 0x7000BF4 } }, |
| 1720 | |
| 1721 | // Is 0x05d06377 a bad dump? |
| 1722 | { { 0x9e9b8b92, 0x05d06377 }, "Vertical Force (Japan)", { 0x7000BF4 } }, |
| 1723 | |
| 1724 | { { 0x20688279, 0xddf9abe0 /*(Debug Menu Hack)*/ }, "Virtual Bowling (Japan)", { |
| 1725 | 0xfff24eda, |
| 1726 | 0xfff28bea, |
| 1727 | 0xfff28c00, |
| 1728 | 0xfff1fb9a, |
| 1729 | 0xfff1c284, |
| 1730 | 0xfff1ddc4, |
| 1731 | 0xfff0b93e, |
| 1732 | 0xfff249ac, |
| 1733 | 0xfff0b9a4, |
| 1734 | 0xfff258fc, |
| 1735 | 0xfff172aa, |
| 1736 | 0xfff2606e, |
| 1737 | 0xfff1a0e6, |
| 1738 | 0xfff1a0fc, |
| 1739 | 0xfff17222, |
| 1740 | 0xfff26058, |
| 1741 | 0xfff0b984, |
| 1742 | 0xfff21080, |
| 1743 | 0xfff21096, |
| 1744 | 0xfff1ddae, |
| 1745 | 0xfff13288, |
| 1746 | 0xfff132d8, |
| 1747 | 0xfff13ec8, |
| 1748 | 0xfff0b920, |
| 1749 | 0xfff284e8, |
| 1750 | 0xfff284fe, |
| 1751 | 0xfff154ac, |
| 1752 | 0xfff155f8, |
| 1753 | 0xfff15706, |
| 1754 | 0xfff2f51e, |
| 1755 | 0xfff1fb84, |
| 1756 | 0xfff27310, |
| 1757 | 0xfff0c480, |
| 1758 | 0xfff2d618, |
| 1759 | 0xfff2d62e, |
| 1760 | } }, |
| 1761 | |
| 1762 | { { 0x526cc969, 0x45471e40 /*[b1]*/ }, "Virtual Fishing (Japan)", { |
| 1763 | 0x07000388, |
| 1764 | 0x07000368, |
| 1765 | } }, |
| 1766 | |
| 1767 | |
| 1768 | { { 0x8989fe0a }, "Virtual Lab (Japan)", { |
| 1769 | 0x070000ae, |
| 1770 | 0x0700395a, |
| 1771 | 0x070051ac, |
| 1772 | 0x070039cc, |
| 1773 | 0x07003a96, |
| 1774 | 0x07003b1c, |
| 1775 | 0x07003bce, |
| 1776 | 0x07003c4e, |
| 1777 | 0x07003d42, |
| 1778 | 0x07003e42, |
| 1779 | 0x07003e9c, |
| 1780 | 0x07003f30, |
| 1781 | 0x07004098, |
| 1782 | 0x070041ee, |
| 1783 | 0x07003180, |
| 1784 | 0x070050f4, |
| 1785 | 0x07002fc4, |
| 1786 | 0x07000960, |
| 1787 | 0x070009a6, |
| 1788 | 0x07000b60, |
| 1789 | 0x07000bb4, |
| 1790 | 0x07001764, |
| 1791 | 0x070020ec, |
| 1792 | 0x070075cc, |
| 1793 | 0x07003112, |
| 1794 | 0x070001b2, |
| 1795 | 0x07001074, |
| 1796 | 0x070010e4, |
| 1797 | 0x070011d0, |
| 1798 | 0x07001262, |
| 1799 | 0x070012f6, |
| 1800 | 0x070013f4, |
| 1801 | 0x070014bc, |
| 1802 | 0x070015a2, |
| 1803 | 0x0700162e, |
| 1804 | 0x070023b8, |
| 1805 | 0x07002790, |
| 1806 | 0x070033ca, |
| 1807 | 0x070034c8, |
| 1808 | 0x07003254, |
| 1809 | 0x070035d0, |
| 1810 | 0x0700369e, |
| 1811 | 0x0700370a, |
| 1812 | 0x07003796, |
| 1813 | 0x070037fc, |
| 1814 | 0x070032f6, |
| 1815 | } }, |
| 1816 | |
| 1817 | // Is 0xcc62ab38 a bad dump? |
| 1818 | { { 0x736b40d6, 0xcc62ab38 }, "Virtual League Baseball (US)", { |
| 1819 | 0x07000bbc, |
| 1820 | 0x070011a4, |
| 1821 | 0x07000cc4, |
| 1822 | 0x07000c1c, |
| 1823 | 0x07000c6a, |
| 1824 | 0x07000be0, |
| 1825 | 0x07000c40, |
| 1826 | } }, |
| 1827 | |
| 1828 | { { 0x9ba8bb5e }, "Virtual Pro Yakyuu '95", { |
| 1829 | 0x07000bbc, |
| 1830 | 0x070011a4, |
| 1831 | 0x07000cc4, |
| 1832 | 0x07000c1c, |
| 1833 | 0x07000c6a, |
| 1834 | 0x07000be0, |
| 1835 | 0x07000c40, |
| 1836 | } }, |
| 1837 | |
| 1838 | { { 0x82a95e51, 0x742298d1 /*[b1]*/ }, "Waterworld (US)", { // Apparently has complex wait loop. |
| 1839 | 0x070008fc, |
| 1840 | 0x0700090e, |
| 1841 | 0x0700209e, |
| 1842 | 0x070020b4, |
| 1843 | 0x070009da, |
| 1844 | 0x0700222a, |
| 1845 | 0x07002312, |
| 1846 | 0x070023f8, |
| 1847 | 0x07002680, |
| 1848 | 0x07002c68, |
| 1849 | 0x0700303c, |
| 1850 | 0x07003052, |
| 1851 | 0x0700397e, |
| 1852 | 0x07003994, |
| 1853 | 0x07000bb4, |
| 1854 | 0x07000ac8, |
| 1855 | } }, |
| 1856 | |
| 1857 | { { 0x44C2B723 } , "Space Pinball (Prototype)", { |
| 1858 | 0x0702EA7A |
| 1859 | }}, |
| 1860 | }; |
| 1861 | |
| 1862 | static int Loadcxx . . $ Load(c185cac771729fac).(const char *name, MDFNFILEcxx . . $ MDFNFILE# *fp) |
| 1863 | { |
| 1864 | V810_Emu_Modecxx . . $ V810_Emu_Mode# cpu_mode; |
| 1865 | |
| 1866 | VB_InDebugPeekcxx . . $ VB_InDebugPeek. = 0; |
| 1867 | |
| 1868 | cpu_mode = (V810_Emu_Modecxx . . $ V810_Emu_Mode#)MDFN_GetSettingIcxx . . $ MDFN_GetSettingI(3c95bd14d5d5d286).("vb.cpu_emulation"); |
| 1869 | |
| 1870 | if(GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp) != round_up_pow2cxx . . $ round_up_pow2(2141b656ce2cc063).(GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp))) |
| 1871 | { |
| 1872 | puts("VB ROM image size is not a power of 2???"); |
| 1873 | return(0); |
| 1874 | } |
| 1875 | |
| 1876 | if(GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp) < 256) |
| 1877 | { |
| 1878 | puts("VB ROM image size is too small??"); |
| 1879 | return(0); |
| 1880 | } |
| 1881 | |
| 1882 | if(GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp) > (1 << 24)) |
| 1883 | { |
| 1884 | puts("VB ROM image size is too large??"); |
| 1885 | return(0); |
| 1886 | } |
| 1887 | |
| 1888 | VB_HeaderInfocxx . . $ VB_HeaderInfo# hinfo; |
| 1889 | |
| 1890 | ReadHeadercxx . . $ ReadHeader(4cdc66acf0804f35).(fp, &hinfo); |
| 1891 | |
| 1892 | MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).(_cxx . . $ `mednafen/mednafen.h:9:9`!("Title: %s\n"), hinfo.game_titlecxx . . $ VB_HeaderInfo#game_title.); |
| 1893 | MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).(_cxx . . $ `mednafen/mednafen.h:9:9`!("Game ID Code: %u\n"), hinfo.game_codecxx . . $ VB_HeaderInfo#game_code.); |
| 1894 | MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).(_cxx . . $ `mednafen/mednafen.h:9:9`!("Manufacturer Code: %d\n"), hinfo.manf_codecxx . . $ VB_HeaderInfo#manf_code.); |
| 1895 | MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).(_cxx . . $ `mednafen/mednafen.h:9:9`!("Version: %u\n"), hinfo.versioncxx . . $ VB_HeaderInfo#version.); |
| 1896 | |
| 1897 | MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).(_cxx . . $ `mednafen/mednafen.h:9:9`!("ROM: %dKiB\n"), (int)(GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp) / 1024)); |
| 1898 | |
| 1899 | MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).("\n"); |
| 1900 | |
| 1901 | MDFN_printfcxx . . $ MDFN_printf(326aeb464d16410c).(_cxx . . $ `mednafen/mednafen.h:9:9`!("V810 Emulation Mode: %s\n"), (cpu_mode == V810_EMU_MODE_ACCURATEcxx . . $ V810_EMU_MODE_ACCURATE.) ? _cxx . . $ `mednafen/mednafen.h:9:9`!("Accurate") : _cxx . . $ `mednafen/mednafen.h:9:9`!("Fast")); |
| 1902 | |
| 1903 | VB_V810cxx . . $ VB_V810. = new V810cxx . . $ V810#(); |
| 1904 | VB_V810cxx . . $ VB_V810.->Initcxx . . $ V810#Init(6f292f52d6600187).(cpu_mode, true); |
| 1905 | |
| 1906 | VB_V810cxx . . $ VB_V810.->SetMemReadHandlerscxx . . $ V810#SetMemReadHandlers(9cb6d09b7e005094).(MemRead8cxx . . $ MemRead8(30bc2cfa027d42f8)., MemRead16cxx . . $ MemRead16(6a3a2f833beb20d3)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1907 | VB_V810cxx . . $ VB_V810.->SetMemWriteHandlerscxx . . $ V810#SetMemWriteHandlers(14e671c2544e4d03).(MemWrite8cxx . . $ MemWrite8(b1c7ce297c54e4c4)., MemWrite16cxx . . $ MemWrite16(f235d607a429c96e)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1908 | |
| 1909 | VB_V810cxx . . $ VB_V810.->SetIOReadHandlerscxx . . $ V810#SetIOReadHandlers(9cb6d09b7e005094).(MemRead8cxx . . $ MemRead8(30bc2cfa027d42f8)., MemRead16cxx . . $ MemRead16(6a3a2f833beb20d3)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1910 | VB_V810cxx . . $ VB_V810.->SetIOWriteHandlerscxx . . $ V810#SetIOWriteHandlers(14e671c2544e4d03).(MemWrite8cxx . . $ MemWrite8(b1c7ce297c54e4c4)., MemWrite16cxx . . $ MemWrite16(f235d607a429c96e)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1911 | |
| 1912 | for(int i = 0; i < 256; i++) |
| 1913 | { |
| 1914 | VB_V810cxx . . $ VB_V810.->SetMemReadBus32cxx . . $ V810#SetMemReadBus32(f2ac3508b56cd10).(i, false); |
| 1915 | VB_V810cxx . . $ VB_V810.->SetMemWriteBus32cxx . . $ V810#SetMemWriteBus32(f2ac3508b56cd10).(i, false); |
| 1916 | } |
| 1917 | |
| 1918 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<uint32cxx . . $ uint32#> Map_Addressescxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 1919 | |
| 1920 | for(uint64cxx . . $ uint64# A = 0; A < 1ULL << 32; A += (1 << 27)) |
| 1921 | { |
| 1922 | for(uint64cxx . . $ uint64# sub_A = 5 << 24; sub_A < (6 << 24); sub_A += 65536) |
| 1923 | { |
| 1924 | Map_Addresses.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(A + sub_A); |
| 1925 | } |
| 1926 | } |
| 1927 | |
| 1928 | WRAMcxx . . $ WRAM. = VB_V810cxx . . $ VB_V810.->SetFastMapcxx . . $ V810#SetFastMap(4852f981d5b5a637).(&Map_Addresses[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0], 65536, Map_Addresses.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(), "WRAM"); |
| 1929 | Map_Addresses.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 1930 | |
| 1931 | |
| 1932 | // Round up the ROM size to 65536(we mirror it a little later) |
| 1933 | GPROM_Maskcxx . . $ GPROM_Mask. = (GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp) < 65536) ? (65536 - 1) : (GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp) - 1); |
| 1934 | |
| 1935 | for(uint64cxx . . $ uint64# A = 0; A < 1ULL << 32; A += (1 << 27)) |
| 1936 | { |
| 1937 | for(uint64cxx . . $ uint64# sub_A = 7 << 24; sub_A < (8 << 24); sub_A += GPROM_Maskcxx . . $ GPROM_Mask. + 1) |
| 1938 | { |
| 1939 | Map_Addresses.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(A + sub_A); |
| 1940 | //printf("%08x\n", (uint32)(A + sub_A)); |
| 1941 | } |
| 1942 | } |
| 1943 | |
| 1944 | |
| 1945 | GPROMcxx . . $ GPROM. = VB_V810cxx . . $ VB_V810.->SetFastMapcxx . . $ V810#SetFastMap(4852f981d5b5a637).(&Map_Addresses[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0], GPROM_Maskcxx . . $ GPROM_Mask. + 1, Map_Addresses.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(), "Cart ROM"); |
| 1946 | Map_Addresses.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 1947 | |
| 1948 | // Mirror ROM images < 64KiB to 64KiB |
| 1949 | for(uint64cxx . . $ uint64# i = 0; i < 65536; i += GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp)) |
| 1950 | { |
| 1951 | memcpy(GPROMcxx . . $ GPROM. + i, GET_FDATA_PTRcxx . . $ `mednafen/mednafen.h:21:9`!(fp), GET_FSIZE_PTRcxx . . $ `mednafen/mednafen.h:22:9`!(fp)); |
| 1952 | } |
| 1953 | |
| 1954 | GPRAM_Maskcxx . . $ GPRAM_Mask. = 0xFFFF; |
| 1955 | |
| 1956 | for(uint64cxx . . $ uint64# A = 0; A < 1ULL << 32; A += (1 << 27)) |
| 1957 | { |
| 1958 | for(uint64cxx . . $ uint64# sub_A = 6 << 24; sub_A < (7 << 24); sub_A += GPRAM_Maskcxx . . $ GPRAM_Mask. + 1) |
| 1959 | { |
| 1960 | //printf("GPRAM: %08x\n", A + sub_A); |
| 1961 | Map_Addresses.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(A + sub_A); |
| 1962 | } |
| 1963 | } |
| 1964 | |
| 1965 | |
| 1966 | GPRAMcxx . . $ GPRAM. = VB_V810cxx . . $ VB_V810.->SetFastMapcxx . . $ V810#SetFastMap(4852f981d5b5a637).(&Map_Addresses[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0], GPRAM_Maskcxx . . $ GPRAM_Mask. + 1, Map_Addresses.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(), "Cart RAM"); |
| 1967 | Map_Addresses.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 1968 | |
| 1969 | memset(GPRAMcxx . . $ GPRAM., 0, GPRAM_Maskcxx . . $ GPRAM_Mask. + 1); |
| 1970 | |
| 1971 | { |
| 1972 | FILE *gp = gzopencxx . . $ `mednafen/mednafen.h:24:9`!(MDFN_MakeFName(MDFNMKF_SAV, 0, "sav").c_str(), "rb"); |
| 1973 | |
| 1974 | if(gp) |
| 1975 | { |
| 1976 | if(gzreadcxx . . $ `mednafen/mednafen.h:25:9`!(gp, GPRAM, 65536) != 65536) |
| 1977 | puts("Error reading GPRAM"); |
| 1978 | gzclosecxx . . $ `mednafen/mednafen.h:26:9`!(gp); |
| 1979 | } |
| 1980 | } |
| 1981 | |
| 1982 | VIP_Initcxx . . $ VIP_Init(c9857a73d68e59ba).(); |
| 1983 | VB_VSUcxx . . $ VB_VSU. = new VSUcxx . . $ VSU#(&sbufcxx . . $ sbuf.[0], &sbufcxx . . $ sbuf.[1]); |
| 1984 | VBINPUT_Initcxx . . $ VBINPUT_Init(49f6e7a06ebc5aa8).(); |
| 1985 | |
| 1986 | VB3DModecxx . . $ VB3DMode. = MDFN_GetSettingUIcxx . . $ MDFN_GetSettingUI(751346f8406fd082).("vb.3dmode"); |
| 1987 | uint32cxx . . $ uint32# prescale = MDFN_GetSettingUIcxx . . $ MDFN_GetSettingUI(751346f8406fd082).("vb.liprescale"); |
| 1988 | uint32cxx . . $ uint32# sbs_separation = MDFN_GetSettingUIcxx . . $ MDFN_GetSettingUI(751346f8406fd082).("vb.sidebyside.separation"); |
| 1989 | |
| 1990 | VIP_Set3DModecxx . . $ VIP_Set3DMode(d9d0053e206adc11).(VB3DModecxx . . $ VB3DMode., MDFN_GetSettingUIcxx . . $ MDFN_GetSettingUI(751346f8406fd082).("vb.3dreverse"), prescale, sbs_separation); |
| 1991 | |
| 1992 | |
| 1993 | //SettingChanged("vb.3dmode"); |
| 1994 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.disable_parallax"); |
| 1995 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.anaglyph.lcolor"); |
| 1996 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.anaglyph.rcolor"); |
| 1997 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.anaglyph.preset"); |
| 1998 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.default_color"); |
| 1999 | |
| 2000 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.instant_display_hack"); |
| 2001 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.allow_draw_skip"); |
| 2002 | |
| 2003 | SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9).("vb.input.instant_read_hack"); |
| 2004 | |
| 2005 | MDFNGameInfocxx . . $ MDFNGameInfo.->fpscxx . . $ $anonymous_type_643ef407c229d02_12#fps. = (int64cxx . . $ int64#)20000000 * 65536 * 256 / (259 * 384 * 4); |
| 2006 | |
| 2007 | |
| 2008 | VB_Powercxx . . $ VB_Power(49f6e7a06ebc5aa8).(); |
| 2009 | |
| 2010 | |
| 2011 | #ifdef WANT_DEBUGGER |
| 2012 | VBDBG_Init(); |
| 2013 | #endif |
| 2014 | |
| 2015 | |
| 2016 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_widthcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_width. = 384; |
| 2017 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_heightcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_height. = 224; |
| 2018 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_widthcxx . . $ $anonymous_type_643ef407c229d02_12#fb_width. = 384; |
| 2019 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_heightcxx . . $ $anonymous_type_643ef407c229d02_12#fb_height. = 224; |
| 2020 | |
| 2021 | switch(VB3DModecxx . . $ VB3DMode.) |
| 2022 | { |
| 2023 | default: break; |
| 2024 | |
| 2025 | case VB3DMODE_VLIcxx . . $ VB3DMODE_VLI.: |
| 2026 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_widthcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_width. = 768 * prescale; |
| 2027 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_heightcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_height. = 224; |
| 2028 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_widthcxx . . $ $anonymous_type_643ef407c229d02_12#fb_width. = 768 * prescale; |
| 2029 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_heightcxx . . $ $anonymous_type_643ef407c229d02_12#fb_height. = 224; |
| 2030 | break; |
| 2031 | |
| 2032 | case VB3DMODE_HLIcxx . . $ VB3DMODE_HLI.: |
| 2033 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_widthcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_width. = 384; |
| 2034 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_heightcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_height. = 448 * prescale; |
| 2035 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_widthcxx . . $ $anonymous_type_643ef407c229d02_12#fb_width. = 384; |
| 2036 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_heightcxx . . $ $anonymous_type_643ef407c229d02_12#fb_height. = 448 * prescale; |
| 2037 | break; |
| 2038 | |
| 2039 | case VB3DMODE_CSCOPEcxx . . $ VB3DMODE_CSCOPE.: |
| 2040 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_widthcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_width. = 512; |
| 2041 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_heightcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_height. = 384; |
| 2042 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_widthcxx . . $ $anonymous_type_643ef407c229d02_12#fb_width. = 512; |
| 2043 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_heightcxx . . $ $anonymous_type_643ef407c229d02_12#fb_height. = 384; |
| 2044 | break; |
| 2045 | |
| 2046 | case VB3DMODE_SIDEBYSIDEcxx . . $ VB3DMODE_SIDEBYSIDE.: |
| 2047 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_widthcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_width. = 384 * 2 + sbs_separation; |
| 2048 | MDFNGameInfocxx . . $ MDFNGameInfo.->nominal_heightcxx . . $ $anonymous_type_643ef407c229d02_12#nominal_height. = 224; |
| 2049 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_widthcxx . . $ $anonymous_type_643ef407c229d02_12#fb_width. = 384 * 2 + sbs_separation; |
| 2050 | MDFNGameInfocxx . . $ MDFNGameInfo.->fb_heightcxx . . $ $anonymous_type_643ef407c229d02_12#fb_height. = 224; |
| 2051 | break; |
| 2052 | } |
| 2053 | MDFNGameInfocxx . . $ MDFNGameInfo.->lcm_widthcxx . . $ $anonymous_type_643ef407c229d02_12#lcm_width. = MDFNGameInfocxx . . $ MDFNGameInfo.->fb_widthcxx . . $ $anonymous_type_643ef407c229d02_12#fb_width.; |
| 2054 | MDFNGameInfocxx . . $ MDFNGameInfo.->lcm_heightcxx . . $ $anonymous_type_643ef407c229d02_12#lcm_height. = MDFNGameInfocxx . . $ MDFNGameInfo.->fb_heightcxx . . $ $anonymous_type_643ef407c229d02_12#fb_height.; |
| 2055 | |
| 2056 | |
| 2057 | MDFNMP_Initcxx . . $ MDFNMP_Init(8e1b545ea3aecce3).(32768, ((uint64cxx . . $ uint64#)1 << 27) / 32768); |
| 2058 | MDFNMP_AddRAMcxx . . $ MDFNMP_AddRAM(f9255d7bf06fcbb).(65536, 5 << 24, WRAMcxx . . $ WRAM.); |
| 2059 | if((GPRAM_Maskcxx . . $ GPRAM_Mask. + 1) >= 32768) |
| 2060 | MDFNMP_AddRAMcxx . . $ MDFNMP_AddRAM(f9255d7bf06fcbb).(GPRAM_Maskcxx . . $ GPRAM_Mask. + 1, 6 << 24, GPRAMcxx . . $ GPRAM.); |
| 2061 | return(1); |
| 2062 | } |
| 2063 | |
| 2064 | static void CloseGamecxx . . $ CloseGame(49f6e7a06ebc5aa8).(void) |
| 2065 | { |
| 2066 | // Only save cart RAM if it has been modified. |
| 2067 | for(unsigned int i = 0; i < GPRAM_Maskcxx . . $ GPRAM_Mask. + 1; i++) |
| 2068 | { |
| 2069 | if(GPRAMcxx . . $ GPRAM.[i]) |
| 2070 | { |
| 2071 | if(!MDFN_DumpToFilecxx . . $ MDFN_DumpToFile(aa08695a99e98aac).(MDFN_MakeFNamecxx . . $ MDFN_MakeFName(cb505ca63a9252bc).(MDFNMKF_SAVcxx . . $ MDFNMKF_SAV., 0, "sav").c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).(), 6, GPRAMcxx . . $ GPRAM., 65536)) |
| 2072 | { |
| 2073 | |
| 2074 | } |
| 2075 | break; |
| 2076 | } |
| 2077 | } |
| 2078 | //VIP_Kill(); |
| 2079 | |
| 2080 | if(VB_VSUcxx . . $ VB_VSU.) |
| 2081 | { |
| 2082 | delete VB_VSUcxx . . $ VB_VSU.; |
| 2083 | VB_VSUcxx . . $ VB_VSU. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2084 | } |
| 2085 | |
| 2086 | /* |
| 2087 | if(GPRAM) |
| 2088 | { |
| 2089 | MDFN_free(GPRAM); |
| 2090 | GPRAM = NULL; |
| 2091 | } |
| 2092 | |
| 2093 | if(GPROM) |
| 2094 | { |
| 2095 | MDFN_free(GPROM); |
| 2096 | GPROM = NULL; |
| 2097 | } |
| 2098 | */ |
| 2099 | |
| 2100 | if(VB_V810cxx . . $ VB_V810.) |
| 2101 | { |
| 2102 | VB_V810cxx . . $ VB_V810.->Killcxx . . $ V810#Kill(49f6e7a06ebc5aa8).(); |
| 2103 | delete VB_V810cxx . . $ VB_V810.; |
| 2104 | VB_V810cxx . . $ VB_V810. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2105 | } |
| 2106 | } |
| 2107 | |
| 2108 | void VB_ExitLoopcxx . . $ VB_ExitLoop(49f6e7a06ebc5aa8).(void) |
| 2109 | { |
| 2110 | VB_V810cxx . . $ VB_V810.->Exitcxx . . $ V810#Exit(49f6e7a06ebc5aa8).(); |
| 2111 | } |
| 2112 | |
| 2113 | static void Emulatecxx . . $ Emulate(c2dd9660813a5292).(EmulateSpecStructcxx . . $ EmulateSpecStruct# *espec) |
| 2114 | { |
| 2115 | v810_timestamp_tcxx . . $ v810_timestamp_t# v810_timestamp; |
| 2116 | |
| 2117 | MDFNMP_ApplyPeriodicCheatscxx . . $ MDFNMP_ApplyPeriodicCheats(49f6e7a06ebc5aa8).(); |
| 2118 | |
| 2119 | VBINPUT_Framecxx . . $ VBINPUT_Frame(49f6e7a06ebc5aa8).(); |
| 2120 | |
| 2121 | if(espec->SoundFormatChangedcxx . . $ $anonymous_type_643ef407c229d02_10#SoundFormatChanged.) |
| 2122 | { |
| 2123 | for(int y = 0; y < 2; y++) |
| 2124 | { |
| 2125 | sbufcxx . . $ sbuf.[y].set_sample_ratecxx . . $ Blip_Buffer#set_sample_rate(ee827314cdea73de).(espec->SoundRatecxx . . $ $anonymous_type_643ef407c229d02_10#SoundRate. ? espec->SoundRatecxx . . $ $anonymous_type_643ef407c229d02_10#SoundRate. : 44100, 50); |
| 2126 | sbufcxx . . $ sbuf.[y].clock_ratecxx . . $ Blip_Buffer#clock_rate(1624ee8275b10bda).((long)(VB_MASTER_CLOCKcxx . . $ `mednafen/vb/vb.h:14:9`! / 4)); |
| 2127 | sbufcxx . . $ sbuf.[y].bass_freqcxx . . $ Blip_Buffer#bass_freq(d4f767463ce0a6b3).(20); |
| 2128 | } |
| 2129 | } |
| 2130 | |
| 2131 | VIP_StartFramecxx . . $ VIP_StartFrame(c2dd9660813a5292).(espec); |
| 2132 | |
| 2133 | v810_timestamp = VB_V810cxx . . $ VB_V810.->Runcxx . . $ V810#Run(4d2abde9c7a0c9b3).(EventHandlercxx . . $ EventHandler(7864480464b09eea).); |
| 2134 | |
| 2135 | FixNonEventscxx . . $ FixNonEvents(49f6e7a06ebc5aa8).(); |
| 2136 | ForceEventUpdatescxx . . $ ForceEventUpdates(d4f767463ce0a6b3).(v810_timestamp); |
| 2137 | |
| 2138 | VB_VSUcxx . . $ VB_VSU.->EndFramecxx . . $ VSU#EndFrame(d4f767463ce0a6b3).((v810_timestamp + VSU_CycleFixcxx . . $ VSU_CycleFix.) >> 2); |
| 2139 | |
| 2140 | if(espec->SoundBufcxx . . $ $anonymous_type_643ef407c229d02_10#SoundBuf.) |
| 2141 | { |
| 2142 | for(int y = 0; y < 2; y++) |
| 2143 | { |
| 2144 | sbufcxx . . $ sbuf.[y].end_framecxx . . $ Blip_Buffer#end_frame(d4f767463ce0a6b3).((v810_timestamp + VSU_CycleFixcxx . . $ VSU_CycleFix.) >> 2); |
| 2145 | espec->SoundBufSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSize. = sbufcxx . . $ sbuf.[y].read_samplescxx . . $ Blip_Buffer#read_samples(44cf187bb4d07f06).(espec->SoundBufcxx . . $ $anonymous_type_643ef407c229d02_10#SoundBuf. + y, espec->SoundBufMaxSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufMaxSize., 1); |
| 2146 | } |
| 2147 | } |
| 2148 | |
| 2149 | VSU_CycleFixcxx . . $ VSU_CycleFix. = (v810_timestamp + VSU_CycleFixcxx . . $ VSU_CycleFix.) & 3; |
| 2150 | |
| 2151 | espec->MasterCyclescxx . . $ $anonymous_type_643ef407c229d02_10#MasterCycles. = v810_timestamp; |
| 2152 | |
| 2153 | TIMER_ResetTScxx . . $ TIMER_ResetTS(49f6e7a06ebc5aa8).(); |
| 2154 | VBINPUT_ResetTScxx . . $ VBINPUT_ResetTS(49f6e7a06ebc5aa8).(); |
| 2155 | VIP_ResetTScxx . . $ VIP_ResetTS(49f6e7a06ebc5aa8).(); |
| 2156 | |
| 2157 | RebaseTScxx . . $ RebaseTS(d4f767463ce0a6b3).(v810_timestamp); |
| 2158 | |
| 2159 | VB_V810cxx . . $ VB_V810.->ResetTScxx . . $ V810#ResetTS(d4f767463ce0a6b3).(0); |
| 2160 | } |
| 2161 | |
| 2162 | #ifdef WANT_DEBUGGER |
| 2163 | static DebuggerInfoStruct DBGInfo = |
| 2164 | { |
| 2165 | "shift_jis", |
| 2166 | 4, |
| 2167 | 2, // Instruction alignment(bytes) |
| 2168 | 32, |
| 2169 | 32, |
| 2170 | 0x00000000, |
| 2171 | ~0U, |
| 2172 | |
| 2173 | VBDBG_MemPeek, |
| 2174 | VBDBG_Disassemble, |
| 2175 | NULL, |
| 2176 | NULL, //ForceIRQ, |
| 2177 | NULL, |
| 2178 | VBDBG_FlushBreakPoints, |
| 2179 | VBDBG_AddBreakPoint, |
| 2180 | VBDBG_SetCPUCallback, |
| 2181 | VBDBG_EnableBranchTrace, |
| 2182 | VBDBG_GetBranchTrace, |
| 2183 | NULL, //KING_SetGraphicsDecode, |
| 2184 | VBDBG_SetLogFunc, |
| 2185 | }; |
| 2186 | #endif |
| 2187 | |
| 2188 | |
| 2189 | static int StateActioncxx . . $ StateAction(a45b884b8cf568d5).(StateMemcxx . . $ StateMem# *sm, int load, int data_only) |
| 2190 | { |
| 2191 | const v810_timestamp_tcxx . . $ v810_timestamp_t# timestamp = VB_V810cxx . . $ VB_V810.->v810_timestampcxx . . $ V810#v810_timestamp.; |
| 2192 | int ret = 1; |
| 2193 | |
| 2194 | SFORMATcxx . . $ SFORMAT# StateRegs[] = |
| 2195 | { |
| 2196 | SFARRAYcxx . . $ `mednafen/state.h:75:9`!(WRAM, 65536), |
| 2197 | SFARRAYcxx . . $ `mednafen/state.h:75:9`!(GPRAM, GPRAM_Mask ? (GPRAM_Mask + 1) : 0), |
| 2198 | SFVARcxx . . $ `mednafen/state.h:72:9`!(WCR), |
| 2199 | SFVARcxx . . $ `mednafen/state.h:72:9`!(IRQ_Asserted), |
| 2200 | SFVARcxx . . $ `mednafen/state.h:72:9`!(VSU_CycleFix), |
| 2201 | SFENDcxx . . $ `mednafen/state.h:96:9`! |
| 2202 | }; |
| 2203 | |
| 2204 | ret &= MDFNSS_StateActioncxx . . $ MDFNSS_StateAction(3f628545d3b0df83).(sm, load, data_only, StateRegs, "MAIN"); |
| 2205 | |
| 2206 | ret &= VB_V810cxx . . $ VB_V810.->StateActioncxx . . $ V810#StateAction(a45b884b8cf568d5).(sm, load, data_only); |
| 2207 | |
| 2208 | ret &= VB_VSUcxx . . $ VB_VSU.->StateActioncxx . . $ VSU#StateAction(a45b884b8cf568d5).(sm, load, data_only); |
| 2209 | ret &= TIMER_StateActioncxx . . $ TIMER_StateAction(a45b884b8cf568d5).(sm, load, data_only); |
| 2210 | ret &= VBINPUT_StateActioncxx . . $ VBINPUT_StateAction(a45b884b8cf568d5).(sm, load, data_only); |
| 2211 | ret &= VIP_StateActioncxx . . $ VIP_StateAction(a45b884b8cf568d5).(sm, load, data_only); |
| 2212 | |
| 2213 | if(load) |
| 2214 | { |
| 2215 | // Needed to recalculate next_*_ts since we don't bother storing their deltas in save states. |
| 2216 | ForceEventUpdatescxx . . $ ForceEventUpdates(d4f767463ce0a6b3).(timestamp); |
| 2217 | } |
| 2218 | return(ret); |
| 2219 | } |
| 2220 | |
| 2221 | static void SetLayerEnableMaskcxx . . $ SetLayerEnableMask(2c44cd906ae4e829).(uint64cxx . . $ uint64# mask) |
| 2222 | { |
| 2223 | |
| 2224 | } |
| 2225 | |
| 2226 | static void DoSimpleCommandcxx . . $ DoSimpleCommand(d4f767463ce0a6b3).(int cmd) |
| 2227 | { |
| 2228 | switch(cmd) |
| 2229 | { |
| 2230 | case MDFN_MSC_POWERcxx . . $ MDFN_MSC_POWER.: |
| 2231 | case MDFN_MSC_RESETcxx . . $ MDFN_MSC_RESET.: VB_Powercxx . . $ VB_Power(49f6e7a06ebc5aa8).(); break; |
| 2232 | } |
| 2233 | } |
| 2234 | |
| 2235 | static const MDFNSetting_EnumListcxx . . $ MDFNSetting_EnumList# V810Mode_Listcxx . . $ V810Mode_List.[] = |
| 2236 | { |
| 2237 | { "fast", (int)V810_EMU_MODE_FASTcxx . . $ V810_EMU_MODE_FAST., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Fast Mode"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Fast mode trades timing accuracy, cache emulation, and executing from hardware registers and RAM not intended for code use for performance.")}, |
| 2238 | { "accurate", (int)V810_EMU_MODE_ACCURATEcxx . . $ V810_EMU_MODE_ACCURATE., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Accurate Mode"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Increased timing accuracy, though not perfect, along with cache emulation, at the cost of decreased performance. Additionally, even the pipeline isn't correctly and fully emulated in this mode.") }, |
| 2239 | { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0 }, |
| 2240 | }; |
| 2241 | |
| 2242 | static const MDFNSetting_EnumListcxx . . $ MDFNSetting_EnumList# VB3DMode_Listcxx . . $ VB3DMode_List.[] = |
| 2243 | { |
| 2244 | { "anaglyph", VB3DMODE_ANAGLYPHcxx . . $ VB3DMODE_ANAGLYPH., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Anaglyph"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Used in conjunction with classic dual-lens-color glasses.") }, |
| 2245 | { "cscope", VB3DMODE_CSCOPEcxx . . $ VB3DMODE_CSCOPE., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("CyberScope"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Intended for use with the CyberScope 3D device.") }, |
| 2246 | { "sidebyside", VB3DMODE_SIDEBYSIDEcxx . . $ VB3DMODE_SIDEBYSIDE., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Side-by-Side"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("The left-eye image is displayed on the left, and the right-eye image is displayed on the right.") }, |
| 2247 | // { "overunder", VB3DMODE_OVERUNDER }, |
| 2248 | { "vli", VB3DMODE_VLIcxx . . $ VB3DMODE_VLI., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Vertical Line Interlaced"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Vertical lines alternate between left view and right view.") }, |
| 2249 | { "hli", VB3DMODE_HLIcxx . . $ VB3DMODE_HLI., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Horizontal Line Interlaced"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Horizontal lines alternate between left view and right view.") }, |
| 2250 | { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0 }, |
| 2251 | }; |
| 2252 | |
| 2253 | static const MDFNSetting_EnumListcxx . . $ MDFNSetting_EnumList# AnaglyphPreset_Listcxx . . $ AnaglyphPreset_List.[] = |
| 2254 | { |
| 2255 | { "disabled", ANAGLYPH_PRESET_DISABLEDcxx . . $ ANAGLYPH_PRESET_DISABLED., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Disabled"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Forces usage of custom anaglyph colors.") }, |
| 2256 | { "0", ANAGLYPH_PRESET_DISABLEDcxx . . $ ANAGLYPH_PRESET_DISABLED. }, |
| 2257 | |
| 2258 | { "red_blue", ANAGLYPH_PRESET_RED_BLUEcxx . . $ ANAGLYPH_PRESET_RED_BLUE., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Red/Blue"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Classic red/blue anaglyph.") }, |
| 2259 | { "red_cyan", ANAGLYPH_PRESET_RED_CYANcxx . . $ ANAGLYPH_PRESET_RED_CYAN., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Red/Cyan"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Improved quality red/cyan anaglyph.") }, |
| 2260 | { "red_electriccyan", ANAGLYPH_PRESET_RED_ELECTRICCYANcxx . . $ ANAGLYPH_PRESET_RED_ELECTRICCYAN., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Red/Electric Cyan"), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Alternate version of red/cyan") }, |
| 2261 | { "red_green", ANAGLYPH_PRESET_RED_GREENcxx . . $ ANAGLYPH_PRESET_RED_GREEN., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Red/Green") }, |
| 2262 | { "green_magenta", ANAGLYPH_PRESET_GREEN_MAGENTAcxx . . $ ANAGLYPH_PRESET_GREEN_MAGENTA., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Green/Magenta") }, |
| 2263 | { "yellow_blue", ANAGLYPH_PRESET_YELLOW_BLUEcxx . . $ ANAGLYPH_PRESET_YELLOW_BLUE., gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Yellow/Blue") }, |
| 2264 | |
| 2265 | { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 0 }, |
| 2266 | }; |
| 2267 | |
| 2268 | static MDFNSettingcxx . . $ MDFNSetting# VBSettingscxx . . $ VBSettings.[] = |
| 2269 | { |
| 2270 | { "vb.cpu_emulation", MDFNSF_EMU_STATEcxx . . $ `mednafen/settings-common.h:26:9`! | MDFNSF_UNTRUSTED_SAFEcxx . . $ `mednafen/settings-common.h:27:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("CPU emulation mode."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_ENUMcxx . . $ MDFNST_ENUM., "fast", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, V810Mode_Listcxx . . $ V810Mode_List. }, |
| 2271 | { "vb.input.instant_read_hack", MDFNSF_EMU_STATEcxx . . $ `mednafen/settings-common.h:26:9`! | MDFNSF_UNTRUSTED_SAFEcxx . . $ `mednafen/settings-common.h:27:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Input latency reduction hack."), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Reduces latency in some games by 20ms by returning the current pad state, rather than latched state, on serial port data reads. This hack may cause some homebrew software to malfunction, but it should be relatively safe for commercial official games."), MDFNST_BOOLcxx . . $ MDFNST_BOOL., "1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2272 | |
| 2273 | { "vb.instant_display_hack", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Display latency reduction hack."), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Reduces latency in games by displaying the framebuffer 20ms earlier. This hack has some potential of causing graphical glitches, so it is disabled by default."), MDFNST_BOOLcxx . . $ MDFNST_BOOL., "0", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2274 | { "vb.allow_draw_skip", MDFNSF_EMU_STATEcxx . . $ `mednafen/settings-common.h:26:9`! | MDFNSF_UNTRUSTED_SAFEcxx . . $ `mednafen/settings-common.h:27:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Allow draw skipping."), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("If vb.instant_display_hack is set to \"1\", and this setting is set to \"1\", then frame-skipping the drawing to the emulated framebuffer will be allowed. THIS WILL CAUSE GRAPHICAL GLITCHES, AND THEORETICALLY(but unlikely) GAME CRASHES, ESPECIALLY WITH DIRECT FRAMEBUFFER DRAWING GAMES."), MDFNST_BOOLcxx . . $ MDFNST_BOOL., "0", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2275 | |
| 2276 | // FIXME: We're going to have to set up some kind of video mode change notification for changing vb.3dmode while the game is running to work properly. |
| 2277 | { "vb.3dmode", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("3D mode."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_ENUMcxx . . $ MDFNST_ENUM., "anaglyph", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, /*SettingChanged*/NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, VB3DMode_Listcxx . . $ VB3DMode_List. }, |
| 2278 | { "vb.liprescale", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Line Interlaced prescale."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_UINTcxx . . $ MDFNST_UINT., "2", "1", "10", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2279 | |
| 2280 | { "vb.disable_parallax", MDFNSF_EMU_STATEcxx . . $ `mednafen/settings-common.h:26:9`! | MDFNSF_UNTRUSTED_SAFEcxx . . $ `mednafen/settings-common.h:27:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Disable parallax for BG and OBJ rendering."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_BOOLcxx . . $ MDFNST_BOOL., "0", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2281 | { "vb.default_color", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Default maximum-brightness color to use in non-anaglyph 3D modes."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_UINTcxx . . $ MDFNST_UINT., "0xF0F0F0", "0x000000", "0xFFFFFF", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2282 | |
| 2283 | { "vb.anaglyph.preset", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Anaglyph preset colors."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_ENUMcxx . . $ MDFNST_ENUM., "red_blue", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9)., AnaglyphPreset_Listcxx . . $ AnaglyphPreset_List. }, |
| 2284 | { "vb.anaglyph.lcolor", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Anaglyph maximum-brightness color for left view."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_UINTcxx . . $ MDFNST_UINT., "0xffba00", "0x000000", "0xFFFFFF", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2285 | { "vb.anaglyph.rcolor", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Anaglyph maximum-brightness color for right view."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_UINTcxx . . $ MDFNST_UINT., "0x00baff", "0x000000", "0xFFFFFF", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2286 | |
| 2287 | { "vb.sidebyside.separation", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Number of pixels to separate L/R views by."), gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("This setting refers to pixels before vb.xscale(fs) scaling is taken into consideration. For example, a value of \"100\" here will result in a separation of 300 screen pixels if vb.xscale(fs) is set to \"3\"."), MDFNST_UINTcxx . . $ MDFNST_UINT., /*"96"*/"0", "0", "1024", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2288 | |
| 2289 | { "vb.3dreverse", MDFNSF_NOFLAGScxx . . $ `mednafen/settings-common.h:19:9`!, gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Reverse left/right 3D views."), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, MDFNST_BOOLcxx . . $ MDFNST_BOOL., "0", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, SettingChangedcxx . . $ SettingChanged(85c52e162fed56f9). }, |
| 2290 | { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! } |
| 2291 | }; |
| 2292 | |
| 2293 | |
| 2294 | static const InputDeviceInputInfoStructcxx . . $ InputDeviceInputInfoStruct# IDIIcxx . . $ IDII.[] = |
| 2295 | { |
| 2296 | { "a", "A", 7, IDIT_BUTTON_CAN_RAPIDcxx . . $ IDIT_BUTTON_CAN_RAPID., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2297 | { "b", "B", 6, IDIT_BUTTON_CAN_RAPIDcxx . . $ IDIT_BUTTON_CAN_RAPID., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2298 | { "rt", "Right-Back", 13, IDIT_BUTTONcxx . . $ IDIT_BUTTON., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2299 | { "lt", "Left-Back", 12, IDIT_BUTTONcxx . . $ IDIT_BUTTON., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2300 | |
| 2301 | { "up-r", "UP ↑ (Right D-Pad)", 8, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "down-r" }, |
| 2302 | { "right-r", "RIGHT → (Right D-Pad)", 11, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "left-r" }, |
| 2303 | |
| 2304 | { "right-l", "RIGHT → (Left D-Pad)", 3, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "left-l" }, |
| 2305 | { "left-l", "LEFT ← (Left D-Pad)", 2, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "right-l" }, |
| 2306 | { "down-l", "DOWN ↓ (Left D-Pad)", 1, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "up-l" }, |
| 2307 | { "up-l", "UP ↑ (Left D-Pad)", 0, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "down-l" }, |
| 2308 | |
| 2309 | { "start", "Start", 5, IDIT_BUTTONcxx . . $ IDIT_BUTTON., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2310 | { "select", "Select", 4, IDIT_BUTTONcxx . . $ IDIT_BUTTON., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2311 | |
| 2312 | { "left-r", "LEFT ← (Right D-Pad)", 10, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "right-r" }, |
| 2313 | { "down-r", "DOWN ↓ (Right D-Pad)", 9, IDIT_BUTTONcxx . . $ IDIT_BUTTON., "up-r" }, |
| 2314 | }; |
| 2315 | |
| 2316 | static InputDeviceInfoStructcxx . . $ InputDeviceInfoStruct# InputDeviceInfocxx . . $ InputDeviceInfo.[] = |
| 2317 | { |
| 2318 | { |
| 2319 | "gamepad", |
| 2320 | "Gamepad", |
| 2321 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2322 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2323 | sizeof(IDIIcxx . . $ IDII.) / sizeof(InputDeviceInputInfoStructcxx . . $ InputDeviceInputInfoStruct#), |
| 2324 | IDIIcxx . . $ IDII., |
| 2325 | } |
| 2326 | }; |
| 2327 | |
| 2328 | static const InputPortInfoStructcxx . . $ InputPortInfoStruct# PortInfocxx . . $ PortInfo.[] = |
| 2329 | { |
| 2330 | { "builtin", "Built-In", sizeof(InputDeviceInfocxx . . $ InputDeviceInfo.) / sizeof(InputDeviceInfoStructcxx . . $ InputDeviceInfoStruct#), InputDeviceInfocxx . . $ InputDeviceInfo., "gamepad" } |
| 2331 | }; |
| 2332 | |
| 2333 | static InputInfoStructcxx . . $ InputInfoStruct# InputInfocxx . . $ InputInfo. = |
| 2334 | { |
| 2335 | sizeof(PortInfocxx . . $ PortInfo.) / sizeof(InputPortInfoStructcxx . . $ InputPortInfoStruct#), |
| 2336 | PortInfocxx . . $ PortInfo. |
| 2337 | }; |
| 2338 | |
| 2339 | |
| 2340 | static const FileExtensionSpecStructcxx . . $ FileExtensionSpecStruct# KnownExtensionscxx . . $ KnownExtensions.[] = |
| 2341 | { |
| 2342 | { ".vb", gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Nintendo Virtual Boy") }, |
| 2343 | { ".vboy", gettext_noopcxx . . $ `mednafen/mednafen.h:31:9`!("Nintendo Virtual Boy") }, |
| 2344 | { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! } |
| 2345 | }; |
| 2346 | |
| 2347 | MDFNGIcxx . . $ MDFNGI# EmulatedVBcxx . . $ EmulatedVB. = |
| 2348 | { |
| 2349 | "vb", |
| 2350 | "Virtual Boy", |
| 2351 | KnownExtensionscxx . . $ KnownExtensions., |
| 2352 | MODPRIO_INTERNAL_HIGHcxx . . $ MODPRIO_INTERNAL_HIGH., |
| 2353 | #ifdef WANT_DEBUGGER |
| 2354 | &DBGInfo, |
| 2355 | #else |
| 2356 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, // Debug info |
| 2357 | #endif |
| 2358 | &InputInfocxx . . $ InputInfo., // |
| 2359 | Loadcxx . . $ Load(c185cac771729fac)., |
| 2360 | TestMagiccxx . . $ TestMagic(ac45b4c5cbf1681)., |
| 2361 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2362 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2363 | CloseGamecxx . . $ CloseGame(49f6e7a06ebc5aa8)., |
| 2364 | SetLayerEnableMaskcxx . . $ SetLayerEnableMask(2c44cd906ae4e829)., |
| 2365 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, // Layer names, null-delimited |
| 2366 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2367 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2368 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2369 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2370 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2371 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, |
| 2372 | false, |
| 2373 | StateActioncxx . . $ StateAction(a45b884b8cf568d5)., |
| 2374 | Emulatecxx . . $ Emulate(c2dd9660813a5292)., |
| 2375 | VBINPUT_SetInputcxx . . $ VBINPUT_SetInput(d29b3d01ccfd77ca)., |
| 2376 | DoSimpleCommandcxx . . $ DoSimpleCommand(d4f767463ce0a6b3)., |
| 2377 | VBSettingscxx . . $ VBSettings., |
| 2378 | MDFN_MASTERCLOCK_FIXEDcxx . . $ `mednafen/git.h:341:10`!(VB_MASTER_CLOCKcxx . . $ `mednafen/vb/vb.h:14:9`!), |
| 2379 | 0, |
| 2380 | false, // Multires possible? |
| 2381 | |
| 2382 | 0, // lcm_width |
| 2383 | 0, // lcm_height |
| 2384 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, // Dummy |
| 2385 | |
| 2386 | 384, // Nominal width |
| 2387 | 224, // Nominal height |
| 2388 | |
| 2389 | 384, // Framebuffer width |
| 2390 | 256, // Framebuffer height |
| 2391 | |
| 2392 | 2, // Number of output sound channels |
| 2393 | }; |
| 2394 | |
| 2395 | static bool failed_initcxx . . $ failed_init.; |
| 2396 | |
| 2397 | static void hookup_portscxx . . $ hookup_ports(b45ddcbc8423892c).(bool force); |
| 2398 | |
| 2399 | static bool initial_ports_hookupcxx . . $ initial_ports_hookup. = false; |
| 2400 | |
| 2401 | stdcxx . . $ std/::stringcxx . . $ std/string# retro_base_directorycxx . . $ retro_base_directory.; |
| 2402 | stdcxx . . $ std/::stringcxx . . $ std/string# retro_base_namecxx . . $ retro_base_name.; |
| 2403 | stdcxx . . $ std/::stringcxx . . $ std/string# retro_save_directorycxx . . $ retro_save_directory.; |
| 2404 | |
| 2405 | static void set_basenamecxx . . $ set_basename(85c52e162fed56f9).(const char *path) |
| 2406 | { |
| 2407 | const char *base = strrchr(path, '/'); |
| 2408 | if (!base) |
| 2409 | base = strrchr(path, '\\'); |
| 2410 | |
| 2411 | if (base) |
| 2412 | retro_base_namecxx . . $ retro_base_name. =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). base + 1; |
| 2413 | else |
| 2414 | retro_base_namecxx . . $ retro_base_name. =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). path; |
| 2415 | |
| 2416 | retro_base_namecxx . . $ retro_base_name. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). retro_base_namecxx . . $ retro_base_name..substrcxx . . $ std/__cxx11/basic_string#substr(149c655009c9bbd2).(0, retro_base_namecxx . . $ retro_base_name..find_last_ofcxx . . $ std/__cxx11/basic_string#find_last_of(2dda2fc6b78abe68).('.')); |
| 2417 | } |
| 2418 | |
| 2419 | #define MEDNAFEN_CORE_NAME_MODULEcxx . . $ `libretro.cpp:2419:9`! "vb" |
| 2420 | #define MEDNAFEN_CORE_NAMEcxx . . $ `libretro.cpp:2420:9`! "Mednafen VB" |
| 2421 | #define MEDNAFEN_CORE_VERSIONcxx . . $ `libretro.cpp:2421:9`! "v0.9.36.1" |
| 2422 | #define MEDNAFEN_CORE_EXTENSIONScxx . . $ `libretro.cpp:2422:9`! "vb|vboy|bin" |
| 2423 | #define MEDNAFEN_CORE_TIMING_FPScxx . . $ `libretro.cpp:2423:9`! 50.27 |
| 2424 | #define MEDNAFEN_CORE_GEOMETRY_BASE_Wcxx . . $ `libretro.cpp:2424:9`! (game->nominal_width) |
| 2425 | #define MEDNAFEN_CORE_GEOMETRY_BASE_Hcxx . . $ `libretro.cpp:2425:9`! (game->nominal_height) |
| 2426 | #define MEDNAFEN_CORE_GEOMETRY_MAX_Wcxx . . $ `libretro.cpp:2426:9`! 384 |
| 2427 | #define MEDNAFEN_CORE_GEOMETRY_MAX_Hcxx . . $ `libretro.cpp:2427:9`! 224 |
| 2428 | #define MEDNAFEN_CORE_GEOMETRY_ASPECT_RATIOcxx . . $ `libretro.cpp:2428:9`! (4.0 / 3.0) |
| 2429 | #define FB_WIDTHcxx . . $ `libretro.cpp:2429:9`! 384 |
| 2430 | #define FB_HEIGHTcxx . . $ `libretro.cpp:2430:9`! 224 |
| 2431 | |
| 2432 | |
| 2433 | #define FB_MAX_HEIGHTcxx . . $ `libretro.cpp:2433:9`! FB_HEIGHTcxx . . $ `libretro.cpp:2430:9`! |
| 2434 | |
| 2435 | const char *mednafen_core_strcxx . . $ mednafen_core_str. = MEDNAFEN_CORE_NAMEcxx . . $ `libretro.cpp:2420:9`!; |
| 2436 | |
| 2437 | static void check_system_specscxx . . $ check_system_specs(49f6e7a06ebc5aa8).(void) |
| 2438 | { |
| 2439 | unsigned level = 0; |
| 2440 | environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVELcxx . . $ `libretro.h:444:9`!, &level); |
| 2441 | } |
| 2442 | |
| 2443 | void retro_initcxx . . $ retro_init(49f6e7a06ebc5aa8).(void) |
| 2444 | { |
| 2445 | struct retro_log_callback log; |
| 2446 | if (environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_LOG_INTERFACEcxx . . $ `libretro.h:673:9`!, &log)) |
| 2447 | log_cbcxx . . $ log_cb. = log.log; |
| 2448 | else |
| 2449 | log_cbcxx . . $ log_cb. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2450 | |
| 2451 | MDFNI_InitializeModulecxx . . $ MDFNI_InitializeModule(c9857a73d68e59ba).(); |
| 2452 | |
| 2453 | const char *dir = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2454 | |
| 2455 | if (environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORYcxx . . $ `libretro.h:461:9`!, &dir) && dir) |
| 2456 | { |
| 2457 | retro_base_directorycxx . . $ retro_base_directory. =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). dir; |
| 2458 | // Make sure that we don't have any lingering slashes, etc, as they break Windows. |
| 2459 | size_t last = retro_base_directorycxx . . $ retro_base_directory..find_last_not_ofcxx . . $ std/__cxx11/basic_string#find_last_not_of(b733e800f6f8fb8b).("/\\"); |
| 2460 | if (last != stdcxx . . $ std/::stringcxx . . $ std/string#::nposcxx . . $ std/__cxx11/basic_string#npos.) |
| 2461 | last++; |
| 2462 | |
| 2463 | retro_base_directorycxx . . $ retro_base_directory. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). retro_base_directorycxx . . $ retro_base_directory..substrcxx . . $ std/__cxx11/basic_string#substr(149c655009c9bbd2).(0, last); |
| 2464 | |
| 2465 | MDFNI_Initializecxx . . $ MDFNI_Initialize(5c4306d8553b3696).(retro_base_directorycxx . . $ retro_base_directory..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 2466 | } |
| 2467 | else |
| 2468 | { |
| 2469 | /* TODO: Add proper fallback */ |
| 2470 | if (log_cbcxx . . $ log_cb.) |
| 2471 | log_cbcxx . . $ log_cb.(RETRO_LOG_WARN, "System directory is not defined. Fallback on using same dir as ROM for system directory later ...\n"); |
| 2472 | failed_initcxx . . $ failed_init. = true; |
| 2473 | } |
| 2474 | |
| 2475 | if (environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORYcxx . . $ `libretro.h:706:9`!, &dir) && dir) |
| 2476 | { |
| 2477 | // If save directory is defined use it, otherwise use system directory |
| 2478 | retro_save_directorycxx . . $ retro_save_directory. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). *dir ? dircxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). : retro_base_directorycxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).; |
| 2479 | // Make sure that we don't have any lingering slashes, etc, as they break Windows. |
| 2480 | size_t last = retro_save_directorycxx . . $ retro_save_directory..find_last_not_ofcxx . . $ std/__cxx11/basic_string#find_last_not_of(b733e800f6f8fb8b).("/\\"); |
| 2481 | if (last != stdcxx . . $ std/::stringcxx . . $ std/string#::nposcxx . . $ std/__cxx11/basic_string#npos.) |
| 2482 | last++; |
| 2483 | |
| 2484 | retro_save_directorycxx . . $ retro_save_directory. =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). retro_save_directorycxx . . $ retro_save_directory..substrcxx . . $ std/__cxx11/basic_string#substr(149c655009c9bbd2).(0, last); |
| 2485 | } |
| 2486 | else |
| 2487 | { |
| 2488 | /* TODO: Add proper fallback */ |
| 2489 | if (log_cbcxx . . $ log_cb.) |
| 2490 | log_cbcxx . . $ log_cb.(RETRO_LOG_WARN, "Save directory is not defined. Fallback on using SYSTEM directory ...\n"); |
| 2491 | retro_save_directorycxx . . $ retro_save_directory. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). retro_base_directorycxx . . $ retro_base_directory.; |
| 2492 | } |
| 2493 | |
| 2494 | #if defined(WANT_16BPP) && defined(FRONTEND_SUPPORTS_RGB565cxx . . $ `<built-in>:483:9`!) |
| 2495 | enum retro_pixel_format rgb565 = RETRO_PIXEL_FORMAT_RGB565; |
| 2496 | if (environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &rgb565) && log_cb) |
| 2497 | log_cb(RETRO_LOG_INFO, "Frontend supports RGB565 - will use that instead of XRGB1555.\n"); |
| 2498 | #endif |
| 2499 | |
| 2500 | if (environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_PERF_INTERFACEcxx . . $ `libretro.h:683:9`!, &perf_cbcxx . . $ perf_cb.)) |
| 2501 | perf_get_cpu_features_cbcxx . . $ perf_get_cpu_features_cb. = perf_cbcxx . . $ perf_cb..get_cpu_features; |
| 2502 | else |
| 2503 | perf_get_cpu_features_cbcxx . . $ perf_get_cpu_features_cb. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2504 | |
| 2505 | check_system_specscxx . . $ check_system_specs(49f6e7a06ebc5aa8).(); |
| 2506 | } |
| 2507 | |
| 2508 | void retro_resetcxx . . $ retro_reset(49f6e7a06ebc5aa8).(void) |
| 2509 | { |
| 2510 | gamecxx . . $ game.->DoSimpleCommandcxx . . $ $anonymous_type_643ef407c229d02_12#DoSimpleCommand.(MDFN_MSC_RESETcxx . . $ MDFN_MSC_RESET.); |
| 2511 | } |
| 2512 | |
| 2513 | bool retro_load_game_specialcxx . . $ retro_load_game_special(bd3da2cb0fb3e69a).(unsigned, const struct retro_game_info *, size_t) |
| 2514 | { |
| 2515 | return false; |
| 2516 | } |
| 2517 | |
| 2518 | static void set_volumecxx . . $ set_volume(d89196f67e9c91e5). (uint32_tcxx . . $ uint32_t# *ptr, unsigned number) |
| 2519 | { |
| 2520 | switch(number) |
| 2521 | { |
| 2522 | default: |
| 2523 | *ptr = number; |
| 2524 | break; |
| 2525 | } |
| 2526 | } |
| 2527 | |
| 2528 | static void check_variablescxx . . $ check_variables(49f6e7a06ebc5aa8).(void) |
| 2529 | { |
| 2530 | struct retro_variable var = {0}; |
| 2531 | |
| 2532 | var.key = "vb_color_mode"; |
| 2533 | |
| 2534 | if (environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_VARIABLEcxx . . $ `libretro.h:518:9`!, &var) && var.value) |
| 2535 | { |
| 2536 | if (strcmp(var.value, "black & red") == 0) |
| 2537 | { |
| 2538 | setting_vb_lcolorcxx . . $ setting_vb_lcolor. = 0xFF0000; |
| 2539 | setting_vb_rcolorcxx . . $ setting_vb_rcolor. = 0x000000; |
| 2540 | } |
| 2541 | else if (strcmp(var.value, "black & white") == 0) |
| 2542 | { |
| 2543 | setting_vb_lcolorcxx . . $ setting_vb_lcolor. = 0xFFFFFF; |
| 2544 | setting_vb_rcolorcxx . . $ setting_vb_rcolor. = 0x000000; |
| 2545 | } |
| 2546 | log_cbcxx . . $ log_cb.(RETRO_LOG_INFO, "[%s]: Palette changed: %s .\n", mednafen_core_strcxx . . $ mednafen_core_str., var.value); |
| 2547 | } |
| 2548 | |
| 2549 | var.key = "vb_anaglyph_preset"; |
| 2550 | |
| 2551 | if (environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_VARIABLEcxx . . $ `libretro.h:518:9`!, &var) && var.value) |
| 2552 | { |
| 2553 | |
| 2554 | |
| 2555 | if (strcmp(var.value, "disabled") == 0) |
| 2556 | setting_vb_anaglyph_presetcxx . . $ setting_vb_anaglyph_preset. = 0; |
| 2557 | else if (strcmp(var.value, "red & blue") == 0) |
| 2558 | setting_vb_anaglyph_presetcxx . . $ setting_vb_anaglyph_preset. = 1; |
| 2559 | else if (strcmp(var.value, "red & cyan") == 0) |
| 2560 | setting_vb_anaglyph_presetcxx . . $ setting_vb_anaglyph_preset. = 2; |
| 2561 | else if (strcmp(var.value, "red & electric cyan") == 0) |
| 2562 | setting_vb_anaglyph_presetcxx . . $ setting_vb_anaglyph_preset. = 3; |
| 2563 | else if (strcmp(var.value, "red & green") == 0) |
| 2564 | setting_vb_anaglyph_presetcxx . . $ setting_vb_anaglyph_preset. = 4; |
| 2565 | else if (strcmp(var.value, "green & magenta") == 0) |
| 2566 | setting_vb_anaglyph_presetcxx . . $ setting_vb_anaglyph_preset. = 5; |
| 2567 | else if (strcmp(var.value, "yellow & blue") == 0) |
| 2568 | setting_vb_anaglyph_presetcxx . . $ setting_vb_anaglyph_preset. = 6; |
| 2569 | |
| 2570 | log_cbcxx . . $ log_cb.(RETRO_LOG_INFO, "[%s]: Palette changed: %s .\n", mednafen_core_strcxx . . $ mednafen_core_str., var.value); |
| 2571 | } |
| 2572 | } |
| 2573 | |
| 2574 | #define MAX_PLAYERScxx . . $ `libretro.cpp:2574:9`! 1 |
| 2575 | #define MAX_BUTTONScxx . . $ `libretro.cpp:2575:9`! 14 |
| 2576 | static uint16_tcxx . . $ uint16_t# input_bufcxx . . $ input_buf.[MAX_PLAYERScxx . . $ `libretro.cpp:2574:9`!]; |
| 2577 | |
| 2578 | static void hookup_portscxx . . $ hookup_ports(b45ddcbc8423892c).(bool force) |
| 2579 | { |
| 2580 | MDFNGIcxx . . $ MDFNGI# *currgame = gamecxx . . $ game.; |
| 2581 | |
| 2582 | if (initial_ports_hookupcxx . . $ initial_ports_hookup. && !force) |
| 2583 | return; |
| 2584 | |
| 2585 | // Possible endian bug ... |
| 2586 | currgame->SetInputcxx . . $ $anonymous_type_643ef407c229d02_12#SetInput.(0, "gamepad", &input_bufcxx . . $ input_buf.[0]); |
| 2587 | |
| 2588 | initial_ports_hookupcxx . . $ initial_ports_hookup. = true; |
| 2589 | } |
| 2590 | |
| 2591 | bool retro_load_gamecxx . . $ retro_load_game(19e33f369b94c047).(const struct retro_game_info *info) |
| 2592 | { |
| 2593 | if (failed_initcxx . . $ failed_init.) |
| 2594 | return false; |
| 2595 | |
| 2596 | struct retro_input_descriptor desc[] = { |
| 2597 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_LEFTcxx . . $ `libretro.h:150:9`!, "Left D-Pad Left" }, |
| 2598 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_UPcxx . . $ `libretro.h:148:9`!, "Left D-Pad Up" }, |
| 2599 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_DOWNcxx . . $ `libretro.h:149:9`!, "Left D-Pad Down" }, |
| 2600 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_RIGHTcxx . . $ `libretro.h:151:9`!, "Left D-Pad Right" }, |
| 2601 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_Bcxx . . $ `libretro.h:144:9`!, "B" }, |
| 2602 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_Acxx . . $ `libretro.h:152:9`!, "A" }, |
| 2603 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_Lcxx . . $ `libretro.h:154:9`!, "L" }, |
| 2604 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_Rcxx . . $ `libretro.h:155:9`!, "R" }, |
| 2605 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_R2cxx . . $ `libretro.h:157:9`!, "Right D-Pad Left" }, |
| 2606 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_L2cxx . . $ `libretro.h:156:9`!, "Right D-Pad Up" }, |
| 2607 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_L3cxx . . $ `libretro.h:158:9`!, "Right D-Pad Down" }, |
| 2608 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_R3cxx . . $ `libretro.h:159:9`!, "Right D-Pad Right" }, |
| 2609 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_SELECTcxx . . $ `libretro.h:146:9`!, "Select" }, |
| 2610 | { 0, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, RETRO_DEVICE_ID_JOYPAD_STARTcxx . . $ `libretro.h:147:9`!, "Start" }, |
| 2611 | |
| 2612 | { 0 }, |
| 2613 | }; |
| 2614 | |
| 2615 | environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORScxx . . $ `libretro.h:486:9`!, desc); |
| 2616 | |
| 2617 | #ifdef WANT_32BPPcxx . . $ `<built-in>:480:9`! |
| 2618 | enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888; |
| 2619 | if (!environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_SET_PIXEL_FORMATcxx . . $ `libretro.h:475:9`!, &fmt)) |
| 2620 | { |
| 2621 | if (log_cbcxx . . $ log_cb.) |
| 2622 | log_cbcxx . . $ log_cb.(RETRO_LOG_ERROR, "Pixel format XRGB8888 not supported by platform, cannot use %s.\n", MEDNAFEN_CORE_NAMEcxx . . $ `libretro.cpp:2420:9`!); |
| 2623 | return false; |
| 2624 | } |
| 2625 | #endif |
| 2626 | |
| 2627 | overscancxx . . $ overscan. = false; |
| 2628 | environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_OVERSCANcxx . . $ `libretro.h:419:9`!, &overscancxx . . $ overscan.); |
| 2629 | |
| 2630 | set_basenamecxx . . $ set_basename(85c52e162fed56f9).(info->path); |
| 2631 | |
| 2632 | check_variablescxx . . $ check_variables(49f6e7a06ebc5aa8).(); |
| 2633 | |
| 2634 | gamecxx . . $ game. = MDFNI_LoadGamecxx . . $ MDFNI_LoadGame(acefc047a690e6dc).(MEDNAFEN_CORE_NAME_MODULEcxx . . $ `libretro.cpp:2419:9`!, info->path); |
| 2635 | if (!gamecxx . . $ game.) |
| 2636 | return false; |
| 2637 | |
| 2638 | MDFN_PixelFormatcxx . . $ MDFN_PixelFormat# pix_fmtcxx . . $ MDFN_PixelFormat#MDFN_PixelFormat(fc65991e97fa879e).(MDFN_COLORSPACE_RGBcxx . . $ MDFN_COLORSPACE_RGB., 16, 8, 0, 24); |
| 2639 | memset(&last_pixel_formatcxx . . $ last_pixel_format., 0, sizeof(MDFN_PixelFormatcxx . . $ MDFN_PixelFormat#)); |
| 2640 | |
| 2641 | surfcxx . . $ surf. = new MDFN_Surfacecxx . . $ MDFN_Surface#(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, FB_WIDTHcxx . . $ `libretro.cpp:2429:9`!, FB_HEIGHTcxx . . $ `libretro.cpp:2430:9`!, FB_WIDTHcxx . . $ `libretro.cpp:2429:9`!, pix_fmt); |
| 2642 | |
| 2643 | hookup_portscxx . . $ hookup_ports(b45ddcbc8423892c).(true); |
| 2644 | |
| 2645 | check_variablescxx . . $ check_variables(49f6e7a06ebc5aa8).(); |
| 2646 | |
| 2647 | return gamecxx . . $ game.; |
| 2648 | } |
| 2649 | |
| 2650 | void retro_unload_gamecxx . . $ retro_unload_game(49f6e7a06ebc5aa8).() |
| 2651 | { |
| 2652 | if (!gamecxx . . $ game.) |
| 2653 | return; |
| 2654 | |
| 2655 | MDFNI_CloseGamecxx . . $ MDFNI_CloseGame(49f6e7a06ebc5aa8).(); |
| 2656 | } |
| 2657 | |
| 2658 | |
| 2659 | |
| 2660 | static void update_inputcxx . . $ update_input(49f6e7a06ebc5aa8).(void) |
| 2661 | { |
| 2662 | input_bufcxx . . $ input_buf.[0] = 0; |
| 2663 | static unsigned map[] = { |
| 2664 | RETRO_DEVICE_ID_JOYPAD_Acxx . . $ `libretro.h:152:9`!, |
| 2665 | RETRO_DEVICE_ID_JOYPAD_Bcxx . . $ `libretro.h:144:9`!, |
| 2666 | RETRO_DEVICE_ID_JOYPAD_Rcxx . . $ `libretro.h:155:9`!, |
| 2667 | RETRO_DEVICE_ID_JOYPAD_Lcxx . . $ `libretro.h:154:9`!, |
| 2668 | RETRO_DEVICE_ID_JOYPAD_L2cxx . . $ `libretro.h:156:9`!, //right d-pad UP |
| 2669 | RETRO_DEVICE_ID_JOYPAD_R3cxx . . $ `libretro.h:159:9`!, //right d-pad RIGHT |
| 2670 | RETRO_DEVICE_ID_JOYPAD_RIGHTcxx . . $ `libretro.h:151:9`!, //left d-pad |
| 2671 | RETRO_DEVICE_ID_JOYPAD_LEFTcxx . . $ `libretro.h:150:9`!, //left d-pad |
| 2672 | RETRO_DEVICE_ID_JOYPAD_DOWNcxx . . $ `libretro.h:149:9`!, //left d-pad |
| 2673 | RETRO_DEVICE_ID_JOYPAD_UPcxx . . $ `libretro.h:148:9`!, //left d-pad |
| 2674 | RETRO_DEVICE_ID_JOYPAD_STARTcxx . . $ `libretro.h:147:9`!, |
| 2675 | RETRO_DEVICE_ID_JOYPAD_SELECTcxx . . $ `libretro.h:146:9`!, |
| 2676 | RETRO_DEVICE_ID_JOYPAD_R2cxx . . $ `libretro.h:157:9`!, //right d-pad LEFT |
| 2677 | RETRO_DEVICE_ID_JOYPAD_L3cxx . . $ `libretro.h:158:9`!, //right d-pad DOWN |
| 2678 | }; |
| 2679 | |
| 2680 | for (unsigned j = 0; j < MAX_PLAYERScxx . . $ `libretro.cpp:2574:9`!; j++) |
| 2681 | { |
| 2682 | for (unsigned i = 0; i < MAX_BUTTONScxx . . $ `libretro.cpp:2575:9`!; i++) |
| 2683 | input_bufcxx . . $ input_buf.[j] |= map[i] != -1u && |
| 2684 | input_state_cbcxx . . $ input_state_cb.(j, RETRO_DEVICE_JOYPADcxx . . $ `libretro.h:76:9`!, 0, map[i]) ? (1 << i) : 0; |
| 2685 | |
| 2686 | #ifdef MSB_FIRST |
| 2687 | union { |
| 2688 | uint8_t b[2]; |
| 2689 | uint16_t s; |
| 2690 | } u; |
| 2691 | u.s = input_buf[j]; |
| 2692 | input_buf[j] = u.b[0] | u.b[1] << 8; |
| 2693 | #endif |
| 2694 | } |
| 2695 | |
| 2696 | } |
| 2697 | |
| 2698 | static uint64_tcxx . . $ uint64_t# video_framescxx . . $ video_frames., audio_framescxx . . $ audio_frames.; |
| 2699 | |
| 2700 | |
| 2701 | void retro_runcxx . . $ retro_run(49f6e7a06ebc5aa8).() |
| 2702 | { |
| 2703 | MDFNGIcxx . . $ MDFNGI# *curgame = gamecxx . . $ game.; |
| 2704 | |
| 2705 | input_poll_cbcxx . . $ input_poll_cb.(); |
| 2706 | |
| 2707 | update_inputcxx . . $ update_input(49f6e7a06ebc5aa8).(); |
| 2708 | |
| 2709 | static int16_tcxx . . $ int16_t# sound_buf[0x10000]; |
| 2710 | static MDFN_Rectcxx . . $ MDFN_Rect# rects[FB_MAX_HEIGHTcxx . . $ `libretro.cpp:2433:9`!]; |
| 2711 | rects[0].wcxx . . $ $anonymous_type_d9695e4ae1560f11_0#w. = ~0; |
| 2712 | |
| 2713 | EmulateSpecStructcxx . . $ EmulateSpecStruct# spec = {0}; |
| 2714 | spec.surfacecxx . . $ $anonymous_type_643ef407c229d02_10#surface. = surfcxx . . $ surf.; |
| 2715 | spec.SoundRatecxx . . $ $anonymous_type_643ef407c229d02_10#SoundRate. = 44100; |
| 2716 | spec.SoundBufcxx . . $ $anonymous_type_643ef407c229d02_10#SoundBuf. = sound_buf; |
| 2717 | spec.LineWidthscxx . . $ $anonymous_type_643ef407c229d02_10#LineWidths. = rects; |
| 2718 | spec.SoundBufMaxSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufMaxSize. = sizeof(sound_buf) / 2; |
| 2719 | spec.SoundVolumecxx . . $ $anonymous_type_643ef407c229d02_10#SoundVolume. = 1.0; |
| 2720 | spec.soundmultipliercxx . . $ $anonymous_type_643ef407c229d02_10#soundmultiplier. = 1.0; |
| 2721 | spec.SoundBufSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSize. = 0; |
| 2722 | spec.VideoFormatChangedcxx . . $ $anonymous_type_643ef407c229d02_10#VideoFormatChanged. = false; |
| 2723 | spec.SoundFormatChangedcxx . . $ $anonymous_type_643ef407c229d02_10#SoundFormatChanged. = false; |
| 2724 | |
| 2725 | if (memcmp(&last_pixel_formatcxx . . $ last_pixel_format., &spec.surfacecxx . . $ $anonymous_type_643ef407c229d02_10#surface.->formatcxx . . $ MDFN_Surface#format., sizeof(MDFN_PixelFormatcxx . . $ MDFN_PixelFormat#))) |
| 2726 | { |
| 2727 | spec.VideoFormatChangedcxx . . $ $anonymous_type_643ef407c229d02_10#VideoFormatChanged. = true; |
| 2728 | |
| 2729 | last_pixel_formatcxx . . $ last_pixel_format. =cxx . . $ MDFN_PixelFormat#`operator=`(56287c69832f2fa8). spec.surfacecxx . . $ $anonymous_type_643ef407c229d02_10#surface.->formatcxx . . $ MDFN_Surface#format.; |
| 2730 | } |
| 2731 | |
| 2732 | if (spec.SoundRatecxx . . $ $anonymous_type_643ef407c229d02_10#SoundRate. != last_sound_ratecxx . . $ last_sound_rate.) |
| 2733 | { |
| 2734 | spec.SoundFormatChangedcxx . . $ $anonymous_type_643ef407c229d02_10#SoundFormatChanged. = true; |
| 2735 | last_sound_ratecxx . . $ last_sound_rate. = spec.SoundRatecxx . . $ $anonymous_type_643ef407c229d02_10#SoundRate.; |
| 2736 | } |
| 2737 | |
| 2738 | curgame->Emulatecxx . . $ $anonymous_type_643ef407c229d02_12#Emulate.(&spec); |
| 2739 | |
| 2740 | int16cxx . . $ int16# *const SoundBuf = spec.SoundBufcxx . . $ $anonymous_type_643ef407c229d02_10#SoundBuf. + spec.SoundBufSizeALMScxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSizeALMS. * curgame->soundchancxx . . $ $anonymous_type_643ef407c229d02_12#soundchan.; |
| 2741 | int32cxx . . $ int32# SoundBufSize = spec.SoundBufSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSize. - spec.SoundBufSizeALMScxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSizeALMS.; |
| 2742 | const int32cxx . . $ int32# SoundBufMaxSize = spec.SoundBufMaxSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufMaxSize. - spec.SoundBufSizeALMScxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSizeALMS.; |
| 2743 | |
| 2744 | spec.SoundBufSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSize. = spec.SoundBufSizeALMScxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSizeALMS. + SoundBufSize; |
| 2745 | |
| 2746 | unsigned width = spec.DisplayRectcxx . . $ $anonymous_type_643ef407c229d02_10#DisplayRect..wcxx . . $ $anonymous_type_d9695e4ae1560f11_0#w.; |
| 2747 | unsigned height = spec.DisplayRectcxx . . $ $anonymous_type_643ef407c229d02_10#DisplayRect..hcxx . . $ $anonymous_type_d9695e4ae1560f11_0#h.; |
| 2748 | |
| 2749 | #if defined(WANT_32BPPcxx . . $ `<built-in>:480:9`!) |
| 2750 | const uint32_tcxx . . $ uint32_t# *pix = surfcxx . . $ surf.->pixelscxx . . $ MDFN_Surface#pixels.; |
| 2751 | video_cbcxx . . $ video_cb.(pix, width, height, FB_WIDTHcxx . . $ `libretro.cpp:2429:9`! << 2); |
| 2752 | #elif defined(WANT_16BPP) |
| 2753 | const uint16_t *pix = surf->pixels16; |
| 2754 | video_cb(pix, width, height, FB_WIDTH << 1); |
| 2755 | #endif |
| 2756 | |
| 2757 | video_framescxx . . $ video_frames.++; |
| 2758 | audio_framescxx . . $ audio_frames. += spec.SoundBufSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSize.; |
| 2759 | |
| 2760 | audio_batch_cbcxx . . $ audio_batch_cb.(spec.SoundBufcxx . . $ $anonymous_type_643ef407c229d02_10#SoundBuf., spec.SoundBufSizecxx . . $ $anonymous_type_643ef407c229d02_10#SoundBufSize.); |
| 2761 | |
| 2762 | bool updated = false; |
| 2763 | if (environ_cbcxx . . $ environ_cb.(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATEcxx . . $ `libretro.h:561:9`!, &updated) && updated) |
| 2764 | check_variablescxx . . $ check_variables(49f6e7a06ebc5aa8).(); |
| 2765 | } |
| 2766 | |
| 2767 | void retro_get_system_infocxx . . $ retro_get_system_info(f259f269f40171e3).(struct retro_system_info *info) |
| 2768 | { |
| 2769 | memset(info, 0, sizeof(*info)); |
| 2770 | info->library_name = MEDNAFEN_CORE_NAMEcxx . . $ `libretro.cpp:2420:9`!; |
| 2771 | info->library_version = MEDNAFEN_CORE_VERSIONcxx . . $ `libretro.cpp:2421:9`!; |
| 2772 | info->need_fullpath = true; |
| 2773 | info->valid_extensions = MEDNAFEN_CORE_EXTENSIONScxx . . $ `libretro.cpp:2422:9`!; |
| 2774 | info->block_extract = false; |
| 2775 | } |
| 2776 | |
| 2777 | void retro_get_system_av_infocxx . . $ retro_get_system_av_info(ec42bac1c52c94e9).(struct retro_system_av_info *info) |
| 2778 | { |
| 2779 | memset(info, 0, sizeof(*info)); |
| 2780 | info->timing.fps = MEDNAFEN_CORE_TIMING_FPScxx . . $ `libretro.cpp:2423:9`!; |
| 2781 | info->timing.sample_rate = 44100; |
| 2782 | info->geometry.base_width = MEDNAFEN_CORE_GEOMETRY_BASE_Wcxx . . $ `libretro.cpp:2424:9`!; |
| 2783 | info->geometry.base_height = MEDNAFEN_CORE_GEOMETRY_BASE_Hcxx . . $ `libretro.cpp:2425:9`!; |
| 2784 | info->geometry.max_width = MEDNAFEN_CORE_GEOMETRY_MAX_Wcxx . . $ `libretro.cpp:2426:9`!; |
| 2785 | info->geometry.max_height = MEDNAFEN_CORE_GEOMETRY_MAX_Hcxx . . $ `libretro.cpp:2427:9`!; |
| 2786 | info->geometry.aspect_ratio = MEDNAFEN_CORE_GEOMETRY_ASPECT_RATIOcxx . . $ `libretro.cpp:2428:9`!; |
| 2787 | } |
| 2788 | |
| 2789 | void retro_deinitcxx . . $ retro_deinit(49f6e7a06ebc5aa8).() |
| 2790 | { |
| 2791 | delete surfcxx . . $ surf.; |
| 2792 | surfcxx . . $ surf. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2793 | |
| 2794 | if (log_cbcxx . . $ log_cb.) |
| 2795 | { |
| 2796 | log_cbcxx . . $ log_cb.(RETRO_LOG_INFO, "[%s]: Samples / Frame: %.5f\n", |
| 2797 | mednafen_core_strcxx . . $ mednafen_core_str., (double)audio_framescxx . . $ audio_frames. / video_framescxx . . $ video_frames.); |
| 2798 | log_cbcxx . . $ log_cb.(RETRO_LOG_INFO, "[%s]: Estimated FPS: %.5f\n", |
| 2799 | mednafen_core_strcxx . . $ mednafen_core_str., (double)video_framescxx . . $ video_frames. * 44100 / audio_framescxx . . $ audio_frames.); |
| 2800 | } |
| 2801 | } |
| 2802 | |
| 2803 | unsigned retro_get_regioncxx . . $ retro_get_region(db52760e79bf9054).(void) |
| 2804 | { |
| 2805 | return RETRO_REGION_NTSCcxx . . $ `libretro.h:191:9`!; // FIXME: Regions for other cores. |
| 2806 | } |
| 2807 | |
| 2808 | unsigned retro_api_versioncxx . . $ retro_api_version(db52760e79bf9054).(void) |
| 2809 | { |
| 2810 | return RETRO_API_VERSIONcxx . . $ `libretro.h:50:9`!; |
| 2811 | } |
| 2812 | |
| 2813 | void retro_set_controller_port_devicecxx . . $ retro_set_controller_port_device(b4d55b1286ff73e8).(unsigned in_port, unsigned device) |
| 2814 | { |
| 2815 | MDFNGIcxx . . $ MDFNGI# *currgame = (MDFNGIcxx . . $ MDFNGI#*)gamecxx . . $ game.; |
| 2816 | |
| 2817 | if (!currgame) |
| 2818 | return; |
| 2819 | } |
| 2820 | |
| 2821 | void retro_set_environmentcxx . . $ retro_set_environment(ca2745877d29563).(retro_environment_t cb) |
| 2822 | { |
| 2823 | environ_cbcxx . . $ environ_cb. = cb; |
| 2824 | |
| 2825 | static const struct retro_variable vars[] = { |
| 2826 | { "vb_anaglyph_preset", "Anaglyph preset (restart); disabled|red & blue|red & cyan|red & electric cyan|red & green|green & magenta|yellow & blue" }, |
| 2827 | { "vb_color_mode", "Palette (restart); black & red|black & white" }, |
| 2828 | { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! }, |
| 2829 | }; |
| 2830 | cb(RETRO_ENVIRONMENT_SET_VARIABLEScxx . . $ `libretro.h:526:9`!, (void*)vars); |
| 2831 | } |
| 2832 | |
| 2833 | void retro_set_audio_samplecxx . . $ retro_set_audio_sample(c6279dcb374ccd32).(retro_audio_sample_t cb) |
| 2834 | { |
| 2835 | audio_cbcxx . . $ audio_cb. = cb; |
| 2836 | } |
| 2837 | |
| 2838 | void retro_set_audio_sample_batchcxx . . $ retro_set_audio_sample_batch(6b2060791f2f1bd1).(retro_audio_sample_batch_t cb) |
| 2839 | { |
| 2840 | audio_batch_cbcxx . . $ audio_batch_cb. = cb; |
| 2841 | } |
| 2842 | |
| 2843 | void retro_set_input_pollcxx . . $ retro_set_input_poll(964b12a25712bdc3).(retro_input_poll_t cb) |
| 2844 | { |
| 2845 | input_poll_cbcxx . . $ input_poll_cb. = cb; |
| 2846 | } |
| 2847 | |
| 2848 | void retro_set_input_statecxx . . $ retro_set_input_state(ebf409fe3ace00ad).(retro_input_state_t cb) |
| 2849 | { |
| 2850 | input_state_cbcxx . . $ input_state_cb. = cb; |
| 2851 | } |
| 2852 | |
| 2853 | void retro_set_video_refreshcxx . . $ retro_set_video_refresh(185c2191abec6d3b).(retro_video_refresh_t cb) |
| 2854 | { |
| 2855 | video_cbcxx . . $ video_cb. = cb; |
| 2856 | } |
| 2857 | |
| 2858 | static size_t serialize_sizecxx . . $ serialize_size.; |
| 2859 | |
| 2860 | size_t retro_serialize_sizecxx . . $ retro_serialize_size(f708dce9a8856c70).(void) |
| 2861 | { |
| 2862 | MDFNGIcxx . . $ MDFNGI# *curgame = (MDFNGIcxx . . $ MDFNGI#*)gamecxx . . $ game.; |
| 2863 | //if (serialize_size) |
| 2864 | // return serialize_size; |
| 2865 | |
| 2866 | if (!curgame->StateActioncxx . . $ $anonymous_type_643ef407c229d02_12#StateAction.) |
| 2867 | { |
| 2868 | if (log_cbcxx . . $ log_cb.) |
| 2869 | log_cbcxx . . $ log_cb.(RETRO_LOG_WARN, "[mednafen]: Module %s doesn't support save states.\n", curgame->shortnamecxx . . $ $anonymous_type_643ef407c229d02_12#shortname.); |
| 2870 | return 0; |
| 2871 | } |
| 2872 | |
| 2873 | StateMemcxx . . $ StateMem# st; |
| 2874 | memset(&st, 0, sizeof(st)); |
| 2875 | |
| 2876 | if (!MDFNSS_SaveSMcxx . . $ MDFNSS_SaveSM(d855d810c36bab0b).(&st, 0, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!)) |
| 2877 | { |
| 2878 | if (log_cbcxx . . $ log_cb.) |
| 2879 | log_cbcxx . . $ log_cb.(RETRO_LOG_WARN, "[mednafen]: Module %s doesn't support save states.\n", curgame->shortnamecxx . . $ $anonymous_type_643ef407c229d02_12#shortname.); |
| 2880 | return 0; |
| 2881 | } |
| 2882 | |
| 2883 | freecxx . . $ free(bd21765a0afc8e3c).(st.datacxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#data.); |
| 2884 | return serialize_sizecxx . . $ serialize_size. = st.lencxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#len.; |
| 2885 | } |
| 2886 | |
| 2887 | bool retro_serializecxx . . $ retro_serialize(ba504f6f2e89cb92).(void *data, size_t size) |
| 2888 | { |
| 2889 | StateMemcxx . . $ StateMem# st; |
| 2890 | memset(&st, 0, sizeof(st)); |
| 2891 | st.datacxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#data. = (uint8_tcxx . . $ uint8_t#*)data; |
| 2892 | st.mallocedcxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#malloced. = size; |
| 2893 | |
| 2894 | return MDFNSS_SaveSMcxx . . $ MDFNSS_SaveSM(d855d810c36bab0b).(&st, 0, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 2895 | } |
| 2896 | |
| 2897 | bool retro_unserializecxx . . $ retro_unserialize(d7c96d367a6f87f1).(const void *data, size_t size) |
| 2898 | { |
| 2899 | StateMemcxx . . $ StateMem# st; |
| 2900 | memset(&st, 0, sizeof(st)); |
| 2901 | st.datacxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#data. = (uint8_tcxx . . $ uint8_t#*)data; |
| 2902 | st.lencxx . . $ $anonymous_type_8d6ca9fa7c8baca5_0#len. = size; |
| 2903 | |
| 2904 | return MDFNSS_LoadSMcxx . . $ MDFNSS_LoadSM(4d015e8c0eefb98e).(&st, 0, 0); |
| 2905 | } |
| 2906 | |
| 2907 | void *retro_get_memory_datacxx . . $ retro_get_memory_data(52408c21a1e21ff7).(unsigned) |
| 2908 | { |
| 2909 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 2910 | } |
| 2911 | |
| 2912 | size_t retro_get_memory_sizecxx . . $ retro_get_memory_size(1892545c1754497d).(unsigned) |
| 2913 | { |
| 2914 | return 0; |
| 2915 | } |
| 2916 | |
| 2917 | void retro_cheat_resetcxx . . $ retro_cheat_reset(49f6e7a06ebc5aa8).(void) |
| 2918 | {} |
| 2919 | |
| 2920 | void retro_cheat_setcxx . . $ retro_cheat_set(f058bf27fe81fd03).(unsigned, bool, const char *) |
| 2921 | {} |
| 2922 | |
| 2923 | #ifdef _WIN32 |
| 2924 | static void sanitize_path(std::string &path) |
| 2925 | { |
| 2926 | size_t size = path.size(); |
| 2927 | for (size_t i = 0; i < size; i++) |
| 2928 | if (path[i] == '/') |
| 2929 | path[i] = '\\'; |
| 2930 | } |
| 2931 | #endif |
| 2932 | |
| 2933 | // Use a simpler approach to make sure that things go right for libretro. |
| 2934 | stdcxx . . $ std/::stringcxx . . $ std/string# MDFN_MakeFNamecxx . . $ MDFN_MakeFName(cb505ca63a9252bc).(MakeFName_Typecxx . . $ MakeFName_Type# type, int id1, const char *cd1) |
| 2935 | { |
| 2936 | char slash; |
| 2937 | #ifdef _WIN32 |
| 2938 | slash = '\\'; |
| 2939 | #else |
| 2940 | slash = '/'; |
| 2941 | #endif |
| 2942 | stdcxx . . $ std/::stringcxx . . $ std/string# retcxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).; |
| 2943 | switch (type) |
| 2944 | { |
| 2945 | case MDFNMKF_SAVcxx . . $ MDFNMKF_SAV.: |
| 2946 | ret =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). retro_save_directorycxx . . $ retro_save_directory. +cxx . . $ std/operator+(4f1c09d7d89f005e).slash +cxx . . $ std/operator+(db5dc2ea912c6495). retro_base_namecxx . . $ retro_base_name. +cxx . . $ std/operator+(aa1c00e85b87da6b). |
| 2947 | stdcxx . . $ std/::stringcxx . . $ std/string#(".") +cxx . . $ std/operator+(aa1c00e85b87da6b). |
| 2948 | stdcxx . . $ std/::stringcxx . . $ std/string#(cd1); |
| 2949 | break; |
| 2950 | case MDFNMKF_FIRMWAREcxx . . $ MDFNMKF_FIRMWARE.: |
| 2951 | ret =cxx . . $ std/__cxx11/basic_string#`operator=`(36befb0d0c9f966). retro_base_directorycxx . . $ retro_base_directory. +cxx . . $ std/operator+(4f1c09d7d89f005e). slash +cxx . . $ std/operator+(aa1c00e85b87da6b). stdcxx . . $ std/::stringcxx . . $ std/string#(cd1); |
| 2952 | #ifdef _WIN32 |
| 2953 | sanitize_path(ret); // Because Windows path handling is mongoloid. |
| 2954 | #endif |
| 2955 | break; |
| 2956 | default: |
| 2957 | break; |
| 2958 | } |
| 2959 | |
| 2960 | if (log_cbcxx . . $ log_cb.) |
| 2961 | log_cbcxx . . $ log_cb.(RETRO_LOG_INFO, "MDFN_MakeFName: %s\n", ret.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 2962 | return retcxx . . $ std/__cxx11/basic_string#basic_string(8f3aaafa33d05d0b).; |
| 2963 | } |
| 2964 | |
| 2965 | void MDFND_DispMessagecxx . . $ MDFND_DispMessage(f25546b61a629de7).(unsigned char *str) |
| 2966 | { |
| 2967 | if (log_cbcxx . . $ log_cb.) |
| 2968 | log_cbcxx . . $ log_cb.(RETRO_LOG_INFO, "%s\n", str); |
| 2969 | } |
| 2970 | |
| 2971 | void MDFND_Messagecxx . . $ MDFND_Message(85c52e162fed56f9).(const char *str) |
| 2972 | { |
| 2973 | if (log_cbcxx . . $ log_cb.) |
| 2974 | log_cbcxx . . $ log_cb.(RETRO_LOG_INFO, "%s\n", str); |
| 2975 | } |
| 2976 | |
| 2977 | void MDFND_MidSynccxx . . $ MDFND_MidSync(e58a7dfd4bdcb556).(const EmulateSpecStructcxx . . $ EmulateSpecStruct# *) |
| 2978 | {} |
| 2979 | |
| 2980 | void MDFN_MidLineUpdatecxx . . $ MDFN_MidLineUpdate(387ada12a6f698cd).(EmulateSpecStructcxx . . $ EmulateSpecStruct# *espec, int y) |
| 2981 | { |
| 2982 | //MDFND_MidLineUpdate(espec, y); |
| 2983 | } |
| 2984 | |
| 2985 | void MDFND_PrintErrorcxx . . $ MDFND_PrintError(85c52e162fed56f9).(const char* err) |
| 2986 | { |
| 2987 | if (log_cbcxx . . $ log_cb.) |
| 2988 | log_cbcxx . . $ log_cb.(RETRO_LOG_ERROR, "%s\n", err); |
| 2989 | } |