Command line MAME

fabianscorpio

New member
I'm using the command line version of MAME, so that I can use it with
MAMEWah. Anyway, I can't seem to find where to add scanlines. I tried looking at the mame.ini file in my MAME folder, but the changes I made don't seem to do anything. I tried adding -effectscan50 to my mame.ini inside my MAMEwah config/mame folder, but that didn't seem to do anything either, accept not run the game.

If anyone can point me to a reference guide to command line options, or what the mame.ini means, it would be helpful. Thanks.
 

FatTrucker

Abusus non tollit usum
You need to download the effects filters from here. Extract them in your mame/artwork folder.

Now open your mame.ini and in the Windows Video Options section where it says 'Effect' type the name of the effect you want enabled. e.g.

# WINDOWS VIDEO OPTIONS
#
video d3d
numscreens 1
window 0
maximize 1
keepaspect 1
prescale 1
effect scanlines
waitvsync 0
syncrefresh 0

Save the ini and away you go.
 
Last edited:

fabianscorpio

New member
I'm almost certain that I did all that already. I'll double check again following your directions. Are there any other places I may have a video option set incorrectly? Should I have artwork set to 1 or will it interfere with the scanlines? Do I need to use -effect scanlines in my command line? So many questions... lol

Here is my ini for command line mame...

### MAME.ini ###

### Frontend Related ###
clones 1

### Windows path and directory options ###
rompath roms
samplepath samples
# inipath <NULL> (not set)
cfg_directory cfg
nvram_directory nvram
memcard_directory memcard
input_directory inp
hiscore_directory hi
state_directory sta
artwork_directory artwork
snapshot_directory snap
diff_directory diff
ctrlr_directory ctrlr
cheat_file cheat.dat
history_file history.dat
mameinfo_file mameinfo.dat

### Windows video options ###
autoframeskip 1
frameskip 0
waitvsync 1
triplebuffer 1
window 0
ddraw 1
direct3d 1
hwstretch 1
# screen <NULL> (not set)
cleanstretch auto
resolution auto
refresh 1
scanlines 1
switchres 1
switchbpp 1
maximize 1
keepaspect 1
matchrefresh 1
syncrefresh 1
throttle 1
full_screen_brightness 0.000000
frames_to_run 0
effect scanlines
screen_aspect 4:3

### Windows Direct3D 2D video options ###
zoom 2
d3dtexmanage 1
d3dfilter 1
d3dfeedback 0
d3dscan 100
d3deffectrotate 1
d3dprescale auto
d3deffect none
# d3dcustom <NULL> (not set)
# d3dexpert <NULL> (not set)

### Windows misc options ###
sleep 0
rdtsc 0
high_priority 0

### Windows sound options ###
audio_latency 1
# wavwrite <NULL> (not set)

### Input device options ###
mouse 0
joystick 0
lightgun 0
dual_lightgun 0
offscreen_reload 0
steadykey 0
keyboard_leds 1
led_mode ps/2
a2d_deadzone 0.300000
# ctrlr <NULL> (not set)
paddle_device keyboard
adstick_device keyboard
pedal_device keyboard
dial_device keyboard
trackball_device keyboard
lightgun_device keyboard
digital none

### Mame CORE video options ###
norotate 0
ror 0
rol 0
autoror 0
autorol 0
flipx 0
flipy 0
debug_resolution auto
gamma 1.000000
brightness 1.000000
pause_brightness 0.650000

### Mame CORE vector game options ###
antialias 1
translucency 1
beam 1.000000
flicker 0.000000
intensity 1.500000

### Mame CORE sound options ###
samplerate 48000
samples 1
resamplefilter 1
sound 1
volume 0

### Mame CORE misc options ###
artwork 0
use_backdrops 1
use_overlays 1
use_bezels 1
artwork_crop 1
artwork_resolution 1
cheat 0
debug 0
# playback <NULL> (not set)
# record <NULL> (not set)
log 0
maxlogsize 10000
oslog 0
skip_disclaimer 1
skip_gameinfo 1
skip_validitychecks 0
crconly 0
bios default
# state <NULL> (not set)

