ARCADE FOREVER

[Proyecto] AdvMenu+, Modificando el codigo fuente del Advmenu

« Older   Newer »
  Share  
VeS
view post Posted on 1/8/2012, 12:15 by: VeS     +1   -1
Avatar

V.I.P.

Group:
Usuarios AFFA
Posts:
526
Reputation:
+10

Status:


Hola, daesdae no he podido publicar el diff antes ya que se me jodio el portatil, tampoco he podido limpiar el codigo como quiero, pero esta totalmente funciona.
Veras que se puede eliminar/clasificar por:

Mechanical: practicamente estan todos excluidos, porque estan en la seccion de NoWorking/preliminar, pero para el futuro ya los tenemos, o si simplemente se quiere poner algun juego que esten en preliminar.

Mahjongs: se eliminan sin problemas todos ellos, ya que en el xml estan identificados por el tipo de control como mahjong.

Beatmania: se eliminan pero tambien eliminan otros, ya que el filtrado que use fue por el tipo de control dial, pensaba que era solo para esos juegos pero hay algunos mas que se eliminan.

Maze/Quiz/Mature etc.. para cuando tenga tiempo y sepa si estan identificados en el xml como tales, si no lo estan los incluire en el codigo para el futuro.

Nota: Pensaba que los juegos de cartas tipo poker etc.., los de pinball y alguno mas (me he quedado en blanco) no son mechanical, porque son juegos de video/placa jama, y los mechanical son los pinball , dianas , maquinas tragaperras REALES (anda ya me he acordado tragaperras jeje), se tendra que buscar al forma de clasificarlos si el xml lo tiene clasificado , porque a mi estos juegos no me molan nada, claro y ahora me direis pues borralos con romfilter etc.., ya pero no , porque el hd que uso para la arcade ,me gusta tener completo el romset , para tener compia de seguridad que son muchos gigas, por eso prefiero filtrar en advmenu, si si tambien se podrian sacar de esa carpeta y ponerlos a parte, pero nono me fio mucho de los filtrados de las aplicaciones esas , y tambien que soy asi de capullin.....


Y aqui el diff.

CODE
diff -Nru advmenuplusDaesdae//advance/menu/emulator.cc advmenuplus23//advance/menu/emulator.cc
--- advmenuplusDaesdae//advance/menu/emulator.cc        2009-01-10 13:04:07.000000000 +0100
+++ advmenuplus23//advance/menu/emulator.cc        2012-07-28 21:17:37.883198749 +0200
@@ -974,6 +974,10 @@
        exclude_neogeo_orig = include;
        exclude_deco_orig = exclude;
        exclude_playchoice_orig = exclude;
+        exclude_mechanical_orig = exclude;//ves
+        exclude_mahjong_orig = exclude;//ves
+        exclude_beatmania_orig = exclude;//ves
+        
}

int mame_mame::attrib_run(int x, int y)
@@ -988,6 +992,9 @@
        ch.insert(ch.end(), choice("Neogeo", exclude_neogeo_effective, 0));
        ch.insert(ch.end(), choice("Cassette", exclude_deco_effective, 0));
        ch.insert(ch.end(), choice("PlayChoice-10", exclude_playchoice_effective, 0));
+        ch.insert(ch.end(), choice("Mechanical", exclude_mechanical_effective, 0));//ves
+        ch.insert(ch.end(), choice("Mahjongs", exclude_mahjong_effective, 0));//ves
+        ch.insert(ch.end(), choice("Beatmania", exclude_beatmania_effective, 0));//ves

        choice_bag::iterator i = ch.begin();

@@ -1002,6 +1009,11 @@
                exclude_neogeo_effective = ch[5].tristate_get();
                exclude_deco_effective = ch[6].tristate_get();
                exclude_playchoice_effective = ch[7].tristate_get();
+                exclude_mechanical_effective = ch[8].tristate_get();//ves
+                exclude_mahjong_effective = ch[9].tristate_get();//ves
+                exclude_beatmania_effective = ch[10].tristate_get();//ves
+
+
        }

        return key;
@@ -1014,6 +1026,10 @@
        exclude_neogeo_effective = exclude_neogeo_orig;
        exclude_deco_effective = exclude_deco_orig;
        exclude_playchoice_effective = exclude_playchoice_orig;
+        exclude_mechanical_effective = exclude_mechanical_orig;//ves
+        exclude_mahjong_effective = exclude_mahjong_orig;//ves
+        exclude_beatmania_effective = exclude_beatmania_orig;//ves
+
}

void mame_mame::attrib_save()
@@ -1023,6 +1039,10 @@
        exclude_neogeo_orig = exclude_neogeo_effective;
        exclude_deco_orig = exclude_deco_effective;
        exclude_playchoice_orig = exclude_playchoice_effective;
+        exclude_mechanical_orig = exclude_mechanical_effective;//ves
+        exclude_mahjong_orig = exclude_mahjong_effective;//ves
+        exclude_beatmania_orig = exclude_beatmania_effective;//ves
+
}

bool mame_mame::attrib_set(const std::string& value0, const std::string& value1)
@@ -1039,6 +1059,15 @@
        } else if (value0 == "playchoice") {
                if (!tristate(exclude_playchoice_orig, value1))
                        return false;
+        } else if (value0 == "mechanical") {//ves
+                if (!tristate(exclude_mechanical_orig, value1))
+                        return false;//ves
+        } else if (value0 == "mahjong") {//ves
+                if (!tristate(exclude_mahjong_orig, value1))
+                        return false;//ves
+        } else if (value0 == "beatmania") {//ves
+                if (!tristate(exclude_beatmania_orig, value1))
+                        return false;//ves
        } else {
                return false;
        }
@@ -1052,6 +1081,10 @@
        conf_string_set(config_context, section, tag, attrib_compile("neogeo", tristate(exclude_neogeo_orig)).c_str());
        conf_string_set(config_context, section, tag, attrib_compile("deco", tristate(exclude_deco_orig)).c_str());
        conf_string_set(config_context, section, tag, attrib_compile("playchoice", tristate(exclude_playchoice_orig)).c_str());
+        conf_string_set(config_context, section, tag, attrib_compile("mechanical", tristate(exclude_mechanical_orig)).c_str());//ves
+        conf_string_set(config_context, section, tag, attrib_compile("mahjong", tristate(exclude_mahjong_orig)).c_str());//ves
+        conf_string_set(config_context, section, tag, attrib_compile("beatmania", tristate(exclude_beatmania_orig)).c_str());//ves
+
}

bool mame_mame::filter(const game& g) const
@@ -1071,6 +1104,18 @@
                return false;
        if (exclude_playchoice_effective == exclude_not && !g.flag_get(flag_derived_playchoice))
                return false;
+        if (exclude_mechanical_effective == exclude && g.flag_get(flag_derived_mechanical))//ves
+                return false;
+        if (exclude_mechanical_effective == exclude_not && !g.flag_get(flag_derived_mechanical))
+                return false;//ves
+        if (exclude_mahjong_effective == exclude && g.flag_get(flag_derived_mahjong))//ves
+                return false;
+        if (exclude_mahjong_effective == exclude_not && !g.flag_get(flag_derived_mahjong))
+                return false;//ves
+        if (exclude_beatmania_effective == exclude && g.flag_get(flag_derived_beatmania))//ves
+                return false;
+        if (exclude_beatmania_effective == exclude_not && !g.flag_get(flag_derived_beatmania))
+                return false;//ves

        return true;
}
@@ -1083,6 +1128,7 @@
        g.flag_set(gar.is_game_tag(bios.name_get(), "neogeo"), flag_derived_neogeo);
        g.flag_set(gar.is_game_tag(bios.name_get(), "decocass"), flag_derived_deco);
        g.flag_set(gar.is_game_tag(bios.name_get(), "playch10"), flag_derived_playchoice);
+
}

bool mame_mame::load_data(const game_set& gar)
diff -Nru advmenuplusDaesdae//advance/menu/emulator.h advmenuplus23//advance/menu/emulator.h
--- advmenuplusDaesdae//advance/menu/emulator.h        2012-07-16 19:42:39.000000000 +0200
+++ advmenuplus23//advance/menu/emulator.h        2012-07-28 21:13:32.905983966 +0200
@@ -164,6 +164,9 @@
        static const unsigned flag_derived_neogeo = game::flag_user << 4;
        static const unsigned flag_derived_deco = game::flag_user << 5;
        static const unsigned flag_derived_playchoice = game::flag_user << 6;
+        static const unsigned flag_derived_mechanical = game::flag_user << 7;//ves
+        static const unsigned flag_derived_mahjong = game::flag_user << 8;//ves
+        static const unsigned flag_derived_beatmania = game::flag_user << 9;//ves

        virtual int attrib_run(int x, int y) = 0;
        virtual void attrib_load();
@@ -397,6 +400,12 @@
        tristate_t exclude_deco_orig;
        tristate_t exclude_playchoice_effective;
        tristate_t exclude_playchoice_orig;
+        tristate_t exclude_mechanical_effective;//ves
+        tristate_t exclude_mechanical_orig;//ves
+        tristate_t exclude_mahjong_effective;//ves
+        tristate_t exclude_mahjong_orig;//ves
+        tristate_t exclude_beatmania_effective;//ves
+        tristate_t exclude_beatmania_orig;//ves
        bool support_difficulty;
        bool support_attenuation;
public:
diff -Nru advmenuplusDaesdae//advance/menu/emuxml.cc advmenuplus23//advance/menu/emuxml.cc
--- advmenuplusDaesdae//advance/menu/emuxml.cc        2009-01-10 13:04:07.000000000 +0100
+++ advmenuplus23//advance/menu/emuxml.cc        2012-07-28 21:47:24.204056636 +0200
@@ -135,6 +135,7 @@
                        return;
                }
                state->g->name_set(state->e->user_name_get() + "/" + string(s, len));
