Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
#109357 - 04/13/17 09:20 AM Gameboy Mappers from CLI  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
Is it possible to specify the mapper to use when running a gameboy rom through command line or do I need to do it through the softlists and add the respective slot feature to the gameboy_cart entry?

#109358 - 04/13/17 09:27 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: May 2004
Posts: 1,387
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member

Joined: May 2004
Posts: 1,387
currently you'd have to add it to the softlist

I do still think these things should be split into named 'templates' (which defines the extra hardware content) and carts that use them tho, so in cases like this you could specify a template name, but right now that isn't possible, and doing it would require some serious thought.

#109360 - 04/13/17 12:46 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2005
Posts: 527
Darkstar Offline
Senior Member
Darkstar  Offline
Senior Member

Joined: Apr 2005
Posts: 527
GERMANY
They could probably also be implemented as sort of "virtual" slot devices. That way you could set them with some command-line magic. However, the softlist would need to implement a way to specify a "default" slot device. Also, I'm not sure if the concept of "virtual" slots would be accepted, since now as far as I know all "slot"-devices are actual physical slots or sockets of some sort.

#109365 - 04/13/17 08:20 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
Thanks, that's what I figured it would certainly be nice if there was support for this in some way through command line.

#109366 - 04/13/17 08:42 PM Re: Gameboy Mappers from CLI [Re: Darkstar]  
Joined: May 2004
Posts: 1,387
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member

Joined: May 2004
Posts: 1,387
Originally Posted by Darkstar
They could probably also be implemented as sort of "virtual" slot devices. That way you could set them with some command-line magic. However, the softlist would need to implement a way to specify a "default" slot device. Also, I'm not sure if the concept of "virtual" slots would be accepted, since now as far as I know all "slot"-devices are actual physical slots or sockets of some sort.


yeah, it would really need to be done properly using a newly designed system rather than hacked in using an existing one.

from a logical / documentation point of view a system of templates defined in the xml and cartridges that use them would actually make sense IMHO as cartridge designs were often reused and right now there is a lot of duplication.

#109367 - 04/13/17 08:46 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Mar 2001
Posts: 15,708
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,708
USA
Don't the .hsi files still exist? Those map loose ROMs to mappers etc.

#109368 - 04/13/17 08:51 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: May 2004
Posts: 1,387
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member

Joined: May 2004
Posts: 1,387
they were based on filehash to assign mapper weren't they? it so that makes them more work to maintain for a homebrew than simply putting a softlist entry and using invalid crc values while you work on it as you'd have actually update the hash every time rather than just ignoring the mismatch.

Last edited by Haze; 04/13/17 08:52 PM.
#109369 - 04/13/17 08:55 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Mar 2001
Posts: 15,708
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,708
USA
Sure, but given that mechanism you could add a -hsi "mapper_69" switch for development. The code could pretend there was a match against the hashfile and use the supplied payload.

#109371 - 04/14/17 10:46 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
Doesn't soflist support names with spaces anymore?

For instance, this works fine under 0.172:
mame64.exe scv "Doraemon (Japan)" -window -hashpath "K:\Emulators\MAME\_Config\hash_custom"

With 0.184 MAME won't start with this error:
Fatal error: Device SCV Cartridge Slot load (scv:Doraemon (Japan):cart) failed: File not found

If I rename "Doraemon (Japan)" to something without spaces it works so it seems support for it got broken somewhere between 172 and 184, only had 172 around to check, but can try testing it with newer releases to find out on which version things got broken exactly.

#109372 - 04/14/17 11:25 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Mar 2001
Posts: 15,708
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,708
USA
We don't need a specific regression version, just open an Issue on GitHub and make sure to tag @npwoods.

#109381 - 04/17/17 05:54 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
Since it seems this restriction is now forced by design and isn't a regression after all which means we will be stuck with jurassic filenames forever if one wants to use softlists, I wonder if there is any way to set the mappers through a lua script instead? Doesn't seem possible, but just wanted to be sure.

#109382 - 04/17/17 11:32 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Mar 2001
Posts: 15,708
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,708
USA
16 characters is actually pretty non-Jurassic. It used to be 8.3 :P

#109383 - 04/17/17 11:52 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
That's a good point, I guess things could even be made worse smile

#109399 - 04/19/17 11:47 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Feb 2004
Posts: 1,826
Vas Crabb Online content
Very Senior Member
Vas Crabb  Online Content
Very Senior Member

Joined: Feb 2004
Posts: 1,826
Sydney, Australia
The set name is supposed to be a unique identifier that's easy to type on any Latin keyboard and won't get mangled by any common shells. If it's made excessively long it becomes a pain to type repeatedly. Anything other than letters and numbers is fair game for shells, e.g. most UNIX shells use parentheses for subshell expression, angle brackets for redirection, backslash for escape, braces for list comprehension, space for argument separator, asterisk/question mark/square brackets for globbing, semicolon for command separator, dollar sign for variable substitution, exclamation mark for history substitution, percent sign for job control and more. Anything other than basic English alphanumeric characters is potentially hard/impossible to type depending on the keyboard layout, e.g. you have to resort to AltGr on a German keyboard to get a lot of punctuation that's easily accessed on a US keyboard. Allowing uppercase would make for a situation where you could get confusingly similar set names and effectively require a case-sensitive filesystem, making life hard for Windows/Mac users. Speaking of which, different filesystems have different rules about allowable filename characters, too. We're already pushing it by allowing underscores - if you plug an ANSI keyboard into a Japanese system, you can't type an underscore because the key isn't present (a JIS keyboard has an extra \_ key between /? and right shift). Relaxing the rules on set names further would cause a lot of trouble. It's not supposed to be the friendly, human-readable name - that's what description/fullname is for.

