Netlist, make some class variables protected. No wn

This commit is contained in:
Couriersud 2013-12-28 14:57:22 +00:00
parent 966ae37d90
commit 5fc9d0703a
5 changed files with 29 additions and 14 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@
/nvram /nvram
/obj /obj
/snap /snap
src/osd/winui
src/regtests/chdman/temp src/regtests/chdman/temp
src/regtests/jedutil/output src/regtests/jedutil/output
/sta /sta

View File

@ -200,11 +200,11 @@ void netlist_mame_device_t::device_start()
netlist_net_t *n = m_netlist->m_nets[i]; netlist_net_t *n = m_netlist->m_nets[i];
if (n->isRailNet()) if (n->isRailNet())
{ {
state_add(i*2, n->name(), n->m_cur.Q); state_add(i*2, n->name(), n->Q_state_ptr());
} }
else 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");
} }
} }

View File

@ -581,6 +581,22 @@ public:
ATTR_HOT inline void push_to_queue(const netlist_time &delay); ATTR_HOT inline void push_to_queue(const netlist_time &delay);
ATTR_HOT bool is_queued() { return m_in_queue == 1; } 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 // m_terms is only used by analog subsystem
typedef netlist_list_t<netlist_terminal_t *> terminal_list_t; typedef netlist_list_t<netlist_terminal_t *> terminal_list_t;
@ -589,13 +605,6 @@ public:
netlist_core_terminal_t *m_head; 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.... */ /* use this to register state.... */
ATTR_COLD virtual void late_save_register() ATTR_COLD virtual void late_save_register()
{ {
@ -612,8 +621,13 @@ public:
} }
protected: 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 /* we don't use this to save state
* because we may get deleted again ... * because we may get deleted again ...
*/ */

View File

@ -59,14 +59,14 @@ USE_DISPATCH_GL = 1
# active development on sdlmame or SDL. # active development on sdlmame or SDL.
# uncomment the next line to compile and link against SDL2.0 # 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) # 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 # SDL2_MULTIAPI = 1
# uncomment the next line to specify where you have installed # uncomment the next line to specify where you have installed
# SDL. Equivalent to the ./configure --prefix=<path> # SDL. Equivalent to the ./configure --prefix=<path>
# 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) # uncomment to disable the Qt debugger (on non-OSX this disables all debugging)
# NO_USE_QTDEBUG = 1 # NO_USE_QTDEBUG = 1

View File

@ -290,10 +290,10 @@ LIBS += -luser32 -lgdi32 -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwa
ifeq ($(DIRECTINPUT),8) ifeq ($(DIRECTINPUT),8)
LIBS += -ldinput8 LIBS += -ldinput8
CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0800 CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0800 -Idirectx
else else
LIBS += -ldinput LIBS += -ldinput
CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0700 CCOMFLAGS += -DDIRECTINPUT_VERSION=0x0700 -Idirectx
endif endif
LIBS += -lcomdlg32 LIBS += -lcomdlg32