Opened 5 years ago

Closed 2 months ago

#6262 closed defect (invalid)

Wii: SCUMMVM crashes when called with command line arguments

Reported by: SF/sionisaac Owned by: csnover
Priority: normal Component: Ports
Keywords: Cc:


I have tried many builds of scummvm wii and I cannot get any of them to accept command line arguments (if it is even possible). I have tried using wiiload to send the boot.elf from my pc to wii homebrew channel with various command line switches such as:

-p <path to one of my games>

Also I have created a small wii program that will call other ELF/DOL progs with command line parameters and that won't work either. Every method I try results in a code dump or and error in memory cpp file. The only thing that was a little different was when I tried:-

wiiload <scummvm.ELF> -p

and left the path blank. I got a message that the path could not be found. So I am assuming that some command line arguments are working or at least they have been in the past.

I am trying to make channels that will automatically load a particular game and the last save position for that game. I know this is possible on the PC versoion of Scummvm but what about the wii?

I took a look at the code and tried to compile the wii version with no alteration and got lots of errors about my compile environment, which is strange because I can compile the pc version fine and I have followed both compile guides to the letter. Would it be possible for someone to compile me a version to accept command line arguments or at least give me some tips or instructions to do it myself.

I had a thought that if command line arguments are screwing with wii version because of memory problems on the wii's low spec. Would it be possible to make a build with less features i.e The GUI to free up memory.

Ticket imported from: #3608075. Ticket imported from: bugs/6262.

Attachments (1)

crash-on-direct-launch.jpg (88.5 KB) - added by digitall 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 5 years ago by digitall

sionisaac: I am not the GC/Wii maintainer, but I can provide a general answer.

I assume you are following the instructions from here: ? Please note that these instructions may be slightly out of date so some thought may be needed on your part to resolve any minor issues i.e. if you are getting errors about your compile environment, those should be resolved firstly.

I have reviewed the code and as far as I can see, the Wii builds should accept command line parameters as per the desktop builds. The code for this is in the main function which for the Wii can be found in scummvm/backends/platform/wii/main.cpp which then calls the generic scummvm_main() function in scummvm/base/main.cpp which then parses the command line parameters as per normal.

The only issue I can see here is that debug builds are likely to have the DEBUG_WII_GDB symbol set which means that the serial I/O channel used for standard output i.e. the coomand line output is switched to GDB mode for attachment to the GNU Debugger tool.

It is highly unlikely that this is related to memory issues in any way and thus removal of the GUI is not warranted.

I would suggest the best way to proceed would be to download the latest precompiled daily from our buildbot and then:
1. Test that this runs with no parameters, by GUI with normal upload.
2. Test that this runs with a parameter with normal upload... You may need a serial debugging cable attached.

comment:2 Changed 5 years ago by digitall

For reference, the precompiled debug development builds can be found here:

I would also suggest trying this with the v1.5.0 and v1.4.1 Wii release binaries which should accept command line values and will be built without debug enabled so if this is an issue with the GDB mode, they should work.

comment:3 Changed 4 years ago by digitall

As the bug submitter is unresponsive, I am going to change this bug to pending. If no response is received within 14 days, this should be closed.

comment:4 Changed 4 years ago by digitall

Owner: set to dhewg
Resolution: worksforme
Status: newpending

comment:5 Changed 4 years ago by digitall

Have tested by adding section to the application meta.xml when starting the ScummVM application via HBC running off the SD card.

This works as expected i.e. the following switches the GUI to classic mode:


So there is no issue here with arguments being parsed.

I did find that directly running a game i.e. Monkey 1 resulted in an assertion failure in the palette code of the backend, but this is probably not a related issue.

Will attempt to check with Wiiload as well, but this is not a problem with the ScummVM Wii backend code for handling of command line arguments. It is either outdated or an issue / misunderstanding of how to use wiiload with this.

Changed 4 years ago by digitall

Attachment: crash-on-direct-launch.jpg added

comment:6 Changed 4 years ago by digitall

Attaching screen shot of monkey1 command line start crash.

comment:7 Changed 2 years ago by sev-

Resolution: worksforme
Status: pendingnew

comment:8 Changed 3 months ago by csnover

Component: Ports

comment:9 Changed 2 months ago by csnover

Owner: changed from dhewg to csnover
Resolution: invalid
Status: newclosed

Closing per previous comment by digitall.

Note: See TracTickets for help on using tickets.