+                
        }
}

@@ -190,6 +191,7 @@
                        return;
                }
                state->g->romof_set(state->e->user_name_get() + "/" + string(s, len));
+                                
        }
}

@@ -297,10 +299,52 @@
                        return;
                }
                string v = string(s, len);
-                state->g->flag_set(v == "vertical", emulator::flag_derived_vertical);
+                state->g->flag_set(v == "90"|| v == "270", emulator::flag_derived_vertical);//ves
        }
}

+static void process_mechanical(struct state_t* state, enum token_t t, const char* s, unsigned len, const char** attributes)//ves
+{
+        if (t == token_data) {
+                if (!state->g) {
+                        process_error(state, 0, "invalid state");
+                        return;
+                }
+                string v = string(s, len);
+                if (v == "yes"){
+                state->g->flag_set(v == "yes", emulator::flag_derived_mechanical);//ves
+                } else if (v == "mahjong") {
+                state->g->flag_set(v == "mahjong", emulator::flag_derived_mahjong);//ves
+                } else if (v == "dial") {
+                state->g->flag_set(v == "dial", emulator::flag_derived_beatmania);//ves*/
+                }
+        }
+}//ves
+
+static void process_mahjong(struct state_t* state, enum token_t t, const char* s, unsigned len, const char** attributes)//ves
+{
+        if (t == token_data) {
+                if (!state->g) {
+                        process_error(state, 0, "invalid state");
+                        return;
+                }
+                string v = string(s, len);
+                state->g->flag_set(v == "mahjong", emulator::flag_derived_mahjong);//ves
+        }
+}//ves
+
+static void process_beatmania(struct state_t* state, enum token_t t, const char* s, unsigned len, const char** attributes)//ves
+{
+        if (t == token_data) {
+                if (!state->g) {
+                        process_error(state, 0, "invalid state");
+                        return;
+                }
+                string v = string(s, len);
+                state->g->flag_set(v == "dial", emulator::flag_derived_beatmania);//ves
+        }
+}//ves
+
static void process_videowidth(struct state_t* state, enum token_t t, const char* s, unsigned len, const char** attributes)
{
        if (t == token_data) {
@@ -378,6 +422,7 @@
        { 2, { match_mamemessraine, match_gamemachine, "romof", 0, 0 }, process_romof },
        { 2, { match_mamemessraine, match_gamemachine, "rom", 0, 0 }, process_rom },
        { 2, { match_mamemessraine, match_gamemachine, "device", 0, 0 }, process_device },
+        { 2, { match_mamemessraine, match_gamemachine, "ismechanical", 0, 0 }, process_mechanical },//ves
        { 0, { 0, 0, 0, 0, 0 }, 0 }
};

@@ -386,17 +431,18 @@
        { 3, { match_mamemessraine, match_gamemachine, "rom", "size", 0 }, process_romsize },
        { 3, { match_mamemessraine, match_gamemachine, "device", "name", 0 }, process_devicename },
        { 3, { match_mamemessraine, match_gamemachine, "driver", "status", 0 }, process_driverstatus },
-        { 3, { match_mamemessraine, match_gamemachine, "video", "screen", 0 }, process_videoscreen },
-        { 3, { match_mamemessraine, match_gamemachine, "video", "orientation", 0 }, process_videoorientation },
-        { 3, { match_mamemessraine, match_gamemachine, "video", "width", 0 }, process_videowidth },
-        { 3, { match_mamemessraine, match_gamemachine, "video", "height", 0 }, process_videoheight },
-        { 3, { match_mamemessraine, match_gamemachine, "video", "aspectx", 0 }, process_videoaspectx },
-        { 3, { match_mamemessraine, match_gamemachine, "video", "aspecty", 0 }, process_videoaspecty },
+        { 3, { match_mamemessraine, match_gamemachine, "display", "type", 0 }, process_videoscreen },//ves
+    { 3, { match_mamemessraine, match_gamemachine, "display", "rotate", 0 }, process_videoorientation },//ves
+    { 3, { match_mamemessraine, match_gamemachine, "display", "width", 0 }, process_videowidth },//ves
+    { 3, { match_mamemessraine, match_gamemachine, "display", "height", 0 }, process_videoheight },//ves
+    { 3, { match_mamemessraine, match_gamemachine, "display", "aspectx", 0 }, process_videoaspectx },//ves
+    { 3, { match_mamemessraine, match_gamemachine, "display", "aspecty", 0 }, process_videoaspecty },//ves
        { 0, { 0, 0, 0, 0, 0 }, 0 }
};

static struct conversion_t CONV4[] = {
        { 4, { match_mamemessraine, match_gamemachine, "device", "extension", "name" }, process_deviceextensionname },
+        { 4, { match_mamemessraine, match_gamemachine, "input", "control", "type" }, process_mechanical },
        { 0, { 0, 0, 0, 0, 0 }, 0 }
};
 
Top
647 replies since 8/9/2009, 21:56   30307 views
  Share