Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier to upgrade: Rename VPMAlias.txt #434

Merged
merged 3 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/vpinmame.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,14 @@ jobs:
# curl -L https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-win64.zip -o upx.zip
# 7z e upx.zip -oupx
# rm upx.zip
- run: |
- name: Update buildnumber
run: |
perl -i -pe"s/0/${{ needs.version.outputs.revision }}/g" src/git_version.h
perl -i -pe"s/unknown/${{ needs.version.outputs.sha7 }}/g" src/git_version.h
- name: Integrate VPMAlias.txt into Alias.cpp
run: |
output=$(awk -F, '!/^#/ {printf " { \"%s\", \"%s\" },\n", $1, $2}' release/VPMAlias.txt)
sed -i '/\/\*VPMALIAS\*\//r/dev/stdin' src/win32com/Alias.cpp <<< "$output"
- name: Build VPinMAME${{ matrix.artifact-suffix }}-${{ matrix.platform }}
run: |
cp cmake/vpinmame/CMakeLists_${{ matrix.platform }}.txt CMakeLists.txt
Expand All @@ -105,7 +110,7 @@ jobs:
cp release/license.txt tmp
cp release/pinmame.txt tmp
cp "release/visual pinmame.txt" tmp
cp release/VPMAlias.txt tmp
cp release/VPMAlias.txt tmp/VPMAlias_template.txt
cp release/whatsnew.txt tmp
cp release/whatsnewVPM.txt tmp
- uses: actions/upload-artifact@v4
Expand Down
163 changes: 102 additions & 61 deletions release/VPMAlias.txt
Original file line number Diff line number Diff line change
@@ -1,80 +1,121 @@
rs_lx2p3,rs_pa2
nf_10,nf_10f
# These are all the aliases pre-defined in the VPinMame executable.
# You do not need to add them to your local version (unless you want to override something).
acdcluci,acd_170hc
rockyle,ali
thething,ali
star_tours,alpok_f6
LogansRun,Arena
blkou_hf,blkou_l1
bnzai_p1,bnzai_pa
goldfinger,bond
batmn,btmn_101
bttf,bttf_a20
cc_13D,cc_13
chkpnt,ckpt_a17
congo_11s10,congo_20s10k
sc_18,sc_18s11
sc_18n,sc_18n11
ratfink,startreb
missworld,kissc
blaze,csmic_l1
elektraapredator,elektraa
elvisjt,elvis
grease,elvis
greasem,elvis
eshak_l1,esha_la1
eshak_l3,esha_la3
eshak_f1,esha_pr4
freefallp,freefall
geniecbbb,genie
gnr,gnr_300
godzillabwpup,godzilla
gs_l3,gs_la3
gs_l4,gs_lu4
FF,gw_l5
harley,harl_a10
penthouse,hglbtrtb
blkou_hf,blkou_l1
christmasp,playboy
Onward,skatebll
tftc_400c,tftc_400
Encanto,ngndshkr
nfl_sea,nfl
nfl_san,nfl
safeaus,HighHand_1973
hook,hook_408
Raya,hothand
beetljui,ironmaid
jplstwld,jplstw22
jurpark,jupk_513
missworld,kissc
kpv106,kpb105
lah,lah_112
lostwrld_gunship,lostwrld
lw3,lw3_208
lwar,lwar_a83
maverick,mav_401
mnfb,mnfb_c27
tennmnfb_c27,mnfb_c27
deathproof,mousn_l4
mousn_lx,mousn_l4
mtl_180hcm,mtl_180hc
nf_10,nf_10f
nfl_ari,nfl
nfl_atl,nfl
nfl_bal,nfl
nfl_buf,nfl
nfl_car,nfl
nfl_chi,nfl
nfl_cin,nfl
nfl_buf,nfl
nfl_den,nfl
nfl_cle,nfl
nfl_tam,nfl
nfl_ari,nfl
nfl_lac,nfl
nfl_kan,nfl
nfl_ind,nfl
nfl_dal,nfl
nfl_mia,nfl
nfl_phi,nfl
nfl_atl,nfl
nfl_nyg,nfl
nfl_jac,nfl
nfl_nyj,nfl
nfl_den,nfl
nfl_det,nfl
nfl_gre,nfl
nfl_car,nfl
nfl_rai,nfl
nfl_hou,nfl
nfl_ind,nfl
nfl_jac,nfl
nfl_kan,nfl
nfl_lac,nfl
nfl_lar,nfl
nfl_bal,nfl
nfl_was,nfl
nfl_mia,nfl
nfl_min,nfl
nfl_nyg,nfl
nfl_nyj,nfl
nfl_pat,nfl
nfl_sai,nfl
nfl_phi,nfl
nfl_pit,nfl
nfl_hou,nfl
nfl_rai,nfl
nfl_sai,nfl
nfl_san,nfl
nfl_sea,nfl
nfl_tam,nfl
nfl_ten,nfl
nfl_min,nfl
cc_13D,cc_13
blaze,csmic_l1
FF,gw_l5
Raya,hothand
nfl_was,nfl
Encanto,ngndshkr
incredibles,panther7
play,play_a24
christmasp,playboy
sexygirl,playboyb
playboystentacle,playboys
poto,poto_a32
rab,rab_130
robo,robo_a34
ffdp,rock
tennmnfb_c27,mnfb_c27
elektraapredator,elektraa
thething,ali
rs_lx2p3,rs_pa2
sc_18n,sc_18n11
sc_18,sc_18s11
Class1984,seawitch
simp,simp_a27
LABYRINTH,skatebll
freefallp,freefall
beetljui,ironmaid
stestc,stest
Onward,skatebll
southpk,sprk_103
ssvc,ssvc_a26
ratfink,startreb
startreb4,startreb
stestc,stest
stwarde,stwr_103
swrds_l2FO,swrds_l2
swtril,swtril43
T1D_123_riccione,T1D_123
deathproof,mousn_l4
tftc,tftc_303
tftc_400c,tftc_400
tmach,tmac_a24
tmnt,tmnt_104
tommy,tomy_400
torpe,torp_e21
trek,trek_201
truckstp,trucksp2
twd_156ld,twd_156h
sexygirl,playboyb
elvisjt,elvis
greasem,elvis
grease,elvis
acdcluci,acd_170hc
LogansRun,Arena
madmax,twst_405
rockyle,ali
safeaus,HighHand_1973
Class1984,seawitch
geniecbbb,genie
godzillabwpup,godzilla
lostwrld_gunship,lostwrld
incredibles,panther7
goldfinger,bond
mtl_180hcm,mtl_180hc
star_tours,alpok_f6
swrds_l2FO,swrds_l2
twister,twst_405
wwfrumb,wwfr_103
2 changes: 0 additions & 2 deletions release/whatsnew.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ What's new in PinMAME:
Version 3.7 (XX XXth, 2025) - ""
------------------------------------------------------------------------------

Add windows COM method PMBuildVersion returning 30700.4711 with build number as decimal.

*** ROM SUPPORT *** Thanks to Tom Collins
Clones:
Victory (1.1 multiplayer MOD), (1.2 multiplayer MOD)
Expand Down
7 changes: 7 additions & 0 deletions release/whatsnewVPM.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ What's new in Visual PinMAME:

Version 3.7 (XX XXth, 2025) - ""
------------------------------------------------------------------------------
- Easier to upgrade: There is a file called VPMAlias_template.txt which contains all builtin (compiled in) aliases. There is no VPMAlias.txt contained in the installation anymore.
VPMAlias.txt now only need your personal entries: If you create a VPMAlias.txt file in the VPinMAME folder, it will alias an input rom name to the specified (real) rom.
Format example:
mytallica,mtl_180hc
myacdc,acd_170hc
This can be used to allow to use different PUP or DOF profiles per game (for reskins and such).

Version 3.6 (January 29th, 2025) - "Sounds good III / Looks good"
------------------------------------------------------------------------------
Expand Down Expand Up @@ -47,6 +53,7 @@ Version 3.3 (December 24th, 2020) - "20 years already?"
mytallica,mtl_180hc
myacdc,acd_170hc
This can be used to allow to use different PUP or DOF profiles per game (for reskins and such).
There is a file called VPMAlias_template.txt which contains all builtin aliases. (from Version 3.7)

- Fix the additional .raw/non-averaged file output dumping of GTS3 DMDs

Expand Down
47 changes: 7 additions & 40 deletions src/win32com/Alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,46 +22,8 @@ extern "C" {
#include "Alias.h"

static const struct tAliasTable { const char* alias; const char* real; } aliasTable[] = {
{ "eshak_f1", "esha_pr4" },
{ "eshak_l1", "esha_la1" },
{ "eshak_l3", "esha_la3" },
{ "lwar", "lwar_a83" },
{ "ssvc", "ssvc_a26" },
{ "torpe", "torp_e21" },
{ "tmach", "tmac_a24" },
{ "play", "play_a24" },
{ "maverick", "mav_401" },
{ "mnfb", "mnfb_c27" },
{ "robo", "robo_a34" },
{ "poto", "poto_a32" },
{ "bttf", "bttf_a20" },
{ "simp", "simp_a27" },
{ "chkpnt", "ckpt_a17" },
{ "tmnt", "tmnt_104" },
{ "batmn", "btmn_101" },
{ "trek", "trek_201" },
{ "hook", "hook_408" },
{ "lw3", "lw3_208" },
{ "stwarde", "stwr_103" },
{ "rab", "rab_130" },
{ "jurpark", "jupk_513" },
{ "lah", "lah_112" },
{ "tftc", "tftc_303" },
{ "tommy", "tomy_400" },
{ "wwfrumb", "wwfr_103" },
{ "gnr", "gnr_300" },
{ "twister", "twst_405" },
{ "southpk", "sprk_103" },
{ "truckstp", "trucksp2" },
{ "harley", "harl_a10" },
{ "swtril", "swtril43" },
{ "jplstwld", "jplstw22" },
{ "bnzai_p1", "bnzai_pa" },
{ "gs_l4", "gs_lu4" },
{ "gs_l3", "gs_la3" },
{ "kpv106", "kpb105" },
{ "mousn_lx", "mousn_l4" },
{ NULL, NULL }
/*VPMALIAS*/
{ NULL, NULL }
};

static char alias_from_file[50];
Expand Down Expand Up @@ -91,7 +53,12 @@ const char* checkGameAlias(const char* aRomName) {
char line[128];
while (fgets(line, sizeof(line), f) != NULL)
{
// Skip lines that start with "#"
if (line[0] == '#') {
continue;
}
char *token = strtok(line, ", ");

if (_stricmp(token, aRomName) == 0)
{
strcpy_s(alias_from_file, sizeof(alias_from_file), strtok(NULL, " ,\n#;'"));
Expand Down