Skip to content

Commit 30b1589

Browse files
committed
Merge branch 'cart-eff-grizzards'
2 parents 52c88a8 + 3295e26 commit 30b1589

22 files changed

+1291
-712
lines changed

Changes.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,23 @@
1212
Release History
1313
===========================================================================
1414

15-
7.x to 8.0 (xxx x, 202x)
15+
7.0 to 8.0 (mmm dd, 2026)
1616

17-
* Ported Stella to SDL3
17+
* Ported Stella to SDL3.
1818

19-
* Added option for switching Stella's theme in sync with OS
19+
* Added support for 'EFF' bankswitching (Bruce-Robert Pocock), as well
20+
as auto-detection of this format.
2021

21-
7.0 to 7.1 (xxx x, 202x)
22+
* Added option for switching Stella's theme in sync with OS.
2223

23-
* Enhanced PAL-60 detection, searches for signature (e.g. PAL60) in ROM
24+
* Enhanced PAL-60 detection, searches for signature (e.g. PAL60) in ROM.
2425

25-
* Enhanced VSYNC emulation, considers VBLANK now too
26+
* Enhanced VSYNC emulation, considers VBLANK now too.
27+
28+
* Added developer option for disabling PlusROM support.
29+
30+
-Have fun!
2631

27-
* Added developer option for disabling PlusROM support
2832

2933
6.7.1 to 7.0 (October 5, 2024)
3034

@@ -83,8 +87,6 @@
8387
* Codebase now uses C++20 features, which means a minimum of gcc-11
8488
or clang-10 for Linux/Mac, and Visual Studio 2022 for Windows.
8589

86-
-Have fun!
87-
8890

8991
6.7 to 6.7.1 (January 15, 2024)
9092

docs/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5118,8 +5118,9 @@ <h3><a name="EmulationProps"><b>Emulation Properties</b></a></h3>
51185118
<tr><td>E0 </td><td>8K Parker Bros </td><td>.E0 </td></tr>
51195119
<tr><td>E7 </td><td>8-16K M Network </td><td>.E7 .E78, .E78K</td></tr>
51205120
<tr><td>EF </td><td>64K Homestar Runner </td><td>.EF </td></tr>
5121+
<tr><td>EFF </td><td>64K+2Kee/Grizzards</td><td>.EFF </td></tr>
51215122
<tr><td>EFSC </td><td>64K Homestar Runner + RAM</td><td>.EFS, .EFSC </td></tr>
5122-
<tr><td>ELF </td><td>Mattress Monkeys, ARM based</td><td>.ELF </td></tr>
5123+
<tr><td>ELF </td><td>Mattress Monkeys, ARM based</td><td>.ELF </td></tr>
51235124
<tr><td>F0 </td><td>Dynacom Megaboy </td><td>.F0 </td></tr>
51245125
<tr><td>F4 </td><td>32K Atari </td><td>.F4 </td></tr>
51255126
<tr><td>F4SC </td><td>32K Atari + RAM </td><td>.F4S, .F4SC </td></tr>
@@ -5131,8 +5132,8 @@ <h3><a name="EmulationProps"><b>Emulation Properties</b></a></h3>
51315132
<tr><td>FA2 </td><td>CBS RAM Plus 24/28K </td><td>.FA2 </td></tr>
51325133
<tr><td>FC </td><td>Amiga Power Play Aracde 16/32K </td><td>.FC </td></tr>
51335134
<tr><td>FE </td><td>8K Activision (aka SCABS)</td><td>.FE </td></tr>
5134-
<tr><td>GL &#178;</td><td>4 or 6K GameLine Master Module</td><td>.GL </td></tr>
5135-
<tr><td>JANE </td><td>16K Coleco (Tarzan) </td><td>.JAN, .JANE </td></tr>
5135+
<tr><td>GL &#178;</td><td>4 or 6K GameLine Master Module</td><td>.GL </td></tr>
5136+
<tr><td>JANE </td><td>16K Coleco (Tarzan) </td><td>.JAN, .JANE </td></tr>
51365137
<tr><td>MDM </td><td>Menu Driven Megacart </td><td>.MDM </td></tr>
51375138
<tr><td>MVC </td><td>Movie Cart</td><td>.MVC </td></tr>
51385139
<tr><td>SB </td><td>128-256K SUPERbanking </td><td>.SB </td></tr>

