[Scummvm-git-logs] scummvm master -> e976f3b5d56e84d2e36c66da93a0549ee668dd49
bluegr
noreply at scummvm.org
Thu Feb 26 07:44:46 UTC 2026
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2f9c23f678 AGOS: Simon1 Acorn Floppy Demo - Fix for Simon appearing black in the Acorn Floppy Demo.
5d5531af17 AGOS: Simon1 Acorn Floppy Demo - Clarify comment about source of palette bytes.
e976f3b5d5 AGOS: Simon 1 Acorn Floppy Demo - Load palette entries for Simon's palette from VGA 0191
Commit: 2f9c23f6789d8b967c945a634c67d00b8d1c1a00
https://github.com/scummvm/scummvm/commit/2f9c23f6789d8b967c945a634c67d00b8d1c1a00
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T09:44:39+02:00
Commit Message:
AGOS: Simon1 Acorn Floppy Demo - Fix for Simon appearing black in the Acorn Floppy Demo.
Changed paths:
engines/agos/vga_s1.cpp
diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp
index cc6e4ae344f..44b1e6907e3 100644
--- a/engines/agos/vga_s1.cpp
+++ b/engines/agos/vga_s1.cpp
@@ -93,6 +93,41 @@ static const uint8 customPalette[96] = {
0xFF, 0xFF, 0x77,
};
+static const uint8 acornFloppyDemoPalette[96] = {
+ 0x00, 0x00, 0x00,
+ 0xE0, 0x94, 0x54,
+ 0xE0, 0x80, 0x40,
+ 0xA0, 0x50, 0x20,
+ 0x70, 0x28, 0x10,
+ 0x40, 0x00, 0x00,
+ 0x80, 0xA0, 0xC0,
+ 0x60, 0x80, 0xA0,
+ 0x40, 0x58, 0x80,
+ 0x00, 0x3C, 0x44,
+ 0xE0, 0xA4, 0x6C,
+ 0x94, 0x44, 0x8C,
+ 0x7C, 0x34, 0x74,
+ 0x64, 0x24, 0x5C,
+ 0x48, 0x14, 0x44,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0xEC, 0xEC,
+ 0x00, 0xFC, 0xFC,
+ 0x00, 0x00, 0x30,
+ 0x3C, 0x38, 0x54,
+ 0x80, 0xA0, 0xC0,
+ 0x60, 0x80, 0xA0,
+ 0x40, 0x58, 0x80,
+ 0x00, 0x3C, 0x44,
+ 0x64, 0x24, 0x5C,
+ 0x30, 0x00, 0x00,
+ 0x94, 0x44, 0x8C,
+ 0x7C, 0x34, 0x74,
+ 0x48, 0x14, 0x44,
+ 0xFC, 0xA0, 0xA0,
+ 0x9C, 0x00, 0x00,
+};
+
void AGOSEngine_Simon1::vc22_setPalette() {
byte *offs, *palptr = nullptr, *src;
uint16 a = 0, b, num, palSize = 0;
@@ -115,6 +150,26 @@ void AGOSEngine_Simon1::vc22_setPalette() {
offs = _curVgaFile1 + 6;
src = offs + b * palSize;
+ // Acorn Simon 1 Floppy Demo: Palette is missing the entries required for Simon.
+ // As a result, Simon was appearing black, this doesn't happen on real hardware,
+ // The palette actually lives in VGA 0191, but ScummVM is not loading this file.
+ // Check this is the floppy demo, not the cd demo, and the palette range is empty,
+ // if it is, populate it from acornFloppyDemoPalette.
+ if (getGameId() == GID_SIMON1 && getPlatform() == Common::kPlatformAcorn && (_gameDescription->desc.flags & ADGF_DEMO) && !(getFeatures() & GF_TALKIE)) {
+ bool paletteRangeEmpty = true;
+ const int startByte = 32 * 3;
+ const int endByte = 64 * 3;
+ for (int i = startByte; i < endByte; i++) {
+ if (_displayPalette[i] != 0) {
+ paletteRangeEmpty = false;
+ break;
+ }
+ }
+ if (paletteRangeEmpty) {
+ memcpy(&_displayPalette[startByte], acornFloppyDemoPalette, sizeof(acornFloppyDemoPalette));
+ }
+ }
+
do {
palptr[0] = src[0] * 4;
palptr[1] = src[1] * 4;
Commit: 5d5531af171c2bca4cc4cac1c1a55fa0c8f207ea
https://github.com/scummvm/scummvm/commit/5d5531af171c2bca4cc4cac1c1a55fa0c8f207ea
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T09:44:39+02:00
Commit Message:
AGOS: Simon1 Acorn Floppy Demo - Clarify comment about source of palette bytes.
Changed paths:
engines/agos/vga_s1.cpp
diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp
index 44b1e6907e3..2b40ea7c661 100644
--- a/engines/agos/vga_s1.cpp
+++ b/engines/agos/vga_s1.cpp
@@ -150,11 +150,9 @@ void AGOSEngine_Simon1::vc22_setPalette() {
offs = _curVgaFile1 + 6;
src = offs + b * palSize;
- // Acorn Simon 1 Floppy Demo: Palette is missing the entries required for Simon.
- // As a result, Simon was appearing black, this doesn't happen on real hardware,
- // The palette actually lives in VGA 0191, but ScummVM is not loading this file.
- // Check this is the floppy demo, not the cd demo, and the palette range is empty,
- // if it is, populate it from acornFloppyDemoPalette.
+ // Acorn Simon 1 floppy demo: Simon renders black because part of the palette
+ // is never populated. The original demo executable loads the palette data from
+ // VGA 0121 as a special case via the original executable, not via TABLES.
if (getGameId() == GID_SIMON1 && getPlatform() == Common::kPlatformAcorn && (_gameDescription->desc.flags & ADGF_DEMO) && !(getFeatures() & GF_TALKIE)) {
bool paletteRangeEmpty = true;
const int startByte = 32 * 3;
Commit: e976f3b5d56e84d2e36c66da93a0549ee668dd49
https://github.com/scummvm/scummvm/commit/e976f3b5d56e84d2e36c66da93a0549ee668dd49
Author: Robert Megone (robert.megone at gmail.com)
Date: 2026-02-26T09:44:39+02:00
Commit Message:
AGOS: Simon 1 Acorn Floppy Demo - Load palette entries for Simon's palette from VGA 0191
Changed paths:
engines/agos/agos.h
engines/agos/res.cpp
engines/agos/vga_s1.cpp
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index d07229f7480..950459d2b4d 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -1931,6 +1931,10 @@ protected:
void dumpVgaFile(const byte *vga) override;
+ bool loadSimonAcornFloppyDemoPalette(Common::Array<byte> &outPalette);
+ bool _simonAcornFloppyDemoPaletteLoaded = false;
+ void patchSimonAcornFloppyDemoPalettes();
+
void clearName() override;
void handleMouseWheelUp() override;
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index cb1597bccbd..1ef1d3c9391 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -1136,4 +1136,29 @@ void AGOSEngine::convertPC98Image(VC10_state &state) {
state.flags &= ~(kDFCompressedFlip | kDFCompressed);
}
+// Simon 1 Acorn Floppy Demo: loads Simon's sprite palette from VGA 01/0191
+bool AGOSEngine_Simon1::loadSimonAcornFloppyDemoPalette(Common::Array<byte> &outPalette) {
+ Common::File f;
+ if (!f.open("01/0191")) {
+ warning("Acorn demo: could not open 01/0191");
+ return false;
+ }
+
+ byte raw[96];
+ f.seek(489);
+ if (f.read(raw, 96) != 96) {
+ warning("Acorn demo: 0191 block 5 read failed");
+ f.close();
+ return false;
+ }
+ f.close();
+
+ outPalette.resize(48);
+ memset(outPalette.data(), 0, 48);
+ for (uint32 i = 0; i < 45; ++i)
+ outPalette[i + 3] = raw[i] * 4;
+
+ return true;
+}
+
} // End of namespace AGOS
diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp
index 2b40ea7c661..b2eb187d186 100644
--- a/engines/agos/vga_s1.cpp
+++ b/engines/agos/vga_s1.cpp
@@ -93,40 +93,31 @@ static const uint8 customPalette[96] = {
0xFF, 0xFF, 0x77,
};
-static const uint8 acornFloppyDemoPalette[96] = {
- 0x00, 0x00, 0x00,
- 0xE0, 0x94, 0x54,
- 0xE0, 0x80, 0x40,
- 0xA0, 0x50, 0x20,
- 0x70, 0x28, 0x10,
- 0x40, 0x00, 0x00,
- 0x80, 0xA0, 0xC0,
- 0x60, 0x80, 0xA0,
- 0x40, 0x58, 0x80,
- 0x00, 0x3C, 0x44,
- 0xE0, 0xA4, 0x6C,
- 0x94, 0x44, 0x8C,
- 0x7C, 0x34, 0x74,
- 0x64, 0x24, 0x5C,
- 0x48, 0x14, 0x44,
- 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00,
- 0x00, 0xEC, 0xEC,
- 0x00, 0xFC, 0xFC,
- 0x00, 0x00, 0x30,
- 0x3C, 0x38, 0x54,
- 0x80, 0xA0, 0xC0,
- 0x60, 0x80, 0xA0,
- 0x40, 0x58, 0x80,
- 0x00, 0x3C, 0x44,
- 0x64, 0x24, 0x5C,
- 0x30, 0x00, 0x00,
- 0x94, 0x44, 0x8C,
- 0x7C, 0x34, 0x74,
- 0x48, 0x14, 0x44,
- 0xFC, 0xA0, 0xA0,
- 0x9C, 0x00, 0x00,
-};
+// Simon 1 Acorn floppy demo does not load Simon's palette
+// via TABLES. It needs to be loaded and patched in.
+void AGOSEngine_Simon1::patchSimonAcornFloppyDemoPalettes() {
+ if (_simonAcornFloppyDemoPaletteLoaded)
+ return;
+
+ Common::Array<byte> palette;
+ if (!loadSimonAcornFloppyDemoPalette(palette))
+ return;
+
+ for (int c = 0; c < 16; ++c) {
+ const int dst = (32 + c) * 3;
+ const int src = c * 3;
+
+ if (_displayPalette[dst + 0] == 0 &&
+ _displayPalette[dst + 1] == 0 &&
+ _displayPalette[dst + 2] == 0) {
+ _displayPalette[dst + 0] = palette[src + 0];
+ _displayPalette[dst + 1] = palette[src + 1];
+ _displayPalette[dst + 2] = palette[src + 2];
+ }
+ }
+
+ _simonAcornFloppyDemoPaletteLoaded = true;
+}
void AGOSEngine_Simon1::vc22_setPalette() {
byte *offs, *palptr = nullptr, *src;
@@ -150,24 +141,6 @@ void AGOSEngine_Simon1::vc22_setPalette() {
offs = _curVgaFile1 + 6;
src = offs + b * palSize;
- // Acorn Simon 1 floppy demo: Simon renders black because part of the palette
- // is never populated. The original demo executable loads the palette data from
- // VGA 0121 as a special case via the original executable, not via TABLES.
- if (getGameId() == GID_SIMON1 && getPlatform() == Common::kPlatformAcorn && (_gameDescription->desc.flags & ADGF_DEMO) && !(getFeatures() & GF_TALKIE)) {
- bool paletteRangeEmpty = true;
- const int startByte = 32 * 3;
- const int endByte = 64 * 3;
- for (int i = startByte; i < endByte; i++) {
- if (_displayPalette[i] != 0) {
- paletteRangeEmpty = false;
- break;
- }
- }
- if (paletteRangeEmpty) {
- memcpy(&_displayPalette[startByte], acornFloppyDemoPalette, sizeof(acornFloppyDemoPalette));
- }
- }
-
do {
palptr[0] = src[0] * 4;
palptr[1] = src[1] * 4;
@@ -189,6 +162,12 @@ void AGOSEngine_Simon1::vc22_setPalette() {
};
}
+ // Acorn Simon 1 floppy demo: Simon renders black because part of the palette
+ // is never populated. The original demo executable loads the palette data from
+ // VGA 0191 as a special case, not via TABLES.
+ if (getGameId() == GID_SIMON1 && getPlatform() == Common::kPlatformAcorn && (_gameDescription->desc.flags & ADGF_DEMO) && !(getFeatures() & GF_TALKIE)) {
+ patchSimonAcornFloppyDemoPalettes();
+ }
_paletteFlag = 2;
_vgaSpriteChanged++;
}
More information about the Scummvm-git-logs
mailing list