Home Page

Cart not loading from Software list

Posted By: gordonfish

Cart not loading from Software list - 02/16/17 12:38 AM

I've been checking out QME2 as an alternative to MAMEUI for launching both arcade and console games.

So far I have the complete ColecoVision rom set and when trying to launch (either Play or Play embedded) a cart game, like Pitfall! or Qbert or Donkey Kong, etc, it launches the MAME but without the cart, so it just boots the CV bios, saying "TURN GAME OFF BEFORE INSERTING CARTRIDGE"... same as if one gets a real CV console when turned on without a game inserted.

Both ColecoVision (NTSC) in the Machine list and everything in the Software list show as green.

When using analyze ROM on "ColecoVision (NTSC)" in the Machine List, it shows File status good (in green) and likewise for Analyze -> Current software list (all say File status good.) So that and my paths (rom, hash, etc) all seems to be in order.

In the "Front end log" box I see it launching as:
Code:
starting emulator #0, command = C:\emu\MAME\mame.exe -hashpath "C:\emu\MAME\hash" -rompath "C:\emu\MAME\roms\coleco" -output console coleco

Notice how it doesn't include the cart. What could be causing this, or what might I be missing? As I understand it I should be able to just select a game from the Software list and play it, but that isn't happening.
Posted By: B2K24

Re: Cart not loading from Software list - 02/16/17 04:28 AM

I can also reproduce this behavior on Windows 10 Pro X64

Basically what's happening is; QMC2 isn't sending the setname of what's in the softlist to MAME when using Coleco.

Notice how it stops at -output console coleco

If you try the same with nes or a different machine, you get a different result.

Code:
-output console nes -cart nes:aliensyn:cart
Posted By: gordonfish

Re: Cart not loading from Software list - 02/16/17 06:40 AM

Thanks. Is there any way to correct this?
Posted By: qmc2

Re: Cart not loading from Software list - 02/16/17 07:08 AM

It's probably a bug, I have to check... at least I can repro this here on Linux as well.
Posted By: qmc2

Re: Cart not loading from Software list - 02/16/17 08:11 AM

It took me a while to find the reason for this behavior... it's caused by coleco's -lx output which doesn't seem to be fully correct IMHO.

QMC2 needs to know the interface of a device and looks that up from the XML data. When I compare coleco with any other machine I see a colon (:) in front of the interface name:

Code:
rene@marvin:~/src/mame-git> ./mame64 coleco -lx | grep "<device type="
                <device type="cartridge" tag="cartslot" interface=":coleco_cart">

rene@marvin:~/src/mame-git> ./mame64 a2600 -lx | grep "<device type="
                <device type="cartridge" tag="cartslot" mandatory="1" interface="a2600_cart">
                <device type="cassette" tag=":cassette" interface="a2600_cass">

However, in the coleco software-list the colon is omitted, so QMC2 can't find a match (and sees no "mount device" because of it):

Code:
rene@marvin:~/src/mame-git> ./mame64 -listsoftware coleco | grep "<part name=" | uniq
                        <part name="cart" interface="coleco_cart">

I don't know if that's a bug in MAME or if it "works as designed". If the latter is true, I would need to ignore the colon as a simple workaround. But as it seems to be the only driver that's doing this I suppose it's not QMC2's fault.

I really need feedback about this from some MAME-dev, please!
Posted By: qmc2

Re: Cart not loading from Software list - 02/16/17 09:55 AM

The workaround is now in SVN, but I still need clarification if it's a MAME bug or not (I'm convinced it is because coleco is the only system - see below - where this is different). Also, other front-ends may suffer from this as well.

Code:
rene@marvin:~/src/mame-git> sqlite3 ~/.qmc2/mame-xml-cache.db "select xml from mame_xml_cache" | grep -Po "interface=\"\:.*\""
interface=":coleco_cart"
interface=":coleco_cart"
interface=":coleco_cart"
interface=":coleco_cart"
interface=":coleco_cart"
interface=":coleco_cart"
interface=":coleco_cart"

EDIT: I filed an MT bug.
Posted By: B2K24

Re: Cart not loading from Software list - 02/16/17 03:24 PM

@gordfish, A possible workaround for you is; once you're at the Turn Game Off screen simply press TAB/File Manager press enter on Cartridge (cart) then [software list] pick a game for which you have files for and then it will load.
Posted By: R. Belmont

Re: Cart not loading from Software list - 02/16/17 03:37 PM

My feeling is that that's a bug, but we really need eta to rule and I don't know if he's around.