src/debugger/gui/CartEFFWidget.cxx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//============================================================================
2+
//
3+
// SSSS tt lll lll
4+
// SS SS tt ll ll
5+
// SS tttttt eeee ll ll aaaa
6+
// SSSS tt ee ee ll ll aa
7+
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8+
// SS SS tt ee ll ll aa aa
9+
// SSSS ttt eeeee llll llll aaaaa
10+
//
11+
// Copyright (c) 1995-2026 by Bradford W. Mott, Stephen Anthony
12+
// and the Stella Team
13+
//
14+
// See the file "License.txt" for information on usage and redistribution of
15+
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16+
//============================================================================
17+
18+
#include "CartEFF.hxx"
19+
#include "CartEFFWidget.hxx"
20+
21+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22+
CartridgeEFFWidget::CartridgeEFFWidget(
23+
GuiObject* boss, const GUI::Font& lfont, const GUI::Font& nfont,
24+
int x, int y, int w, int h, CartridgeEFF& cart)
25+
: CartridgeEnhancedWidget(boss, lfont, nfont, x, y, w, h, cart)
26+
{
27+
initialize();
28+
}
29+
30+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
31+
string CartridgeEFFWidget::description()
32+
{
33+
ostringstream info;
34+
35+
info << "64k AtariAge EFF cartridge, 16 4k banks + 2k flash\n"
36+
<< CartridgeEnhancedWidget::description();
37+
38+
return info.str();
39+
}

src/debugger/gui/CartEFFWidget.hxx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//============================================================================
2+
//
3+
// SSSS tt lll lll
4+
// SS SS tt ll ll
5+
// SS tttttt eeee ll ll aaaa
6+
// SSSS tt ee ee ll ll aa
7+
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8+
// SS SS tt ee ll ll aa aa
9+
// SSSS ttt eeeee llll llll aaaaa
10+
//
11+
// Copyright (c) 1995-2026 by Bradford W. Mott, Stephen Anthony
12+
// and the Stella Team
13+
//
14+
// See the file "License.txt" for information on usage and redistribution of
15+
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16+
//============================================================================
17+
18+
#ifndef CARTRIDGEEFF_WIDGET_HXX
19+
#define CARTRIDGEEFF_WIDGET_HXX
20+
21+
class CartridgeEFF;
22+
23+
#include "CartEnhancedWidget.hxx"
24+
25+
class CartridgeEFFWidget : public CartridgeEnhancedWidget
26+
{
27+
public:
28+
CartridgeEFFWidget(GuiObject* boss, const GUI::Font& lfont,
29+
const GUI::Font& nfont,
30+
int x, int y, int w, int h,
31+
CartridgeEFF& cart);
32+
~CartridgeEFFWidget() override = default;
33+
34+
private:
35+
string manufacturer() override { return "Fred Quimby/AtariAge"; }
36+
37+
string description() override;
38+
39+
private:
40+
// Following constructors and assignment operators not supported
41+
CartridgeEFFWidget() = delete;
42+
CartridgeEFFWidget(const CartridgeEFFWidget&) = delete;
43+
CartridgeEFFWidget(CartridgeEFFWidget&&) = delete;
44+
CartridgeEFFWidget& operator=(const CartridgeEFFWidget&) = delete;
45+
CartridgeEFFWidget& operator=(CartridgeEFFWidget&&) = delete;
46+
};
47+
48+
#endif

src/debugger/gui/module.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ MODULE_OBJS := \
3838
src/debugger/gui/CartE7Widget.o \
3939
src/debugger/gui/CartEFSCWidget.o \
4040
src/debugger/gui/CartEFWidget.o \
41+
src/debugger/gui/CartEFFWidget.o \
4142
src/debugger/gui/CartF0Widget.o \
4243
src/debugger/gui/CartF4SCWidget.o \
4344
src/debugger/gui/CartF4Widget.o \