### Configuration options ###
readconfig 1
verbose 0

---Here is my mamewah\config\mame.ini

### mame.ini (mamewah v1.62) ###

emulator_title Arcade

### List Generation Settings ###
rom_path C:\MAME\roms
rom_extension zip
dat_file
nms_file
catver_ini_file
list_generation_method rom_folder_vs_listxml

### Execution Settings ###
pre_emulator_app_commandlines
emulator_commandline C:\MAME\mame.exe [name]{nodosbox}{nosafelaunch}
post_emulator_app_commandlines
general_app_commandlines

### Artwork Settings ###
artwork_image_paths C:\MAME\snap;C:\MAME\artwork
movie_preview_path [emuexepath]\previews
movie_artwork_no 1
enable_fuzzy_search 0
history_dat_file
history_dat_artwork_no 2

### Screen-Saver Settings ###
enable_music_in_screensaver 1
select_random_game 0
saver_type gamelist_slideshow
movie_path
movie_fullscreen 1
quit_delay 0
saver_commandline

### Additional Settings ###
music_path
lcd_display_file_path
description_display [description]{scroll}

### Settings used by MAMEWAH ###
current_list 0


Perhaps you can see something missing, or clashing.

Thanks.
 
Last edited:

FatTrucker

Abusus non tollit usum
The mamewah ini doesn't factor into it at all.

Just put the name of the screen filter you want to use next to the Effect setting in your mame.ini

There are loads of different monitor effects available at the link I gave you and you modify the Effects entry to match the name of whichever one you want to activate.
 

fabianscorpio

New member
ok...I have some PNG files of scanlines in my artwork folder. I changed the 'none' next to effects like so....

effects rgb3_kb.png

that didn't work, so I tried...

effects rgb3_kb

and that didn't work. I guess I am totally missing something here.
 

fabianscorpio

New member
mame092b.zip is the zip file. Yeah, it's an older version because I wasn't sure if I'd have issues with the roms I have for MAME32 v92 GUI version. I've only ever used the GUI MAME and it was only recently that I decided to 'beef up' the cabinet and use MAMEWAH so it looked good. So, I was forced to use command line mame for mamewah. I chose to use an older version thinking that the 92 version of command line mame would have no trouble running the roms I already had for MAME32v92. Was I wrong to think this? What version of MAME should I be using, and will my roms work? The roms are about 4 years old...well...they were downloaded 4 years ago.

Thanks again for your time, and your advice.
 

FatTrucker

Abusus non tollit usum
That would explain why the screen filters aren't working. The system changed from Mame0.106 when they did the big video system rewrite, and the new ones aren't compatible with the old versions. :oops:

You're quite correct that Mame32v0.92 will use the same romset as mame0.92, however this version of mame is massively outdated now. If your PC hardware can cope with newer versions it really is worth the effort to update your romset and use a newer version of mame.

If you're going to continue with mame0.92 then to enable scanlines then disble hwstretch and enable scanlines in the mame.ini:

### Windows video options ###
autoframeskip 1
frameskip 0
waitvsync 0
triplebuffer 0
window 0
ddraw 1
direct3d 0
hwstretch 0
# screen <NULL> (not set)
cleanstretch auto
resolution auto
refresh 0
scanlines 1
switchres 1
switchbpp 1
maximize 1
keepaspect 1
matchrefresh 0
syncrefresh 0
throttle 1
full_screen_brightness 0.000000
frames_to_run 0
effect none

Hope that helps.

Note: You can also apply the following to the 'effects' setting at the bottom for different results.

none - no effect (this is the default)
sharp - no effect, but gives a sharper image
scan25 - 25% scanlines
scan50 - 50% scanlines
scan75 - 75% scanlines
scan75v - 75% scanlines (vertical)
rgb3 - a certain "monitor mask"
rgb4 - another one
rgb4v - another one (vertical)
rgb6 - another one
rgb16 - another one
rgbtiny - another one. Choose the one you like best.

These are all built into old mame and don't require any additional files in the artwork folder.
 
Last edited:

fabianscorpio

