From f8262bcae017a493cc791d5c7116fe5216c9bb19 Mon Sep 17 00:00:00 2001 From: Scott Stone Date: Tue, 5 Apr 2016 08:35:25 -0400 Subject: [PATCH 1/4] Adjusted device description to not be so.. "Standard" (nw) --- src/devices/bus/kc/rom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/bus/kc/rom.cpp b/src/devices/bus/kc/rom.cpp index 404089110a0..883b36eb739 100644 --- a/src/devices/bus/kc/rom.cpp +++ b/src/devices/bus/kc/rom.cpp @@ -43,7 +43,7 @@ const device_type KC_M033 = &device_creator; //------------------------------------------------- kc_8k_device::kc_8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, KC_STANDARD, "Standard", tag, owner, clock, "kc_8k", __FILE__), + : device_t(mconfig, KC_STANDARD, "Standard 8K ROM module", tag, owner, clock, "kc_8k", __FILE__), device_kcexp_interface( mconfig, *this ), m_slot(nullptr), m_mei(0), m_rom(nullptr), m_enabled(0), m_base(0) { } From 6f231bb61b22c217bce3f2f7c533b851097188ec Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 5 Apr 2016 14:50:17 +0200 Subject: [PATCH 2/4] added missing files in build (nw) --- scripts/src/3rdparty.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 7666f4d9e09..5516c34534e 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -788,6 +788,8 @@ end MAME_DIR .. "3rdparty/bgfx/examples/common/font/text_metrics.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/font/utf8.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/imgui.cpp", + MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp", + MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/scintilla.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp", } From 309a9bf60c829108fb732c3d9ed3d5dd7edce31b Mon Sep 17 00:00:00 2001 From: David Haywood Date: Tue, 5 Apr 2016 14:33:04 +0100 Subject: [PATCH 3/4] fix some missing gfx in bbusters / mechatt [dink] (not entirely convinced by the code myself, but it does fix some bugs, namely the large zombie after the 'weapons' screen in bbusters attract and the rotors on the large helicopter in the 3rd mechatt attract demo, will look into it further myself) --- src/mame/video/bbusters.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mame/video/bbusters.cpp b/src/mame/video/bbusters.cpp index 1a090935c17..0e7362fd085 100644 --- a/src/mame/video/bbusters.cpp +++ b/src/mame/video/bbusters.cpp @@ -200,18 +200,20 @@ void bbusters_state::draw_sprites(bitmap_ind16 &bitmap, const UINT16 *source, in int offs; for (offs = 0;offs <0x800 ;offs += 4) { - int x,y,sprite,colour,fx,fy,scale; + int x,sprite,colour,fx,fy,scale; + INT16 y; int block; sprite=source[offs+1]; colour=source[offs+0]; - if (colour==0xf7 && (sprite==0x3fff || sprite==0xffff)) - continue; + if ((colour==0xf7 || colour==0xffff || colour == 0x43f9) && (sprite==0x3fff || sprite==0xffff || sprite==0x0001)) + continue; // sprite 1, color 0x43f9 is the dead sprite in the top-right of the screen in Mechanized Attack's High Score table. y=source[offs+3]; x=source[offs+2]; if (x&0x200) x=-(0x100-(x&0xff)); + if (y > 320 || y < -256) y &= 0x1ff; // fix for bbusters ending & "Zing!" attract-mode fullscreen zombie & Helicopter on the 3rd rotation of the attractmode sequence /* Source[0]: From 06415edd9e0b31b9cb5238a53824f3512cc01a81 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 5 Apr 2016 15:45:17 +0200 Subject: [PATCH 4/4] Added some more files to bgfx build and initialize imgui (nw) --- scripts/src/3rdparty.lua | 8 ++++++++ scripts/src/osd/modules.lua | 5 ++++- src/osd/modules/render/drawbgfx.cpp | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 5516c34534e..9666b7563bb 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -720,6 +720,7 @@ end buildoptions { "-Wno-uninitialized", "-Wno-unused-function", + "-Wno-unused-but-set-variable", } configuration { "rpi" } buildoptions { @@ -792,6 +793,13 @@ end MAME_DIR .. "3rdparty/bgfx/examples/common/imgui/scintilla.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg.cpp", MAME_DIR .. "3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/ib-compress/indexbuffercompression.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/ib-compress/indexbufferdecompression.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_node_graph_test.cpp", + MAME_DIR .. "3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp", } if _OPTIONS["targetos"]=="macosx" then files { diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index d50f12745d4..f955659908d 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -74,7 +74,7 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/input/input_common.cpp", MAME_DIR .. "src/osd/modules/input/input_common.h", MAME_DIR .. "src/osd/modules/input/input_dinput.cpp", - MAME_DIR .. "src/osd/modules/input/input_dinput.h", + MAME_DIR .. "src/osd/modules/input/input_dinput.h", MAME_DIR .. "src/osd/modules/input/input_none.cpp", MAME_DIR .. "src/osd/modules/input/input_rawinput.cpp", MAME_DIR .. "src/osd/modules/input/input_win32.cpp", @@ -129,6 +129,7 @@ function osdmodulesbuild() "__STDC_LIMIT_MACROS", "__STDC_FORMAT_MACROS", "__STDC_CONSTANT_MACROS", + "IMGUI_DISABLE_OBSOLETE_FUNCTIONS", } files { @@ -172,7 +173,9 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/modules/render/bgfx/writereader.cpp", } includedirs { + MAME_DIR .. "3rdparty/bgfx/examples/common", MAME_DIR .. "3rdparty/bgfx/include", + MAME_DIR .. "3rdparty/bgfx/3rdparty", MAME_DIR .. "3rdparty/bx/include", MAME_DIR .. "3rdparty/rapidjson/include", } diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp index 415e5ef33e4..4798bdbd4b6 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -43,6 +43,8 @@ #include "bgfx/slider.h" #include "bgfx/target.h" +#include "imgui/imgui.h" + //============================================================ // DEBUGGING //============================================================ @@ -198,6 +200,8 @@ int renderer_bgfx::create() memset(m_white, 0xff, sizeof(uint32_t) * 16 * 16); m_texinfo.push_back(rectangle_packer::packable_rectangle(WHITE_HASH, PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32), 16, 16, 16, nullptr, m_white)); + imguiCreate(); + return 0; } @@ -261,6 +265,8 @@ renderer_bgfx::~renderer_bgfx() void renderer_bgfx::exit() { + imguiDestroy(); + bgfx::shutdown(); s_window_set = false; }