Goblins III, M3-SD, lockup after developer logo movie

Subforum for discussion and help with ScummVM's Nintendo DS port

Moderator: ScummVM Team

shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Goblins III, M3-SD, lockup after developer logo movie

Post by shadowcode »

Hello all,

I'm having a bit of trouble getting Goblins III to work on ScummVM-DS. The screen stays black after the developer logo movie, showing just the cursor/mouse image on the top screen.

I have a M3-Adapter (Slot-2 solution with a passcard) with the latest firmware. I'm using AgentQ's DLDI driver, as Chishm's fails to initialize.

I'm using ScummVM DS Version 0.10.0a, build D.

The directory listing for \gob3 is as follows:

Code: Select all

15-10-1993  04:50           835.339 COKTEL.IMD
18-12-1993  11:06         7.224.322 EXT.STK
26-11-1993  07:53         9.089.298 IMD.ITK
18-12-1993  11:05           612.482 INTRO.STK
23-11-1993  13:12             1.324 MUS_GOB3.LIC
18-12-1993  11:06           476.822 TOT.STK
26-11-1993  08:30        95.578.408 USGOB3.ITK
I've also tried copying all of the files of the CD as well, but no dice. The only thing the console mentions (well before it locks up) that two wav tracks couldn't be found, but that's normal iirc. Tried three different SD cards, as well.

Does anyone have any idea what's going wrong?
User avatar
PsYcO
Got 2 warnings
Posts: 511
Joined: Sun Dec 24, 2006 9:27 pm
Location: UK, Enfield
Contact:

Post by PsYcO »

can you get it working on other ports/platforms?
User avatar
DrMcCoy
ScummVM Developer
Posts: 595
Joined: Sat Dec 17, 2005 1:33 pm
Location: Braunschweig, Germany
Contact:

Post by DrMcCoy »

First of all, you're missing a track1.wav/.flac/.ogg/.mp3. The CD version of Goblins 3 has a CD audio track, you should rip it to a file.

That shouldn't produce your problem, though.
Please check at first if it works on your desktop computer.
If it does:
You said you can read the console, could run ScummVM on your DS with "-d1 --debugflags=DrawOpcodes,FuncOpcodes", open a bug report on our tracker and attach the output there (if possible)?
Also, if you can, could you check whether it still happens in the current SVN version (you'd need to compile ScummVM yourself then)?
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

DrMcCoy wrote:First of all, you're missing a track1.wav/.flac/.ogg/.mp3. The CD version of Goblins 3 has a CD audio track, you should rip it to a file.

That shouldn't produce your problem, though.
Please check at first if it works on your desktop computer.
Yup, that works.
DrMcCoy wrote: If it does:
You said you can read the console, could run ScummVM on your DS with "-d1 --debugflags=DrawOpcodes,FuncOpcodes", open a bug report on our tracker and attach the output there (if possible)?
I don't think I can pass command line parameters on my DS.
DrMcCoy wrote:Also, if you can, could you check whether it still happens in the current SVN version (you'd need to compile ScummVM yourself then)?
Will do, may as well force -dl and the debugflags ;) while I'm at it.

Just one question, how do I compile ScummVM DS? As in, is there a configure/makefile in the main branch that takes care of this, and do I need a toolkit (devkitpro?).

*edit*, found the wiki article. Any pitfalls though?
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

Compiling: One thing to remember is to disable libmad if you don't have a ARM compiled libmad .a file in the relevent libs folder. Do this by editing the makefile options in backends/platform/ds/arm9.

If you're building from source, you can pass command line parameters by changing a string at the bottom of dsmain.cpp.

I haven't tried run Goblins 3 CD version, as I only have the floppy version. It could possibly be running out of RAM.

Press Y for the debug console then hold L + R to display the amount of free memory. If it's <500Kb of so, then RAM is probably the issue.

The DS makefile is in backends/platform/ds.
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

Thanks :). Slowly getting there.
There's 1680KB free (largest 1696K), seems ok.

I haven't gotten it to compile yet, the arm7 code compiles fine but the arm9 code doesn't. I seem to be missing the obj file for blitters_arm, which is odd, as there's only a blitters.cpp source file.

Changing it (in PORT_OBJS) to blitters.o doesn't seem to work, and yields in a dependency error :/

Also, I was seem to be missing \backends\platform\ds\arm9\data\8x8font_tga.bin (copied default_font.bin as a placeholder).

*edit* I have a log here.
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

I would compile up the version in branches/branch-0-10-0. That version should compile straight from the repository.
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

It compiles now :).
Just one question, I assume that debugsymbols were compiled as well and embedded in the bins. My NDS file is about 400k bigger than the original ones? How do I strip 'm?
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

That's strange, there should be no debug symbols unless USE_PROFILER or USE_DEBUGGER is enabled.

It's possible that the extra space is caused by the addition of a new engine. You may need to add:
DISABLE_DRASCULA = 1
in order to disable the new Drascula engine.

To check this, look in the engines folder in the build folder for .a files that were created during the build.

Let me know if you fix Goblins 3 or do anything else cool with the DS port!
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

hmm. Output said that debuglevel 1 was enabled, but I see nothing new in the console :/.
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

debug level 9 should produce more stuff than level 1.
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

agentq wrote:Let me know if you fix Goblins 3 or do anything else cool with the DS port!
Will do, thanks.
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

Still tracing the bug. I'm worried it's somehow in the DLDI driver :-/.

It fails to open a file handle to "IMD.ITK" even though the file is there. opened a number of other files (USGOB3.ITK, the audio file) successfully but fails to open the IMD.ITK file. Figuring out where it opens that file to see if it's allowed to fail gracefully, it's only a movie file.

Gawd, wish I had breakpoints.
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

There is a limit in a header file for the number of files that can be open at one time. Perhaps this might be of some help?
shadowcode
Posts: 13
Joined: Sun Sep 02, 2007 10:27 pm

Post by shadowcode »

Yeah, I saw that. Not sure if that's what's going wrong, though. There are log messages in case the limit is hit.

Basically, the o2_openItk (interopt call I suspect made from the vm scripts?) opens the ITK data files. However, it actually fails to find that particular file. Even a File::exists() call fails to find the file. This seems to happen somewhere down in the ds-fs backend, maybe even in the FAT (DLDI?) library. FAT_fopen fails to find "GOB3//IMD.ITK".

As a work-around/test I made DataIO::openDataFile(const char *src, bool itk) fail gracefully (instead of calling error() with a message. The message never appeared because it also called exit()) and just return.

At least I got to a playable state, so that's working. Apparently it's just accessing the 8.8MB movie file. Because it seems to work for other people, can it be something in the DLDI driver?
Post Reply