Video lag? Switch to cabMAME!

Jassin000

Frenzy Football Player
Joined
Dec 9, 2011
Posts
985
I understand this isn't a MAME forum, however its somewhat hard to find information about using original arcade monitors in emulation. I felt the need to share my most recent findings...

Over the weekend I was doing some video testing with my monitor (a 2930 manual tri-sync Nanao). I've always been annoyed by the slight tearing effect, caused in emulation when changing the internal timing to match the video output of modern PCs. This is most noticeable on games with quick screen flashes, a great example being the opening sequence to Capcom's Darkstalkers. Tripplebuffering can only remove so much, I had just resigned myself to this being as good as it gets without original boards.

I came upon a build that was said to smooth over some of this video lag called cabMAME. After much ini configuration I believe I have achieved near perfection! The two options exclusive to this version making the biggest differences...

SoundSync
Redraw

I can post my full "mame.ini" file if people are interested in seeing it. I've been trying to get video of the tearing effect pre-switch, but it seems to be happing so quickly my cellphone can not capture it. If you've struggled with any video lag using MAME I highly recommend you take cabMAME for a test drive. I don't believe this will help LCD users, as panel refresh/timing is another issue causing video lag that software just can not fix.
 

codecrank

Whip's Subordinate
10 Year Member
Joined
May 2, 2011
Posts
1,751
Interesting. I grew tired of mame because I always experience either tearing or frame skipping/stuttering no mater what I did. I like the scrolling to be perfect. I'd like to give it another shot though, please post your config. I normally have everything set to scale to 640x480 ( same monitor as you )
 

Adderall

Leona's Therapist
Joined
Jan 16, 2008
Posts
1,954
I'd love to see your mame.ini file as well as your computer specs.
 

Jassin000

Frenzy Football Player
Joined
Dec 9, 2011
Posts
985
mame.ini start:

#
# CORE CONFIGURATION OPTIONS
#
readconfig 1
writeconfig 0

#
# CORE SEARCH PATH OPTIONS
#
rompath roms
hashpath hash
samplepath samples
artpath artwork
ctrlrpath ctrlr
inipath .;ini
fontpath .
cheatpath cheat
crosshairpath crosshair

#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory cfg
nvram_directory nvram
memcard_directory memcard
input_directory inp
state_directory sta
snapshot_directory snap
diff_directory diff
comment_directory comments

#
# CORE OUTPUT DIRECTORY OPTIONS
#
hiscore_directory hi

#
# CORE STATE/PLAYBACK OPTIONS
#
state
autosave 0
playback
record
mngwrite
aviwrite
wavwrite
snapname %g/%i
snapsize auto
snapview internal
burnin 0

#
# CORE PERFORMANCE OPTIONS
#
autoframeskip 0
frameskip 0
seconds_to_run 0
throttle 1
sleep 1
speed 1.0
refreshspeed 0

#
# CORE ROTATION OPTIONS
#
rotate 1
ror 0
rol 0
autoror 0
autorol 0
flipx 0
flipy 0

#
# CORE ARTWORK OPTIONS
#
artwork_crop 1
use_backdrops 0
use_overlays 1
use_bezels 0
use_cpanels 0
use_marquees 0

#
# CORE SCREEN OPTIONS
#
brightness 1.0
contrast 1.0
gamma 1.0
pause_brightness 0.65
effect none
cleanstretch 0
changeres 0
redraw auto

#
# CORE VECTOR OPTIONS
#
antialias 1
beam 1.0
flicker 0

#
# CORE SOUND OPTIONS
#
sound 1
samplerate 48000
samples 1
volume 0
soundsync 1

#
# CORE INPUT OPTIONS
#
coin_lockout 1
ctrlr
mouse 0
joystick 1
lightgun 0
multikeyboard 0
multimouse 0
steadykey 0
offscreen_reload 0
joystick_map auto
joystick_deadzone 0.1
joystick_saturation 0.95
natural 0
joystick_contradictory 0
coin_impulse 0
directinput 0

#
# CORE INPUT AUTOMATIC ENABLE OPTIONS
#
paddle_device keyboard
adstick_device keyboard
pedal_device keyboard
dial_device keyboard
trackball_device keyboard
lightgun_device keyboard
positional_device keyboard
mouse_device mouse

#
# CORE DEBUGGING OPTIONS
#
log 0
verbose 0
update_in_pause 0
debug 0
debugscript
debug_internal 0

#
# CORE MISC OPTIONS
#
bios
cheat 0
skip_gameinfo 1
uifont default
ramsize
confirm_quit 0