ETA: if you remove the : and recompile MAME, does the Coleco still work?
Posted By: qmc2

Re: Cart not loading from Software list - 02/16/17 03:48 PM

Originally Posted By R. Belmont
if you remove the : and recompile MAME, does the Coleco still work?

Yes, it looks good in this case (although I don't have the software to test):

Code:
16:45:59.702: starting emulator #0, command = /home/rene/src/mame-git/mame64 -noreadconfig -verbose [...] -output console colecop -cart coleco:alcazar
16:45:59.744: emulator #0 started, PID = 21927, running emulators = 1
16:46:00.797: emulator #0 finished, exit code = 2 (missing files), exit status = normal, remaining emulators = 0

"Missing files" is what I expect in my case.

EDIT: The corresponding emulator output looks good as well:

Code:
...
16:46:00.596: stderr[#0]: alcazar.1 NOT FOUND (tried in colecop coleco coleco/alcazar alcazar)
16:46:00.596: stderr[#0]: alcazar.2 NOT FOUND (tried in colecop coleco coleco/alcazar alcazar)
16:46:00.596: stderr[#0]: alcazar.3 NOT FOUND (tried in colecop coleco coleco/alcazar alcazar)
16:46:00.596: stderr[#0]: alcazar.4 NOT FOUND (tried in colecop coleco coleco/alcazar alcazar)
16:46:00.596: stderr[#0]: Fatal error: Required files are missing, the machine cannot be run.
Posted By: qmc2

Re: Cart not loading from Software list - 02/16/17 04:00 PM

It does also work w/o my workaround from above then, but someone with software for ColecoVision should double-check.
Posted By: gordonfish

Re: Cart not loading from Software list - 02/16/17 05:25 PM

@qmc2 Thanks. It launches the game from the software list after removing the colon in ~/.qmc2/mame-xml-cache.db in the coleco (and did it for colecop too) row.

I haven't had much time to look but it appears that the issue is rooted here, src/devices/bus/coleco/exp.h:90:
Code:
	virtual const char *image_interface() const override { return ":coleco_cart"; }


Comparing it similarly like you did to src/devices/bus/nes/nes_slot.h:364:
Code:
	virtual const char *image_interface() const override { return "nes_cart"; }
Posted By: qmc2

Re: Cart not loading from Software list - 02/16/17 05:32 PM

Yeah, when you remove the colon from the first one in src/devices/bus/coleco/exp.h:90 it works cleanly w/o having to edit the DB smile. But then you should start QMC2 with -cc to reread the data.
Posted By: qmc2

Re: Cart not loading from Software list - 02/17/17 09:22 AM

Originally Posted By R. Belmont
..., but we really need eta to rule and I don't know if he's around.

Right. Where's etabeta78? I haven't "seen" him lately. And according to "git log" his last commit is from July 2016. That's odd.
Posted By: Vas Crabb

Re: Cart not loading from Software list - 02/17/17 11:28 AM

He's been around on the list, just busy.
Posted By: qmc2

Re: Cart not loading from Software list - 02/17/17 11:54 AM

Ah, OK. Thanks!
Posted By: gordonfish

Re: Cart not loading from Software list - 02/22/17 06:10 PM

Thanks for all the information. That colon was easy enough to edit with a hex editor (essentially moving the string over by one char and making the former end of the string a \0.)

I have also made a pull request about this but thus far it has not been accepted yet (and their auto checking routine seems to be doing something strange as it said it "failed all checks" even though all I changed was removing the colon from a string.)

I'll also look into recompiling mame too once I get around to setting up the build environment for that.
Posted By: Tafoid

Re: Cart not loading from Software list - 02/22/17 06:28 PM

The "autochecking" was due to a unfixed failed state from previous commit and was not related directly to your changes.

We just had a MAME release and most of our collective efforts were being made to make sure it went out without any additional issues and compiled on all available platforms. I'm sure someone will get a chance soon enough to try the pull request and deem it safe to all related drivers as well such as ADAM (which also uses coleco_cart) and does not fail any validations.
Posted By: qmc2

Re: Cart not loading from Software list - 02/22/17 06:29 PM

Also, QMC2 0.183 - which will be released soon - supports both ways. The workaround for this issue that I talked about earlier works fine.
Posted By: qmc2

Re: Cart not loading from Software list - 02/28/17 10:20 AM

This has been fixed in "MAME git" recently. I've removed the workaround from QMC2 (SVN).
© 2019 Forums