From 5fc9d0703a7f85d77f2bb2fc95ea7127193e0b70 Mon Sep 17 00:00:00 2001 From: Couriersud Date: Sat, 28 Dec 2013 14:57:22 +0000 Subject: [PATCH] Netlist, make some class variables protected. No wn --- .gitignore | 1 + src/emu/machine/netlist.c | 4 ++-- src/emu/netlist/nl_base.h | 30 ++++++++++++++++++++++-------- src/osd/sdl/sdl.mak | 4 ++-- src/osd/windows/windows.mak | 4 ++-- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 16370bc6232..85fa96e539a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /nvram /obj /snap +src/osd/winui src/regtests/chdman/temp src/regtests/jedutil/output /sta diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c index d9bf3b115ed..052b0d1f53f 100644 --- a/src/emu/machine/netlist.c +++ b/src/emu/machine/netlist.c @@ -200,11 +200,11 @@ void netlist_mame_device_t::device_start() netlist_net_t *n = m_netlist->m_nets[i]; if (n->isRailNet()) { - state_add(i*2, n->name(), n->m_cur.Q); + state_add(i*2, n->name(), n->Q_state_ptr()); } else { - state_add(i*2+1, n->name(), n->m_cur.Analog).formatstr("%20s"); + state_add(i*2+1, n->name(), n->Q_Analog_state_ptr()).formatstr("%20s"); } } diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h index 5cffcbf718e..df26a77fbf9 100644 --- a/src/emu/netlist/nl_base.h +++ b/src/emu/netlist/nl_base.h @@ -581,6 +581,22 @@ public: ATTR_HOT inline void push_to_queue(const netlist_time &delay); ATTR_HOT bool is_queued() { return m_in_queue == 1; } + /* internal state support + * FIXME: get rid of this and implement export/import in MAME + */ + ATTR_COLD inline netlist_sig_t &Q_state_ptr() + { + assert(family() == LOGIC); + return m_cur.Q; + } + + ATTR_COLD inline double &Q_Analog_state_ptr() + { + //assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG); + assert(family() == ANALOG); + return m_cur.Analog; + } + // m_terms is only used by analog subsystem typedef netlist_list_t terminal_list_t; @@ -589,13 +605,6 @@ public: netlist_core_terminal_t *m_head; -// the following three must be public for mame support -//protected: - - hybrid_t m_last; - hybrid_t m_cur; - hybrid_t m_new; - /* use this to register state.... */ ATTR_COLD virtual void late_save_register() { @@ -612,7 +621,12 @@ public: } protected: - UINT32 m_num_cons; + + UINT32 m_num_cons; + + hybrid_t m_last; + hybrid_t m_cur; + hybrid_t m_new; /* we don't use this to save state * because we may get deleted again ... diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index 2bd34cb1bc9..c2c5eeedf50 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -59,14 +59,14 @@ USE_DISPATCH_GL = 1 # active development on sdlmame or SDL. # uncomment the next line to compile and link against SDL2.0 -# SDL_LIBVER = sdl2 +SDL_LIBVER = sdl2 # uncomment the next line to use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release) # SDL2_MULTIAPI = 1 # uncomment the next line to specify where you have installed # SDL. Equivalent to the ./configure --prefix= -# SDL_INSTALL_ROOT = /usr/local/sdl13 +SDL_INSTALL_ROOT = /usr/local/sdl20 # uncomment to disable the Qt debugger (on non-OSX this disables all debugging) # NO_USE_QTDEBUG = 1 diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index 4c9455a8f9f..3517e8c7e70 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -290,10 +290,10 @@ LIBS += -luser32 -lgdi32 -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwa ifeq ($(DIRECTINPUT),8) LIBS += -ldinput8 -CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0800 +CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0800 -Idirectx else LIBS += -ldinput -CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0700 +CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0700 -Idirectx endif LIBS += -lcomdlg32