#
# CORE MKChamp OPTIONS
#
disable_hiscore_patch 0
disable_nagscreen_patch 0
disable_loading_patch 0

#
# WINDOWS DEBUGGING OPTIONS
#
oslog 0
watchdog 0
debugger_font "Lucida Console"
debugger_font_size 9

#
# WINDOWS PERFORMANCE OPTIONS
#
priority 0
multithreading 1
numprocessors auto
profile 0
bench 0

#
# WINDOWS VIDEO OPTIONS
#
video d3d
numscreens 1
window 0
maximize 1
keepaspect 1
prescale 3
waitvsync 0
syncrefresh 0
menu 0

#
# DIRECTDRAW-SPECIFIC OPTIONS
#
hwstretch 1

#
# DIRECT3D-SPECIFIC OPTIONS
#
d3dversion 9
filter 1

#
# DIRECT3D POST-PROCESSING OPTIONS
#
hlsl_enable 0
hlslpath hlsl
hlsl_ini_read 0
hlsl_ini_write 0
hlslini %g
hlsl_prescale_x 0
hlsl_prescale_y 0
hlsl_preset -1
hlsl_write
hlsl_snap_width 2048
hlsl_snap_height 1536
shadow_mask_alpha 0.0
shadow_mask_texture aperture.png
shadow_mask_x_count 320
shadow_mask_y_count 240
shadow_mask_usize 0.09375
shadow_mask_vsize 0.109375
curvature 0.0
pincushion 0.0
scanline_alpha 0.0
scanline_size 1.0
scanline_height 0.7
scanline_bright_scale 1.0
scanline_bright_offset 0.0
scanline_jitter 0.0
defocus 0.0,0.0
converge_x 0.0,0.0,0.0
converge_y 0.0,0.0,0.0
radial_converge_x 0.0,0.0,0.0
radial_converge_y 0.0,0.0,0.0
red_ratio 1.0,0.0,0.0
grn_ratio 0.0,1.0,0.0
blu_ratio 0.0,0.0,1.0
saturation 1.0
offset 0.0,0.0,0.0
scale 1.0,1.0,1.0
power 1.0,1.0,1.0
floor 0.0,0.0,0.0
phosphor_life 0.0,0.0,0.0
yiq_enable 0
yiq_cc 3.59754545
yiq_a 0.5
yiq_b 0.5
yiq_o 0.0
yiq_p 1.0
yiq_n 1.0
yiq_y 6.0
yiq_i 1.2
yiq_q 0.6
yiq_scan_time 52.6
yiq_phase_count 2

#
# PER-WINDOW VIDEO OPTIONS
#
screen \\.\DISPLAY2
aspect 4:3
resolution 640x480@60
view standard
screen0 auto
aspect0 auto
resolution0 auto
view0 auto
screen1 auto
aspect1 auto
resolution1 auto
view1 auto
screen2 auto
aspect2 auto
resolution2 auto
view2 auto
screen3 auto
aspect3 auto
resolution3 auto
view3 auto

#
# FULL SCREEN OPTIONS
#
triplebuffer 1
switchres 0
full_screen_brightness 1.0
full_screen_contrast 1.0
full_screen_gamma 1.0

#
# WINDOWS SOUND OPTIONS
#
audio_latency 2

#
# INPUT DEVICE OPTIONS
#
hide_cursor 1
dual_lightgun 0

mame.ini end:

My PC is a Intel i7 920 (LGA 1366), 12GB 1333mhz DDR3 tri-channel, EVGA 560ti 1.2GB, WD Black 2TB. You will notice above I am using Direct3D and not DirectDraw. While I have found the pixel scale to be more accurate under DD I don't believe the timing correction works unless you use D3D. cabMAME supports cleanstretch which is flawless integer scaling providing perfect pixel representation. Sadly at lower resolutions (like 640x480) you end up with a postage stamp sized screen, I do believe for people using 1080p LCDs this would be better then floating point scaling however.
 

imjasonh

New Challenger
Joined
Aug 6, 2011
Posts
67
How different is this from groovymame?

groovymame with windows xp 64bit and calamity's hacked driver will get you near perfect emulation with scanlines and ZERO tearing. my blast city cabinet (Nanao 2930) use windows xp because windows 7 cannot handle interlaced resolutions that well. i haven't tried cabmame and was also wondering if it is better than groovymame.
 
Last edited:

Jassin000

