Difference between revisions of "Gens/GS II"

From Sega Retro

(→‎Features not ported from Gens/GS yet: Stretch mode configuration implemented in commit d7b2773f.)
Line 25: Line 25:
 
** The "General Configuration" window uses a unified toolbar instead of tabs.
 
** The "General Configuration" window uses a unified toolbar instead of tabs.
 
** Configuration changes are applied immediately.
 
** Configuration changes are applied immediately.
 +
* Fully-customizable keyboard shortcuts. There's no UI for it yet, but keyboard shortcuts can be customized in the configuration file.
  
 
==Planned Features==
 
==Planned Features==

Revision as of 02:10, 28 February 2011

Gens/GS II is a partial rewrite of Gens/GS written by GerbilSoft. Gens/GS II improves the basic framework of the emulator, which will allow for the addition of many new features.

New features in Gens/GS II

  • The UI now uses the Qt 4 library instead of GTK+ on Linux and Win32 on Windows. This means only one UI needs to be maintained for all platforms, instead of maintaining two separate UIs. It also means that Mac OS X is now supported natively.
  • Full Unicode support provided by the Qt 4 library. (The onscreen display is still limited to cp1252; I may extend this later, but it's unlikely.)
    • libgens does not use Qt, though it handles strings using UTF-8 natively. For full compatibility, it has parts of Gens/GS r7+'s Win32 Unicode Translation Layer in order to convert strings to/from ANSI and UTF-16 as necessary.
  • The UI and emulation code are split into separate internal projects: libgens (for emulation) and gens-qt4 (for Qt4 UI). Additional UIs can be added later for other platforms, e.g. gens-win32 (for a minimal Win32 UI for Win9x, since Qt4 doesn't work on 9x) and gens-wii.
  • ZOMG savestate format. Compared to the previous GSX-extended format, the ZOMG savestate format has much more comprehensive documentation and is extensible in a well-defined manner.
  • OpenGL rendering. Gens/GS had OpenGL rendering on Linux, but Gens/GS II uses OpenGL rendering on all supported platforms.
  • OpenGL shaders. Shader programs are used to provide certain effects, such as fast blur and the paused tint. Software fallbacks are still provided for systems that don't have the GL_ARB_fragment_program extension.
  • 1x and 2x renderers are removed in favor of simply blitting to the OpenGL texture. 2x support is emulated by setting 640x480 output with nearest-neighbor interpolation.
  • Support for more types of input devices. 3-button and 6-button gamepads are supported, but in addition, 2-button (SMS) gamepads are now supported. Teamplayer and 4WP support is much improved, and there's initial Sega Mouse support. The controller configuration interface is not complete yet, so it's not possible to configure the controllers at the moment.
  • Improved I/O tristate control. If a controller bit is set to input, then that bit shows up as a 1 on the controller side. Gens and Gens/GS do not properly implement this, but Gens/GS II does.
  • Screenshots are now always saved in PNG format.
  • The VDP emulator has been ported from x86 assembly language to C++. (This was partially done in Gens/GS r7+, but Gens/GS II finishes it.) Among other things, it now passes all tests in Nemesis' Sprite Masking & Overflow Test ROM.
  • Interlaced mode is now displayed using "flickering" interlaced (like Regen). That is, even fields are shown on one frame, and odd fields are shown on the next. This is a configurable option, and can be switched to flickering, even only (Gens-style), and odd only. 2x resolution mode (Kega-style) will be added later.
  • Support for EEPROM save chips. Some games use Atmel I2C EEPROM chips instead of SRAM chips (e.g. NBA Jam), resulting in non-functional game save support on Gens/GS. With EEPROM support, game saving now works.
  • Automatic SRAM/EEPROM saving. The SRAM/EEPROM contents is automatically saved to disk approximately one second after the game writes any data to the SRAM/EEPROM chip. This ensures that the internal save game is saved in case the emulator is shut down improperly (e.g. due to a crash or a power failure). Autosave is also triggered if the emulation is paused (by pressing Escape) or if a savestate with SRAM/EEPROM is loaded.
  • Initial 64-bit and PowerPC ports. Compiling on these platforms currently results in a "no-emulation" build; that is, the CPU cores are not compiled, since they're still written in x86 assembly language. This does let me test the other components on these platforms, though. (DEBUGGING PURPOSES ONLY!)
  • Color adjustment now has a fully-working "Inverted" option. In Gens/GS (and probably old Gens), using the "Inverted" option resulted in the wrong colors if brightness was not 0 or contrast was less than 0.
  • Initial CD-ROM drive detection. Three backends are currently available: UDisks, Unix, and Win32. UDisks is the most featureful at the moment, since it detects new discs and drives immediately. Unix is mostly a fallback for Unix systems that don't have UDisks. Win32 does not automatically detect new discs yet, but it does display the Win32 disc icon.
  • Sega CD Boot ROM configuration. The boot ROMs are examined when they are selected to determine their version and region code, and information is displayed regarding their compatibility. (Sega CD emulation hasn't been reimplemented yet.)
  • Configuration is saved in ~/.config/gens-gs-ii/gens-gs-ii.conf (Unix, Linux, Mac OS X) or %APPDATA%\gens-gs-ii\gens-gs-ii.conf (Win32). A "portable" option will be added later for Win32, which will save the configuration in the executable's directory.
  • Mac OS X customizations:
    • The "General Configuration" window uses a unified toolbar instead of tabs.
    • Configuration changes are applied immediately.
  • Fully-customizable keyboard shortcuts. There's no UI for it yet, but keyboard shortcuts can be customized in the configuration file.

Planned Features

  • Standalone savestate viewer, which will allow users to view tiles, scroll planes, and sprites. This will later be integrated into an MDP plugin for real-time debugging functionality. Both ZOMG and GST savestates will be supported.
  • Possibly a built-in "Credits Roll" ROM that displays the libgens credits in a fancy way.
  • Automatic savestate option when closing an emulator. When reopening the emulator, the ROM and savestate would automatically be reloaded. (Suggested by gold_lightning in #retro.)
  • Rewritten PCM emulator with proper support for the Envelope register.
  • Rewritten CD-ROM handler with an abstract class interface. ISO/WAV and BIN/CUE will be implemented initially; ISO/MP3 may be added later. Physical CD-ROM support will probably be added after v1.0, since it requires different implementations on each platform. (BSD, Mac OS X, and Win32 all appear to use some sort of SCSI pass-through system, so it might be possible to write a single SCSI McdReader class with thin wrappers for the OS-dependent code. Linux has much simpler CD-ROM ioctl()'s, so it will probably be implemented first.)

Known Issues

  • Framedropping doesn't work yet. If the system slows down for any reason, the emulator will stutter instead of dropping frames.

Features not ported from Gens/GS yet

  • MDP plugin support.
  • Sega CD and 32X emulation.

Preliminary Version Schedule

  • Technical Preview 1: Implement framedropping; MD emulation fully implemented, along with ZOMG 0.8.
  • Technical Preview 2: Sega CD emulation implemented with ISO/WAV and BIN/CUE support, along with ZOMG 0.9.
  • Technical Preview 3: 32X emulation implemented, along with ZOMG 1.0.
  • 1.0: Reimplement MDP plugin support and renderers.