diff --git a/.gitignore b/.gitignore
index 5524d520a..8e6d3e86a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,5 @@ src/**/*.psess
src/**/*.vspx
src/**/**.pdb
Stella.xcscheme
+src/tools/fonts/*
+
diff --git a/Announce.txt b/Announce.txt
index 18f636c79..2262f7975 100644
--- a/Announce.txt
+++ b/Announce.txt
@@ -9,7 +9,7 @@
SSSS ttt eeeee llll llll aaaaa
===========================================================================
- Release 6.1 for Linux, macOS and Windows
+ Release 6.2.1 for Linux, macOS and Windows
===========================================================================
The Atari 2600 Video Computer System (VCS), introduced in 1977, was the
@@ -21,27 +21,27 @@ all of your favourite Atari 2600 games again! Stella was originally
developed for Linux by Bradford W. Mott, however, it has been ported to a
number of other platforms and is currently maintained by Stephen Anthony.
-This is the 6.1 release of Stella for Linux, macOS and Windows. The
+This is the 6.2.1 release of Stella for Linux, macOS and Windows. The
distributions currently available are:
* Binaries for Windows Vista/7/8/10 :
- Stella-6.1-win32.exe (32-bit EXE installer)
- Stella-6.1-x64.exe (64-bit EXE installer)
- Stella-6.1-windows.zip (32/64 bit versions)
+ Stella-6.2.1-win32.exe (32-bit EXE installer)
+ Stella-6.2.1-x64.exe (64-bit EXE installer)
+ Stella-6.2.1-windows.zip (32/64 bit versions)
* Binary distribution for macOS 10.7 and above :
- Stella-6.1-macos.dmg (64-bit Intel)
+ Stella-6.2.1-macos.dmg (64-bit Intel)
* Binary distribution in 32-bit & 64-bit Ubuntu DEB format :
- stella_6.1-1_i386.deb
- stella_6.1-1_amd64.deb
+ stella_6.2.1-1_i386.deb
+ stella_6.2.1-1_amd64.deb
* Binary distribution in 32-bit & 64-bit RPM format :
- stella-6.1-2.i386.rpm
- stella-6.1-2.x86_64.rpm
+ stella-6.2.1-2.i386.rpm
+ stella-6.2.1-2.x86_64.rpm
* Source code distribution for all platforms :
- stella-6.1-src.tar.xz
+ stella-6.2.1-src.tar.xz
Distribution Site
diff --git a/Changes.txt b/Changes.txt
index 3ca8e06c5..9db31b627 100644
--- a/Changes.txt
+++ b/Changes.txt
@@ -12,7 +12,155 @@
Release History
===========================================================================
-6.0.2 to 6.1: (MM dd, 2020)
+6.2.1 to 6.3 (XXXX XX, 2020)
+
+ * Added adjustable autofire.
+
+ * Added 'Dark' UI theme. (TODO: DOC)
+
+ * Extended global hotkeys for debug options.
+
+ * Added option to playback a game using the Time Machine.
+
+ * Allow taking snapshots from within the Time Machine dialog.
+
+ * Added the ability to access most files that Stella uses from within a
+ ZIP file. This includes the following:
+ - Per-ROM properties file (so one can distribute a ROM and its
+ associated properties).
+ - Debugger symbol (.sym) and list (.lst) files, etc.
+ - Several others, as we extend the support.
+ Basically, you are now able to put many files that Stella uses inside
+ one ZIP file, and distribute just that file.
+
+ * Added option to select the audio device.
+
+ * Added option to display detected settings info when a ROM is loaded.
+
+ * Replaced "Re-disassemble" with "Disassemble @ current line" in debugger.
+
+ * Fixed bug when taking fullscreen snapshots; the dimensions were
+ sometimes cut off.
+
+-Have fun!
+
+
+6.2 to 6.2.1: (June 20, 2020)
+
+ * Fixed Pitfall II ROM not working correctly.
+
+ * Fixed crashes when using some combinations of bankswitching schemes on
+ incorrect ROMs, or when using invalid ROM file sizes, etc.
+
+ * Fixed RIOT timer behaviour on reading/writing at the wraparound cycle.
+
+ * Fixed incorrectly setting D6 bit on TIA reads in some cases. Related
+ to this, improve 'tiadriven' option to randomize only D5..D0 bits.
+
+ * Fixed custom palette and TV effects adjustable slider rounding issue.
+
+ * Fixed some bugs in 3E+ scheme when using non-standard ROM sizes.
+
+ * Fixed crash in Audio & Video dialog when opened from debugger, and the
+ debugger window sometimes being resized when using the Options dialog.
+
+ * Make NTSC custom phase shift not affect Yellow anymore.
+
+ * Fixed '1x' snapshot mode; TV effects are now disabled. This mode
+ now generates a clean, pixel-exact image.
+
+ * Fixed mappings sometimes not being saved in the Retron77 port.
+
+ * A ROM properties file may now be placed next to the ROM (with the same
+ name as the ROM, except ending in .pro), and Stella will automatically
+ apply the properties to the ROM. [NOTE: this was present in 6.2, but
+ was mistakenly left out of the changelog]
+
+ * Added button to Game Info dialog to save properties of the currently
+ loaded ROM to a separate properties file (in the default save directory).
+ This is useful in conjunction with the previous item.
+
+ * Allow changing custom palette and TV effects adjustables in 1% steps
+ again.
+
+ * Updated documentation for changes in ROM properties key names.
+
+ * The codebase now compiles under gcc6 again. Future versions will
+ require gcc7, though.
+
+
+6.1.2 to 6.2: (June 7, 2020)
+
+ * Added interactive palette to Video & Audio settings.
+
+ * Added 'Custom' palette, generated from user controlled phase shifts.
+
+ * Added that adjustable audio & video settings are displayed as gauge bars.
+
+ * Added four global hotkeys which allow selecting and changing numerous
+ audio & video settings without having to remember the dedicated hotkeys.
+
+ * Added 'Turbo' mode, runs the game as fast as the computer allows.
+
+ * Added that paddle centering (per ROM) and sensitivity can be adjusted.
+
+ * Added that mouse sensitivity for Driving controller can be adjusted.
+
+ * Added paddle filtering in UI to avoid unwanted navigation events.
+
+ * Added selectable dialog fonts.
+
+ * Added separate positioning of launcher, emulator and debugger.
+
+ * Added optional display to game refresh rate adaption in fullscreen mode.
+
+ * Added option which lets default ROM path follow launcher navigation.
+
+ * Added debugger 'saveaccess' function, which saves memory access counts to
+ a CSV file.
+
+ * Added displaying last write address in the debugger.
+
+ * Added debugger pseudo-register '_scanend', which gives the number of
+ scanlines at the end of the last frame.
+
+ * Added detection of color and audio data in DiStella.
+
+ * Restored 'cfg' directory for Distella config files.
+
+ * Added TV Boy and 3EX bank switching types.
+
+ * Removed unused CV+ and DASH bank switching types.
+
+ * Added support for loading grayscale PNG images in the ROM launcher.
+
+
+6.1.1 to 6.1.2: (April 25, 2020)
+
+ * Fixed bug with remapped events not being reloaded in certain cases.
+
+ * Fixed bug in debugger for 3E scheme when displaying active RAM bank.
+
+ * Fixed bug in "Dragon Defender" ROM being misconfigured for Mindlink
+ controller.
+
+
+6.1 to 6.1.1: (April 4, 2020)
+
+ * Fixed crash in 3E bankswitching scheme when writing to ROM addresses.
+
+ * Fix snapshots on Retina HiDPI displays capturing only the top-left
+ corner.
+
+ * Fixed wrong color for BK (background) swatch in the debugger.
+
+ * Fixed 'Right Diff' button in Command menu changing left difficulty
+ instead.
+
+ * Fixed compilation of libretro port on Debian Buster.
+
+
+6.0.2 to 6.1: (March 22, 2020)
* IMPORTANT NOTES:
- Because of major event remapping changes, all remappings will be reset
@@ -119,7 +267,9 @@
* Added option to change pitch of Pitfall II music.
- * ROM Info Launcher can now display multiple lines per property and
+ * ROM Info Viewer size is not limited to fixed zoom steps anymore.
+
+ * ROM Info Viewer can now display multiple lines per property and the
bank switching type.
* In file listings, you can now select directories by holding 'Shift' on
@@ -179,6 +329,10 @@
* Fixed bug in DPC+ scheme; 'fast fetch mode' was enabled at startup,
when it should be disabled by default.
+ * Some more work on DPC+ playfield 'jitter' effect for certain older DPC+
+ driver versions; more ROMs are now detected properly. Special thanks
+ to SpiceWare for his research in this area.
+
* Added proper Retron77 port.
* Added proper libretro port, and fixed display for OpenGLES renderers.
@@ -192,7 +346,8 @@
* Updated included PNG library to latest stable version.
--Have fun!
+ * Updated UNIX configure script to work with the gcc version 10 and
+ above.
6.0.1 to 6.0.2: (October 11, 2019)
diff --git a/Makefile b/Makefile
index b0e41062b..08cfc640c 100644
--- a/Makefile
+++ b/Makefile
@@ -8,14 +8,11 @@
## SS SS tt ee ll ll aa aa
## SSSS ttt eeeee llll llll aaaaa
##
-## Copyright (c) 1995-2016 by Bradford W. Mott, Stephen Anthony
+## Copyright (c) 1995-2020 by Bradford W. Mott, Stephen Anthony
## and the Stella Team
##
## See the file "License.txt" for information on usage and redistribution of
## this file, and for a DISCLAIMER OF ALL WARRANTIES.
-##
-## Based on code from ScummVM - Scumm Interpreter
-## Copyright (C) 2002-2004 The ScummVM project
##============================================================================
#######################################################################
@@ -99,7 +96,7 @@ EXECUTABLE := stella$(EXEEXT)
EXECUTABLE_PROFILE_GENERATE := stella-pgo-generate$(EXEEXT)
EXECUTABLE_PROFILE_USE := stella-pgo$(EXEEXT)
-PROFILE_DIR = $(CURDIR)/profile
+PROFILE_DIR = $(CURDIR)/test/roms/profile
PROFILE_OUT = $(PROFILE_DIR)/out
PROFILE_STAMP = profile.stamp
diff --git a/appveyor.yml b/appveyor.yml
index a087f4e42..211b69a24 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -7,15 +7,15 @@ environment:
matrix:
- Platform: x64
- Platform: Win32
-
+
Configuration: Release
- SDL2_version: 2.0.10
+ SDL2_version: 2.0.12
install:
- cmd: |
- curl -o "C:\SDL2-devel.zip" https://www.libsdl.org/release/SDL2-devel-2.0.10-VC.zip
+ curl -o "C:\SDL2-devel.zip" "https://www.libsdl.org/release/SDL2-devel-%SDL2_version%-VC.zip"
7z x "C:\SDL2-devel.zip" -o"C:\"
xcopy /S "C:\SDL2-%SDL2_version%\include" src\common
diff --git a/configure b/configure
index 85c81550a..4fb2cf08d 100755
--- a/configure
+++ b/configure
@@ -458,11 +458,17 @@ elif test "$have_gcc" = yes; then
fi
case $cxx_version in
- 4.[7-9]|4.[7-9].[0-9]|4.[7-9].[0-9][-.]*|[5-9]|[5-9].[0-9]|[5-9].[0-9].[0-9]|[5-9].[0-9].[0-9][-.]*)
+ [1-9]*)
_cxx_major=`echo $cxx_version | cut -d '.' -f 1`
_cxx_minor=`echo $cxx_version | cut -d '.' -f 2`
- cxx_version="$cxx_version, ok"
- cxx_verc_fail=no
+ # Need at least version 4.7
+ if [ $_cxx_major -ge 5 ] || [ $_cxx_major -eq 4 -a $_cxx_minor -ge 7 ]; then
+ cxx_version="$cxx_version, ok"
+ cxx_verc_fail=no
+ else
+ cxx_version="$cxx_version, bad"
+ cxx_verc_fail=yes
+ fi
;;
'not found')
cxx_verc_fail=yes
diff --git a/debian/changelog b/debian/changelog
index 3d045e4ef..75c7267b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,38 @@
+stella (6.2.1-1) stable; urgency=high
+
+ * Version 6.2.1 release
+
+ -- Stephen Anthony Sat, 20 Jun 2020 17:09:59 -0230
+
+
+stella (6.2-1) stable; urgency=high
+
+ * Version 6.2 release
+
+ -- Stephen Anthony Sun, 7 Jun 2020 17:09:59 -0230
+
+
+stella (6.1.2-1) stable; urgency=high
+
+ * Version 6.1.2 release
+
+ -- Stephen Anthony Sat, 25 Apr 2020 17:09:59 -0230
+
+
+stella (6.1.1-1) stable; urgency=high
+
+ * Version 6.1.1 release
+
+ -- Stephen Anthony Sat, 04 Apr 2020 17:09:59 -0230
+
+
+stella (6.1-1) stable; urgency=high
+
+ * Version 6.1 release
+
+ -- Stephen Anthony Sun, 22 Mar 2020 17:09:59 -0230
+
+
stella (6.0.2-1) stable; urgency=high
* Version 6.0.2 release
diff --git a/docs/debugger.html b/docs/debugger.html
index 19af56cdf..781d05bf5 100644
--- a/docs/debugger.html
+++ b/docs/debugger.html
@@ -15,7 +15,7 @@
Stella
- Release 6.1
+ Release 6.2.1
Integrated Debugger
(a work in progress)
@@ -121,13 +121,14 @@ feature that no other 2600 debugger has; it's completely cross-platform.<
Supports Distella 'configuration directives', which may be used to
override automatic code/data determination in the disassembly. For now,
- the following directives are supported: CODE, GFX, PGFX, DATA, ROW.
- These directives can be entered at the debugger prompt, or (automatically)
+ the following directives are supported: CODE, GFX, PGFX, COL, PCOL, BCOL, AUD, DATA, ROW.
+ These directives can be entered at the debugger prompt, or be (automatically)
loaded and saved in configuration files.
Extensive disassembly support, both from the emulation core and with help
from Distella. Where possible, the disassembly differentiates between code,
- player graphics and playfield graphics (ie, addresses stored in GRPx and PFx)
+ player and playfield graphics, colors and audio (ie, addresses stored in
+ GRPx, PFx, COLUxx, AUDxx)
and data (addresses used as an operand of a command). Code sections are also
differentiated between actual code, and 'tentative' code (ie, areas that may
represent code sections, but haven't actually been executed yet). Such
@@ -330,7 +331,7 @@ previous rewind operation. The rewind buffer is 100 levels deep by default, the
size can be configured e.g. in the
Developer Settings - Time Machine dialog.
-
The other operations are Step, Trace, Scan+1, Frame+1 and Exit (debugger).
+The other operations are Step, Trace, Scan+1, Frame+1 and Run.
You can also use the buttons from anywhere in the GUI via hotkeys.
@@ -381,12 +382,12 @@ size can be configured e.g. in the
Backquote (`) |
- Exit |
+ Run |
For MacOS use 'Cmd' instead of 'Alt' key.
-To the left of the global buttons, you find the "Options..." button.
+To the left of the global buttons, you find the 'Options...' button.
@@ -607,7 +608,7 @@ created a symbol file, you can use labels for the expression.
Example: You have got a label called "kernel". To break there,
the command is "break kernel". After you've set the breakpoint,
-exit the debugger ("quit" or click the Exit button). The emulator
+exit the debugger (enter "run" or click the 'Run' button). The emulator
will run until it gets to the breakpoint, then it will enter the
debugger with the Program Counter pointing to the instruction
at the breakpoint.
@@ -754,6 +755,7 @@ that holds 'number of scanlines' on an actual console).
_fcycles | Number of cycles since frame started |
_icycles | Number of cycles of last instruction |
_scan | Current scanline count |
+ _scanend | Scanline count at end of last frame |
_scycles | Number of cycles in current scanline |
_vblank | Whether vertical blank is enabled (1 or 0) |
_vsync | Whether vertical sync is enabled (1 or 0) |
@@ -906,7 +908,9 @@ Type "help 'cmd'" to see extended information about the given command.
a - Set Accumulator to <value>
+ aud - Mark 'AUD' range in disassembly
base - Set default number base to <base> (bin, dec, hex)
+ bcol - Mark 'BCOL' range in disassembly
break - Set/clear breakpoint at <address> and <bank>
breakif - Set/clear breakpoint on <condition>
breaklabel - Set/clear breakpoint on <address> (no mirrors, all banks)
@@ -919,6 +923,7 @@ clearsavestateifs - Clear all savestate points
clearwatches - Clear all watches
cls - Clear prompt area of text
code - Mark 'CODE' range in disassembly
+ col - Mark 'COL' range in disassembly
colortest - Show value xx as TIA color
d - Decimal Mode Flag: set (0 or 1), or toggle (no arg)
data - Mark 'DATA' range in disassembly
@@ -959,6 +964,7 @@ clearsavestateifs - Clear all savestate points
n - Negative Flag: set (0 or 1), or toggle (no arg)
palette - Show current TIA palette
pc - Set Program Counter to address xx
+ pcol - Mark 'PCOL' range in disassembly
pgfx - Mark 'PGFX' range in disassembly
print - Evaluate/print expression xx in hex/dec/binary
ram - Show ZP RAM, or set address xx to yy1 [yy2 ...]
@@ -972,6 +978,7 @@ clearsavestateifs - Clear all savestate points
runtopc - Run until PC is set to value xx
s - Set Stack Pointer to value xx
save - Save breaks, watches, traps and functions to file xx
+ saveaccess - Save access counters to CSV file
saveconfig - Save Distella config file (with default name)
savedis - Save Distella disassembly (with default name)
saverom - Save (possibly patched) ROM (with default name)
@@ -1022,8 +1029,8 @@ graphics and positions, and the playfield.
of the displays are editable. You can even toggle individual bits in
the GRP0/1 and playfield registers (remember to double-click).
-The group of buttons labelled "Strobes" allows you to write to any
-of the strobe registers at any time.
+The buttons allow you to write to any of the strobe registers at
+any time.
The collision registers are displayed in decoded format, in a table.
You can see exactly which objects have hit what. These are read-only
@@ -1098,7 +1105,7 @@ or TV effects are enabled, you won't see the effects here; this shows the
raw TIA image only.
To e.g. watch the TIA draw the frame one scanline at a time, you can
-use the "Scan+1" button, the prompt "scan" command or the Control-L key.
+use the 'Scan+1' button, the prompt "scan" command or the Control-L key.
You can also right-click anywhere in this window to show a context menu,
as illustrated:
@@ -1193,6 +1200,8 @@ the reason will be shown as follows:
"WTrap:" for write traps
"RTrapIf:" for conditional read traps
"WTrapIf:" for conditional write traps
+ "RWP:" for reads from write ports
+ "WRP:" for writes to read ports
See the Breakpoints, watches and traps...
@@ -1206,7 +1215,7 @@ section for details.

All the registers and flags are displayed, and can be changed by
double-clicking on them (to the left). Flags are toggled on double-click.
-Selected registers here can also be changed by using the "Data Operations" buttons,
+Selected registers here can also be changed by using the 'Data Operations' buttons,
further described in (J). All items are shown in hex. Any label defined for the
current PC value is shown to the right. Decimal and binary equivalents
are shown for SP/A/X/Y to the right (first decimal, then binary).
@@ -1215,6 +1224,8 @@ registers. For example, consider the command 'LDA ($80),Y'. The operand of
the command resolves to some address, which isn't always easy to determine at
first glance. The 'Src Addr' area shows the actual resulting operand/address
being used with the given opcode.
+The destination address of the last write is shown besides 'Dest'.
+
There's not much else to say about the CPU Registers widget: if you know 6502
assembly, it's pretty self-explanatory. If you don't, well, you should
learn :)
@@ -1369,21 +1380,78 @@ can use. These are known as 'directives', and partly correspond to configuration
options from the standalone Distella program. They are listed in order of
decreasing hierarchy:
-CODE | Addresses which have appeared in the program counter, or
-which tentatively can appear in the program counter. These can be edited in hex. |
-GFX | Addresses which contain data stored in the player graphics registers
-(GRP0/GRP1). These addresses are shown with a bitmap of the graphics, which
-can be edited in either hex or binary. The bitmap is shown as large blocks. |
-PGFX | Addresses which contain data stored in the playfield graphics registers
-(PF0/PF1/PF2). These addresses are shown with a bitmap of the graphics, which
-can be edited in either hex or binary. The bitmap is shown as small dashes. |
-DATA | Addresses used as an operand for some opcode. These can be edited
-in hex. |
-ROW | Addresses not used as any of the above. These are shown up
-to 8 per line, and cannot be edited. |
+
+
+ CODE
+ |
+ Addresses which have appeared in the program counter, or
+ which tentatively can appear in the program counter. These can be edited in hex.
+ |
+
+
+ GFX
+ |
+ Addresses which contain data stored in the player graphics registers
+ (GRP0/GRP1). These addresses are shown with a bitmap of the graphics, which
+ can be edited in either hex or binary. The bitmap is shown as large blocks.
+ |
+
+
+ PGFX
+ |
+ Addresses which contain data stored in the playfield graphics registers
+ (PF0/PF1/PF2). These addresses are shown with a bitmap of the graphics, which
+ can be edited in either hex or binary. The bitmap is shown as small dashes.
+ |
+
+
+ COL
+ |
+ Addresses which contain data stored in the player color registers
+ (COLUP0/COLUP1). These addresses are shown as color constants, which
+ can be edited in hex. The color constant names are depending on the ROM's TV type.
+ |
+
+
+ PCOL
+ |
+ Addresses which contain data stored in the playfield color register
+ (COLUPF). These addresses are shown as color constants, which
+ can be edited in hex. The color constant names are depending on the ROM's TV type.
+ |
+
+
+ BCOL
+ |
+ Addresses which contain data stored in the background color register
+ (COLUBK). These addresses are shown as color constants, which
+ can be edited in hex. The color constant names are depending on the ROM's TV type.
+ |
+
+
+ AUD
+ |
+ Addresses which contain data stored in the audio registers
+ (AUDC0/AUDC1/AUDF0/AUDF1/AUDV0/AUDV1). These can be edited
+ in hex.
+ |
+
+
+ DATA
+ |
+ Addresses used as an operand for some opcode. These can be edited
+ in hex.
+ |
+
+
+ ROW
+ |
+ Addresses not used as any of the above. These are shown up
+ to 8 per line and cannot be edited.
+ |
+
-
For code sections, the 6502 mnemonic will be UPPERCASE for all standard instructions,
or lowercase for "illegal" 6502 instructions (like "dcp"). If automatic resolving
of code sections has been disabled for any reason, you'll likely see a lot
@@ -1428,13 +1496,13 @@ anywhere in the listing:
The following options are available:
- Set PC @ current line: Set the Program Counter to the address of the
-disassembly line where the mouse was clicked (highlighted in yellow).
+disassembly line where the mouse was clicked.
- RunTo PC @ current line: Single-step through code until the Program Counter
-matches the address of the disassembly line where the mouse was clicked (highlighted in yellow)
+matches the address of the disassembly line where the mouse was clicked.
-- Re-disassemble: Self-explanatory; force the current bank to be
-disassembled, regardless of whether anything has changed.
+- Disassemble @ current line: Disassemble from the disassembly line where the mouse was clicked.
+This allows to fill gaps in the disassembly and is most useful for bankswitched ROMs.
- Show tentative code: Allow Distella to do a static analysis/disassembly.
@@ -1445,7 +1513,8 @@ isn't already a defined label).
in either binary or hexidecimal.
- Use address relocation: Corresponds to the Distella '-r' option
-(Relocate calls out of address range).
+(Relocate calls out of address range).
+Note: The code will continue to run fine, but the ROM image will be altered.
@@ -1520,12 +1589,12 @@ the RAM in the DPC scheme is not viewable by the 6507, so its addresses start fr
As mentioned in ROM Disassembly, Stella supports the following directives:
-CODE/GFX/PGFX/DATA/ROW. While the debugger will try to automatically mark address
+CODE, GFX, PGFX, COL, PCOL, BCOL, AUD, DATA, ROW. While the debugger will try to automatically mark address
space with the appropriate directive, there are times when it will fail. There are
several options in this case:
- Manually set the directives: Directives can be set in the debugger
-prompt with the code/gfx/pgfx/data/row commands. These accept an address range
+prompt with the aud/code/col/bcol/gfx/pcol/pgfx/data/row commands. These accept an address range
for the given directive type. Setting a range with the same type a second time
will remove that directive from the range.
- Use configuration files: Configuration files can be used to automatically
@@ -1564,7 +1633,7 @@ but it helps to know at least a little about 6502 programming.
- Enter the debugger by pressing the ` (backquote) key. Don't get
killed before you do this, though. You should still have all 5 lives.
- - In the RAM display, click the "Search" button and enter "5" for input.
+
- In the RAM display, click the 'Search' button and enter "5" for input.
This searches RAM for your value and highlights all addresses that match
the input. You should see two addresses highlighted: "00a5" and "00ba".
These are the only two addresses that currently have the value 5, so they're
@@ -1580,7 +1649,7 @@ but it helps to know at least a little about 6502 programming.
- Get killed! Ram an enemy tank, or let him shoot you. Wait for
the explosion to finish. You will now have 4 lives.
- - Enter the debugger again. Click the "Compare" button in RAM widget and enter
+
- Enter the debugger again. Click the 'Compare...' button in RAM widget and enter
a value of 4. Now the RAM widget should only show one highlighted address:
"00ba". What we did was search within our previous results (the ones that
were 5 before) for the new value 4. Address $00ba used to have the value 5,
diff --git a/docs/graphics/debugger_cpuregs.png b/docs/graphics/debugger_cpuregs.png
index f8cd3cb55..feb238c1b 100644
Binary files a/docs/graphics/debugger_cpuregs.png and b/docs/graphics/debugger_cpuregs.png differ
diff --git a/docs/graphics/debugger_main.png b/docs/graphics/debugger_main.png
index 4a8466e8f..c59f1a345 100644
Binary files a/docs/graphics/debugger_main.png and b/docs/graphics/debugger_main.png differ
diff --git a/docs/graphics/debugger_romcmenu.png b/docs/graphics/debugger_romcmenu.png
index d6a78172e..f6cd561a3 100644
Binary files a/docs/graphics/debugger_romcmenu.png and b/docs/graphics/debugger_romcmenu.png differ
diff --git a/docs/graphics/eventmapping.png b/docs/graphics/eventmapping.png
index 86deacd4a..f9b089b6d 100644
Binary files a/docs/graphics/eventmapping.png and b/docs/graphics/eventmapping.png differ
diff --git a/docs/graphics/eventmapping_devsports.png b/docs/graphics/eventmapping_devsports.png
index d66197a72..9b3da3ebc 100644
Binary files a/docs/graphics/eventmapping_devsports.png and b/docs/graphics/eventmapping_devsports.png differ
diff --git a/docs/graphics/eventmapping_mouse.png b/docs/graphics/eventmapping_mouse.png
new file mode 100644
index 000000000..daac75b09
Binary files /dev/null and b/docs/graphics/eventmapping_mouse.png differ
diff --git a/docs/graphics/eventmapping_remap.png b/docs/graphics/eventmapping_remap.png
index a2e3ce949..34df62937 100644
Binary files a/docs/graphics/eventmapping_remap.png and b/docs/graphics/eventmapping_remap.png differ
diff --git a/docs/graphics/launcher_options_snapshots.png b/docs/graphics/launcher_options_snapshots.png
index 0d2b2e8d6..a833f8bb3 100644
Binary files a/docs/graphics/launcher_options_snapshots.png and b/docs/graphics/launcher_options_snapshots.png differ
diff --git a/docs/graphics/options.png b/docs/graphics/options.png
index db86da3fb..9f8a95430 100644
Binary files a/docs/graphics/options.png and b/docs/graphics/options.png differ
diff --git a/docs/graphics/options_audio.png b/docs/graphics/options_audio.png
index e77d69a5e..e46d77b87 100644
Binary files a/docs/graphics/options_audio.png and b/docs/graphics/options_audio.png differ
diff --git a/docs/graphics/options_developer.png b/docs/graphics/options_developer.png
index 8d345f9aa..f405818b1 100644
Binary files a/docs/graphics/options_developer.png and b/docs/graphics/options_developer.png differ
diff --git a/docs/graphics/options_developer_emulation.png b/docs/graphics/options_developer_emulation.png
index 6b8009f35..977893402 100644
Binary files a/docs/graphics/options_developer_emulation.png and b/docs/graphics/options_developer_emulation.png differ
diff --git a/docs/graphics/options_developer_timemachine.png b/docs/graphics/options_developer_timemachine.png
index ddb58f28e..498f83c0f 100644
Binary files a/docs/graphics/options_developer_timemachine.png and b/docs/graphics/options_developer_timemachine.png differ
diff --git a/docs/graphics/options_emulation.png b/docs/graphics/options_emulation.png
new file mode 100644
index 000000000..99a1dfa4d
Binary files /dev/null and b/docs/graphics/options_emulation.png differ
diff --git a/docs/graphics/options_gameinfo_cartridge.png b/docs/graphics/options_gameinfo_cartridge.png
index ea09b9842..b90761623 100644
Binary files a/docs/graphics/options_gameinfo_cartridge.png and b/docs/graphics/options_gameinfo_cartridge.png differ
diff --git a/docs/graphics/options_gameinfo_console.png b/docs/graphics/options_gameinfo_console.png
index 49577140c..e3aee16e5 100644
Binary files a/docs/graphics/options_gameinfo_console.png and b/docs/graphics/options_gameinfo_console.png differ
diff --git a/docs/graphics/options_gameinfo_controller.png b/docs/graphics/options_gameinfo_controller.png
index 9b9413ab2..fe5adb275 100644
Binary files a/docs/graphics/options_gameinfo_controller.png and b/docs/graphics/options_gameinfo_controller.png differ
diff --git a/docs/graphics/options_gameinfo_emulation.png b/docs/graphics/options_gameinfo_emulation.png
index 0db133505..221a08fa5 100644
Binary files a/docs/graphics/options_gameinfo_emulation.png and b/docs/graphics/options_gameinfo_emulation.png differ
diff --git a/docs/graphics/options_misc.png b/docs/graphics/options_misc.png
index aa382419f..1faa756b5 100644
Binary files a/docs/graphics/options_misc.png and b/docs/graphics/options_misc.png differ
diff --git a/docs/graphics/options_misc_classic.png b/docs/graphics/options_misc_classic.png
index d4a77dc9f..1eab6039e 100644
Binary files a/docs/graphics/options_misc_classic.png and b/docs/graphics/options_misc_classic.png differ
diff --git a/docs/graphics/options_misc_light.png b/docs/graphics/options_misc_light.png
index b1113c033..c0cebe477 100644
Binary files a/docs/graphics/options_misc_light.png and b/docs/graphics/options_misc_light.png differ
diff --git a/docs/graphics/options_ui.png b/docs/graphics/options_ui.png
index 14a6e33af..54ed568fc 100644
Binary files a/docs/graphics/options_ui.png and b/docs/graphics/options_ui.png differ
diff --git a/docs/graphics/options_video.png b/docs/graphics/options_video.png
index be67fe065..58654148a 100644
Binary files a/docs/graphics/options_video.png and b/docs/graphics/options_video.png differ
diff --git a/docs/graphics/options_video_palettes.png b/docs/graphics/options_video_palettes.png
new file mode 100644
index 000000000..dae0cf7ee
Binary files /dev/null and b/docs/graphics/options_video_palettes.png differ
diff --git a/docs/graphics/options_video_tv.png b/docs/graphics/options_video_tv.png
index e76d32ba6..5ce3c3f2a 100644
Binary files a/docs/graphics/options_video_tv.png and b/docs/graphics/options_video_tv.png differ
diff --git a/docs/graphics/resources/debugger_main.pdn b/docs/graphics/resources/debugger_main.pdn
index e486c0048..6c864a2a4 100644
Binary files a/docs/graphics/resources/debugger_main.pdn and b/docs/graphics/resources/debugger_main.pdn differ
diff --git a/docs/graphics/timemachine.png b/docs/graphics/timemachine.png
index 269005fe8..fc2237abf 100644
Binary files a/docs/graphics/timemachine.png and b/docs/graphics/timemachine.png differ
diff --git a/docs/index.html b/docs/index.html
index 602bcc08f..89bee1158 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -19,7 +19,7 @@
A multi-platform Atari 2600 VCS emulator
- Release 6.1
+ Release 6.2.1
User's Guide
@@ -70,7 +70,7 @@
- February 1999 - January 2020
+ February 1999 - June 2020
The Stella Team
Stella Homepage
@@ -302,7 +302,7 @@
- Supports using ROM filename extensions to force specific bankswitching schemes
- Supports using ROM filename to force specific display formats
- Supports Supercharger single-load and multi-load games
- - Supports ROMs stored in ZIP and GZIP format, as well as the usual raw A26/BIN/ROM formats
+ - Supports the usual raw A26/BIN/ROM formats, also when stored in ZIP files
- Supports property file for setting the properties associated with games
- Supports the NTSC, PAL and SECAM television standards in 50Hz and 60Hz mode
- Supports autodetection of display format for 50Hz vs. 60Hz modes
@@ -355,12 +355,11 @@
The Linux version of Stella is designed to work on a Linux Workstation with
the following:
- - Linux Kernel 3.x
- i386 or x86_64 class machine, with 32 or 64-bit distribution
- OpenGL capable video card
- Other architectures (MIPS, PPC, PPC64, etc.) have been confirmed to work,
but aren't as well tested as i386/x86_64
- - GNU g++ v/5 or Clang v/3.5 (with C++14 support) and the make utility are required for compiling the Stella source code
+ - GNU g++ v/6 or Clang v/3.9 (with C++14 support) and the make utility are required for compiling the Stella source code
@@ -536,12 +535,12 @@
Supported File formats
- Stella supports ROMs ending with extensions .a26, .bin, .rom, .gz, and .zip.
- For the last two compressed formats (GZIP and ZIP, respectively), Stella will
- automatically decompress the archive, and use the first ROM image it finds in
- it (ie, the first one ending in a valid extension). If a ZIP archive contains
- many such files, Stella will display a virtual filesystem of the contents
- of the archive.
+ Stella supports ROMs ending with extensions .a26, .bin, .rom, and .zip.
+ For the ZIP archive format, Stella will look into the archive and if it
+ contains only one ROM image file, Stella will automatically load it. If an
+ archive contains many such files, Stella will display a virtual
+ filesystem with the contents of the archive. This can be then browsed
+ like a normal directory.
Other extensions are also possible, namely to force a specific bankswitch scheme.
Normally, the bankswitching scheme for a ROM is determined automatically,
@@ -549,7 +548,7 @@
have to do anything yourself. However, it is also possible to force the
bankswitch type to use by adding a special filename extension. These extensions
are listed in the ROM properties section under
- Cartridge.Type -> File Extension.
+ Cart.Type -> File Extension.
Note: These extensions are the same as those used by the Harmony Cart
and Unocart and are not case-sensitive, so you can name your files and have them
@@ -775,7 +774,7 @@
Pause/resume emulation |
Pause |
- |
+ Shift-Cmd + p |
@@ -1028,6 +1027,50 @@
+ Trackball Controller (uses mouse, left port only)
+
+
+
+ Left Trackball |
+
+
+
+
+
+ Function |
+ Key |
+
+
+ Fire Button |
+ Same as 'Joy0 Fire' |
+
+
+ |
+
+
+
+ Light Gun Controller (uses mouse, left port only)
+
+
+
+ Left Light Gun |
+
+
+
+
+
+ Function |
+ Key |
+
+
+ Fire Button |
+ Same as 'Joy0 Fire' |
+
+
+ |
+
+
+
Paddle Controller digital emulation (can be remapped)
- TV effects (can be remapped, only active in TIA mode)
+ Audio & Video Keys (can be remapped)
+
+
+ Function |
+ Key (Standard) |
+ Key (macOS) |
+
+
+ Toggle sound |
+ Control + ] |
+ Control + ] |
+
+
+ Decrease volume |
+ Alt + [ |
+ Cmd + [ |
+
+
+
+ Increase volume |
+ Alt + ] |
+ Cmd + ] |
+
+
+ Switch to next larger zoom level in windowed mode,
+ toggle stretching in fullscreen mode |
+ Alt + = |
+ Cmd + = |
+
+
+
+ Switch to next smaller zoom level in windowed mode,
+ toggle stretching in fullscreen mode |
+ Alt + - |
+ Cmd + - |
+
+
+ Toggle windowed/fullscreen mode |
+ Alt + Enter |
+ Cmd + Enter |
+
+
+ Toggle adapting display refresh rate to game frame rate
+
+ Note: Not available for macOS. |
+ Alt + r |
+ Cmd + r |
+
+
+ Decrease overscan in fullscreen mode |
+ Shift + PageDown |
+ Shift-Fn + Down arrow |
+
+
+ Increase overscan in fullscreen mode |
+ Shift + PageUp |
+ Shift-Fn + Up arrow |
+
+
+ Move display down (uses "Display.VCenter") |
+ Alt + PageDown |
+ Cmd-Fn + Down arrow |
+
+
+ Move display up (uses "Display.VCenter") |
+ Alt + PageUp |
+ Cmd-Fn + Up arrow |
+
+
+ Decrease vertical display size |
+ Shift-Alt + PageUp |
+ Shift-Cmd-Fn + Up arrow |
+
+
+ Increase vertical display size |
+ Shift-Alt + PageDown |
+ Shift-Cmd-Fn + Down arrow |
+
+
+ Switch to previous display format (NTSC/PAL/SECAM etc.) |
+ Shift-Control + f |
+ Shift-Control + f |
+
+
+ Switch to next display format (NTSC/PAL/SECAM etc.) |
+ Control + f |
+ Control + f |
+
+
+ Toggle display interpolation |
+ Control + i |
+ Control + i |
+
+
+
+ These settings can also be changed using Global Keys
+ |
+
+
+
+ Palettes Keys (can be remapped)
+
+
+ Function |
+ Key (Standard) |
+ Key (macOS) |
+
+
+
+ Select previous palette (Standard/z26/User/Custom) |
+ Shift-Control + p |
+ Shift-Control + p |
+
+
+
+ Select next palette (Standard/z26/User/Custom) |
+ Control + p |
+ Control + p |
+
+
+
+ Select previous palette attribute |
+ Shift-Alt + 9 |
+ Shift-Cmd + 9 |
+
+
+
+ Select next palette attribute |
+ Alt + 9 |
+ Cmd + 9 |
+
+
+
+ Decrease selected palette attribute |
+ Shift-Alt + 0 |
+ Shift-Cmd + 0 |
+
+
+
+ Increase selected palette attribute |
+ Alt + 0 |
+ Cmd + 0 |
+
+
+
+ These settings can also be changed using Global Keys
+ |
+
+
+
+ TV effects Keys (can be remapped)
@@ -1301,93 +1494,73 @@
Key (macOS) |
- Disable TV effects |
+ Select previous TV effects preset |
+ Shift-Alt + 1 |
+ Shift-Cmd + 1 |
+
+
+ Select next TV effects preset |
Alt + 1 |
Cmd + 1 |
- Select 'RGB' preset |
+ Select previous 'Custom' mode attribute (*) |
+ Shift-Alt + 2 |
+ Shift-Cmd + 2 |
+
+
+ Select next 'Custom' mode attribute (*) |
Alt + 2 |
Cmd + 2 |
- Select 'S-Video' preset |
+ Decrease 'Custom' selected attribute value (*) |
+ Shift-Alt + 3 |
+ Shift-Cmd + 3 |
+
+
+ Increase 'Custom' selected attribute value (*) |
Alt + 3 |
Cmd + 3 |
- Select 'Composite' preset |
+ Toggle 'phosphor' mode |
+ Alt + p |
+ Cmd + p |
+
+
+ Decrease 'phosphor' blend |
+ Shift-Alt + 4 |
+ Shift-Cmd + 4 |
+
+
+ Increase 'phosphor' blend |
Alt + 4 |
Cmd + 4 |
- Select 'Badly adjusted' preset |
+ Decrease scanline intensity |
+ Shift-Alt + 5 |
+ Shift-Cmd + 5 |
+
+
+ Increase scanline intensity |
Alt + 5 |
Cmd + 5 |
- Select 'Custom' preset |
- Alt + 6 |
- Cmd + 6 |
+
+ These settings can also be changed using Global Keys
+ |
-
- Select previous 'Custom' mode attribute (*) |
- Shift-Alt + 7 |
- Shift-Cmd + 7 |
-
-
- Select next 'Custom' mode attribute (*) |
- Alt + 7 |
- Cmd + 7 |
-
-
- Decrease 'Custom' selected attribute value (*) |
- Shift-Alt + 8 |
- Shift-Cmd + 8 |
-
-
- Increase 'Custom' selected attribute value (*) |
- Alt + 8 |
- Cmd + 8 |
-
-
-
- Toggle 'phosphor' effect |
- Alt + p |
- Cmd + p |
-
-
-
- Decrease 'phosphor' blend in phosphor mode |
- Shift-Alt + 9 |
- Shift-Cmd + 9 |
-
-
-
- Increase 'phosphor' blend in phosphor mode |
- Alt + 9 |
- Cmd + 9 |
-
-
-
- Decrease scanline intensity |
- Shift-Alt + 0 |
- Shift-Cmd + 0 |
-
-
- Increase scanline intensity |
- Alt + 0 |
- Cmd + 0 |
-
-
- Items marked as (*) are only available in 'Custom' preset mode |
+ Items marked as (*) will also switch to 'Custom' mode
- Developer Keys in TIA mode (can be remapped)
+ Developer Keys (can be remapped)
@@ -1503,9 +1676,63 @@
Alt + j |
Cmd + j |
+
+
+ These settings can also be changed using Global Keys
+ |
+
- Other Keys (can be remapped)
+ Global Keys (can be remapped)
+ These keys allow selecting and changing settings without having to remember the
+ dedicated keys. They keys are grouped by Audio & Video and Debug settings.
+
+
+ Function |
+ Key (Standard) |
+ Key (macOS) |
+
+
+ Select previous setting group |
+ Control + End |
+ Control-Fn + Left arrow |
+
+
+ Select next setting group |
+ Control + Home |
+ Control-Fn + Right arrow |
+
+
+ Select previous setting |
+ End |
+ Fn + Left arrow |
+
+
+ Select next setting |
+ Home |
+ Fn + Right arrow |
+
+
+ Decrease current setting |
+ PageDown |
+ Fn + Down arrow |
+
+
+ Increase current setting
+ | PageUp |
+ Fn + Up arrow |
+
+
+ Notes:
+
+ - Only available if UI messages are enabled.
+ - Currently not available settings are automatically skipped.
+ - If a setting was selected via dedicated key, its value can also be changed with the
+ global keys.
+
+
+
+ Other Emulation Keys (can be remapped)
@@ -1513,91 +1740,56 @@
Key (Standard) |
Key (macOS) |
-
- Switch to next larger zoom level in windowed mode,
- toggle stretching in fullscreen mode |
- Alt + = |
- Cmd + = |
+ Load previous game in ROM (multicart ROM, TIA mode) |
+ Shift-Control + r |
+ Shift-Control + r |
-
- Switch to next smaller zoom level in windowed mode,
- toggle stretching in fullscreen mode |
- Alt + - |
- Cmd + - |
+ Reload current ROM (singlecart ROM, TIA mode)
+ Load next game in ROM (multicart ROM, TIA mode) |
+ Control + r |
+ Control + r |
-
- Toggle fullscreen/windowed mode |
- Alt + Enter |
- Cmd + Enter |
+ Reload ROM listing (ROM launcher mode) |
+ Control + r |
+ Control + r |
-
- Increase overscan in fullscreen mode |
- Shift + PageUp |
- Shift + PageUp |
+ Emulate 'frying' effect (TIA mode) |
+ Backspace |
+ Backspace |
-
- Decrease overscan in fullscreen mode |
- Shift + PageDown |
- Shift + PageDown |
+ Go to parent directory (UI mode) |
+ Backspace |
+ Backspace |
-
- Move display up (uses "Display.VCenter") |
- Alt + PageUp |
- Cmd + PageUp |
+ Decrease emulation speed (disables 'Turbo' mode) |
+ Shift-Control + s |
+ Shift-Control + s |
-
- Move display down (uses "Display.VCenter") |
- Alt + PageDown |
- Cmd + PageDown |
+ Increase emulation speed (disables 'Turbo' mode) |
+ Control + s |
+ Control + s |
-
- Switch display format in increasing order (NTSC/PAL/SECAM etc.) |
- Control + f |
- Control + f |
+ Toggle 'Turbo' mode (maximum emulation speed) |
+ Control + t |
+ Control + t |
-
- Switch display format in decreasing order (NTSC/PAL/SECAM etc.) |
- Shift-Control + f |
- Shift-Control + f |
+ Decrease autofire rate |
+ Shift-Control + a |
+ Shift-Control + a |
-
- Switch palette (Standard/Z26/User) |
- Control + p |
- Control + p |
-
-
-
- Toggle display interpolation |
- Control + i |
- Control + i |
-
-
-
- Toggle sound on/off |
- Control + ] |
- Control + ] |
-
-
-
- Decrease volume |
- Alt + [ |
- Cmd + [ |
-
-
-
- Increase volume |
- Alt + ] |
- Cmd + ] |
+ Increase autofire rate |
+ Control + a |
+ Control + a |
@@ -1605,7 +1797,6 @@
Control + 0 |
Control + 0 |
-
Toggle grab mouse |
Control + g |
@@ -1617,38 +1808,11 @@
Control + 1 |
Control + 1 |
-
-
- Reload current ROM (singlecart ROM, TIA mode)
- Load next game in ROM (multicart ROM, TIA mode) |
- Control + r |
- Control + r |
-
-
-
- Reload ROM listing (ROM launcher mode) |
- Control + r |
- Control + r |
-
-
-
- Emulate 'frying' effect (TIA mode) |
- Backspace |
- Backspace |
-
-
-
- Go to parent directory (UI mode) |
- Backspace |
- Backspace |
-
-
Save continuous PNG snapshots(per interval defined in Snapshot Settings) |
Alt + s |
Cmd + s |
-
Save continuous PNG snapshots (every frame) |
Shift-Alt + s |
@@ -1660,13 +1824,21 @@
Alt + t |
Cmd + t |
-
Enter/Exit the Time Machine dialog |
- Shift + t to enter, Shift + t/Escape/Space to exit |
- Shift + t to enter, Shift + t/Escape/Space to exit |
+ Shift + t to enter, Shift + t/Escape to exit and continue with emulation |
+ Shift + t to enter, Shift + t/Escape to exit and continue with emulation |
+
+
+ Playback the Time Machine from current state (without sound, from the TM dialog only) |
+ Shift |
+ Shift |
+
+
+ Start/Stop playback (exist/enters the Time Machine dialog) |
+ Shift + Space |
+ Shift + Space |
-
Rewind by one state (enters the Time Machine dialog) |
Alt + Left arrow |
@@ -1699,7 +1871,7 @@
- UI keys in Text Editing areas (cannot be remapped)
+ UI Keys in Text Editing areas (cannot be remapped)
Key | Editor Function |
@@ -1828,7 +2000,7 @@
N/A |
N/A |
N/A |
- N/A |
+ voice (2600-daptor II) |
SaveKey |
@@ -1875,12 +2047,13 @@
Bottom row (left to right)
Item | Description |
- Current time | Shows the time of the currently selected status,
+ |
Current time | Shows the time of the currently selected state,
relative to the first one |
'Start/Stop' button | Starts or stops the Time Machine |
- 'Continue' button | Exits the dialog and continues emulation |
+ 'Exit' button | Exits the dialog and continues emulation, starting at current state |
'Rewind All' button | Navigates back to the begin of the timeline |
'Rewind One' button | Navigates back by one state |
+ 'Playback' button | Starts playback, starting at the current state (with sound disabled) |
'Unwind One' button | Navigates forward by one state |
'Unwind All' button | Navigates forward to the end of the timeline |
'Save All' button | Saves all Time Machine states to disk |
@@ -1946,13 +2119,59 @@
-center <1|0> |
- Centers game window (if possible). |
+ Centers all windows (if possible). |
- -palette <standard|z26|user> |
+ -windowedpos <XxY> |
+ Sets the window position in windowed emulator mode. |
+
+
+
+ -display <number> |
+ Sets the display for Stella's emulator. |
+
+
+
+ -palette <standard|z26|user|custom> |
Set the palette to either normal Stella, the one used in the z26
- emulator, or a user-defined palette. |
+ emulator, a user-defined palette, or a custom palette generated
+ from user-defined phase shifts.
+
+
+
+ -pal.phase_ntsc <number> |
+ Adjust phase shift of 'custom' NTSC palette. |
+
+
+
+ -pal.phase_pal <number> |
+ Adjust phase shift of 'custom' PAL palette. |
+
+
+
+ -pal.hue <number> |
+ Adjust hue of current palette (range -1.0 to 1.0). |
+
+
+
+ -pal.saturation <number> |
+ Adjust saturation of current palette (range -1.0 to 1.0). |
+
+
+
+ -pal.contrast <number> |
+ Adjust contrast of current palette (range -1.0 to 1.0). |
+
+
+
+ -pal.brightness <number> |
+ Adjust brightness of current palette (range -1.0 to 1.0). |
+
+
+
+ -pal.gamma <number> |
+ Adjust gamma of current palette (range -1.0 to 1.0). |
@@ -1960,6 +2179,11 @@
Control the emulation speed (as a percentage, 10 - 1000). |
+
+ -turbo <1|0> |
+ Enable 'Turbo' mode for maximum emulation speed. |
+
+
-uimessages <1|0> |
Enable or disable display of message in the UI. Note that messages
@@ -1977,10 +2201,15 @@
| Set the volume. |
+
+ -audio.device <number> |
+ Set the audio device (0 = default). |
+
+
-audio.preset <1 - 5> |
Set an audio preset. Numbers in sequence represent presets for
- 'custom', 'low quality, 'medium lag', 'high quality, medium lag',
+ 'custom', 'low quality, medium lag', 'high quality, medium lag',
'high quality, low lag' and 'ultra quality, minimal lag'. |
@@ -2016,32 +2245,39 @@
-audio.dpc_pitch <10000 - 30000> |
- Set the pitch o f Pitfall II music. |
+ Set the pitch of Pitfall II music. |
-
- -tia.zoom <zoom> |
- Use the specified zoom level (integer) while in TIA/emulation mode.
- |
-
+
+ -tia.zoom <zoom> |
+ Use the specified zoom level (integer) while in TIA/emulation mode.
+ |
+
-
- -tia.vsizeadjust <-5 - 5> |
- Adjust the display height of the TIA image
- |
-
+
+ -tia.vsizeadjust <-5 - 5> |
+ Adjust the display height of the TIA image
+ |
+
-
- -tia.inter <1|0> |
- Use interpolation for the TIA image (results in blending/smoothing
- of the image). |
-
+
+ -tia.inter <1|0> |
+ Use interpolation for the TIA image (results in blending/smoothing
+ of the image). |
+
-
- -tia.fs_stretch <1|0> |
- Stretch TIA image completely while in fullscreen mode, vs. keeping the correct
- aspect ratio. |
-
+
+ -tia.fs_stretch <1|0> |
+ Stretch TIA image completely while in fullscreen mode, vs. keeping the correct
+ aspect ratio. |
+
+
+
+ -tia.fs_refresh <1|0> |
+ While in fullscreen mode, adapt the display's refresh rate to the game's frame rate
+ to minimize judder.
+ Note: Not available for macOS. |
+
-tia.fs_overscan <0 - 10> |
@@ -2064,36 +2300,6 @@
and 'Custom' modes.
-
- -tv.contrast <number> |
- Blargg TV effects 'contrast' (only available in custom mode,
- range -1.0 to 1.0). |
-
-
-
- -tv.brightness <number> |
- Blargg TV effects 'brightness' (only available in custom mode,
- range -1.0 to 1.0). |
-
-
-
- -tv.hue <number> |
- Blargg TV effects 'hue' (only available in custom mode,
- range -1.0 to 1.0). |
-
-
-
- -tv.saturation <number> |
- Blargg TV effects 'saturation' (only available in custom mode,
- range -1.0 to 1.0). |
-
-
-
- -tv.gamma <number> |
- Blargg TV effects 'gamma' (only available in custom mode,
- range -1.0 to 1.0). |
-
-
-tv.sharpness <number> |
Blargg TV effects 'sharpness' (only available in custom mode,
@@ -2177,9 +2383,10 @@
|
- -joyallow4 <1|0> |
- Allow all 4 directions on a joystick to be pressed
- simultaneously. |
+ -psense <number> |
+ Sensitivity for emulation of paddles when using analog paddles.
+ Valid range of values is from 1 to 30, with larger numbers causing
+ faster movement. |
@@ -2192,6 +2399,46 @@
Impact of fast paddle movement on input averaging. |
+
+ -dcsense <number> |
+ Sensitivity for emulation of driving controllers when using a mouse.
+ Valid range of values is from 1 to 20, with larger numbers causing
+ faster movement. |
+
+
+
+ -autofirerate <0 - 30> |
+ Automatic trigger rate of the fire buttons in Hz (0 = disabled) |
+
+
+
+ -joyallow4 <1|0> |
+ Allow all 4 directions on a joystick to be pressed
+ simultaneously. |
+
+
+
+ -modcombo <1|0> |
+ Use modifier(Shift/Alt/Control)-x key combos. This is normally enabled,
+ since the 'Quit' command is tied to 'Control-q'. However, there are times
+ when you want to disable them.
+ E.g. a 2-player game is using either the 'f' or 'r' keys for movement,
+ and pressing Control (for Fire) will perform an unwanted action
+ associated with Control-r or Control-f default keys. |
+
+
+
+ -saport <lr|rl> |
+ Determines how to enumerate the Stelladaptor/2600-daptor devices in the
+ order they are found: 'lr' means first is left port, second is right port,
+ 'rl' means the opposite. |
+
+
+
+ -avoxport <name> |
+ Set the name of the serial port where an AtariVox is connected. |
+
+
-usemouse <always|analog|never> |
Use mouse as a controller as specified by ROM properties in specific case.
@@ -2199,24 +2446,6 @@
(paddles, trackball, etc.). |
-
- -grabmouse <1|0> |
- Locks the mouse cursor in the game window in emulation mode. |
-
-
-
- -cursor <0|1|2|3> |
- Set mouse cursor state in UI/emulation modes. |
-
-
-
- -dsense <number> |
- Sensitivity for emulation of paddles when using a digital device
- (ie, joystick digital axis or button, keyboard key, etc.).
- Valid range of values is from 1 to 20, with larger numbers causing
- faster movement. |
-
-
-msense <number> |
Sensitivity for emulation of paddles when using a mouse.
@@ -2232,20 +2461,21 @@
|
- -saport <lr|rl> |
- Determines how to enumerate the Stelladaptor/2600-daptor devices in the
- order they are found: 'lr' means first is left port, second is right port,
- 'rl' means the opposite. |
+ -dsense <number> |
+ Sensitivity for emulation of paddles when using a digital device
+ (ie, joystick digital axis or button, keyboard key, etc.).
+ Valid range of values is from 1 to 20, with larger numbers causing
+ faster movement. |
- -modcombo <1|0> |
- Use modifier(Shift/Alt/Control)-x key combos. This is normally enabled,
- since the 'Quit' command is tied to 'Control-q'. However, there are times
- when you want to disable them.
- E.g. a 2-player game is using either the 'f' or 'r' keys for movement,
- and pressing Control (for Fire) will perform an unwanted action
- associated with Control-r or Control-f default keys. |
+ -cursor <0|1|2|3> |
+ Set mouse cursor state in UI/emulation modes. |
+
+
+
+ -grabmouse <1|0> |
+ Locks the mouse cursor in the game window in emulation mode. |
@@ -2321,13 +2551,23 @@
launcher only happens when started with the launcher).
+
+ -launcherpos <XxY> |
+ Sets the window position in windowed ROM launcher mode. |
+
+
+
+ -launcherdisplay <number> |
+ Sets the display for the ROM launcher. |
+
+
-launcherres <WxH> |
Set the size of the ROM launcher. |
- -launcherfont <small|medium|large> |
+ -launcherfont <small|low_medium|medium|large|large12|large14|large16> |
Set the size of the font in the ROM launcher. |
@@ -2338,9 +2578,10 @@
- -romviewer <0|1|2> |
- Hide ROM Info Viewer in ROM launcher mode (0), or use the
- given zoom level (1 or 2). |
+ -romviewer <float> |
+ Hide ROM Info Viewer in ROM launcher mode (0) or use the
+ given zoom level.
+ Note: The zoom level is converted into a percentage in the UI. |
@@ -2348,6 +2589,11 @@
Use the specified palette for UI elements. |
+
+ -dialogfont <small|low_medium|medium|large|large12|large14|large16> |
+ Set the size of the font in the dialogs. |
+
+
-dialogpos <0 - 4> |
Set the position of dialogs within Stella windows (0 = center). |
@@ -2392,12 +2638,12 @@
-romdir <dir> |
- Set the directory where the ROM launcher will start. |
+ Set the path where the ROM launcher will start. |
- -avoxport <name> |
- Set the name of the serial port where an AtariVox is connected. |
+ -followlauncher <0|1> |
+ Make the start path follow ROM launcher navigation. |
@@ -2456,6 +2702,16 @@
Relocate calls out of address range in the disassembler. |
+
+ -dbg.pos <XxY> |
+ Sets the window position in windowed debugger mode. |
+
+
+
+ -dbg.display <number> |
+ Sets the display for the debugger. |
+
+
-dbg.res <WxH> |
Set the size of the debugger window. |
@@ -2522,7 +2778,7 @@
-bs <type> |
- Set "Cartridge.Type" property. See the Game Properties section
+ | Set "Cart.Type" property. See the Game Properties section
for valid types. |
@@ -2533,27 +2789,27 @@
-startbank <bank> |
- Set "Cartridge.StartBank" property. |
+ Set "Cart.StartBank" property. |
-channels <Mono|Stereo> |
- Set "Cartridge.Sound" property. |
+ Set "Cart.Sound" property. |
-ld <A|B> |
- Set "Console.LeftDifficulty" property. |
+ Set "Console.LeftDiff" property. |
-rd <A|B> |
- Set "Console.RightDifficulty" property. |
+ Set "Console.RightDiff" property. |
-tv <Color|BW> |
- Set "Console.TelevisionType" property. |
+ Set "Console.TVType" property. |
@@ -2584,6 +2840,16 @@
Set "Controller.SwapPaddles" property. |
+
+ -pxcenter <-10..30> |
+ Set "Controller.PaddlesXCenter" property. |
+
+
+
+ -pycenter <-10..30> |
+ Set "Controller.PaddlesYCenter" property. |
+
+
-ma <Auto|XY> |
Set "Controller.MouseAxis" property.
@@ -2627,6 +2893,9 @@
|
-<plr.|dev.>stats <1|0> |
Overlay console info on the TIA image during emulation. |
+
+ -<plr.|dev.>detectedinfo <1|0> |
+ Display detected settings info when a ROM is loaded. |
-<plr.|dev.>console <2600|7800> |
Select console for B/W and Pause key handling and RAM initialization. |
@@ -2741,7 +3010,7 @@
Options Menu dialog:
-
Video Settings dialog:
+ Video & Audio Settings dialog (Display):
 |
@@ -2750,27 +3019,44 @@
Item | Brief description | For more information, see CommandLine |
Renderer | Use specified rendering mode | -video |
- Palette | Palette for emulation mode | -palette |
- Interpolation | Interpolation for TIA image | -tia.inter |
- Zoom | Zoom level for emulation mode | -tia.zoom |
- V-Size adjust | Adjust height of TIA image | -tia.vsizeadjust |
- Emul. speed | Emulation speed | -speed |
- VSync | Enable vertical synced updates | -vsync |
+ Interpolation | Enable interpolation of the TIA image | -tia.inter |
+ Zoom | Zoom level of the TIA image | -tia.zoom |
Fullscreen | Self-explanatory - Note that colors may slightly change.
This depends on the OS and renderer used. | -fullscreen |
- Stretch | In fullscreen mode, completely fill screen with TIA image | -tia.fs_stretch |
+ Stretch | In fullscreen mode, completely fill screen with the TIA image. | -tia.fs_stretch |
+ Adapt display... | In fullscreen mode, adapt the display's refresh rate to the game's frame rate to minimize judder.
+ Note: Not available for macOS. | -tia.fs_refresh |
Overscan | In fullscreen mode, add overscan to the TIA image | -tia.fs_overscan |
- Fast SuperCharger load | Skip progress loading bars for SuperCharger ROMs | -fastscbios |
- Show UI messages | Overlay UI messages onscreen | -uimessages |
- Center window | Attempt to center application windows, else position at last position | -center |
- Multi-threading | Enable multi-threaded rendering | -threads |
+ V-Size adjust | Adjust height of the TIA image | -tia.vsizeadjust |
- Video Settings dialog (TV Effects):
+ Video & Audio Settings dialog (Palettes):
+
+
+  |
+ |
+
+
+ Item | Brief description | For more information, see CommandLine |
+ Palette | Palette used for emulation mode | -palette |
+ NTSC phase | Adjust phase shift for 'Custom' NTSC palette | -pal.phase_ntsc |
+ PAL phase | Adjust phase shift for 'Custom' PAL palette | -pal.phase_pal |
+ Hue | Adjust hue of currently selected palette | -pal.hue |
+ Saturation | Adjust saturation of currently selected palette | -pal.saturation |
+ Contrast | Adjust contrast of currently selected palette | -pal.contrast |
+ Brightness | Adjust brightness of currently selected palette | -pal.brightness |
+ Gamma | Adjust gamma of currently selected palette | -pal.gamma |
+
+ |
+
+
+
+
+ Video & Audio Settings dialog (TV Effects):
 |
@@ -2779,24 +3065,24 @@
Item | Brief description | For more information, see CommandLine |
TV mode | Disable TV effects, or select TV preset | -tv.filter |
- Adjustable sliders | Set specific attribute in 'Custom' TV mode | -tv.contrast, -tv.hue, etc. |
+ Adjustable sliders | Set specific attribute in 'Custom' TV mode | -tv.sharpness, -tv.resolution, etc. |
Phosphor for all ROMs | Enable phosphor mode for all ROMs | -tv.phosphor |
Blend (phosphor) | Blend level to use in phosphor mode for all ROMs
(needs to be manually adjusted for your particular hardware) | -tv.phosblend |
Scanline intensity | Sets scanline black-level intensity.
Note: No scanlines in 1x mode snapshots. | -tv.scanlines |
- Clone Composite | Copy 'Composite' attributes to 'Custom' sliders | |
- Clone S-Video | Copy 'S-Video' attributes to 'Custom' sliders | |
- Clone RGB | Copy 'RGB' attributes to 'Custom' sliders | |
- Clone Bad adjust | Copy 'Bad Adjust' attributes to 'Custom' sliders | |
- Revert | Revert attribute sliders to saved 'Custom' settings | |
+ Clone RGB | Copy 'RGB' attributes to 'Custom' TV mode sliders | |
+ Clone S-Video | Copy 'S-Video' attributes to 'Custom' TV mode sliders | |
+ Clone Composite | Copy 'Composite' attributes to 'Custom' TV mode sliders | |
+ Clone Bad adjust | Copy 'Bad Adjust' attributes to 'Custom' TV mode sliders | |
+ Revert | Revert attribute sliders to saved 'Custom' TV mode settings | |
- Audio Settings dialog:
+ Video & Audio Settings dialog (Audio):
 |
@@ -2806,7 +3092,8 @@
Item | Brief description | For more information, see CommandLine |
Enable audio | Self-explanatory | -audio.enabled |
Volume | Self-explanatory | -audio.volume |
- Mode | Select an audio preset or choose 'custom' for manual configuration | -audio.preset |
+ Device | Use the specified audio device. | -audio.device |
+ Mode | Select an audio preset or choose 'Custom' for manual configuration. | -audio.preset |
Fragment size | The number of samples in a single fragment processed by the audio driver. Smaller values mean less latency, but may lead to dropouts (depending on OS and hardware). | -audio.fragment_size |
Sample rate |
Output samples per second. Higher values reduce artifacts from resampling and decrease latency,
@@ -2819,8 +3106,8 @@
some games (notably Quadrun).
| -audio.resampling_quality |
Headroom | Number of frames to buffer before playback starts. Higher values increase latency, but reduce the potential for dropouts. | -audio.headroom |
- Buffer size | Maximum size of the audio buffer. Higher values increase maximum latency, but reduce the potential for dropouts | -audio.buffer_size |
- Stereo for all ROMs | Enables stereo mode for all ROMs. | -audio.stereo |
+ Buffer size | Maximum size of the audio buffer. Higher values increase maximum latency, but reduce the potential for dropouts. | -audio.buffer_size |
+ Stereo for all ROMs | Enable stereo mode for all ROMs. | -audio.stereo |
Pitfall II music pitch | Defines the pitch of Pitfall II music (which may vary between carts). | -audio.dpc_pitch |
@@ -2839,6 +3126,44 @@
+
+ Emulation dialog:
+
+
+  |
+ |
+
+
+ Item | Brief description | For more information, see CommandLine |
+ Emulation speed | Emulation speed | -speed |
+ VSync | Enable vertical synced updates | -vsync |
+ Turbo | Enable 'Turbo' mode for maximum emulation speed. This overwrites 'Emulation speed' setting and disables 'VSync'. | -turbo |
+ Multi-threading | Enable multi-threaded rendering | -threads |
+ Fast SuperCharger load | Skip progress loading bars for SuperCharger ROMs | -fastscbios |
+ Show UI messages | Overlay UI messages onscreen | -uimessages |
+ Confirm exiting... | Display a popup when emulation is exited | -confirmexit |
+
+ When entering/exiting emulation: |
+
+ Automatically save no, current or all Time Machine states when exiting emulation.
+ The latter also loads all states when entering emulation. When this is enabled, you
+ can always continue your game session from where you exited it. Even including the
+ Time Machine buffer!
+ |
+ -saveonexit |
+
+ Automatically change... |
+
+ Automatically change to the next available save state slot after saving a ROM state file.
+ |
+ -autoslot |
+
+
+ |
+
+
+
+
Input Settings dialog:
@@ -2858,9 +3183,10 @@
Item | Brief description | For more information, see CommandLine |
Theme | Theme to use for UI elements (see examples) | -uipalette |
+ Dialogs font | The font used in the dialogs | -dialogfont |
+ HiDPI mode | Scale the UI by a factor of two when enabled | -hidpi |
Dialogs position | Position of dialogs with Stella window | -dialogpos |
- HiDPI mode | Scales the UI by a factor of two when enabled | -hidpi |
- Confirm exiting... | Display a popup when emulation is exited | -confirmexit |
+ Center windows | Attempt to center application windows, else position at last position | -center |
List input delay | Maximum delay between keypresses in filelist-widgets before a search string resets. | -listdelay |
Mouse wheel scroll | Number of lines a mouse scroll will move in list-widgets | -mwheel |
Double-click speed | Speed of mouse double-clicks | -mdouble |
@@ -2897,9 +3223,9 @@
Save path | Specifies where to save snapshots | -snapsavedir |
Continuous snapshot interval | Interval (in seconds) between snapshots | -ssinterval |
- Use actual ROM name | Use the actual ROM filename instead of the internal database name. | -snapname |
+ Use actual ROM name | Use the actual ROM filename instead of the internal database name | -snapname |
Overwrite existing files | Whether to overwrite old snapshots | -sssingle |
- Ignore scaling (1x mode) | Save snapshot in 1x mode without scaling | -ss1x |
+ Create pixel-exact image (no zoom/post-processing) | Save snapshot using the exact pixels from the TIA image, without zoom or any post-processing effects | -ss1x |
@@ -3007,25 +3333,43 @@
Item | Brief description | For more information, see CommandLine |
- Use mouse as ... | Allow the mouse to emulate various controllers | -usemouse |
- Mouse cursor visibility | Show/hide cursor depending on current state | -cursor |
Joystick deadzone size | Deadzone area for axes on joysticks/gamepads | -joydeadzone |
- Paddle dejitter strength | Strenght of paddle input averaging (base) and reaction to fast paddle movements (diff) | -dejitter.base, -dejitter.diff |
+ (Analog paddle) Sensitivity | Sensitivity of an analog paddle | -psense |
+ Analog paddle) Dejitter averaging | Strength of paddle input averaging, suppresses mouse jitter | -dejitter.base |
+ (Analog paddle) Dejitter reaction | Strength of paddle reaction to fast paddle movements, suppresses mouse jitter | -dejitter.diff |
Digital paddle sensitivity | Sensitivity used when emulating a paddle using a digital device | -dsense |
- Mouse paddle sensitivity | Sensitivity used when emulating a paddle using a mouse | -msense |
- Trackball sensitivity | Sensitivity used when emulating a trackball device using a mouse | -tsense |
+ Autofire rate | Automatic trigger rate of the fire buttons in Hz | -autofirerate |
Allow all 4 directions ... | Allow all 4 joystick directions to be pressed simultaneously | -joyallow4 |
- Grab mouse ... | Keep mouse in window in emulation mode (only when used as controller)
- Note: The sensitivity may greatly vary when the mouse is not grabbed. | -grabmouse |
Use modifier key combos | Enable using modifier keys in keyboard actions | -modcombo |
Swap Stelladaptor ports | Swap the order of the detected Stelladaptors/2600-daptors (see Advanced Configuration - Stelladaptor/2600-daptor Support) | -saport |
Joystick database | Show all joysticks that Stella knows about, with the option to remove them | |
Erase EEPROM | Erase the whole AtariVox/SaveKey flash memory | |
- AVox serial port | Described in further detail in Advanced Configuration - AtariVox/SaveKey Support | -avoxport |
+ AtariVox serial port | Described in further detail in Advanced Configuration - AtariVox/SaveKey Support | -avoxport |
|
+
+ Mouse settings can be configured under the 'Mouse' tab, shown below:
+
+
+  |
+ |
+
+
+ Item | Brief description | For more information, see CommandLine |
+ Use mouse as ... | Allow the mouse to emulate various controllers | -usemouse |
+ (Sensitivity) Paddle | Sensitivity used when emulating a paddle using a mouse | -msense |
+ (Sensitivity) Trackball | Sensitivity used when emulating a trackball device using a mouse | -tsense |
+ (Sensitivity) Driving controller | Sensitivity used when emulating a driving controller device using a mouse | -dcsense |
+ Mouse cursor visibility | Show/hide cursor depending on current state | -cursor |
+ Grab mouse ... | Keep mouse in window in emulation mode (only when used as controller)
+ Note: The sensitivity may greatly vary when the mouse is not grabbed. | -grabmouse |
+
+ |
+
+
+
@@ -3035,8 +3379,8 @@
launcher and fonts, as well as the 'ROM Info Viewer' can be changed in
UI Settings - Launcher dialog, as shown below:
- Most of the options are self-explanatory, except for the 'ROM Info
- viewer', which is described below.
+ Most of the options are self-explanatory, except for the 'ROM info
+ width', which is described below.
@@ -3048,27 +3392,21 @@
for each new release of Stella. Note that the snapshots can be any size
generated by Stella; they will be resized accordingly.
- Currently, there are several restrictions for this feature:
-
- - The ROM Info Viewer can be shown in 1x or 2x mode only.
- - To view snapshots in 1x mode, the ROM launcher window must be sized at
- least 640x480. If the launcher isn't large enough, the functionality
- will be disabled.
- - To view snapshots in 2x mode, the ROM launcher window must be sized at
- least 1000x720. If the launcher isn't large enough, an attempt will
- be made to use 1x mode.
-
+ The ROM Info Viewer's width can be defined between 0% (off) and 100%. The
+ value is relative to the launcher width. For too small or too large values,
+ Stella will automatically correct the width at runtime so that the ROM names
+ and the current ROM's information always have enough space.
The following snapshots illustrate the various font sizes and rom info
- zoom levels:
+ widths:
- ROM Info Viewer in 1x mode, UI sized 800x480, small launcher font:
+ ROM Info Viewer width at 40%, UI sized 800x480, small launcher font:
- ROM Info Viewer in 1x mode, UI sized 1000x720, medium launcher font:
+ ROM Info Viewer width at 32%, UI sized 1000x720, medium launcher font:
- ROM Info Viewer in 2x mode, UI sized 1280x900, large launcher font:
+ ROM Info Viewer width at 50% , UI sized 1280x900, large launcher font:
The text box in the upper right corner can be used to narrow down the
@@ -3117,8 +3455,6 @@
-
-
- Show only ROM files: Selecting this reloads the current listing,
showing only files that have a valid ROM extension.
@@ -3273,6 +3609,7 @@
Item | Brief description | For more information, see CommandLine |
Player/Developer settings | Selects the active settings set | -dev.settings |
Console info overlay | Overlay console info on the TIA image during emulation. | -plr.stats -dev.stats |
+ Detected settings info | Display detected settings when a ROM is loaded. | -plr.detectedinfo -dev.detectedinfo |
Console | Select the console type, this affects Color/B&W/Pause key emulation and zero-page RAM initialization | -plr.console -dev.console |
Random startup bank | Randomize the startup bank (only for selected bankswitch types) | -plr.bankrandom -dev.bankrandom |
Randomize zero-page ... | When loading a ROM, randomize all RAM content instead of initializing with all zeroes (for 'Console' = 'Atari 2600' only) | -plr.ramrandom -dev.ramrandom |
@@ -3402,21 +3739,6 @@
'Buffer size'.
-plr.tm.horizon -dev.tm.horizon |
-
- When entering/exiting emulation: |
-
- Automatically save no, current or all Time Machine states when exiting emulation.
- The latter also loads all states when entering emulation. When this is enabled, you
- can always continue your game session from where you exited it. Even including the
- Time Machine buffer!
- |
- -saveonexit |
-
- Automatically change... |
-
- Automatically change to the next available save state slot after saving a ROM state file.
- |
- -autoslot |
@@ -3692,24 +4014,24 @@ Ms Pac-Man (Stella extended codes):
; Comments
- "Cartridge.MD5" "Value"
- "Property" "Value"
+ "Cart.MD5" "Value"
+ "Property" "Value"
""
; Comments
- "Cartridge.MD5" "Value"
- "Property" "Value"
+ "Cart.MD5" "Value"
+ "Property" "Value"
""
. . .
; Comments
- "Cartridge.MD5" "Value"
- "Property" "Value"
+ "Cart.MD5" "Value"
+ "Property" "Value"
""
Every block in the property file must have a unique value for the
- Cartridge.MD5 property.
+ Cart.MD5 property.
Properties
@@ -3717,11 +4039,13 @@ Ms Pac-Man (Stella extended codes):
Each block in a property file consists of a set of properties for a single
game. Stella supports the properties described below:
-
+
+
+
- Cartridge.Type: |
+ Cart.Type: |
Indicates the bank-switching type for the game.
The value of this property must be either Auto or one of the following
(for more information about bank-switching see Kevin Horton's 2600 bankswitching
@@ -3738,9 +4062,10 @@ Ms Pac-Man (Stella extended codes):
32IN1 ¹ | 64-128K Multicart (32 games) | .32N, .32N1 |
64IN1 ¹ | 64/128K Multicart | .64N, .64N1 |
128IN1 ¹ | 256/512K Multicart | .128, .128N1 |
- 2K | 32-2048 byte Atari | .2K |
- 3E | 32K Tigervision | .3E |
- 3E+ | 3E+ (TJ modified DASH) | .3EP, .3E+ |
+ 2K | 32-2048 bytes Atari | .2K |
+ 3E | 512K Tigervision + 32K RAM | .3E |
+ 3EX | 512K Tigervision + 256K RAM | .3EX |
+ 3E+ | 3E+ (TJ modified 3E) | .3EP, .3E+ |
3F | 512K Tigervision | .3F |
4A50 ² | 64K 4A50 + RAM | .4A5, .4A50 |
4K | 4K Atari | .4K |
@@ -3752,9 +4077,7 @@ Ms Pac-Man (Stella extended codes):
CDF | Chris, Darrell, Fred (includes CDFJ) | .CDF |
CM ¹ | Spectravideo CompuMate | .CM |
CTY ² | CDW - Chetiry | .CTY |
- CV | Commavid extra RAM | .CV |
- CV+ | Extended Commavid extra RAM | .CVP |
- DASH | Boulder Dash 2 | .DAS, .DASH |
+ CV | CommaVid extra RAM | .CV |
DF | CPUWIZ 128K | .DF |
DFSC | CPUWIZ 128K + RAM | .DFS, .DFSC |
DPC | Pitfall II | .DPC |
@@ -3776,7 +4099,8 @@ Ms Pac-Man (Stella extended codes):
FC | Amiga Power Play Aracde 16/32K | .FC |
FE | 8K Decathlon | .FE |
MDM | Menu Driven Megacart | .MDM |
- SB | 128-256k SUPERbanking | .SB |
+ SB | 128-256K SUPERbanking | .SB |
+ TVBOY | 512K TV Boy (127 games) | .TVB, .TVBOY |
UA | 8K UA Ltd. | .UA |
UASW | 8K UA Ltd. (swapped banks) | .UASW |
WD | Wickstead Design (Pink Panther) | .WD |
@@ -3786,7 +4110,7 @@ Ms Pac-Man (Stella extended codes):
|
- Cartridge.StartBank: |
+ Cart.StartBank: |
Indicates which bank to use for reading the reset vector. |
@@ -3810,7 +4134,7 @@ Ms Pac-Man (Stella extended codes):
Display.VCenter: |
Indicates the offset for the vertical center of the display.
- The value must be n such that -5 <= n <= 5.
+ The value must be n such that -20 <= n <= 20.
|
@@ -3828,7 +4152,7 @@ Ms Pac-Man (Stella extended codes):
- Cartridge.Sound: |
+ Cart.Sound: |
Indicates if the game should use 1 or 2 channels for sound output.
All original Atari 2600 machines supported 1 channel only,
but some homebrew games have been written to take advantage of stereo
@@ -3836,32 +4160,39 @@ Ms Pac-Man (Stella extended codes):
|
+
-
+
+
+
+
- Console.TelevisionType: |
+ Console.TVType: |
Indicates the default television setting for the
game. The value must be Color or BW. |
- Console.LeftDifficulty: |
+ Console.LeftDiff: |
Indicates the default difficulty setting for the left
player. The value must be A or B. |
- Console.RightDifficulty: |
+ Console.RightDiff: |
Indicates the default difficulty setting for the
right player. The value must be A or B. |
+
-
+
+
+
Controller.Left: Controller.Right: |
@@ -3908,6 +4239,16 @@ Ms Pac-Man (Stella extended codes):
'Console.SwapPorts'. The value must be Yes or No.
+
+ Controller.PaddlesXCenter: |
+ Defines the horizontal center of the paddles (range -10..30). |
+
+
+
+ Controller.PaddlesYCenter: |
+ Defines the vertical center of the paddles (range -10..30). |
+
+
Controller.MouseAxis: |
Indicates how the mouse should emulate virtual controllers.
@@ -3936,18 +4277,21 @@ Ms Pac-Man (Stella extended codes):
how to use the X/Y axis (ie, 02 is paddle0/paddle2).
-->
|
+
-
+
+
+
- Cartridge.Name: |
+ Cart.Name: |
Indicates the actual name of the game. When you save snapshots,
load/save state files, or use the ROM Audit Mode functionality,
this is the name that will be used for the respective file(s). |
- Cartridge.MD5: |
+ Cart.MD5: |
Indicates the MD5 checksum of the ROM image as a
string of hexadecimal digits. Stella uses this property while
attempting to match a game with its block of properties. If the
@@ -3958,27 +4302,37 @@ Ms Pac-Man (Stella extended codes):
|
- Cartridge.Manufacturer: |
+ Cart.Manufacturer: |
Indicates the game's manufacturer. |
- Cartridge.ModelNo: |
+ Cart.ModelNo: |
Indicates the manufacturer's model number for the game. |
- Cartridge.Rarity: |
+ Cart.Rarity: |
Indicates how rare a cartridge is, based on the scale described on AtariAge. |
- Cartridge.Note: |
+ Cart.Note: |
Contains any special notes about playing the game. |
+ The buttons at the bottom of the dialogs work as follows:
+
+ - Defaults: Reset the properties to those built into Stella.
+ - Save: Save the properties for the currently selected ROM only
+ to a properties file in the users default save directory.
+ - OK: Merge/commit any changes into the ROM properties database, which
+ contains info on all ROMs.
+ - Cancel: Revert any changes in the dialog, and cancel the operation.
+
+
The name of the properties file will depend on the version of Stella, as follows:
@@ -3999,7 +4353,7 @@ Ms Pac-Man (Stella extended codes):
_BASEDIR_/stella.pro |
- Stella will require a restart for changes to this file to take effect.
+ Note: For manual changes to the property files Stella will require a restart to take effect.
@@ -4022,6 +4376,10 @@ Ms Pac-Man (Stella extended codes):
user |
An external palette file, supplied by the user. |
+
+ custom |
+ A palette generate from user-defined phase shift. |
+
A user-defined palette has certain restrictions, further described as follows:
diff --git a/docs/index_r77.html b/docs/index_r77.html
index 6050d1367..cc15b11ab 100644
--- a/docs/index_r77.html
+++ b/docs/index_r77.html
@@ -58,7 +58,7 @@
Stella for RetroN 77
Atari 2600 VCS emulator
- Release 6.1 Beta 1
+ Release 6.2.1
Quick Navigation Guide
diff --git a/src/cheat/CheatCodeDialog.cxx b/src/cheat/CheatCodeDialog.cxx
index 780fbea2f..09ac1cd3c 100644
--- a/src/cheat/CheatCodeDialog.cxx
+++ b/src/cheat/CheatCodeDialog.cxx
@@ -35,46 +35,49 @@ CheatCodeDialog::CheatCodeDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font)
: Dialog(osystem, parent, font, "Cheat codes")
{
- const int lineHeight = font.getLineHeight(),
- fontWidth = font.getMaxCharWidth(),
- buttonWidth = font.getStringWidth("Defaults") + 20,
- buttonHeight = font.getLineHeight() + 4;
- const int HBORDER = 10;
- const int VBORDER = 10 + _th;
+ const int lineHeight = font.getLineHeight(),
+ fontHeight = font.getFontHeight(),
+ fontWidth = font.getMaxCharWidth(),
+ buttonWidth = font.getStringWidth("One shot ") + fontWidth * 2.5,
+ buttonHeight = font.getLineHeight() * 1.25;
+ const int VBORDER = fontHeight / 2;
+ const int HBORDER = fontWidth * 1.25;
+ const int VGAP = fontHeight / 4;
+
int xpos, ypos;
WidgetArray wid;
ButtonWidget* b;
// Set real dimensions
_w = 45 * fontWidth + HBORDER * 2;
- _h = 11 * (lineHeight + 4) + VBORDER;
+ _h = _th + 11 * (lineHeight + 4) + VBORDER * 2;
// List of cheats, with checkboxes to enable/disable
- xpos = HBORDER; ypos = VBORDER;
+ xpos = HBORDER; ypos = _th + VBORDER;
myCheatList =
- new CheckListWidget(this, font, xpos, ypos, _w - buttonWidth - HBORDER * 2 - 8,
- _h - 2*buttonHeight - VBORDER);
+ new CheckListWidget(this, font, xpos, ypos, _w - buttonWidth - HBORDER * 2 - fontWidth,
+ _h - _th - buttonHeight - VBORDER * 3);
myCheatList->setEditable(false);
wid.push_back(myCheatList);
- xpos += myCheatList->getWidth() + 8; ypos = VBORDER;
+ xpos += myCheatList->getWidth() + fontWidth; ypos = _th + VBORDER;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Add" + ELLIPSIS, kAddCheatCmd);
wid.push_back(b);
- ypos += lineHeight + 8;
+ ypos += lineHeight + VGAP * 2;
myEditButton =
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Edit" + ELLIPSIS, kEditCheatCmd);
wid.push_back(myEditButton);
- ypos += lineHeight + 8;
+ ypos += lineHeight + VGAP * 2;
myRemoveButton =
new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"Remove", kRemCheatCmd);
wid.push_back(myRemoveButton);
- ypos += lineHeight + 8 * 3;
+ ypos += lineHeight + VGAP * 2 * 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"One shot" + ELLIPSIS, kAddOneShotCmd);
diff --git a/src/cheat/CheatManager.cxx b/src/cheat/CheatManager.cxx
index e106279c6..3f4db3fb4 100644
--- a/src/cheat/CheatManager.cxx
+++ b/src/cheat/CheatManager.cxx
@@ -213,10 +213,9 @@ void CheatManager::enable(const string& code, bool enable)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CheatManager::loadCheatDatabase()
{
- const string& cheatfile = myOSystem.cheatFile();
- ifstream in(cheatfile);
- if(!in)
- return;
+ stringstream in;
+ try { myOSystem.cheatFile().read(in); }
+ catch(...) { return; }
string line, md5, cheat;
string::size_type one, two, three, four;
@@ -253,13 +252,12 @@ void CheatManager::saveCheatDatabase()
if(!myListIsDirty)
return;
- const string& cheatfile = myOSystem.cheatFile();
- ofstream out(cheatfile);
- if(!out)
- return;
-
+ stringstream out;
for(const auto& iter: myCheatMap)
out << "\"" << iter.first << "\" " << "\"" << iter.second << "\"" << endl;
+
+ try { myOSystem.cheatFile().write(out); }
+ catch(...) { return; }
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/common/AudioSettings.cxx b/src/common/AudioSettings.cxx
index 2881c4cfa..640ba9527 100644
--- a/src/common/AudioSettings.cxx
+++ b/src/common/AudioSettings.cxx
@@ -154,6 +154,12 @@ uInt32 AudioSettings::volume() const
return lboundInt(mySettings.getInt(SETTING_VOLUME), 0);
}
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+uInt32 AudioSettings::device() const
+{
+ return mySettings.getInt(SETTING_DEVICE);
+}
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool AudioSettings::enabled() const
{
@@ -285,6 +291,14 @@ void AudioSettings::setVolume(uInt32 volume)
normalize(mySettings);
}
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+void AudioSettings::setDevice(uInt32 device)
+{
+ if(!myIsPersistent) return;
+
+ mySettings.setValue(SETTING_DEVICE, device);
+}
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void AudioSettings::setEnabled(bool isEnabled)
{
diff --git a/src/common/AudioSettings.hxx b/src/common/AudioSettings.hxx
index 95104c74f..d319671c3 100644
--- a/src/common/AudioSettings.hxx
+++ b/src/common/AudioSettings.hxx
@@ -48,6 +48,7 @@ class AudioSettings
static constexpr const char* SETTING_RESAMPLING_QUALITY = "audio.resampling_quality";
static constexpr const char* SETTING_STEREO = "audio.stereo";
static constexpr const char* SETTING_VOLUME = "audio.volume";
+ static constexpr const char* SETTING_DEVICE = "audio.device";
static constexpr const char* SETTING_ENABLED = "audio.enabled";
static constexpr const char* SETTING_DPC_PITCH = "audio.dpc_pitch";
@@ -59,6 +60,7 @@ class AudioSettings
static constexpr ResamplingQuality DEFAULT_RESAMPLING_QUALITY = ResamplingQuality::lanczos_2;
static constexpr bool DEFAULT_STEREO = false;
static constexpr uInt32 DEFAULT_VOLUME = 80;
+ static constexpr uInt32 DEFAULT_DEVICE = 0;
static constexpr bool DEFAULT_ENABLED = true;
static constexpr uInt32 DEFAULT_DPC_PITCH = 20000;
@@ -87,6 +89,8 @@ class AudioSettings
uInt32 volume() const;
+ uInt32 device() const;
+
bool enabled() const;
uInt32 dpcPitch() const;
@@ -109,6 +113,8 @@ class AudioSettings
void setVolume(uInt32 volume);
+ void setDevice(uInt32 device);
+
void setEnabled(bool isEnabled);
void setPersistent(bool isPersistent);
diff --git a/src/common/FSNodeZIP.cxx b/src/common/FSNodeZIP.cxx
index c5ace0f95..7bd88efc0 100644
--- a/src/common/FSNodeZIP.cxx
+++ b/src/common/FSNodeZIP.cxx
@@ -126,6 +126,21 @@ void FilesystemNodeZIP::setFlags(const string& zipfile,
_error = zip_error::NOT_READABLE;
}
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+bool FilesystemNodeZIP::exists() const
+{
+ if(_realNode && _realNode->exists())
+ {
+ // We need to inspect the actual path, not just the ZIP file itself
+ myZipHandler->open(_zipFile);
+ while(myZipHandler->hasNext())
+ if(BSPF::startsWithIgnoreCase(myZipHandler->next(), _virtualPath))
+ return true;
+ }
+
+ return false;
+}
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FilesystemNodeZIP::getChildren(AbstractFSList& myList, ListMode mode) const
{
@@ -181,7 +196,34 @@ size_t FilesystemNodeZIP::read(ByteBuffer& image) const
while(myZipHandler->hasNext() && !found)
found = myZipHandler->next() == _virtualPath;
- return found ? uInt32(myZipHandler->decompress(image)) : 0; // TODO: 64bit
+ return found ? myZipHandler->decompress(image) : 0;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+size_t FilesystemNodeZIP::read(stringstream& image) const
+{
+ // For now, we just read into a buffer and store in the stream
+ // TODO: maybe there's a more efficient way to do this?
+ ByteBuffer buffer;
+ size_t size = read(buffer);
+ if(size > 0)
+ image.write(reinterpret_cast(buffer.get()), size);
+
+ return size;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+size_t FilesystemNodeZIP::write(const ByteBuffer& buffer, size_t size) const
+{
+ // TODO: Not yet implemented
+ throw runtime_error("ZIP file not writable");
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+size_t FilesystemNodeZIP::write(const stringstream& buffer) const
+{
+ // TODO: Not yet implemented
+ throw runtime_error("ZIP file not writable");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/common/FSNodeZIP.hxx b/src/common/FSNodeZIP.hxx
index 2a46afb4b..079d3c546 100644
--- a/src/common/FSNodeZIP.hxx
+++ b/src/common/FSNodeZIP.hxx
@@ -42,7 +42,7 @@ class FilesystemNodeZIP : public AbstractFSNode
*/
explicit FilesystemNodeZIP(const string& path);
- bool exists() const override { return _realNode && _realNode->exists(); }
+ bool exists() const override;
const string& getName() const override { return _name; }
void setName(const string& name) override { _name = name; }
const string& getPath() const override { return _path; }
@@ -63,6 +63,9 @@ class FilesystemNodeZIP : public AbstractFSNode
AbstractFSNodePtr getParent() const override;
size_t read(ByteBuffer& image) const override;
+ size_t read(stringstream& image) const override;
+ size_t write(const ByteBuffer& buffer, size_t size) const override;
+ size_t write(const stringstream& buffer) const override;
private:
FilesystemNodeZIP(const string& zipfile, const string& virtualpath,
diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx
index d7b9ecb17..24b038d01 100644
--- a/src/common/FrameBufferSDL2.cxx
+++ b/src/common/FrameBufferSDL2.cxx
@@ -15,6 +15,8 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================
+#include
+
#include "SDL_lib.hxx"
#include "bspf.hxx"
#include "Logger.hxx"
@@ -48,8 +50,6 @@ FrameBufferSDL2::FrameBufferSDL2(OSystem& osystem)
// since the structure may be needed before any FBSurface's have
// been created
myPixelFormat = SDL_AllocFormat(SDL_PIXELFORMAT_ARGB8888);
-
- myWindowedPos = myOSystem.settings().getPoint("windowedpos");
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -101,19 +101,32 @@ void FrameBufferSDL2::queryHardware(vector& fullscreenRes,
int numModes = SDL_GetNumDisplayModes(i);
ostringstream s;
- s << "Supported video modes for display " << i << ":";
- Logger::debug(s.str());
+ s << "Supported video modes (" << numModes << ") for display " << i << ":";
+
+ string lastRes = "";
+
for (int m = 0; m < numModes; m++)
{
SDL_DisplayMode mode;
+ ostringstream res;
SDL_GetDisplayMode(i, m, &mode);
- s.str("");
- s << " " << m << ": " << mode.w << "x" << mode.h << "@" << mode.refresh_rate << "Hz";
- if (mode.w == display.w && mode.h == display.h && mode.refresh_rate == display.refresh_rate)
- s << " (active)";
- Logger::debug(s.str());
+ res << std::setw(4) << mode.w << "x" << std::setw(4) << mode.h;
+
+ if(lastRes != res.str())
+ {
+ Logger::debug(s.str());
+ s.str("");
+ lastRes = res.str();
+ s << " " << lastRes << ": ";
+ }
+ s << mode.refresh_rate << "Hz";
+ if(mode.w == display.w && mode.h == display.h && mode.refresh_rate == display.refresh_rate)
+ s << "* ";
+ else
+ s << " ";
}
+ Logger::debug(s.str());
}
// Now get the maximum windowed desktop resolution
@@ -183,27 +196,34 @@ void FrameBufferSDL2::queryHardware(vector& fullscreenRes,
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Int32 FrameBufferSDL2::getCurrentDisplayIndex()
+bool FrameBufferSDL2::isCurrentWindowPositioned() const
+{
+ ASSERT_MAIN_THREAD;
+
+ return !myCenter
+ && myWindow && !(SDL_GetWindowFlags(myWindow) & SDL_WINDOW_FULLSCREEN_DESKTOP);
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Common::Point FrameBufferSDL2::getCurrentWindowPos() const
+{
+ ASSERT_MAIN_THREAD;
+
+ Common::Point pos;
+
+ SDL_GetWindowPosition(myWindow, &pos.x, &pos.y);
+
+ return pos;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+Int32 FrameBufferSDL2::getCurrentDisplayIndex() const
{
ASSERT_MAIN_THREAD;
return SDL_GetWindowDisplayIndex(myWindow);
}
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void FrameBufferSDL2::updateWindowedPos()
-{
- ASSERT_MAIN_THREAD;
-
- // only save if the window is not centered and not in full screen mode
- if (!myCenter && myWindow && !(SDL_GetWindowFlags(myWindow) & SDL_WINDOW_FULLSCREEN_DESKTOP))
- {
- // save current windowed position
- SDL_GetWindowPosition(myWindow, &myWindowedPos.x, &myWindowedPos.y);
- myOSystem.settings().setValue("windowedpos", myWindowedPos);
- }
-}
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FrameBufferSDL2::setVideoMode(const string& title, const VideoMode& mode)
{
@@ -213,31 +233,13 @@ bool FrameBufferSDL2::setVideoMode(const string& title, const VideoMode& mode)
if(SDL_WasInit(SDL_INIT_VIDEO) == 0)
return false;
- Int32 displayIndex = mode.fsIndex;
- if (displayIndex == -1)
- {
- // windowed mode
- if (myWindow)
- {
- // Show it on same screen as the previous window
- displayIndex = SDL_GetWindowDisplayIndex(myWindow);
- }
- if (displayIndex < 0)
- {
- // fallback to the last used screen if still existing
- displayIndex = std::min(myNumDisplays, myOSystem.settings().getInt("display"));
- }
- }
+ const bool fullScreen = mode.fsIndex != -1;
+ bool forceCreateRenderer = false;
- // save and get last windowed window's position
- updateWindowedPos();
-
- // Always recreate renderer (some systems need this)
- if(myRenderer)
- {
- SDL_DestroyRenderer(myRenderer);
- myRenderer = nullptr;
- }
+ // Get windowed window's last display
+ Int32 displayIndex = std::min(myNumDisplays, myOSystem.settings().getInt(getDisplayKey()));
+ // Get windowed window's last position
+ myWindowedPos = myOSystem.settings().getPoint(getPositionKey());
int posX, posY;
@@ -249,7 +251,7 @@ bool FrameBufferSDL2::setVideoMode(const string& title, const VideoMode& mode)
posX = myWindowedPos.x;
posY = myWindowedPos.y;
- // make sure the window is at least partially visibile
+ // Make sure the window is at least partially visibile
int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
for (int display = SDL_GetNumVideoDisplays() - 1; display >= 0; display--)
@@ -267,47 +269,45 @@ bool FrameBufferSDL2::setVideoMode(const string& title, const VideoMode& mode)
posX = BSPF::clamp(posX, x0 - Int32(mode.screen.w) + 50, x1 - 50);
posY = BSPF::clamp(posY, y0 + 50, y1 - 50);
}
- uInt32 flags = mode.fsIndex != -1 ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0;
- flags |= SDL_WINDOW_ALLOW_HIGHDPI;
- // macOS seems to have issues with destroying the window, and wants to
- // keep the same handle
- // Problem is, doing so on other platforms results in flickering when
- // toggling fullscreen windowed mode
- // So we have a special case for macOS
-#ifndef BSPF_MACOS
- // Don't re-create the window if its size hasn't changed, as it's not
- // necessary, and causes flashing in fullscreen mode
+#ifdef ADAPTABLE_REFRESH_SUPPORT
+ SDL_DisplayMode adaptedSdlMode;
+ const bool shouldAdapt = fullScreen && myOSystem.settings().getBool("tia.fs_refresh")
+ && gameRefreshRate()
+ // take care of 59.94 Hz
+ && refreshRate() % gameRefreshRate() != 0 && refreshRate() % (gameRefreshRate() - 1) != 0;
+ const bool adaptRefresh = shouldAdapt && adaptRefreshRate(displayIndex, adaptedSdlMode);
+#else
+ const bool adaptRefresh = false;
+#endif
+ const uInt32 flags = SDL_WINDOW_ALLOW_HIGHDPI
+ | (fullScreen ? adaptRefresh ? SDL_WINDOW_FULLSCREEN : SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
+
+ // Don't re-create the window if its display and size hasn't changed,
+ // as it's not necessary, and causes flashing in fullscreen mode
if(myWindow)
{
+ const int d = SDL_GetWindowDisplayIndex(myWindow);
int w, h;
+
SDL_GetWindowSize(myWindow, &w, &h);
- if(uInt32(w) != mode.screen.w || uInt32(h) != mode.screen.h)
+ if(d != displayIndex || uInt32(w) != mode.screen.w || uInt32(h) != mode.screen.h
+ || adaptRefresh)
{
SDL_DestroyWindow(myWindow);
myWindow = nullptr;
}
}
+
if(myWindow)
{
// Even though window size stayed the same, the title may have changed
SDL_SetWindowTitle(myWindow, title.c_str());
SDL_SetWindowPosition(myWindow, posX, posY);
}
-#else
- // macOS wants to *never* re-create the window
- // This sometimes results in the window being resized *after* it's displayed,
- // but at least the code works and doesn't crash
- if(myWindow)
- {
- SDL_SetWindowFullscreen(myWindow, flags);
- SDL_SetWindowSize(myWindow, mode.screen.w, mode.screen.h);
- SDL_SetWindowPosition(myWindow, posX, posY);
- SDL_SetWindowTitle(myWindow, title.c_str());
- }
-#endif
else
{
+ forceCreateRenderer = true;
myWindow = SDL_CreateWindow(title.c_str(), posX, posY,
mode.screen.w, mode.screen.h, flags);
if(myWindow == nullptr)
@@ -316,30 +316,133 @@ bool FrameBufferSDL2::setVideoMode(const string& title, const VideoMode& mode)
Logger::error(msg);
return false;
}
+
setWindowIcon();
}
- uInt32 renderFlags = SDL_RENDERER_ACCELERATED;
- if(myOSystem.settings().getBool("vsync")) // V'synced blits option
- renderFlags |= SDL_RENDERER_PRESENTVSYNC;
- const string& video = myOSystem.settings().getString("video"); // Render hint
- if(video != "")
- SDL_SetHint(SDL_HINT_RENDER_DRIVER, video.c_str());
-
- myRenderer = SDL_CreateRenderer(myWindow, -1, renderFlags);
-
- detectFeatures();
- determineDimensions();
-
- if(myRenderer == nullptr)
+#ifdef ADAPTABLE_REFRESH_SUPPORT
+ if(adaptRefresh)
{
- string msg = "ERROR: Unable to create SDL renderer: " + string(SDL_GetError());
- Logger::error(msg);
+ // Switch to mode for adapted refresh rate
+ if(SDL_SetWindowDisplayMode(myWindow, &adaptedSdlMode) != 0)
+ {
+ Logger::error("ERROR: Display refresh rate change failed");
+ }
+ else
+ {
+ ostringstream msg;
+
+ msg << "Display refresh rate changed to " << adaptedSdlMode.refresh_rate << " Hz";
+ Logger::info(msg.str());
+ }
+ }
+#endif
+
+ return createRenderer(forceCreateRenderer);
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+bool FrameBufferSDL2::adaptRefreshRate(Int32 displayIndex, SDL_DisplayMode& adaptedSdlMode)
+{
+ SDL_DisplayMode sdlMode;
+
+ if(SDL_GetCurrentDisplayMode(displayIndex, &sdlMode) != 0)
+ {
+ Logger::error("ERROR: Display mode could not be retrieved");
return false;
}
+
+ const int currentRefreshRate = sdlMode.refresh_rate;
+ const int wantedRefreshRate = gameRefreshRate();
+ // Take care of rounded refresh rates (e.g. 59.94 Hz)
+ float factor = std::min(float(currentRefreshRate) / wantedRefreshRate,
+ float(currentRefreshRate) / (wantedRefreshRate - 1));
+ // Calculate difference taking care of integer factors (e.g. 100/120)
+ float bestDiff = std::abs(factor - std::round(factor)) / factor;
+ bool adapt = false;
+
+ // Display refresh rate should be an integer factor of the game's refresh rate
+ // Note: Modes are scanned with size being first priority,
+ // therefore the size will never change.
+ // Check for integer factors 1 (60/50 Hz) and 2 (120/100 Hz)
+ for(int m = 1; m <= 2; ++m)
+ {
+ SDL_DisplayMode closestSdlMode;
+
+ sdlMode.refresh_rate = wantedRefreshRate * m;
+ if(SDL_GetClosestDisplayMode(displayIndex, &sdlMode, &closestSdlMode) == nullptr)
+ {
+ Logger::error("ERROR: Closest display mode could not be retrieved");
+ return adapt;
+ }
+ factor = std::min(float(sdlMode.refresh_rate) / sdlMode.refresh_rate,
+ float(sdlMode.refresh_rate) / (sdlMode.refresh_rate - 1));
+ const float diff = std::abs(factor - std::round(factor)) / factor;
+ if(diff < bestDiff)
+ {
+ bestDiff = diff;
+ adaptedSdlMode = closestSdlMode;
+ adapt = true;
+ }
+ }
+ //cerr << "refresh rate adapt ";
+ //if(adapt)
+ // cerr << "required (" << currentRefreshRate << " Hz -> " << adaptedSdlMode.refresh_rate << " Hz)";
+ //else
+ // cerr << "not required/possible";
+ //cerr << endl;
+
+ // Only change if the display supports a better refresh rate
+ return adapt;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+bool FrameBufferSDL2::createRenderer(bool force)
+{
+ // A new renderer is only created when necessary:
+ // - new myWindow (force = true)
+ // - no renderer existing
+ // - different renderer flags
+ // - different renderer name
+ bool recreate = force || myRenderer == nullptr;
+ uInt32 renderFlags = SDL_RENDERER_ACCELERATED;
+ const string& video = myOSystem.settings().getString("video"); // Render hint
+ SDL_RendererInfo renderInfo;
+
+ if(myOSystem.settings().getBool("vsync")
+ && !myOSystem.settings().getBool("turbo")) // V'synced blits option
+ renderFlags |= SDL_RENDERER_PRESENTVSYNC;
+
+ // check renderer flags and name
+ recreate |= (SDL_GetRendererInfo(myRenderer, &renderInfo) != 0)
+ || ((renderInfo.flags & (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC)) != renderFlags
+ || (video != renderInfo.name));
+
+ if(recreate)
+ {
+ //cerr << "Create new renderer for buffer type #" << int(myBufferType) << endl;
+ if(myRenderer)
+ SDL_DestroyRenderer(myRenderer);
+
+ if(video != "")
+ SDL_SetHint(SDL_HINT_RENDER_DRIVER, video.c_str());
+
+ myRenderer = SDL_CreateRenderer(myWindow, -1, renderFlags);
+
+ detectFeatures();
+ determineDimensions();
+
+ if(myRenderer == nullptr)
+ {
+ string msg = "ERROR: Unable to create SDL renderer: " + string(SDL_GetError());
+ Logger::error(msg);
+ return false;
+ }
+ }
clear();
SDL_RendererInfo renderinfo;
+
if(SDL_GetRendererInfo(myRenderer, &renderinfo) >= 0)
myOSystem.settings().setValue("video", renderinfo.name);
@@ -407,6 +510,36 @@ bool FrameBufferSDL2::fullScreen() const
#endif
}
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+int FrameBufferSDL2::refreshRate() const
+{
+ ASSERT_MAIN_THREAD;
+
+ const uInt32 displayIndex = SDL_GetWindowDisplayIndex(myWindow);
+ SDL_DisplayMode sdlMode;
+
+ if(SDL_GetCurrentDisplayMode(displayIndex, &sdlMode) == 0)
+ return sdlMode.refresh_rate;
+
+ if(myWindow != nullptr)
+ Logger::error("Could not retrieve current display mode");
+
+ return 0;
+}
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+int FrameBufferSDL2::gameRefreshRate() const
+{
+ if(myOSystem.hasConsole())
+ {
+ const string format = myOSystem.console().getFormatString();
+ const bool isNtsc = format == "NTSC" || format == "PAL60" || format == "SECAM60";
+
+ return isNtsc ? 60 : 50; // The code will take care of 59/49 Hz
+ }
+ return 0;
+}
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferSDL2::renderToScreen()
{
@@ -419,10 +552,9 @@ void FrameBufferSDL2::renderToScreen()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferSDL2::setWindowIcon()
{
- ASSERT_MAIN_THREAD;
-
#if !defined(BSPF_MACOS) && !defined(RETRON77)
#include "stella_icon.hxx"
+ ASSERT_MAIN_THREAD;
SDL_Surface* surface = SDL_CreateRGBSurfaceFrom(stella_icon, 32, 32, 32,
32 * 4, 0xFF0000, 0x00FF00, 0x0000FF, 0xFF000000);
diff --git a/src/common/FrameBufferSDL2.hxx b/src/common/FrameBufferSDL2.hxx
index 64803e6bb..7904ed0ee 100644
--- a/src/common/FrameBufferSDL2.hxx
+++ b/src/common/FrameBufferSDL2.hxx
@@ -95,6 +95,21 @@ class FrameBufferSDL2 : public FrameBuffer
*/
void readPixels(uInt8* buffer, uInt32 pitch, const Common::Rect& rect) const override;
+ /**
+ This method is called to query if the current window is not centered
+ or fullscreen.
+
+ @return True, if the current window is positioned
+ */
+ bool isCurrentWindowPositioned() const override;
+
+ /**
+ This method is called to query the video hardware for position of
+ the current window
+
+ @return The position of the currently displayed window
+ */
+ Common::Point getCurrentWindowPos() const override;
/**
This method is called to query the video hardware for the index
of the display the current window is displayed on
@@ -102,12 +117,7 @@ class FrameBufferSDL2 : public FrameBuffer
@return the current display index or a negative value if no
window is displayed
*/
- Int32 getCurrentDisplayIndex() override;
-
- /**
- This method is called to preserve the last current windowed position.
- */
- void updateWindowedPos() override;
+ Int32 getCurrentDisplayIndex() const override;
/**
Clear the frame buffer.
@@ -137,12 +147,12 @@ class FrameBufferSDL2 : public FrameBuffer
/**
Transform from window to renderer coordinates, x direction
*/
- int scaleX(int x) const { return (x * myRenderW) / myWindowW; }
+ int scaleX(int x) const override { return (x * myRenderW) / myWindowW; }
/**
Transform from window to renderer coordinates, y direction
*/
- int scaleY(int y) const { return (y * myRenderH) / myWindowH; }
+ int scaleY(int y) const override { return (y * myRenderH) / myWindowH; }
protected:
//////////////////////////////////////////////////////////////////////
@@ -171,6 +181,25 @@ class FrameBufferSDL2 : public FrameBuffer
*/
bool setVideoMode(const string& title, const VideoMode& mode) override;
+ /**
+ Checks if the display refresh rate should be adapted to game refresh rate in (real) fullscreen mode
+
+ @param displayIndex The display which should be checked
+ @param adaptedSdlMode The best matching mode if the refresh rate should be changed
+
+ @return True if the refresh rate should be changed
+ */
+ bool adaptRefreshRate(Int32 displayIndex, SDL_DisplayMode& adaptedSdlMode);
+
+ /**
+ Create a new renderer if required
+
+ @param force If true, force new renderer creation
+
+ @return False on any errors, else true
+ */
+ bool createRenderer(bool force);
+
/**
This method is called to create a surface with the given attributes.
@@ -223,6 +252,16 @@ class FrameBufferSDL2 : public FrameBuffer
*/
void determineDimensions();
+ /**
+ Retrieve the current display's refresh rate, or 0 if no window
+ */
+ int refreshRate() const override;
+
+ /**
+ Retrieve the current game's refresh rate, or 60 if no game
+ */
+ int gameRefreshRate() const;
+
private:
// The SDL video buffer
SDL_Window* myWindow{nullptr};
diff --git a/src/common/JoyMap.cxx b/src/common/JoyMap.cxx
index 2a20b4a8b..266dd5e74 100644
--- a/src/common/JoyMap.cxx
+++ b/src/common/JoyMap.cxx
@@ -185,9 +185,35 @@ JoyMap::JoyMappingArray JoyMap::getEventMapping(const Event::Type event, const E
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string JoyMap::saveMapping(const EventMode mode) const
{
+ using MapType = std::pair;
+ std::vector sortedMap(myMap.begin(), myMap.end());
+
+ std::sort(sortedMap.begin(), sortedMap.end(),
+ [](const MapType& a, const MapType& b)
+ {
+ // Event::Type first
+ if(a.second != b.second)
+ return a.second < b.second;
+
+ if(a.first.button != b.first.button)
+ return a.first.button < b.first.button;
+
+ if(a.first.axis != b.first.axis)
+ return a.first.axis < b.first.axis;
+
+ if(a.first.adir != b.first.adir)
+ return a.first.adir < b.first.adir;
+
+ if(a.first.hat != b.first.hat)
+ return a.first.hat < b.first.hat;
+
+ return a.first.hdir < b.first.hdir;
+ }
+ );
+
ostringstream buf;
- for (auto item : myMap)
+ for (auto item : sortedMap)
{
if (item.first.mode == mode)
{
diff --git a/src/common/JoyMap.hxx b/src/common/JoyMap.hxx
index 6448de1ff..e3cc7ff7a 100644
--- a/src/common/JoyMap.hxx
+++ b/src/common/JoyMap.hxx
@@ -19,6 +19,7 @@
#define CONTROLLERMAP_HXX
#include
+
#include "Event.hxx"
#include "EventHandlerConstants.hxx"
diff --git a/src/common/KeyMap.cxx b/src/common/KeyMap.cxx
index eca0369ec..47b34dc9c 100644
--- a/src/common/KeyMap.cxx
+++ b/src/common/KeyMap.cxx
@@ -16,11 +16,12 @@
//============================================================================
#include "KeyMap.hxx"
+#include