高级配置指南

本指南涵盖 mGBA 中的高级配置选项,包括模拟精度设置、性能调优以及针对特定用例的优化技术。

模拟精度设置

CPU 精度

mGBA 提供两种 CPU 精度模式:

  • 普通模式: 平衡的精度和性能(默认)。适合大多数游戏和一般使用。在保持良好的性能的同时提供出色的兼容性。
  • 精确模式: 具有周期精确时序的最大精度。非常适合速通、专业测试和精度关键的应用程序。可能会有稍高的 CPU 使用率。

内存时序

配置内存总线时序精度:

  • 普通时序: 近似内存时序(更快,适合大多数游戏)
  • 精确时序: 周期精确的内存时序(较慢,更准确)

DMA 时序

DMA(直接内存访问)传输时序:

  • 普通 DMA: 近似 DMA 时序
  • 精确 DMA: 周期精确的 DMA 时序

性能配置

跳帧

配置跳帧以在较慢的硬件上保持性能:

  • 无: 渲染每一帧(60 FPS)
  • 手动: 手动跳帧控制
  • 自动: 当性能下降时自动跳帧
  • 最大帧数: 最大跳帧数(0-10)

快进

配置快进设置:

  • 速度: 快进倍数(1x 到 10x)
  • 无限制: 允许无限快进速度
  • 快捷键: 配置快进快捷键(默认:Tab)

CPU 超频

调整模拟的 CPU 速度:

  • 速度: CPU 速度倍数(0.5x 到 10x)
  • 1x: 正常速度(默认)
  • 2x: 双倍速度(用于测试)
  • 0.5x: 半速(用于调试)
警告: CPU 超频可能导致时序问题和游戏不兼容。请谨慎使用。

Video Configuration

Advanced Rendering Options

  • VSync: Vertical synchronization (on/off)
  • Threaded Video: Run video rendering in separate thread (improves performance)
  • Hardware Accelerated Scaling: Use GPU for scaling operations
  • Anti-Aliasing: Anti-aliasing level (0-4x MSAA)

Custom Shaders

Load custom GLSL shaders for advanced visual effects:

  1. Create or download a GLSL shader file (.frag or .glsl)
  2. Go to Settings → Video → Shader
  3. Select "Load Shader"
  4. Choose your shader file
  5. Adjust shader parameters if available

Audio Configuration

Audio Quality Settings

  • Sample Rate: Audio sample rate (8kHz to 48kHz, default: 44.1kHz)
  • Buffer Size: Audio buffer size (512 to 8192 samples, default: 2048)
  • Resampling Quality: Low, Medium, High quality audio resampling
  • Volume Control: Master volume (0% to 200%)

Audio Backends

Select audio backend based on your platform:

  • SDL: Cross-platform audio (default on desktop)
  • OpenAL: Advanced audio library
  • CoreAudio: macOS/iOS native audio
  • DirectSound: Windows native audio

Input Configuration

Advanced Input Options

  • Input Polling: Polling method for input (immediate, on-frame)
  • Analog Input: Enable analog stick support for compatible controllers
  • Input Remapping: Save and load input configurations
  • Multiple Profiles: Create different input profiles for different games

Save State Configuration

Save State Options

  • Auto-Save: Automatically save state at intervals
  • Auto-Save Interval: Time between auto-saves (seconds)
  • Save State Format: Compression level for save states
  • Save State Location: Custom directory for save states

BIOS Configuration

Using Real BIOS

To use a real Game Boy Advance BIOS:

  1. Obtain a legal Game Boy Advance BIOS dump
  2. Go to Settings → Emulation → BIOS
  3. Select "Use BIOS"
  4. Browse to your BIOS file
  5. Enable "Skip BIOS" to skip intro sequence (optional)
Legal Note: You must own a Game Boy Advance to legally dump and use a BIOS file. Sharing or distributing BIOS files may violate copyright laws.

Rewind Feature

mGBA supports a rewind feature that allows you to "undo" gameplay:

  • Enable Rewind: Enable rewind functionality
  • Rewind Buffer Size: Number of frames to store in rewind buffer
  • Rewind Hotkey: Configure hotkey for rewinding
  • Rewind Speed: Speed of rewinding (1x to 10x)

Advanced Features

Frame Advance

Frame advance allows you to step through gameplay frame-by-frame:

  • Enable Frame Advance: Enable frame advance mode
  • Frame Advance Hotkey: Configure hotkey for advancing frames
  • Frame Skip: Number of frames to advance per keypress

Cheat Codes

Advanced cheat code management:

  • Cheat Code Formats: GameShark, Action Replay, CodeBreaker support
  • Cheat Categories: Organize cheats by category
  • Cheat Import/Export: Import cheats from files or export to files
  • Cheat Auto-Load: Automatically load cheats when ROM loads

Optimization Tips

For Low-End Hardware

  • Use software rendering if hardware acceleration is unavailable
  • Reduce resolution scaling (1x or 2x)
  • Enable frame skipping to maintain playable framerate
  • Reduce audio buffer size
  • Disable unnecessary visual effects

For High-End Hardware

  • Use hardware acceleration (Vulkan, Direct3D 11, Metal)
  • Increase resolution scaling (3x or 4x)
  • Enable threaded rendering for better performance
  • Use high-quality audio settings
  • Enable advanced visual effects and shaders

Configuration Profiles

mGBA supports configuration profiles for different games or use cases:

  • Create Profile: Save current settings as a profile
  • Load Profile: Load a saved configuration profile
  • Profile Management: Create, rename, delete profiles
  • Game-Specific Profiles: Automatically load profile for specific games
Tip: Create different profiles for speedrunning (accurate mode) and casual play (normal mode with performance optimizations) to easily switch between configurations.

相关文章

有关 mGBA 配置和优化的更多信息: