Merge branch 'master' (early part) into medusa
jump to
@@ -42,6 +42,7 @@ - GB Video: Fix more window edge cases (fixes mgba.io/i/1346)
- GB Timer: Fix timing adjustments when writing to TAC (fixes mgba.io/i/1340) - GBA Memory: Fix writing to OBJ memory in modes 3 and 5 - GBA: Fix RTC on non-standard sized ROMs (fixes mgba.io/i/1400) + - GBA Memory: Prevent writing to mirrored BG VRAM (fixes mgba.io/i/743) Other fixes: - Qt: More app metadata fixes - Qt: Fix load recent from archive (fixes mgba.io/i/1325)@@ -57,6 +58,8 @@ - LR35902: Fix trailing whitespace in disassembly
- Qt: Fix adjusting magnification in tile viewer when not fitting to window - FFmpeg: Improve initialization reliability and cleanup - Wii: Fix aspect ratio (fixes mgba.io/i/500) + - Qt: Fix some Qt display driver race conditions + - FFmpeg: Fix audio conversion producing gaps Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash@@ -74,6 +77,8 @@ - GBA BIOS: Add timings for HLE BIOS math functions (fixes mgba.io/i/1396)
- Debugger: Make tracing compatible with breakpoints/watchpoints - Debugger: Print breakpoint/watchpoint number when inserting - Qt: Open a message box for Qt frontend errors + - GBA Video: Clean up dead code in sprite rendering loop + - FFmpeg: Support audio-only recording 0.7.1: (2019-02-24) Bugfixes:
@@ -81,17 +81,33 @@ #if !defined(_MSC_VER) && (defined(__llvm__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
#define ATOMIC_STORE(DST, SRC) __atomic_store_n(&DST, SRC, __ATOMIC_RELEASE) #define ATOMIC_LOAD(DST, SRC) DST = __atomic_load_n(&SRC, __ATOMIC_ACQUIRE) #define ATOMIC_ADD(DST, OP) __atomic_add_fetch(&DST, OP, __ATOMIC_RELEASE) +#define ATOMIC_SUB(DST, OP) __atomic_sub_fetch(&DST, OP, __ATOMIC_RELEASE) #define ATOMIC_OR(DST, OP) __atomic_or_fetch(&DST, OP, __ATOMIC_RELEASE) #define ATOMIC_AND(DST, OP) __atomic_and_fetch(&DST, OP, __ATOMIC_RELEASE) #define ATOMIC_CMPXCHG(DST, EXPECTED, SRC) __atomic_compare_exchange_n(&DST, &EXPECTED, SRC, true,__ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE) +#define ATOMIC_STORE_PTR(DST, SRC) ATOMIC_STORE(DST, SRC) +#define ATOMIC_LOAD_PTR(DST, SRC) ATOMIC_LOAD(DST, SRC) +#elif defined _MSC_VER +#define ATOMIC_STORE(DST, SRC) InterlockedExchange(&DST, SRC) +#define ATOMIC_LOAD(DST, SRC) DST = InterlockedOrAcquire(&SRC, 0) +#define ATOMIC_ADD(DST, OP) InterlockedAddRelease(&DST, OP) +#define ATOMIC_SUB(DST, OP) InterlockedAddRelease(&DST, -OP) +#define ATOMIC_OR(DST, OP) InterlockedOrRelease(&DST, OP) +#define ATOMIC_AND(DST, OP) InterlockedAndRelease(&DST, OP) +#define ATOMIC_CMPXCHG(DST, EXPECTED, SRC) (InterlockedCompareExchange(&DST, SRC, EXPECTED) == EXPECTED) +#define ATOMIC_STORE_PTR(DST, SRC) InterlockedExchangePointer(DST, SRC) +#define ATOMIC_LOAD_PTR(DST, SRC) DST = InterlockedCompareExchangePointer(SRC, 0, 0) #else // TODO #define ATOMIC_STORE(DST, SRC) DST = SRC #define ATOMIC_LOAD(DST, SRC) DST = SRC #define ATOMIC_ADD(DST, OP) DST += OP +#define ATOMIC_SUB(DST, OP) DST -= OP #define ATOMIC_OR(DST, OP) DST |= OP #define ATOMIC_AND(DST, OP) DST &= OP #define ATOMIC_CMPXCHG(DST, EXPECTED, OP) ((DST == EXPECTED) ? ((DST = OP), true) : false) +#define ATOMIC_STORE_PTR(DST, SRC) ATOMIC_STORE(DST, SRC) +#define ATOMIC_LOAD_PTR(DST, SRC) ATOMIC_LOAD(DST, SRC) #endif #if defined(_3DS) || defined(GEKKO) || defined(PSP2)
@@ -23,10 +23,14 @@ int attached;
enum mLockstepPhase transferActive; int32_t transferCycles; + void (*lock)(struct mLockstep*); + void (*unlock)(struct mLockstep*); + bool (*signal)(struct mLockstep*, unsigned mask); bool (*wait)(struct mLockstep*, unsigned mask); void (*addCycles)(struct mLockstep*, int id, int32_t cycles); int32_t (*useCycles)(struct mLockstep*, int id, int32_t cycles); + int32_t (*unusedCycles)(struct mLockstep*, int id); void (*unload)(struct mLockstep*, int id); void* context; #ifndef NDEBUG@@ -35,6 +39,19 @@ #endif
}; void mLockstepInit(struct mLockstep*); +void mLockstepDeinit(struct mLockstep*); + +static inline void mLockstepLock(struct mLockstep* lockstep) { + if (lockstep->lock) { + lockstep->lock(lockstep); + } +} + +static inline void mLockstepUnlock(struct mLockstep* lockstep) { + if (lockstep->unlock) { + lockstep->unlock(lockstep); + } +} CXX_GUARD_END
@@ -126,7 +126,7 @@ int* cycleCounter);
uint32_t (*storeMultiple)(struct ARMCore*, uint32_t baseAddress, int mask, enum LSMDirection direction, int* cycleCounter); - uint32_t* activeRegion; + const uint32_t* activeRegion; uint32_t activeMask; uint32_t activeSeqCycles32; uint32_t activeSeqCycles16;
@@ -56,7 +56,7 @@ void (*store8)(struct LR35902Core*, uint16_t address, int8_t value);
int (*currentSegment)(struct LR35902Core*, uint16_t address); - uint8_t* activeRegion; + const uint8_t* activeRegion; uint16_t activeMask; uint16_t activeRegionEnd; void (*setActiveRegion)(struct LR35902Core*, uint16_t address);
@@ -230,7 +230,7 @@ for (d = 0; d < StringListSize(&directives); ++d) {
char directive[64]; ssize_t len = snprintf(directive, sizeof(directive) - 1, "!%s\n", *StringListGetPointer(&directives, d)); if (len > 1) { - vf->write(vf, directive, (size_t) len > sizeof(directive) ? sizeof(directive) : len); + vf->write(vf, directive, (size_t) len > sizeof(directive) ? sizeof(directive) : (size_t) len); } }
@@ -230,13 +230,13 @@ return success;
} struct VFile* mCoreGetState(struct mCore* core, int slot, bool write) { - char name[PATH_MAX]; + char name[PATH_MAX + 14]; // Quash warning snprintf(name, sizeof(name), "%s.ss%i", core->dirs.baseName, slot); return core->dirs.state->openFile(core->dirs.state, name, write ? (O_CREAT | O_TRUNC | O_RDWR) : O_RDONLY); } void mCoreDeleteState(struct mCore* core, int slot) { - char name[PATH_MAX]; + char name[PATH_MAX + 14]; // Quash warning snprintf(name, sizeof(name), "%s.ss%i", core->dirs.baseName, slot); core->dirs.state->deleteFile(core->dirs.state, name); }
@@ -341,7 +341,7 @@ sqlite3_step(library->insertPath);
} void mLibraryClear(struct mLibrary* library) { - int result = sqlite3_exec(library->db, + sqlite3_exec(library->db, " BEGIN TRANSACTION;" "\n DELETE FROM roots;" "\n DELETE FROM roms;"
@@ -11,6 +11,12 @@ lockstep->transferActive = 0;
#ifndef NDEBUG lockstep->transferId = 0; #endif + lockstep->lock = NULL; + lockstep->unlock = NULL; +} + +void mLockstepDeinit(struct mLockstep* lockstep) { + UNUSED(lockstep); } // TODO: Migrate nodes
@@ -14,6 +14,7 @@ timing->nextEvent = nextEvent;
} void mTimingDeinit(struct mTiming* timing) { + UNUSED(timing); } void mTimingClear(struct mTiming* timing) {
@@ -263,6 +263,8 @@ free((void*) buffer.romName);
free((void*) dbType); free((void*) dbVersion); + sqlite3_finalize(gamedbTable); + sqlite3_finalize(gamedbDrop); sqlite3_finalize(gameTable); sqlite3_finalize(romTable);@@ -275,6 +277,7 @@ return true;
} void NoIntroDBDestroy(struct NoIntroDB* db) { + sqlite3_finalize(db->crc32); sqlite3_close(db->db); free(db); }
@@ -508,7 +508,7 @@ int wx = softwareRenderer->wx + softwareRenderer->currentWx - 7;
if (GBRegisterLCDCIsWindow(softwareRenderer->lcdc) && wy == y && wx <= endX) { softwareRenderer->hasWindow = true; } - if (softwareRenderer->hasWindow && wx <= endX) { + if (GBRegisterLCDCIsWindow(softwareRenderer->lcdc) && softwareRenderer->hasWindow && wx <= endX) { if (wx > 0 && !softwareRenderer->d.disableBG) { GBVideoSoftwareRendererDrawBackground(softwareRenderer, maps, startX, wx, softwareRenderer->scx - softwareRenderer->offsetScx, softwareRenderer->scy + y - softwareRenderer->offsetScy); }
@@ -17,7 +17,6 @@ static uint8_t GBSIOLockstepNodeWriteSC(struct GBSIODriver* driver, uint8_t value);
static void _GBSIOLockstepNodeProcessEvents(struct mTiming* timing, void* driver, uint32_t cyclesLate); void GBSIOLockstepInit(struct GBSIOLockstep* lockstep) { - mLockstepInit(&lockstep->d); lockstep->players[0] = NULL; lockstep->players[1] = NULL; lockstep->pendingSB[0] = 0xFF;@@ -236,6 +235,8 @@ node->p->d.transferCycles = GBSIOCyclesPerTransfer[(value >> 1) & 1];
mTimingDeschedule(&driver->p->p->timing, &driver->p->event); mTimingDeschedule(&driver->p->p->timing, &node->event); mTimingSchedule(&driver->p->p->timing, &node->event, 0); + } else { + mLOG(GB_SIO, FATAL, "GBSIOLockstepNodeWriteSC() failed to write to masterClaimed\n"); } } return value;
@@ -94,6 +94,7 @@ mTimingSchedule(&gate->d.p->p->timing, &gate->event, cycles);
} void _battlechipTransferEvent(struct mTiming* timing, void* user, uint32_t cyclesLate) { + UNUSED(timing); struct GBASIOBattlechipGate* gate = user; if (gate->d.p->mode == SIO_NORMAL_32) {
@@ -390,11 +390,15 @@ LOAD_32(value, address & (SIZE_PALETTE_RAM - 4), gba->video.palette); \
wait += waitstatesRegion[REGION_PALETTE_RAM]; #define LOAD_VRAM \ - if ((address & 0x0001FFFF) < SIZE_VRAM) { \ - LOAD_32(value, address & 0x0001FFFC, gba->video.vram); \ - } else { \ - LOAD_32(value, address & 0x00017FFC, gba->video.vram); \ + if ((address & 0x0001FFFF) >= SIZE_VRAM) { \ + if ((address & (SIZE_VRAM | 0x00014000)) == SIZE_VRAM && (GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3)) { \ + mLOG(GBA_MEM, GAME_ERROR, "Bad VRAM Load32: 0x%08X", address); \ + value = 0; \ + break; \ + } \ + address &= 0x00017FFC; \ } \ + LOAD_32(value, address & 0x0001FFFC, gba->video.vram); \ wait += waitstatesRegion[REGION_VRAM]; #define LOAD_OAM LOAD_32(value, address & (SIZE_OAM - 4), gba->video.oam.raw);@@ -520,11 +524,15 @@ case REGION_PALETTE_RAM:
LOAD_16(value, address & (SIZE_PALETTE_RAM - 2), gba->video.palette); break; case REGION_VRAM: - if ((address & 0x0001FFFF) < SIZE_VRAM) { - LOAD_16(value, address & 0x0001FFFE, gba->video.vram); - } else { - LOAD_16(value, address & 0x00017FFE, gba->video.vram); + if ((address & 0x0001FFFF) >= SIZE_VRAM) { + if ((address & (SIZE_VRAM | 0x00014000)) == SIZE_VRAM && (GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3)) { + mLOG(GBA_MEM, GAME_ERROR, "Bad VRAM Load16: 0x%08X", address); + value = 0; + break; + } + address &= 0x00017FFE; } + LOAD_16(value, address & 0x0001FFFE, gba->video.vram); break; case REGION_OAM: LOAD_16(value, address & (SIZE_OAM - 2), gba->video.oam.raw);@@ -631,11 +639,15 @@ case REGION_PALETTE_RAM:
value = ((uint8_t*) gba->video.palette)[address & (SIZE_PALETTE_RAM - 1)]; break; case REGION_VRAM: - if ((address & 0x0001FFFF) < SIZE_VRAM) { - value = ((uint8_t*) gba->video.vram)[address & 0x0001FFFF]; - } else { - value = ((uint8_t*) gba->video.vram)[address & 0x00017FFF]; + if ((address & 0x0001FFFF) >= SIZE_VRAM) { + if ((address & (SIZE_VRAM | 0x00014000)) == SIZE_VRAM && (GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3)) { + mLOG(GBA_MEM, GAME_ERROR, "Bad VRAM Load8: 0x%08X", address); + value = 0; + break; + } + address &= 0x00017FFF; } + value = ((uint8_t*) gba->video.vram)[address & 0x0001FFFF]; break; case REGION_OAM: value = ((uint8_t*) gba->video.oam.raw)[address & (SIZE_OAM - 1)];@@ -717,20 +729,18 @@ } \
wait += waitstatesRegion[REGION_PALETTE_RAM]; #define STORE_VRAM \ - if ((address & 0x0001FFFF) < SIZE_VRAM) { \ - LOAD_32(oldValue, address & 0x0001FFFC, gba->video.vram); \ - if (oldValue != value) { \ - STORE_32(value, address & 0x0001FFFC, gba->video.vram); \ - gba->video.renderer->writeVRAM(gba->video.renderer, (address & 0x0001FFFC) + 2); \ - gba->video.renderer->writeVRAM(gba->video.renderer, (address & 0x0001FFFC)); \ + if ((address & 0x0001FFFF) >= SIZE_VRAM) { \ + if ((address & (SIZE_VRAM | 0x00014000)) == SIZE_VRAM && (GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3)) { \ + mLOG(GBA_MEM, GAME_ERROR, "Bad VRAM Store32: 0x%08X", address); \ + break; \ } \ - } else { \ - LOAD_32(oldValue, address & 0x00017FFC, gba->video.vram); \ - if (oldValue != value) { \ - STORE_32(value, address & 0x00017FFC, gba->video.vram); \ - gba->video.renderer->writeVRAM(gba->video.renderer, (address & 0x00017FFC) + 2); \ - gba->video.renderer->writeVRAM(gba->video.renderer, (address & 0x00017FFC)); \ - } \ + address &= 0x00017FFC; \ + } \ + LOAD_32(oldValue, address & 0x0001FFFC, gba->video.vram); \ + if (oldValue != value) { \ + STORE_32(value, address & 0x0001FFFC, gba->video.vram); \ + gba->video.renderer->writeVRAM(gba->video.renderer, (address & 0x0001FFFC) + 2); \ + gba->video.renderer->writeVRAM(gba->video.renderer, (address & 0x0001FFFC)); \ } \ wait += waitstatesRegion[REGION_VRAM];@@ -840,18 +850,17 @@ gba->video.renderer->writePalette(gba->video.renderer, address & (SIZE_PALETTE_RAM - 2), value);
} break; case REGION_VRAM: - if ((address & 0x0001FFFF) < SIZE_VRAM) { - LOAD_16(oldValue, address & 0x0001FFFE, gba->video.vram); - if (value != oldValue) { - STORE_16(value, address & 0x0001FFFE, gba->video.vram); - gba->video.renderer->writeVRAM(gba->video.renderer, address & 0x0001FFFE); + if ((address & 0x0001FFFF) >= SIZE_VRAM) { + if ((address & (SIZE_VRAM | 0x00014000)) == SIZE_VRAM && (GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3)) { + mLOG(GBA_MEM, GAME_ERROR, "Bad VRAM Store16: 0x%08X", address); + break; } - } else { - LOAD_16(oldValue, address & 0x00017FFE, gba->video.vram); - if (value != oldValue) { - STORE_16(value, address & 0x00017FFE, gba->video.vram); - gba->video.renderer->writeVRAM(gba->video.renderer, address & 0x00017FFE); - } + address &= 0x00017FFE; + } + LOAD_16(oldValue, address & 0x0001FFFE, gba->video.vram); + if (value != oldValue) { + STORE_16(value, address & 0x0001FFFE, gba->video.vram); + gba->video.renderer->writeVRAM(gba->video.renderer, address & 0x0001FFFE); } break; case REGION_OAM:@@ -939,7 +948,6 @@ GBAStore16(cpu, address & ~1, ((uint8_t) value) | ((uint8_t) value << 8), cycleCounter);
break; case REGION_VRAM: if ((address & 0x0001FFFF) >= ((GBARegisterDISPCNTGetMode(gba->memory.io[REG_DISPCNT >> 1]) >= 3) ? 0x00014000 : 0x00010000)) { - // TODO: check BG mode mLOG(GBA_MEM, GAME_ERROR, "Cannot Store8 to OBJ: 0x%08X", address); break; }
@@ -67,12 +67,8 @@ } \
LOAD_16(tileData, spriteBase & VRAM_BLOCK_MASK, vramBase); \ tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \ current = renderer->spriteLayer[outX]; \ - if ((current & FLAG_ORDER_MASK) > flags) { \ - if (tileData) { \ - renderer->spriteLayer[outX] = palette[tileData] | flags; \ - } else if (current != FLAG_UNWRITTEN) { \ - renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \ - } \ + if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \ + renderer->spriteLayer[outX] = palette[tileData] | flags; \ } #define SPRITE_DRAW_PIXEL_16_NORMAL_OBJWIN(localX) \@@ -84,13 +80,9 @@ } \
LOAD_16(tileData, spriteBase & VRAM_BLOCK_MASK, vramBase); \ tileData = (tileData >> ((localX & 3) << 2)) & 0xF; \ current = renderer->spriteLayer[outX]; \ - if ((current & FLAG_ORDER_MASK) > flags) { \ - if (tileData) { \ - unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \ - renderer->spriteLayer[outX] = color | flags; \ - } else if (current != FLAG_UNWRITTEN) { \ - renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \ - } \ + if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \ + unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \ + renderer->spriteLayer[outX] = color | flags; \ } #define SPRITE_DRAW_PIXEL_16_OBJWIN(localX) \@@ -117,12 +109,8 @@ } \
LOAD_16(tileData, spriteBase & VRAM_BLOCK_MASK, vramBase); \ tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \ current = renderer->spriteLayer[outX]; \ - if ((current & FLAG_ORDER_MASK) > flags) { \ - if (tileData) { \ - renderer->spriteLayer[outX] = palette[tileData] | flags; \ - } else if (current != FLAG_UNWRITTEN) { \ - renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \ - } \ + if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \ + renderer->spriteLayer[outX] = palette[tileData] | flags; \ } #define SPRITE_DRAW_PIXEL_256_NORMAL_OBJWIN(localX) \@@ -134,13 +122,9 @@ } \
LOAD_16(tileData, spriteBase & VRAM_BLOCK_MASK, vramBase); \ tileData = (tileData >> ((localX & 1) << 3)) & 0xFF; \ current = renderer->spriteLayer[outX]; \ - if ((current & FLAG_ORDER_MASK) > flags) { \ - if (tileData) { \ - unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \ - renderer->spriteLayer[outX] = color | flags; \ - } else if (current != FLAG_UNWRITTEN) { \ - renderer->spriteLayer[outX] = (current & ~FLAG_ORDER_MASK) | GBAObjAttributesCGetPriority(sprite->c) << OFFSET_PRIORITY; \ - } \ + if ((current & FLAG_UNWRITTEN) == FLAG_UNWRITTEN && tileData) { \ + unsigned color = (renderer->row[outX] & FLAG_OBJWIN) ? objwinPalette[tileData] : palette[tileData]; \ + renderer->spriteLayer[outX] = color | flags; \ } #define SPRITE_DRAW_PIXEL_256_OBJWIN(localX) \
@@ -8,7 +8,8 @@
#include <mgba/internal/gba/gba.h> #include <mgba/internal/gba/io.h> -#define LOCKSTEP_INCREMENT 3000 +#define LOCKSTEP_INCREMENT 2000 +#define LOCKSTEP_TRANSFER 512 static bool GBASIOLockstepNodeInit(struct GBASIODriver* driver); static void GBASIOLockstepNodeDeinit(struct GBASIODriver* driver);@@ -17,9 +18,9 @@ static bool GBASIOLockstepNodeUnload(struct GBASIODriver* driver);
static uint16_t GBASIOLockstepNodeMultiWriteRegister(struct GBASIODriver* driver, uint32_t address, uint16_t value); static uint16_t GBASIOLockstepNodeNormalWriteRegister(struct GBASIODriver* driver, uint32_t address, uint16_t value); static void _GBASIOLockstepNodeProcessEvents(struct mTiming* timing, void* driver, uint32_t cyclesLate); +static void _finishTransfer(struct GBASIOLockstepNode* node); void GBASIOLockstepInit(struct GBASIOLockstep* lockstep) { - mLockstepInit(&lockstep->d); lockstep->players[0] = 0; lockstep->players[1] = 0; lockstep->players[2] = 0;@@ -88,12 +89,16 @@ struct GBASIOLockstepNode* node = (struct GBASIOLockstepNode*) driver;
node->nextEvent = 0; node->eventDiff = 0; mTimingSchedule(&driver->p->p->timing, &node->event, 0); + + mLockstepLock(&node->p->d); + node->mode = driver->p->mode; + switch (node->mode) { case SIO_MULTI: node->d.writeRegister = GBASIOLockstepNodeMultiWriteRegister; node->d.p->rcnt |= 3; - ++node->p->attachedMulti; + ATOMIC_ADD(node->p->attachedMulti, 1); node->d.p->multiplayerControl.ready = node->p->attachedMulti == node->p->d.attached; if (node->id) { node->d.p->rcnt |= 4;@@ -110,35 +115,83 @@ #ifndef NDEBUG
node->phase = node->p->d.transferActive; node->transferId = node->p->d.transferId; #endif + + mLockstepUnlock(&node->p->d); + return true; } bool GBASIOLockstepNodeUnload(struct GBASIODriver* driver) { struct GBASIOLockstepNode* node = (struct GBASIOLockstepNode*) driver; + + mLockstepLock(&node->p->d); + node->mode = driver->p->mode; switch (node->mode) { case SIO_MULTI: - --node->p->attachedMulti; + ATOMIC_SUB(node->p->attachedMulti, 1); break; default: break; } + + // Flush ongoing transfer + if (mTimingIsScheduled(&driver->p->p->timing, &node->event)) { + int oldWhen = node->event.when; + + mTimingDeschedule(&driver->p->p->timing, &node->event); + mTimingSchedule(&driver->p->p->timing, &node->event, 0); + node->eventDiff -= oldWhen - node->event.when; + mTimingDeschedule(&driver->p->p->timing, &node->event); + } + node->p->d.unload(&node->p->d, node->id); - mTimingDeschedule(&driver->p->p->timing, &node->event); + + node->p->multiRecv[0] = 0xFFFF; + node->p->multiRecv[1] = 0xFFFF; + node->p->multiRecv[2] = 0xFFFF; + node->p->multiRecv[3] = 0xFFFF; + + _finishTransfer(node); + + if (!node->id) { + ATOMIC_STORE(node->p->d.transferActive, TRANSFER_IDLE); + } + + // Invalidate SIO mode + node->mode = SIO_GPIO; + + mLockstepUnlock(&node->p->d); + return true; } static uint16_t GBASIOLockstepNodeMultiWriteRegister(struct GBASIODriver* driver, uint32_t address, uint16_t value) { struct GBASIOLockstepNode* node = (struct GBASIOLockstepNode*) driver; + + mLockstepLock(&node->p->d); + if (address == REG_SIOCNT) { mLOG(GBA_SIO, DEBUG, "Lockstep %i: SIOCNT <- %04x", node->id, value); - if (value & 0x0080 && node->p->d.transferActive == TRANSFER_IDLE) { + + enum mLockstepPhase transferActive; + ATOMIC_LOAD(transferActive, node->p->d.transferActive); + + if (value & 0x0080 && transferActive == TRANSFER_IDLE) { if (!node->id && node->d.p->multiplayerControl.ready) { mLOG(GBA_SIO, DEBUG, "Lockstep %i: Transfer initiated", node->id); - node->p->d.transferActive = TRANSFER_STARTING; - node->p->d.transferCycles = GBASIOCyclesPerTransfer[node->d.p->multiplayerControl.baud][node->p->d.attached - 1]; + ATOMIC_STORE(node->p->d.transferActive, TRANSFER_STARTING); + ATOMIC_STORE(node->p->d.transferCycles, GBASIOCyclesPerTransfer[node->d.p->multiplayerControl.baud][node->p->d.attached - 1]); + + bool scheduled = mTimingIsScheduled(&driver->p->p->timing, &node->event); + int oldWhen = node->event.when; + mTimingDeschedule(&driver->p->p->timing, &node->event); mTimingSchedule(&driver->p->p->timing, &node->event, 0); + + if (scheduled) { + node->eventDiff -= oldWhen - node->event.when; + } } else { value &= ~0x0080; }@@ -148,6 +201,9 @@ value |= driver->p->siocnt & 0x00FC;
} else if (address == REG_SIOMLT_SEND) { mLOG(GBA_SIO, DEBUG, "Lockstep %i: SIOMLT_SEND <- %04x", node->id, value); } + + mLockstepUnlock(&node->p->d); + return value; }@@ -155,6 +211,7 @@ static void _finishTransfer(struct GBASIOLockstepNode* node) {
if (node->transferFinished) { return; } + struct GBASIO* sio = node->d.p; switch (node->mode) { case SIO_MULTI:@@ -209,27 +266,38 @@
static int32_t _masterUpdate(struct GBASIOLockstepNode* node) { bool needsToWait = false; int i; - switch (node->p->d.transferActive) { + + enum mLockstepPhase transferActive; + int attachedMulti, attached; + + ATOMIC_LOAD(transferActive, node->p->d.transferActive); + ATOMIC_LOAD(attachedMulti, node->p->attachedMulti); + ATOMIC_LOAD(attached, node->p->d.attached); + + switch (transferActive) { case TRANSFER_IDLE: // If the master hasn't initiated a transfer, it can keep going. node->nextEvent += LOCKSTEP_INCREMENT; - node->d.p->multiplayerControl.ready = node->p->attachedMulti == node->p->d.attached; + node->d.p->multiplayerControl.ready = attachedMulti == attached; break; case TRANSFER_STARTING: // Start the transfer, but wait for the other GBAs to catch up node->transferFinished = false; - node->p->multiRecv[0] = 0xFFFF; + node->p->multiRecv[0] = node->d.p->p->memory.io[REG_SIOMLT_SEND >> 1]; + node->d.p->p->memory.io[REG_SIOMULTI0 >> 1] = 0xFFFF; + node->d.p->p->memory.io[REG_SIOMULTI1 >> 1] = 0xFFFF; + node->d.p->p->memory.io[REG_SIOMULTI2 >> 1] = 0xFFFF; + node->d.p->p->memory.io[REG_SIOMULTI3 >> 1] = 0xFFFF; node->p->multiRecv[1] = 0xFFFF; node->p->multiRecv[2] = 0xFFFF; node->p->multiRecv[3] = 0xFFFF; needsToWait = true; ATOMIC_STORE(node->p->d.transferActive, TRANSFER_STARTED); - node->nextEvent += 512; + node->nextEvent += LOCKSTEP_TRANSFER; break; case TRANSFER_STARTED: // All the other GBAs have caught up and are sleeping, we can all continue now - node->p->multiRecv[0] = node->d.p->p->memory.io[REG_SIOMLT_SEND >> 1]; - node->nextEvent += 512; + node->nextEvent += LOCKSTEP_TRANSFER; ATOMIC_STORE(node->p->d.transferActive, TRANSFER_FINISHING); break; case TRANSFER_FINISHING:@@ -269,6 +337,7 @@ node->p->d.addCycles(&node->p->d, 0, node->eventDiff);
#ifndef NDEBUG node->phase = node->p->d.transferActive; #endif + if (needsToWait) { return 0; }@@ -276,9 +345,16 @@ return node->nextEvent;
} static uint32_t _slaveUpdate(struct GBASIOLockstepNode* node) { - node->d.p->multiplayerControl.ready = node->p->attachedMulti == node->p->d.attached; + enum mLockstepPhase transferActive; + int attachedMulti, attached; + + ATOMIC_LOAD(transferActive, node->p->d.transferActive); + ATOMIC_LOAD(attachedMulti, node->p->attachedMulti); + ATOMIC_LOAD(attached, node->p->d.attached); + + node->d.p->multiplayerControl.ready = attachedMulti == attached; bool signal = false; - switch (node->p->d.transferActive) { + switch (transferActive) { case TRANSFER_IDLE: if (!node->d.p->multiplayerControl.ready) { node->p->d.addCycles(&node->p->d, node->id, LOCKSTEP_INCREMENT);@@ -288,6 +364,9 @@ case TRANSFER_STARTING:
case TRANSFER_FINISHING: break; case TRANSFER_STARTED: + if (node->p->d.unusedCycles(&node->p->d, node->id) > node->eventDiff) { + break; + } node->transferFinished = false; switch (node->mode) { case SIO_MULTI:@@ -315,6 +394,9 @@ }
signal = true; break; case TRANSFER_FINISHED: + if (node->p->d.unusedCycles(&node->p->d, node->id) > node->eventDiff) { + break; + } _finishTransfer(node); signal = true; break;@@ -325,16 +407,20 @@ #endif
if (signal) { node->p->d.signal(&node->p->d, 1 << node->id); } + return 0; } static void _GBASIOLockstepNodeProcessEvents(struct mTiming* timing, void* user, uint32_t cyclesLate) { struct GBASIOLockstepNode* node = user; + mLockstepLock(&node->p->d); if (node->p->d.attached < 2) { + mLockstepUnlock(&node->p->d); return; } int32_t cycles = 0; node->nextEvent -= cyclesLate; + node->eventDiff += cyclesLate; if (node->nextEvent <= 0) { if (!node->id) { cycles = _masterUpdate(node);@@ -353,12 +439,18 @@ mTimingDeschedule(timing, &node->event);
mTimingSchedule(timing, &node->event, cycles); } else { node->d.p->p->earlyExit = true; - mTimingSchedule(timing, &node->event, cyclesLate + 1); + node->eventDiff += 1; + mTimingSchedule(timing, &node->event, 1); } + + mLockstepUnlock(&node->p->d); } static uint16_t GBASIOLockstepNodeNormalWriteRegister(struct GBASIODriver* driver, uint32_t address, uint16_t value) { struct GBASIOLockstepNode* node = (struct GBASIOLockstepNode*) driver; + + mLockstepLock(&node->p->d); + if (address == REG_SIOCNT) { mLOG(GBA_SIO, DEBUG, "Lockstep %i: SIOCNT <- %04x", node->id, value); value &= 0xFF8B;@@ -368,7 +460,7 @@ }
if (value & 0x0080 && !node->id) { // Internal shift clock if (value & 1) { - node->p->d.transferActive = TRANSFER_STARTING; + ATOMIC_STORE(node->p->d.transferActive, TRANSFER_STARTING); } // Frequency if (value & 2) {@@ -382,5 +474,8 @@ mLOG(GBA_SIO, DEBUG, "Lockstep %i: SIODATA32_LO <- %04x", node->id, value);
} else if (address == REG_SIODATA32_HI) { mLOG(GBA_SIO, DEBUG, "Lockstep %i: SIODATA32_HI <- %04x", node->id, value); } + + mLockstepUnlock(&node->p->d); + return value; }
@@ -1,14 +1,4 @@
-if(DEFINED ENV{DEVKITPRO}) - set(DEVKITPRO $ENV{DEVKITPRO}) -else() - message(FATAL_ERROR "Could not find DEVKITPRO in environment") -endif() - -if(DEFINED ENV{DEVKITARM}) - set(DEVKITARM $ENV{DEVKITARM}) -else() - set(DEVKITARM ${DEVKITPRO}/devkitARM) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../cmake/devkitPro.cmake) if(DEFINED ENV{CTRULIB}) set(CTRULIB $ENV{CTRULIB})@@ -16,40 +6,17 @@ else()
set(CTRULIB ${DEVKITPRO}/libctru) endif() -set(extension) -if (CMAKE_HOST_WIN32) - set(extension .exe) -endif() - -set(CMAKE_PROGRAM_PATH ${DEVKITARM}/bin) set(cross_prefix arm-none-eabi-) set(arch_flags "-march=armv6k -mtune=mpcore -mfloat-abi=hard -ffunction-sections") set(inc_flags "-I${CTRULIB}/include ${arch_flags} -mword-relocations") set(link_flags "-L${CTRULIB}/lib -lctru -specs=3dsx.specs ${arch_flags} -Wl,--gc-sections") -set(CMAKE_SYSTEM_NAME Generic CACHE INTERNAL "system name") set(CMAKE_SYSTEM_PROCESSOR arm CACHE INTERNAL "processor") set(CMAKE_LIBRARY_ARCHITECTURE arm-none-eabi CACHE INTERNAL "abi") -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_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") +set(3DS ON) +add_definitions(-D_3DS -DARM11) -set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags") -set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags") -set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared link flags") +create_devkit(ARM) -set(CMAKE_FIND_ROOT_PATH ${DEVKITARM}/arm-none-eabi ${DEVKITPRO}/portlibs/3ds) -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) - -set(3DS ON) -add_definitions(-D_3DS -DARM11) +set(CMAKE_FIND_ROOT_PATH ${DEVKITARM}/${CMAKE_LIBRARY_ARCHITECTURE} ${DEVKITPRO}/portlibs/3ds)
@@ -0,0 +1,41 @@
+if(DEFINED ENV{DEVKITPRO}) + set(DEVKITPRO $ENV{DEVKITPRO}) +else() + message(FATAL_ERROR "Could not find DEVKITPRO in environment") +endif() + +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) + else() + set(DEVKIT${DEVKIT} ${DEVKITPRO}/devkit${DEVKIT} PARENT_SCOPE) + endif() + + set(CMAKE_PROGRAM_PATH ${DEVKIT${DEVKIT}}/bin CACHE INTERNAL "program path") + + 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_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") + + set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags") + set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags") + set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared link flags") + + 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()
@@ -30,8 +30,11 @@ m_menus[name].clear();
emit menuCleared(name); } -void ActionMapper::rebuildMenu(QMenuBar* menubar, const ShortcutController& shortcuts) { +void ActionMapper::rebuildMenu(QMenuBar* menubar, QWidget* context, const ShortcutController& shortcuts) { menubar->clear(); + for (QAction* action : context->actions()) { + context->removeAction(action); + } for (const QString& m : m_menus[{}]) { if (m_hiddenActions.contains(m)) { continue;@@ -39,11 +42,11 @@ }
QString menu = m.mid(1); QMenu* qmenu = menubar->addMenu(m_menuNames[menu]); - rebuildMenu(menu, qmenu, shortcuts); + rebuildMenu(menu, qmenu, context, shortcuts); } } -void ActionMapper::rebuildMenu(const QString& menu, QMenu* qmenu, const ShortcutController& shortcuts) { +void ActionMapper::rebuildMenu(const QString& menu, QMenu* qmenu, QWidget* context, const ShortcutController& shortcuts) { for (const QString& actionName : m_menus[menu]) { if (actionName.isNull()) { qmenu->addSeparator();@@ -55,12 +58,13 @@ }
if (actionName[0] == '.') { QString name = actionName.mid(1); QMenu* newMenu = qmenu->addMenu(m_menuNames[name]); - rebuildMenu(name, newMenu, shortcuts); + rebuildMenu(name, newMenu, context, shortcuts); continue; } Action* action = &m_actions[actionName]; QAction* qaction = qmenu->addAction(action->visibleName()); qaction->setEnabled(action->isEnabled()); + qaction->setShortcutContext(Qt::WidgetShortcut); if (action->isExclusive() || action->booleanAction()) { qaction->setCheckable(true); }@@ -88,6 +92,7 @@ QObject::connect(shortcut, &Shortcut::shortcutChanged, qaction, [qaction](int shortcut) {
qaction->setShortcut(QKeySequence(shortcut)); }); } + context->addAction(qaction); } }
@@ -29,7 +29,7 @@ public:
void addMenu(const QString& visibleName, const QString& name, const QString& parent = {}); void addHiddenMenu(const QString& visibleName, const QString& name, const QString& parent = {}); void clearMenu(const QString& name); - void rebuildMenu(QMenuBar*, const ShortcutController&); + void rebuildMenu(QMenuBar*, QWidget* context, const ShortcutController&); void addSeparator(const QString& menu);@@ -59,7 +59,7 @@ void actionAdded(const QString& name);
void menuCleared(const QString& name); private: - void rebuildMenu(const QString& menu, QMenu* qmenu, const ShortcutController&); + void rebuildMenu(const QString& menu, QMenu* qmenu, QWidget* context, const ShortcutController&); Action* addAction(const Action& act, const QString& name, const QString& menu, const QKeySequence& shortcut); QHash<QString, Action> m_actions;
@@ -37,6 +37,7 @@ m_gl = new EmptyGLWidget(format, this);
m_painter = new PainterGL(format.majorVersion() < 2 ? 1 : m_gl->format().majorVersion(), m_gl); m_gl->setMouseTracking(true); m_gl->setAttribute(Qt::WA_TransparentForMouseEvents); // This doesn't seem to work? + setUpdatesEnabled(false); // Prevent paint events, which can cause race conditions } DisplayGL::~DisplayGL() {@@ -223,6 +224,9 @@ }
#endif m_backend->swap = [](VideoBackend* v) { PainterGL* painter = static_cast<PainterGL*>(v->user); + if (!painter->m_gl->isVisible()) { + return; + } painter->m_gl->swapBuffers(); };
@@ -32,7 +32,7 @@ public:
EmptyGLWidget(const QGLFormat& format, QWidget* parent) : QGLWidget(format, parent) { setAutoBufferSwap(false); } protected: - void paintEvent(QPaintEvent*) override {} + void paintEvent(QPaintEvent* event) override { event->ignore(); } void resizeEvent(QResizeEvent*) override {} void mouseMoveEvent(QMouseEvent* event) override { event->ignore(); } };
@@ -79,7 +79,9 @@ m_pixmap.setDevicePixelRatio(m_scaleFactor);
} void MessagePainter::paint(QPainter* painter) { - painter->drawPixmap(m_local, m_pixmap); + if (!m_message.text().isEmpty()) { + painter->drawPixmap(m_local, m_pixmap); + } }
@@ -16,26 +16,43 @@ #endif
using namespace QGBA; +MultiplayerController::Player::Player(CoreController* coreController, GBSIOLockstepNode* node) + : controller(coreController) + , gbNode(node) +{ +} + +MultiplayerController::Player::Player(CoreController* coreController, GBASIOLockstepNode* node) + : controller(coreController) + , gbaNode(node) +{ +} + MultiplayerController::MultiplayerController() { mLockstepInit(&m_lockstep); m_lockstep.context = this; + m_lockstep.lock = [](mLockstep* lockstep) { + MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); + controller->m_lock.lock(); + }; + m_lockstep.unlock = [](mLockstep* lockstep) { + MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); + controller->m_lock.unlock(); + }; m_lockstep.signal = [](mLockstep* lockstep, unsigned mask) { MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); Player* player = &controller->m_players[0]; bool woke = false; - controller->m_lock.lock(); player->waitMask &= ~mask; if (!player->waitMask && player->awake < 1) { mCoreThreadStopWaiting(player->controller->thread()); player->awake = 1; woke = true; } - controller->m_lock.unlock(); return woke; }; m_lockstep.wait = [](mLockstep* lockstep, unsigned mask) { MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); - controller->m_lock.lock(); Player* player = &controller->m_players[0]; bool slept = false; player->waitMask |= mask;@@ -44,7 +61,6 @@ mCoreThreadWaitFromThread(player->controller->thread());
player->awake = 0; slept = true; } - controller->m_lock.unlock(); return slept; }; m_lockstep.addCycles = [](mLockstep* lockstep, int id, int32_t cycles) {@@ -52,7 +68,6 @@ if (cycles < 0) {
abort(); } MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); - controller->m_lock.lock(); if (!id) { for (int i = 1; i < controller->m_players.count(); ++i) { Player* player = &controller->m_players[i];@@ -85,11 +100,9 @@ } else {
controller->m_players[id].controller->setSync(true); controller->m_players[id].cyclesPosted += cycles; } - controller->m_lock.unlock(); }; m_lockstep.useCycles = [](mLockstep* lockstep, int id, int32_t cycles) { MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); - controller->m_lock.lock(); Player* player = &controller->m_players[id]; player->cyclesPosted -= cycles; if (player->cyclesPosted <= 0) {@@ -97,15 +110,23 @@ mCoreThreadWaitFromThread(player->controller->thread());
player->awake = 0; } cycles = player->cyclesPosted; - controller->m_lock.unlock(); return cycles; }; - m_lockstep.unload = [](mLockstep* lockstep, int id) { + m_lockstep.unusedCycles= [](mLockstep* lockstep, int id) { MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); - controller->m_lock.lock(); Player* player = &controller->m_players[id]; + auto cycles = player->cyclesPosted; + return cycles; + }; + m_lockstep.unload = [](mLockstep* lockstep, int id) { + MultiplayerController* controller = static_cast<MultiplayerController*>(lockstep->context); if (id) { + Player* player = &controller->m_players[id]; player->controller->setSync(true); + player->cyclesPosted = 0; + + // release master GBA if it is waiting for this GBA + player = &controller->m_players[0]; player->waitMask &= ~(1 << id); if (!player->waitMask && player->awake < 1) { mCoreThreadStopWaiting(player->controller->thread());@@ -149,8 +170,11 @@ player->awake = 1;
} } } - controller->m_lock.unlock(); }; +} + +MultiplayerController::~MultiplayerController() { + mLockstepDeinit(&m_lockstep); } bool MultiplayerController::attachGame(CoreController* controller) {@@ -188,14 +212,7 @@
GBASIOLockstepNode* node = new GBASIOLockstepNode; GBASIOLockstepNodeCreate(node); GBASIOLockstepAttachNode(&m_gbaLockstep, node); - m_players.append({ - controller, - nullptr, - node, - 1, - 0, - 0 - }); + m_players.append({controller, node}); GBASIOSetDriver(&gba->sio, &node->d, SIO_MULTI);@@ -210,14 +227,7 @@
GBSIOLockstepNode* node = new GBSIOLockstepNode; GBSIOLockstepNodeCreate(node); GBSIOLockstepAttachNode(&m_gbLockstep, node); - m_players.append({ - controller, - node, - nullptr, - 1, - 0, - 0 - }); + m_players.append({controller, node}); GBSIOSetDriver(&gb->sio, &node->d);
@@ -17,6 +17,8 @@ #ifdef M_CORE_GB
#include <mgba/internal/gb/sio/lockstep.h> #endif +#include <memory> + struct GBSIOLockstepNode; struct GBASIOLockstepNode;@@ -29,6 +31,7 @@ Q_OBJECT
public: MultiplayerController(); + ~MultiplayerController(); bool attachGame(CoreController*); void detachGame(CoreController*);@@ -42,12 +45,15 @@ void gameDetached();
private: struct Player { + Player(CoreController* controller, GBSIOLockstepNode* node); + Player(CoreController* controller, GBASIOLockstepNode* node); + CoreController* controller; - GBSIOLockstepNode* gbNode; - GBASIOLockstepNode* gbaNode; - int awake; - int32_t cyclesPosted; - unsigned waitMask; + GBSIOLockstepNode* gbNode = nullptr; + GBASIOLockstepNode* gbaNode = nullptr; + int awake = 1; + int32_t cyclesPosted = 0; + unsigned waitMask = 0; }; union { mLockstep m_lockstep;
@@ -279,7 +279,11 @@
void VideoView::setVideoCodec(const QString& codec, bool manual) { free(m_videoCodecCstr); m_videoCodec = sanitizeCodec(codec, s_vcodecMap); - m_videoCodecCstr = strdup(m_videoCodec.toUtf8().constData()); + if (m_videoCodec == "none") { + m_videoCodecCstr = nullptr; + } else { + m_videoCodecCstr = strdup(m_videoCodec.toUtf8().constData()); + } if (!FFmpegEncoderSetVideo(&m_encoder, m_videoCodecCstr, m_vbr)) { free(m_videoCodecCstr); m_videoCodecCstr = nullptr;
@@ -608,9 +608,7 @@ factor = m_screenWidget->width() / size.width();
} m_savedScale = factor; for (QMap<int, Action*>::iterator iter = m_frameSizes.begin(); iter != m_frameSizes.end(); ++iter) { - bool enableSignals = iter.value()->blockSignals(true); iter.value()->setActive(iter.key() == factor); - iter.value()->blockSignals(enableSignals); } m_config->setOption("fullscreen", isFullScreen());@@ -636,6 +634,7 @@ enterFullScreen();
m_fullscreenOnStart = false; } reloadDisplayDriver(); + setFocus(); } void Window::closeEvent(QCloseEvent* event) {@@ -835,7 +834,7 @@ }, "audioChannels");
action->setActive(true); } } - m_actions.rebuildMenu(menuBar(), *m_shortcutController); + m_actions.rebuildMenu(menuBar(), this, *m_shortcutController); #ifdef USE_DISCORD_RPC@@ -1382,9 +1381,7 @@ size *= i;
m_savedScale = i; m_config->setOption("scaleMultiplier", i); // TODO: Port to other resizeFrame(size); - bool enableSignals = setSize->blockSignals(true); setSize->setActive(true); - setSize->blockSignals(enableSignals); }, "frame"); setSize->setExclusive(true); if (m_savedScale == i) {@@ -1481,17 +1478,12 @@ }, "av", tr("F12"));
#endif #ifdef USE_FFMPEG - addGameAction(tr("Record output..."), "recordOutput", this, &Window::openVideoWindow, "av"); + addGameAction(tr("Record A/V..."), "recordOutput", this, &Window::openVideoWindow, "av"); #endif #ifdef USE_MAGICK addGameAction(tr("Record GIF..."), "recordGIF", this, &Window::openGIFWindow, "av"); #endif - - addGameAction(tr("Record video log..."), "recordVL", this, &Window::startVideoLog, "av"); - addGameAction(tr("Stop video log"), "stopVL", [this]() { - m_controller->endVideoLog(); - }, "av"); m_actions.addSeparator("av"); m_actions.addMenu(tr("Video layers"), "videoLayers", "av");@@ -1552,6 +1544,12 @@ Action* ioViewer = addGameAction(tr("View &I/O registers..."), "ioViewer", openControllerTView<IOViewer>(), "tools");
m_platformActions.insert(PLATFORM_GBA, ioViewer); #endif + m_actions.addSeparator("tools"); + addGameAction(tr("Record debug video log..."), "recordVL", this, &Window::startVideoLog, "tools"); + addGameAction(tr("Stop debug video log"), "stopVL", [this]() { + m_controller->endVideoLog(); + }, "tools"); + ConfigOption* skipBios = m_config->addOption("skipBios"); skipBios->connect([this](const QVariant& value) { reloadConfig();@@ -1642,7 +1640,7 @@ action->setEnabled(false);
} m_shortcutController->rebuildItems(); - m_actions.rebuildMenu(menubar, *m_shortcutController); + m_actions.rebuildMenu(menuBar(), this, *m_shortcutController); } void Window::attachWidget(QWidget* widget) {@@ -1679,7 +1677,7 @@ ++i;
} m_config->setMRU(m_mruFiles); m_config->write(); - m_actions.rebuildMenu(menuBar(), *m_shortcutController); + m_actions.rebuildMenu(menuBar(), this, *m_shortcutController); } Action* Window::addGameAction(const QString& visibleName, const QString& name, Action::Function function, const QString& menu, const QKeySequence& shortcut) {
@@ -11,12 +11,12 @@ </message>
<message> <location filename="../AboutScreen.ui" line="23"/> <source><a href="http://mgba.io/">Website</a> • <a href="https://forums.mgba.io/">Forums / Support</a> • <a href="https://patreon.com/mgba">Donate</a> • <a href="https://github.com/mgba-emu/mgba/tree/{gitBranch}">Source</a></source> - <translation><a href="http://mgba.io/">主页</a> • <a href="https://forums.mgba.io/">论坛 / 支持</a> • <a href="https://patreon.com/mgba">捐助</a> • <a href="https://github.com/mgba-emu/mgba/tree/{gitBranch}">源代码</a></translation> + <translation><a href="http://mgba.io/">网站</a> • <a href="https://forums.mgba.io/">论坛、支持</a> • <a href="https://patreon.com/mgba">捐助</a> • <a href="https://github.com/mgba-emu/mgba/tree/{gitBranch}">源代码</a></translation> </message> <message> <location filename="../AboutScreen.ui" line="41"/> <source>Branch: <tt>{gitBranch}</tt><br/>Revision: <tt>{gitCommit}</tt></source> - <translation>分支: <tt>{gitBranch}</tt><br/>修订: <tt>{gitCommit}</tt></translation> + <translation>分支: <tt>{gitBranch}</tt><br/>修订版: <tt>{gitCommit}</tt></translation> </message> <message> <location filename="../AboutScreen.ui" line="58"/>@@ -32,8 +32,8 @@ <message>
<location filename="../AboutScreen.ui" line="86"/> <source>© 2013 – 2018 Jeffrey Pfau, licensed under the Mozilla Public License, version 2.0 Game Boy Advance is a registered trademark of Nintendo Co., Ltd.</source> - <translation>© 2013 – 2018 Jeffrey Pfau, 授权基于Mozilla公共授权 MPLv2.0 -Game Boy Advance 是 Nintendo Co., Ltd. 的注册商标。</translation> + <translation>© 2013 – 2018 Jeffrey Pfau,基于Mozilla公共许可证(版本 2.0)授权 +Game Boy Advance 是任天堂有限公司(Nintendo Co., Ltd.)的注册商标。</translation> </message> <message> <location filename="../AboutScreen.ui" line="106"/>@@ -61,7 +61,7 @@ <name>ArchiveInspector</name>
<message> <location filename="../ArchiveInspector.ui" line="14"/> <source>Open in archive...</source> - <translation>打开记录...</translation> + <translation>在压缩文件中打开...</translation> </message> <message> <location filename="../ArchiveInspector.ui" line="20"/>@@ -126,6 +126,84 @@ <translation>0x00 (00)</translation>
</message> </context> <context> + <name>BattleChipView</name> + <message> + <location filename="../BattleChipView.ui" line="14"/> + <source>BattleChip Gate</source> + <translation>BattleChip Gate</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="67"/> + <source>Chip name</source> + <translation>晶片名称</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="76"/> + <source>Insert</source> + <translation>插入</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="87"/> + <source>Save</source> + <translation>保存</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="94"/> + <source>Load</source> + <translation>载入</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="114"/> + <source>Add</source> + <translation>添加</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="121"/> + <source>Remove</source> + <translation>移除</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="138"/> + <source>Gate type</source> + <translation>装置类型</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="145"/> + <source>Ba&ttleChip Gate</source> + <translation>BattleChip Gate(&T)</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="155"/> + <source>Progress &Gate</source> + <translation>Progress Gate(&G)</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="162"/> + <source>Beast &Link Gate</source> + <translation>Beast Link(&L)</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="180"/> + <source>Inserted</source> + <translation>已插入</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="194"/> + <source>Chip ID</source> + <translation>晶片ID</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="207"/> + <source>Update Chip data</source> + <translation>更新晶片数据</translation> + </message> + <message> + <location filename="../BattleChipView.ui" line="219"/> + <source>Show advanced</source> + <translation>显示高级选项</translation> + </message> +</context> +<context> <name>CheatsView</name> <message> <location filename="../CheatsView.ui" line="14"/>@@ -168,7 +246,7 @@ </message>
<message> <location filename="../DebuggerConsole.ui" line="25"/> <source>Enter command (try `help` for more info)</source> - <translation>输入命令(尝试 `help` 以获取更多信息)</translation> + <translation>输入命令(尝试输入 `help` 以获取更多信息)</translation> </message> <message> <location filename="../DebuggerConsole.ui" line="32"/>@@ -181,7 +259,7 @@ <name>GIFView</name>
<message> <location filename="../GIFView.ui" line="14"/> <source>Record GIF</source> - <translation>录制GIF</translation> + <translation>录制 GIF</translation> </message> <message> <location filename="../GIFView.ui" line="34"/>@@ -196,7 +274,7 @@ </message>
<message> <location filename="../GIFView.ui" line="63"/> <source>Select File</source> - <translation>选取文件</translation> + <translation>选择文件</translation> </message> <message> <location filename="../GIFView.ui" line="101"/>@@ -211,7 +289,7 @@ </message>
<message> <location filename="../GIFView.ui" line="122"/> <source>Automatic</source> - <translation>自动设置帧延迟</translation> + <translation>自动设置</translation> </message> </context> <context>@@ -341,7 +419,7 @@ <message>
<location filename="../LoadSaveState.ui" line="14"/> <location filename="../LoadSaveState.ui" line="88"/> <source>%1 State</source> - <translation>%1 状态</translation> + <translation>%1 即时存档</translation> </message> <message> <location filename="../LoadSaveState.ui" line="41"/>@@ -359,47 +437,47 @@ </message>
<message> <location filename="../LoadSaveState.ui" line="50"/> <source>1</source> - <translation type="unfinished"></translation> + <translation>1</translation> </message> <message> <location filename="../LoadSaveState.ui" line="72"/> <source>2</source> - <translation type="unfinished"></translation> + <translation>2</translation> </message> <message> <location filename="../LoadSaveState.ui" line="116"/> <source>3</source> - <translation type="unfinished"></translation> + <translation>3</translation> </message> <message> <location filename="../LoadSaveState.ui" line="138"/> <source>4</source> - <translation type="unfinished"></translation> + <translation>4</translation> </message> <message> <location filename="../LoadSaveState.ui" line="160"/> <source>5</source> - <translation type="unfinished"></translation> + <translation>5</translation> </message> <message> <location filename="../LoadSaveState.ui" line="182"/> <source>6</source> - <translation type="unfinished"></translation> + <translation>6</translation> </message> <message> <location filename="../LoadSaveState.ui" line="204"/> <source>7</source> - <translation type="unfinished"></translation> + <translation>7</translation> </message> <message> <location filename="../LoadSaveState.ui" line="226"/> <source>8</source> - <translation type="unfinished"></translation> + <translation>8</translation> </message> <message> <location filename="../LoadSaveState.ui" line="248"/> <source>9</source> - <translation type="unfinished"></translation> + <translation>9</translation> </message> </context> <context>@@ -422,7 +500,7 @@ </message>
<message> <location filename="../LogView.ui" line="38"/> <source>Stub</source> - <translation>桩</translation> + <translation>桩件</translation> </message> <message> <location filename="../LogView.ui" line="48"/>@@ -530,22 +608,22 @@ <message>
<location filename="../MemorySearch.ui" line="119"/> <location filename="../MemorySearch.ui" line="179"/> <source>Guess</source> - <translation type="unfinished"></translation> + <translation>猜测</translation> </message> <message> <location filename="../MemorySearch.ui" line="132"/> <source>1 Byte (8-bit)</source> - <translation type="unfinished"></translation> + <translation>1 字节 (8 位)</translation> </message> <message> <location filename="../MemorySearch.ui" line="142"/> <source>2 Bytes (16-bit)</source> - <translation type="unfinished"></translation> + <translation>2 字节 (16 位)</translation> </message> <message> <location filename="../MemorySearch.ui" line="152"/> <source>4 Bytes (32-bit)</source> - <translation type="unfinished"></translation> + <translation>4 字节 (32 位)</translation> </message> <message> <location filename="../MemorySearch.ui" line="172"/>@@ -570,7 +648,7 @@ </message>
<message> <location filename="../MemorySearch.ui" line="217"/> <source>Equal</source> - <translation>相等</translation> + <translation>等于</translation> </message> <message> <location filename="../MemorySearch.ui" line="230"/>@@ -623,7 +701,7 @@ </message>
<message> <location filename="../MemoryView.ui" line="61"/> <source>0x</source> - <translation type="unfinished"></translation> + <translation>0</translation> </message> <message> <location filename="../MemoryView.ui" line="81"/>@@ -632,56 +710,56 @@ <translation>设定对齐单位:</translation>
</message> <message> <location filename="../MemoryView.ui" line="101"/> - <source>1 Byte</source> - <translation type="unfinished"></translation> + <source>&1 Byte</source> + <translation>1 字节(&1)</translation> </message> <message> <location filename="../MemoryView.ui" line="124"/> - <source>2 Bytes</source> - <translation type="unfinished"></translation> + <source>&2 Bytes</source> + <translation>2 字节(&2)</translation> </message> <message> <location filename="../MemoryView.ui" line="144"/> - <source>4 Bytes</source> - <translation type="unfinished"></translation> + <source>&4 Bytes</source> + <translation>4 字节(&4)</translation> </message> <message> - <location filename="../MemoryView.ui" line="181"/> + <location filename="../MemoryView.ui" line="180"/> <source>Unsigned Integer:</source> <translation>无符号整数:</translation> </message> <message> - <location filename="../MemoryView.ui" line="199"/> + <location filename="../MemoryView.ui" line="198"/> <source>Signed Integer:</source> <translation>有符号整数:</translation> </message> <message> - <location filename="../MemoryView.ui" line="217"/> + <location filename="../MemoryView.ui" line="216"/> <source>String:</source> - <translation>字符串 :</translation> + <translation>字符串:</translation> </message> <message> - <location filename="../MemoryView.ui" line="231"/> + <location filename="../MemoryView.ui" line="230"/> <source>Load TBL</source> <translation>载入 TBL</translation> </message> <message> - <location filename="../MemoryView.ui" line="244"/> + <location filename="../MemoryView.ui" line="243"/> <source>Copy Selection</source> <translation>复制所选</translation> </message> <message> - <location filename="../MemoryView.ui" line="251"/> + <location filename="../MemoryView.ui" line="250"/> <source>Paste</source> <translation>粘贴</translation> </message> <message> - <location filename="../MemoryView.ui" line="271"/> + <location filename="../MemoryView.ui" line="270"/> <source>Save Selection</source> <translation>保存所选</translation> </message> <message> - <location filename="../MemoryView.ui" line="278"/> + <location filename="../MemoryView.ui" line="277"/> <source>Load</source> <translation>载入</translation> </message>@@ -691,18 +769,18 @@ <name>ObjView</name>
<message> <location filename="../ObjView.ui" line="14"/> <source>Sprites</source> - <translation>Sprites</translation> + <translation>精灵图</translation> </message> <message> <location filename="../ObjView.ui" line="56"/> <location filename="../ObjView.ui" line="506"/> <source>×</source> - <translation></translation> + <translation>×</translation> </message> <message> <location filename="../ObjView.ui" line="69"/> <source>Magnification</source> - <translation>放大率</translation> + <translation>缩放率</translation> </message> <message> <location filename="../ObjView.ui" line="76"/>@@ -712,7 +790,7 @@ </message>
<message> <location filename="../ObjView.ui" line="85"/> <source>Attributes</source> - <translation>Attributes</translation> + <translation>属性</translation> </message> <message> <location filename="../ObjView.ui" line="93"/>@@ -722,7 +800,7 @@ </message>
<message> <location filename="../ObjView.ui" line="113"/> <source>Off</source> - <translation>Off</translation> + <translation>关</translation> </message> <message> <location filename="../ObjView.ui" line="124"/>@@ -740,7 +818,7 @@ </message>
<message> <location filename="../ObjView.ui" line="158"/> <source>Double Size</source> - <translation>Double Size</translation> + <translation>双倍大小</translation> </message> <message> <location filename="../ObjView.ui" line="184"/>@@ -748,22 +826,22 @@ <location filename="../ObjView.ui" line="228"/>
<location filename="../ObjView.ui" line="241"/> <location filename="../ObjView.ui" line="309"/> <source>Return, Ctrl+R</source> - <translation>Return, Ctrl+R</translation> + <translation>回车键、Ctrl+R</translation> </message> <message> <location filename="../ObjView.ui" line="202"/> <source>Flipped</source> - <translation>Flipped</translation> + <translation>已翻转</translation> </message> <message> <location filename="../ObjView.ui" line="225"/> <source>H</source> - <translation>H</translation> + <translation>水平</translation> </message> <message> <location filename="../ObjView.ui" line="238"/> <source>V</source> - <translation>V</translation> + <translation>垂直</translation> </message> <message> <location filename="../ObjView.ui" line="252"/>@@ -773,22 +851,22 @@ </message>
<message> <location filename="../ObjView.ui" line="272"/> <source>Normal</source> - <translation>Normal</translation> + <translation>普通</translation> </message> <message> <location filename="../ObjView.ui" line="283"/> <source>Mosaic</source> - <translation>Mosaic</translation> + <translation>马赛克</translation> </message> <message> <location filename="../ObjView.ui" line="320"/> <source>Enabled</source> - <translation>Enabled</translation> + <translation>已启用</translation> </message> <message> <location filename="../ObjView.ui" line="354"/> <source>Priority</source> - <translation>Priority</translation> + <translation>优先级</translation> </message> <message> <location filename="../ObjView.ui" line="389"/>@@ -798,7 +876,7 @@ </message>
<message> <location filename="../ObjView.ui" line="396"/> <source>Geometry</source> - <translation>Geometry</translation> + <translation>几何图像</translation> </message> <message> <location filename="../ObjView.ui" line="404"/>@@ -807,8 +885,8 @@ <translation>位置</translation>
</message> <message> <location filename="../ObjView.ui" line="440"/> - <source>, </source> - <translation>, </translation> + <source>,</source> + <translation>,</translation> </message> <message> <location filename="../ObjView.ui" line="470"/>@@ -837,12 +915,12 @@ <name>OverrideView</name>
<message> <location filename="../OverrideView.ui" line="20"/> <source>Game Overrides</source> - <translation type="unfinished"></translation> + <translation>游戏覆盖</translation> </message> <message> <location filename="../OverrideView.ui" line="30"/> <source>Game Boy Advance</source> - <translation type="unfinished"></translation> + <translation>Game Boy Advance</translation> </message> <message> <location filename="../OverrideView.ui" line="42"/>@@ -865,12 +943,12 @@ </message>
<message> <location filename="../OverrideView.ui" line="75"/> <source>Tilt</source> - <translation>贴图</translation> + <translation>图块</translation> </message> <message> <location filename="../OverrideView.ui" line="85"/> <source>Light sensor</source> - <translation>光传感器</translation> + <translation>光线传感器</translation> </message> <message> <location filename="../OverrideView.ui" line="95"/>@@ -891,92 +969,92 @@ </message>
<message> <location filename="../OverrideView.ui" line="131"/> <source>SRAM</source> - <translation type="unfinished"></translation> + <translation>SRAM</translation> </message> <message> <location filename="../OverrideView.ui" line="136"/> <source>Flash 512kb</source> - <translation type="unfinished"></translation> + <translation>Flash 512kb</translation> </message> <message> <location filename="../OverrideView.ui" line="141"/> <source>Flash 1Mb</source> - <translation type="unfinished"></translation> + <translation>Flash 1Mb</translation> </message> <message> <location filename="../OverrideView.ui" line="146"/> <source>EEPROM</source> - <translation type="unfinished"></translation> + <translation>EEPROM</translation> </message> <message> <location filename="../OverrideView.ui" line="154"/> <source>Idle loop</source> - <translation type="unfinished"></translation> + <translation>空循环</translation> </message> <message> <location filename="../OverrideView.ui" line="195"/> <source>Game Boy Player features</source> - <translation>Game Boy Player 特性</translation> + <translation>Game Boy Player 功能</translation> </message> <message> <location filename="../OverrideView.ui" line="234"/> <source>Game Boy</source> - <translation type="unfinished"></translation> + <translation>Game Boy</translation> </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"/> <source>Game Boy (DMG)</source> - <translation type="unfinished"></translation> + <translation>Game Boy (DMG)</translation> </message> <message> <location filename="../OverrideView.ui" line="258"/> <source>Super Game Boy (SGB)</source> - <translation type="unfinished"></translation> + <translation>Super Game Boy (SGB)</translation> </message> <message> <location filename="../OverrideView.ui" line="263"/> <source>Game Boy Color (CGB)</source> - <translation type="unfinished"></translation> + <translation>Game Boy Color (CGB)</translation> </message> <message> <location filename="../OverrideView.ui" line="268"/> <source>Game Boy Advance (AGB)</source> - <translation type="unfinished"></translation> + <translation>Game Boy Advance (AGB)</translation> </message> <message> <location filename="../OverrideView.ui" line="276"/> <source>Memory bank controller</source> - <translation>内部存储控制器</translation> + <translation>内存 bank 控制器</translation> </message> <message> <location filename="../OverrideView.ui" line="294"/> <source>MBC1</source> - <translation type="unfinished"></translation> + <translation>MBC1</translation> </message> <message> <location filename="../OverrideView.ui" line="299"/> <source>MBC2</source> - <translation type="unfinished"></translation> + <translation>MBC2</translation> </message> <message> <location filename="../OverrideView.ui" line="304"/> <source>MBC3</source> - <translation type="unfinished"></translation> + <translation>MBC3</translation> </message> <message> <location filename="../OverrideView.ui" line="309"/> <source>MBC3 + RTC</source> - <translation type="unfinished"></translation> + <translation>MBC3 + RTC</translation> </message> <message> <location filename="../OverrideView.ui" line="314"/> <source>MBC5</source> - <translation type="unfinished"></translation> + <translation>MBC5</translation> </message> <message> <location filename="../OverrideView.ui" line="319"/>@@ -986,22 +1064,22 @@ </message>
<message> <location filename="../OverrideView.ui" line="324"/> <source>MBC7</source> - <translation type="unfinished"></translation> + <translation>MBC7</translation> </message> <message> <location filename="../OverrideView.ui" line="329"/> <source>Pocket Cam</source> - <translation type="unfinished"></translation> + <translation>Pocket Cam</translation> </message> <message> <location filename="../OverrideView.ui" line="334"/> <source>TAMA5</source> - <translation type="unfinished"></translation> + <translation>TAMA5</translation> </message> <message> <location filename="../OverrideView.ui" line="339"/> <source>HuC-3</source> - <translation type="unfinished"></translation> + <translation>HuC-3</translation> </message> <message> <location filename="../OverrideView.ui" line="347"/>@@ -1011,12 +1089,12 @@ </message>
<message> <location filename="../OverrideView.ui" line="434"/> <source>Sprite Colors 1</source> - <translation type="unfinished"></translation> + <translation>精灵图颜色 1</translation> </message> <message> <location filename="../OverrideView.ui" line="441"/> <source>Sprite Colors 2</source> - <translation type="unfinished"></translation> + <translation>精灵图颜色 2</translation> </message> </context> <context>@@ -1061,12 +1139,12 @@ <location filename="../PaletteView.ui" line="212"/>
<location filename="../PaletteView.ui" line="219"/> <location filename="../PaletteView.ui" line="226"/> <source>0x00 (00)</source> - <translation type="unfinished"></translation> + <translation>0x00 (00)</translation> </message> <message> <location filename="../PaletteView.ui" line="244"/> <source>16-bit value</source> - <translation>16-bit 值</translation> + <translation>16 位数值</translation> </message> <message> <location filename="../PaletteView.ui" line="251"/>@@ -1076,33 +1154,31 @@ </message>
<message> <location filename="../PaletteView.ui" line="258"/> <source>Palette index</source> - <translation type="unfinished"></translation> + <translation>调色板索引</translation> </message> <message> <location filename="../PaletteView.ui" line="272"/> <source>0x0000</source> - <translation type="unfinished"></translation> + <translation>0x0000</translation> </message> <message> <location filename="../PaletteView.ui" line="282"/> <source>#000000</source> - <translation type="unfinished"></translation> + <translation>#000000</translation> </message> <message> <location filename="../PaletteView.ui" line="292"/> <source>000</source> - <translation type="unfinished"></translation> + <translation>000</translation> </message> <message> <location filename="../PaletteView.ui" line="322"/> <source>Export BG</source> - <translatorcomment>BG是什么</translatorcomment> - <translation>导出 BG</translation> + <translation>导出背景</translation> </message> <message> <location filename="../PaletteView.ui" line="342"/> <source>Export OBJ</source> - <translatorcomment>OBJ是什么</translatorcomment> <translation>导出 OBJ</translation> </message> </context>@@ -1111,7 +1187,7 @@ <name>PlacementControl</name>
<message> <location filename="../PlacementControl.ui" line="20"/> <source>Adjust placement</source> - <translation>更改部署</translation> + <translation>更改布局</translation> </message> <message> <location filename="../PlacementControl.ui" line="26"/>@@ -1121,17 +1197,17 @@ </message>
<message> <location filename="../PlacementControl.ui" line="65"/> <source>Offset</source> - <translation>抵消</translation> + <translation>偏移</translation> </message> <message> <location filename="../PlacementControl.ui" line="72"/> <source>X</source> - <translation type="unfinished"></translation> + <translation>X</translation> </message> <message> <location filename="../PlacementControl.ui" line="79"/> <source>Y</source> - <translation type="unfinished"></translation> + <translation>Y</translation> </message> </context> <context>@@ -1139,17 +1215,17 @@ <name>PrinterView</name>
<message> <location filename="../PrinterView.ui" line="14"/> <source>Game Boy Printer</source> - <translation type="unfinished"></translation> + <translation>Game Boy 打印机</translation> </message> <message> <location filename="../PrinterView.ui" line="96"/> <source>Hurry up!</source> - <translation type="unfinished"></translation> + <translation>Hurry up!</translation> </message> <message> <location filename="../PrinterView.ui" line="103"/> <source>Tear off</source> - <translation type="unfinished"></translation> + <translation>Tear off</translation> </message> </context> <context>@@ -1157,14 +1233,14 @@ <name>QGBA::AssetTile</name>
<message> <location filename="../AssetTile.cpp" line="112"/> <source>%0%1%2</source> - <translation type="unfinished"></translation> + <translation>%0%1%2</translation> </message> <message> <location filename="../AssetTile.cpp" line="148"/> <location filename="../AssetTile.cpp" line="149"/> <location filename="../AssetTile.cpp" line="150"/> <source>0x%0 (%1)</source> - <translation type="unfinished"></translation> + <translation>0x%0 (%1)</translation> </message> </context> <context>@@ -1172,17 +1248,17 @@ <name>QGBA::AudioDevice</name>
<message> <location filename="../AudioDevice.cpp" line="26"/> <source>Can't set format of context-less audio device</source> - <translation type="unfinished"></translation> + <translation>无法设置无上下文音频设备的格式</translation> </message> <message> <location filename="../AudioDevice.cpp" line="48"/> <source>Audio device is missing its core</source> - <translation type="unfinished"></translation> + <translation>音频设备缺少核心</translation> </message> <message> <location filename="../AudioDevice.cpp" line="64"/> <source>Writing data to read-only audio device</source> - <translation type="unfinished"></translation> + <translation>正在将数据写入只读音频设备</translation> </message> </context> <context>@@ -1190,7 +1266,7 @@ <name>QGBA::AudioProcessorQt</name>
<message> <location filename="../AudioProcessorQt.cpp" line="43"/> <source>Can't start an audio processor without input</source> - <translation type="unfinished"></translation> + <translation>无法在无输入的情况下启动音频处理器</translation> </message> </context> <context>@@ -1198,7 +1274,7 @@ <name>QGBA::AudioProcessorSDL</name>
<message> <location filename="../AudioProcessorSDL.cpp" line="34"/> <source>Can't start an audio processor without input</source> - <translation type="unfinished"></translation> + <translation>无法在无输入的情况下启动音频处理器</translation> </message> </context> <context>@@ -1211,7 +1287,7 @@ </message>
<message> <location filename="../CheatsModel.cpp" line="213"/> <source>Failed to open cheats file: %1</source> - <translation>打开作弊码文件失败 : %1</translation> + <translation>打开作弊码文件失败: %1</translation> </message> </context> <context>@@ -1247,24 +1323,24 @@ </context>
<context> <name>QGBA::CoreController</name> <message> - <location filename="../CoreController.cpp" line="561"/> + <location filename="../CoreController.cpp" line="556"/> <source>Failed to open save file: %1</source> <translation>无法打开存档: %1</translation> </message> <message> - <location filename="../CoreController.cpp" line="590"/> + <location filename="../CoreController.cpp" line="585"/> <source>Failed to open game file: %1</source> - <translation>无法打开游戏文件 : %1</translation> + <translation>无法打开游戏文件: %1</translation> </message> <message> - <location filename="../CoreController.cpp" line="655"/> + <location filename="../CoreController.cpp" line="650"/> <source>Failed to open snapshot file for reading: %1</source> - <translation>无法读取快照文件 : %1</translation> + <translation>无法读取快照文件: %1</translation> </message> <message> - <location filename="../CoreController.cpp" line="671"/> + <location filename="../CoreController.cpp" line="666"/> <source>Failed to open snapshot file for writing: %1</source> - <translation>无法写入快照文件 : %1</translation> + <translation>无法写入快照文件: %1</translation> </message> </context> <context>@@ -1272,7 +1348,15 @@ <name>QGBA::CoreManager</name>
<message> <location filename="../CoreManager.cpp" line="54"/> <source>Failed to open game file: %1</source> - <translation>无法打开游戏文件 : %1</translation> + <translation>无法打开游戏文件: %1</translation> + </message> +</context> +<context> + <name>QGBA::GBAApp</name> + <message> + <location filename="../GBAApp.cpp" line="69"/> + <source>Enable Discord Rich Presence</source> + <translation>启用 Discord Rich Presence</translation> </message> </context> <context>@@ -1285,7 +1369,7 @@ </message>
<message> <location filename="../GBAKeyEditor.cpp" line="80"/> <source>Clear Analog</source> - <translation>清除 Analog</translation> + <translation>清除模拟控制</translation> </message> <message> <location filename="../GBAKeyEditor.cpp" line="91"/>@@ -1303,22 +1387,22 @@ <name>QGBA::GDBWindow</name>
<message> <location filename="../GDBWindow.cpp" line="28"/> <source>Server settings</source> - <translation type="unfinished"></translation> + <translation>服务器设置</translation> </message> <message> <location filename="../GDBWindow.cpp" line="34"/> <source>Local port</source> - <translation type="unfinished"></translation> + <translation>本地端口</translation> </message> <message> <location filename="../GDBWindow.cpp" line="36"/> <source>Bind address</source> - <translation type="unfinished"></translation> + <translation>绑定地址</translation> </message> <message> <location filename="../GDBWindow.cpp" line="55"/> <source>Break</source> - <translation type="unfinished"></translation> + <translation>断点</translation> </message> <message> <location filename="../GDBWindow.cpp" line="104"/>@@ -1338,7 +1422,7 @@ </message>
<message> <location filename="../GDBWindow.cpp" line="122"/> <source>Could not start GDB server</source> - <translation>无法打开GDB服务端</translation> + <translation>无法打开 GDB 服务端</translation> </message> </context> <context>@@ -1346,7 +1430,7 @@ <name>QGBA::GIFView</name>
<message> <location filename="../GIFView.cpp" line="53"/> <source>Failed to open output GIF file: %1</source> - <translation>无法打开输出的GIF文件 : %1</translation> + <translation>无法打开输出的 GIF 文件: %1</translation> </message> <message> <location filename="../GIFView.cpp" line="71"/>@@ -1356,7 +1440,7 @@ </message>
<message> <location filename="../GIFView.cpp" line="71"/> <source>Graphics Interchange Format (*.gif)</source> - <translation type="unfinished"></translation> + <translation>图形交换格式 (*.gif)</translation> </message> </context> <context>@@ -1369,37 +1453,37 @@ </message>
<message> <location filename="../IOViewer.cpp" line="31"/> <source>Mode 0: 4 tile layers</source> - <translation type="unfinished"></translation> + <translation>模式0: 4个图块层</translation> </message> <message> <location filename="../IOViewer.cpp" line="32"/> <source>Mode 1: 2 tile layers + 1 rotated/scaled tile layer</source> - <translation type="unfinished"></translation> + <translation>模式 1: 2个图块层 + 1个已旋转/缩放图块层</translation> </message> <message> <location filename="../IOViewer.cpp" line="33"/> <source>Mode 2: 2 rotated/scaled tile layers</source> - <translation type="unfinished"></translation> + <translation>模式 2: 2个已旋转/缩放图块层</translation> </message> <message> <location filename="../IOViewer.cpp" line="34"/> <source>Mode 3: Full 15-bit bitmap</source> - <translation type="unfinished"></translation> + <translation>模式 3: 完整15位位图</translation> </message> <message> <location filename="../IOViewer.cpp" line="35"/> <source>Mode 4: Full 8-bit bitmap</source> - <translation type="unfinished"></translation> + <translation>模式 4: 完整8位位图</translation> </message> <message> <location filename="../IOViewer.cpp" line="36"/> <source>Mode 5: Small 15-bit bitmap</source> - <translation type="unfinished"></translation> + <translation>模式 5: 15位小位图</translation> </message> <message> <location filename="../IOViewer.cpp" line="40"/> <source>CGB Mode</source> - <translation type="unfinished"></translation> + <translation>CGB 模式</translation> </message> <message> <location filename="../IOViewer.cpp" line="41"/>@@ -1409,12 +1493,12 @@ </message>
<message> <location filename="../IOViewer.cpp" line="42"/> <source>Unlocked HBlank</source> - <translation type="unfinished"></translation> + <translation>已解锁 HBlank</translation> </message> <message> <location filename="../IOViewer.cpp" line="43"/> <source>Linear OBJ tile mapping</source> - <translation type="unfinished"></translation> + <translation>线性 OBJ 图块映射</translation> </message> <message> <location filename="../IOViewer.cpp" line="44"/>@@ -1424,82 +1508,82 @@ </message>
<message> <location filename="../IOViewer.cpp" line="45"/> <source>Enable background 0</source> - <translation type="unfinished"></translation> + <translation>启用背景 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="46"/> <source>Enable background 1</source> - <translation type="unfinished"></translation> + <translation>启用背景 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="47"/> <source>Enable background 2</source> - <translation type="unfinished"></translation> + <translation>启用背景 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="48"/> <source>Enable background 3</source> - <translation type="unfinished"></translation> + <translation>启用背景 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="49"/> <source>Enable OBJ</source> - <translation type="unfinished"></translation> + <translation>启用 OBJ</translation> </message> <message> <location filename="../IOViewer.cpp" line="50"/> <source>Enable Window 0</source> - <translation type="unfinished"></translation> + <translation>启用窗口 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="51"/> <source>Enable Window 1</source> - <translation type="unfinished"></translation> + <translation>启用窗口 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="52"/> <source>Enable OBJ Window</source> - <translation type="unfinished"></translation> + <translation>启用 OBJ 窗口</translation> </message> <message> <location filename="../IOViewer.cpp" line="58"/> <source>Currently in VBlank</source> - <translation type="unfinished"></translation> + <translation>当前 (VBlank)</translation> </message> <message> <location filename="../IOViewer.cpp" line="59"/> <source>Currently in HBlank</source> - <translation type="unfinished"></translation> + <translation>当前 (HBlank)</translation> </message> <message> <location filename="../IOViewer.cpp" line="60"/> <source>Currently in VCounter</source> - <translation type="unfinished"></translation> + <translation>当前 (VCounter)</translation> </message> <message> <location filename="../IOViewer.cpp" line="61"/> <source>Enable VBlank IRQ generation</source> - <translation type="unfinished"></translation> + <translation>启用 VBlank IRQ 生成</translation> </message> <message> <location filename="../IOViewer.cpp" line="62"/> <source>Enable HBlank IRQ generation</source> - <translation type="unfinished"></translation> + <translation>启用 HBlank IRQ 生成</translation> </message> <message> <location filename="../IOViewer.cpp" line="63"/> <source>Enable VCounter IRQ generation</source> - <translation type="unfinished"></translation> + <translation>启用 VCounter IRQ 生成</translation> </message> <message> <location filename="../IOViewer.cpp" line="64"/> <source>VCounter scanline</source> - <translation type="unfinished"></translation> + <translation>VCounter 扫描线</translation> </message> <message> <location filename="../IOViewer.cpp" line="68"/> <source>Current scanline</source> - <translation type="unfinished"></translation> + <translation>当前扫描线</translation> </message> <message> <location filename="../IOViewer.cpp" line="72"/>@@ -1515,7 +1599,7 @@ <location filename="../IOViewer.cpp" line="82"/>
<location filename="../IOViewer.cpp" line="91"/> <location filename="../IOViewer.cpp" line="101"/> <source>Tile data base (* 16kB)</source> - <translation type="unfinished"></translation> + <translation>图块数据基 (* 16kB)</translation> </message> <message> <location filename="../IOViewer.cpp" line="74"/>@@ -1523,7 +1607,7 @@ <location filename="../IOViewer.cpp" line="83"/>
<location filename="../IOViewer.cpp" line="92"/> <location filename="../IOViewer.cpp" line="102"/> <source>Enable mosaic</source> - <translation type="unfinished"></translation> + <translation>启用马赛克</translation> </message> <message> <location filename="../IOViewer.cpp" line="75"/>@@ -1531,7 +1615,7 @@ <location filename="../IOViewer.cpp" line="84"/>
<location filename="../IOViewer.cpp" line="93"/> <location filename="../IOViewer.cpp" line="103"/> <source>Enable 256-color</source> - <translation>启用256色</translation> + <translation>启用 256 色</translation> </message> <message> <location filename="../IOViewer.cpp" line="76"/>@@ -1539,7 +1623,7 @@ <location filename="../IOViewer.cpp" line="85"/>
<location filename="../IOViewer.cpp" line="94"/> <location filename="../IOViewer.cpp" line="104"/> <source>Tile map base (* 2kB)</source> - <translation type="unfinished"></translation> + <translation>图块映射基 (* 2kB)</translation> </message> <message> <location filename="../IOViewer.cpp" line="77"/>@@ -1547,13 +1631,13 @@ <location filename="../IOViewer.cpp" line="86"/>
<location filename="../IOViewer.cpp" line="96"/> <location filename="../IOViewer.cpp" line="106"/> <source>Background dimensions</source> - <translation type="unfinished"></translation> + <translation>背景维度</translation> </message> <message> <location filename="../IOViewer.cpp" line="95"/> <location filename="../IOViewer.cpp" line="105"/> <source>Overflow wraps</source> - <translation type="unfinished"></translation> + <translation>溢出包装</translation> </message> <message> <location filename="../IOViewer.cpp" line="110"/>@@ -1561,7 +1645,7 @@ <location filename="../IOViewer.cpp" line="118"/>
<location filename="../IOViewer.cpp" line="126"/> <location filename="../IOViewer.cpp" line="134"/> <source>Horizontal offset</source> - <translation type="unfinished"></translation> + <translation>水平偏移量</translation> </message> <message> <location filename="../IOViewer.cpp" line="114"/>@@ -1569,7 +1653,7 @@ <location filename="../IOViewer.cpp" line="122"/>
<location filename="../IOViewer.cpp" line="130"/> <location filename="../IOViewer.cpp" line="138"/> <source>Vertical offset</source> - <translation type="unfinished"></translation> + <translation>垂直偏移量</translation> </message> <message> <location filename="../IOViewer.cpp" line="142"/>@@ -1585,7 +1669,7 @@ <location filename="../IOViewer.cpp" line="195"/>
<location filename="../IOViewer.cpp" line="200"/> <location filename="../IOViewer.cpp" line="209"/> <source>Fractional part</source> - <translation type="unfinished"></translation> + <translation>分数部分</translation> </message> <message> <location filename="../IOViewer.cpp" line="143"/>@@ -1597,7 +1681,7 @@ <location filename="../IOViewer.cpp" line="186"/>
<location filename="../IOViewer.cpp" line="191"/> <location filename="../IOViewer.cpp" line="196"/> <source>Integer part</source> - <translation type="unfinished"></translation> + <translation>整数部分</translation> </message> <message> <location filename="../IOViewer.cpp" line="163"/>@@ -1605,7 +1689,7 @@ <location filename="../IOViewer.cpp" line="172"/>
<location filename="../IOViewer.cpp" line="201"/> <location filename="../IOViewer.cpp" line="210"/> <source>Integer part (bottom)</source> - <translation type="unfinished"></translation> + <translation>整数部分 (低位)</translation> </message> <message> <location filename="../IOViewer.cpp" line="167"/>@@ -1613,286 +1697,286 @@ <location filename="../IOViewer.cpp" line="176"/>
<location filename="../IOViewer.cpp" line="205"/> <location filename="../IOViewer.cpp" line="214"/> <source>Integer part (top)</source> - <translation type="unfinished"></translation> + <translation>整数部分 (高位)</translation> </message> <message> <location filename="../IOViewer.cpp" line="218"/> <location filename="../IOViewer.cpp" line="223"/> <source>End x</source> - <translation type="unfinished"></translation> + <translation>结束 x 轴</translation> </message> <message> <location filename="../IOViewer.cpp" line="219"/> <location filename="../IOViewer.cpp" line="224"/> <source>Start x</source> - <translation type="unfinished"></translation> + <translation>起始 x 轴</translation> </message> <message> <location filename="../IOViewer.cpp" line="228"/> <location filename="../IOViewer.cpp" line="233"/> <source>End y</source> - <translation type="unfinished"></translation> + <translation>结束 y 轴</translation> </message> <message> <location filename="../IOViewer.cpp" line="229"/> <location filename="../IOViewer.cpp" line="234"/> <source>Start y</source> - <translation type="unfinished"></translation> + <translation>起始 y 轴</translation> </message> <message> <location filename="../IOViewer.cpp" line="238"/> <source>Window 0 enable BG 0</source> - <translation type="unfinished"></translation> + <translation>窗口 0 启用背景 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="239"/> <source>Window 0 enable BG 1</source> - <translation type="unfinished"></translation> + <translation>窗口 0 启用背景 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="240"/> <source>Window 0 enable BG 2</source> - <translation type="unfinished"></translation> + <translation>窗口 0 启用背景 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="241"/> <source>Window 0 enable BG 3</source> - <translation type="unfinished"></translation> + <translation>窗口 0 启用背景 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="242"/> <source>Window 0 enable OBJ</source> - <translation type="unfinished"></translation> + <translation>窗口 0 启用 OBJ</translation> </message> <message> <location filename="../IOViewer.cpp" line="243"/> <source>Window 0 enable blend</source> - <translation type="unfinished"></translation> + <translation>Windows 0 启用叠加</translation> </message> <message> <location filename="../IOViewer.cpp" line="244"/> <source>Window 1 enable BG 0</source> - <translation type="unfinished"></translation> + <translation>窗口 1 启用背景 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="245"/> <source>Window 1 enable BG 1</source> - <translation type="unfinished"></translation> + <translation>窗口 1 启用背景 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="246"/> <source>Window 1 enable BG 2</source> - <translation type="unfinished"></translation> + <translation>窗口 1 启用背景 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="247"/> <source>Window 1 enable BG 3</source> - <translation type="unfinished"></translation> + <translation>窗口 1 启用背景 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="248"/> <source>Window 1 enable OBJ</source> - <translation type="unfinished"></translation> + <translation>窗口 1 启用 OBJ</translation> </message> <message> <location filename="../IOViewer.cpp" line="249"/> <source>Window 1 enable blend</source> - <translation type="unfinished"></translation> + <translation>窗口 1 启用叠加</translation> </message> <message> <location filename="../IOViewer.cpp" line="253"/> <source>Outside window enable BG 0</source> - <translation type="unfinished"></translation> + <translation>外部窗口启用背景 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="254"/> <source>Outside window enable BG 1</source> - <translation type="unfinished"></translation> + <translation>外部窗口启用背景 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="255"/> <source>Outside window enable BG 2</source> - <translation type="unfinished"></translation> + <translation>外部窗口启用背景 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="256"/> <source>Outside window enable BG 3</source> - <translation type="unfinished"></translation> + <translation>外部窗口启用背景 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="257"/> <source>Outside window enable OBJ</source> - <translation type="unfinished"></translation> + <translation>外部窗口启用 OBJ</translation> </message> <message> <location filename="../IOViewer.cpp" line="258"/> <source>Outside window enable blend</source> - <translation type="unfinished"></translation> + <translation>外部窗口启用叠加</translation> </message> <message> <location filename="../IOViewer.cpp" line="259"/> <source>OBJ window enable BG 0</source> - <translation type="unfinished"></translation> + <translation>OBJ 窗口启用背景 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="260"/> <source>OBJ window enable BG 1</source> - <translation type="unfinished"></translation> + <translation>OBJ 窗口启用背景 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="261"/> <source>OBJ window enable BG 2</source> - <translation type="unfinished"></translation> + <translation>OBJ 窗口启用背景 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="262"/> <source>OBJ window enable BG 3</source> - <translation type="unfinished"></translation> + <translation>OBJ 窗口启用背景 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="263"/> <source>OBJ window enable OBJ</source> - <translation type="unfinished"></translation> + <translation>OBJ 窗口启用 OBJ</translation> </message> <message> <location filename="../IOViewer.cpp" line="264"/> <source>OBJ window enable blend</source> - <translation type="unfinished"></translation> + <translation>OBJ 窗口启用叠加</translation> </message> <message> <location filename="../IOViewer.cpp" line="268"/> <source>Background mosaic size vertical</source> - <translation type="unfinished"></translation> + <translation>背景马赛克垂直大小</translation> </message> <message> <location filename="../IOViewer.cpp" line="269"/> <source>Background mosaic size horizontal</source> - <translation type="unfinished"></translation> + <translation>背景马赛克水平大小</translation> </message> <message> <location filename="../IOViewer.cpp" line="270"/> <source>Object mosaic size vertical</source> - <translation type="unfinished"></translation> + <translation>对象马赛克垂直大小</translation> </message> <message> <location filename="../IOViewer.cpp" line="271"/> <source>Object mosaic size horizontal</source> - <translation type="unfinished"></translation> + <translation>对象马赛克水平大小</translation> </message> <message> <location filename="../IOViewer.cpp" line="277"/> <source>BG 0 target 1</source> - <translation type="unfinished"></translation> + <translation>背景 0 目标 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="278"/> <source>BG 1 target 1</source> - <translation type="unfinished"></translation> + <translation>背景 1 目标 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="279"/> <source>BG 2 target 1</source> - <translation type="unfinished"></translation> + <translation>背景 2 目标 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="280"/> <source>BG 3 target 1</source> - <translation type="unfinished"></translation> + <translation>背景 3 目标 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="281"/> <source>OBJ target 1</source> - <translation type="unfinished"></translation> + <translation>OBJ 目标 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="282"/> <source>Backdrop target 1</source> - <translation type="unfinished"></translation> + <translation>背景目标 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="283"/> <source>Blend mode</source> - <translation type="unfinished"></translation> + <translation>叠加模式</translation> </message> <message> <location filename="../IOViewer.cpp" line="284"/> <source>Disabled</source> - <translation>禁用</translation> + <translation>已禁用</translation> </message> <message> <location filename="../IOViewer.cpp" line="285"/> <source>Additive blending</source> - <translation type="unfinished"></translation> + <translation>加性叠加</translation> </message> <message> <location filename="../IOViewer.cpp" line="286"/> <source>Brighten</source> - <translation type="unfinished"></translation> + <translation>增加亮度</translation> </message> <message> <location filename="../IOViewer.cpp" line="287"/> <source>Darken</source> - <translation type="unfinished"></translation> + <translation>降低亮度</translation> </message> <message> <location filename="../IOViewer.cpp" line="289"/> <source>BG 0 target 2</source> - <translation type="unfinished"></translation> + <translation>背景 0 目标 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="290"/> <source>BG 1 target 2</source> - <translation type="unfinished"></translation> + <translation>背景 1 目标 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="291"/> <source>BG 2 target 2</source> - <translation type="unfinished"></translation> + <translation>背景 2 目标 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="292"/> <source>BG 3 target 2</source> - <translation type="unfinished"></translation> + <translation>背景 3 目标 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="293"/> <source>OBJ target 2</source> - <translation type="unfinished"></translation> + <translation>OBJ 目标 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="294"/> <source>Backdrop target 2</source> - <translation type="unfinished"></translation> + <translation>背景目标 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="298"/> <source>Blend A (target 1)</source> - <translation type="unfinished"></translation> + <translation>叠加 A (目标 1)</translation> </message> <message> <location filename="../IOViewer.cpp" line="299"/> <source>Blend B (target 2)</source> - <translation type="unfinished"></translation> + <translation>叠加 B (目标 2)</translation> </message> <message> <location filename="../IOViewer.cpp" line="303"/> <source>Blend Y</source> - <translation type="unfinished"></translation> + <translation>叠加 Y</translation> </message> <message> <location filename="../IOViewer.cpp" line="317"/> <source>Sweep shifts</source> - <translation type="unfinished"></translation> + <translation>扫描 shifts</translation> </message> <message> <location filename="../IOViewer.cpp" line="318"/> <source>Sweep subtract</source> - <translation type="unfinished"></translation> + <translation>扫描 subtract</translation> </message> <message> <location filename="../IOViewer.cpp" line="319"/> <source>Sweep time (in 1/128s)</source> - <translation type="unfinished"></translation> + <translation>扫描时间 (1/128秒)</translation> </message> <message> <location filename="../IOViewer.cpp" line="323"/>@@ -1900,27 +1984,27 @@ <location filename="../IOViewer.cpp" line="339"/>
<location filename="../IOViewer.cpp" line="363"/> <location filename="../IOViewer.cpp" line="385"/> <source>Sound length</source> - <translation type="unfinished"></translation> + <translation>声音长度</translation> </message> <message> <location filename="../IOViewer.cpp" line="324"/> <location filename="../IOViewer.cpp" line="340"/> <source>Duty cycle</source> - <translation type="unfinished"></translation> + <translation>占空比</translation> </message> <message> <location filename="../IOViewer.cpp" line="325"/> <location filename="../IOViewer.cpp" line="341"/> <location filename="../IOViewer.cpp" line="386"/> <source>Envelope step time</source> - <translation type="unfinished"></translation> + <translation>包络步进时间</translation> </message> <message> <location filename="../IOViewer.cpp" line="326"/> <location filename="../IOViewer.cpp" line="342"/> <location filename="../IOViewer.cpp" line="387"/> <source>Envelope increase</source> - <translation type="unfinished"></translation> + <translation>增加包络</translation> </message> <message> <location filename="../IOViewer.cpp" line="327"/>@@ -1942,7 +2026,7 @@ <location filename="../IOViewer.cpp" line="350"/>
<location filename="../IOViewer.cpp" line="378"/> <location filename="../IOViewer.cpp" line="400"/> <source>Timed</source> - <translation type="unfinished"></translation> + <translation>已时控</translation> </message> <message> <location filename="../IOViewer.cpp" line="333"/>@@ -1955,45 +2039,45 @@ </message>
<message> <location filename="../IOViewer.cpp" line="357"/> <source>Double-size wave table</source> - <translation type="unfinished"></translation> + <translation>双尺寸波形表</translation> </message> <message> <location filename="../IOViewer.cpp" line="358"/> <source>Active wave table</source> - <translation type="unfinished"></translation> + <translation>激活波形表</translation> </message> <message> <location filename="../IOViewer.cpp" line="359"/> <source>Enable channel 3</source> - <translation type="unfinished"></translation> + <translation>启用通道 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="364"/> <source>Volume</source> - <translation type="unfinished"></translation> + <translation>音量</translation> </message> <message> <location filename="../IOViewer.cpp" line="365"/> <source>0%</source> - <translation type="unfinished"></translation> + <translation>0%</translation> </message> <message> <location filename="../IOViewer.cpp" line="366"/> <location filename="../IOViewer.cpp" line="423"/> <source>100%</source> - <translation type="unfinished"></translation> + <translation>100%</translation> </message> <message> <location filename="../IOViewer.cpp" line="367"/> <location filename="../IOViewer.cpp" line="422"/> <source>50%</source> - <translation type="unfinished"></translation> + <translation>50%</translation> </message> <message> <location filename="../IOViewer.cpp" line="368"/> <location filename="../IOViewer.cpp" line="421"/> <source>25%</source> - <translation type="unfinished"></translation> + <translation>25%</translation> </message> <message> <location filename="../IOViewer.cpp" line="369"/>@@ -2001,118 +2085,118 @@ <location filename="../IOViewer.cpp" line="370"/>
<location filename="../IOViewer.cpp" line="371"/> <location filename="../IOViewer.cpp" line="372"/> <source>75%</source> - <translation type="unfinished"></translation> + <translation>75%</translation> </message> <message> <location filename="../IOViewer.cpp" line="394"/> <source>Clock divider</source> - <translation type="unfinished"></translation> + <translation>时钟分频器</translation> </message> <message> <location filename="../IOViewer.cpp" line="395"/> <source>Register stages</source> - <translation type="unfinished"></translation> + <translation>寄存器阶段</translation> </message> <message> <location filename="../IOViewer.cpp" line="396"/> <source>15</source> - <translation type="unfinished"></translation> + <translation>15</translation> </message> <message> <location filename="../IOViewer.cpp" line="397"/> <source>7</source> - <translation type="unfinished"></translation> + <translation>7</translation> </message> <message> <location filename="../IOViewer.cpp" line="399"/> <source>Shifter frequency</source> - <translation type="unfinished"></translation> + <translation>移位器频率</translation> </message> <message> <location filename="../IOViewer.cpp" line="407"/> <source>PSG volume right</source> - <translation type="unfinished"></translation> + <translation>PSG 右侧音量</translation> </message> <message> <location filename="../IOViewer.cpp" line="408"/> <source>PSG volume left</source> - <translation type="unfinished"></translation> + <translation>PSG 左侧音量</translation> </message> <message> <location filename="../IOViewer.cpp" line="409"/> <source>Enable channel 1 right</source> - <translation type="unfinished"></translation> + <translation>启用右侧通道 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="410"/> <source>Enable channel 2 right</source> - <translation type="unfinished"></translation> + <translation>启用右侧通道 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="411"/> <source>Enable channel 3 right</source> - <translation type="unfinished"></translation> + <translation>启用右侧通道 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="412"/> <source>Enable channel 4 right</source> - <translation type="unfinished"></translation> + <translation>启用右侧通道 4</translation> </message> <message> <location filename="../IOViewer.cpp" line="413"/> <source>Enable channel 1 left</source> - <translation type="unfinished"></translation> + <translation>启用左侧通道 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="414"/> <source>Enable channel 2 left</source> - <translation type="unfinished"></translation> + <translation>启用左侧通道 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="415"/> <source>Enable channel 3 left</source> - <translation type="unfinished"></translation> + <translation>启用左侧通道 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="416"/> <source>Enable channel 4 left</source> - <translation type="unfinished"></translation> + <translation>启用左侧通道 4</translation> </message> <message> <location filename="../IOViewer.cpp" line="420"/> <source>PSG master volume</source> - <translation type="unfinished"></translation> + <translation>PSG 主音量</translation> </message> <message> <location filename="../IOViewer.cpp" line="426"/> <source>Loud channel A</source> - <translation type="unfinished"></translation> + <translation>响音通道 A</translation> </message> <message> <location filename="../IOViewer.cpp" line="427"/> <source>Loud channel B</source> - <translation type="unfinished"></translation> + <translation>响音通道 B</translation> </message> <message> <location filename="../IOViewer.cpp" line="428"/> <source>Enable channel A right</source> - <translation type="unfinished"></translation> + <translation>启用右侧通道 A</translation> </message> <message> <location filename="../IOViewer.cpp" line="429"/> <source>Enable channel A left</source> - <translation type="unfinished"></translation> + <translation>启用右侧通道 A</translation> </message> <message> <location filename="../IOViewer.cpp" line="430"/> <source>Channel A timer</source> - <translation type="unfinished"></translation> + <translation>通道 A 时控器</translation> </message> <message> <location filename="../IOViewer.cpp" line="431"/> <location filename="../IOViewer.cpp" line="438"/> <source>0</source> - <translation type="unfinished"></translation> + <translation>0</translation> </message> <message> <location filename="../IOViewer.cpp" line="432"/>@@ -2125,52 +2209,52 @@ <location filename="../IOViewer.cpp" line="987"/>
<location filename="../IOViewer.cpp" line="997"/> <location filename="../IOViewer.cpp" line="1007"/> <source>1</source> - <translation type="unfinished"></translation> + <translation>1</translation> </message> <message> <location filename="../IOViewer.cpp" line="434"/> <source>Channel A reset</source> - <translation type="unfinished"></translation> + <translation>通道 A 重置</translation> </message> <message> <location filename="../IOViewer.cpp" line="435"/> <source>Enable channel B right</source> - <translation type="unfinished"></translation> + <translation>启用右侧通道 B</translation> </message> <message> <location filename="../IOViewer.cpp" line="436"/> <source>Enable channel B left</source> - <translation type="unfinished"></translation> + <translation>启用左侧通道 B</translation> </message> <message> <location filename="../IOViewer.cpp" line="437"/> <source>Channel B timer</source> - <translation type="unfinished"></translation> + <translation>通道 B 时控器</translation> </message> <message> <location filename="../IOViewer.cpp" line="441"/> <source>Channel B reset</source> - <translation type="unfinished"></translation> + <translation>通道 B 重置</translation> </message> <message> <location filename="../IOViewer.cpp" line="445"/> <source>Active channel 1</source> - <translation type="unfinished"></translation> + <translation>激活通道 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="446"/> <source>Active channel 2</source> - <translation type="unfinished"></translation> + <translation>激活通道 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="447"/> <source>Active channel 3</source> - <translation type="unfinished"></translation> + <translation>激活通道 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="448"/> <source>Active channel 4</source> - <translation type="unfinished"></translation> + <translation>激活通道 4</translation> </message> <message> <location filename="../IOViewer.cpp" line="449"/>@@ -2180,7 +2264,7 @@ </message>
<message> <location filename="../IOViewer.cpp" line="455"/> <source>Bias</source> - <translation type="unfinished"></translation> + <translation>偏差</translation> </message> <message> <location filename="../IOViewer.cpp" line="456"/>@@ -2229,7 +2313,7 @@ <location filename="../IOViewer.cpp" line="533"/>
<location filename="../IOViewer.cpp" line="537"/> <location filename="../IOViewer.cpp" line="538"/> <source>Sample</source> - <translation type="unfinished"></translation> + <translation>采样</translation> </message> <message> <location filename="../IOViewer.cpp" line="550"/>@@ -2241,7 +2325,7 @@ <location filename="../IOViewer.cpp" line="648"/>
<location filename="../IOViewer.cpp" line="685"/> <location filename="../IOViewer.cpp" line="693"/> <source>Address (bottom)</source> - <translation type="unfinished"></translation> + <translation>地址 (低位)</translation> </message> <message> <location filename="../IOViewer.cpp" line="554"/>@@ -2253,7 +2337,7 @@ <location filename="../IOViewer.cpp" line="652"/>
<location filename="../IOViewer.cpp" line="689"/> <location filename="../IOViewer.cpp" line="697"/> <source>Address (top)</source> - <translation type="unfinished"></translation> + <translation>地址 (高位)</translation> </message> <message> <location filename="../IOViewer.cpp" line="566"/>@@ -2261,7 +2345,7 @@ <location filename="../IOViewer.cpp" line="611"/>
<location filename="../IOViewer.cpp" line="656"/> <location filename="../IOViewer.cpp" line="701"/> <source>Word count</source> - <translation type="unfinished"></translation> + <translation>字数</translation> </message> <message> <location filename="../IOViewer.cpp" line="570"/>@@ -2269,7 +2353,7 @@ <location filename="../IOViewer.cpp" line="615"/>
<location filename="../IOViewer.cpp" line="660"/> <location filename="../IOViewer.cpp" line="705"/> <source>Destination offset</source> - <translation type="unfinished"></translation> + <translation>目标偏移</translation> </message> <message> <location filename="../IOViewer.cpp" line="571"/>@@ -2281,7 +2365,7 @@ <location filename="../IOViewer.cpp" line="667"/>
<location filename="../IOViewer.cpp" line="706"/> <location filename="../IOViewer.cpp" line="712"/> <source>Increment</source> - <translation type="unfinished"></translation> + <translation>增量</translation> </message> <message> <location filename="../IOViewer.cpp" line="572"/>@@ -2293,7 +2377,7 @@ <location filename="../IOViewer.cpp" line="668"/>
<location filename="../IOViewer.cpp" line="707"/> <location filename="../IOViewer.cpp" line="713"/> <source>Decrement</source> - <translation type="unfinished"></translation> + <translation>减量</translation> </message> <message> <location filename="../IOViewer.cpp" line="573"/>@@ -2305,7 +2389,7 @@ <location filename="../IOViewer.cpp" line="669"/>
<location filename="../IOViewer.cpp" line="708"/> <location filename="../IOViewer.cpp" line="714"/> <source>Fixed</source> - <translation type="unfinished"></translation> + <translation>固定</translation> </message> <message> <location filename="../IOViewer.cpp" line="574"/>@@ -2313,7 +2397,7 @@ <location filename="../IOViewer.cpp" line="619"/>
<location filename="../IOViewer.cpp" line="664"/> <location filename="../IOViewer.cpp" line="709"/> <source>Increment and reload</source> - <translation type="unfinished"></translation> + <translation>增量并重新加载</translation> </message> <message> <location filename="../IOViewer.cpp" line="576"/>@@ -2321,7 +2405,7 @@ <location filename="../IOViewer.cpp" line="621"/>
<location filename="../IOViewer.cpp" line="666"/> <location filename="../IOViewer.cpp" line="711"/> <source>Source offset</source> - <translation type="unfinished"></translation> + <translation>源偏移</translation> </message> <message> <location filename="../IOViewer.cpp" line="582"/>@@ -2329,7 +2413,7 @@ <location filename="../IOViewer.cpp" line="627"/>
<location filename="../IOViewer.cpp" line="672"/> <location filename="../IOViewer.cpp" line="718"/> <source>Repeat</source> - <translation type="unfinished"></translation> + <translation>重复</translation> </message> <message> <location filename="../IOViewer.cpp" line="583"/>@@ -2337,7 +2421,7 @@ <location filename="../IOViewer.cpp" line="628"/>
<location filename="../IOViewer.cpp" line="673"/> <location filename="../IOViewer.cpp" line="719"/> <source>32-bit</source> - <translation type="unfinished"></translation> + <translation>32 位</translation> </message> <message> <location filename="../IOViewer.cpp" line="584"/>@@ -2345,7 +2429,7 @@ <location filename="../IOViewer.cpp" line="629"/>
<location filename="../IOViewer.cpp" line="674"/> <location filename="../IOViewer.cpp" line="720"/> <source>Start timing</source> - <translation type="unfinished"></translation> + <translation>开始定时</translation> </message> <message> <location filename="../IOViewer.cpp" line="585"/>@@ -2353,7 +2437,7 @@ <location filename="../IOViewer.cpp" line="630"/>
<location filename="../IOViewer.cpp" line="675"/> <location filename="../IOViewer.cpp" line="721"/> <source>Immediate</source> - <translation type="unfinished"></translation> + <translation>立即</translation> </message> <message> <location filename="../IOViewer.cpp" line="586"/>@@ -2363,7 +2447,7 @@ <location filename="../IOViewer.cpp" line="722"/>
<location filename="../IOViewer.cpp" line="939"/> <location filename="../IOViewer.cpp" line="956"/> <source>VBlank</source> - <translation type="unfinished"></translation> + <translation>VBlank</translation> </message> <message> <location filename="../IOViewer.cpp" line="587"/>@@ -2373,7 +2457,7 @@ <location filename="../IOViewer.cpp" line="723"/>
<location filename="../IOViewer.cpp" line="940"/> <location filename="../IOViewer.cpp" line="957"/> <source>HBlank</source> - <translation type="unfinished"></translation> + <translation>HBlank</translation> </message> <message> <location filename="../IOViewer.cpp" line="590"/>@@ -2386,7 +2470,7 @@ <location filename="../IOViewer.cpp" line="805"/>
<location filename="../IOViewer.cpp" line="821"/> <location filename="../IOViewer.cpp" line="881"/> <source>IRQ</source> - <translation type="unfinished"></translation> + <translation>IRQ</translation> </message> <message> <location filename="../IOViewer.cpp" line="591"/>@@ -2398,24 +2482,24 @@ <location filename="../IOViewer.cpp" line="790"/>
<location filename="../IOViewer.cpp" line="806"/> <location filename="../IOViewer.cpp" line="822"/> <source>Enable</source> - <translation type="unfinished"></translation> + <translation>启用</translation> </message> <message> <location filename="../IOViewer.cpp" line="633"/> <location filename="../IOViewer.cpp" line="678"/> <location filename="../IOViewer.cpp" line="724"/> <source>Audio FIFO</source> - <translation type="unfinished"></translation> + <translation>音频 FIFO</translation> </message> <message> <location filename="../IOViewer.cpp" line="715"/> <source>Video Capture</source> - <translation type="unfinished"></translation> + <translation>视频截取</translation> </message> <message> <location filename="../IOViewer.cpp" line="717"/> <source>DRQ</source> - <translation type="unfinished"></translation> + <translation>DRQ</translation> </message> <message> <location filename="../IOViewer.cpp" line="763"/>@@ -2423,7 +2507,7 @@ <location filename="../IOViewer.cpp" line="778"/>
<location filename="../IOViewer.cpp" line="794"/> <location filename="../IOViewer.cpp" line="810"/> <source>Value</source> - <translation type="unfinished"></translation> + <translation>值</translation> </message> <message> <location filename="../IOViewer.cpp" line="767"/>@@ -2431,7 +2515,7 @@ <location filename="../IOViewer.cpp" line="782"/>
<location filename="../IOViewer.cpp" line="798"/> <location filename="../IOViewer.cpp" line="814"/> <source>Scale</source> - <translation type="unfinished"></translation> + <translation>比例</translation> </message> <message> <location filename="../IOViewer.cpp" line="769"/>@@ -2439,7 +2523,7 @@ <location filename="../IOViewer.cpp" line="784"/>
<location filename="../IOViewer.cpp" line="800"/> <location filename="../IOViewer.cpp" line="816"/> <source>1/64</source> - <translation type="unfinished"></translation> + <translation>1/64</translation> </message> <message> <location filename="../IOViewer.cpp" line="770"/>@@ -2447,7 +2531,7 @@ <location filename="../IOViewer.cpp" line="785"/>
<location filename="../IOViewer.cpp" line="801"/> <location filename="../IOViewer.cpp" line="817"/> <source>1/256</source> - <translation type="unfinished"></translation> + <translation>1/256</translation> </message> <message> <location filename="../IOViewer.cpp" line="771"/>@@ -2455,38 +2539,38 @@ <location filename="../IOViewer.cpp" line="786"/>
<location filename="../IOViewer.cpp" line="802"/> <location filename="../IOViewer.cpp" line="818"/> <source>1/1024</source> - <translation type="unfinished"></translation> + <translation>1/1024</translation> </message> <message> <location filename="../IOViewer.cpp" line="788"/> <location filename="../IOViewer.cpp" line="804"/> <location filename="../IOViewer.cpp" line="820"/> <source>Cascade</source> - <translation type="unfinished"></translation> + <translation>级联</translation> </message> <message> <location filename="../IOViewer.cpp" line="858"/> <location filename="../IOViewer.cpp" line="871"/> <source>A</source> - <translation type="unfinished"></translation> + <translation>A</translation> </message> <message> <location filename="../IOViewer.cpp" line="859"/> <location filename="../IOViewer.cpp" line="872"/> <source>B</source> - <translation type="unfinished"></translation> + <translation>B</translation> </message> <message> <location filename="../IOViewer.cpp" line="860"/> <location filename="../IOViewer.cpp" line="873"/> <source>Select</source> - <translation>选择</translation> + <translation>Select</translation> </message> <message> <location filename="../IOViewer.cpp" line="861"/> <location filename="../IOViewer.cpp" line="874"/> <source>Start</source> - <translation>开始</translation> + <translation>Start</translation> </message> <message> <location filename="../IOViewer.cpp" line="862"/>@@ -2516,115 +2600,115 @@ <message>
<location filename="../IOViewer.cpp" line="866"/> <location filename="../IOViewer.cpp" line="879"/> <source>R</source> - <translation type="unfinished"></translation> + <translation>R</translation> </message> <message> <location filename="../IOViewer.cpp" line="867"/> <location filename="../IOViewer.cpp" line="880"/> <source>L</source> - <translation type="unfinished"></translation> + <translation>L</translation> </message> <message> <location filename="../IOViewer.cpp" line="882"/> <source>Condition</source> - <translation type="unfinished"></translation> + <translation>状态</translation> </message> <message> <location filename="../IOViewer.cpp" line="886"/> <source>SC</source> - <translation type="unfinished"></translation> + <translation>SC</translation> </message> <message> <location filename="../IOViewer.cpp" line="887"/> <source>SD</source> - <translation type="unfinished"></translation> + <translation>SD</translation> </message> <message> <location filename="../IOViewer.cpp" line="888"/> <source>SI</source> - <translation type="unfinished"></translation> + <translation>SI</translation> </message> <message> <location filename="../IOViewer.cpp" line="889"/> <source>SO</source> - <translation type="unfinished"></translation> + <translation>SO</translation> </message> <message> <location filename="../IOViewer.cpp" line="941"/> <location filename="../IOViewer.cpp" line="958"/> <source>VCounter</source> - <translation type="unfinished"></translation> + <translation>VCounter</translation> </message> <message> <location filename="../IOViewer.cpp" line="942"/> <location filename="../IOViewer.cpp" line="959"/> <source>Timer 0</source> - <translation type="unfinished"></translation> + <translation>Timer 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="943"/> <location filename="../IOViewer.cpp" line="960"/> <source>Timer 1</source> - <translation type="unfinished"></translation> + <translation>Timer 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="944"/> <location filename="../IOViewer.cpp" line="961"/> <source>Timer 2</source> - <translation type="unfinished"></translation> + <translation>Timer 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="945"/> <location filename="../IOViewer.cpp" line="962"/> <source>Timer 3</source> - <translation type="unfinished"></translation> + <translation>Timer 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="946"/> <location filename="../IOViewer.cpp" line="963"/> <source>SIO</source> - <translation type="unfinished"></translation> + <translation>SIO</translation> </message> <message> <location filename="../IOViewer.cpp" line="947"/> <location filename="../IOViewer.cpp" line="964"/> <source>DMA 0</source> - <translation type="unfinished"></translation> + <translation>DMA 0</translation> </message> <message> <location filename="../IOViewer.cpp" line="948"/> <location filename="../IOViewer.cpp" line="965"/> <source>DMA 1</source> - <translation type="unfinished"></translation> + <translation>DMA 1</translation> </message> <message> <location filename="../IOViewer.cpp" line="949"/> <location filename="../IOViewer.cpp" line="966"/> <source>DMA 2</source> - <translation type="unfinished"></translation> + <translation>DMA 2</translation> </message> <message> <location filename="../IOViewer.cpp" line="950"/> <location filename="../IOViewer.cpp" line="967"/> <source>DMA 3</source> - <translation type="unfinished"></translation> + <translation>DMA 3</translation> </message> <message> <location filename="../IOViewer.cpp" line="951"/> <location filename="../IOViewer.cpp" line="968"/> <source>Keypad</source> - <translation type="unfinished"></translation> + <translation>键盘</translation> </message> <message> <location filename="../IOViewer.cpp" line="952"/> <location filename="../IOViewer.cpp" line="969"/> <source>Gamepak</source> - <translation type="unfinished"></translation> + <translation>游戏卡带</translation> </message> <message> <location filename="../IOViewer.cpp" line="973"/> <source>SRAM wait</source> - <translation type="unfinished"></translation> + <translation>SRAM 等待</translation> </message> <message> <location filename="../IOViewer.cpp" line="974"/>@@ -2633,7 +2717,7 @@ <location filename="../IOViewer.cpp" line="990"/>
<location filename="../IOViewer.cpp" line="996"/> <location filename="../IOViewer.cpp" line="1000"/> <source>4</source> - <translation type="unfinished"></translation> + <translation>4</translation> </message> <message> <location filename="../IOViewer.cpp" line="975"/>@@ -2641,7 +2725,7 @@ <location filename="../IOViewer.cpp" line="981"/>
<location filename="../IOViewer.cpp" line="991"/> <location filename="../IOViewer.cpp" line="1001"/> <source>3</source> - <translation type="unfinished"></translation> + <translation>3</translation> </message> <message> <location filename="../IOViewer.cpp" line="976"/>@@ -2650,7 +2734,7 @@ <location filename="../IOViewer.cpp" line="986"/>
<location filename="../IOViewer.cpp" line="992"/> <location filename="../IOViewer.cpp" line="1002"/> <source>2</source> - <translation type="unfinished"></translation> + <translation>2</translation> </message> <message> <location filename="../IOViewer.cpp" line="977"/>@@ -2659,42 +2743,42 @@ <location filename="../IOViewer.cpp" line="993"/>
<location filename="../IOViewer.cpp" line="1003"/> <location filename="../IOViewer.cpp" line="1006"/> <source>8</source> - <translation type="unfinished"></translation> + <translation>8</translation> </message> <message> <location filename="../IOViewer.cpp" line="979"/> <source>Cart 0 non-sequential</source> - <translation type="unfinished"></translation> + <translation>Cart 0 (非顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="985"/> <source>Cart 0 sequential</source> - <translation type="unfinished"></translation> + <translation>Cart 0 (顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="989"/> <source>Cart 1 non-sequential</source> - <translation type="unfinished"></translation> + <translation>Cart 1 (非顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="995"/> <source>Cart 1 sequential</source> - <translation type="unfinished"></translation> + <translation>Cart 1 (顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="999"/> <source>Cart 2 non-sequential</source> - <translation type="unfinished"></translation> + <translation>Cart 2 (非顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="1005"/> <source>Cart 2 sequential</source> - <translation type="unfinished"></translation> + <translation>Cart 2 (顺序)</translation> </message> <message> <location filename="../IOViewer.cpp" line="1009"/> <source>PHI terminal</source> - <translation type="unfinished"></translation> + <translation>PHI 终端</translation> </message> <message> <location filename="../IOViewer.cpp" line="1010"/>@@ -2704,27 +2788,27 @@ </message>
<message> <location filename="../IOViewer.cpp" line="1011"/> <source>4.19MHz</source> - <translation type="unfinished"></translation> + <translation>4.19MHz</translation> </message> <message> <location filename="../IOViewer.cpp" line="1012"/> <source>8.38MHz</source> - <translation type="unfinished"></translation> + <translation>8.38MHz</translation> </message> <message> <location filename="../IOViewer.cpp" line="1013"/> <source>16.78MHz</source> - <translation type="unfinished"></translation> + <translation>16.78MHz</translation> </message> <message> <location filename="../IOViewer.cpp" line="1015"/> <source>Gamepak prefetch</source> - <translation type="unfinished"></translation> + <translation>游戏卡带预读取</translation> </message> <message> <location filename="../IOViewer.cpp" line="1021"/> <source>Enable IRQs</source> - <translation type="unfinished"></translation> + <translation>启用 IRQ</translation> </message> </context> <context>@@ -2733,73 +2817,122 @@ <message>
<location filename="../KeyEditor.cpp" line="33"/> <location filename="../KeyEditor.cpp" line="207"/> <source>---</source> - <translation></translation> + <translation>---</translation> </message> </context> <context> <name>QGBA::LoadSaveState</name> <message> - <location filename="../LoadSaveState.cpp" line="71"/> + <location filename="../LoadSaveState.cpp" line="73"/> <source>Load State</source> - <translation>载入快照</translation> + <translation>载入即时存档</translation> </message> <message> - <location filename="../LoadSaveState.cpp" line="71"/> + <location filename="../LoadSaveState.cpp" line="73"/> <source>Save State</source> - <translation>存档</translation> + <translation>即时存档</translation> </message> <message> - <location filename="../LoadSaveState.cpp" line="180"/> + <location filename="../LoadSaveState.cpp" line="182"/> <source>Empty</source> - <translation></translation> + <translation>空</translation> </message> <message> - <location filename="../LoadSaveState.cpp" line="189"/> + <location filename="../LoadSaveState.cpp" line="191"/> <source>Corrupted</source> - <translation></translation> + <translation>已损坏</translation> </message> <message> - <location filename="../LoadSaveState.cpp" line="218"/> + <location filename="../LoadSaveState.cpp" line="220"/> <source>Slot %1</source> - <translation></translation> + <translation>插槽 %1</translation> + </message> +</context> +<context> + <name>QGBA::LogConfigModel</name> + <message> + <location filename="../LogConfigModel.cpp" line="79"/> + <location filename="../LogConfigModel.cpp" line="100"/> + <source>Default</source> + <translation>默认</translation> + </message> + <message> + <location filename="../LogConfigModel.cpp" line="81"/> + <source>Fatal</source> + <translation>致命错误</translation> + </message> + <message> + <location filename="../LogConfigModel.cpp" line="83"/> + <source>Error</source> + <translation>错误</translation> + </message> + <message> + <location filename="../LogConfigModel.cpp" line="85"/> + <source>Warning</source> + <translation>警告</translation> + </message> + <message> + <location filename="../LogConfigModel.cpp" line="87"/> + <source>Info</source> + <translation>信息</translation> + </message> + <message> + <location filename="../LogConfigModel.cpp" line="89"/> + <source>Debug</source> + <translation>调试</translation> + </message> + <message> + <location filename="../LogConfigModel.cpp" line="91"/> + <source>Stub</source> + <translation>桩位</translation> + </message> + <message> + <location filename="../LogConfigModel.cpp" line="93"/> + <source>Game Error</source> + <translation>游戏错误</translation> </message> </context> <context> <name>QGBA::LogController</name> <message> - <location filename="../LogController.cpp" line="65"/> + <location filename="../LogController.cpp" line="58"/> + <source>[%1] %2: %3</source> + <translation>[%1] %2: %3</translation> + </message> + <message> + <location filename="../LogController.cpp" line="133"/> <source>DEBUG</source> - <translation></translation> + <translation>DEBUG</translation> </message> <message> - <location filename="../LogController.cpp" line="67"/> + <location filename="../LogController.cpp" line="135"/> <source>STUB</source> - <translation></translation> + <translation>STUB</translation> </message> <message> - <location filename="../LogController.cpp" line="69"/> + <location filename="../LogController.cpp" line="137"/> <source>INFO</source> - <translation></translation> + <translation>INFO</translation> </message> <message> - <location filename="../LogController.cpp" line="71"/> + <location filename="../LogController.cpp" line="139"/> <source>WARN</source> - <translation></translation> + <translation>WARN</translation> </message> <message> - <location filename="../LogController.cpp" line="73"/> + <location filename="../LogController.cpp" line="141"/> <source>ERROR</source> - <translation></translation> + <translation>ERROR</translation> </message> <message> - <location filename="../LogController.cpp" line="75"/> + <location filename="../LogController.cpp" line="143"/> <source>FATAL</source> - <translation></translation> + <translation>FATAL</translation> </message> <message> - <location filename="../LogController.cpp" line="77"/> + <location filename="../LogController.cpp" line="145"/> <source>GAME ERROR</source> - <translation></translation> + <translation>GAME ERROR</translation> </message> </context> <context>@@ -2807,47 +2940,47 @@ <name>QGBA::MapView</name>
<message> <location filename="../MapView.cpp" line="84"/> <source>Map Addr.</source> - <translation></translation> + <translation>映射地址</translation> </message> <message> <location filename="../MapView.cpp" line="85"/> <source>Mirror</source> - <translation></translation> + <translation>镜像</translation> </message> <message> <location filename="../MapView.cpp" line="113"/> <source>None</source> - <translation></translation> + <translation>无</translation> </message> <message> <location filename="../MapView.cpp" line="115"/> <source>Both</source> - <translation></translation> + <translation>两者</translation> </message> <message> <location filename="../MapView.cpp" line="117"/> <source>Horizontal</source> - <translation></translation> + <translation>水平</translation> </message> <message> <location filename="../MapView.cpp" line="119"/> <source>Vertical</source> - <translation></translation> + <translation>垂直</translation> </message> <message> <location filename="../MapView.cpp" line="172"/> <source>Export map</source> - <translation></translation> + <translation>导出映射</translation> </message> <message> <location filename="../MapView.cpp" line="173"/> <source>Portable Network Graphics (*.png)</source> - <translation></translation> + <translation>便携式网络图形 (*.png)</translation> </message> <message> <location filename="../MapView.cpp" line="176"/> <source>Failed to open output PNG file: %1</source> - <translation>输出PNG文件开启失败: %1</translation> + <translation>打开输出 PNG 文件失败: %1</translation> </message> </context> <context>@@ -2874,7 +3007,6 @@ <translation>载入</translation>
</message> <message> <location filename="../MemoryModel.cpp" line="91"/> - <location filename="../MemoryModel.cpp" line="156"/> <source>All</source> <translation>全部</translation> </message>@@ -2884,34 +3016,34 @@ <source>Load TBL</source>
<translation>载入 TBL</translation> </message> <message> - <location filename="../MemoryModel.cpp" line="196"/> + <location filename="../MemoryModel.cpp" line="190"/> <source>Save selected memory</source> <translation>保存所选内存</translation> </message> <message> - <location filename="../MemoryModel.cpp" line="202"/> + <location filename="../MemoryModel.cpp" line="196"/> <source>Failed to open output file: %1</source> - <translation>无法打开输出文件 : %1</translation> + <translation>无法打开输出文件: %1</translation> </message> <message> - <location filename="../MemoryModel.cpp" line="210"/> + <location filename="../MemoryModel.cpp" line="204"/> <source>Load memory</source> <translation>载入内存</translation> </message> <message> - <location filename="../MemoryModel.cpp" line="216"/> + <location filename="../MemoryModel.cpp" line="210"/> <source>Failed to open input file: %1</source> - <translation>无法打开输入文件 : %1</translation> + <translation>无法打开输入文件: %1</translation> </message> <message> - <location filename="../MemoryModel.cpp" line="332"/> + <location filename="../MemoryModel.cpp" line="326"/> <source>TBL</source> - <translation></translation> + <translation>TBL</translation> </message> <message> - <location filename="../MemoryModel.cpp" line="332"/> + <location filename="../MemoryModel.cpp" line="326"/> <source>ISO-8859-1</source> - <translation></translation> + <translation>ISO-8859-1</translation> </message> </context> <context>@@ -2919,77 +3051,77 @@ <name>QGBA::MemorySearch</name>
<message> <location filename="../MemorySearch.cpp" line="200"/> <source> (%0/%1×)</source> - <translation></translation> + <translation> (%0/%1×)</translation> </message> <message> <location filename="../MemorySearch.cpp" line="202"/> <source> (⅟%0×)</source> - <translation></translation> + <translation> (⅟%0×)</translation> </message> <message> <location filename="../MemorySearch.cpp" line="205"/> <source> (%0×)</source> - <translation></translation> + <translation> (%0×)</translation> </message> <message> <location filename="../MemorySearch.cpp" line="209"/> <source>%1 byte%2</source> - <translation></translation> + <translation>%1 字节%2</translation> </message> </context> <context> <name>QGBA::ObjView</name> <message> - <location filename="../ObjView.cpp" line="145"/> - <location filename="../ObjView.cpp" line="239"/> + <location filename="../ObjView.cpp" line="148"/> + <location filename="../ObjView.cpp" line="242"/> <source>0x%0</source> - <translation></translation> + <translation>0x%0</translation> </message> <message> - <location filename="../ObjView.cpp" line="156"/> + <location filename="../ObjView.cpp" line="159"/> <source>Off</source> - <translation></translation> + <translation>关</translation> </message> <message> - <location filename="../ObjView.cpp" line="161"/> + <location filename="../ObjView.cpp" line="164"/> <source>Normal</source> - <translation></translation> + <translation>一般</translation> </message> <message> - <location filename="../ObjView.cpp" line="164"/> + <location filename="../ObjView.cpp" line="167"/> <source>Trans</source> - <translation></translation> + <translation>Trans</translation> </message> <message> - <location filename="../ObjView.cpp" line="167"/> + <location filename="../ObjView.cpp" line="170"/> <source>OBJWIN</source> - <translation></translation> + <translation>OBJWIN</translation> </message> <message> - <location filename="../ObjView.cpp" line="170"/> + <location filename="../ObjView.cpp" line="173"/> <source>Invalid</source> <translation>无效</translation> </message> <message> - <location filename="../ObjView.cpp" line="246"/> - <location filename="../ObjView.cpp" line="247"/> + <location filename="../ObjView.cpp" line="249"/> + <location filename="../ObjView.cpp" line="250"/> <source>N/A</source> - <translation></translation> + <translation>无</translation> </message> <message> - <location filename="../ObjView.cpp" line="253"/> + <location filename="../ObjView.cpp" line="256"/> <source>Export sprite</source> - <translation></translation> + <translation>导出精灵图</translation> </message> <message> - <location filename="../ObjView.cpp" line="254"/> + <location filename="../ObjView.cpp" line="257"/> <source>Portable Network Graphics (*.png)</source> - <translation></translation> + <translation>便携式网络图形 (*.png)</translation> </message> <message> - <location filename="../ObjView.cpp" line="257"/> + <location filename="../ObjView.cpp" line="260"/> <source>Failed to open output PNG file: %1</source> - <translation>无法打开输出的PNG文件: %1</translation> + <translation>无法打开输出的 PNG 文件: %1</translation> </message> </context> <context>@@ -2997,39 +3129,39 @@ <name>QGBA::PaletteView</name>
<message> <location filename="../PaletteView.cpp" line="121"/> <source>#%0</source> - <translation></translation> + <translation>#%0</translation> </message> <message> <location filename="../PaletteView.cpp" line="122"/> <source>0x%0</source> - <translation></translation> + <translation>0x%0</translation> </message> <message> <location filename="../PaletteView.cpp" line="123"/> <source>%0</source> - <translation></translation> + <translation>%0</translation> </message> <message> <location filename="../PaletteView.cpp" line="124"/> <location filename="../PaletteView.cpp" line="125"/> <location filename="../PaletteView.cpp" line="126"/> <source>0x%0 (%1)</source> - <translation></translation> + <translation>0x%0 (%1)</translation> </message> <message> <location filename="../PaletteView.cpp" line="138"/> <source>Export palette</source> - <translation>导出 调色板</translation> + <translation>导出调色板</translation> </message> <message> <location filename="../PaletteView.cpp" line="139"/> <source>Windows PAL (*.pal);;Adobe Color Table (*.act)</source> - <translation></translation> + <translation>Windows PAL (*.pal);;Adobe 颜色表 (*.act)</translation> </message> <message> <location filename="../PaletteView.cpp" line="142"/> <source>Failed to open output palette file: %1</source> - <translation>已输出的调色板文件打开失败: %1</translation> + <translation>打开输出调色板文件失败: %1</translation> </message> </context> <context>@@ -3042,7 +3174,7 @@ </message>
<message> <location filename="../PrinterView.cpp" line="35"/> <source>Portable Network Graphics (*.png)</source> - <translation></translation> + <translation>便携式网络图形 (*.png)</translation> </message> </context> <context>@@ -3060,72 +3192,72 @@ <message>
<location filename="../ROMInfo.cpp" line="53"/> <location filename="../ROMInfo.cpp" line="60"/> <source> bytes</source> - <translation></translation> + <translation> 字节</translation> </message> <message> <location filename="../ROMInfo.cpp" line="79"/> <source>(no database present)</source> - <translation></translation> + <translation>(无现存数据库)</translation> </message> </context> <context> <name>QGBA::SettingsView</name> <message> - <location filename="../SettingsView.cpp" line="130"/> - <location filename="../SettingsView.cpp" line="172"/> + <location filename="../SettingsView.cpp" line="144"/> + <location filename="../SettingsView.cpp" line="187"/> <source>Qt Multimedia</source> - <translation></translation> + <translation>Qt Multimedia</translation> </message> <message> - <location filename="../SettingsView.cpp" line="137"/> + <location filename="../SettingsView.cpp" line="151"/> <source>SDL</source> - <translation></translation> + <translation>SDL</translation> </message> <message> - <location filename="../SettingsView.cpp" line="145"/> + <location filename="../SettingsView.cpp" line="159"/> <source>Software (Qt)</source> - <translation></translation> + <translation>软件渲染 (Qt)</translation> </message> <message> - <location filename="../SettingsView.cpp" line="151"/> + <location filename="../SettingsView.cpp" line="165"/> <source>OpenGL</source> - <translation></translation> + <translation>OpenGL</translation> </message> <message> - <location filename="../SettingsView.cpp" line="158"/> + <location filename="../SettingsView.cpp" line="172"/> <source>OpenGL (force version 1.x)</source> - <translation></translation> + <translation>OpenGL (强制版本 1.x)</translation> </message> <message> - <location filename="../SettingsView.cpp" line="166"/> + <location filename="../SettingsView.cpp" line="180"/> <source>None (Still Image)</source> - <translation></translation> + <translation>无 (静止图像)</translation> </message> <message> - <location filename="../SettingsView.cpp" line="247"/> + <location filename="../SettingsView.cpp" line="271"/> <source>Keyboard</source> <translation>键盘</translation> </message> <message> - <location filename="../SettingsView.cpp" line="256"/> + <location filename="../SettingsView.cpp" line="280"/> <source>Controllers</source> <translation>控制器</translation> </message> <message> - <location filename="../SettingsView.cpp" line="288"/> + <location filename="../SettingsView.cpp" line="324"/> <source>Shortcuts</source> <translation>快捷键</translation> </message> <message> - <location filename="../SettingsView.cpp" line="300"/> - <location filename="../SettingsView.cpp" line="310"/> + <location filename="../SettingsView.cpp" line="336"/> + <location filename="../SettingsView.cpp" line="346"/> <source>Shaders</source> <translation>着色器</translation> </message> <message> - <location filename="../SettingsView.cpp" line="317"/> + <location filename="../SettingsView.cpp" line="353"/> <source>Select BIOS</source> - <translation>选择BIOS</translation> + <translation>选择 BIOS</translation> </message> </context> <context>@@ -3148,7 +3280,7 @@ </message>
<message> <location filename="../ShaderSelector.cpp" line="113"/> <source>by %1</source> - <translation></translation> + <translation>by %1</translation> </message> <message> <location filename="../ShaderSelector.cpp" line="128"/>@@ -3158,7 +3290,7 @@ </message>
<message> <location filename="../ShaderSelector.cpp" line="135"/> <source>Pass %1</source> - <translation>进行 %1</translation> + <translation>Pass %1</translation> </message> </context> <context>@@ -3166,7 +3298,7 @@ <name>QGBA::ShortcutController</name>
<message> <location filename="../ShortcutController.cpp" line="64"/> <source>Action</source> - <translation></translation> + <translation>动作</translation> </message> <message> <location filename="../ShortcutController.cpp" line="66"/>@@ -3182,17 +3314,17 @@ </context>
<context> <name>QGBA::VideoView</name> <message> - <location filename="../VideoView.cpp" line="211"/> + <location filename="../VideoView.cpp" line="212"/> <source>Failed to open output video file: %1</source> - <translation>无法代开输出的视频文件 : %1</translation> + <translation>无法打开输出的视频文件: %1</translation> </message> <message> - <location filename="../VideoView.cpp" line="229"/> + <location filename="../VideoView.cpp" line="230"/> <source>Native (%0x%1)</source> - <translation></translation> + <translation>原生 (%0x%1)</translation> </message> <message> - <location filename="../VideoView.cpp" line="244"/> + <location filename="../VideoView.cpp" line="245"/> <source>Select output file</source> <translation>选取输出文件</translation> </message>@@ -3200,97 +3332,108 @@ </context>
<context> <name>QGBA::Window</name> <message> - <location filename="../Window.cpp" line="274"/> + <location filename="../Window.cpp" line="280"/> <source>Game Boy Advance ROMs (%1)</source> - <translation type="unfinished"></translation> + <translation>Game Boy Advance ROM (%1)</translation> </message> <message> - <location filename="../Window.cpp" line="291"/> + <location filename="../Window.cpp" line="297"/> <source>Game Boy ROMs (%1)</source> - <translation type="unfinished"></translation> + <translation>Game Boy ROM (%1)</translation> </message> <message> - <location filename="../Window.cpp" line="295"/> + <location filename="../Window.cpp" line="301"/> <source>All ROMs (%1)</source> - <translation type="unfinished"></translation> + <translation>所有 ROM (%1)</translation> </message> <message> - <location filename="../Window.cpp" line="296"/> + <location filename="../Window.cpp" line="302"/> <source>%1 Video Logs (*.mvl)</source> <translation>%1 视频日志 (*.mvl)</translation> </message> <message> - <location filename="../Window.cpp" line="311"/> + <location filename="../Window.cpp" line="317"/> <source>Archives (%1)</source> - <translation type="unfinished"></translation> + <translation>压缩文件 (%1)</translation> </message> <message> - <location filename="../Window.cpp" line="316"/> - <location filename="../Window.cpp" line="324"/> - <location filename="../Window.cpp" line="351"/> + <location filename="../Window.cpp" line="322"/> + <location filename="../Window.cpp" line="330"/> + <location filename="../Window.cpp" line="357"/> <source>Select ROM</source> - <translation>选择ROM</translation> + <translation>选择 ROM</translation> </message> <message> - <location filename="../Window.cpp" line="342"/> + <location filename="../Window.cpp" line="348"/> <source>Select folder</source> <translation>选择文件夹</translation> </message> <message> - <location filename="../Window.cpp" line="359"/> + <location filename="../Window.cpp" line="365"/> <source>Game Boy Advance save files (%1)</source> - <translation>Game Boy Advance 保存文件 (%1)</translation> + <translation>Game Boy Advance 存档文件 (%1)</translation> </message> <message> - <location filename="../Window.cpp" line="360"/> - <location filename="../Window.cpp" line="405"/> - <location filename="../Window.cpp" line="412"/> + <location filename="../Window.cpp" line="366"/> + <location filename="../Window.cpp" line="427"/> + <location filename="../Window.cpp" line="434"/> <source>Select save</source> - <translation>选取存档</translation> + <translation>选择存档</translation> + </message> + <message> + <location filename="../Window.cpp" line="374"/> + <source>mGBA savestate files (%1)</source> + <translation>mGBA 即时存档文件 (%1)</translation> </message> <message> + <location filename="../Window.cpp" line="376"/> <location filename="../Window.cpp" line="381"/> + <source>Select savestate</source> + <translation>选择即时存档</translation> + </message> + <message> + <location filename="../Window.cpp" line="403"/> <source>Select patch</source> - <translation>选择 patch</translation> + <translation>选择补丁</translation> </message> <message> - <location filename="../Window.cpp" line="381"/> + <location filename="../Window.cpp" line="403"/> <source>Patches (*.ips *.ups *.bps)</source> - <translation type="unfinished"></translation> + <translation>补丁文件 (*.ips *.ups *.bps)</translation> </message> <message> - <location filename="../Window.cpp" line="398"/> + <location filename="../Window.cpp" line="420"/> <source>Select image</source> - <translation>选取图片</translation> + <translation>选择图片</translation> </message> <message> - <location filename="../Window.cpp" line="398"/> + <location filename="../Window.cpp" line="420"/> <source>Image file (*.png *.gif *.jpg *.jpeg);;All files (*)</source> - <translation>图片文件 (*.png *.gif *.jpg *.jpeg);;Tous les fichiers (*)</translation> + <translation>图像文件 (*.png *.gif *.jpg *.jpeg);;所有文件 (*)</translation> </message> <message> - <location filename="../Window.cpp" line="405"/> - <location filename="../Window.cpp" line="412"/> + <location filename="../Window.cpp" line="427"/> + <location filename="../Window.cpp" line="434"/> <source>GameShark saves (*.sps *.xps)</source> - <translation>GameShark存档 (*.sps *.xps)</translation> + <translation>GameShark 存档 (*.sps *.xps)</translation> </message> <message> - <location filename="../Window.cpp" line="437"/> + <location filename="../Window.cpp" line="460"/> <source>Select video log</source> <translation>选择视频日志</translation> </message> <message> - <location filename="../Window.cpp" line="437"/> + <location filename="../Window.cpp" line="460"/> <source>Video logs (*.mvl)</source> <translation>视频日志 (*.mvl)</translation> </message> <message> - <location filename="../Window.cpp" line="782"/> + <location filename="../Window.cpp" line="821"/> <source>Crash</source> <translation>崩溃</translation> </message> <message> - <location filename="../Window.cpp" line="783"/> + <location filename="../Window.cpp" line="822"/> <source>The game has crashed with the following error: %1</source>@@ -3299,652 +3442,630 @@
%1</translation> </message> <message> - <location filename="../Window.cpp" line="791"/> + <location filename="../Window.cpp" line="829"/> <source>Couldn't Load</source> <translation>无法载入</translation> </message> <message> - <location filename="../Window.cpp" line="792"/> + <location filename="../Window.cpp" line="830"/> <source>Could not load game. Are you sure it's in the correct format?</source> - <translation>无法载入游戏. 是否确认游戏格式无误 ?</translation> + <translation>无法载入游戏。请确认游戏格式是否无误</translation> </message> <message> - <location filename="../Window.cpp" line="805"/> + <location filename="../Window.cpp" line="843"/> <source>Unimplemented BIOS call</source> - <translation>未实现的BIOS调用</translation> + <translation>未实现的 BIOS 调用</translation> </message> <message> - <location filename="../Window.cpp" line="806"/> + <location filename="../Window.cpp" line="844"/> <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="887"/> + <location filename="../Window.cpp" line="926"/> <source>Really make portable?</source> - <translation>确定进行便携化 ?</translation> + <translation>确定进行程序便携化?</translation> </message> <message> - <location filename="../Window.cpp" line="888"/> + <location filename="../Window.cpp" line="927"/> <source>This will make the emulator load its configuration from the same directory as the executable. Do you want to continue?</source> - <translation type="unfinished"></translation> + <translation>进行此操作后,模拟器将从模拟器可执行文件所在目录内加载模拟器配置。您想继续吗?</translation> </message> <message> - <location filename="../Window.cpp" line="896"/> + <location filename="../Window.cpp" line="935"/> <source>Restart needed</source> - <translation>需要重启</translation> + <translation>需要重新启动</translation> </message> <message> - <location filename="../Window.cpp" line="897"/> + <location filename="../Window.cpp" line="936"/> <source>Some changes will not take effect until the emulator is restarted.</source> - <translation>一些更改将在模拟器下次启动时生效。</translation> + <translation>更改将在模拟器下次启动时生效。</translation> </message> <message> - <location filename="../Window.cpp" line="951"/> + <location filename="../Window.cpp" line="984"/> <source> - Player %1 of %2</source> - <translation type="unfinished"></translation> + <translation> - 玩家 %1 共 %2</translation> </message> <message> - <location filename="../Window.cpp" line="962"/> + <location filename="../Window.cpp" line="995"/> <source>%1 - %2</source> - <translation type="unfinished"></translation> + <translation>%1 - %2</translation> </message> <message> - <location filename="../Window.cpp" line="964"/> + <location filename="../Window.cpp" line="997"/> <source>%1 - %2 - %3</source> - <translation type="unfinished"></translation> + <translation>%1 - %2 - %3</translation> </message> <message> - <location filename="../Window.cpp" line="966"/> + <location filename="../Window.cpp" line="999"/> <source>%1 - %2 (%3 fps) - %4</source> - <translation type="unfinished"></translation> + <translation>%1 - %2 (%3 fps) - %4</translation> </message> <message> - <location filename="../Window.cpp" line="1002"/> + <location filename="../Window.cpp" line="1035"/> <source>&File</source> <translation>文件(&F)</translation> </message> <message> - <location filename="../Window.cpp" line="1005"/> + <location filename="../Window.cpp" line="1038"/> <source>Load &ROM...</source> - <translation>载入 &ROM...</translation> + <translation>载入 ROM(&R)...</translation> </message> <message> - <location filename="../Window.cpp" line="1008"/> + <location filename="../Window.cpp" line="1041"/> <source>Load ROM in archive...</source> - <translation>从目录中载入ROM...</translation> + <translation>从压缩文件中载入 ROM...</translation> </message> <message> - <location filename="../Window.cpp" line="1010"/> + <location filename="../Window.cpp" line="1043"/> <source>Add folder to library...</source> - <translation>在库中添加文件夹...</translation> + <translation>将文件夹添加到库中...</translation> </message> <message> - <location filename="../Window.cpp" line="1014"/> + <location filename="../Window.cpp" line="1047"/> <source>Load alternate save...</source> <translation>读取其他的存档...</translation> </message> <message> - <location filename="../Window.cpp" line="1019"/> + <location filename="../Window.cpp" line="1052"/> <source>Load temporary save...</source> <translation>读取临时存档...</translation> </message> <message> - <location filename="../Window.cpp" line="1024"/> + <location filename="../Window.cpp" line="1057"/> <source>Load &patch...</source> - <translation>载入&patch文件...</translation> + <translation>载入补丁文件(&P)...</translation> </message> <message> - <location filename="../Window.cpp" line="1027"/> + <location filename="../Window.cpp" line="1060"/> <source>Boot BIOS</source> - <translation type="unfinished"></translation> + <translation>引导 BIOS</translation> </message> <message> - <location filename="../Window.cpp" line="1034"/> + <location filename="../Window.cpp" line="1067"/> <source>Replace ROM...</source> - <translation>替换ROM...</translation> + <translation>替换 ROM...</translation> </message> <message> - <location filename="../Window.cpp" line="1036"/> + <location filename="../Window.cpp" line="1069"/> <source>ROM &info...</source> - <translation>ROM信息(&I)...</translation> + <translation>ROM 信息(&I)...</translation> </message> <message> - <location filename="../Window.cpp" line="1041"/> + <location filename="../Window.cpp" line="1074"/> <source>Recent</source> - <translation type="unfinished"></translation> + <translation>最近打开的游戏</translation> </message> <message> - <location filename="../Window.cpp" line="1045"/> + <location filename="../Window.cpp" line="1078"/> <source>Make portable</source> - <translation>便携化</translation> + <translation>程序便携化</translation> </message> <message> - <location filename="../Window.cpp" line="1049"/> + <location filename="../Window.cpp" line="1082"/> <source>&Load state</source> - <translation>(&L)读取存档</translation> + <translation>读取即时存档(&L)</translation> </message> <message> - <location filename="../Window.cpp" line="1050"/> + <location filename="../Window.cpp" line="1083"/> <source>F10</source> - <translation type="unfinished"></translation> + <translation>F10</translation> </message> <message> - <location filename="../Window.cpp" line="1056"/> + <location filename="../Window.cpp" line="1089"/> + <source>Load state file...</source> + <translation>载入即时存档文件...</translation> + </message> + <message> + <location filename="../Window.cpp" line="1095"/> <source>&Save state</source> - <translation>&S存档</translation> + <translation>保存即时存档(&S)</translation> </message> <message> - <location filename="../Window.cpp" line="1057"/> + <location filename="../Window.cpp" line="1096"/> <source>Shift+F10</source> - <translation type="unfinished"></translation> + <translation>Shift+F10</translation> </message> <message> - <location filename="../Window.cpp" line="1063"/> + <location filename="../Window.cpp" line="1102"/> + <source>Save state file...</source> + <translation>保存即时存档文件...</translation> + </message> + <message> + <location filename="../Window.cpp" line="1108"/> <source>Quick load</source> <translation>快速读档</translation> </message> <message> - <location filename="../Window.cpp" line="1064"/> + <location filename="../Window.cpp" line="1109"/> <source>Quick save</source> <translation>快速存档</translation> </message> <message> - <location filename="../Window.cpp" line="1068"/> + <location filename="../Window.cpp" line="1113"/> <source>Load recent</source> - <translation>载入最近的存档</translation> + <translation>载入最近的即时存档</translation> </message> <message> - <location filename="../Window.cpp" line="1076"/> + <location filename="../Window.cpp" line="1121"/> <source>Save recent</source> - <translation>保存最近的状态</translation> + <translation>保存最近的即时存档</translation> </message> <message> - <location filename="../Window.cpp" line="1087"/> + <location filename="../Window.cpp" line="1132"/> <source>Undo load state</source> - <translation>撤消读档操作</translation> + <translation>撤消读档</translation> </message> <message> - <location filename="../Window.cpp" line="1088"/> + <location filename="../Window.cpp" line="1133"/> <source>F11</source> - <translation type="unfinished"></translation> + <translation>F11</translation> </message> <message> - <location filename="../Window.cpp" line="1096"/> + <location filename="../Window.cpp" line="1141"/> <source>Undo save state</source> <translation>撤消存档</translation> </message> <message> - <location filename="../Window.cpp" line="1097"/> + <location filename="../Window.cpp" line="1142"/> <source>Shift+F11</source> - <translation type="unfinished"></translation> + <translation>Shift+F11</translation> </message> <message> - <location filename="../Window.cpp" line="1110"/> - <location filename="../Window.cpp" line="1119"/> + <location filename="../Window.cpp" line="1155"/> + <location filename="../Window.cpp" line="1164"/> <source>State &%1</source> - <translation type="unfinished"></translation> + <translation>即时存档 1(&1)</translation> </message> <message> - <location filename="../Window.cpp" line="1111"/> + <location filename="../Window.cpp" line="1156"/> <source>F%1</source> - <translation type="unfinished"></translation> + <translation>F%1</translation> </message> <message> - <location filename="../Window.cpp" line="1120"/> + <location filename="../Window.cpp" line="1165"/> <source>Shift+F%1</source> - <translation type="unfinished"></translation> + <translation>Shift+F%1</translation> </message> <message> - <location filename="../Window.cpp" line="1130"/> + <location filename="../Window.cpp" line="1175"/> <source>Load camera image...</source> <translation>读取相机图片...</translation> </message> <message> - <location filename="../Window.cpp" line="1136"/> + <location filename="../Window.cpp" line="1181"/> <source>Import GameShark Save</source> - <translation>导入GameShark存档</translation> + <translation>导入 GameShark 存档</translation> </message> <message> - <location filename="../Window.cpp" line="1142"/> + <location filename="../Window.cpp" line="1187"/> <source>Export GameShark Save</source> - <translation>导出GameShark存档</translation> + <translation>导出 GameShark 存档</translation> </message> <message> - <location filename="../Window.cpp" line="1150"/> + <location filename="../Window.cpp" line="1195"/> <source>New multiplayer window</source> - <translation>新多人游戏窗口</translation> + <translation>新建多人游戏窗口</translation> </message> <message> - <location filename="../Window.cpp" line="1160"/> - <source>About</source> - <translation>关于</translation> + <location filename="../Window.cpp" line="1205"/> + <source>About...</source> + <translation>关于...</translation> </message> <message> - <location filename="../Window.cpp" line="1165"/> + <location filename="../Window.cpp" line="1210"/> <source>E&xit</source> - <translation>退出&x</translation> + <translation>退出(&X)</translation> </message> <message> - <location filename="../Window.cpp" line="1168"/> + <location filename="../Window.cpp" line="1213"/> <source>&Emulation</source> - <translation>&E模拟</translation> + <translation>模拟(&E)</translation> </message> <message> - <location filename="../Window.cpp" line="1170"/> + <location filename="../Window.cpp" line="1215"/> <source>&Reset</source> - <translation>&R复位</translation> + <translation>复位(&R)</translation> </message> <message> - <location filename="../Window.cpp" line="1171"/> + <location filename="../Window.cpp" line="1216"/> <source>Ctrl+R</source> - <translation type="unfinished"></translation> + <translation>Ctrl+R</translation> </message> <message> - <location filename="../Window.cpp" line="1178"/> + <location filename="../Window.cpp" line="1223"/> <source>Sh&utdown</source> - <translation>关闭&u</translation> + <translation>关机(&U)</translation> </message> <message> - <location filename="../Window.cpp" line="1186"/> + <location filename="../Window.cpp" line="1231"/> <source>Yank game pak</source> - <translation type="unfinished"></translation> + <translation>快速抽出游戏卡带</translation> </message> <message> - <location filename="../Window.cpp" line="1196"/> + <location filename="../Window.cpp" line="1241"/> <source>&Pause</source> - <translation>暂停&P</translation> + <translation>暂停(&P)</translation> </message> <message> - <location filename="../Window.cpp" line="1199"/> + <location filename="../Window.cpp" line="1244"/> <source>Ctrl+P</source> - <translation type="unfinished"></translation> + <translation>Ctrl+P</translation> </message> <message> - <location filename="../Window.cpp" line="1212"/> + <location filename="../Window.cpp" line="1257"/> <source>&Next frame</source> - <translation>下一帧&N</translation> + <translation>下一帧(&N)</translation> </message> <message> - <location filename="../Window.cpp" line="1213"/> + <location filename="../Window.cpp" line="1258"/> <source>Ctrl+N</source> - <translation type="unfinished"></translation> + <translation>Ctrl+N</translation> </message> <message> - <location filename="../Window.cpp" line="1230"/> + <location filename="../Window.cpp" line="1275"/> <source>Fast forward (held)</source> - <translation>快进 (held)</translation> + <translation>快进 (长按)</translation> </message> <message> - <location filename="../Window.cpp" line="1232"/> + <location filename="../Window.cpp" line="1277"/> <source>&Fast forward</source> - <translation>快进&F</translation> + <translation>快进(&F)</translation> </message> <message> - <location filename="../Window.cpp" line="1235"/> + <location filename="../Window.cpp" line="1280"/> <source>Shift+Tab</source> - <translation type="unfinished"></translation> + <translation>Shift+Tab</translation> </message> <message> - <location filename="../Window.cpp" line="1242"/> + <location filename="../Window.cpp" line="1287"/> <source>Fast forward speed</source> <translation>快进速度</translation> </message> <message> - <location filename="../Window.cpp" line="1247"/> + <location filename="../Window.cpp" line="1292"/> <source>Unbounded</source> <translation>不限制</translation> </message> <message> - <location filename="../Window.cpp" line="1251"/> + <location filename="../Window.cpp" line="1296"/> <source>%0x</source> - <translation type="unfinished"></translation> + <translation>%0x</translation> </message> <message> - <location filename="../Window.cpp" line="1263"/> + <location filename="../Window.cpp" line="1308"/> <source>Rewind (held)</source> - <translation>回退 (held)</translation> + <translation>回退 (长按)</translation> </message> <message> - <location filename="../Window.cpp" line="1265"/> + <location filename="../Window.cpp" line="1310"/> <source>Re&wind</source> - <translation>回退&w</translation> + <translation>回退(&W)</translation> </message> <message> - <location filename="../Window.cpp" line="1266"/> + <location filename="../Window.cpp" line="1311"/> <source>~</source> - <translation type="unfinished"></translation> + <translation>~</translation> </message> <message> - <location filename="../Window.cpp" line="1274"/> + <location filename="../Window.cpp" line="1319"/> <source>Step backwards</source> <translation>后退</translation> </message> <message> - <location filename="../Window.cpp" line="1275"/> + <location filename="../Window.cpp" line="1320"/> <source>Ctrl+B</source> - <translation type="unfinished"></translation> + <translation>Ctrl+B</translation> </message> <message> - <location filename="../Window.cpp" line="1284"/> + <location filename="../Window.cpp" line="1329"/> <source>Sync to &video</source> - <translation>视频同步&v</translation> + <translation>视频同步(&V)</translation> </message> <message> - <location filename="../Window.cpp" line="1291"/> + <location filename="../Window.cpp" line="1336"/> <source>Sync to &audio</source> - <translation>音频同步&a</translation> + <translation>音频同步(&A)</translation> </message> <message> - <location filename="../Window.cpp" line="1299"/> + <location filename="../Window.cpp" line="1344"/> <source>Solar sensor</source> - <translation>日光传感器</translation> + <translation>光线传感器</translation> </message> <message> - <location filename="../Window.cpp" line="1301"/> + <location filename="../Window.cpp" line="1346"/> <source>Increase solar level</source> - <translation>增加日光级别</translation> + <translation>增加光线级别</translation> </message> <message> - <location filename="../Window.cpp" line="1305"/> + <location filename="../Window.cpp" line="1350"/> <source>Decrease solar level</source> - <translation>降低日光级别</translation> + <translation>降低光线级别</translation> </message> <message> - <location filename="../Window.cpp" line="1309"/> + <location filename="../Window.cpp" line="1354"/> <source>Brightest solar level</source> - <translation>日光级别为最亮</translation> + <translation>光线级别为最亮</translation> </message> <message> - <location filename="../Window.cpp" line="1313"/> + <location filename="../Window.cpp" line="1358"/> <source>Darkest solar level</source> - <translation>日光级别为最暗</translation> + <translation>光线级别为最暗</translation> </message> <message> - <location filename="../Window.cpp" line="1319"/> + <location filename="../Window.cpp" line="1364"/> <source>Brightness %1</source> <translation>亮度 %1</translation> </message> <message> - <location filename="../Window.cpp" line="1326"/> + <location filename="../Window.cpp" line="1372"/> + <source>Game Boy Printer...</source> + <translation>Game Boy 打印机..</translation> + </message> + <message> + <location filename="../Window.cpp" line="1384"/> + <source>BattleChip Gate...</source> + <translation>BattleChip Gate...</translation> + </message> + <message> + <location filename="../Window.cpp" line="1391"/> <source>Audio/&Video</source> - <translation>音频/视频&V</translation> + <translation>音频/视频(&V)</translation> </message> <message> - <location filename="../Window.cpp" line="1328"/> + <location filename="../Window.cpp" line="1393"/> <source>Frame size</source> <translation>帧率</translation> </message> <message> - <location filename="../Window.cpp" line="1331"/> + <location filename="../Window.cpp" line="1396"/> <source>%1x</source> - <translation type="unfinished"></translation> + <translation>%1x</translation> </message> <message> - <location filename="../Window.cpp" line="1359"/> + <location filename="../Window.cpp" line="1424"/> <source>Toggle fullscreen</source> <translation>切换全屏</translation> </message> <message> - <location filename="../Window.cpp" line="1362"/> + <location filename="../Window.cpp" line="1427"/> <source>Lock aspect ratio</source> <translation>锁定纵横比</translation> </message> <message> - <location filename="../Window.cpp" line="1372"/> + <location filename="../Window.cpp" line="1439"/> <source>Force integer scaling</source> <translation>强制整数缩放</translation> </message> <message> - <location filename="../Window.cpp" line="1382"/> + <location filename="../Window.cpp" line="1451"/> <source>Bilinear filtering</source> <translation>双线性过滤</translation> </message> <message> - <location filename="../Window.cpp" line="1388"/> + <location filename="../Window.cpp" line="1459"/> <source>Frame&skip</source> - <translation>跳帧&s</translation> + <translation>跳帧(&S)</translation> </message> <message> - <location filename="../Window.cpp" line="1401"/> + <location filename="../Window.cpp" line="1472"/> <source>Mute</source> <translation>静音</translation> </message> <message> - <location filename="../Window.cpp" line="1408"/> + <location filename="../Window.cpp" line="1479"/> <source>FPS target</source> - <translation>最高FPS</translation> - </message> - <message> - <location filename="../Window.cpp" line="1413"/> - <source>15</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../Window.cpp" line="1414"/> - <source>30</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../Window.cpp" line="1415"/> - <source>45</source> - <translation type="unfinished"></translation> + <translation>目标 FPS</translation> </message> <message> <location filename="../Window.cpp" line="1416"/> - <source>Native (59.7)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../Window.cpp" line="1417"/> - <source>60</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../Window.cpp" line="1418"/> - <source>90</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../Window.cpp" line="1419"/> - <source>120</source> - <translation type="unfinished"></translation> + <source>Native (59.7275)</source> + <translation>原生 (59.7275)</translation> </message> <message> - <location filename="../Window.cpp" line="1420"/> - <source>240</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../Window.cpp" line="1426"/> + <location filename="../Window.cpp" line="1502"/> <source>Take &screenshot</source> - <translation>生成截图&s</translation> + <translation>截图(&S)</translation> </message> <message> - <location filename="../Window.cpp" line="1427"/> + <location filename="../Window.cpp" line="1503"/> <source>F12</source> - <translation type="unfinished"></translation> + <translation>F12</translation> </message> <message> - <location filename="../Window.cpp" line="1436"/> + <location filename="../Window.cpp" line="1512"/> <source>Record output...</source> <translation>录制导出...</translation> </message> <message> - <location filename="../Window.cpp" line="1443"/> + <location filename="../Window.cpp" line="1519"/> <source>Record GIF...</source> - <translation>录制GIF...</translation> + <translation>录制 GIF...</translation> </message> <message> - <location filename="../Window.cpp" line="1448"/> + <location filename="../Window.cpp" line="1524"/> <source>Record video log...</source> <translation>记录视频日志...</translation> </message> <message> - <location filename="../Window.cpp" line="1453"/> + <location filename="../Window.cpp" line="1529"/> <source>Stop video log</source> <translation>停止记录视频日志</translation> </message> <message> - <location filename="../Window.cpp" line="1461"/> - <source>Game Boy Printer...</source> - <translation type="unfinished"></translation> - </message> - <message> - <location filename="../Window.cpp" line="1473"/> + <location filename="../Window.cpp" line="1537"/> <source>Video layers</source> - <translation type="unfinished"></translation> + <translation>视频图层</translation> </message> <message> - <location filename="../Window.cpp" line="1476"/> + <location filename="../Window.cpp" line="1540"/> <source>Audio channels</source> - <translation>音频</translation> + <translation>音频通道</translation> </message> <message> - <location filename="../Window.cpp" line="1479"/> + <location filename="../Window.cpp" line="1543"/> <source>Adjust layer placement...</source> - <translation type="unfinished"></translation> + <translation>调整图层布局</translation> </message> <message> - <location filename="../Window.cpp" line="1484"/> + <location filename="../Window.cpp" line="1548"/> <source>&Tools</source> - <translation>工具&T</translation> + <translation>工具(&T)</translation> </message> <message> - <location filename="../Window.cpp" line="1486"/> + <location filename="../Window.cpp" line="1550"/> <source>View &logs...</source> - <translation>查看日志&l...</translation> + <translation>查看日志(&L)...</translation> </message> <message> - <location filename="../Window.cpp" line="1490"/> + <location filename="../Window.cpp" line="1554"/> <source>Game &overrides...</source> - <translation>覆盖游戏&o...</translation> + <translation>覆盖游戏(&O)...</translation> </message> <message> - <location filename="../Window.cpp" line="1504"/> + <location filename="../Window.cpp" line="1568"/> <source>Game &Pak sensors...</source> - <translation type="unfinished"></translation> + <translation>游戏卡带传感器(&P)...</translation> </message> <message> - <location filename="../Window.cpp" line="1517"/> + <location filename="../Window.cpp" line="1581"/> <source>&Cheats...</source> - <translation>作弊码&C...</translation> + <translation>作弊码(&C)...</translation> </message> <message> - <location filename="../Window.cpp" line="1523"/> + <location filename="../Window.cpp" line="1587"/> <source>Settings...</source> <translation>设置...</translation> </message> <message> - <location filename="../Window.cpp" line="1529"/> + <location filename="../Window.cpp" line="1593"/> <source>Open debugger console...</source> - <translation>打开调试终端...</translation> + <translation>打开调试器控制台...</translation> </message> <message> - <location filename="../Window.cpp" line="1535"/> + <location filename="../Window.cpp" line="1599"/> <source>Start &GDB server...</source> - <translation>打开&GDB服务端...</translation> + <translation>打开 GDB 服务器(&G)...</translation> </message> <message> - <location filename="../Window.cpp" line="1543"/> + <location filename="../Window.cpp" line="1607"/> <source>View &palette...</source> - <translation>查看调色板&p...</translation> + <translation>查看调色板(&P)...</translation> </message> <message> - <location filename="../Window.cpp" line="1548"/> + <location filename="../Window.cpp" line="1612"/> <source>View &sprites...</source> - <translation type="unfinished"></translation> + <translation>查看精灵图(&S)</translation> </message> <message> - <location filename="../Window.cpp" line="1553"/> + <location filename="../Window.cpp" line="1617"/> <source>View &tiles...</source> - <translation type="unfinished"></translation> + <translation>查看图块(&T)</translation> </message> <message> - <location filename="../Window.cpp" line="1558"/> + <location filename="../Window.cpp" line="1622"/> <source>View &map...</source> - <translatorcomment>不译</translatorcomment> - <translation type="unfinished"></translation> + <translation>查看映射(&M)</translation> </message> <message> - <location filename="../Window.cpp" line="1563"/> + <location filename="../Window.cpp" line="1627"/> <source>View memory...</source> <translation>查看内存...</translation> </message> <message> - <location filename="../Window.cpp" line="1568"/> + <location filename="../Window.cpp" line="1632"/> <source>Search memory...</source> - <translation>查看内存...</translation> + <translation>搜索内存...</translation> </message> <message> - <location filename="../Window.cpp" line="1574"/> + <location filename="../Window.cpp" line="1638"/> <source>View &I/O registers...</source> - <translatorcomment>registers 翻译存疑</translatorcomment> - <translation>查看&I/O注册器...</translation> + <translation>查看 I/O 寄存器(&I)...</translation> </message> <message> - <location filename="../Window.cpp" line="1654"/> + <location filename="../Window.cpp" line="1722"/> <source>Exit fullscreen</source> <translation>退出全屏</translation> </message> <message> - <location filename="../Window.cpp" line="1667"/> + <location filename="../Window.cpp" line="1735"/> <source>GameShark Button (held)</source> - <translation>GameShark 键 (held)</translation> + <translation>GameShark 键 (长按)</translation> </message> <message> - <location filename="../Window.cpp" line="1669"/> + <location filename="../Window.cpp" line="1737"/> <source>Autofire</source> - <translation>自动开火</translation> + <translation>连发</translation> </message> <message> - <location filename="../Window.cpp" line="1676"/> + <location filename="../Window.cpp" line="1744"/> <source>Autofire A</source> - <translation>自动开火 A</translation> + <translation>连发 A</translation> </message> <message> - <location filename="../Window.cpp" line="1682"/> + <location filename="../Window.cpp" line="1750"/> <source>Autofire B</source> - <translation>自动开火 B</translation> + <translation>连发 B</translation> </message> <message> - <location filename="../Window.cpp" line="1688"/> + <location filename="../Window.cpp" line="1756"/> <source>Autofire L</source> - <translation>自动开火 L</translation> + <translation>连发 L</translation> </message> <message> - <location filename="../Window.cpp" line="1694"/> + <location filename="../Window.cpp" line="1762"/> <source>Autofire R</source> - <translation>自动开火 R</translation> + <translation>连发 R</translation> </message> <message> - <location filename="../Window.cpp" line="1700"/> + <location filename="../Window.cpp" line="1768"/> <source>Autofire Start</source> - <translation>自动开火 开始</translation> + <translation>连发 Start</translation> </message> <message> - <location filename="../Window.cpp" line="1706"/> + <location filename="../Window.cpp" line="1774"/> <source>Autofire Select</source> - <translation>自动开火 选择</translation> + <translation>连发 Select</translation> </message> <message> - <location filename="../Window.cpp" line="1712"/> + <location filename="../Window.cpp" line="1780"/> <source>Autofire Up</source> - <translation>自动开火 上</translation> + <translation>连发 上</translation> </message> <message> - <location filename="../Window.cpp" line="1718"/> + <location filename="../Window.cpp" line="1786"/> <source>Autofire Right</source> - <translation>自动开火 右</translation> + <translation>连发 右</translation> </message> <message> - <location filename="../Window.cpp" line="1724"/> + <location filename="../Window.cpp" line="1792"/> <source>Autofire Down</source> - <translation>自动开火 下</translation> + <translation>连发 下</translation> </message> <message> - <location filename="../Window.cpp" line="1730"/> + <location filename="../Window.cpp" line="1798"/> <source>Autofire Left</source> - <translation>自动开火 左</translation> + <translation>连发 左</translation> </message> </context> <context>@@ -3952,17 +4073,17 @@ <name>QObject</name>
<message> <location filename="../utils.cpp" line="29"/> <source>GBA</source> - <translation></translation> + <translation>GBA</translation> </message> <message> <location filename="../utils.cpp" line="33"/> <source>GB</source> - <translation></translation> + <translation>GB</translation> </message> <message> <location filename="../utils.cpp" line="36"/> <source>?</source> - <translation></translation> + <translation>?</translation> </message> </context> <context>@@ -3975,7 +4096,7 @@ </message>
<message> <location filename="../ROMInfo.ui" line="26"/> <source>Game name:</source> - <translation>游戏名 :</translation> + <translation>游戏名称:</translation> </message> <message> <location filename="../ROMInfo.ui" line="33"/>@@ -3985,7 +4106,7 @@ </message>
<message> <location filename="../ROMInfo.ui" line="46"/> <source>Internal name:</source> - <translation>内部名 :</translation> + <translation>内部名称:</translation> </message> <message> <location filename="../ROMInfo.ui" line="53"/>@@ -3995,7 +4116,7 @@ </message>
<message> <location filename="../ROMInfo.ui" line="63"/> <source>Game ID:</source> - <translation>游戏ID :</translation> + <translation>游戏 ID:</translation> </message> <message> <location filename="../ROMInfo.ui" line="70"/>@@ -4005,7 +4126,7 @@ </message>
<message> <location filename="../ROMInfo.ui" line="80"/> <source>File size:</source> - <translation>文件大小 :</translation> + <translation>文件大小:</translation> </message> <message> <location filename="../ROMInfo.ui" line="87"/>@@ -4015,12 +4136,12 @@ </message>
<message> <location filename="../ROMInfo.ui" line="97"/> <source>CRC32:</source> - <translation>CRC32 :</translation> + <translation>CRC32:</translation> </message> <message> <location filename="../ROMInfo.ui" line="104"/> <source>{CRC}</source> - <translation></translation> + <translation>{CRC}</translation> </message> </context> <context>@@ -4058,12 +4179,12 @@ </message>
<message> <location filename="../SensorView.ui" line="97"/> <source>MM/dd/yy hh:mm:ss AP</source> - <translation></translation> + <translation>yy/MM/dd hh:mm:ss AP</translation> </message> <message> <location filename="../SensorView.ui" line="107"/> <source>Light sensor</source> - <translation>光传感器</translation> + <translation>光线传感器</translation> </message> <message> <location filename="../SensorView.ui" line="113"/>@@ -4073,19 +4194,19 @@ </message>
<message> <location filename="../SensorView.ui" line="150"/> <source>Tilt sensor</source> - <translation>倾角传感器</translation> + <translation>倾斜传感器</translation> </message> <message> <location filename="../SensorView.ui" line="158"/> <location filename="../SensorView.ui" line="247"/> <source>Set Y</source> - <translation>设定 Y</translation> + <translation>设定 Y 轴</translation> </message> <message> <location filename="../SensorView.ui" line="168"/> <location filename="../SensorView.ui" line="257"/> <source>Set X</source> - <translation>设定 X</translation> + <translation>设定 X 轴</translation> </message> <message> <location filename="../SensorView.ui" line="239"/>@@ -4106,502 +4227,538 @@ <source>Settings</source>
<translation>设置</translation> </message> <message> - <location filename="../SettingsView.ui" line="45"/> + <location filename="../SettingsView.ui" line="52"/> <source>Audio/Video</source> <translation>音频/视频</translation> </message> <message> - <location filename="../SettingsView.ui" line="50"/> + <location filename="../SettingsView.ui" line="57"/> <source>Interface</source> <translation>用户界面</translation> </message> <message> - <location filename="../SettingsView.ui" line="55"/> + <location filename="../SettingsView.ui" line="62"/> <source>Emulation</source> <translation>模拟器</translation> </message> <message> - <location filename="../SettingsView.ui" line="60"/> + <location filename="../SettingsView.ui" line="67"/> <source>BIOS</source> - <translation></translation> + <translation>BIOS</translation> </message> <message> - <location filename="../SettingsView.ui" line="65"/> + <location filename="../SettingsView.ui" line="72"/> <source>Paths</source> <translation>路径</translation> </message> <message> - <location filename="../SettingsView.ui" line="70"/> + <location filename="../SettingsView.ui" line="77"/> + <source>Logging</source> + <translation>日志记录</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="82"/> <source>Game Boy</source> - <translation></translation> + <translation>Game Boy</translation> </message> <message> - <location filename="../SettingsView.ui" line="95"/> + <location filename="../SettingsView.ui" line="100"/> <source>Audio driver:</source> - <translation>音频驱动 :</translation> + <translation>音频驱动:</translation> </message> <message> - <location filename="../SettingsView.ui" line="112"/> + <location filename="../SettingsView.ui" line="117"/> <source>Audio buffer:</source> <translation>音频缓冲:</translation> </message> <message> - <location filename="../SettingsView.ui" line="124"/> - <location filename="../SettingsView.ui" line="146"/> + <location filename="../SettingsView.ui" line="129"/> + <location filename="../SettingsView.ui" line="151"/> <source>1536</source> - <translation></translation> + <translation>1536</translation> </message> <message> - <location filename="../SettingsView.ui" line="131"/> + <location filename="../SettingsView.ui" line="136"/> <source>512</source> - <translation></translation> + <translation>512</translation> </message> <message> - <location filename="../SettingsView.ui" line="136"/> + <location filename="../SettingsView.ui" line="141"/> <source>768</source> - <translation></translation> + <translation>768</translation> </message> <message> - <location filename="../SettingsView.ui" line="141"/> + <location filename="../SettingsView.ui" line="146"/> <source>1024</source> - <translation></translation> + <translation>1024</translation> </message> <message> - <location filename="../SettingsView.ui" line="151"/> + <location filename="../SettingsView.ui" line="156"/> <source>2048</source> - <translation></translation> + <translation>2048</translation> </message> <message> - <location filename="../SettingsView.ui" line="156"/> + <location filename="../SettingsView.ui" line="161"/> <source>3072</source> - <translation></translation> + <translation>3072</translation> </message> <message> - <location filename="../SettingsView.ui" line="161"/> + <location filename="../SettingsView.ui" line="166"/> <source>4096</source> - <translation></translation> + <translation>4096</translation> </message> <message> - <location filename="../SettingsView.ui" line="169"/> + <location filename="../SettingsView.ui" line="174"/> <source>samples</source> <translation>采样</translation> </message> <message> - <location filename="../SettingsView.ui" line="178"/> + <location filename="../SettingsView.ui" line="183"/> <source>Sample rate:</source> <translation>采样率:</translation> </message> <message> - <location filename="../SettingsView.ui" line="190"/> - <location filename="../SettingsView.ui" line="207"/> + <location filename="../SettingsView.ui" line="195"/> + <location filename="../SettingsView.ui" line="212"/> <source>44100</source> - <translation></translation> + <translation>44100</translation> </message> <message> - <location filename="../SettingsView.ui" line="197"/> + <location filename="../SettingsView.ui" line="202"/> <source>22050</source> - <translation></translation> + <translation>22050</translation> </message> <message> - <location filename="../SettingsView.ui" line="202"/> + <location filename="../SettingsView.ui" line="207"/> <source>32000</source> - <translation></translation> + <translation>32000</translation> </message> <message> - <location filename="../SettingsView.ui" line="212"/> + <location filename="../SettingsView.ui" line="217"/> <source>48000</source> - <translation></translation> + <translation>48000</translation> </message> <message> - <location filename="../SettingsView.ui" line="220"/> + <location filename="../SettingsView.ui" line="225"/> <source>Hz</source> - <translation></translation> + <translation>Hz</translation> </message> <message> - <location filename="../SettingsView.ui" line="229"/> + <location filename="../SettingsView.ui" line="234"/> <source>Volume:</source> - <translation>音量 :</translation> + <translation>音量:</translation> </message> <message> - <location filename="../SettingsView.ui" line="260"/> + <location filename="../SettingsView.ui" line="265"/> + <location filename="../SettingsView.ui" line="305"/> <source>Mute</source> <translation>静音</translation> </message> <message> - <location filename="../SettingsView.ui" line="276"/> + <location filename="../SettingsView.ui" line="274"/> + <source>Fast forward volume:</source> + <translation>快进音量:</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="321"/> <source>Display driver:</source> - <translation>显示驱动 :</translation> + <translation>显示驱动:</translation> </message> <message> - <location filename="../SettingsView.ui" line="293"/> + <location filename="../SettingsView.ui" line="338"/> <source>Frameskip:</source> - <translation>跳帧 :</translation> + <translation>跳帧:</translation> </message> <message> - <location filename="../SettingsView.ui" line="302"/> + <location filename="../SettingsView.ui" line="347"/> <source>Skip every</source> <translation>每间隔</translation> </message> <message> - <location filename="../SettingsView.ui" line="312"/> - <location filename="../SettingsView.ui" line="645"/> + <location filename="../SettingsView.ui" line="357"/> + <location filename="../SettingsView.ui" line="717"/> <source>frames</source> <translation>帧</translation> </message> <message> - <location filename="../SettingsView.ui" line="321"/> + <location filename="../SettingsView.ui" line="366"/> <source>FPS target:</source> - <translation>最高FPS :</translation> + <translation>目标 FPS:</translation> </message> <message> - <location filename="../SettingsView.ui" line="343"/> + <location filename="../SettingsView.ui" line="391"/> <source>frames per second</source> <translation>帧每秒</translation> </message> <message> - <location filename="../SettingsView.ui" line="359"/> + <location filename="../SettingsView.ui" line="407"/> <source>Sync:</source> - <translation>同步 :</translation> + <translation>同步:</translation> </message> <message> - <location filename="../SettingsView.ui" line="368"/> + <location filename="../SettingsView.ui" line="416"/> <source>Video</source> <translation>视频</translation> </message> <message> - <location filename="../SettingsView.ui" line="375"/> + <location filename="../SettingsView.ui" line="423"/> <source>Audio</source> <translation>音频</translation> </message> <message> - <location filename="../SettingsView.ui" line="384"/> + <location filename="../SettingsView.ui" line="432"/> <source>Lock aspect ratio</source> <translation>锁定纵横比</translation> </message> <message> - <location filename="../SettingsView.ui" line="391"/> - <source>Bilinear filtering</source> - <translation>双线性过滤</translation> + <location filename="../SettingsView.ui" line="439"/> + <source>Force integer scaling</source> + <translation>强制整数缩放</translation> </message> <message> - <location filename="../SettingsView.ui" line="398"/> - <source>Force integer scaling</source> - <translation>强制整数缩放</translation> + <location filename="../SettingsView.ui" line="446"/> + <source>Bilinear filtering</source> + <translation>双线性过滤</translation> </message> <message> - <location filename="../SettingsView.ui" line="409"/> + <location filename="../SettingsView.ui" line="457"/> <source>Language</source> <translation>语言</translation> </message> <message> - <location filename="../SettingsView.ui" line="417"/> + <location filename="../SettingsView.ui" line="465"/> <source>English</source> <translation>英语</translation> </message> <message> - <location filename="../SettingsView.ui" line="432"/> + <location filename="../SettingsView.ui" line="480"/> <source>Library:</source> - <translation>库 :</translation> + <translation>库:</translation> </message> <message> - <location filename="../SettingsView.ui" line="440"/> + <location filename="../SettingsView.ui" line="488"/> <source>List view</source> <translation>列表查看</translation> </message> <message> - <location filename="../SettingsView.ui" line="445"/> + <location filename="../SettingsView.ui" line="493"/> <source>Tree view</source> <translation>树状查看</translation> </message> <message> - <location filename="../SettingsView.ui" line="453"/> + <location filename="../SettingsView.ui" line="501"/> <source>Show when no game open</source> - <translation>在无游戏打开时显示</translation> + <translation>未打开游戏时显示</translation> </message> <message> - <location filename="../SettingsView.ui" line="463"/> + <location filename="../SettingsView.ui" line="511"/> <source>Clear cache</source> <translation>清除缓存</translation> </message> <message> - <location filename="../SettingsView.ui" line="477"/> + <location filename="../SettingsView.ui" line="525"/> <source>Allow opposing input directions</source> <translation>允许逆向输入</translation> </message> <message> - <location filename="../SettingsView.ui" line="484"/> + <location filename="../SettingsView.ui" line="532"/> <source>Suspend screensaver</source> - <translation>停用休眠</translation> + <translation>停用屏幕保护程序</translation> </message> <message> - <location filename="../SettingsView.ui" line="494"/> + <location filename="../SettingsView.ui" line="542"/> <source>Pause when inactive</source> - <translation>不活动时暂停</translation> + <translation>非活动时暂停</translation> </message> <message> - <location filename="../SettingsView.ui" line="501"/> + <location filename="../SettingsView.ui" line="549"/> <source>Show FPS in title bar</source> - <translation>在标题栏显示FPS</translation> + <translation>在标题栏显示 FPS</translation> </message> <message> - <location filename="../SettingsView.ui" line="525"/> + <location filename="../SettingsView.ui" line="573"/> <source>Automatically save cheats</source> <translation>自动保存作弊码</translation> </message> <message> - <location filename="../SettingsView.ui" line="535"/> + <location filename="../SettingsView.ui" line="583"/> <source>Automatically load cheats</source> <translation>自动载入作弊码</translation> </message> <message> - <location filename="../SettingsView.ui" line="545"/> + <location filename="../SettingsView.ui" line="593"/> <source>Automatically save state</source> <translation>自动存档</translation> </message> <message> - <location filename="../SettingsView.ui" line="555"/> + <location filename="../SettingsView.ui" line="603"/> <source>Automatically load state</source> <translation>自动读档</translation> </message> + <message> + <location filename="../SettingsView.ui" line="613"/> + <source>Enable Discord Rich Presence</source> + <translation>启用 Enable Discord Rich Presence</translation> + </message> <message> - <location filename="../SettingsView.ui" line="572"/> + <location filename="../SettingsView.ui" line="627"/> <source>Fast forward speed:</source> - <translation>快进速度 :</translation> + <translation>快进速度:</translation> </message> <message> - <location filename="../SettingsView.ui" line="584"/> + <location filename="../SettingsView.ui" line="639"/> <source>×</source> - <translation></translation> + <translation>×</translation> </message> <message> - <location filename="../SettingsView.ui" line="603"/> + <location filename="../SettingsView.ui" line="658"/> <source>Unbounded</source> <translation>不限制</translation> </message> <message> - <location filename="../SettingsView.ui" line="622"/> + <location filename="../SettingsView.ui" line="670"/> + <source>Autofire interval:</source> + <translation>连发间隔:</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="694"/> <source>Enable rewind</source> <translation>启用回退</translation> </message> <message> - <location filename="../SettingsView.ui" line="629"/> + <location filename="../SettingsView.ui" line="701"/> <source>Rewind history:</source> - <translation>回退历史 :</translation> + <translation>回退历史:</translation> </message> <message> - <location filename="../SettingsView.ui" line="661"/> + <location filename="../SettingsView.ui" line="733"/> <source>Idle loops:</source> - <translation type="unfinished"></translation> + <translation>空循环:</translation> </message> <message> - <location filename="../SettingsView.ui" line="669"/> + <location filename="../SettingsView.ui" line="741"/> <source>Run all</source> <translation>运行所有</translation> </message> <message> - <location filename="../SettingsView.ui" line="674"/> + <location filename="../SettingsView.ui" line="746"/> <source>Remove known</source> <translation>移除选定</translation> </message> <message> - <location filename="../SettingsView.ui" line="679"/> + <location filename="../SettingsView.ui" line="751"/> <source>Detect and remove</source> <translation>检测并移除</translation> </message> <message> - <location filename="../SettingsView.ui" line="694"/> + <location filename="../SettingsView.ui" line="759"/> + <source>Preload entire ROM into memory</source> + <translation>将整个 ROM 预加载到内存中</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="773"/> <source>Savestate extra data:</source> - <translation>存档时的额外数据 :</translation> + <translation>即时存档额外数据:</translation> </message> <message> - <location filename="../SettingsView.ui" line="701"/> - <location filename="../SettingsView.ui" line="738"/> + <location filename="../SettingsView.ui" line="780"/> + <location filename="../SettingsView.ui" line="824"/> <source>Screenshot</source> <translation>截图</translation> </message> <message> - <location filename="../SettingsView.ui" line="711"/> - <location filename="../SettingsView.ui" line="748"/> + <location filename="../SettingsView.ui" line="790"/> + <location filename="../SettingsView.ui" line="834"/> <source>Save data</source> <translation>保存数据</translation> </message> <message> - <location filename="../SettingsView.ui" line="721"/> - <location filename="../SettingsView.ui" line="755"/> + <location filename="../SettingsView.ui" line="800"/> + <location filename="../SettingsView.ui" line="841"/> <source>Cheat codes</source> <translation>作弊码</translation> </message> <message> - <location filename="../SettingsView.ui" line="731"/> + <location filename="../SettingsView.ui" line="817"/> <source>Load extra data:</source> <translation>读档时载入额外数据:</translation> </message> <message> - <location filename="../SettingsView.ui" line="769"/> - <source>Rewind affects save data</source> - <translation>影响保存数据时回退</translation> - </message> - <message> - <location filename="../SettingsView.ui" line="779"/> - <source>Preload entire ROM into memory</source> - <translation>预加载全部ROM到内存</translation> - </message> - <message> - <location filename="../SettingsView.ui" line="786"/> - <source>Autofire interval:</source> - <translation>自动开火间隔 :</translation> - </message> - <message> - <location filename="../SettingsView.ui" line="807"/> + <location filename="../SettingsView.ui" line="852"/> <source>GB BIOS file:</source> <translation>GB BIOS 文件:</translation> </message> <message> - <location filename="../SettingsView.ui" line="826"/> - <location filename="../SettingsView.ui" line="864"/> - <location filename="../SettingsView.ui" line="899"/> - <location filename="../SettingsView.ui" line="927"/> - <location filename="../SettingsView.ui" line="968"/> - <location filename="../SettingsView.ui" line="1016"/> - <location filename="../SettingsView.ui" line="1064"/> - <location filename="../SettingsView.ui" line="1112"/> - <location filename="../SettingsView.ui" line="1160"/> + <location filename="../SettingsView.ui" line="871"/> + <location filename="../SettingsView.ui" line="909"/> + <location filename="../SettingsView.ui" line="944"/> + <location filename="../SettingsView.ui" line="972"/> + <location filename="../SettingsView.ui" line="1013"/> + <location filename="../SettingsView.ui" line="1061"/> + <location filename="../SettingsView.ui" line="1109"/> + <location filename="../SettingsView.ui" line="1157"/> + <location filename="../SettingsView.ui" line="1205"/> <source>Browse</source> <translation>浏览</translation> </message> <message> - <location filename="../SettingsView.ui" line="835"/> + <location filename="../SettingsView.ui" line="880"/> <source>Use BIOS file if found</source> - <translation>当可用时使用BIOS文件</translation> + <translation>当可用时使用 BIOS 文件</translation> </message> <message> - <location filename="../SettingsView.ui" line="845"/> + <location filename="../SettingsView.ui" line="890"/> <source>Skip BIOS intro</source> - <translation>跳过BIOS载入</translation> + <translation>跳过 BIOS 启动画面</translation> </message> <message> - <location filename="../SettingsView.ui" line="873"/> + <location filename="../SettingsView.ui" line="918"/> <source>GBA BIOS file:</source> <translation>GBA BIOS 文件:</translation> </message> <message> - <location filename="../SettingsView.ui" line="880"/> + <location filename="../SettingsView.ui" line="925"/> <source>GBC BIOS file:</source> <translation>GBC BIOS 文件:</translation> </message> <message> - <location filename="../SettingsView.ui" line="908"/> + <location filename="../SettingsView.ui" line="953"/> <source>SGB BIOS file:</source> <translation>SGB BIOS 文件:</translation> </message> <message> - <location filename="../SettingsView.ui" line="943"/> + <location filename="../SettingsView.ui" line="988"/> <source>Save games</source> <translation>已保存的游戏</translation> </message> <message> - <location filename="../SettingsView.ui" line="977"/> - <location filename="../SettingsView.ui" line="1025"/> - <location filename="../SettingsView.ui" line="1073"/> - <location filename="../SettingsView.ui" line="1121"/> - <location filename="../SettingsView.ui" line="1169"/> + <location filename="../SettingsView.ui" line="1022"/> + <location filename="../SettingsView.ui" line="1070"/> + <location filename="../SettingsView.ui" line="1118"/> + <location filename="../SettingsView.ui" line="1166"/> + <location filename="../SettingsView.ui" line="1214"/> <source>Same directory as the ROM</source> - <translation>保存在ROM所在目录</translation> + <translation>保存在 ROM 所在目录</translation> </message> <message> - <location filename="../SettingsView.ui" line="991"/> + <location filename="../SettingsView.ui" line="1036"/> <source>Save states</source> - <translation>保存快照</translation> + <translation>保存即时存档</translation> </message> <message> - <location filename="../SettingsView.ui" line="1039"/> + <location filename="../SettingsView.ui" line="1084"/> <source>Screenshots</source> <translation>截图</translation> </message> <message> - <location filename="../SettingsView.ui" line="1087"/> + <location filename="../SettingsView.ui" line="1132"/> <source>Patches</source> <translation>补丁</translation> </message> <message> - <location filename="../SettingsView.ui" line="1135"/> + <location filename="../SettingsView.ui" line="1180"/> <source>Cheats</source> <translation>作弊码</translation> </message> <message> - <location filename="../SettingsView.ui" line="1180"/> + <location filename="../SettingsView.ui" line="1237"/> + <source>Log to file</source> + <translation>记录日志到文件</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="1244"/> + <source>Log to console</source> + <translation>记录日志到控制台</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="1258"/> + <source>Select Log File</source> + <translation>选择日志文件</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="1271"/> <source>Game Boy model</source> - <translation></translation> + <translation>Game Boy 模型</translation> </message> <message> - <location filename="../SettingsView.ui" line="1188"/> - <location filename="../SettingsView.ui" line="1224"/> - <location filename="../SettingsView.ui" line="1260"/> + <location filename="../SettingsView.ui" line="1279"/> + <location filename="../SettingsView.ui" line="1315"/> + <location filename="../SettingsView.ui" line="1351"/> <source>Autodetect</source> <translation>自动检测</translation> </message> <message> - <location filename="../SettingsView.ui" line="1193"/> - <location filename="../SettingsView.ui" line="1229"/> - <location filename="../SettingsView.ui" line="1265"/> + <location filename="../SettingsView.ui" line="1284"/> + <location filename="../SettingsView.ui" line="1320"/> + <location filename="../SettingsView.ui" line="1356"/> <source>Game Boy (DMG)</source> - <translation></translation> + <translation>Game Boy (DMG)</translation> </message> <message> - <location filename="../SettingsView.ui" line="1198"/> - <location filename="../SettingsView.ui" line="1234"/> - <location filename="../SettingsView.ui" line="1270"/> + <location filename="../SettingsView.ui" line="1289"/> + <location filename="../SettingsView.ui" line="1325"/> + <location filename="../SettingsView.ui" line="1361"/> <source>Super Game Boy (SGB)</source> - <translation></translation> + <translation>Super Game Boy (SGB)</translation> </message> <message> - <location filename="../SettingsView.ui" line="1203"/> - <location filename="../SettingsView.ui" line="1239"/> - <location filename="../SettingsView.ui" line="1275"/> + <location filename="../SettingsView.ui" line="1294"/> + <location filename="../SettingsView.ui" line="1330"/> + <location filename="../SettingsView.ui" line="1366"/> <source>Game Boy Color (CGB)</source> - <translation></translation> + <translation>Game Boy Color (CGB)</translation> </message> <message> - <location filename="../SettingsView.ui" line="1208"/> - <location filename="../SettingsView.ui" line="1244"/> - <location filename="../SettingsView.ui" line="1280"/> + <location filename="../SettingsView.ui" line="1299"/> + <location filename="../SettingsView.ui" line="1335"/> + <location filename="../SettingsView.ui" line="1371"/> <source>Game Boy Advance (AGB)</source> - <translation></translation> + <translation>Game Boy Advance (AGB)</translation> </message> <message> - <location filename="../SettingsView.ui" line="1216"/> - <source>Super Game Boy model</source> - <translation></translation> + <location filename="../SettingsView.ui" line="1307"/> + <source>Super Game Boy model:</source> + <translation>Super Game Boy 模型:</translation> </message> <message> - <location filename="../SettingsView.ui" line="1252"/> - <source>Game Boy Color model</source> - <translation></translation> + <location filename="../SettingsView.ui" line="1343"/> + <source>Game Boy Color model:</source> + <translation>Game Boy Color 模型:</translation> </message> <message> - <location filename="../SettingsView.ui" line="1295"/> + <location filename="../SettingsView.ui" line="1386"/> <source>Default BG colors:</source> - <translation>默认 BG 颜色:</translation> + <translation>默认背景颜色:</translation> </message> <message> - <location filename="../SettingsView.ui" line="1462"/> + <location filename="../SettingsView.ui" line="1553"/> <source>Super Game Boy borders</source> - <translation></translation> + <translation>Super Game Boy 边框</translation> </message> <message> - <location filename="../SettingsView.ui" line="1476"/> + <location filename="../SettingsView.ui" line="1567"/> <source>Camera driver:</source> - <translation>相机驱动 :</translation> + <translation>相机驱动:</translation> </message> <message> - <location filename="../SettingsView.ui" line="1573"/> + <location filename="../SettingsView.ui" line="1664"/> <source>Default sprite colors 1:</source> - <translation></translation> + <translation>默认精灵图颜色 1:</translation> </message> <message> - <location filename="../SettingsView.ui" line="1580"/> + <location filename="../SettingsView.ui" line="1671"/> <source>Default sprite colors 2:</source> - <translation></translation> + <translation>默认精灵图颜色 2:</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="1678"/> + <source>Use GBC colors in GB games</source> + <translation>在 GB 游戏中使用 GBC 颜色</translation> + </message> + <message> + <location filename="../SettingsView.ui" line="1685"/> + <source>Camera:</source> + <translation>相机</translation> </message> </context> <context>@@ -4614,7 +4771,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"/>@@ -4634,7 +4791,7 @@ </message>
<message> <location filename="../ShaderSelector.ui" line="88"/> <source>Unload Shader</source> - <translation>未载入 着色器</translation> + <translation>未载入着色器</translation> </message> <message> <location filename="../ShaderSelector.ui" line="95"/>@@ -4670,22 +4827,32 @@ <name>TileView</name>
<message> <location filename="../TileView.ui" line="14"/> <source>Tiles</source> - <translation>贴图</translation> + <translation>图块</translation> </message> <message> - <location filename="../TileView.ui" line="140"/> + <location filename="../TileView.ui" line="110"/> <source>256 colors</source> - <translation></translation> + <translation>256 色</translation> </message> <message> - <location filename="../TileView.ui" line="31"/> + <location filename="../TileView.ui" line="123"/> <source>×</source> - <translation></translation> + <translation>×</translation> </message> <message> - <location filename="../TileView.ui" line="44"/> + <location filename="../TileView.ui" line="136"/> <source>Magnification</source> - <translation>放大率</translation> + <translation>缩放率</translation> + </message> + <message> + <location filename="../TileView.ui" line="159"/> + <source>Tiles per row</source> + <translation>每行图块</translation> + </message> + <message> + <location filename="../TileView.ui" line="166"/> + <source>Fit to window</source> + <translation>自适应窗口</translation> </message> </context> <context>@@ -4708,7 +4875,7 @@ </message>
<message> <location filename="../VideoView.ui" line="69"/> <source>Select File</source> - <translation>选取文件</translation> + <translation>选择文件</translation> </message> <message> <location filename="../VideoView.ui" line="101"/>@@ -4717,44 +4884,44 @@ <translation>预置</translation>
</message> <message> <location filename="../VideoView.ui" line="109"/> - <source>High Quality</source> - <translation>高质量</translation> + <source>High &Quality</source> + <translation>高质量(&Q)</translation> </message> <message> <location filename="../VideoView.ui" line="119"/> - <source>YouTube</source> - <translation></translation> + <source>&YouTube</source> + <translation>YouTube(&Y)</translation> </message> <message> <location filename="../VideoView.ui" line="129"/> <location filename="../VideoView.ui" line="237"/> <source>WebM</source> - <translation></translation> + <translation>WebM</translation> </message> <message> <location filename="../VideoView.ui" line="139"/> - <source>Lossless</source> - <translation>无损</translation> + <source>&Lossless</source> + <translation>无损(&L)</translation> </message> <message> <location filename="../VideoView.ui" line="156"/> - <source>1080p</source> - <translation></translation> + <source>&1080p</source> + <translation>1080p(&1)</translation> </message> <message> <location filename="../VideoView.ui" line="166"/> - <source>720p</source> - <translation></translation> + <source>&720p</source> + <translation>720p(&7)</translation> </message> <message> <location filename="../VideoView.ui" line="176"/> - <source>480p</source> - <translation></translation> + <source>&480p</source> + <translation>480p(&4)</translation> </message> <message> <location filename="../VideoView.ui" line="189"/> - <source>Native</source> - <translation>原生</translation> + <source>&Native</source> + <translation>原生(&N)</translation> </message> <message> <location filename="../VideoView.ui" line="222"/>@@ -4764,110 +4931,120 @@ </message>
<message> <location filename="../VideoView.ui" line="232"/> <source>MKV</source> - <translation></translation> + <translation>MKV</translation> </message> <message> <location filename="../VideoView.ui" line="242"/> <source>AVI</source> - <translation></translation> + <translation>AVI</translation> </message> <message> <location filename="../VideoView.ui" line="247"/> <source>MP4</source> - <translation></translation> + <translation>MP4</translation> </message> <message> <location filename="../VideoView.ui" line="259"/> <source>h.264</source> - <translation></translation> + <translation>h.264</translation> </message> <message> <location filename="../VideoView.ui" line="264"/> <source>h.264 (NVENC)</source> - <translation></translation> + <translation>h.264 (NVENC)</translation> </message> <message> <location filename="../VideoView.ui" line="269"/> <source>HEVC</source> - <translation></translation> + <translation>HEVC</translation> </message> <message> <location filename="../VideoView.ui" line="274"/> + <source>HEVC (NVENC)</source> + <translation>HEVC (NVENC)</translation> + </message> + <message> + <location filename="../VideoView.ui" line="279"/> <source>VP8</source> - <translation></translation> + <translation>VP8</translation> + </message> + <message> + <location filename="../VideoView.ui" line="284"/> + <source>VP9</source> + <translation>VP9</translation> </message> <message> - <location filename="../VideoView.ui" line="279"/> + <location filename="../VideoView.ui" line="289"/> <source>FFV1</source> - <translation></translation> + <translation>FFV1</translation> </message> <message> - <location filename="../VideoView.ui" line="291"/> + <location filename="../VideoView.ui" line="301"/> <source>FLAC</source> - <translation></translation> + <translation>FLAC</translation> </message> <message> - <location filename="../VideoView.ui" line="296"/> + <location filename="../VideoView.ui" line="306"/> <source>Opus</source> - <translation></translation> + <translation>Opus</translation> </message> <message> - <location filename="../VideoView.ui" line="301"/> + <location filename="../VideoView.ui" line="311"/> <source>Vorbis</source> - <translation></translation> + <translation>Vorbis</translation> </message> <message> - <location filename="../VideoView.ui" line="306"/> + <location filename="../VideoView.ui" line="316"/> <source>MP3</source> - <translation></translation> + <translation>MP3</translation> </message> <message> - <location filename="../VideoView.ui" line="311"/> + <location filename="../VideoView.ui" line="321"/> <source>AAC</source> - <translation></translation> + <translation>AAC</translation> </message> <message> - <location filename="../VideoView.ui" line="316"/> + <location filename="../VideoView.ui" line="326"/> <source>Uncompressed</source> <translation>未压缩</translation> </message> <message> - <location filename="../VideoView.ui" line="327"/> - <source> Bitrate (kbps)</source> - <translation></translation> + <location filename="../VideoView.ui" line="337"/> + <source>Bitrate (kbps)</source> + <translation>比特率 (kbps)</translation> </message> <message> - <location filename="../VideoView.ui" line="333"/> - <source>VBR </source> - <translation></translation> + <location filename="../VideoView.ui" line="343"/> + <source>VBR</source> + <translation>VBR</translation> </message> <message> - <location filename="../VideoView.ui" line="378"/> + <location filename="../VideoView.ui" line="388"/> <source>ABR</source> - <translation></translation> + <translation>ABR</translation> </message> <message> - <location filename="../VideoView.ui" line="394"/> + <location filename="../VideoView.ui" line="404"/> <source>Dimensions</source> - <translation>方向</translation> + <translation>维度</translation> </message> <message> - <location filename="../VideoView.ui" line="400"/> + <location filename="../VideoView.ui" line="410"/> <source>:</source> - <translation></translation> + <translation>:</translation> </message> <message> - <location filename="../VideoView.ui" line="410"/> + <location filename="../VideoView.ui" line="420"/> <source>×</source> - <translation></translation> + <translation>×</translation> </message> <message> - <location filename="../VideoView.ui" line="460"/> + <location filename="../VideoView.ui" line="470"/> <source>Lock aspect ratio</source> <translation>锁定纵横比</translation> </message> <message> - <location filename="../VideoView.ui" line="475"/> + <location filename="../VideoView.ui" line="485"/> <source>Show advanced</source> <translation>显示高级选项</translation> </message>
@@ -60,7 +60,7 @@ set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/main.c)
if(BUILD_RASPI) add_definitions(-DBUILD_RASPI) - list(APPEND PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/opengl/gles2.c ${CMAKE_SOURCE_DIR}/src/platform/sdl/gl-common.c) + list(APPEND PLATFORM_SRC ${CMAKE_SOURCE_DIR}/src/platform/opengl/gles2.c ${CMAKE_SOURCE_DIR}/src/platform/sdl/gl-common.c ${CMAKE_SOURCE_DIR}/src/platform/sdl/rpi-common.c) list(APPEND MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/gles2-sdl.c) set(OPENGLES2_LIBRARY "-lEGL -lGLESv2 -lbcm_host") set(BUILD_GLES2 ON CACHE BOOL "Using OpenGL|ES 2" FORCE)
@@ -6,6 +6,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "main.h" #include "gl-common.h" +#ifdef BUILD_RASPI +#include "rpi-common.h" +#endif #include <mgba/core/core.h> #include <mgba/core/thread.h>@@ -26,74 +29,7 @@ }
bool mSDLGLES2Init(struct mSDLRenderer* renderer) { #ifdef BUILD_RASPI - bcm_host_init(); - renderer->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); - int major, minor; - if (EGL_FALSE == eglInitialize(renderer->display, &major, &minor)) { - printf("Failed to initialize EGL"); - return false; - } - - if (EGL_FALSE == eglBindAPI(EGL_OPENGL_ES_API)) { - printf("Failed to get GLES API"); - return false; - } - - const EGLint requestConfig[] = { - EGL_RED_SIZE, 5, - EGL_GREEN_SIZE, 5, - EGL_BLUE_SIZE, 5, - EGL_ALPHA_SIZE, 1, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_NONE - }; - - EGLConfig config; - EGLint numConfigs; - - if (EGL_FALSE == eglChooseConfig(renderer->display, requestConfig, &config, 1, &numConfigs)) { - printf("Failed to choose EGL config\n"); - return false; - } - - const EGLint contextAttributes[] = { - EGL_CONTEXT_CLIENT_VERSION, 2, - EGL_NONE - }; - - int dispWidth = 240, dispHeight = 160, adjWidth; - renderer->context = eglCreateContext(renderer->display, config, EGL_NO_CONTEXT, contextAttributes); - graphics_get_display_size(0, &dispWidth, &dispHeight); - adjWidth = dispHeight / 2 * 3; - - DISPMANX_DISPLAY_HANDLE_T display = vc_dispmanx_display_open(0); - DISPMANX_UPDATE_HANDLE_T update = vc_dispmanx_update_start(0); - - VC_RECT_T destRect = { - .x = (dispWidth - adjWidth) / 2, - .y = 0, - .width = adjWidth, - .height = dispHeight - }; - - VC_RECT_T srcRect = { - .x = 0, - .y = 0, - .width = 240 << 16, - .height = 160 << 16 - }; - - DISPMANX_ELEMENT_HANDLE_T element = vc_dispmanx_element_add(update, display, 0, &destRect, 0, &srcRect, DISPMANX_PROTECTION_NONE, 0, 0, 0); - vc_dispmanx_update_submit_sync(update); - - renderer->window.element = element; - renderer->window.width = dispWidth; - renderer->window.height = dispHeight; - - renderer->surface = eglCreateWindowSurface(renderer->display, config, &renderer->window, 0); - if (EGL_FALSE == eglMakeCurrent(renderer->display, renderer->surface, renderer->surface, renderer->context)) { - return false; - } + mRPIGLCommonInit(renderer); #else mSDLGLCommonInit(renderer); #endif@@ -112,7 +48,11 @@ renderer->gl2.d.user = renderer;
renderer->gl2.d.lockAspectRatio = renderer->lockAspectRatio; renderer->gl2.d.lockIntegerScaling = renderer->lockIntegerScaling; renderer->gl2.d.filter = renderer->filter; +#ifdef BUILD_RASPI + renderer->gl2.d.swap = mRPIGLCommonSwap; +#else renderer->gl2.d.swap = mSDLGLCommonSwap; +#endif renderer->gl2.d.init(&renderer->gl2.d, 0); renderer->gl2.d.setDimensions(&renderer->gl2.d, renderer->width, renderer->height);@@ -147,11 +87,7 @@ v->postFrame(v, renderer->outputBuffer);
} mCoreSyncWaitFrameEnd(&context->impl->sync); v->drawFrame(v); -#ifdef BUILD_RASPI - eglSwapBuffers(renderer->display, renderer->surface); -#else v->swap(v); -#endif } }@@ -160,10 +96,10 @@ if (renderer->gl2.d.deinit) {
renderer->gl2.d.deinit(&renderer->gl2.d); } #ifdef BUILD_RASPI - eglMakeCurrent(renderer->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroySurface(renderer->display, renderer->surface); - eglDestroyContext(renderer->display, renderer->context); - eglTerminate(renderer->display); + eglMakeCurrent(renderer->eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroySurface(renderer->eglDisplay, renderer->eglSurface); + eglDestroyContext(renderer->eglDisplay, renderer->eglContext); + eglTerminate(renderer->eglDisplay); bcm_host_deinit(); #elif SDL_VERSION_ATLEAST(2, 0, 0) SDL_GL_DeleteContext(renderer->glCtx);
@@ -81,10 +81,10 @@ pixman_image_t* screenpix;
#endif #ifdef BUILD_RASPI - EGLDisplay display; - EGLSurface surface; - EGLContext context; - EGL_DISPMANX_WINDOW_T window; + EGLDisplay eglDisplay; + EGLSurface eglSurface; + EGLContext eglContext; + EGL_DISPMANX_WINDOW_T eglWindow; #endif #ifdef BUILD_PANDORA
@@ -0,0 +1,84 @@
+/* Copyright (c) 2013-2015 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 "main.h" + +#include <mgba/core/version.h> + +void mRPIGLCommonSwap(struct VideoBackend* context) { + struct mSDLRenderer* renderer = (struct mSDLRenderer*) context->user; + eglSwapBuffers(renderer->eglDisplay, renderer->eglSurface); +} + +void mRPIGLCommonInit(struct mSDLRenderer* renderer) { + bcm_host_init(); + renderer->eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); + int major, minor; + if (EGL_FALSE == eglInitialize(renderer->eglDisplay, &major, &minor)) { + printf("Failed to initialize EGL"); + return false; + } + + if (EGL_FALSE == eglBindAPI(EGL_OPENGL_ES_API)) { + printf("Failed to get GLES API"); + return false; + } + + const EGLint requestConfig[] = { + EGL_RED_SIZE, 5, + EGL_GREEN_SIZE, 5, + EGL_BLUE_SIZE, 5, + EGL_ALPHA_SIZE, 1, + EGL_SURFACE_TYPE, EGL_WINDOW_BIT, + EGL_NONE + }; + + EGLConfig config; + EGLint numConfigs; + + if (EGL_FALSE == eglChooseConfig(renderer->eglDisplay, requestConfig, &config, 1, &numConfigs)) { + printf("Failed to choose EGL config\n"); + return false; + } + + const EGLint contextAttributes[] = { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + + int dispWidth = 240, dispHeight = 160, adjWidth; + renderer->eglContext = eglCreateContext(renderer->eglDisplay, config, EGL_NO_CONTEXT, contextAttributes); + graphics_get_display_size(0, &dispWidth, &dispHeight); + adjWidth = dispHeight / 2 * 3; + + DISPMANX_DISPLAY_HANDLE_T display = vc_dispmanx_display_open(0); + DISPMANX_UPDATE_HANDLE_T update = vc_dispmanx_update_start(0); + + VC_RECT_T destRect = { + .x = (dispWidth - adjWidth) / 2, + .y = 0, + .width = adjWidth, + .height = dispHeight + }; + + VC_RECT_T srcRect = { + .x = 0, + .y = 0, + .width = 240 << 16, + .height = 160 << 16 + }; + + DISPMANX_ELEMENT_HANDLE_T element = vc_dispmanx_element_add(update, display, 0, &destRect, 0, &srcRect, DISPMANX_PROTECTION_NONE, 0, 0, 0); + vc_dispmanx_update_submit_sync(update); + + renderer->eglWindow.element = element; + renderer->eglWindow.width = dispWidth; + renderer->eglWindow.height = dispHeight; + + renderer->eglSurface = eglCreateWindowSurface(renderer->eglDisplay, config, &renderer->eglWindow, 0); + if (EGL_FALSE == eglMakeCurrent(renderer->eglDisplay, renderer->eglSurface, renderer->eglSurface, renderer->eglContext)) { + return false; + } +}
@@ -0,0 +1,20 @@
+/* Copyright (c) 2013-2015 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 SDL_RPI_COMMON_H +#define SDL_RPI_COMMON_H + +#include <mgba-util/common.h> + +CXX_GUARD_START + +#include "main.h" + +void mRPIGLCommonSwap(struct VideoBackend* context); +void mRPIGLCommonInit(struct mSDLRenderer* renderer); + +CXX_GUARD_END + +#endif
@@ -1,14 +1,4 @@
-if(DEFINED ENV{DEVKITPRO}) - set(DEVKITPRO $ENV{DEVKITPRO}) -else() - message(FATAL_ERROR "Could not find DEVKITPRO in environment") -endif() - -if(DEFINED ENV{DEVKITA64}) - set(DEVKITA64 $ENV{DEVKITA64}) -else() - set(DEVKITA64 ${DEVKITPRO}/devkitA64) -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../cmake/devkitPro.cmake) if(DEFINED ENV{LIBNX}) set(LIBNX $ENV{LIBNX})@@ -16,41 +6,17 @@ else()
set(LIBNX ${DEVKITPRO}/libnx) endif() -set(extension) -if (CMAKE_HOST_WIN32) - set(extension .exe) -endif() - -set(CMAKE_PROGRAM_PATH ${DEVKITA64}/bin) set(cross_prefix aarch64-none-elf-) set(arch_flags "-mtune=cortex-a57 -ffunction-sections -march=armv8-a -mtp=soft -fPIC -ftls-model=local-exec") set(inc_flags "-I${LIBNX}/include ${arch_flags}") set(link_flags "-L${LIBNX}/lib -lnx -specs=${LIBNX}/switch.specs ${arch_flags}") -set(CMAKE_SYSTEM_NAME Generic CACHE INTERNAL "system name") set(CMAKE_SYSTEM_PROCESSOR aarch64 CACHE INTERNAL "processor") set(CMAKE_LIBRARY_ARCHITECTURE aarch64-none-elf CACHE INTERNAL "abi") -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_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") -SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>") - -set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags") -set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags") -set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared link flags") +set(SWITCH ON) +add_definitions(-D__SWITCH__) -set(CMAKE_FIND_ROOT_PATH ${DEVKITARM}/aarch64-none-elf ${DEVKITPRO}/portlibs/switch) -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) +create_devkit(A64) -set(SWITCH ON) -add_definitions(-D__SWITCH__) +set(CMAKE_FIND_ROOT_PATH ${DEVKITA64}/${CMAKE_LIBRARY_ARCHITECTURE} ${DEVKITPRO}/portlibs/switch)
@@ -1,49 +1,16 @@
-if(DEFINED ENV{DEVKITPRO}) - set(DEVKITPRO $ENV{DEVKITPRO}) -else() - message(FATAL_ERROR "Could not find DEVKITPRO in environment") -endif() +include(${CMAKE_CURRENT_LIST_DIR}/../cmake/devkitPro.cmake) -if(DEFINED ENV{DEVKITPPC}) - set(DEVKITPPC $ENV{DEVKITPPC}) -else() - set(DEVKITPPC ${DEVKITPRO}/devkitPPC) -endif() - -set(extension) -if (CMAKE_HOST_WIN32) - set(extension .exe) -endif() - -set(CMAKE_PROGRAM_PATH ${DEVKITPPC}/bin) set(cross_prefix powerpc-eabi-) set(arch_flags "-mrvl -mcpu=750 -meabi -mhard-float -g") set(inc_flags "-I${DEVKITPRO}/libogc/include ${arch_flags}") set(link_flags "-L${DEVKITPRO}/libogc/lib/wii ${arch_flags}") -set(CMAKE_SYSTEM_NAME Generic CACHE INTERNAL "system name") set(CMAKE_SYSTEM_PROCESSOR powerpc CACHE INTERNAL "processor") set(CMAKE_LIBRARY_ARCHITECTURE powerpc-none-eabi CACHE INTERNAL "abi") -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_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") +set(WII ON) +add_definitions(-DGEKKO) -set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags") -set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags") -set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared link flags") +create_devkit(PPC) set(CMAKE_FIND_ROOT_PATH ${DEVKITPPC}/powerpc-eabi ${DEVKITPRO}/portlibs/ppc) -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) - -set(WII ON) -add_definitions(-DGEKKO)
@@ -25,8 +25,8 @@
size_t RingFIFOSize(const struct RingFIFO* buffer) { const void* read; const void* write; - ATOMIC_LOAD(read, buffer->readPtr); - ATOMIC_LOAD(write, buffer->writePtr); + ATOMIC_LOAD_PTR(read, buffer->readPtr); + ATOMIC_LOAD_PTR(write, buffer->writePtr); if (read <= write) { return (uintptr_t) write - (uintptr_t) read; } else {@@ -35,14 +35,14 @@ }
} void RingFIFOClear(struct RingFIFO* buffer) { - ATOMIC_STORE(buffer->readPtr, buffer->data); - ATOMIC_STORE(buffer->writePtr, buffer->data); + ATOMIC_STORE_PTR(buffer->readPtr, buffer->data); + ATOMIC_STORE_PTR(buffer->writePtr, buffer->data); } size_t RingFIFOWrite(struct RingFIFO* buffer, const void* value, size_t length) { void* data = buffer->writePtr; void* end; - ATOMIC_LOAD(end, buffer->readPtr); + ATOMIC_LOAD_PTR(end, buffer->readPtr); // Wrap around if we can't fit enough in here if ((uintptr_t) data - (uintptr_t) buffer->data + length >= buffer->capacity) {@@ -67,14 +67,14 @@ }
if (value) { memcpy(data, value, length); } - ATOMIC_STORE(buffer->writePtr, (void*) ((intptr_t) data + length)); + ATOMIC_STORE_PTR(buffer->writePtr, (void*) ((intptr_t) data + length)); return length; } size_t RingFIFORead(struct RingFIFO* buffer, void* output, size_t length) { void* data = buffer->readPtr; void* end; - ATOMIC_LOAD(end, buffer->writePtr); + ATOMIC_LOAD_PTR(end, buffer->writePtr); // Wrap around if we can't fit enough in here if ((uintptr_t) data - (uintptr_t) buffer->data + length >= buffer->capacity) {@@ -99,6 +99,6 @@ }
if (output) { memcpy(output, data, length); } - ATOMIC_STORE(buffer->readPtr, (void*) ((uintptr_t) data + length)); + ATOMIC_STORE_PTR(buffer->readPtr, (void*) ((uintptr_t) data + length)); return length; }
@@ -18,7 +18,7 @@ #define M_TEST_SUITE_DEFINE_TEARDOWN(NAME, ...) M_TEST_SUITE_DEFINE_EX(NAME, NULL, _testSuite_teardown_ ## NAME, __VA_ARGS__)
#define M_TEST_SUITE_DEFINE_SETUP_TEARDOWN(NAME, ...) M_TEST_SUITE_DEFINE_EX(NAME, _testSuite_setup_ ## NAME, _testSuite_teardown_ ## NAME, __VA_ARGS__) #define M_TEST_SUITE_DEFINE_EX(NAME, SETUP, TEARDOWN, ...) \ int main(void) { \ - const static struct CMUnitTest tests[] = { \ + static const struct CMUnitTest tests[] = { \ __VA_ARGS__ \ }; \ return cmocka_run_group_tests_name(# NAME, tests, SETUP, TEARDOWN); \