Incoming User Function Changes

retango

New member
Supporter
RL Member
I believe the only difference of using this function versus using the RL native UltraStick management, is that with the user function you can define the UltraStick profiles in a .ini file (shown below), instead of creating a profile for each rom / system. I made the default .ini file based on a list that someone already created for mame, that specifies more than 1130 mame roms that use a profile different than the 8-way.

The function first reads the .ini file, then runs UltraMap.exe with the profile specified - either by the rom if it's included in the .ini, or by the system, or the global default.. When entering Pause or going back to the main menu, it sets the 4-way profile.

Code:
[Settings]
UltraMapExe=C:\Program Files (x86)\UltraMap\UltraMap.exe
ugcGlobalDefault=8-way

[PerRomSystems]
MAME=true

[Systems]
FrontEnd=4-way
Pause=4-way
Nintendo Entertainment System=8-way
MAME=8-way

[Roms]
40love=4-way
4enraya=2-way
5=4-way
500gp=2-way-vertical
600=4-way
8bpm=4-way
abattle=2-way
abattle2=2-way
abscam=4-way
aburner=analog
aburner2=analog
acedrvrw=2-way-vertical
acombat=2-way
acombato=2-way
afire=2-way
albatross=2-way
alibaba=4-way
alibabab=4-way
alieninv=2-way
alieninvp2=2-way
alphaho=4-way
alpine=2-way
alpinea=2-way
alpinerc=2-way
alpinerd=2-way
amidaro=4-way
etc...
 

brolly

Administrator
Developer
I see, maybe we can add built-in support for something like that at some point should be fairly simple. Can you make that list available?
 

retango

New member
Supporter
RL Member
Thanks Brolly! yes of course, it's in the attachment in this post here at RL, which I also attach here (the list is in the UltraStick 360 Programmer.ini file).. Below also included as text..
Thanks again for all!!