New member
That didn't seem to work either. Perhaps d3d needs to be set to 0 also, mine is 1. I'll try it.

Also, yeah, my system can handle it, but it took me weeks to DL the set I have now. I'd hate to have to DL another....

:(

Which one of these underlined files do I want so I can run the most current mame release with MAMEWAH?

mame0125b.exe 6653 KB Download MAME 0.125 Windows command-line binaries.
mame0125b_i686.exe 6834 KB Download MAME 0.125 Windows command-line binaries (I686 optimized).
mame0125b_64bit.exe 7295 KB Download MAME 0.125 64-bit Windows command-line binaries.
mame0125b_debug.exe 6903 KB Download MAME 0.125 Windows command-line binaries with debugger.
 
Last edited:

FatTrucker

Abusus non tollit usum
The first or second one's will both be ok.

You really want to keep D3D turned on. Ddraw is only really necessary if you're running custom resolutions with a real arcade monitor and you will take a significant performance hit by using Ddraw instead of D3D.
 
Last edited:

Zach

New member
Just wondering.. what does MAMEWAH do to "beefy" up the look, that the standard Win32 MAME w/GUI can't? it supports cabinet art, flyers, screenshots of games on the selection menu, etc..

Or is MAMEWAH simply way more customizable from the GUI perspective so you can make it look like anything, even on standard display screens (like the game select list), etc ?

Also I found a Wiki on it for you, has links to setup guide, etc..

http://wiki.arcadecontrols.com/wiki/Mamewah
 
Last edited:

FatTrucker

Abusus non tollit usum
Mamewah does nothing in terms of the actual emulator, its simply a commandline launcher and doesn't provide any additional functions or enhancements to whichever emulator its launching.
It does however make browsing your game lists more attractive and user friendly (once you've set it up) but its basically just an alternative to Mame32 or any other emulator GUI.
In terms of extra functions, it supports things like CPViewer, AVI screenshots (as opposed to normal static ones), music, custom sounds, startup and sutdown movies....all sorts. And of course you can make the skin look like anything you want.
 
Last edited:

fabianscorpio

New member
Zach, MAMEWAH allows the user to select from other emmulators, such as sega genesis or super nintendo, instead of having to shut down one emmulator manually, and restarting another. It has a great GUI program that allows you to customize the backdrop image and place the list where you what it to appear on the screen.

http://wiki.arcadecontrols.com/wiki/Mamewah

there is a link.
 

Zach

New member
I just found this through google

http://forum.arcadecontrols.com/index.php/topic,33163.0.html

It is an MAMEWAH config utility that gives you a GUI interface to help setup your settings. I didn't read the whole thread, but it looked like it was a little buggy, but some were responded to as fixed in new version releases, so its probably a pretty stable program worth trying out.

I would say make a new directory and unzip fresh MAMEWAH files into it, to see if that helps any.. Sometimes starting from scratch with your config files can fix a lot of things that have gone wrong from earlier troubleshooting attempts.

Also worth nothing, I did some more googling and found a statement suggesting you can still pass command-line arguments to MAMEUI (the GUI version of mame).. So you could potentially download MAMEUI instead, run it and setup your config for your scanlines and other graphic options, and then simply tell your MAMEWAH config to use the MAMEUI executable, with the ONLY command line tag being the path to and name of the ROM you want to play.. I haven't tested this yet but plan to some time in the future.

This would likely solve a lot of your issues. I don't see why it wouldn't work, seeing as MAMEWAH can also load Kega Fusion, and ZSNES, among other GUI based emulators
 
Last edited:

fabianscorpio

New member
I got the scanlines to work. I was scrolling through some games and noticed that one game I played had scanlines. So, I went in to the mame.ini and changed scan50 to rgb3, and sure enough, I was able to see a definite change. I was happy. However, it seems that the game that I was trying to get the scanlines in, Time Pilot 84, does not support it in command line mame, or something else is preventing the scanlines from showing up. This is why I thought the scanlines were not working. The funny thing is, when I play Time Pilot 84 through MAME32, the scanlines are there. So, it cannot be that the game does not support it. Something else must be preventing the scanlines from showing up. I looked at the cfg file for tp84 and I don't see any options as far as video. It's all controller related.

Note that I am still using the old mame92.

I just looked again and I found the tp84.ini file in the ini folder. I changed d3d from 1 to 0 and the scanlines are now there. Cool. One thing I noticed though...the picture seems 'crunched' and not as stretched to fit the screen properly. One problem solved, another pops up...lol

Come to think of it, MAME command line doesn't even have an ini folder. I actually copied it from the MAME32 version thinking it may do something, but never seemed to. It's really weird that the ini actually DID do something when I changed the d3d variable. Strange huh?
 
Last edited:

fabianscorpio

New member
Well, I kept a log of what I've been doing...

mame.ini file was changed...

1. - hwstretch was set to 1 after I noticed some of the games were being 'smushed' because of the scanline effect being applied. The screen needed to be stretched. Scanline effect needs to be adjusted because now the scanlines are stretched too. Toying around with settings seems to be the only solution.

2. - When I changed ddraw to 0 and d3d back to 1, the screen (time pilot) was stretched 'W I D E', but displayed in the correct orientation. The speed of the game was also increased.

3. - I noticed that some variable could be set inside the games ini file in the ini folder. This folder shouldn't be here but I noticed they seem to over ride the default mame.ini settings. This could be useful. I'm using the MAME32.ini as a reference guide to commands but this is just a guess if it can be accurately used as such. So far it seems to work.

4. - MsPacMan seems to run fine as long as scan25,scan50,scan75 are used. If I try to use any 'rgb' constant, the rgb 'overlay' is not displayed at all.
-hwstretch, 1 or 0,does not effect this display problem.
-FIXED! I used the command 'effect scan75' inside the mspacman.ini file and it worked! SWEET!

NOTE: According to the windows.txt file found in the docs folder, MAME checks the 'GAMENAME.INI' file. So this tells me that MAME does indeed check an ini file. So I guess an ini file would need to be setup for each game!!! CHRIST!

I noticed that my mame.ini file did not even have an ini path specified.
The line read...

# inipath <NULL> (not set)

But yet it still defaulted to look for a folder named 'ini' and do a file search. Strange that it was not setup for an ini search.


...Now I guess I have to fiddle around with separate ini files and the options to really see what I can 'tweak' for each game.

This stuff I 'discovered' may have been common knowledge, but it just proved that more documentation needs to be available, or at least more 'clear' for the novice emu user. It would have been nice to know I could create an ini folder, and create ini's for each game when the defaults don't work out so well for games such as Ms Pac Man.

Thanks, FatTrucker, for the help. Any thoughts on this stuff?
 
Last edited:

FatTrucker

Abusus non tollit usum
Just about all the mame functionality is documented in the windows.txt file. Of course the documentation you're using is obsolete because you're running a 4 or 5 year old version of mame.

You can set any global changes in the mame.ini but if there are game specific settings that need to be used then thats what the .ini folder is for - this is mainly used by people running on arcade hardware who need custom resolutions for all their games.

Hwstretch is recommended to be set to off with scanline effects because as you found it stretches the image and makes it look weird. Using the keep aspect setting is good as it will display games in their correct orientation without making them look squashed/stretched.

These are all problems largely absent in new versions of mame using the new video and artwork system. Due to lack of ongoing support for theold system I would still recommend taking the time to upgrade your roms and artwork to the new version of mame (lots more games working properly, Hi Res artwork, better screen filters, better sound - the list goes on and on).

Its probably worth noting that Mame has probably the most comprehensive, detailed and complete help file of just about any emulator. It does however require a degree of trial and error from the end user to find out what settings you prefer and are most comfortable with.
 
Last edited:

fabianscorpio

New member
Yeah, I'll probably get things exactly how I want them, and then decide to 'check out' the new version. This of course will lead to more work...

lol

Thanks for the help, and advice.
 

fabianscorpio

New member
I'm using MAMEui. lol I like it already and the roms I've tried all work. I just wanted to know what effect you use that you think gives the best 'arcade look'. I like the one MAME32 uses. I'm asking so I don't have to try them all. lol
 
Top