ZX Spectrum Next port

Discussion about other and unofficial ports of ScummVM

Moderator: ScummVM Team

Post Reply
Posts: 1
Joined: Tue May 03, 2022 5:32 pm

ZX Spectrum Next port

Post by Stefan123 »

I'm investigating the feasibility of porting the SCUMM engine in ScummVM to the ZX Spectrum Next retro computer with the goal of running Monkey Island 1. Spectrum Next is a modern evolution and remake of the Sinclair ZX Spectrum 8-bit home computer from the 1980s. It is compatible with the original Spectrum and adds improved speed, graphics, sound and storage capabilities while still being true to its 8-bit origins. You can read more about the Spectrum Next at specnext.com.

Spectrum Next is quite powerful for an 8-bit computer. It contains a 28 MHz Z80 CPU with a few extra instructions, 2 MB physical RAM where 1792 KB is available to programs, SD card as storage medium, three AY-3-8912 sound chips and four 8-bit DACs, DMA, multiple graphics modes where the one best suited for SCUMM is 320 x 256 pixels in 256 colours (8 bpp) from a 512 colour palette, support for horizontal and vertical hardware scrolling, and 64 16×16 pixels hardware sprites in 256 colours.

The 64 KB address space is divided in 8 memory slots of 8 KB each. The 1792 KB RAM is divided in 224 memory pages of 8 KB each. Any of these 224 memory pages can be paged in to any of the 8 memory slots in the 64 KB address space.

Z88DK is a really good and well maintained C compiler with Spectrum Next support. However, there is no C++ support available.

So the first obstacle would be to either convert the SCUMM engine from C++ to C or use an older version of the engine where the code was mostly C-like. I read in an article on Ars Technica that ScummVM started out in C and was later rewritten in C++. I looked at the old versions in the old repository at SourceForge and it looks like this transition was made in version 0.3.0, leaving version 0.2.0 as the last C-like version. My impression is that version 0.2.0 is too old and incomplete to base a porting on. So this would leave me with the option of converting a C++ version to C.

Which is the oldest version with the least level of abstractions and object orientation that is stable and feature complete enough to run Monkey Island 1? I found the ScummST project for stock Atari ST which is based on ScummVM 0.6.0 and it looks super impressive when running on an 8 MHz 68K Atari ST. Maybe this particular version is a sweet spot between feature completeness and code simplicity?

Do you think the Spectrum Next would be powerful enough to run Monkey Island 1? I realize that a SCUMM port for Spectrum Next would be more of a rewrite with unnecessary abstractions removed, the converted C code changed to accommodate an 8-bit system where possible and the most performance critical parts of the code rewritten in Z80 assembler.

Before spending anymore time on this potential future project, I would be very interested in hearing comments from any of the ScummVM developers regarding the feasibility of all this.
User avatar
ScummVM Developer
Posts: 3481
Joined: Mon Oct 31, 2005 7:39 am

Re: ZX Spectrum Next port

Post by eriktorbjorn »

Stefan123 wrote: Thu May 05, 2022 7:29 pm Which is the oldest version with the least level of abstractions and object orientation that is stable and feature complete enough to run Monkey Island 1?
The earliest version where Monkey Island 1 is mentioned is 0.0.2. 0.0.1 only mentions Monkey Island 2, which was apparently the first game ScummVM targeted. Such ancient versions can still be found on SourceForge. I don't know if they are archived elsewhere, but they probably should be.

I first encountered ScummVM between 0.2.0 and 0.3.0, and from what I vaguely remember both Monkey Island 1 (the CD version) and 2 were already quite playable, though Monkey Island 2 had a lot of little issues with the music. At that point, I did not own a copy of the VGA floppy version of Monkey Island 1 so I can't speak for that. And after all these years, I still don't own the EGA version.

Of course, a lot of bugs have been fixed since then.

I have no idea about your other questions, though. Sorry.
User avatar
ScummVM Developer
Posts: 891
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: ZX Spectrum Next port

Post by criezy »

eriktorbjorn wrote: Fri May 06, 2022 7:48 am Such ancient versions can still be found on SourceForge. I don't know if they are archived elsewhere, but they probably should be.
All versions are available on https://downloads.scummvm.org/frs/scummvm/

I don't have answers to your questions either, but our website has a number of information that could help you.

The compatibility page on our website has compatibility per version. According to it The Secret of Monkey Island is marked as good in version 0.4.0 and bugged in previous versions: https://www.scummvm.org/compatibility/0.4.0/
If you click on the game it also tells you which platform where supported (for 0.4.0 only the DOS versions where supported).

The NEWS file may also be a good source of information. It for example indicates:
  • 0.3.0b: Completed support for Monkey1 VGA Floppy
  • 0.4.0: Added support for the EGA versions of Monkey Island
  • 0.5.0: Added support for Amiga version of Monkey Island 1
  • 0.6.0: Many, Many, Many SCUMM game engine fixes. Many of them. And that's a lot.
Your questions also reminded me of an effort to do a limited port to Atari ST: viewtopic.php?t=15206
This did not require rewriting the code to C though.
Posts: 1
Joined: Tue Sep 20, 2022 2:55 pm

Re: ZX Spectrum Next port

Post by Dovgalyuk »

I made a kind of a port of NES Maniac Mansion to ZX Spectrum Next.
It implements NES-style graphics made of tiles and sprites.
Most of the things work correctly, but some bugs are still there.

Here is the repository: https://github.com/Dovgalyuk/scummnext
Post Reply