Code:
[Roms]
40love=4-way
4enraya=2-way
5=4-way
500gp=2-way-vertical
600=4-way
8bpm=4-way
abattle=2-way
abattle2=2-way
abscam=4-way
aburner=analog
acedrvrw=2-way-vertical
acombat=2-way
acombato=2-way
afire=2-way
albatross=2-way
alibaba=4-way
alibabab=4-way
alieninv=2-way
alieninvp2=2-way
alphaho=4-way
alpine=2-way
alpinea=2-way
alpinerc=2-way
alpinerd=2-way
alpinesa=2-way
alpinr2a=2-way
alpinr2b=2-way
amidar=4-way
amidar1=4-way
amidarb=4-way
amidaro=4-way
amidars=4-way
amidaru=4-way
amigo=4-way
andromed=2-way
anteater=4-way
anteaterg=4-way
anteateruk=4-way
archrivl=analog
arlingtn=2-way-vertical
armora=2-way
armorap=2-way
armorar=2-way
armorcar=4-way
armorcar2=4-way
ashnojoe=4-way
asideral=2-way
astinvad=2-way
astrians=2-way
astrob=2-way
astrob1=2-way
astrob2=2-way
astrob2a=2-way
astrobg=2-way
astrof=2-way
astrof2=2-way
astrof3=2-way
astropal=2-way
astrowar=2-way
atlantol=2-way
attackfc=2-way
attckufo=2-way
avefenix=2-way
bagmanf=4-way
ballbomb=2-way
banbam=4-way
bankp=2-way
barrier=4-way
batman2=2-way
battlcry=4-way
battlex=4-way
beastf=4-way
bestri=4-way
bigbucks=4-way
bigkong=4-way
birdiy=4-way
blaster=analog
blasto=4-way
blitz=analog
blitz2k=analog
blitz99=analog
blkbustr=4-way
blkhole=2-way
blockade=4-way
blockjoy=2-way
boblbobl=2-way
boblbobl2=2-way
boonggab=2-way
bowl3d=2-way
brdrlinb=4-way
brdrline=4-way
brdrlinet=4-way
brdrlins=4-way
brickzn=2-way
brickznv4=2-way
brix=2-way-vertical
brixian=4-way
btime=4-way
btime2=4-way
btimem=4-way
bub68705=2-way
bublbobl=2-way
bublbobl1=2-way
bublboblr=2-way
bublboblr1=2-way
bublpong=2-way
bucaner=4-way
calorie=4-way
calorieb=4-way
cannonb=4-way
cannonb2=4-way
cannonb3=4-way
cannonbp=4-way
capitol=2-way
car2=4-way
carjmbre=4-way
carnival=2-way
carnivalc=2-way
carnivalh=2-way
carnivalha=2-way
catacomb=2-way
catnmous=2-way
catnmousa=2-way
challeng=2-way
chameleo=4-way
cheekyms=2-way
chewing=2-way
chinhero=4-way
chinhero2=4-way
chinhero3=4-way
chinherot=4-way
circusc=2-way
circusc2=2-way
circusc3=2-way
circuscc=2-way
circusce=2-way
ckong=4-way
ckongalc=4-way
ckongg=4-way
ckongmc=4-way
ckongo=4-way
ckongpt2=4-way
ckongpt2a=4-way
ckongpt2b=4-way
ckongpt2j=4-way
ckongpt2jeu=4-way
ckongs=4-way
combh=2-way-vertical
commsega=4-way
comotion=4-way
condor=2-way
cookrace=4-way
cosmica=2-way
cosmica1=2-way
cosmica2=2-way
cosmicg=2-way
cosmicm2=2-way
cosmicmo=2-way
cosmo=2-way
cosmos=2-way
cottong=4-way
crash=4-way
crater=2-way-vertical
crazyblk=4-way
crgolf=2-way
crgolfa=2-way
crgolfb=2-way
crgolfbt=2-way
crgolfc=2-way
crgolfhi=2-way
crockman=4-way
croquis=4-way
crospang=4-way
crszone=2-way-vertical
crszonev2a=2-way-vertical
crszonev3a=2-way-vertical
crszonev3b=2-way-vertical
crszonev3b2=2-way-vertical
crszonev4a=2-way-vertical
crush=4-way
crush2=4-way
crush3=4-way
crush4=4-way
crushbl=4-way
crushbl2=4-way
crushbl3=4-way
crushs=4-way
crzrally=2-way
crzrallya=2-way
crzrallyg=2-way
ctrpllrp=4-way
cybsled=analog
dai3wksi=4-way
dairesya=4-way
dambustr=4-way
dambustra=4-way
dambustruk=4-way
dangcurv=2-way-vertical
darkwar=2-way
darthvdr=2-way
defcmnd=2-way-vertical
defence=2-way-vertical
defender=2-way-vertical
defenderb=2-way-vertical
defenderg=2-way-vertical
defenderw=2-way-vertical
defndjeu=2-way-vertical
demon=2-way
demoneye=2-way
depthch=2-way
depthcho=2-way
desterth=2-way
destryer=2-way
destryera=2-way
devilfsg=4-way
devzone=2-way
devzone2=2-way
diamond=4-way
digdug=4-way
digdug1=4-way
digdug2=4-way
digdug2o=4-way
digdugat=4-way
digdugat1=4-way
digger=4-way
digsid=4-way
dirtdash=2-way-vertical
dirtfoxj=2-way-vertical
disco=4-way
discof=4-way
dking=4-way
dkingjr=4-way
dkong=4-way
dkong3=4-way
dkong3b=4-way
dkong3j=4-way
dkongf=4-way
dkongj=4-way
dkongjnrj=4-way
dkongjo=4-way
dkongjo1=4-way
dkongjr=4-way
dkongjrb=4-way
dkongjre=4-way
dkongjrj=4-way
dkongjrm=4-way
dkongo=4-way
dkongpe=4-way
dkongx=4-way
dkongx11=4-way
dland=2-way
dmx=2-way
dmx2m=2-way
dmx2majp=2-way
dncfrks=2-way
docastle=4-way
docastle2=4-way
docastleo=4-way
dodgem=4-way
dogfight=2-way
domino=4-way
dominos=4-way
dommy=4-way
dorodon=4-way
dorodon2=4-way
dorunrun=4-way
dorunrun2=4-way
dorunrunc=4-way
dorunrunca=4-way
douni=4-way
dowild=4-way
downhill=2-way-vertical
drakton=4-way
dremshpr=4-way
drgnbstr=4-way
drivfrcb=2-way
drivfrcg=2-way
drivfrcp=2-way
drivfrct=2-way
drktnjr=4-way
drmicro=4-way
drmn=2-way
drmn10m=2-way
drmn2m=2-way
drmn2mpu=2-way
drmn3m=2-way
drmn4m=2-way
drmn5m=2-way
drmn6m=2-way
drmn7m=2-way
drmn7ma=2-way
drmn8m=2-way
drmn9m=2-way
drtomy=4-way
dynamski=2-way
dzigzag=4-way
eagle=2-way
eagle2=2-way
eagle3=2-way
eggor=4-way
eggs=4-way
elecyoyo=4-way
elecyoyo2=4-way
elim2=2-way
elim2a=2-way
elim2c=2-way
elim4=2-way
elim4p=2-way
enigma2=2-way
enigma2a=2-way
enigma2b=2-way
evilston=4-way
exodus=2-way
extdwnhl=2-way
eyes=4-way
eyes2=4-way
eyesb=4-way
eyeszac=4-way
eyeszacb=4-way
f1gp=2-way
f1gp2=2-way
f1gpb=2-way
falcon=2-way
falconz=2-way
fantasia=4-way
fantasiaa=4-way
fantastc=2-way
fantazia=2-way
fantsia2=4-way
fantsia2a=4-way
fantsy95=4-way
farwest=4-way
fenix=2-way
fghtmn=2-way
fghtmna=2-way
fghtmnk=2-way
fghtmnu=2-way
finfurl2=2-way-vertical
finfurl2j=2-way-vertical
flicky=2-way
flickyo=2-way
flickys1=2-way
flickys2=2-way
flstory=2-way
flstoryj=2-way
foodfc=analog
freeze=2-way
frogf=4-way
frogg=4-way
frogger=4-way
froggermc=4-way
froggers=4-way
froggers1=4-way
froggers2=4-way
froggrs=4-way
fspiderb=2-way
funquiz=4-way
g13knd=2-way-vertical
galactic=2-way
galaga=2-way
galagamf=2-way
galagamk=2-way
galagamw=2-way
galagao=2-way
galap1=2-way
galap4=2-way
galapx=2-way
galaxbsf=2-way
galaxia=2-way
galaxian=2-way
galaxiana=2-way
galaxianbl=2-way
galaxianm=2-way
galaxianmo=2-way
galaxiant=2-way
galaxrf=2-way
galemp=2-way
galgame=2-way
gallag=2-way
galpanic=4-way
galpanica=4-way
galsnew=4-way
galsnewa=4-way
galsnewj=4-way
galsnewk=4-way
galturbo=2-way
galxwars=2-way
galxwars2=2-way
galxwarst=2-way
ganbare=2-way
gauntdl=analog
gauntleg=analog
ghostmun=4-way
gmgalax=4-way
gmissile=2-way
go2000=2-way
golgo13=2-way-vertical
gorkans=4-way
gravitar=2-way
gravitar2=2-way
gravp=2-way
greenber=2-way
grescue=2-way
griffon=2-way
gsword=2-way
gsword2=2-way
gteikob2=2-way
gteikokb=2-way
gteikoku=2-way
gundealr=4-way
gundealra=4-way
gundealrt=4-way
gunwars=2-way-vertical
gutangtn=4-way
guzzler=4-way
guzzlers=4-way
hangly=4-way
hangly2=4-way
hangly3=4-way
hardhat=4-way
headon=4-way
headon1=4-way
headon2=4-way
headon2s=4-way
headonmz=4-way
headons=4-way
headonsa=4-way
heiankyo=4-way
heuksun=4-way
hexa=4-way
higemaru=4-way
highsplt=2-way
highsplta=2-way
highspltb=2-way
hocrash=4-way
holeland=2-way
hotminda=2-way
hunchbak=2-way
hunchbaka=2-way
hunchbkg=2-way
hustle=4-way
hustlerb3=2-way
hyprdriv=2-way
indianbt=2-way
indianbtbr=2-way
intruder=2-way
invad2ct=2-way
invaddlx=2-way
invader4=2-way
invaderl=2-way
invaders=2-way
invadpt2=2-way
invadpt2br=2-way
invadrmr=2-way
invasion=2-way
invasiona=2-way
invasionb=2-way
invasionrz=2-way
invasionrza=2-way
invds=2-way
invho2=4-way
invinco=2-way
invmulti=2-way
invmultim1a=2-way
invmultim2a=2-way
invmultim2c=2-way
invmultim3a=2-way
invmultip=2-way
invmultis1a=2-way
invmultis2a=2-way
invmultis3a=2-way
invmultit3d=2-way
invrvnge=2-way
invrvngea=2-way
invrvngeb=2-way
invrvngedu=2-way
invrvngegw=2-way
ipminvad=2-way
ipminvad1=2-way
ironhors=4-way
istellar=4-way
jackler=4-way
jjack=4-way
jollyjgr=4-way
journey=4-way
joust=2-way
joust2=2-way
joustr=2-way
joustwr=2-way
joyman=4-way
jpark=analog
jrking=4-way
jrpacman=4-way
jrpacmanf=4-way
jrpacmbl=4-way
jspecter=2-way
jspecter2=2-way
jumping=2-way
jungler=4-way
junglers=4-way
kaitei=2-way
kaitein=2-way
kamakazi3=2-way
kamikaze=2-way
kaos=2-way
karianx=4-way
kicker=4-way
kickridr=4-way
kikcubic=4-way
kikcubicb=4-way
kikstart=2-way
kingball=2-way
kingballj=2-way
knockout=4-way
kopunch=4-way
korosuke=4-way
kosmokil=2-way
kungfub=4-way
kungfub2=4-way
kungfum=4-way
kungfumd=4-way
kungfut=2-way
kungfuta=2-way
ladybgb2=4-way
ladybug=4-way
ladybugb=4-way
ladybugg=4-way
ladyfrog=4-way
laser=2-way
lasso=4-way
lnc=4-way
locoboot=4-way
locomotn=4-way
logicpr2=4-way
logicpro=4-way
looping=2-way-vertical
loopingv=2-way-vertical
loopingva=2-way-vertical
lrescue=2-way
lrescuem=2-way
lrescuem2=2-way
luctoday=2-way
lunarba1=2-way
lunarbat=2-way
lupin3=4-way
lupin3a=4-way
lvgirl94=4-way
m4=2-way-vertical
magicfly=2-way
magspot=2-way
magspot2=2-way
maketrax=4-way
maketrxb=4-way
mamboagg=2-way
mappy=2-way
mappyj=2-way
mario=2-way
marioe=2-way
marioj=2-way
marioo=2-way
masao=2-way
maxrpm=2-way-vertical
mbrush=4-way
medlanes=2-way
megadon=2-way
megatack=2-way
meosism=2-way
merlinmm=4-way
meteor=2-way
mgprem11=2-way
mikie=4-way
mikiehs=4-way
mikiej=4-way
mineswpr=4-way
mineswpr4=4-way
minivadr=2-way
missb2=2-way
missmw96=4-way
missw96=4-way
mlander=2-way
mmonkey=4-way
monkeyd=4-way
monsterb=4-way
monsterb2=4-way
moonal2=2-way
moonal2b=2-way
moonaln=2-way
moonbase=2-way
moonbasea=2-way
mooncmw=2-way
mooncptc=2-way
mooncreg=2-way
mooncrgx=2-way
mooncrs2=2-way
mooncrs3=2-way
mooncrs4=2-way
mooncrsb=2-way
mooncrsl=2-way
mooncrst=2-way
mooncrstg=2-way
mooncrsto=2-way
mooncrstu=2-way
mooncrstuk=2-way
mooncrstuku=2-way
moonqsr=2-way
motorace=2-way
mototour=2-way
motoxgo=2-way-vertical
motoxgov1a=2-way-vertical
motoxgov1a2=2-way-vertical
motoxgov2a=2-way-vertical
mpatrol=2-way
mpatrolw=2-way
mranger=2-way
mrdo=4-way
mrdofix=4-way
mrdot=4-way
mrdoy=4-way
mrdrillr=4-way
mrdu=4-way
mrflea=4-way
mrjong=4-way
mrkougar=2-way
mrkougar2=2-way
mrkougb=2-way
mrkougb2=2-way
mrlo=4-way
mrtnt=4-way
mschamp=4-way
mschamps=4-way
msheartb=4-way
msjiken=4-way
mspacii=4-way
mspacii2=4-way
mspacmab=4-way
mspacman=4-way
mspacmanbg=4-way
mspacmat=4-way
mspacmbe=4-way
mspacmnf=4-way
mspacpls=4-way
mtrap=4-way
mtrap3=4-way
mtrap4=4-way
mystston=4-way
myststono=4-way
myststonoi=4-way
natodef=4-way
natodefa=4-way
naughtyb=4-way
naughtyba=4-way
naughtybc=4-way
navarone=2-way
nbashowt=analog
netwars=4-way
newfant=4-way
newpuc2=4-way
newpuc2b=4-way
newpuckx=4-way
newtangl=2-way
nextfase=2-way
ninjakun=2-way
nmouse=4-way
nmouseb=4-way
nrallyx=4-way
nrallyxb=4-way
nyny=2-way
nynyg=2-way
ohpaipee=4-way
olibochu=4-way
omega=2-way
omni=2-way
orbit=2-way
otwalls=2-way
ozmawars=2-way
ozmawars2=2-way
ozon1=2-way
pacgal=4-way
pacheart=4-way
pacland=2-way
paclandj=2-way
paclandjo=2-way
paclandjo2=2-way
paclandm=2-way
pacman=4-way
pacmanbl=4-way
pacmanbla=4-way
pacmanf=4-way
pacmansp=4-way
pacmod=4-way
pacnchmp=4-way
pacnpal=4-way
pacnpal2=4-way
pacplus=4-way
pacuman=4-way
paintrlr=4-way
pairsnb=4-way
pairsten=4-way
pajaroes=2-way
panic=4-way
panic2=4-way
panic3=4-way
panicger=4-way
panich=4-way
panicprk=2-way-vertical
panther=2-way
panzer=4-way
pclubj=2-way
pclubjv2=2-way
pclubjv4=2-way
pclubjv5=2-way
pcnfrk3m=2-way
peggle=2-way
pengo=4-way
pengo2=4-way
pengo2u=4-way
pengo3u=4-way
pengo4=4-way
pengob=4-way
penta=4-way
pepper2=4-way
pepper27=4-way
perestro=4-way
perestrof=4-way
pestplce=4-way
pettanp=4-way
phantom=4-way
phantoma=4-way
phoenix=2-way
phoenix3=2-way
phoenixa=2-way
phoenixb=2-way
phoenixc=2-way
phoenixc2=2-way
phoenixc3=2-way
phoenixc4=2-way
phoenixj=2-way
phoenixs=2-way
phoenixt=2-way
photof=4-way
pignewt=4-way
pignewta=4-way
pigskin=analog
pingpong=2-way
piranha=4-way
piranhah=4-way
piranhao=4-way
pisces=2-way
piscesb=2-way
pitnrun=4-way
pitnruna=4-way
pkunwar=2-way
pkunwarj=2-way
playball=2-way
pleiadbl=2-way
pleiadce=2-way
pleiads=2-way
pleiadsb2=2-way
pnchmn=2-way
pnchmn2=2-way
pnchmna=2-way
pootan=2-way-vertical
pooyan=2-way-vertical
pooyans=2-way-vertical
popeye=4-way
popeyebl=4-way
popeyef=4-way
popeyeman=4-way
popeyeu=4-way
popflame=4-way
popflamea=4-way
popflameb=4-way
popflamen=4-way
porky=2-way
portrait=4-way
portraita=4-way
ppmast93=4-way
protennb=4-way
puckman=4-way
puckmanb=4-way
puckmanf=4-way
puckmanh=4-way
puckmod=4-way
pulsar=4-way
punchita=4-way
punchout=4-way
qbert=4-way-diagonal
qix=4-way
qix2=4-way
qixa=4-way
qixb=4-way
qixo=4-way
quarterb=analog
quarterba=analog
quasar=2-way
quasara=2-way
raceon=2-way-vertical
radarscp=2-way
radarscp1=2-way
raiders5=4-way
raiders5t=4-way
rallys=4-way
rallysa=4-way
rallyx=4-way
rallyxa=4-way
rallyxm=4-way
rallyxmr=4-way
rapidrvr=2-way-vertical
rapidrvrp=2-way-vertical
rapidrvrv2c=2-way-vertical
rbisland=2-way
rbislande=2-way
rbislando=2-way
rbmk=2-way
rbtapper=4-way
rchase=analog
redalert=2-way
redbaron=analog
redbarona=4-way
redrobin=2-way
redufo=2-way
redufob=2-way
reikaids=4-way
retofinv=2-way
retofinv1=2-way
retofinv2=2-way
ripoff=2-way
roadrunn=analog
robby=4-way
robotbwl=2-way
rockduck=4-way
rocktrv2=4-way
rocnrope=4-way
rocnropek=4-way
rollingc=2-way
ropeman=4-way
rotaryf=2-way
route16=4-way
route16a=4-way
route16b=4-way
routex=4-way
rpatrol=2-way
rpatrolb=2-way
rthunder=4-way
rthunder1=4-way
rthunder2=4-way
rugrats=4-way
safarir=2-way
samurai=4-way
sasuke=2-way
satansat=2-way
satansata=2-way
satansatind=2-way
savanna=4-way
sboblboa=2-way
sboblbob=2-way
sbugger=2-way-vertical
sbuggera=2-way-vertical
scessjoe=4-way
schaser=4-way
schasera=4-way
schaserb=4-way
schaserc=4-way
schasercv=4-way
scregg=4-way
sderby=4-way
searthie=2-way
searthin=2-way
searthina=2-way
sformula=2-way
shadfgtr=4-way
shaolinb=4-way
shaolins=4-way
sharrier=analog
shollow=2-way
shollow2=2-way
shtrider=2-way
shtridera=2-way
shuttlei=2-way
sia2650=2-way
sicv=2-way
sidebs=2-way-vertical
sidebs2=2-way-vertical
sidebs2j=2-way-vertical
sidebsja=2-way-vertical
sidetrac=4-way
silvland=2-way
sindbadm=4-way
sinistar=analog
sinvemag=2-way
sinvzen=2-way
sisv=2-way
sisv2=2-way
sitv=2-way
skybase=2-way
skybump=2-way-vertical
skychut=2-way
skydiver=2-way
skylove=2-way
skyraidr=2-way
slrasslt=analog
smash=4-way
smooncrs=2-way
solarfox=4-way
solarq=2-way
solfight=2-way
sos=2-way
spacbat2=2-way
spacbatt=2-way
spacbeam=2-way
spacduel=2-way
spaceat2=2-way
spaceatt=2-way
spacebrd=2-way
spacecho=2-way
spacecho2=2-way
spacecom=2-way
spacecr=2-way
spacedem=2-way
spacefb=2-way
spacefba=2-way
spacefbb=2-way
spacefbe=2-way
spacefbe2=2-way
spacefbg=2-way
spacefev=2-way
spacefevo=2-way
spacefevo2=2-way
spacefrt=2-way
spaceftr=2-way
spaceg=2-way
spaceint=2-way
spaceintj=2-way
spacelnc=2-way
spacempr=2-way
spaceph=2-way
spacerng=2-way
spaceshp=2-way
spacewar=2-way
spacewr3=2-way
spacfury=2-way
spacfurya=2-way
spacfuryb=2-way
spacmiss=2-way
spartanx=4-way
spcdrag=2-way
spcdraga=2-way
spceking=2-way
spcewarl=2-way
spcewars=2-way
spcforc2=2-way
spcforce=2-way
spcking2=2-way
spclaser=2-way
spctbird=2-way
spdcoin=2-way
speakres=2-way
speakresb=2-way
spectar=4-way
spectar1=4-way
spfghmk2=2-way
spfghmk22=2-way
spiders=2-way
spiders2=2-way
spiders3=2-way
spiero=4-way
spinner=2-way
spnchout=4-way
spnchoutj=4-way
sprglbpg=4-way
sprglobp=4-way
sqix=4-way
sqixb1=4-way
sqixb2=4-way
sqixr1=4-way
sqixu=4-way
squaitsa=2-way
sraider=4-way
sspacaho=4-way
sspaceat=2-way
sspaceat2=2-way
sspaceat3=2-way
sspaceatc=2-way
sstarbtl=2-way
sstarcrs=2-way
sstrangr=2-way
sstrangr2=2-way
starcas=2-way
starcas1=2-way
starcase=2-way
starcasp=2-way
starcrus=2-way
starfght=2-way
starfgmc=2-way
stargate=2-way-vertical
starrkr=4-way
startrkd=2-way-vertical
starw=2-way
starw1=2-way
starwarr=2-way
steeltal=analog
steelwkr=2-way
stellcas=2-way
stera=2-way
stratvox=2-way
stratvoxb=2-way
streakng=4-way
streaknga=4-way
strtheat=2-way
subhunt=2-way
sucasino=2-way
supcrash=4-way
superabc=4-way
superabco=4-way
superg=2-way
supergx=2-way
superinv=2-way
superpac=4-way
superpacm=4-way
supmodel=4-way
suprgolf=2-way
suprridr=2-way
sutapper=4-way
swarm=2-way
swtrilgy=analog
tactcian=4-way
tactcian2=4-way
tail2nos=2-way
tailg=analog
tankbatt=4-way
tankbattb=4-way
tapper=4-way
tappera=4-way
targ=4-way
targc=4-way
taxidriv=4-way
telmahjn=4-way
tenspot=4-way
tgm2=4-way
tgm2p=4-way
tgmj=4-way
theend=2-way
theendb=2-way
theends=2-way
theglobp=4-way
thief=4-way
thndrbld=analog
timber=4-way
timecrs2=2-way-vertical
timecrs2v2b=2-way-vertical
timecrs2v4a=2-way-vertical
timelimt=4-way
timetunl=2-way-vertical
tinv2650=2-way
tisland=4-way
tmek=analog
todruaga=4-way
todruagao=4-way
todruagas=4-way
togenkyo=4-way
tomahawk=4-way
tomahawk1=4-way
toratora=2-way
tornado1=2-way-vertical
tornado2=2-way-vertical
toucheme=4-way
toypop=4-way
tranqgun=4-way
travrusa=2-way
travrusab=2-way
triplep=4-way
triplepa=4-way
troangel=2-way
truco=2-way-vertical
tryout=4-way
tsamurai=4-way
tsamurai2=4-way
tsamuraih=4-way
tst_galx=2-way
tst_invd=2-way
tugboat=2-way
turpin=4-way
turtles=4-way
tutankhm=4-way
tutankhms=4-way
ultrainv=2-way
uniwars=2-way
unkhorse=2-way
upscope=2-way-vertical
vanvan=4-way
vanvanb=4-way
vanvank=4-way
vautour=2-way
vautourz=2-way
vcombat=2-way-vertical
victlapw=2-way-vertical
vortex=2-way
vpool=2-way
wacko=4-way
warcadia=2-way
warpwarp=4-way
warpwarpr=4-way
warpwarpr2=4-way
waterski=2-way
wbdeluxe=2-way
wboy=2-way
wboy2=2-way
wboy2u=2-way
wboy3=2-way
wboy4=2-way
wboy5=2-way
wboyo=2-way
wboysys2=2-way
wboyu=2-way
wboyub=2-way
wgp=4-way
wgp2=4-way
wgpj=4-way
wiping=4-way
wiseguy=4-way
wndrmomo=4-way
woodpeca=4-way
woodpeck=4-way
wotw=2-way
wotwc=2-way
wownfant=4-way
ww3=2-way
wwjgtin=4-way
yamyam=4-way
yankeedo=4-way
yosakdon=2-way
yosakdona=2-way
zarzon=2-way
zero=2-way-vertical
zero2=2-way-vertical
zerotime=2-way
zerozone=4-way
zigzag=4-way
zigzag2=4-way
zookeep=4-way
zookeep2=4-way
zookeep3=4-way
zzyzzyxx=2-way-vertical
zzyzzyxx2=2-way-vertical
 

