More Games that Run On SCUMMVM and HELP?

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
GusCE6
Posts: 62
Joined: Wed Nov 07, 2018 9:50 pm

More Games that Run On SCUMMVM and HELP?

Post by GusCE6 »

Recently while tinkering around with the more recent SCUMMVM build for Windows and comparing it to the Windows CE v1.3.1 build I found a few more games that the former (not the CE version) will run. I haven't found them mentioned in the documentation anywhere so hopefully this isn't old news.

There is a somewhat obscure 1997 "prequel" by Activision called "Zork: The Undiscovered Underground." It has something called "ZorkTUUWinFrotz" in the folder, and when you fire it up you get a blue screen/white text but this can be changed like other things (e.g. font). It looks a bit like a Wordpad program.

Using SCUMMVM to play it works well enough- you get the error message "> @get_child called with object 0 (PC = 953f) (will ignore further occurrences)" when you first get the chance to input something but after that the game works fine- except for similar occurances under certain circumstances. You can only use the blue screen/white text mode since the controls from Frotz are not available. Saving and Loading games is just a bit awkward but appear to work. OVERALL: the game is playable but with minor glitches.


The other games are the three "Jewels of Darkness" games. The colors are rather different from those on DOSBox; it is a CGA game and changing various settings has no effect. The game runs well otherwise, but unfortunately there is a little problem: you cannot save a game; when you try to LOAD, RESTORE, or whatever a game, there is nothing. You get a "Saving using interpreter" followed by a "Game saved" message, but...nothing. The message is "Unable to restore game." Save files do appear in the SCUMMVM folder in the APPDATA folder, but do nothing.

When first starting these three "Jewels of Darkness" games you see in Bold type "Level 9 Interpreter, ScummVM version."

These three games run perfectly on both DOSBox v0.74 for Windows (ASUS, Sony, and Dell) and, believe it or not, PocketDOS v1.2.1 on the crummy Sylvania Windows CE netbook. It should be noted that in these cases you start from a central file and are given various options including graphics cards (even Hercules!) or all-text. You are then asked which game you want to play.

With SCUMMVM you must choose each game one at a time, those options never appear because the central "menu" file is not detected.





Now...I am using the Eclipse IDE with MinGW. Can someone post code for putting a window with text in it? The samples I find online never work, I get error messages. This is just to get started. Here is an example of code that did not work:

Code: Select all

#include <Windows.h>
#define ErrorMessageBox(a,b) MessageBox(a,b,"Error:",MB_ICONWARNING);

bool SetUpWindowClass (char*, int, int, int);
LRESULT CALLBACK WindowProcedure (HWND, unsigned int, WPARAM, LPARAM);

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpsCmdLine, int iCmdShow) {
	if (!SetUpWindowClass ("1", 255, 255, 255)) {
		ErrorMessageBox (NULL, "Window class \"1\" failed");
		return 0;
	}
	HWND hWnd = CreateWindow ("1", "Hello World - Win32 API", WS_OVERLAPPEDWINDOW, 315, 115, 700, 480, NULL, NULL, hInstance, NULL);
	if (!hWnd) {
		ErrorMessageBox (NULL, "Window handle = NULL");
		return 0;
	}
	ShowWindow (hWnd, SW_SHOW);
	MSG uMsg;
	while (GetMessage (&uMsg, NULL, 0, 0) > 0) {
		TranslateMessage (&uMsg);
		DispatchMessage (&uMsg);
	}
	return 0;
}

bool SetUpWindowClass (char *cpTitle, int iR, int iG, int iB) {
	WNDCLASSEX WindowClass;
	WindowClass.cbClsExtra = 0;
	WindowClass.cbWndExtra = 0;
	WindowClass.cbSize = sizeof (WNDCLASSEX);
	WindowClass.style = 0;
	WindowClass.lpszClassName = cpTitle;
	WindowClass.lpszMenuName = NULL;
	WindowClass.lpfnWndProc = WindowProcedure;
	WindowClass.hInstance = GetModuleHandle (NULL);
	WindowClass.hCursor = LoadCursor (NULL, IDC_ARROW);
	WindowClass.hbrBackground = CreateSolidBrush (RGB (iR, iG, iB));
	WindowClass.hIcon = LoadIcon (NULL, IDI_APPLICATION);
	WindowClass.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
	if (RegisterClassEx (&WindowClass)) return true;
	else return false;
}

LRESULT CALLBACK WindowProcedure (HWND hWnd, unsigned int uiMsg, WPARAM wParam, LPARAM lParam) {
	switch (uiMsg) {
		case WM_CLOSE:
			DestroyWindow (hWnd);
			break;
		case WM_DESTROY:
			PostQuitMessage (0);
			break;
		case WM_PAINT: {
				PAINTSTRUCT ps;
				HDC hDC = BeginPaint (hWnd, &ps);
				char *cpaText [] = {
					"Hello World!",
					"This is a hello world application made in the Win32 API",
					"This example was made by some random dude, aka -LeetGamer-"
				};
				int iY = 5;
				for (int iLoopCounter = 0; cpaText [iLoopCounter] != '\0'; iLoopCounter++, iY += 20) {
					TextOut (hDC, 5, iY, cpaText [iLoopCounter], strlen (cpaText [iLoopCounter]));
				}
				EndPaint (hWnd, &ps);
			}
			break;
	}
	return DefWindowProc (hWnd, uiMsg, wParam, lParam);
}