#109400 - 04/20/17 04:17 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
I understand your point, even though these days almost no one uses command line to launch games anyway, and it's perfectly valid for the official set names for the reasons you refer, but for custom names I don't see why those characters shouldn't be allowed. If you are worried someone could screw up on official set names this could be easily validated with a test case. Punctuation and the likes definitely aren't needed, but at least ASCII support like most other sets do (No-Intro, TOSEC, Redump, etc.) would definitely be very welcome even if not allowed on official set names.
This recent change that went unnoticed for me (don't recall seeing it mentioned anywhere) ended up breaking a lot of my launching scripts for some systems which now won't work on recent MAME versions.

Personally I like to look at my roms and be able to understand what game each file refers to, I dislike the MAME naming schema for being so limiting, but that's a whole different story smile

#109401 - 04/20/17 08:27 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Feb 2004
Posts: 1,826
Vas Crabb Online content
Very Senior Member
Vas Crabb  Online Content
Very Senior Member

Joined: Feb 2004
Posts: 1,826
Sydney, Australia
Originally Posted by ssj
I understand your point, even though these days almost no one uses command line to launch games anyway, and it's perfectly valid for the official set names for the reasons you refer, but for custom names I don't see why those characters shouldn't be allowed.


You're completely ignoring a very important group: MAME developers, who very much do use the command line all the time. Most users launch games from a front-end, which displays the friendly names and doesn't show the set names anyway. And as soon as something is allowed, it will be abused. If there's no validation rule to prevent problematic characters, they will creep in via pull requests or careless developers. As it is we have people committing things that don't validate with the rules there.

Originally Posted by ssj
If you are worried someone could screw up on official set names this could be easily validated with a test case. Punctuation and the likes definitely aren't needed, but at least ASCII support like most other sets do (No-Intro, TOSEC, Redump, etc.) would definitely be very welcome even if not allowed on official set names.


Hang on, you're saying punctuation aren't needed, but the only ASCII characters we disallow are punctuation and control characters. You can't seriously be saying that you want control characters in set names.

#109403 - 04/20/17 09:41 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2005
Posts: 527
Darkstar Offline
Senior Member
Darkstar  Offline
Senior Member

Joined: Apr 2005
Posts: 527
GERMANY
It would probably be possible to have MAME search the description for a match if no perfect match is found in the set name, before it starts fuzzy matching. That way you could launch games by their description as well.

#109404 - 04/20/17 11:19 AM Re: Gameboy Mappers from CLI [Re: Vas Crabb]  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
Originally Posted by Vas Crabb
Hang on, you're saying punctuation aren't needed, but the only ASCII characters we disallow are punctuation and control characters. You can't seriously be saying that you want control characters in set names.

The space character isn't allowed which is my main issue here, also not sure if parenthesis are allowed or not ended up not testing it with parenthesis and without spaces when I realized this wasn't a regression after all.

Darkstar's idea could work too.

#109405 - 04/20/17 11:32 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Feb 2004
Posts: 1,826
Vas Crabb Online content
Very Senior Member
Vas Crabb  Online Content
Very Senior Member

Joined: Feb 2004
Posts: 1,826
Sydney, Australia
Spaces are punctuation, used in some languages to punctuate words. Other languages like Chinese and Japanese don't use spaces the same way, and historically Latin and Greek didn't punctuate words with spaces either. Parentheses are punctuation, too.

#109406 - 04/20/17 11:42 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Apr 2012
Posts: 306
ssj Offline
Senior Member
ssj  Offline
Senior Member

Joined: Apr 2012
Posts: 306
I meant characters with accents not punctuation sorry, sometimes not being a native English speaker causes these messups.

Wouldn't Darkstar's idea be a good solution for this though? Not seeing any drawback on it at first glance.

#109407 - 04/20/17 11:49 AM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Feb 2004
Posts: 1,826
Vas Crabb Online content
Very Senior Member
Vas Crabb  Online Content
Very Senior Member

Joined: Feb 2004
Posts: 1,826
Sydney, Australia
Originally Posted by ssj
Wouldn't Darkstar's idea be a good solution for this though? Not seeing any drawback on it at first glance.


It's probably achievable, but it's additional effort and would increase startup time a bit. You can make a feature request for it on github, but I don't know if/when anyone would pick it up.

#109408 - 04/20/17 02:21 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: Mar 2001
Posts: 15,708
R. Belmont Online content
R. Belmont  Online Content

Very Senior Member

Joined: Mar 2001
Posts: 15,708
USA
It's only adding to startup time in the case where it's being used, though (which implies that without it MAME would simply be exiting). I think that's reasonable.

#109409 - 04/20/17 02:24 PM Re: Gameboy Mappers from CLI [Re: ssj]  
Joined: May 2004
Posts: 1,387
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member

Joined: May 2004
Posts: 1,387
the current fuzzy matching can be a bit rubbish, even in the internal UI..

Page 1 of 3 1 2 3

Who's Online Now
3 registered members (Duke, shattered, Tauwasser), 19 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,411
Posts108,925
Members4,757
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.036s Queries: 14 (0.009s) Memory: 5.1436 MB (Peak: 5.4307 MB) Zlib enabled. Server Time: 2017-09-24 14:07:09 UTC