Attachments

  • UltraStik 360 Programmer 2.0.zip
    13.8 KB · Views: 7

djvj

Administrator
Staff member
Developer
If this ini support were to be added, where should the ini live? Module folder or Profiles folder? Profile folder doesn't seem right because a single ini doesnt follow the folder structure we use. So the module folder makes more sense, but splits up what is essentially the same thing as the profiles.

Thoughts?
 

brolly

Administrator
Developer
I'd say Profiles folder, we can surely think on a way to fit it in our structure besides this approach could be used for the other keymappers as well. These would be nothing more than custom named profiles.

This should be simple to implement on the RL side, my main concern is on how to support this in RLUI I'm just not seeing a simple way to do it without having to do a lot of changes to the current keymapper form.
 

djvj

Administrator
Staff member
Developer
So would it be only a single ini to look for, or look for one in each supported folder as well?
 

brolly

Administrator
Developer
I'd probably create a "Custom" folder where the custom profiles would go and then one ini named after each system for the mappings and a global one for the global mappings (default, frontend, etc.) or the global mappings could simply go into the RL global ini since there's probably no need for a separate ini for this.
We would also need to decide where to place the ini mapping files and the priority between custom profiles and the current ones in case both exist.
 

djvj

Administrator
Staff member
Developer
That path works. The problem I'm having is right now KeymapperProfileSelect function handles everything, but its simple that it has to just execute the keymapper sent with a path to the profile. Adding in custom inis with an unknown amount of settings within, adds a layer of complexity that was not taken into account with the current implementation and the one function cannot handle this.