I get error messages involving "deprecated."

Thanks.
User avatar
criezy
ScummVM Developer
Posts: 955
Joined: Sat Sep 23, 2006 10:41 am
Location: West Sussex, UK

Re: More Games that Run On SCUMMVM and HELP?

Post by criezy »

GusCE6 wrote: Sat May 30, 2020 10:42 pm Recently while tinkering around with the more recent SCUMMVM build for Windows and comparing it to the Windows CE v1.3.1 build I found a few more games that the former (not the CE version) will run. I haven't found them mentioned in the documentation anywhere so hopefully this isn't old news.
Those games are actually mentioned on our wiki, for example on the following pages:
https://wiki.scummvm.org/index.php?title=Glk/Frotz
https://wiki.scummvm.org/index.php?title=Glk/Level9
They are however not supported yet and their engines are still under development.
GusCE6
Posts: 62
Joined: Wed Nov 07, 2018 9:50 pm

Re: More Games that Run On SCUMMVM and HELP?

Post by GusCE6 »

Sorry about that- I was looking through the information included with SCUMMVM itself.

Is there any information- especially for an amateur- on how to work with SCUMMVM by using Eclipse and MinGW? Trying to find anything about programming actual working apps and the like is a real hassle.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3560
Joined: Mon Oct 31, 2005 7:39 am

Re: More Games that Run On SCUMMVM and HELP?

Post by eriktorbjorn »

GusCE6 wrote: Sat May 30, 2020 10:42 pm Using SCUMMVM to play it works well enough- you get the error message "> @get_child called with object 0 (PC = 953f) (will ignore further occurrences)"
Short version: Technically, there is a bug in the game itself. (From what I remember, that game was always a bit buggy, alas.) I don't know if the warning can be disabled in ScummVM or not.

Slightly longer version: The game is written for the Z-Machine, the abstract machine Infocom created to run their games on. Even though the game was designed (but not programmed) by two former Infocom employees, it didn't use Infocom's own compiler. Rather, it was written in a language called Inform that was created some years after Infocom went out of business.

Inform was created without any access to the original Z-Machine specification, so the understanding of it has evolved alongside the compiler and the interpreters. As a consequence, newer interpreters complain about undefined behavior that older ones just ignored. Such as trying to access the contents of an invalid object, as seen above. I know some interpreters allow you to disable such warnings, but I don't know about the one currently in ScummVM.

You can actually find similar errors in some of Infocom's own games. It's pretty rare, but not unheard of.

These days, a lot more is known about the Z-Machine and Infocom's ZIL language. Internal manuals, as well as the source code for the games themselves, has been leaked to the Internet. There is even a new ZIL compiler (called ZILF) that can compile most of the old Infocom source code, though I'm not aware of any substantive new games being created with it yet.
Roody
Posts: 4
Joined: Sun Nov 27, 2016 2:45 am
Contact:

Re: More Games that Run On SCUMMVM and HELP?

Post by Roody »

Back in the rec.arts.int-fiction days, we called those Vile Zero Errors From Hell. I believe most interpreters just ignore them these days (unless some kind of strict mode is on).
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3560
Joined: Mon Oct 31, 2005 7:39 am

Re: More Games that Run On SCUMMVM and HELP?

Post by eriktorbjorn »

Roody wrote: Tue Jun 23, 2020 7:57 pm I believe most interpreters just ignore them these days (unless some kind of strict mode is on).
The default for Frotz is to report the first occurrence of an error. That's how I know they sometimes happen in Infocom's games as well, though as Zarf pointed out it's pretty rare indeed. The easily reproducible examples I've come across so far are:
  • Rubbing the hot bell in Zork I.
  • Knocking on the front door in Deadline, from the inside.
  • Trying to take a "pseudo object" in some games, e.g. "TAKE OBJECT" on the Bridge in Starcross.
  • Putting the silver rod in the silver slot, and then taking the silver rod again in Starcross.
  • Releasing [spoiler] after handcuffing him/her in The Witness.
  • Eating from any empty container in Planetfall. (E.g. "EAT FROM UNIFORM", if you removed the ID card first.)
  • "ENTER DOOR" from the Narrow Passageway in Infidel.
  • "EXIT" in some games, e.g. Sorcerer.
  • Knocking on the entry hatch from inside the SCIMITAR in Seastalker.
  • "PUT NOTE UNDER DOOR" in the Red Boar Inn in Cutthroats.
  • "GO THROUGH DOOR" in the first room of The Hitchhiker's Guide to the Galaxy. (Not in the Solid Gold version, apparently?)
  • "DESTROY BARTENDER" (or any other person?) in Suspect. This also prints garbage.
  • Opening the front door from inside in Suspect, before anyone new has arrived.
Post Reply