Frenzy Football Player
Joined
Dec 9, 2011
Posts
985
I have never used groovymame, I read its good for the very things mentioned by imjasonh (scanlines video modes etc). I can be rather snobbish, so I've gotta say anything that requires me to run WinXP isn't getting loaded on my PC EVER! Also, I have no need for my PC to provide scanlines or a soft15k solution, I use a uVC which handles all that for me (IMO the way it should be). Everything is output at 640x480@60, then converted by the uVC to 320x240@15khz and fed to my monitor via JAMMA fingerboard (again IMO the way it should be). I should also mention that above in my mame.ini settings you'll notice I'm stating my screen is "screen \\.\DISPLAY2" this is because my PC only sees the Blast as a 2nd monitor (see image below).

IMG_20120511_121859.png
 

imjasonh

New Challenger
Joined
Aug 6, 2011
Posts
67
I have never used groovymame, I read its good for the very things mentioned by imjasonh (scanlines video modes etc). I can be rather snobbish, so I've gotta say anything that requires me to run WinXP isn't getting loaded on my PC EVER! Also, I have no need for my PC to provide scanlines or a soft15k solution, I use a uVC which handles all that for me (IMO the way it should be). Everything is output at 640x480@60, then converted by the uVC to 320x240@15khz and fed to my monitor via JAMMA fingerboard (again IMO the way it should be). I should also mention that above in my mame.ini settings you'll notice I'm stating my screen is "screen \\.\DISPLAY2" this is because my PC only sees the Blast as a 2nd monitor (see image below).

IMG_20120511_121859.png

You are using your pc as media pc also? I can definitely agree that windows xp wouldn't be where your best interests would lie. But as a standalone MAME machine, xp pro 64bit with calamity's drivers and groovymame can't be beat! :)
 

leonk

Marked Wolf
Joined
Feb 24, 2011
Posts
211
I have 2 setups inside my New Astro City, switchable by a mechanical switch .. Naomi 2 running through a UVC, and GroovyMAME running through ATI video card and JPAC, all feeding an MS9-29A.

As nice as the UVC is (and it cost me almost 200$ to get from Europe!) it can't be compared to GroovyMAME/Soft15 for MAME games. With GroovyMAME/Soft15, you run your games at the true resolution they were meant to be played (except on a much bigger screen - which actually allows you to notice the resolution differences even more so). The UVC scales everything to a fixed 240p resolution.

For example, when playing NBA JAM vs Ghost n Goblins vs Metal Slug 1. With UVC, it all looks the same (240p). With GroovyMAME, you actually notice that NBA JAM is actually higher resolution than the other 2 games (they achieve this by using lower refresh rate - 53hz). If you feed NBA JAM into UVC, you'd get lower resolution than the game was initially intended to be played at.
 

Jassin000

Frenzy Football Player
Joined
Dec 9, 2011
Posts
985
leonk: Yes everything you just stated is true, scaling to 240p causes allot of pixel distortion when compared with original video modes. Its all a trade off, for example...

You must use WinXP *cough* 10+yearoldsoftwareyoumightaswellberunningdos *cough* to properly use Soft15k. ;)
You can't turn on your monitor before the PC is fully booted and soft15K functioning, or you risk sending a 800x600@60 (or higher) image potentially damaging it.
If your switching games on the fly without turning off your monitor in between, your effectively sending different refresh rates on the fly, this IS shorting the chassis life (its true please see the Tri-Sync Monitor Care thread).
Oh BTW 200$ is batshit crazy! I payed 50$ shipped from Cali (I'm not making a joke).

iamjasonh: One PC to rule every screen! It's also sending video to my bedroom TV (living room pictured) via 45ft HDMI cable.

This thread is kind of turning into a "Whats the best way to display MAME" thing, and that was not my original intent at all. What I was originally attempting to talk about was video lag produced by current builds of MAME, and one way I found to avoid that.
 
Last edited:

leonk

Marked Wolf
Joined
Feb 24, 2011
Posts
211
lYou must use WinXP *cough* 10+yearoldsoftwareyoumightaswellberunningdos *cough* to properly use Soft15k. ;)

Don't knock XP .. Unlike Windows Visa/7/8, developers on XP have more direct access to the hardware. This is why things like Soft15 are possible on XP. In addition, the OS is a lot more light weight (i.e. more CPU/RAM resources available for MAME!)

lYou can't turn on your monitor before the PC is fully booted and soft15K functioning, or you risk sending a 800x600@60 (or higher) image potentially damaging it.

I got around this issue by feeding all video through JPAC. It protects your monitor + amplifies signal for correct Monitor voltages.

lOh BTW 200$ is batshit crazy! I payed 50$ shipped from Cali (I'm not making a joke).

You're lucky! The Cali guy has been sold out for a while now. This was the going rate before he found a stash of them on eBay and sold out of all of them.
 
Top