It's not a matter of simply saying, here's a new ini to account for. That is easy and can easily add. No, this is here's an ini, now look in the Rom section, and for a RomName setting and read it. Now what about all the other settings in the ini, or what about when the next tool comes along that can use a similar ini with different setting names? I don't think this is the job of a function, but more a class, which means a rewrite. Now this goes from being a simple add into a rewrite.

Following me?
 

brolly

Administrator
Developer
I think the function could be adapted to support that, if you add one more ini to keymapperProfiles (keymapperProfiles[tool,"CustomProfile"]) then should be a matter of checking it when mode = "START".
Something like:
Code:
If (mode = "START") {
	RLLog.Debug(tool . " - Searching for profiles")

        If FileExist(keymapperProfiles[tool,"CustomProfile"] . keymapperProfiles[tool,"CustomProfile"]) {
     	    customIni := new IniFile(keymapperProfiles[tool,"CustomProfile"] . keymapperProfiles[tool,"CustomProfile"])
            customSysProfile := customIni.Read(systemName, "General",,,1)
            customGameProfile := customIni.Read(romName, "Roms",,,1)
            If (customGameProfile && FileExist(customGameProfile . keymapperProfiles[tool,"Ext"])) {
                profile := customGameProfile . keymapperProfiles[tool,"Ext"])
        }

        If (!profile) {	
            If FileExist(keymapperProfiles[tool,"RomProfile"] . keymapperProfiles[tool,"Ext"]) {
         	    profile := keymapperProfiles[tool,"RomProfile"] . keymapperProfiles[tool,"Ext"]
    	   } Else If FileExist(keymapperProfiles[tool,"EmuProfile"] . keymapperProfiles[tool,"Ext"]) {
    	       profile := keymapperProfiles[tool,"EmuProfile"] . keymapperProfiles[tool,"Ext"]
	    } Else If FileExist(keymapperProfiles[tool,"SystemProfile"] . keymapperProfiles[tool,"Ext"]) {
	        profile := keymapperProfiles[tool,"SystemProfile"] . keymapperProfiles[tool,"Ext"]
	    } Else If FileExist(keymapperProfiles[tool,"SystemProfile"] . keymapperProfiles[tool,"Ext"]) {
	        profile := keymapperProfiles[tool,"SystemProfile"] . keymapperProfiles[tool,"Ext"]
	    } Else If customGameProfile && FileExist(customGameProfile . keymapperProfiles[tool,"Ext"]) {
	        profile := customGameProfile . keymapperProfiles[tool,"Ext"]
	    } Else {
	        RLLog.Debug(tool . " - No profiles found")
  	        Return
 	   }
       }
       keymapperProfiles[tool,"LastProfile"] := profile
}

