Merge branch 'master' (early part) into medusa
jump to
@@ -25,8 +25,16 @@ - Add APNG recording
Emulation fixes: - ARM: Fix ALU reading PC after shifting - ARM: Fix STR storing PC after address calculation + - ARM: Fix timing on Thumb shift instructions + - GB: Fix GBC game registers after skipping BIOS + - GB MBC: Support 4MB MBC30 ROMs (fixes mgba.io/i/1713) + - GB Video: Fix state after skipping BIOS (fixes mgba.io/i/1715 and mgba.io/i/1716) + - GB Video: Fix BGPS value after skipping BIOS (fixes mgba.io/i/1717) + - GBA: Add missing RTC overrides for Legendz games + - GBA: Fix timing advancing too quickly in rare cases - GBA BIOS: Implement dummy sound driver calls - GBA BIOS: Improve HLE BIOS timing + - GBA BIOS: Reset renderer when RegisterRamReset called (fixes mgba.io/i/1756) - GBA DMA: Linger last DMA on bus (fixes mgba.io/i/301 and mgba.io/i/1320) - GBA Memory: Improve gamepak prefetch timing - GBA SIO: Fix Multiplayer busy bit@@ -35,7 +43,14 @@ - GBA SIO: Fix copying Normal mode transfer values
- GBA Timers: Fix deserializing count-up timers - GBA Video: Latch scanline at end of Hblank (fixes mgba.io/i/1319) - GBA Video: Fix Hblank timing + - GBA Video: Fix mosaic objects drawing past the end (fixes mgba.io/i/1702) + - GBA Video: Fix disabling OBJWIN in GL renderer (fixes mgba.io/i/1759) + - GBA Video: Add missing parts of 256-color mode 0 mosaic (fixes mgba.io/1701) + - GBA Video: Fix double-size OBJ wrapping in GL renderer (fixes mgba.io/1712) Other fixes: + - All: Improve export headers (fixes mgba.io/i/1738) + - ARM Debugger: Clear low bit on breakpoint addresses (fixes mgba.io/i/1764) + - CMake: Always use devkitPro toolchain when applicable (fixes mgba.io/i/1755) - Core: Ensure ELF regions can be written before trying - Core: Fix ELF loading regression (fixes mgba.io/i/1669) - Core: Fix crash modifying hash table entry (fixes mgba.io/i/1673)@@ -44,8 +59,12 @@ - GBA: Reject incorrectly sized BIOSes
- Debugger: Don't skip undefined instructions when debugger attached - Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642) - Qt: Fix OpenGL 2.1 support (fixes mgba.io/i/1678) + - Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769) Misc: + - 3DS: Clean up legacy initialization (fixes mgba.io/i/1768) + - Debugger: Keep track of global cycle count - FFmpeg: Add looping option for GIF/APNG + - GBA Serialize: Only flunk BIOS check if official BIOS was expected - Qt: Renderer can be changed while a game is running - Qt: Add hex index to palette view - Qt: Add transformation matrix info to sprite view
@@ -9,14 +9,17 @@ cmake_policy(SET CMP0072 NEW)
endif() project(medusa) set(BINARY_NAME medusa-emu CACHE INTERNAL "Name of output binaries") +set(CMAKE_C_STANDARD 99) if(NOT MSVC) - set(GCC_STD "c99") + set(CMAKE_C_STANDARD_REQUIRED ON) + set(CMAKE_C_EXTENSIONS OFF) if(SWITCH) - set(GCC_STD "gnu11") - elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_COMPILER_VERSION VERSION_LESS "4.3") - set(GCC_STD "gnu99") + set(CMAKE_C_STANDARD 11) + set(CMAKE_C_EXTENSIONS ON) + elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.3") + set(CMAKE_C_EXTENSIONS ON) endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers -std=${GCC_STD}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers") else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146") endif()@@ -174,9 +177,9 @@ # Platform support
if(WIN32) set(WIN32_VERSION "${LIB_VERSION_MAJOR},${LIB_VERSION_MINOR},${LIB_VERSION_PATCH}") add_definitions(-D_WIN32_WINNT=0x0600) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) if(MSVC) add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) add_definitions(-D_UNICODE -DUNICODE) else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -municode")@@ -848,6 +851,7 @@ endif()
if(BUILD_SHARED) add_library(${BINARY_NAME} SHARED ${SRC} ${VFS_SRC}) + set(EXPORT_DEFINES MGBA_DLL) if(BUILD_STATIC) add_library(${BINARY_NAME}-static STATIC ${SRC}) target_include_directories(${BINARY_NAME}-static BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include)@@ -861,12 +865,10 @@ list(APPEND OS_DEFINES BUILD_STATIC)
endif() target_include_directories(${BINARY_NAME} BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include) - set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI} COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}" COMPILE_OPTIONS "${FEATURE_FLAGS}") + set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI} COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES};${EXPORT_DEFINES}" COMPILE_OPTIONS "${FEATURE_FLAGS}") add_dependencies(${BINARY_NAME} version-info) - include(GenerateExportHeader) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/mgba-util) - generate_export_header(${BINARY_NAME} BASE_NAME MGBA STATIC_DEFINE BUILD_STATIC EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/include/mgba-util/dllexports.h) target_link_libraries(${BINARY_NAME} ${DEBUGGER_LIB} ${DEPENDENCY_LIB} ${OS_LIB}) install(TARGETS ${BINARY_NAME} LIBRARY DESTINATION ${LIBDIR} COMPONENT lib${BINARY_NAME} NAMELINK_SKIP ARCHIVE DESTINATION ${LIBDIR} RUNTIME DESTINATION ${LIBDIR} COMPONENT lib${BINARY_NAME})
@@ -126,6 +126,8 @@ - mgba/ubuntu:xenial
- mgba/ubuntu:bionic - mgba/ubuntu:cosmic - mgba/ubuntu:disco +- mgba/ubuntu:eoan +- mgba/ubuntu:focal - mgba/vita - mgba/wii - mgba/windows:w32
@@ -65,12 +65,7 @@ // For PATH_MAX on modern toolchains
#include <sys/syslimits.h> #endif -#ifndef MGBA_STANDALONE #include <mgba-util/dllexports.h> -#else -#define MGBA_EXPORT -#define MGBA_NO_EXPORT -#endif #ifndef SSIZE_MAX #define SSIZE_MAX ((ssize_t) (SIZE_MAX >> 1))
@@ -0,0 +1,19 @@
+/* Copyright (c) 2013-2020 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#ifndef MGBA_EXPORT_H +#define MGBA_EXPORT_H + +#if defined(BUILD_STATIC) || !defined(_MSC_VER) || defined(MGBA_STANDALONE) +#define MGBA_EXPORT +#else +#ifdef MGBA_DLL +#define MGBA_EXPORT __declspec(dllexport) +#else +#define MGBA_EXPORT __declspec(dllimport) +#endif +#endif + +#endif
@@ -25,6 +25,7 @@ struct mTiming {
struct mTimingEvent* root; struct mTimingEvent* reroot; + uint64_t globalCycles; uint32_t masterCycles; int32_t* relativeCycles; int32_t* nextEvent;@@ -38,6 +39,7 @@ void mTimingDeschedule(struct mTiming* timing, struct mTimingEvent*);
bool mTimingIsScheduled(const struct mTiming* timing, const struct mTimingEvent*); int32_t mTimingTick(struct mTiming* timing, int32_t cycles); int32_t mTimingCurrentTime(const struct mTiming* timing); +uint64_t mTimingGlobalTime(const struct mTiming* timing); int32_t mTimingNextEvent(struct mTiming* timing); int32_t mTimingUntil(const struct mTiming* timing, const struct mTimingEvent*);
@@ -10,11 +10,7 @@ #ifdef __cplusplus
extern "C" { #endif -#ifdef MGBA_STANDALONE -#define MGBA_EXPORT -#else #include <mgba-util/dllexports.h> -#endif extern MGBA_EXPORT const char* const gitCommit; extern MGBA_EXPORT const char* const gitCommitShort;
@@ -70,7 +70,7 @@ struct ARMCore;
union PSR { struct { -#if defined(__POWERPC__) || defined(__PPC__) +#if defined(__BIG_ENDIAN__) unsigned n : 1; unsigned z : 1; unsigned c : 1;
@@ -84,7 +84,7 @@ REG_WY = 0x4A,
REG_WX = 0x4B, // CGB - REG_UNK4C = 0x4C, + REG_KEY0 = 0x4C, REG_KEY1 = 0x4D, REG_VBK = 0x4F, REG_HDMA1 = 0x51,@@ -97,7 +97,7 @@ REG_BCPS = 0x68,
REG_BCPD = 0x69, REG_OCPS = 0x6A, REG_OCPD = 0x6B, - REG_UNK6C = 0x6C, + REG_OPRI = 0x6C, REG_SVBK = 0x70, REG_UNK72 = 0x72, REG_UNK73 = 0x73,
@@ -155,7 +155,8 @@ * | bit 3: IME
* | bit 4: Is HDMA active? * | bits 5 - 7: Active RTC register * | 0x00196 - 0x00197: Reserved (leave zero) - * 0x00198 - 0x0025F: Reserved (leave zero) + * 0x00198 - 0x0019F: Global cycle counter + * 0x001A0 - 0x0025F: Reserved (leave zero) * 0x00260 - 0x002FF: OAM * 0x00300 - 0x0037F: I/O memory * 0x00380 - 0x003FE: HRAM@@ -388,7 +389,9 @@ GBSerializedMemoryFlags flags;
uint16_t reserved; } memory; - uint32_t reserved[50]; + uint64_t globalCycles; + + uint32_t reserved[48]; uint8_t oam[GB_SIZE_OAM];
@@ -161,6 +161,7 @@ void GBVideoInit(struct GBVideo* video);
void GBVideoReset(struct GBVideo* video); void GBVideoDeinit(struct GBVideo* video); void GBVideoAssociateRenderer(struct GBVideo* video, struct GBVideoRenderer* renderer); +void GBVideoSkipBIOS(struct GBVideo* video); void GBVideoProcessDots(struct GBVideo* video, uint32_t cyclesLate); void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value);
@@ -193,7 +193,8 @@ * 0x002F4 - 0x002FF: Prefetch
* | 0x002F4 - 0x002F7: GBA BIOS bus prefetch * | 0x002F8 - 0x002FB: CPU prefecth (decode slot) * | 0x002FC - 0x002FF: CPU prefetch (fetch slot) - * 0x00300 - 0x00317: Reserved (leave zero) + * 0x00300 - 0x0030F: Reserved (leave zero) + * 0x00310 - 0x00317: Global cycle counter * 0x00318 - 0x0031B: Last prefetched program counter * 0x0031C - 0x0031F: Miscellaneous flags * | bit 0: Is CPU halted?@@ -326,8 +327,9 @@
uint32_t biosPrefetch; uint32_t cpuPrefetch[2]; - uint32_t reservedCpu[6]; + uint32_t reservedCpu[4]; + uint64_t globalCycles; uint32_t lastPrefetchedPc; GBASerializedMiscFlags miscFlags; uint32_t nextIrq;
@@ -6,6 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba/internal/arm/debugger/cli-debugger.h> #include <mgba/core/core.h> +#include <mgba/core/timing.h> #include <mgba/internal/arm/debugger/debugger.h> #include <mgba/internal/arm/debugger/memory-debugger.h> #include <mgba/internal/arm/decoder.h>@@ -138,6 +139,7 @@ r < 7 ? " " : "", r + 3, cpu->gprs[r + 3]);
} be->printf(be, "cpsr: "); _printPSR(be, cpu->cpsr); + be->printf(be, "Cycle: %" PRIu64 "\n", mTimingGlobalTime(debugger->p->d.core->timing)); int instructionLength; enum ExecutionMode mode = cpu->cpsr.t; if (mode == MODE_ARM) {
@@ -171,7 +171,7 @@ struct ARMDebugBreakpoint* breakpoint = ARMDebugBreakpointListAppend(&debugger->swBreakpoints);
ssize_t id = debugger->nextId; ++debugger->nextId; breakpoint->d.id = id; - breakpoint->d.address = address; + breakpoint->d.address = address & ~1; // Clear Thumb bit since it's not part of a valid address breakpoint->d.segment = -1; breakpoint->d.condition = NULL; breakpoint->d.type = BREAKPOINT_SOFTWARE;@@ -187,6 +187,7 @@ struct ARMDebugBreakpoint* breakpoint = ARMDebugBreakpointListAppend(&debugger->breakpoints);
ssize_t id = debugger->nextId; ++debugger->nextId; breakpoint->d = *info; + breakpoint->d.address &= ~1; // Clear Thumb bit since it's not part of a valid address breakpoint->d.id = id; if (info->type == BREAKPOINT_SOFTWARE) { // TODO
@@ -157,6 +157,7 @@ }
cpu->gprs[rd] = 0; } } + ++currentCycles; THUMB_NEUTRAL_S( , , cpu->gprs[rd])) DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(LSR2,@@ -174,6 +175,7 @@ }
cpu->gprs[rd] = 0; } } + ++currentCycles; THUMB_NEUTRAL_S( , , cpu->gprs[rd])) DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(ASR2,@@ -191,6 +193,7 @@ cpu->gprs[rd] = 0;
} } } + ++currentCycles; THUMB_NEUTRAL_S( , , cpu->gprs[rd])) DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(ADC,@@ -215,6 +218,7 @@ } else {
cpu->cpsr.c = ARM_SIGN(cpu->gprs[rd]); } } + ++currentCycles; THUMB_NEUTRAL_S( , , cpu->gprs[rd]);) DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(TST, int32_t aluOut = cpu->gprs[rd] & cpu->gprs[rn]; THUMB_NEUTRAL_S(cpu->gprs[rd], cpu->gprs[rn], aluOut)) DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(NEG, THUMB_SUBTRACTION(cpu->gprs[rd], 0, cpu->gprs[rn]))
@@ -8,6 +8,7 @@
void mTimingInit(struct mTiming* timing, int32_t* relativeCycles, int32_t* nextEvent) { timing->root = NULL; timing->reroot = NULL; + timing->globalCycles = 0; timing->masterCycles = 0; timing->relativeCycles = relativeCycles; timing->nextEvent = nextEvent;@@ -20,6 +21,7 @@
void mTimingClear(struct mTiming* timing) { timing->root = NULL; timing->reroot = NULL; + timing->globalCycles = 0; timing->masterCycles = 0; }@@ -101,6 +103,10 @@ }
int32_t mTimingCurrentTime(const struct mTiming* timing) { return timing->masterCycles + *timing->relativeCycles; +} + +uint64_t mTimingGlobalTime(const struct mTiming* timing) { + return timing->globalCycles + *timing->relativeCycles; } int32_t mTimingNextEvent(struct mTiming* timing) {
@@ -460,13 +460,13 @@ }
GBVideoReset(&gb->video); GBTimerReset(&gb->timer); + GBIOReset(gb); if (!gb->biosVf) { GBSkipBIOS(gb); } else { mTimingSchedule(&gb->timing, &gb->timer.event, 0); } - GBIOReset(gb); GBAudioReset(&gb->audio); GBSIOReset(&gb->sio);@@ -478,6 +478,7 @@ }
void GBSkipBIOS(struct GB* gb) { struct SM83Core* cpu = gb->cpu; + const struct GBCartridge* cart = (const struct GBCartridge*) &gb->memory.rom[0x100]; int nextDiv = 0; switch (gb->model) {@@ -539,9 +540,15 @@ case GB_MODEL_CGB:
cpu->a = 0x11; cpu->f.packed = 0x80; cpu->c = 0; - cpu->e = 0x08; cpu->h = 0; - cpu->l = 0x7C; + if (cart->cgb & 0x80) { + cpu->d = 0xFF; + cpu->e = 0x56; + cpu->l = 0x0D; + } else { + cpu->e = 0x08; + cpu->l = 0x7C; + } gb->timer.internalDiv = 0x1EA; nextDiv = 0xC; break;@@ -554,6 +561,7 @@ mTimingDeschedule(&gb->timing, &gb->timer.event);
mTimingSchedule(&gb->timing, &gb->timer.event, 0); GBIOWrite(gb, REG_LCDC, 0x91); + GBVideoSkipBIOS(&gb->video); if (gb->biosVf) { GBUnmapBIOS(gb);@@ -666,6 +674,9 @@ int32_t cycles = cpu->cycles;
int32_t nextEvent; cpu->cycles = 0; +#ifdef USE_DEBUGGERS + gb->timing.globalCycles += cycles; +#endif cpu->nextEvent = INT_MAX; nextEvent = cycles;
@@ -53,6 +53,7 @@ [REG_OBP0] = "OBP0",
[REG_OBP1] = "OBP1", [REG_WY] = "WY", [REG_WX] = "WX", + [REG_KEY0] = "KEY0", [REG_KEY1] = "KEY1", [REG_VBK] = "VBK", [REG_HDMA1] = "HDMA1",@@ -65,6 +66,7 @@ [REG_BCPS] = "BCPS",
[REG_BCPD] = "BCPD", [REG_OCPS] = "OCPS", [REG_OCPD] = "OCPD", + [REG_OPRI] = "OPRI", [REG_SVBK] = "SVBK", [REG_IE] = "IE", };@@ -99,7 +101,7 @@ [REG_KEY1] = 0x7E,
[REG_VBK] = 0xFE, [REG_OCPS] = 0x40, [REG_BCPS] = 0x40, - [REG_UNK6C] = 0xFE, + [REG_OPRI] = 0xFE, [REG_SVBK] = 0xF8, [REG_IE] = 0xE0, };@@ -200,10 +202,10 @@ }
GBIOWrite(gb, REG_WY, 0x00); GBIOWrite(gb, REG_WX, 0x00); if (gb->model & GB_MODEL_CGB) { - GBIOWrite(gb, REG_UNK4C, 0); + GBIOWrite(gb, REG_KEY0, 0); GBIOWrite(gb, REG_JOYP, 0xFF); GBIOWrite(gb, REG_VBK, 0); - GBIOWrite(gb, REG_BCPS, 0); + GBIOWrite(gb, REG_BCPS, 0x80); GBIOWrite(gb, REG_OCPS, 0); GBIOWrite(gb, REG_SVBK, 1); GBIOWrite(gb, REG_HDMA1, 0xFF);@@ -462,7 +464,7 @@ if (gb->memory.io[0x50] != 0xFF) {
break; } GBUnmapBIOS(gb); - if (gb->model >= GB_MODEL_CGB && gb->memory.io[REG_UNK4C] < 0x80) { + if (gb->model >= GB_MODEL_CGB && gb->memory.io[REG_KEY0] < 0x80) { gb->model = GB_MODEL_DMG; GBVideoDisableCGB(&gb->video); }@@ -474,7 +476,7 @@ return;
default: if (gb->model >= GB_MODEL_CGB) { switch (address) { - case REG_UNK4C: + case REG_KEY0: break; case REG_KEY1: value &= 0x1;
@@ -518,7 +518,7 @@ }
void _GBMBC3(struct GB* gb, uint16_t address, uint8_t value) { struct GBMemory* memory = &gb->memory; - int bank = value & 0x7F; + int bank = value; switch (address >> 13) { case 0x0: switch (value) {@@ -536,6 +536,9 @@ break;
} break; case 0x1: + if (gb->memory.romSize < GB_SIZE_CART_BANK0 * 0x80) { + bank &= 0x7F; + } if (!bank) { ++bank; }
@@ -23,6 +23,7 @@ void GBSerialize(struct GB* gb, struct GBSerializedState* state) {
STORE_32LE(GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION, 0, &state->versionMagic); STORE_32LE(gb->romCrc32, 0, &state->romCrc32); STORE_32LE(gb->timing.masterCycles, 0, &state->masterCycles); + STORE_64LE(gb->timing.globalCycles, 0, &state->globalCycles); if (gb->memory.rom) { memcpy(state->title, ((struct GBCartridge*) &gb->memory.rom[0x100])->titleLong, sizeof(state->title));@@ -150,6 +151,7 @@ return false;
} mTimingClear(&gb->timing); LOAD_32LE(gb->timing.masterCycles, 0, &state->masterCycles); + LOAD_64LE(gb->timing.globalCycles, 0, &state->globalCycles); gb->cpu->a = state->cpu.a; gb->cpu->f.packed = state->cpu.f;
@@ -214,6 +214,30 @@ }
return false; } +void GBVideoSkipBIOS(struct GBVideo* video) { + video->mode = 1; + video->modeEvent.callback = _endMode1; + + int32_t next; + if (video->p->model == GB_MODEL_CGB) { + video->ly = GB_VIDEO_VERTICAL_PIXELS; + video->p->memory.io[REG_LY] = video->ly; + video->stat = GBRegisterSTATClearLYC(video->stat); + next = 20; + } else { + video->ly = GB_VIDEO_VERTICAL_TOTAL_PIXELS; + video->p->memory.io[REG_LY] = 0; + next = 56; + } + video->stat = GBRegisterSTATSetMode(video->stat, video->mode); + + video->p->memory.io[REG_IF] |= (1 << GB_IRQ_VBLANK); + GBUpdateIRQs(video->p); + video->p->memory.io[REG_STAT] = video->stat; + mTimingDeschedule(&video->p->timing, &video->modeEvent); + mTimingSchedule(&video->p->timing, &video->modeEvent, next); +} + void _endMode0(struct mTiming* timing, void* context, uint32_t cyclesLate) { struct GBVideo* video = context; if (video->frameskipCounter <= 0) {
@@ -177,6 +177,9 @@ cpu->memory.store16(cpu, BASE_IO | 0x202, 0xFFFF, 0);
cpu->memory.store16(cpu, BASE_IO | 0x204, 0, 0); cpu->memory.store16(cpu, BASE_IO | 0x208, 0, 0); } + if (registers & 0x9C) { + gba->video.renderer->reset(gba->video.renderer); + } } static void _BgAffineSet(struct GBA* gba) {
@@ -277,12 +277,15 @@ nextEvent = 0;
do { int32_t cycles = cpu->cycles; cpu->cycles = 0; +#ifdef USE_DEBUGGERS + gba->timing.globalCycles += cycles; +#endif #ifndef NDEBUG if (cycles < 0) { mLOG(GBA, FATAL, "Negative cycles passed: %i", cycles); } #endif - nextEvent = mTimingTick(&gba->timing, nextEvent + cycles); + nextEvent = mTimingTick(&gba->timing, cycles < nextEvent ? nextEvent : cycles); } while (gba->cpuBlocked); cpu->nextEvent = nextEvent;
@@ -71,6 +71,13 @@
// Koro Koro Puzzle - Happy Panechu! { "KHPJ", SAVEDATA_EEPROM, HW_TILT, IDLE_LOOP_NONE, false }, + // Legendz - Yomigaeru Shiren no Shima + { "BLJJ", SAVEDATA_FLASH512, HW_RTC, IDLE_LOOP_NONE, false }, + { "BLJK", SAVEDATA_FLASH512, HW_RTC, IDLE_LOOP_NONE, false }, + + // Legendz - Sign of Nekuromu + { "BLVJ", SAVEDATA_FLASH512, HW_RTC, IDLE_LOOP_NONE, false }, + // Mega Man Battle Network { "AREE", SAVEDATA_SRAM, HW_NONE, 0x800032E, false },
@@ -1640,15 +1640,15 @@ int align = GBAObjAttributesAIs256Color(sprite->a) && !GBARegisterDISPCNTIsObjCharacterMapping(renderer->dispcnt);
unsigned charBase = (BASE_TILE >> 1) + (GBAObjAttributesCGetTile(sprite->c) & ~align) * 0x10; int stride = GBARegisterDISPCNTIsObjCharacterMapping(renderer->dispcnt) ? (width >> 3) : (0x20 >> GBAObjAttributesAGet256Color(sprite->a)); - if (spriteY + height >= 256) { - spriteY -= 256; - } - int totalWidth = width; int totalHeight = height; if (GBAObjAttributesAIsTransformed(sprite->a) && GBAObjAttributesAIsDoubleSize(sprite->a)) { totalWidth <<= 1; totalHeight <<= 1; + } + + if (spriteY + totalHeight >= 256) { + spriteY -= 256; } const struct GBAVideoGLShader* shader = &renderer->objShader[GBAObjAttributesAGet256Color(sprite->a)];@@ -1710,7 +1710,9 @@ } else {
glUniform4i(uniforms[GBA_GL_OBJ_MOSAIC], 0, 0, 0, 0); } glStencilFunc(GL_ALWAYS, 1, 1); - glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + if (GBAObjAttributesAGetMode(sprite->a) != OBJ_MODE_OBJWIN || GBARegisterDISPCNTIsObjwinEnable(renderer->dispcnt)) { + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + } shader = &renderer->objShader[2]; uniforms = shader->uniforms;
@@ -473,8 +473,57 @@ } \
} #define DRAW_BACKGROUND_MODE_0_MOSAIC_256EXT(BLEND, OBJWIN) \ + x = inX & 7; \ + if (mosaicWait) { \ + int baseX = x - (mosaicH - mosaicWait); \ + if (baseX < 0) { \ + int disturbX = (16 + baseX) >> 3; \ + inX -= disturbX << 3; \ + localX = tileX * 8 + inX; \ + BACKGROUND_TEXT_SELECT_CHARACTER; \ + localY = inY & 0x7; \ + if (GBA_TEXT_MAP_VFLIP(mapData)) { \ + localY = 7 - localY; \ + } \ + baseX -= disturbX << 3; \ + inX += disturbX << 3; \ + } else { \ + localX = tileX * 8 + inX; \ + BACKGROUND_TEXT_SELECT_CHARACTER; \ + localY = inY & 0x7; \ + if (GBA_TEXT_MAP_VFLIP(mapData)) { \ + localY = 7 - localY; \ + } \ + } \ + charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 6)) + (localY << 3); \ + if (UNLIKELY(charBase >= 0x10000)) { \ + carryData = 0; \ + } else { \ + vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \ + LOAD_32(tileData, charBase, vram); \ + if (!GBA_TEXT_MAP_HFLIP(mapData)) { \ + if (x >= 4) { \ + LOAD_32(tileData, charBase + 4, vram); \ + tileData >>= (x - 4) * 8; \ + } else { \ + LOAD_32(tileData, charBase, vram); \ + tileData >>= x * 8; \ + } \ + } else { \ + if (x >= 4) { \ + LOAD_32(tileData, charBase, vram); \ + tileData >>= (7 - x) * 8; \ + } else { \ + LOAD_32(tileData, charBase + 4, vram); \ + tileData >>= (3 - x) * 8; \ + } \ + } \ + tileData &= 0xFF; \ + carryData = tileData; \ + } \ + } \ localX = tileX * 8 + inX; \ - for (; tileX < tileEnd; ++tileX) { \ + for (; length; ++tileX) { \ mapData = background->mapCache[(localX >> 3) & 0x3F]; \ localX += 8; \ localY = inY & 0x7; \@@ -484,7 +533,7 @@ } \
charBase = (background->charBase + (GBA_TEXT_MAP_TILE(mapData) << 6)) + (localY << 3); \ vram = renderer->d.vramBG[charBase >> VRAM_BLOCK_OFFSET]; \ tileData = carryData; \ - for (x = 0; x < 8; ++x) { \ + for (x = 0; x < 8 && length; ++x, --length) { \ if (!mosaicWait) { \ paletteData = GBA_TEXT_MAP_PALETTE(mapData) << 8; \ palette = &mainPalette[paletteData]; \
@@ -326,7 +326,7 @@ }
int mosaicH = 1; if (GBAObjAttributesAIsMosaic(sprite->a)) { mosaicH = GBAMosaicControlGetObjH(renderer->mosaic) + 1; - if (condition % mosaicH) { + if (condition != end && condition % mosaicH) { condition += mosaicH - (condition % mosaicH); } }
@@ -6,6 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba/internal/gba/serialize.h> #include <mgba/internal/arm/macros.h> +#include <mgba/internal/gba/bios.h> #include <mgba/internal/gba/io.h> #include <mgba-util/memory.h>@@ -28,6 +29,7 @@ STORE_32(GBA_SAVESTATE_MAGIC + GBA_SAVESTATE_VERSION, 0, &state->versionMagic);
STORE_32(gba->biosChecksum, 0, &state->biosChecksum); STORE_32(gba->romCrc32, 0, &state->romCrc32); STORE_32(gba->timing.masterCycles, 0, &state->masterCycles); + STORE_64LE(gba->timing.globalCycles, 0, &state->globalCycles); if (gba->memory.rom) { state->id = ((struct GBACartridge*) gba->memory.rom)->id;@@ -93,7 +95,7 @@ if (ucheck != gba->biosChecksum) {
mLOG(GBA_STATE, WARN, "Savestate created using a different version of the BIOS: expected %08X, got %08X", gba->biosChecksum, ucheck); uint32_t pc; LOAD_32(pc, ARM_PC * sizeof(state->cpu.gprs[0]), state->cpu.gprs); - if (pc < SIZE_BIOS && pc >= 0x20) { + if ((ucheck == GBA_BIOS_CHECKSUM || gba->biosChecksum == GBA_BIOS_CHECKSUM) && pc < SIZE_BIOS && pc >= 0x20) { error = true; } }@@ -128,6 +130,7 @@ return false;
} mTimingClear(&gba->timing); LOAD_32(gba->timing.masterCycles, 0, &state->masterCycles); + LOAD_64LE(gba->timing.globalCycles, 0, &state->globalCycles); size_t i; for (i = 0; i < 16; ++i) {
@@ -7,7 +7,7 @@ find_program(BANNERTOOL bannertool)
find_program(MAKEROM makerom) find_program(PICASSO picasso) find_program(RAW2C raw2c) -find_program(STRIP ${cross_prefix}strip) +set(STRIP "${cross_prefix_path}strip" CACHE INTERNAL "symbol stripper") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format" PARENT_SCOPE) set(OS_DEFINES COLOR_16_BIT COLOR_5_6_5 IOAPI_NO_64)
@@ -1,92 +1,31 @@
-/* This code is mostly from ctrulib, which contains the following license: - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - * The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software in - a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - * Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - * This notice may not be removed or altered from any source distribution. -*/ - -#include <3ds/types.h> -#include <3ds/srv.h> -#include <3ds/gfx.h> -#include <3ds/sdmc.h> -#include <3ds/services/apt.h> -#include <3ds/services/fs.h> -#include <3ds/services/hid.h> -#include <3ds/svc.h> +/* Copyright (c) 2013-2020 Jeffrey Pfau + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <3ds/archive.h> #include <mgba-util/common.h> -extern char* fake_heap_start; -extern char* fake_heap_end; -extern u32 __ctru_linear_heap; -extern u32 __ctru_heap; -extern u32 __ctru_heap_size; -extern u32 __ctru_linear_heap_size; -static u32 __custom_heap_size = 0x02400000; -static u32 __custom_linear_heap_size = 0x01400000; +u32 __ctru_heap_size = 0x02400000; +u32 __ctru_linear_heap_size = 0x01400000; uint32_t* romBuffer = NULL; size_t romBufferSize; FS_Archive sdmcArchive; -bool allocateRomBuffer(void) { - if (romBuffer) { - return true; - } +__attribute__((constructor)) static void init(void) { + FSUSER_OpenArchive(&sdmcArchive, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, "")); + romBuffer = malloc(0x02000000); if (romBuffer) { romBufferSize = 0x02000000; - return true; + return; } romBuffer = malloc(0x01000000); if (romBuffer) { romBufferSize = 0x01000000; - return true; + return; } - return false; -} - -void __system_allocateHeaps() { - u32 tmp=0; - - __ctru_heap_size = __custom_heap_size; - __ctru_linear_heap_size = __custom_linear_heap_size; - - // Allocate the application heap - __ctru_heap = 0x08000000; - svcControlMemory(&tmp, __ctru_heap, 0x0, __ctru_heap_size, MEMOP_ALLOC, MEMPERM_READ | MEMPERM_WRITE); - - // Allocate the linear heap - svcControlMemory(&__ctru_linear_heap, 0x0, 0x0, __ctru_linear_heap_size, MEMOP_ALLOC_LINEAR, MEMPERM_READ | MEMPERM_WRITE); - // Set up newlib heap - fake_heap_start = (char*)__ctru_heap; - fake_heap_end = fake_heap_start + __ctru_heap_size; -} - -void __appInit(void) { - // Initialize services - srvInit(); - aptInit(); - hidInit(); - - fsInit(); - sdmcInit(); - - FSUSER_OpenArchive(&sdmcArchive, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, "")); - allocateRomBuffer(); }
@@ -109,8 +109,6 @@
static aptHookCookie cookie; static bool core2; -extern bool allocateRomBuffer(void); - static bool _initGpu(void) { if (!C3D_Init(C3D_DEFAULT_CMDBUF_SIZE)) { return false;@@ -124,7 +122,7 @@ if (!topScreen[0] || !topScreen[1] || !bottomScreen[0] || !bottomScreen[1]) {
return false; } - if (!C3D_TexInitVRAM(&upscaleBufferTex, 512, 512, GPU_RB_RGB8)) { + if (!C3D_TexInitVRAM(&upscaleBufferTex, 512, 512, GPU_RGB8)) { return false; } upscaleBuffer = C3D_RenderTargetCreateFromTex(&upscaleBufferTex, GPU_TEXFACE_2D, 0, 0);@@ -809,10 +807,6 @@ camera.d.requestImage = _requestImage;
camera.buffer = NULL; camera.bufferSize = 0; camera.cam = SELECT_IN1; - - if (!allocateRomBuffer()) { - return 1; - } aptHook(&cookie, _aptHook, 0);
@@ -8,24 +8,27 @@ set(CMAKE_SYSTEM_NAME Generic CACHE INTERNAL "system name")
function(create_devkit DEVKIT) if(DEFINED ENV{DEVKIT${DEVKIT}}) - set(DEVKIT${DEVKIT} $ENV{DEVKIT${DEVKIT}} PARENT_SCOPE) + set(DEVKIT${DEVKIT} $ENV{DEVKIT${DEVKIT}}) else() - set(DEVKIT${DEVKIT} ${DEVKITPRO}/devkit${DEVKIT} PARENT_SCOPE) + set(DEVKIT${DEVKIT} ${DEVKITPRO}/devkit${DEVKIT}) endif() + set(DEVKIT${DEVKIT} "${DEVKIT${DEVKIT}}" PARENT_SCOPE) - set(CMAKE_PROGRAM_PATH ${DEVKIT${DEVKIT}}/bin CACHE INTERNAL "program path") + set(CMAKE_PROGRAM_PATH "${DEVKIT${DEVKIT}}/bin" CACHE INTERNAL "program path") + set(cross_prefix_path "${CMAKE_PROGRAM_PATH}/${cross_prefix}") + set(cross_prefix_path "${cross_prefix_path}" PARENT_SCOPE) set(extension) if (CMAKE_HOST_WIN32) set(extension .exe) endif() - find_program(CMAKE_AR ${cross_prefix}gcc-ar${extension}) - find_program(CMAKE_RANLIB ${cross_prefix}gcc-ranlib${extension}) - find_program(CMAKE_C_COMPILER ${cross_prefix}gcc${extension}) - find_program(CMAKE_CXX_COMPILER ${cross_prefix}g++${extension}) - find_program(CMAKE_ASM_COMPILER ${cross_prefix}gcc${extension}) - find_program(CMAKE_LINKER ${cross_prefix}ld${extension}) + set(CMAKE_AR "${cross_prefix_path}gcc-ar${extension}" CACHE INTERNAL "archiver") + set(CMAKE_RANLIB "${cross_prefix_path}gcc-ranlib${extension}" CACHE INTERNAL "archiver") + set(CMAKE_C_COMPILER "${cross_prefix_path}gcc${extension}" CACHE INTERNAL "c compiler") + set(CMAKE_CXX_COMPILER "${cross_prefix_path}g++${extension}" CACHE INTERNAL "cxx compiler") + set(CMAKE_ASM_COMPILER "${cross_prefix_path}gcc${extension}" CACHE INTERNAL "assembler") + set(CMAKE_LINKER "${cross_prefix_path}ld${extension}" CACHE INTERNAL "linker") set(CMAKE_C_FLAGS ${inc_flags} CACHE INTERNAL "c compiler flags") set(CMAKE_ASM_FLAGS ${inc_flags} CACHE INTERNAL "assembler flags") set(CMAKE_CXX_FLAGS ${inc_flags} CACHE INTERNAL "cxx compiler flags")@@ -38,4 +41,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER CACHE INTERNAL "")
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY CACHE INTERNAL "") set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY CACHE INTERNAL "") set(PKG_CONFIG_EXECUTABLE "/dev/null" CACHE INTERNAL "" FORCE) -endfunction()+endfunction()
@@ -292,7 +292,10 @@ endif()
if(QT_STATIC) find_library(QTPCRE NAMES qtpcre2 qtpcre) if(WIN32) - list(APPEND QT_LIBRARIES qwindows dwmapi imm32 uxtheme Qt5EventDispatcherSupport Qt5FontDatabaseSupport Qt5ThemeSupport Qt5WindowsUIAutomationSupport) + if(CMAKE_CROSSCOMPILING) + set(QWINDOWS_DEPS Qt5EventDispatcherSupport Qt5FontDatabaseSupport Qt5ThemeSupport Qt5WindowsUIAutomationSupport) + endif() + list(APPEND QT_LIBRARIES Qt5::QWindowsIntegrationPlugin ${QWINDOWS_DEPS} dwmapi uxtheme imm32 -static-libgcc -static-libstdc++) set_target_properties(Qt5::Core PROPERTIES INTERFACE_LINK_LIBRARIES "${QTPCRE};version;winmm;ssl;crypto;ws2_32;iphlpapi;crypt32;userenv;netapi32;wtsapi32") set_target_properties(Qt5::Gui PROPERTIES INTERFACE_LINK_LIBRARIES ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY}) elseif(APPLE)
@@ -26,7 +26,7 @@ </message>
<message> <location filename="../AboutScreen.ui" line="68"/> <source>{projectName} would like to thank the following patrons from Patreon:</source> - <translation>{projectName} 感谢以下来自 Patreon 平台的赞助者:</translation> + <translation>{projectName} 感谢以下来自 Patreon 的赞助者:</translation> </message> <message> <location filename="../AboutScreen.ui" line="86"/>@@ -66,7 +66,7 @@ </message>
<message> <location filename="../ArchiveInspector.ui" line="20"/> <source>Loading...</source> - <translation>载入中...</translation> + <translation>正在载入...</translation> </message> </context> <context>@@ -135,7 +135,7 @@ </message>
<message> <location filename="../BattleChipView.ui" line="67"/> <source>Chip name</source> - <translation>晶片名称</translation> + <translation>芯片名称</translation> </message> <message> <location filename="../BattleChipView.ui" line="76"/>@@ -165,7 +165,7 @@ </message>
<message> <location filename="../BattleChipView.ui" line="138"/> <source>Gate type</source> - <translation>装置类型</translation> + <translation>Gate 类型</translation> </message> <message> <location filename="../BattleChipView.ui" line="145"/>@@ -180,7 +180,7 @@ </message>
<message> <location filename="../BattleChipView.ui" line="162"/> <source>Beast &Link Gate</source> - <translation>Beast Link(&L)</translation> + <translation>Beast Link Gate(&L)</translation> </message> <message> <location filename="../BattleChipView.ui" line="180"/>@@ -190,12 +190,12 @@ </message>
<message> <location filename="../BattleChipView.ui" line="194"/> <source>Chip ID</source> - <translation>晶片ID</translation> + <translation>芯片 ID</translation> </message> <message> <location filename="../BattleChipView.ui" line="207"/> <source>Update Chip data</source> - <translation>更新晶片数据</translation> + <translation>更新芯片数据</translation> </message> <message> <location filename="../BattleChipView.ui" line="219"/>@@ -306,28 +306,43 @@ <context>
<name>GIFView</name> <message> <location filename="../GIFView.ui" line="14"/> - <source>Record GIF</source> - <translation>录制 GIF</translation> + <source>Record GIF/APNG</source> + <translation>录制 GIF/APNG</translation> </message> <message> - <location filename="../GIFView.ui" line="36"/> - <source>Frameskip</source> - <translation>跳帧</translation> + <location filename="../GIFView.ui" line="23"/> + <source>APNG</source> + <translation>APNG</translation> </message> <message> - <location filename="../GIFView.ui" line="68"/> + <location filename="../GIFView.ui" line="60"/> <source>Start</source> <translation>开始</translation> </message> <message> - <location filename="../GIFView.ui" line="84"/> + <location filename="../GIFView.ui" line="76"/> <source>Stop</source> <translation>停止</translation> </message> <message> - <location filename="../GIFView.ui" line="110"/> + <location filename="../GIFView.ui" line="102"/> <source>Select File</source> <translation>选择文件</translation> + </message> + <message> + <location filename="../GIFView.ui" line="121"/> + <source>Frameskip</source> + <translation>跳帧</translation> + </message> + <message> + <location filename="../GIFView.ui" line="135"/> + <source>GIF</source> + <translation>GIF</translation> + </message> + <message> + <location filename="../GIFView.ui" line="148"/> + <source>Loop</source> + <translation>循环</translation> </message> </context> <context>@@ -885,147 +900,164 @@ <source>Sprites</source>
<translation>精灵图</translation> </message> <message> - <location filename="../ObjView.ui" line="20"/> + <location filename="../ObjView.ui" line="72"/> + <source>Address</source> + <translation>地址</translation> + </message> + <message> + <location filename="../ObjView.ui" line="79"/> + <source>0x07000000</source> + <translation>0x07000000</translation> + </message> + <message> + <location filename="../ObjView.ui" line="94"/> <source>Copy</source> <translation>复制</translation> </message> <message> - <location filename="../ObjView.ui" line="35"/> + <location filename="../ObjView.ui" line="109"/> + <location filename="../ObjView.ui" line="254"/> + <source>×</source> + <translation>×</translation> + </message> + <message> + <location filename="../ObjView.ui" line="122"/> + <source>Magnification</source> + <translation>缩放率</translation> + </message> + <message> + <location filename="../ObjView.ui" line="137"/> + <source>Geometry</source> + <translation>几何图</translation> + </message> + <message> + <location filename="../ObjView.ui" line="145"/> <source>Position</source> <translation>位置</translation> </message> <message> - <location filename="../ObjView.ui" line="61"/> - <location filename="../ObjView.ui" line="87"/> - <location filename="../ObjView.ui" line="278"/> - <location filename="../ObjView.ui" line="508"/> + <location filename="../ObjView.ui" line="171"/> + <location filename="../ObjView.ui" line="197"/> + <location filename="../ObjView.ui" line="437"/> + <location filename="../ObjView.ui" line="667"/> <source>0</source> <translation>0</translation> </message> <message> - <location filename="../ObjView.ui" line="71"/> + <location filename="../ObjView.ui" line="181"/> <source>, </source> <translation>, </translation> </message> <message> - <location filename="../ObjView.ui" line="101"/> + <location filename="../ObjView.ui" line="218"/> <source>Dimensions</source> <translation>维度</translation> </message> <message> - <location filename="../ObjView.ui" line="127"/> - <location filename="../ObjView.ui" line="153"/> + <location filename="../ObjView.ui" line="244"/> + <location filename="../ObjView.ui" line="270"/> <source>8</source> <translation>8</translation> </message> <message> - <location filename="../ObjView.ui" line="137"/> - <location filename="../ObjView.ui" line="568"/> - <source>×</source> - <translation>×</translation> + <location filename="../ObjView.ui" line="284"/> + <location filename="../ObjView.ui" line="325"/> + <source>+0.00</source> + <translation>+0.00</translation> </message> <message> - <location filename="../ObjView.ui" line="205"/> - <source>Tile</source> - <translation>瓷贴</translation> + <location filename="../ObjView.ui" line="291"/> + <location filename="../ObjView.ui" line="305"/> + <source>+1.00</source> + <translation>+1.00</translation> </message> <message> - <location filename="../ObjView.ui" line="212"/> + <location filename="../ObjView.ui" line="298"/> + <source>Matrix</source> + <translation>矩阵</translation> + </message> + <message> + <location filename="../ObjView.ui" line="365"/> <source>Export</source> <translation>导出</translation> </message> <message> - <location filename="../ObjView.ui" line="219"/> + <location filename="../ObjView.ui" line="378"/> <source>Attributes</source> <translation>属性</translation> </message> <message> - <location filename="../ObjView.ui" line="227"/> + <location filename="../ObjView.ui" line="386"/> <source>Transform</source> <translation>变换</translation> </message> <message> - <location filename="../ObjView.ui" line="247"/> + <location filename="../ObjView.ui" line="406"/> <source>Off</source> <translation>关</translation> </message> <message> - <location filename="../ObjView.ui" line="258"/> + <location filename="../ObjView.ui" line="417"/> <source>Palette</source> <translation>调色板</translation> </message> <message> - <location filename="../ObjView.ui" line="292"/> + <location filename="../ObjView.ui" line="451"/> <source>Double Size</source> <translation>双倍大小</translation> </message> <message> - <location filename="../ObjView.ui" line="318"/> - <location filename="../ObjView.ui" line="362"/> - <location filename="../ObjView.ui" line="375"/> - <location filename="../ObjView.ui" line="443"/> + <location filename="../ObjView.ui" line="477"/> + <location filename="../ObjView.ui" line="521"/> + <location filename="../ObjView.ui" line="534"/> + <location filename="../ObjView.ui" line="602"/> <source>Return, Ctrl+R</source> <translation>回车键、Ctrl+R</translation> </message> <message> - <location filename="../ObjView.ui" line="336"/> + <location filename="../ObjView.ui" line="495"/> <source>Flipped</source> <translation>已翻转</translation> </message> <message> - <location filename="../ObjView.ui" line="359"/> + <location filename="../ObjView.ui" line="518"/> <source>H</source> - <translation>水平</translation> + <translation>H</translation> </message> <message> - <location filename="../ObjView.ui" line="372"/> + <location filename="../ObjView.ui" line="531"/> <source>V</source> - <translation>垂直</translation> + <translation>V</translation> </message> <message> - <location filename="../ObjView.ui" line="386"/> + <location filename="../ObjView.ui" line="545"/> <source>Mode</source> <translation>模式</translation> </message> <message> - <location filename="../ObjView.ui" line="406"/> + <location filename="../ObjView.ui" line="565"/> <source>Normal</source> <translation>普通</translation> </message> <message> - <location filename="../ObjView.ui" line="417"/> + <location filename="../ObjView.ui" line="576"/> <source>Mosaic</source> <translation>马赛克</translation> </message> <message> - <location filename="../ObjView.ui" line="454"/> + <location filename="../ObjView.ui" line="613"/> <source>Enabled</source> <translation>已启用</translation> </message> <message> - <location filename="../ObjView.ui" line="488"/> + <location filename="../ObjView.ui" line="647"/> <source>Priority</source> <translation>优先级</translation> </message> <message> - <location filename="../ObjView.ui" line="396"/> - <source>Geometry</source> - <translation>几何图像</translation> - </message> - <message> - <location filename="../ObjView.ui" line="538"/> - <source>Address</source> - <translation>地址</translation> - </message> - <message> - <location filename="../ObjView.ui" line="545"/> - <source>0x07000000</source> - <translation>0x07000000</translation> - </message> - <message> - <location filename="../ObjView.ui" line="581"/> - <source>Magnification</source> - <translation>缩放率</translation> + <location filename="../ObjView.ui" line="682"/> + <source>Tile</source> + <translation>瓷贴</translation> </message> </context> <context>@@ -1122,7 +1154,7 @@ </message>
<message> <location filename="../OverrideView.ui" line="240"/> <source>Game Boy model</source> - <translation>Game Boy 模型</translation> + <translation>Game Boy 型号</translation> </message> <message> <location filename="../OverrideView.ui" line="253"/>@@ -1255,17 +1287,17 @@ </message>
<message> <location filename="../PaletteView.ui" line="184"/> <source>Red</source> - <translation>红色</translation> + <translation>红</translation> </message> <message> <location filename="../PaletteView.ui" line="191"/> <source>Green</source> - <translation>绿色</translation> + <translation>绿</translation> </message> <message> <location filename="../PaletteView.ui" line="198"/> <source>Blue</source> - <translation>蓝色</translation> + <translation>蓝</translation> </message> <message> <location filename="../PaletteView.ui" line="212"/>@@ -1277,7 +1309,7 @@ </message>
<message> <location filename="../PaletteView.ui" line="244"/> <source>16-bit value</source> - <translation>16 位数值</translation> + <translation>16 位值</translation> </message> <message> <location filename="../PaletteView.ui" line="251"/>@@ -1301,8 +1333,8 @@ <translation>#000000</translation>
</message> <message> <location filename="../PaletteView.ui" line="292"/> - <source>000</source> - <translation>000</translation> + <source>0x000 (000)</source> + <translation>0x000 (000)</translation> </message> <message> <location filename="../PaletteView.ui" line="322"/>@@ -1430,7 +1462,7 @@ </message>
<message> <location filename="../BattleChipView.cpp" line="115"/> <source>BattleChip data is missing. BattleChip Gates will still work, but some graphics will be missing. Would you like to download the data now?</source> - <translation>BattleChip 数据已丢失。您仍然可以使用 BattleChip Gate,但部分图形会丢失。您想立即下载数据吗?</translation> + <translation>BattleChip 数据已丢失。BattleChip Gate 仍然能够工作,但部分图形会丢失。您想立即下载数据吗?</translation> </message> <message> <location filename="../BattleChipView.cpp" line="181"/>@@ -1446,7 +1478,7 @@ </message>
<message> <location filename="../BattleChipView.cpp" line="213"/> <source>The selected deck is not compatible with this Chip Gate</source> - <translation>所选卡组与本 Chip Gate 不兼容</translation> + <translation>所选卡组与此 Chip Gate 不兼容</translation> </message> </context> <context>@@ -1510,12 +1542,12 @@ <source>Failed to open game file: %1</source>
<translation>打开游戏文件失败: %1</translation> </message> <message> - <location filename="../CoreController.cpp" line="690"/> + <location filename="../CoreController.cpp" line="716"/> <source>Failed to open snapshot file for reading: %1</source> <translation>读取快照文件失败: %1</translation> </message> <message> - <location filename="../CoreController.cpp" line="706"/> + <location filename="../CoreController.cpp" line="732"/> <source>Failed to open snapshot file for writing: %1</source> <translation>写入快照文件失败: %1</translation> </message>@@ -1527,6 +1559,11 @@ <location filename="../CoreManager.cpp" line="54"/>
<source>Failed to open game file: %1</source> <translation>打开游戏文件失败: %1</translation> </message> + <message> + <location filename="../CoreManager.cpp" line="86"/> + <source>Could not load game. Are you sure it's in the correct format?</source> + <translation>无法载入游戏。请确认游戏格式是否无误。</translation> + </message> </context> <context> <name>QGBA::FrameView</name>@@ -1599,7 +1636,7 @@ </message>
<message> <location filename="../GBAKeyEditor.cpp" line="101"/> <source>Set all</source> - <translation>设置全部</translation> + <translation>全部设置</translation> </message> </context> <context>@@ -1642,25 +1679,25 @@ </message>
<message> <location filename="../GDBWindow.cpp" line="122"/> <source>Could not start GDB server</source> - <translation>无法打开 GDB 服务端</translation> + <translation>无法打开 GDB 服务器</translation> </message> </context> <context> <name>QGBA::GIFView</name> <message> - <location filename="../GIFView.cpp" line="49"/> + <location filename="../GIFView.cpp" line="57"/> <source>Failed to open output GIF file: %1</source> <translation>打开输出 GIF 文件失败: %1</translation> </message> <message> - <location filename="../GIFView.cpp" line="67"/> + <location filename="../GIFView.cpp" line="81"/> <source>Select output file</source> <translation>选择输出文件</translation> </message> <message> - <location filename="../GIFView.cpp" line="67"/> - <source>Graphics Interchange Format (*.gif)</source> - <translation>图形交换格式 (*.gif)</translation> + <location filename="../GIFView.cpp" line="81"/> + <source>Graphics Interchange Format (*.gif);;Animated Portable Network Graphics (*.png *.apng)"</source> + <translation>图形交换格式 (*.gif);;动画便携式网络图形 (*.png *.apng)"</translation> </message> </context> <context>@@ -2196,7 +2233,7 @@ </message>
<message> <location filename="../IOViewer.cpp" line="319"/> <source>Sweep time (in 1/128s)</source> - <translation>扫描时间 (1/128秒)</translation> + <translation>扫描时间 (1/128 秒)</translation> </message> <message> <location filename="../IOViewer.cpp" line="323"/>@@ -2968,32 +3005,32 @@ </message>
<message> <location filename="../IOViewer.cpp" line="979"/> <source>Cart 0 non-sequential</source> - <translation>Cart 0 (非顺序)</translation> + <translation>卡带 0 (非顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="985"/> <source>Cart 0 sequential</source> - <translation>Cart 0 (顺序)</translation> + <translation>卡带 0 (顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="989"/> <source>Cart 1 non-sequential</source> - <translation>Cart 1 (非顺序)</translation> + <translation>卡带 1 (非顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="995"/> <source>Cart 1 sequential</source> - <translation>Cart 1 (顺序)</translation> + <translation>卡带 1 (顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="999"/> <source>Cart 2 non-sequential</source> - <translation>Cart 2 (非顺序)</translation> + <translation>卡带 2 (非顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="1005"/> <source>Cart 2 sequential</source> - <translation>Cart 2 (顺序)</translation> + <translation>卡带 2 (顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="1009"/>@@ -3034,10 +3071,25 @@ </context>
<context> <name>QGBA::KeyEditor</name> <message> - <location filename="../KeyEditor.cpp" line="33"/> - <location filename="../KeyEditor.cpp" line="207"/> + <location filename="../KeyEditor.cpp" line="34"/> + <location filename="../KeyEditor.cpp" line="236"/> <source>---</source> <translation>---</translation> + </message> + <message> + <location filename="../KeyEditor.cpp" line="53"/> + <source>Super (L)</source> + <translation>Super (L)</translation> + </message> + <message> + <location filename="../KeyEditor.cpp" line="56"/> + <source>Super (R)</source> + <translation>Super (R)</translation> + </message> + <message> + <location filename="../KeyEditor.cpp" line="59"/> + <source>Menu</source> + <translation>菜单</translation> </message> </context> <context>@@ -3309,22 +3361,22 @@ </context>
<context> <name>QGBA::MemorySearch</name> <message> - <location filename="../MemorySearch.cpp" line="221"/> + <location filename="../MemorySearch.cpp" line="222"/> <source> (%0/%1×)</source> <translation> (%0/%1×)</translation> </message> <message> - <location filename="../MemorySearch.cpp" line="223"/> + <location filename="../MemorySearch.cpp" line="224"/> <source> (⅟%0×)</source> <translation> (⅟%0×)</translation> </message> <message> - <location filename="../MemorySearch.cpp" line="226"/> + <location filename="../MemorySearch.cpp" line="227"/> <source> (%0×)</source> <translation> (%0×)</translation> </message> <message> - <location filename="../MemorySearch.cpp" line="230"/> + <location filename="../MemorySearch.cpp" line="231"/> <source>%1 byte%2</source> <translation>%1 字节%2</translation> </message>@@ -3332,49 +3384,61 @@ </context>
<context> <name>QGBA::ObjView</name> <message> - <location filename="../ObjView.cpp" line="151"/> - <location filename="../ObjView.cpp" line="225"/> + <location filename="../ObjView.cpp" line="155"/> + <location filename="../ObjView.cpp" line="243"/> <source>0x%0</source> <translation>0x%0</translation> </message> <message> - <location filename="../ObjView.cpp" line="162"/> + <location filename="../ObjView.cpp" line="176"/> <source>Off</source> <translation>关</translation> </message> <message> - <location filename="../ObjView.cpp" line="167"/> + <location filename="../ObjView.cpp" line="177"/> + <location filename="../ObjView.cpp" line="178"/> + <location filename="../ObjView.cpp" line="179"/> + <location filename="../ObjView.cpp" line="180"/> + <location filename="../ObjView.cpp" line="251"/> + <location filename="../ObjView.cpp" line="252"/> + <location filename="../ObjView.cpp" line="253"/> + <location filename="../ObjView.cpp" line="254"/> + <source>---</source> + <translation>---</translation> + </message> + <message> + <location filename="../ObjView.cpp" line="185"/> <source>Normal</source> <translation>一般</translation> </message> <message> - <location filename="../ObjView.cpp" line="170"/> + <location filename="../ObjView.cpp" line="188"/> <source>Trans</source> <translation>变换</translation> </message> <message> - <location filename="../ObjView.cpp" line="173"/> + <location filename="../ObjView.cpp" line="191"/> <source>OBJWIN</source> <translation>OBJWIN</translation> </message> <message> - <location filename="../ObjView.cpp" line="176"/> + <location filename="../ObjView.cpp" line="194"/> <source>Invalid</source> <translation>无效</translation> </message> <message> - <location filename="../ObjView.cpp" line="232"/> - <location filename="../ObjView.cpp" line="233"/> + <location filename="../ObjView.cpp" line="250"/> + <location filename="../ObjView.cpp" line="255"/> <source>N/A</source> <translation>无</translation> </message> <message> - <location filename="../ObjView.cpp" line="258"/> + <location filename="../ObjView.cpp" line="280"/> <source>Export sprite</source> <translation>导出精灵图</translation> </message> <message> - <location filename="../ObjView.cpp" line="259"/> + <location filename="../ObjView.cpp" line="281"/> <source>Portable Network Graphics (*.png)</source> <translation>便携式网络图形 (*.png)</translation> </message>@@ -3393,10 +3457,6 @@ <translation>0x%0</translation>
</message> <message> <location filename="../PaletteView.cpp" line="123"/> - <source>%0</source> - <translation>%0</translation> - </message> - <message> <location filename="../PaletteView.cpp" line="124"/> <location filename="../PaletteView.cpp" line="125"/> <location filename="../PaletteView.cpp" line="126"/>@@ -3525,7 +3585,7 @@ <name>QGBA::ShaderSelector</name>
<message> <location filename="../ShaderSelector.cpp" line="52"/> <source>No shader active</source> - <translation>无活动的着色器</translation> + <translation>无激活的着色器</translation> </message> <message> <location filename="../ShaderSelector.cpp" line="65"/>@@ -3571,17 +3631,17 @@ </context>
<context> <name>QGBA::VideoView</name> <message> - <location filename="../VideoView.cpp" line="216"/> + <location filename="../VideoView.cpp" line="233"/> <source>Failed to open output video file: %1</source> <translation>打开输出视频文件失败: %1</translation> </message> <message> - <location filename="../VideoView.cpp" line="237"/> + <location filename="../VideoView.cpp" line="254"/> <source>Native (%0x%1)</source> <translation>原生 (%0x%1)</translation> </message> <message> - <location filename="../VideoView.cpp" line="252"/> + <location filename="../VideoView.cpp" line="269"/> <source>Select output file</source> <translation>选择输出文件</translation> </message>@@ -3632,8 +3692,8 @@ <translation>Game Boy Advance 存档文件 (%1)</translation>
</message> <message> <location filename="../Window.cpp" line="379"/> - <location filename="../Window.cpp" line="440"/> <location filename="../Window.cpp" line="447"/> + <location filename="../Window.cpp" line="454"/> <source>Select save</source> <translation>选择存档</translation> </message>@@ -3659,38 +3719,48 @@ <source>Patches (*.ips *.ups *.bps)</source>
<translation>补丁 (*.ips *.ups *.bps)</translation> </message> <message> - <location filename="../Window.cpp" line="433"/> + <location filename="../Window.cpp" line="427"/> + <source>Select e-Reader dotcode</source> + <translation>选择 e-Reader 点码</translation> + </message> + <message> + <location filename="../Window.cpp" line="427"/> + <source>e-Reader card (*.raw *.bin *.bmp)</source> + <translation>e-Reader 卡 (*.raw *.bin *.bmp)</translation> + </message> + <message> + <location filename="../Window.cpp" line="440"/> <source>Select image</source> <translation>选择图片</translation> </message> <message> - <location filename="../Window.cpp" line="433"/> + <location filename="../Window.cpp" line="440"/> <source>Image file (*.png *.gif *.jpg *.jpeg);;All files (*)</source> <translation>图像文件 (*.png *.gif *.jpg *.jpeg);;所有文件 (*)</translation> </message> <message> - <location filename="../Window.cpp" line="440"/> <location filename="../Window.cpp" line="447"/> + <location filename="../Window.cpp" line="454"/> <source>GameShark saves (*.sps *.xps)</source> <translation>GameShark 存档 (*.sps *.xps)</translation> </message> <message> - <location filename="../Window.cpp" line="474"/> + <location filename="../Window.cpp" line="481"/> <source>Select video log</source> <translation>选择视频日志</translation> </message> <message> - <location filename="../Window.cpp" line="474"/> + <location filename="../Window.cpp" line="481"/> <source>Video logs (*.mvl)</source> <translation>视频日志文件 (*.mvl)</translation> </message> <message> - <location filename="../Window.cpp" line="855"/> + <location filename="../Window.cpp" line="862"/> <source>Crash</source> <translation>崩溃</translation> </message> <message> - <location filename="../Window.cpp" line="856"/> + <location filename="../Window.cpp" line="863"/> <source>The game has crashed with the following error: %1</source>@@ -3699,578 +3769,588 @@
%1</translation> </message> <message> - <location filename="../Window.cpp" line="863"/> - <source>Couldn't Load</source> - <translation>无法载入</translation> + <location filename="../Window.cpp" line="870"/> + <source>Couldn't Start</source> + <translation>无法启动</translation> </message> <message> - <location filename="../Window.cpp" line="864"/> - <source>Could not load game. Are you sure it's in the correct format?</source> - <translation>无法载入游戏。请确认游戏格式是否无误。</translation> + <location filename="../Window.cpp" line="871"/> + <source>Could not start game.</source> + <translation>无法启动游戏。</translation> </message> <message> - <location filename="../Window.cpp" line="877"/> + <location filename="../Window.cpp" line="884"/> <source>Unimplemented BIOS call</source> <translation>未实现的 BIOS 调用</translation> </message> <message> - <location filename="../Window.cpp" line="878"/> + <location filename="../Window.cpp" line="885"/> <source>This game uses a BIOS call that is not implemented. Please use the official BIOS for best experience.</source> - <translation>该游戏使用了尚未实现的 BIOS 调用。请使用官方 BIOS 以获得最佳游戏体验。</translation> + <translation>此游戏使用了尚未实现的 BIOS 调用。请使用官方 BIOS 以获得最佳体验。</translation> </message> <message> - <location filename="../Window.cpp" line="976"/> + <location filename="../Window.cpp" line="985"/> <source>Really make portable?</source> <translation>确定进行程序便携化?</translation> </message> <message> - <location filename="../Window.cpp" line="977"/> + <location filename="../Window.cpp" line="986"/> <source>This will make the emulator load its configuration from the same directory as the executable. Do you want to continue?</source> - <translation>进行此操作后,模拟器将从模拟器可执行文件所在目录内载入模拟器配置。您想继续吗?</translation> + <translation>进行此操作后,模拟器将从其可执行文件所在目录中载入模拟器配置。您想继续吗?</translation> </message> <message> - <location filename="../Window.cpp" line="989"/> + <location filename="../Window.cpp" line="998"/> <source>Restart needed</source> <translation>需要重新启动</translation> </message> <message> - <location filename="../Window.cpp" line="990"/> + <location filename="../Window.cpp" line="999"/> <source>Some changes will not take effect until the emulator is restarted.</source> <translation>更改将在模拟器下次启动时生效。</translation> </message> <message> - <location filename="../Window.cpp" line="1038"/> + <location filename="../Window.cpp" line="1047"/> <source> - Player %1 of %2</source> <translation> - 玩家 %1 共 %2</translation> </message> <message> - <location filename="../Window.cpp" line="1049"/> + <location filename="../Window.cpp" line="1058"/> <source>%1 - %2</source> <translation>%1 - %2</translation> </message> <message> - <location filename="../Window.cpp" line="1051"/> + <location filename="../Window.cpp" line="1060"/> <source>%1 - %2 - %3</source> <translation>%1 - %2 - %3</translation> </message> <message> - <location filename="../Window.cpp" line="1053"/> + <location filename="../Window.cpp" line="1062"/> <source>%1 - %2 (%3 fps) - %4</source> <translation>%1 - %2 (%3 fps) - %4</translation> </message> <message> - <location filename="../Window.cpp" line="1094"/> + <location filename="../Window.cpp" line="1103"/> <source>&File</source> <translation>文件(&F)</translation> </message> <message> - <location filename="../Window.cpp" line="1096"/> + <location filename="../Window.cpp" line="1105"/> <source>Load &ROM...</source> <translation>载入 ROM(&R)...</translation> </message> <message> - <location filename="../Window.cpp" line="1099"/> + <location filename="../Window.cpp" line="1108"/> <source>Load ROM in archive...</source> <translation>从压缩文件中载入 ROM...</translation> </message> <message> - <location filename="../Window.cpp" line="1100"/> + <location filename="../Window.cpp" line="1109"/> <source>Add folder to library...</source> <translation>将文件夹添加到库中...</translation> </message> <message> - <location filename="../Window.cpp" line="1103"/> + <location filename="../Window.cpp" line="1112"/> <source>Load alternate save...</source> <translation>载入其他存档...</translation> </message> <message> - <location filename="../Window.cpp" line="1106"/> + <location filename="../Window.cpp" line="1115"/> <source>Load temporary save...</source> <translation>载入临时存档...</translation> </message> <message> - <location filename="../Window.cpp" line="1110"/> + <location filename="../Window.cpp" line="1119"/> <source>Load &patch...</source> - <translation>载入补丁文件(&P)...</translation> + <translation>载入补丁(&P)...</translation> </message> <message> - <location filename="../Window.cpp" line="1113"/> + <location filename="../Window.cpp" line="1122"/> <source>Boot BIOS</source> <translation>引导 BIOS</translation> </message> <message> - <location filename="../Window.cpp" line="1118"/> + <location filename="../Window.cpp" line="1127"/> <source>Replace ROM...</source> <translation>替换 ROM...</translation> </message> <message> - <location filename="../Window.cpp" line="1120"/> + <location filename="../Window.cpp" line="1129"/> + <source>Scan e-Reader dotcodes...</source> + <translation>扫描 e-Reader 点码...</translation> + </message> + <message> + <location filename="../Window.cpp" line="1133"/> <source>ROM &info...</source> <translation>ROM 信息(&I)...</translation> </message> <message> - <location filename="../Window.cpp" line="1122"/> + <location filename="../Window.cpp" line="1135"/> <source>Recent</source> <translation>最近打开</translation> </message> <message> - <location filename="../Window.cpp" line="1125"/> + <location filename="../Window.cpp" line="1138"/> <source>Make portable</source> <translation>程序便携化</translation> </message> <message> - <location filename="../Window.cpp" line="1128"/> + <location filename="../Window.cpp" line="1141"/> <source>&Load state</source> <translation>载入即时存档(&L)</translation> </message> <message> - <location filename="../Window.cpp" line="1133"/> + <location filename="../Window.cpp" line="1146"/> <source>Load state file...</source> <translation>载入即时存档文件...</translation> </message> <message> - <location filename="../Window.cpp" line="1138"/> + <location filename="../Window.cpp" line="1151"/> <source>&Save state</source> <translation>保存即时存档(&S)</translation> </message> <message> - <location filename="../Window.cpp" line="1143"/> + <location filename="../Window.cpp" line="1156"/> <source>Save state file...</source> <translation>保存即时存档文件...</translation> </message> <message> - <location filename="../Window.cpp" line="1148"/> + <location filename="../Window.cpp" line="1161"/> <source>Quick load</source> <translation>快速读档</translation> </message> <message> - <location filename="../Window.cpp" line="1149"/> + <location filename="../Window.cpp" line="1162"/> <source>Quick save</source> <translation>快速存档</translation> </message> <message> - <location filename="../Window.cpp" line="1151"/> + <location filename="../Window.cpp" line="1164"/> <source>Load recent</source> - <translation>载入最近</translation> + <translation>载入最近存档</translation> </message> <message> - <location filename="../Window.cpp" line="1156"/> + <location filename="../Window.cpp" line="1169"/> <source>Save recent</source> - <translation>保存最近</translation> + <translation>保存最近存档</translation> </message> <message> - <location filename="../Window.cpp" line="1164"/> + <location filename="../Window.cpp" line="1177"/> <source>Undo load state</source> <translation>撤消读档</translation> </message> <message> - <location filename="../Window.cpp" line="1169"/> + <location filename="../Window.cpp" line="1182"/> <source>Undo save state</source> <translation>撤消存档</translation> </message> <message> - <location filename="../Window.cpp" line="1178"/> - <location filename="../Window.cpp" line="1183"/> + <location filename="../Window.cpp" line="1191"/> + <location filename="../Window.cpp" line="1196"/> <source>State &%1</source> <translation>即时存档 1(&1)</translation> </message> <message> - <location filename="../Window.cpp" line="1190"/> + <location filename="../Window.cpp" line="1203"/> <source>Load camera image...</source> <translation>载入相机图片...</translation> </message> <message> - <location filename="../Window.cpp" line="1194"/> + <location filename="../Window.cpp" line="1207"/> <source>Import GameShark Save</source> <translation>导入 GameShark 存档</translation> </message> <message> - <location filename="../Window.cpp" line="1197"/> + <location filename="../Window.cpp" line="1210"/> <source>Export GameShark Save</source> <translation>导出 GameShark 存档</translation> </message> <message> - <location filename="../Window.cpp" line="1202"/> + <location filename="../Window.cpp" line="1215"/> <source>New multiplayer window</source> <translation>新建多人游戏窗口</translation> </message> <message> - <location filename="../Window.cpp" line="1210"/> + <location filename="../Window.cpp" line="1223"/> <source>About...</source> <translation>关于...</translation> </message> <message> - <location filename="../Window.cpp" line="1213"/> + <location filename="../Window.cpp" line="1226"/> <source>E&xit</source> <translation>退出(&X)</translation> </message> <message> - <location filename="../Window.cpp" line="1216"/> + <location filename="../Window.cpp" line="1229"/> <source>&Emulation</source> <translation>模拟(&E)</translation> </message> <message> - <location filename="../Window.cpp" line="1217"/> + <location filename="../Window.cpp" line="1230"/> <source>&Reset</source> <translation>重置(&R)</translation> </message> <message> - <location filename="../Window.cpp" line="1221"/> + <location filename="../Window.cpp" line="1234"/> <source>Sh&utdown</source> <translation>关机(&U)</translation> </message> <message> - <location filename="../Window.cpp" line="1225"/> + <location filename="../Window.cpp" line="1238"/> <source>Yank game pak</source> <translation>快速抽出游戏卡带</translation> </message> <message> - <location filename="../Window.cpp" line="1231"/> + <location filename="../Window.cpp" line="1244"/> <source>&Pause</source> <translation>暂停(&P)</translation> </message> <message> - <location filename="../Window.cpp" line="1240"/> + <location filename="../Window.cpp" line="1253"/> <source>&Next frame</source> <translation>下一帧(&N)</translation> </message> <message> - <location filename="../Window.cpp" line="1246"/> + <location filename="../Window.cpp" line="1259"/> <source>Fast forward (held)</source> <translation>快进 (长按)</translation> </message> <message> - <location filename="../Window.cpp" line="1252"/> + <location filename="../Window.cpp" line="1265"/> <source>&Fast forward</source> <translation>快进(&F)</translation> </message> <message> - <location filename="../Window.cpp" line="1256"/> + <location filename="../Window.cpp" line="1269"/> <source>Fast forward speed</source> <translation>快进速度</translation> </message> <message> - <location filename="../Window.cpp" line="1261"/> + <location filename="../Window.cpp" line="1274"/> <source>Unbounded</source> <translation>不限制</translation> </message> <message> - <location filename="../Window.cpp" line="1265"/> + <location filename="../Window.cpp" line="1278"/> <source>%0x</source> <translation>%0x</translation> </message> <message> - <location filename="../Window.cpp" line="1269"/> + <location filename="../Window.cpp" line="1282"/> <source>Rewind (held)</source> <translation>倒带 (长按)</translation> </message> <message> - <location filename="../Window.cpp" line="1276"/> + <location filename="../Window.cpp" line="1289"/> <source>Re&wind</source> <translation>倒带(&W)</translation> </message> <message> - <location filename="../Window.cpp" line="1281"/> + <location filename="../Window.cpp" line="1294"/> <source>Step backwards</source> <translation>步退</translation> </message> <message> - <location filename="../Window.cpp" line="1287"/> + <location filename="../Window.cpp" line="1300"/> <source>Sync to &video</source> <translation>视频同步(&V)</translation> </message> <message> - <location filename="../Window.cpp" line="1294"/> + <location filename="../Window.cpp" line="1307"/> <source>Sync to &audio</source> <translation>音频同步(&A)</translation> </message> <message> - <location filename="../Window.cpp" line="1302"/> + <location filename="../Window.cpp" line="1315"/> <source>Solar sensor</source> - <translation>光线传感器</translation> + <translation>太阳光传感器</translation> </message> <message> - <location filename="../Window.cpp" line="1303"/> + <location filename="../Window.cpp" line="1316"/> <source>Increase solar level</source> - <translation>增加光线级别</translation> + <translation>增加太阳光等级</translation> </message> <message> - <location filename="../Window.cpp" line="1304"/> + <location filename="../Window.cpp" line="1317"/> <source>Decrease solar level</source> - <translation>降低光线级别</translation> + <translation>降低太阳光等级</translation> </message> <message> - <location filename="../Window.cpp" line="1305"/> + <location filename="../Window.cpp" line="1318"/> <source>Brightest solar level</source> - <translation>光线级别为最亮</translation> + <translation>太阳光等级为最亮</translation> </message> <message> - <location filename="../Window.cpp" line="1308"/> + <location filename="../Window.cpp" line="1321"/> <source>Darkest solar level</source> - <translation>光线级别为最暗</translation> + <translation>太阳光等级为最暗</translation> </message> <message> - <location filename="../Window.cpp" line="1314"/> + <location filename="../Window.cpp" line="1327"/> <source>Brightness %1</source> <translation>亮度 %1</translation> </message> <message> - <location filename="../Window.cpp" line="1320"/> + <location filename="../Window.cpp" line="1333"/> <source>Game Boy Printer...</source> <translation>Game Boy 打印机...</translation> </message> <message> - <location filename="../Window.cpp" line="1329"/> + <location filename="../Window.cpp" line="1342"/> <source>BattleChip Gate...</source> <translation>BattleChip Gate...</translation> </message> <message> - <location filename="../Window.cpp" line="1333"/> + <location filename="../Window.cpp" line="1346"/> <source>Audio/&Video</source> <translation>音频/视频(&V)</translation> </message> <message> - <location filename="../Window.cpp" line="1334"/> + <location filename="../Window.cpp" line="1347"/> <source>Frame size</source> <translation>帧率</translation> </message> <message> - <location filename="../Window.cpp" line="1336"/> + <location filename="../Window.cpp" line="1349"/> <source>%1×</source> <translation>%1×</translation> </message> <message> - <location filename="../Window.cpp" line="1361"/> + <location filename="../Window.cpp" line="1374"/> <source>Toggle fullscreen</source> <translation>切换全屏</translation> </message> <message> - <location filename="../Window.cpp" line="1364"/> + <location filename="../Window.cpp" line="1377"/> <source>Lock aspect ratio</source> <translation>锁定纵横比</translation> </message> <message> - <location filename="../Window.cpp" line="1376"/> + <location filename="../Window.cpp" line="1389"/> <source>Force integer scaling</source> <translation>强制整数缩放</translation> </message> <message> - <location filename="../Window.cpp" line="1388"/> + <location filename="../Window.cpp" line="1401"/> <source>Interframe blending</source> <translation>帧间混合</translation> </message> <message> - <location filename="../Window.cpp" line="1397"/> + <location filename="../Window.cpp" line="1410"/> <source>Bilinear filtering</source> <translation>双线性过滤</translation> </message> <message> - <location filename="../Window.cpp" line="1406"/> + <location filename="../Window.cpp" line="1419"/> <source>Frame&skip</source> <translation>跳帧(&S)</translation> </message> <message> - <location filename="../Window.cpp" line="1419"/> + <location filename="../Window.cpp" line="1432"/> <source>Mute</source> <translation>静音</translation> </message> <message> - <location filename="../Window.cpp" line="1428"/> + <location filename="../Window.cpp" line="1441"/> <source>FPS target</source> <translation>目标 FPS</translation> </message> <message> - <location filename="../Window.cpp" line="1436"/> + <location filename="../Window.cpp" line="1449"/> <source>Native (59.7275)</source> <translation>原生 (59.7275)</translation> </message> <message> - <location filename="../Window.cpp" line="1451"/> + <location filename="../Window.cpp" line="1464"/> <source>Take &screenshot</source> <translation>截图(&S)</translation> </message> <message> - <location filename="../Window.cpp" line="1457"/> + <location filename="../Window.cpp" line="1466"/> + <source>F12</source> + <translation>F12</translation> + </message> + <message> + <location filename="../Window.cpp" line="1470"/> <source>Record A/V...</source> <translation>录制音频/视频...</translation> </message> <message> - <location filename="../Window.cpp" line="1458"/> + <location filename="../Window.cpp" line="1471"/> <source>Record GIF...</source> <translation>录制 GIF...</translation> </message> <message> - <location filename="../Window.cpp" line="1462"/> + <location filename="../Window.cpp" line="1475"/> <source>Video layers</source> <translation>视频图层</translation> </message> <message> - <location filename="../Window.cpp" line="1463"/> + <location filename="../Window.cpp" line="1476"/> <source>Audio channels</source> <translation>音频通道</translation> </message> <message> - <location filename="../Window.cpp" line="1465"/> + <location filename="../Window.cpp" line="1478"/> <source>Adjust layer placement...</source> <translation>调整图层布局...</translation> </message> <message> - <location filename="../Window.cpp" line="1467"/> + <location filename="../Window.cpp" line="1480"/> <source>&Tools</source> <translation>工具(&T)</translation> </message> <message> - <location filename="../Window.cpp" line="1468"/> + <location filename="../Window.cpp" line="1481"/> <source>View &logs...</source> <translation>查看日志(&L)...</translation> </message> <message> - <location filename="../Window.cpp" line="1470"/> + <location filename="../Window.cpp" line="1483"/> <source>Game &overrides...</source> <translation>覆盖游戏(&O)...</translation> </message> <message> - <location filename="../Window.cpp" line="1482"/> + <location filename="../Window.cpp" line="1495"/> <source>Game Pak sensors...</source> <translation>游戏卡带传感器...</translation> </message> <message> - <location filename="../Window.cpp" line="1493"/> + <location filename="../Window.cpp" line="1506"/> <source>&Cheats...</source> <translation>作弊码(&C)...</translation> </message> <message> - <location filename="../Window.cpp" line="1496"/> + <location filename="../Window.cpp" line="1509"/> <source>Settings...</source> <translation>设置...</translation> </message> <message> - <location filename="../Window.cpp" line="1500"/> + <location filename="../Window.cpp" line="1513"/> <source>Open debugger console...</source> <translation>打开调试器控制台...</translation> </message> <message> - <location filename="../Window.cpp" line="1502"/> + <location filename="../Window.cpp" line="1515"/> <source>Start &GDB server...</source> <translation>打开 GDB 服务器(&G)...</translation> </message> <message> - <location filename="../Window.cpp" line="1508"/> + <location filename="../Window.cpp" line="1521"/> <source>View &palette...</source> <translation>查看调色板(&P)...</translation> </message> <message> - <location filename="../Window.cpp" line="1509"/> + <location filename="../Window.cpp" line="1522"/> <source>View &sprites...</source> <translation>查看精灵图(&S)...</translation> </message> <message> - <location filename="../Window.cpp" line="1510"/> + <location filename="../Window.cpp" line="1523"/> <source>View &tiles...</source> <translation>查看瓷贴(&T)...</translation> </message> <message> - <location filename="../Window.cpp" line="1511"/> + <location filename="../Window.cpp" line="1524"/> <source>View &map...</source> <translation>查看映射(&M)...</translation> </message> <message> - <location filename="../Window.cpp" line="1514"/> + <location filename="../Window.cpp" line="1527"/> <source>&Frame inspector...</source> <translation>框架检查(&F)...</translation> </message> <message> - <location filename="../Window.cpp" line="1532"/> + <location filename="../Window.cpp" line="1545"/> <source>View memory...</source> <translation>查看内存...</translation> </message> <message> - <location filename="../Window.cpp" line="1533"/> + <location filename="../Window.cpp" line="1546"/> <source>Search memory...</source> <translation>搜索内存...</translation> </message> <message> - <location filename="../Window.cpp" line="1536"/> + <location filename="../Window.cpp" line="1549"/> <source>View &I/O registers...</source> <translation>查看 I/O 寄存器(&I)...</translation> </message> <message> - <location filename="../Window.cpp" line="1541"/> + <location filename="../Window.cpp" line="1554"/> <source>Record debug video log...</source> <translation>记录调试视频日志...</translation> </message> <message> - <location filename="../Window.cpp" line="1542"/> + <location filename="../Window.cpp" line="155"/> <source>Stop debug video log</source> <translation>停止记录调试视频日志</translation> </message> <message> - <location filename="../Window.cpp" line="1637"/> + <location filename="../Window.cpp" line="1650"/> <source>Exit fullscreen</source> <translation>退出全屏</translation> </message> <message> - <location filename="../Window.cpp" line="1639"/> + <location filename="../Window.cpp" line="1652"/> <source>GameShark Button (held)</source> <translation>GameShark 键 (长按)</translation> </message> <message> - <location filename="../Window.cpp" line="1645"/> + <location filename="../Window.cpp" line="1658"/> <source>Autofire</source> <translation>连发</translation> </message> <message> - <location filename="../Window.cpp" line="1646"/> + <location filename="../Window.cpp" line="1659"/> <source>Autofire A</source> <translation>连发 A</translation> </message> <message> - <location filename="../Window.cpp" line="1651"/> + <location filename="../Window.cpp" line="1664"/> <source>Autofire B</source> <translation>连发 B</translation> </message> <message> - <location filename="../Window.cpp" line="1656"/> + <location filename="../Window.cpp" line="1669"/> <source>Autofire L</source> <translation>连发 L</translation> </message> <message> - <location filename="../Window.cpp" line="1661"/> + <location filename="../Window.cpp" line="1674"/> <source>Autofire R</source> <translation>连发 R</translation> </message> <message> - <location filename="../Window.cpp" line="1666"/> + <location filename="../Window.cpp" line="1679"/> <source>Autofire Start</source> <translation>连发 Start</translation> </message> <message> - <location filename="../Window.cpp" line="1671"/> + <location filename="../Window.cpp" line="1684"/> <source>Autofire Select</source> <translation>连发 Select</translation> </message> <message> - <location filename="../Window.cpp" line="1676"/> + <location filename="../Window.cpp" line="1689"/> <source>Autofire Up</source> <translation>连发 上</translation> </message> <message> - <location filename="../Window.cpp" line="1681"/> + <location filename="../Window.cpp" line="1694"/> <source>Autofire Right</source> <translation>连发 右</translation> </message> <message> - <location filename="../Window.cpp" line="1686"/> + <location filename="../Window.cpp" line="1699"/> <source>Autofire Down</source> <translation>连发 下</translation> </message> <message> - <location filename="../Window.cpp" line="1691"/> + <location filename="../Window.cpp" line="1704"/> <source>Autofire Left</source> <translation>连发 左</translation> </message> <message> - <location filename="../Window.cpp" line="1745"/> + <location filename="../Window.cpp" line="1758"/> <source>Clear</source> <translation>清除</translation> </message>@@ -4376,12 +4456,12 @@ </message>
<message> <location filename="../SensorView.ui" line="60"/> <source>Start time at</source> - <translation>起始时间</translation> + <translation>开始时间</translation> </message> <message> <location filename="../SensorView.ui" line="70"/> <source>Now</source> - <translation>现在</translation> + <translation>立即</translation> </message> <message> <location filename="../SensorView.ui" line="97"/>@@ -4476,7 +4556,7 @@ </message>
<message> <location filename="../SettingsView.ui" line="105"/> <source>Audio driver:</source> - <translation>音频驱动:</translation> + <translation>音频驱动程序:</translation> </message> <message> <location filename="../SettingsView.ui" line="122"/>@@ -4778,7 +4858,7 @@ </message>
<message> <location filename="../SettingsView.ui" line="827"/> <source>Run all</source> - <translation>运行全部</translation> + <translation>全部运行</translation> </message> <message> <location filename="../SettingsView.ui" line="832"/>@@ -4913,7 +4993,7 @@ <location filename="../SettingsView.ui" line="1305"/>
<location filename="../SettingsView.ui" line="1353"/> <location filename="../SettingsView.ui" line="1401"/> <source>Same directory as the ROM</source> - <translation>保存在 ROM 所在目录</translation> + <translation>与 ROM 所在目录相同</translation> </message> <message> <location filename="../SettingsView.ui" line="1223"/>@@ -4953,7 +5033,7 @@ </message>
<message> <location filename="../SettingsView.ui" line="1458"/> <source>Game Boy model:</source> - <translation>Game Boy 模型:</translation> + <translation>Game Boy 型号:</translation> </message> <message> <location filename="../SettingsView.ui" line="1466"/>@@ -4993,12 +5073,12 @@ </message>
<message> <location filename="../SettingsView.ui" line="1494"/> <source>Super Game Boy model:</source> - <translation>Super Game Boy 模型:</translation> + <translation>Super Game Boy 型号:</translation> </message> <message> <location filename="../SettingsView.ui" line="1530"/> <source>Game Boy Color model:</source> - <translation>Game Boy Color 模型:</translation> + <translation>Game Boy Color 型号:</translation> </message> <message> <location filename="../SettingsView.ui" line="1573"/>@@ -5013,7 +5093,7 @@ </message>
<message> <location filename="../SettingsView.ui" line="1754"/> <source>Camera driver:</source> - <translation>相机驱动:</translation> + <translation>相机驱动程序:</translation> </message> <message> <location filename="../SettingsView.ui" line="1851"/>@@ -5046,7 +5126,7 @@ </message>
<message> <location filename="../ShaderSelector.ui" line="28"/> <source>Active Shader:</source> - <translation>活动着色器:</translation> + <translation>激活着色器:</translation> </message> <message> <location filename="../ShaderSelector.ui" line="35"/>@@ -5112,7 +5192,7 @@ </message>
<message> <location filename="../TileView.ui" line="27"/> <source>Export All</source> - <translation>导出全部</translation> + <translation>全部导出</translation> </message> <message> <location filename="../TileView.ui" line="43"/>@@ -5147,7 +5227,7 @@ </message>
<message> <location filename="../TileView.ui" line="199"/> <source>Copy All</source> - <translation>复制全部</translation> + <translation>全部复制</translation> </message> </context> <context>@@ -5195,151 +5275,172 @@ <translation>WebM</translation>
</message> <message> <location filename="../VideoView.ui" line="139"/> + <source>MP4</source> + <translation>MP4</translation> + </message> + <message> + <location filename="../VideoView.ui" line="146"/> <source>&Lossless</source> <translation>无损(&L)</translation> </message> <message> - <location filename="../VideoView.ui" line="156"/> + <location filename="../VideoView.ui" line="163"/> + <source>4K</source> + <translation>4K</translation> + </message> + <message> + <location filename="../VideoView.ui" line="170"/> <source>&1080p</source> <translation>1080p(&1)</translation> </message> <message> - <location filename="../VideoView.ui" line="166"/> + <location filename="../VideoView.ui" line="180"/> <source>&720p</source> <translation>720p(&7)</translation> </message> <message> - <location filename="../VideoView.ui" line="176"/> + <location filename="../VideoView.ui" line="190"/> <source>&480p</source> <translation>480p(&4)</translation> </message> <message> - <location filename="../VideoView.ui" line="189"/> + <location filename="../VideoView.ui" line="203"/> <source>&Native</source> <translation>原生(&N)</translation> </message> <message> - <location filename="../VideoView.ui" line="222"/> + <location filename="../VideoView.ui" line="236"/> <source>Format</source> <translation>格式</translation> </message> <message> - <location filename="../VideoView.ui" line="232"/> + <location filename="../VideoView.ui" line="246"/> <source>MKV</source> <translation>MKV</translation> </message> <message> - <location filename="../VideoView.ui" line="242"/> + <location filename="../VideoView.ui" line="251"/> + <source>WebM</source> + <translation>WebM</translation> + </message> + <message> + <location filename="../VideoView.ui" line="256"/> <source>AVI</source> <translation>AVI</translation> </message> <message> - <location filename="../VideoView.ui" line="247"/> + <location filename="../VideoView.ui" line="21"/> <source>MP4</source> <translation>MP4</translation> </message> <message> - <location filename="../VideoView.ui" line="259"/> + <location filename="../VideoView.ui" line="273"/> <source>h.264</source> <translation>h.264</translation> </message> <message> - <location filename="../VideoView.ui" line="264"/> + <location filename="../VideoView.ui" line="278"/> <source>h.264 (NVENC)</source> <translation>h.264 (NVENC)</translation> </message> <message> - <location filename="../VideoView.ui" line="269"/> + <location filename="../VideoView.ui" line="283"/> <source>HEVC</source> <translation>HEVC</translation> </message> <message> - <location filename="../VideoView.ui" line="274"/> + <location filename="../VideoView.ui" line="288"/> <source>HEVC (NVENC)</source> <translation>HEVC (NVENC)</translation> </message> <message> - <location filename="../VideoView.ui" line="279"/> + <location filename="../VideoView.ui" line="293"/> <source>VP8</source> <translation>VP8</translation> </message> <message> - <location filename="../VideoView.ui" line="284"/> + <location filename="../VideoView.ui" line="298"/> <source>VP9</source> <translation>VP9</translation> </message> <message> - <location filename="../VideoView.ui" line="289"/> + <location filename="../VideoView.ui" line="303"/> <source>FFV1</source> <translation>FFV1</translation> </message> <message> - <location filename="../VideoView.ui" line="301"/> + <location filename="../VideoView.ui" line="308"/> + <location filename="../VideoView.ui" line="350"/> + <source>None</source> + <translation>无</translation> + </message> + <message> + <location filename="../VideoView.ui" line="320"/> <source>FLAC</source> <translation>FLAC</translation> </message> <message> - <location filename="../VideoView.ui" line="306"/> + <location filename="../VideoView.ui" line="325"/> <source>Opus</source> <translation>Opus</translation> </message> <message> - <location filename="../VideoView.ui" line="311"/> + <location filename="../VideoView.ui" line="330"/> <source>Vorbis</source> <translation>Vorbis</translation> </message> <message> - <location filename="../VideoView.ui" line="316"/> + <location filename="../VideoView.ui" line="335"/> <source>MP3</source> <translation>MP3</translation> </message> <message> - <location filename="../VideoView.ui" line="321"/> + <location filename="../VideoView.ui" line="340"/> <source>AAC</source> <translation>AAC</translation> </message> <message> - <location filename="../VideoView.ui" line="326"/> + <location filename="../VideoView.ui" line="345"/> <source>Uncompressed</source> <translation>未压缩</translation> </message> <message> - <location filename="../VideoView.ui" line="337"/> + <location filename="../VideoView.ui" line="361"/> <source> Bitrate (kbps)</source> <translation>比特率 (kbps)</translation> </message> <message> - <location filename="../VideoView.ui" line="343"/> - <source>VBR </source> + <location filename="../VideoView.ui" line="367"/> + <source>VBR</source> <translation>VBR</translation> </message> <message> - <location filename="../VideoView.ui" line="388"/> + <location filename="../VideoView.ui" line="412"/> <source>ABR</source> <translation>ABR</translation> </message> <message> - <location filename="../VideoView.ui" line="404"/> + <location filename="../VideoView.ui" line="428"/> <source>Dimensions</source> <translation>维度</translation> </message> <message> - <location filename="../VideoView.ui" line="410"/> + <location filename="../VideoView.ui" line="434"/> <source>:</source> <translation>:</translation> </message> <message> - <location filename="../VideoView.ui" line="420"/> + <location filename="../VideoView.ui" line="444"/> <source>×</source> <translation>×</translation> </message> <message> - <location filename="../VideoView.ui" line="470"/> + <location filename="../VideoView.ui" line="494"/> <source>Lock aspect ratio</source> <translation>锁定纵横比</translation> </message> <message> - <location filename="../VideoView.ui" line="485"/> + <location filename="../VideoView.ui" line="509"/> <source>Show advanced</source> <translation>显示高级选项</translation> </message>
@@ -58,10 +58,6 @@ char* savestate;
bool server; }; -#ifdef _3DS -extern bool allocateRomBuffer(void); -FS_Archive sdmcArchive; -#endif #ifdef __SWITCH__ TimeType __nx_time_type = TimeType_LocalSystemClock; #endif@@ -85,9 +81,6 @@ UNUSED(_mPerfShutdown);
gfxInitDefault(); osSetSpeedupEnable(true); consoleInit(GFX_BOTTOM, NULL); - if (!allocateRomBuffer()) { - return 1; - } #elif defined(__SWITCH__) UNUSED(_mPerfShutdown); consoleInit(NULL);
@@ -6,6 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <mgba/internal/sm83/debugger/cli-debugger.h> #include <mgba/core/core.h> +#include <mgba/core/timing.h> #include <mgba/internal/debugger/cli-debugger.h> #include <mgba/internal/sm83/decoder.h> #include <mgba/internal/sm83/debugger/debugger.h>@@ -88,6 +89,7 @@ be->printf(be, "D: %02X E: %02X (DE: %04X)\n", cpu->d, cpu->e, cpu->de);
be->printf(be, "H: %02X L: %02X (HL: %04X)\n", cpu->h, cpu->l, cpu->hl); be->printf(be, "PC: %04X SP: %04X\n", cpu->pc, cpu->sp); _printFlags(be, cpu->f); + be->printf(be, "T-cycle: %" PRIu64 "\n", mTimingGlobalTime(debugger->p->d.core->timing)); struct SM83Debugger* platDebugger = (struct SM83Debugger*) debugger->p->d.platform; size_t i;