Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

haynor666

Premium Members
  • Content Count

    144
  • Joined

  • Last visited

  • Days Won

    4

haynor666 last won the day on July 19

haynor666 had the most liked content!

Community Reputation

6 Neutral

About haynor666

  • Rank
    Proud Fan
  • Birthday 01/07/1979

Profile Information

  • Gender
    Male
  • Location
    Tarnobrzeg, Poland

Recent Profile Visitors

325 profile views
  1. haynor666

    ARCADE 0.215

    Missing in arcade215s.rar is change in src/devices/machine/idehd.cpp which is now actually src\devices\bus\ata\idehd.cpp File in store1 repository is ok.
  2. haynor666

    ARCADE 0.213

    Thanks Robert. I'll take a look at source when I will find some free time. Strangely so far official 213 was not released.
  3. haynor666

    ARCADE 0.212

    Neo-geo hack was to improve neo-geo original limitations/problems from start. It was not for fixing because we know that neo-geo emulation is very good and that limitation was correct. Sengoku was the only game that "suffers" a bit from this improvement that's why this check was added I think. Correct me MameSick if I'm wrong. Still it was nice to removed this limitation just like in plenty NES emulators are options to remove sprite limit. Maybe not accurate but was looking better and games were more playable this way. frame_delay option was not meant to be added to ARCADE or MAMEUI. I simply posted entire diff file without removing not needed stuff. But for gamers that need lagless play I think is very usefull option anyway.
  4. Read this - https://www.1emulation.com/forums/topic/36177-arcade-0212/ And use translator
  5. haynor666

    ARCADE 0.212

    Sengoku 2 title screen still has one bad line so maybe check that was in source is still needed. @@ -520,12 +521,9 @@ { int scanline = param; - /* we are at the beginning of a scanline - - we need to draw the previous scanline and parse the sprites on the current one */ - if (scanline != 0) - screen().update_partial(scanline - 1); - - parse_sprites(scanline); + /* we are at the beginning of a scanline */ + if (m_neogeo_raster_hack & 0x10) /* raster interrupt enabled */ + { + if (strcmp(machine().system().name, "sengoku2") == 0) + m_screen->update_partial(scanline - 1); + else + m_screen->update_partial(scanline + 1); + } /* let's come back at the beginning of the next line */ scanline = (scanline + 1) % NEOGEO_VTOTAL;
  6. haynor666

    MAME4RAGE2

    Are cpu/psx/ir.cpp and machine/idehd.cpp mods responsible for this fix? What about changes in vegas.cpp ?
  7. haynor666

    ARCADE 0.212

    Here is also new code for saving volume/overclocking. It has also frame_delay code but I'm sure it's easy to cut only interesting part. diff -Nru src/frontend/mame/ui/ui.cpp src/frontend/mame/ui/ui.cpp --- src/frontend/mame/ui/ui.cpp 2019-08-03 12:28:56.000000000 +0200 +++ src/frontend/mame/ui/ui.cpp 2019-08-05 11:16:09.000000000 +0200 @@ -31,6 +31,7 @@ #include "ui/viewgfx.h" #include "imagedev/cassette.h" #include "../osd/modules/lib/osdobj_common.h" +#include "config.h" /*************************************************************************** @@ -193,6 +194,9 @@ // request a callback upon exiting machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&mame_ui_manager::exit, this)); + // register callbacks + machine().configuration().config_register("sliders", config_load_delegate(&mame_ui_manager::config_load, this), config_save_delegate(&mame_ui_manager::config_save, this)); + // create mouse bitmap uint32_t *dst = &m_mouse_bitmap.pix32(0); memcpy(dst,mouse_bitmap,32*32*sizeof(uint32_t)); @@ -1348,6 +1352,9 @@ // add overall volume m_sliders.push_back(slider_alloc(SLIDER_ID_VOLUME, _("Master Volume"), -32, 0, 0, 1, nullptr)); + // add frame delay + m_sliders.push_back(slider_alloc(SLIDER_ID_FRAMEDELAY, _("Frame Delay"), 0, machine.options().frame_delay(), 9, 1, nullptr)); + // add per-channel volume mixer_input info; for (int item = 0; machine.sound().indexed_mixer_input(item, info); item++) @@ -1492,6 +1499,8 @@ } #endif + config_apply(); + std::vector<ui::menu_item> items; for (auto &slider : m_sliders) { @@ -1515,6 +1524,8 @@ { if (id == SLIDER_ID_VOLUME) return slider_volume(machine, arg, id, str, newval); + else if (id == SLIDER_ID_FRAMEDELAY) + return slider_framedelay(machine, arg, id, str, newval); else if (id >= SLIDER_ID_MIXERVOL && id <= SLIDER_ID_MIXERVOL_LAST) return slider_mixervol(machine, arg, id, str, newval); else if (id >= SLIDER_ID_ADJUSTER && id <= SLIDER_ID_ADJUSTER_LAST) @@ -1579,6 +1590,21 @@ //------------------------------------------------- +// slider_framedelay - global frame delay slider +// callback +//------------------------------------------------- + +int32_t mame_ui_manager::slider_framedelay(running_machine &machine, void *arg, int id, std::string *str, int32_t newval) +{ + if (newval != SLIDER_NOCHANGE) + machine.video().set_framedelay(newval); + if (str) + *str = string_format(_("%1$3d"), machine.video().framedelay()); + return machine.video().framedelay(); +} + + +//------------------------------------------------- // slider_mixervol - single channel volume // slider callback //------------------------------------------------- @@ -2195,3 +2221,83 @@ m_dipsw_color = options.dipsw_color(); m_slider_color = options.slider_color(); } + +//------------------------------------------------- +// config_load - read data from the +// configuration file +//------------------------------------------------- + +void mame_ui_manager::config_load(config_type cfg_type, util::xml::data_node const *parentnode) +{ + // we only care about game files + if (cfg_type != config_type::GAME) + return; + + // might not have any data + if (parentnode == nullptr) + return; + + // iterate over slider nodes + for (util::xml::data_node const *slider_node = parentnode->get_child("slider"); slider_node; slider_node = slider_node->get_next_sibling("slider")) + { + const char *desc = slider_node->get_attribute_string("desc", ""); + int32_t saved_val = slider_node->get_attribute_int("value", 0); + + // create a dummy slider to store the saved value + m_sliders_saved.push_back(slider_alloc(0, desc, 0, saved_val, 0, 0, 0)); + } +} + + +//------------------------------------------------- +// config_appy - apply data from the conf. file +// This currently needs to be done on a separate +// step because sliders are not created yet when +// configuration file is loaded +//------------------------------------------------- + +void mame_ui_manager::config_apply(void) +{ + // iterate over sliders and restore saved values + for (auto &slider : m_sliders) + { + for (auto &slider_saved : m_sliders_saved) + { + if (!strcmp(slider->description.c_str(), slider_saved->description.c_str())) + { + std::string tempstring; + slider->update(machine(), slider->arg, slider->id, &tempstring, slider_saved->defval); + break; + + } + } + } +} + + +//------------------------------------------------- +// config_save - save data to the configuration +// file +//------------------------------------------------- + +void mame_ui_manager::config_save(config_type cfg_type, util::xml::data_node *parentnode) +{ + // we only care about game files + if (cfg_type != config_type::GAME) + return; + + std::string tempstring; + util::xml::data_node *slider_node; + + // save UI sliders + for (auto &slider : m_sliders) + { + int32_t curval = slider->update(machine(), slider->arg, slider->id, &tempstring, SLIDER_NOCHANGE); + if (curval != slider->defval) + { + slider_node = parentnode->add_child("slider", nullptr); + slider_node->set_attribute("desc", slider->description.c_str()); + slider_node->set_attribute_int("value", curval); + } + } +} \ No newline at end of file diff -Nru src/frontend/mame/ui/ui.h src/frontend/mame/ui/ui.h --- src/frontend/mame/ui/ui.h 2019-08-03 12:28:56.000000000 +0200 +++ src/frontend/mame/ui/ui.h 2019-08-05 11:07:28.000000000 +0200 @@ -53,6 +53,7 @@ enum { SLIDER_ID_VOLUME = 0, + SLIDER_ID_FRAMEDELAY, SLIDER_ID_MIXERVOL, SLIDER_ID_MIXERVOL_LAST = SLIDER_ID_MIXERVOL + SLIDER_DEVICE_SPACING, SLIDER_ID_ADJUSTER, @@ -234,6 +235,11 @@ void start_save_state(); void start_load_state(); + // config callbacks + void config_load(config_type cfg_type, util::xml::data_node const *parentnode); + void config_save(config_type cfg_type, util::xml::data_node *parentnode); + void config_apply(void); + // slider controls std::vector<ui::menu_item>& get_slider_list(void); @@ -300,6 +306,7 @@ virtual int32_t slider_changed(running_machine &machine, void *arg, int id, std::string *str, int32_t newval) override; int32_t slider_volume(running_machine &machine, void *arg, int id, std::string *str, int32_t newval); + int32_t slider_framedelay(running_machine &machine, void *arg, int id, std::string *str, int32_t newval); int32_t slider_mixervol(running_machine &machine, void *arg, int id, std::string *str, int32_t newval); int32_t slider_adjuster(running_machine &machine, void *arg, int id, std::string *str, int32_t newval); int32_t slider_overclock(running_machine &machine, void *arg, int id, std::string *str, int32_t newval); @@ -326,6 +333,7 @@ #endif std::vector<std::unique_ptr<slider_state>> m_sliders; + std::vector<std::unique_ptr<slider_state>> m_sliders_saved; };
  8. haynor666

    ARCADE 0.212

    video/cidelsa.cpp appears to be incorrect
  9. haynor666

    ARCADE 0.212

    Truxton 2 stereo sound enabled is gone and it's probably gone from some long time. It's even gone in my source. For overclocks, sound volume save please wait for groovymame new patch.
  10. haynor666

    ARCADE 0.211

    Thanks for spotting this
  11. haynor666

    ARCADE 0.211

    What exactly I'm missing?
  12. haynor666

    ARCADE 0.211

    I don't know how much Your patches differ from mine but in case something might be usefull I'll post here my diff that I'm using with my custom groovymame build. Besides hacks/mods that are already in ARCADE32/64 there some modifications for other drivers. patches_211.7z
  13. haynor666

    ARCADE 0.211

    There is nothing wrong that You don't have time, I understand this. Just inform us about problems. I'm not programmer but if I can I will help.
  14. haynor666

    ARCADE 0.211

    Neo-geo raster hacks needs investigation for sure.
×
×
  • Create New...