I don't see why this couldn't be used globally across all tools, in fact this could even make sense to use with the keymappers like xpadder or joytokey? For xpadder might be more complex due to the multiple files requirement.

If you don't like to couple this function with the custom ini format you can extract the custom ini parsing to a separate function which will produce an object with romProfile, systemProfile, etc. variables filled in and feed that object to the KeymapperProfileSelect function so you don't have to deal with reading from the ini sections here, this way the ini parsing would be isolated from this and you could even use different ini formats for different tools if you want since this function would simply receive an object with those fields filled in, doesn't need to know how they came from.
Shouldn't KeymapperProfileSelect be in Keymapper.ahk instead of Shared btw?
 

brolly

Administrator
Developer
Actually maybe we are overcomplicating this, is there any need to be mixing the custom profiles structure with the current one? I'd say if a user wants to use custom profiles then that's what he will be using and not the current profile naming schema. Mixing them both would end up being confusing.
So we could add a simple boolean setting (UseCustomProfilesForXXX XXX being the keymapper type) and if true custom profiles would be used, if false we would use the current ones, so the KeymapperProfileSelect would stay exactly as it is and we would need a new function to select the profile for custom names and we'd use one or the other based on the above setting.
 

djvj

Administrator
Staff member
Developer
The reason I was trying to keep it contained was because paths were defined already inside that function. Duplicating code into another function dealing with the same features is a habit I'm trying to get away from.

I think I didn't put the function in keymapper was mainly because most of keymapper was done by ghutch.
 

Ninja2bseen

Member
RL Member
hey brolly, I tried to make the update here (sorry for the delay) but i'm failing. Instead of showing you the attempt of fixing this, here was my original ahk code prior to the update. Do you have suggestion that will make this work. Feel dumb that I couldn't make it work. Thank you!