src/emucore/Bankswitch.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Bankswitch::BSList = {{
108108
{ "E0" , "E0 (8K Parker Bros)" },
109109
{ "E7" , "E7 (8-16K M Network)" },
110110
{ "EF" , "EF (64K H. Runner)" },
111+
{ "EFF" , "EFF (64K+2Kee/Grizzards)" },
111112
{ "EFSC" , "EFSC (64K H. Runner + RAM)" },
112113
{ "ELF" , "ELF (ARM bus stuffing)" },
113114
{ "F0" , "F0 (Dynacom Megaboy)" },
@@ -175,6 +176,7 @@ Bankswitch::Sizes = {{
175176
{ 8_KB, 8_KB }, // _E0
176177
{ 8_KB, 16_KB }, // _E7
177178
{ 64_KB, 64_KB }, // _EF
179+
{ 64_KB, 64_KB }, // _EFF
178180
{ 64_KB, 64_KB }, // _EFSC
179181
{ Bankswitch::any_KB, Bankswitch::any_KB }, // _ELF
180182
{ 64_KB, 64_KB }, // _F0
@@ -266,6 +268,7 @@ Bankswitch::ExtensionMap Bankswitch::ourExtensions = {
266268
{ "E78" , Bankswitch::Type::_E7 },
267269
{ "E78K" , Bankswitch::Type::_E7 },
268270
{ "EF" , Bankswitch::Type::_EF },
271+
{ "EFF" , Bankswitch::Type::_EFF },
269272
{ "EFS" , Bankswitch::Type::_EFSC },
270273
{ "EFSC" , Bankswitch::Type::_EFSC },
271274
{ "ELF" , Bankswitch::Type::_ELF },
@@ -335,6 +338,7 @@ Bankswitch::NameToTypeMap Bankswitch::ourNameToTypes = {
335338
{ "E0" , Bankswitch::Type::_E0 },
336339
{ "E7" , Bankswitch::Type::_E7 },
337340
{ "EF" , Bankswitch::Type::_EF },
341+
{ "EFF" , Bankswitch::Type::_EFF },
338342
{ "EFSC" , Bankswitch::Type::_EFSC },
339343
{ "ELF" , Bankswitch::Type::_ELF },
340344
{ "F0" , Bankswitch::Type::_F0 },

src/emucore/Bankswitch.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ class Bankswitch
4242
_32IN1, _64IN1, _128IN1, _2K, _3E, _3EX, _3EP, _3F,
4343
_4A50, _4K, _4KSC, _AR, _BF, _BFSC, _BUS, _CDF,
4444
_CM, _CTY, _CV, _DF, _DFSC, _DPC, _DPCP, _E0,
45-
_E7, _EF, _EFSC, _ELF, _F0, _F4, _F4SC, _F6,
46-
_F6SC, _F8, _F8SC, _FA, _FA2, _FC, _FE, _GL,
47-
_JANE, _MDM, _MVC, _SB, _TVBOY, _UA, _UASW, _WD,
48-
_WDSW, _WF8, _X07,
45+
_E7, _EF, _EFF, _EFSC, _ELF, _F0, _F4, _F4SC,
46+
_F6, _F6SC, _F8, _F8SC, _FA, _FA2, _FC, _FE,
47+
_GL, _JANE, _MDM, _MVC, _SB, _TVBOY,_UA, _UASW,
48+
_WD, _WDSW, _WF8, _X07,
4949
#ifdef CUSTOM_ARM
5050
_CUSTOM,
5151
#endif

src/emucore/CartCreator.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include "CartE7.hxx"
4545
#include "CartEF.hxx"
4646
#include "CartEFSC.hxx"
47+
#include "CartEFF.hxx"
4748
#include "CartF0.hxx"
4849
#include "CartF4.hxx"
4950
#include "CartF4SC.hxx"
@@ -262,6 +263,7 @@ CartCreator::createFromImage(const ByteBuffer& image, size_t size,
262263
case _E0: return make_unique<CartridgeE0>(image, size, md5, settings);
263264
case _E7: return make_unique<CartridgeE7>(image, size, md5, settings);
264265
case _EF: return make_unique<CartridgeEF>(image, size, md5, settings);
266+
case _EFF: return make_unique<CartridgeEFF>(image, size, md5, settings);
265267
case _EFSC: return make_unique<CartridgeEFSC>(image, size, md5, settings);
266268
case _F0: return make_unique<CartridgeF0>(image, size, md5, settings);
267269
case _F4: return make_unique<CartridgeF4>(image, size, md5, settings);

src/emucore/CartDetector.cxx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si
178178
}
179179
else if(size == 64_KB)
180180
{
181-
if (isProbablyCDF(image, size))
181+
if(isProbablyEFF(image, size, type))
182+
; // type has been set directly in the function
183+
else if (isProbablyCDF(image, size))
182184
type = Bankswitch::Type::_CDF;
183185
else if(isProbably3EX(image, size))
184186
type = Bankswitch::Type::_3EX;
@@ -679,6 +681,43 @@ bool CartDetector::isProbablyEF(const ByteBuffer& image, size_t size,
679681
return false;
680682
}
681683

684+
685+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
686+
bool CartDetector::isProbablyEFF(const ByteBuffer& image, size_t size,
687+
Bankswitch::Type& type)
688+
{
689+
static constexpr uInt8 effb[] = { 'E', 'F', 'F', 'B' };
690+
if(searchForBytes(image.get()+size-8, 8, effb, 4))
691+
{
692+
type = Bankswitch::Type::_EFF;
693+
return true;
694+
}
695+
696+
// Otherwise, EF cart bankswitching switches banks by accessing
697+
// addresses 0xFE0 to 0xFEF, usually with a NOP, as well as the 0xFF0
698+
// to 0xFF3 for save-to-cart and read from 0xFF4 (for the EEPROM).
699+
// Unlike EF, we require to find all three.
700+
bool isEFF = true;
701+
static constexpr uInt8 signature[4][3] = {
702+
{ 0x0C, 0xE0, 0xFF }, // NOP $FFE0
703+
{ 0x0C, 0xF0, 0x1F }, // NOP $1FF0
704+
{ 0xAD, 0xF4, 0x1F } // LDA $1FF4
705+
};
706+
for(const auto* const sig: signature)
707+
{
708+
if(!searchForBytes(image, size, sig, 3))
709+
{
710+
isEFF = false;
711+
break;
712+
}
713+
}
714+
715+
if (isEFF) {
716+
type = Bankswitch::Type::_EFF;
717+
}
718+
return isEFF;
719+
}
720+
682721
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
683722
bool CartDetector::isProbablyFA2(const ByteBuffer& image, size_t)
684723
{

src/emucore/CartDetector.hxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,21 @@ class CartDetector
177177
static bool isProbablyE7(const ByteBuffer& image, size_t size);
178178

179179
/**
180-
Returns true if the image is probably a E78K bankswitching cartridge
180+
Returns true if the image is probably a E78K bankswitching cartridge
181181
*/
182182
static bool isProbablyE78K(const ByteBuffer& image, size_t size);
183183

184184
/**
185-
Returns true if the image is probably an EF/EFSC bankswitching cartridge
185+
Returns true (and sets “type”) if the image is probably an EF/EFSC bankswitching cartridge
186186
*/
187187
static bool isProbablyEF(const ByteBuffer& image, size_t size, Bankswitch::Type& type);
188188

189+
/**
190+
Returns true (and sets “type”) if the image is probably an EFF (Grizzards)
191+
bankswitching+eeprom cartridge
192+
*/
193+
static bool isProbablyEFF(const ByteBuffer& image, size_t size, Bankswitch::Type& type);
194+
189195
/**
190196
Returns true if the image is probably an F6 bankswitching cartridge
191197
*/

0 commit comments

Comments
 (0)