; Use this function to define any code you want to run in every module on start
StartGlobalUserFeatures(){
Global systemName, romName, WinIPACPath, WinIPACProfileDir, changedIPacProfile, settingsFile, IdleVolPath, IdleVolUse
Log("StartGlobalUserFeatures - Starting")
settingsFile := A_ScriptDir . "\Lib\3rdPartyToolsPaths.ini"
Log("3rdPartyTools - Ini file location " . settingsFile, 5)
Log("WinIPAC - Start IPac System Profile Test")
WinIPACPath := IniReadCheck(settingsFile, "WinIPAC", "WinIPACPath",A_ScriptDir . "\WinIPAC\WinIPAC.exe",,1)
WinIPACProfileDir := IniReadCheck(settingsFile, "WinIPAC", "WinIPACProfileDir",A_ScriptDir . "\IPACProfiles",,1)

If !(FileExist(WinIPACPath)) {
Log("WinIPAC - The file WinIPAC.exe does not exist at " . WinIPACPath . ". Please check your paths!",3)
} else {
If !(FileExist(WinIPACProfileDir . "\" . "default.ipc")){
Log("WinIPAC - IPac required Default Profile not found at " . WinIPACProfileDir . "\" . "default.ipc",5)
Return
} else {
Log("WinIPAC - Default profile found: " . WinIPACProfileDir . "\" . "default.ipc",5)
changedIPacProfile := LoadIPacProfile()
}
}
Log("WinIPAC - Stop IPac System Profile Test")
Log("IdleVolAdjust - Start IdleVolAdjust Section")

IdleVolPath := IniReadCheck(settingsFile, "IdleVolAdjust", "IdleVolPath",A_ScriptDir . "\IdleVolumeAdjuster.exe",,1)
IdleVolUse := IniReadCheck(settingsFile, "IdleVolAdjust", "IdleVolUse","No",,1)
IdleVolSystems := IniReadCheck(settingsFile, "IdleVolAdjust", "IdleVolSystems","",,1)

If !(FileExist(IdleVolPath)) {
Log("IdleVolAdjust - Exe NOT located at " . IdleVolPath . ". Please check your paths", 5)
IdleVolUse := "No"
} else {
IfInString, IdleVolSystems, %systemName%
{
Log("IdleVolAdjust - " . systemName . " System found in IdleVolSystems list", 5)
If (IdleVolUse = "Yes") {
Log("IdleVolAdjust - Running IdleVolumeAdjuster pause with """ . IdleVolPath . " pause""", 5)
Run, % IdleVolPath . " pause",,UseErrorLevel,OutputVarPID
} else If (IdleVolUse = "Kill") {
Log("IdleVolAdjust - Running IdleVolumeAdjuster Kill with """ . IdleVolPath . " Kill""", 5)
Log("IdleVolAdjust - Trying to detect if program is running.",5)
Process, Exist, IdleVolumeAdjuster.exe
IdleVolPID = %ErrorLevel%
Log("IdleVolAdjust - IdleVolPID = " . IdleVolPID,5)
If IdleVolPID = 0
{
Log("IdleVolAdjust - Process does not exist. Not stopping the process and it will not be restarted.", 5)
IdleVolUse := "No"
} else {
Log("IdleVolAdjust - Attempting to stop Idle Volume Adjuster with a PID of " . IdleVolPID,5)
Process, Close, %IdleVolPID%
CloseIdleVolPID = %ErrorLevel%
Log("IdleVolAdjust - Close process ErrorLevel - " . CloseIdleVolPID,5)
If (IdleVolPID = CloseIdleVolPID)
{
Log("IdleVolAdjust - Process closed OK.",5)
} else {
Log("IdleVolAdjust - Process not closed. Will not restart.",5)
IdleVolUse := "No"
}
}
}
} else {
Log("IdleVolAdjust - " . systemName . " System Not found in IdleVolSystems list :" . IdleVolSystems, 5)
IdleVolUse := "No"
}
}
Log("IdleVolAdjust - Stop IdleVolAdjust Section")
Log("StartGlobalUserFeatures - Ending")
}


LoadIPacProfile(){
Global systemName, romName, WinIPACPath, WinIPACProfileDir
IPacPath1 := WinIPACProfileDir . "\" . systemName . "\" . romName . ".ipc"
IPacPath2 := WinIPACProfileDir . "\" . systemName . ".ipc"
Loop, 2 {
if FileExist(IPacPath%a_index%) {
Log("WinIPAC - Loading IPAC profile: " . IPacPath%a_index%, 5)
Run, % WinIPACPath . " " . IPacPath%a_index%,,UseErrorLevel,OutputVarPID
Process, WaitClose, %OutputVarPID%, 5
IPacPID = ErrorLevel
Log("WinIPAC - WinIPAC PID: " . OutputVarPID . " Error Level: " . ErrorLevel, 5)
;11:55:54 AM | Title/Class: WinIPAC - Downloading ahk_class ThunderRT6FormDC is now active
If (ErrorLevel > 0){
ScriptError("Your IPac failed to program. Make sure the IPac is connected and try again. You may need to reboot your computer and try again.")
} else {
Log("WinIPAC - IPAC profile was loaded.",5)
Return true
}
} else {
Log("WinIPAC - IPac profile " . IPacPath%a_index% . " not found.",5)
}
}
}

; Use this function to define any code you may need to stop or clean up in every module on exit
StopGlobalUserFeatures(){
Global WinIPACPath, WinIPACProfileDir, changedIPacProfile, IdleVolPath, IdleVolUse, bezelEnabled
Log("StopGlobalUserFeatures - Starting")
Log("WinIPAC - Start IPac Profile Restore")
If (changedIPacProfile){
RunWait, % WinIPACPath . " " . WinIPACProfileDir . "\" . "default.ipc",,UseErrorLevel,OutputVarPID
If (ErrorLevel > 0){
ScriptError("Your IPac failed to restore. Your default IPac profile was not programmed.")
} else {
Log("WinIPAC - Default IPac profile has been restored.",5)
Return
}
} else {
Log("WinIPAC - Alternative IPac profile not used. No need to restore.")
}
Log("WinIPAC - Stop IPac Profile Restore")

Log("IdleVolAdjust - Start IdleVolAdjust resume section")
If (IdleVolUse = "Yes") {
Log("IdleVolAdjust - Running IdleVolumeAdjuster resume with """ . IdleVolPath . " resume""", 5)
Run, % IdleVolPath . " resume",,UseErrorLevel,OutputVarPID
} else If (IdleVolUse = "Kill") {
Log("IdleVolAdjust - Running IdleVolumeAdjuster restart from Kill with """ . IdleVolPath . """", 5)
Run, % IdleVolPath,,UseErrorLevel,OutputVarPID
} else {
Log("IdleVolAdjust - Not adjusting volume. IdleVolUse set to: " . IdleVolUse, 5)
}

Log("IdleVolAdjust - Stop IdleVolAdjust resume section")

;Restrict Cursor Movement disabled
If bezelEnabled
ClipCursor( False )

Log("StopGlobalUserFeatures - Ending")
}

; This function gets ran right after FadeInExit(), after the emulator is loaded
PostLoad(){
Global RLLog,dbName,systemName,bezelScreenX,bezelScreenY,bezelScreenWidth,bezelScreenHeight,bezelEnabled
RLLog.Info(A_ThisFunc . " - Starting")

;Restrict Cursor Movement
If (bezelEnabled = "true"){
ClipCursor( True, (bezelScreenX + 6), (bezelScreenY + 6), (bezelScreenX + bezelScreenWidth - 6), (bezelScreenY + bezelScreenHeight - 6))
RLLog.Info(A_ThisFunc . " - Restrict Cursor Movement from point " . bezelScreenX . "," . bezelScreenY . " in a " . bezelScreenWidth . "x" . bezelScreenHeight . " area.")
}

RLLog.Info(A_ThisFunc . " - Ending")
}

;Clip Cursor Function for bezel and lightgun games (not mame)
ClipCursor( Confine=True, x1=0 , y1=0, x2=1, y2=1 ) {
VarSetCapacity(R,16,0), NumPut(x1,&R+0),NumPut(y1,&R+4),NumPut(x2,&R+8),NumPut(y2,&R+12)
Return Confine ? DllCall( "ClipCursor", UInt,&R ) : DllCall( "ClipCursor" )
}
 

brolly

Administrator
Developer
This should do it, put it in \Lib\User Functions\Global.ahk

Code:
class GlobalUserFunction extends UserFunction {

	; Use this function to define any code you want to run in every module on start
	StartUserFeatures() {
		Global systemName, romName, WinIPACPath, WinIPACProfileDir, changedIPacProfile, settingsFile, IdleVolPath, IdleVolUse

		RLLog.Info(A_ThisFunc . " - Starting")
		settingsFile := A_ScriptDir . "\Lib\3rdPartyToolsPaths.ini"
		RLLog.Debug("3rdPartyTools - Ini file location " . settingsFile, 5)
		RLLog.Debug("WinIPAC - Start IPac System Profile Test")
		WinIPACPath := IniReadCheck(settingsFile, "WinIPAC", "WinIPACPath",A_ScriptDir . "\WinIPAC\WinIPAC.exe",,1)
		WinIPACProfileDir := IniReadCheck(settingsFile, "WinIPAC", "WinIPACProfileDir",A_ScriptDir . "\IPACProfiles",,1)

		If !(FileExist(WinIPACPath)) {
			RLLog.Debug("WinIPAC - The file WinIPAC.exe does not exist at " . WinIPACPath . ". Please check your paths!",3)
		} else {
			If !(FileExist(WinIPACProfileDir . "\" . "default.ipc")){
				RLLog.Debug("WinIPAC - IPac required Default Profile not found at " . WinIPACProfileDir . "\" . "default.ipc",5)
				Return
			} else {
				RLLog.Debug("WinIPAC - Default profile found: " . WinIPACProfileDir . "\" . "default.ipc",5)
				changedIPacProfile := this.LoadIPacProfile()
			}
		}

		RLLog.Debug("WinIPAC - Stop IPac System Profile Test")
		RLLog.Debug("IdleVolAdjust - Start IdleVolAdjust Section")

		IdleVolPath := IniReadCheck(settingsFile, "IdleVolAdjust", "IdleVolPath",A_ScriptDir . "\IdleVolumeAdjuster.exe",,1)
		IdleVolUse := IniReadCheck(settingsFile, "IdleVolAdjust", "IdleVolUse","No",,1)
		IdleVolSystems := IniReadCheck(settingsFile, "IdleVolAdjust", "IdleVolSystems","",,1)

		If !(FileExist(IdleVolPath)) {
			RLLog.Debug("IdleVolAdjust - Exe NOT located at " . IdleVolPath . ". Please check your paths", 5)
			IdleVolUse := "No"
		} else {
			IfInString, IdleVolSystems, %systemName%
			{
				RLLog.Debug("IdleVolAdjust - " . systemName . " System found in IdleVolSystems list", 5)
				If (IdleVolUse = "Yes") {
					RLLog.Debug("IdleVolAdjust - Running IdleVolumeAdjuster pause with """ . IdleVolPath . " pause""", 5)
					Run, % IdleVolPath . " pause",,UseErrorLevel,OutputVarPID
				} else If (IdleVolUse = "Kill") {
					RLLog.Debug("IdleVolAdjust - Running IdleVolumeAdjuster Kill with """ . IdleVolPath . " Kill""", 5)
					RLLog.Debug("IdleVolAdjust - Trying to detect if program is running.",5)
					Process, Exist, IdleVolumeAdjuster.exe
					IdleVolPID = %ErrorLevel%
					RLLog.Debug("IdleVolAdjust - IdleVolPID = " . IdleVolPID,5)
					If IdleVolPID = 0
					{
						RLLog.Debug("IdleVolAdjust - Process does not exist. Not stopping the process and it will not be restarted.", 5)
						IdleVolUse := "No"
					} else {
						RLLog.Debug("IdleVolAdjust - Attempting to stop Idle Volume Adjuster with a PID of " . IdleVolPID,5)
						Process, Close, %IdleVolPID%
						CloseIdleVolPID = %ErrorLevel%
						RLLog.Debug("IdleVolAdjust - Close process ErrorLevel - " . CloseIdleVolPID,5)
						If (IdleVolPID = CloseIdleVolPID)
						{
							RLLog.Debug("IdleVolAdjust - Process closed OK.",5)
						} else {
							RLLog.Debug("IdleVolAdjust - Process not closed. Will not restart.",5)
							IdleVolUse := "No"
						}
					}
				}
			} else {
				RLLog.Debug("IdleVolAdjust - " . systemName . " System Not found in IdleVolSystems list :" . IdleVolSystems, 5)
				IdleVolUse := "No"
			}
		}
		RLLog.Debug("IdleVolAdjust - Stop IdleVolAdjust Section")
		RLLog.Info(A_ThisFunc . " - Ending")
	}

	LoadIPacProfile(){
		Global systemName, romName, WinIPACPath, WinIPACProfileDir
		IPacPath1 := WinIPACProfileDir . "\" . systemName . "\" . romName . ".ipc"
		IPacPath2 := WinIPACProfileDir . "\" . systemName . ".ipc"
		Loop, 2 {
			If FileExist(IPacPath%a_index%) {
				RLLog.Debug("WinIPAC - Loading IPAC profile: " . IPacPath%a_index%, 5)
				Run, % WinIPACPath . " " . IPacPath%a_index%,,UseErrorLevel,OutputVarPID
				Process, WaitClose, %OutputVarPID%, 5
				IPacPID = ErrorLevel
				RLLog.Debug("WinIPAC - WinIPAC PID: " . OutputVarPID . " Error Level: " . ErrorLevel, 5)
				;11:55:54 AM | Title/Class: WinIPAC - Downloading ahk_class ThunderRT6FormDC is now active
				If (ErrorLevel > 0){
					ScriptError("Your IPac failed to program. Make sure the IPac is connected and try again. You may need to reboot your computer and try again.")
				} else {
					RLLog.Debug("WinIPAC - IPAC profile was loaded.",5)
					Return true
				}
			} else {
				RLLog.Debug("WinIPAC - IPac profile " . IPacPath%a_index% . " not found.",5)
			}
		}
	}

	; Use this function to define any code you may need to stop or clean up in every module on exit
	StopUserFeatures(){
		Global WinIPACPath, WinIPACProfileDir, changedIPacProfile, IdleVolPath, IdleVolUse, bezelEnabled

		RLLog.Info(A_ThisFunc . " - Starting")
		RLLog.Debug("WinIPAC - Start IPac Profile Restore")
		If (changedIPacProfile){
			RunWait, % WinIPACPath . " " . WinIPACProfileDir . "\" . "default.ipc",,UseErrorLevel,OutputVarPID
			If (ErrorLevel > 0){
				ScriptError("Your IPac failed to restore. Your default IPac profile was not programmed.")
			} else {
				RLLog.Debug("WinIPAC - Default IPac profile has been restored.",5)
				Return
			}
		} else {
			RLLog.Debug("WinIPAC - Alternative IPac profile not used. No need to restore.")
		}
		RLLog.Debug("WinIPAC - Stop IPac Profile Restore")

		RLLog.Debug("IdleVolAdjust - Start IdleVolAdjust resume section")
		If (IdleVolUse = "Yes") {
			RLLog.Debug("IdleVolAdjust - Running IdleVolumeAdjuster resume with """ . IdleVolPath . " resume""", 5)
			Run, % IdleVolPath . " resume",,UseErrorLevel,OutputVarPID
		} else If (IdleVolUse = "Kill") {
			RLLog.Debug("IdleVolAdjust - Running IdleVolumeAdjuster restart from Kill with """ . IdleVolPath . """", 5)
			Run, % IdleVolPath,,UseErrorLevel,OutputVarPID
		} else {
			RLLog.Debug("IdleVolAdjust - Not adjusting volume. IdleVolUse set to: " . IdleVolUse, 5)
		}

		RLLog.Debug("IdleVolAdjust - Stop IdleVolAdjust resume section")

		;Restrict Cursor Movement disabled
		If bezelEnabled
			this.ClipCursor( False )

		RLLog.Info(A_ThisFunc . " - Ending")
	}

	; This function gets ran right after FadeInExit(), after the emulator is loaded
	PostLoad(){
		Global RLLog,dbName,systemName,bezelScreenX,bezelScreenY, bezelScreenWidth,bezelScreenHeight,bezelEnabled
		RLLog.Info(A_ThisFunc . " - Starting")

		;Restrict Cursor Movement
		If (bezelEnabled = "true"){
			this.ClipCursor( True, (bezelScreenX + 6), (bezelScreenY + 6), (bezelScreenX + bezelScreenWidth - 6), (bezelScreenY + bezelScreenHeight - 6))
			RLLog.Info(A_ThisFunc . " - Restrict Cursor Movement from point " . bezelScreenX . "," . bezelScreenY . " in a " . bezelScreenWidth . "x" . bezelScreenHeight . " area.")
		}

		RLLog.Info(A_ThisFunc . " - Ending")
	}

	;Clip Cursor Function for bezel and lightgun games (not mame)
	ClipCursor( Confine=True, x1=0 , y1=0, x2=1, y2=1 ) {
		VarSetCapacity(R,16,0), NumPut(x1,&R+0),NumPut(y1,&R+4),NumPut(x2,&R+8),Nu mPut(y2,&R+12)
		Return Confine ? DllCall( "ClipCursor", UInt,&R ) : DllCall( "ClipCursor" )
	}

}
 

Ninja2bseen

Member
RL Member
Thanks again. I tested all my systems and they all work after the update. The only thing I noticed is my isos do not unmount. I can launch a pc game but not a second one until I manually unmount. Same story goes for sega Saturn that uses scsi. Basically it will just keep playing the same game from the wheel since the game still wasn't unmount. Is there a user function that can unmount after each game? Or eject the drive after the game closes?
 
Last edited:

brolly

Administrator
Developer
That has nothing to do with user functions so please open a new thread detailing your problem.
 

pacooka

New member
RL Member
Demulshooter not running after the RL update, can someone please take a look at my new Global.ahk:
Code:
class GlobalUserFunction extends UserFunction {
	; Use this function to define any code you want to run in every module on start
	StartGlobalUserFeatures(){
		Log("StartGlobalUserFeatures - Starting")
		Global systemName, romName
		if ( (systemName="Sega Naomi" or "Sammy Atomiswave" ) and (romName="lupinsho" or romName="confmiss" or romName="sprtshot" or romName="hotd2" or romName="deathcox" or romName="mok" or romName="hotd2" or romName="ninjaslt" or romName="rangrmsn" or romName="xtrmhnt2" or romName="xtrmhunt") )
		Run("DemulShooter.exe -v -target=demul058 -rom=" . romName . " -noresize", "D:\EMULATORs\DemulShooter") 
		else if ( (systemName="Sega Model 2") and (romName="hotd" or romName="vcop" or romName="vcopa" or romName="bel" or romName="gunblade" or romName="rchase2" or romName="vcop2" ) )
		Run("DemulShooter.exe -v -target=model2m -rom=" . romName . " -noresize", "D:\EMULATORs\DemulShooter")
	Log("StartGlobalUserFeatures - Ending")
	}
}
 

reddye5

New member
RL Member
Hey Guys,

Having some trouble converting and old User Function.ahk used back in Hyperlaunch to a system specific MAME.ahk for use in Rocketlauncher. This script is to set monitor rotation based on MAME game orientation listing and then returning monitor to landscape orientation, if need be, on exit of Mame. Got some help from a few kind souls already. Thank you. But, I'm still having a bit of trouble. I'm a relative newbie to AHK. Here is my updated script:

Code:
class GlobalUserFunction extends UserFunction {

; Use this function to define any code you want to run in every module on start
StartUserFeatures() {
Global RLLog
RLLog.Info(A_ThisFunc . " - Starting")

ListMameTable := []
ListMameTable := ListXMLInfo%zz%(romName)
RotationAngle := ListMameTable[2]

Global RLLog,dbName, romName, systemName

If (romName == "punchout")
{
Log("RotateFunctions - Override Punchout")
Run, %emupath%\maestro -p, %emupath%\, hide
Log("RotateFunctions - Rotating Portrait")
}
Else If (RotationAngle != "0")
{
Run, %emupath%\maestro -p, %emupath%\, hide
Log("RotateFunctions - Rotating Portrait")
} Else {
Run, %emupath%\maestro -l, %emupath%\, hide
Log("RotateFunctions - Rotating Landscape")
}
RLLog.Info(A_ThisFunc . " - Ending")
}

; Use this function to define any code you may need to stop or clean up in every module on exit
StopUserFeatures() {
Global RLLog,dbName,systemName
RLLog.Info(A_ThisFunc . " - Starting")

Run, %emupath%\maestro -l, %emupath%\, hide
Log("RotateFunctions - Rotating Landscape")
}
RLLog.Info(A_ThisFunc . " - Ending")
}
Any help is truly appreciated.
 
Last edited:

brolly

Administrator
Developer
You didn't follow my instructions at all :p

This should do it:

Code:
class SystemUserFunction extends UserFunction {

; Use this function to define any code you want to run in every module on start
StartUserFeatures() {
Global RLLog, romName, emupath, ListXMLInfo

RLLog.Info(A_ThisFunc . " - Starting")

ListMameTable := []
ListMameTable := ListXMLInfo%zz%(romName)
RotationAngle := ListMameTable[2]

If (romName == "punchout")
{
RLLog.Info("RotateFunctions - Override Punchout")
Run, %emupath%\maestro -p, %emupath%\, hide
RLLog.Info("RotateFunctions - Rotating Portrait")
}
Else If (RotationAngle != "0")
{
Run, %emupath%\maestro -p, %emupath%\, hide
RLLog.Info("RotateFunctions - Rotating Portrait")
} Else {
Run, %emupath%\maestro -l, %emupath%\, hide
RLLog.Info("RotateFunctions - Rotating Landscape")
}
RLLog.Info(A_ThisFunc . " - Ending")
}

; Use this function to define any code you may need to stop or clean up in every module on exit
StopUserFeatures() {
Global RLLog, emupath
RLLog.Info(A_ThisFunc . " - Starting")

Run, %emupath%\maestro -l, %emupath%\, hide
RLLog.Info("RotateFunctions - Rotating Landscape")
}
RLLog.Info(A_ThisFunc . " - Ending")
}

Make sure you are putting this file in the correct folder.
 
Last edited:
Top