Previous 199869 Revisions Next

r35041 Saturday 14th February, 2015 at 19:58:20 UTC by Olivier Galibert
save: Give the device when available to the state save subsystem [O. Galibert]
[src/emu]device.h diserial.c diserial.h memory.c save.c save.h schedule.c sound.c tilemap.c
[src/emu/bus/rs232]keyboard.c
[src/emu/cpu/psx]dma.c
[src/emu/machine]i8251.c ins8250.c z80dart.c
[src/emu/video]psx.c

trunk/src/emu/bus/rs232/keyboard.c
r243552r243553
4444void serial_keyboard_device::device_start()
4545{
4646   generic_keyboard_device::device_start();
47   device_serial_interface::register_save_state(machine().save(), name(), tag());
47   device_serial_interface::register_save_state(machine().save(), this);
4848   save_item(NAME(m_curr_key));
4949   save_item(NAME(m_key_valid));
5050}
trunk/src/emu/cpu/psx/dma.c
r243552r243553
6666
6767      dma->timer = timer_alloc(index);
6868
69      machine().save().save_item( "psxdma", tag(), index, NAME( dma->n_base ) );
70      machine().save().save_item( "psxdma", tag(), index, NAME( dma->n_blockcontrol ) );
71      machine().save().save_item( "psxdma", tag(), index, NAME( dma->n_channelcontrol ) );
72      machine().save().save_item( "psxdma", tag(), index, NAME( dma->n_ticks ) );
73      machine().save().save_item( "psxdma", tag(), index, NAME( dma->b_running ) );
69      save_item( NAME( dma->n_base ), index );
70      save_item( NAME( dma->n_blockcontrol ), index );
71      save_item( NAME( dma->n_channelcontrol ), index );
72      save_item( NAME( dma->n_ticks ), index );
73      save_item( NAME( dma->b_running ), index );
7474   }
7575
7676   save_item( NAME(m_dpcp) );
trunk/src/emu/device.h
r243552r243553
192192
193193   // state saving interfaces
194194   template<typename _ItemType>
195   void ATTR_COLD save_item(_ItemType &value, const char *valname, int index = 0) { assert(m_save != NULL); m_save->save_item(name(), tag(), index, value, valname); }
195   void ATTR_COLD save_item(_ItemType &value, const char *valname, int index = 0) { assert(m_save != NULL); m_save->save_item(this, name(), tag(), index, value, valname); }
196196   template<typename _ItemType>
197   void ATTR_COLD save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { assert(m_save != NULL); m_save->save_pointer(name(), tag(), index, value, valname, count); }
197   void ATTR_COLD save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { assert(m_save != NULL); m_save->save_pointer(this, name(), tag(), index, value, valname, count); }
198198
199199   // debugging
200200   device_debug *debug() const { return m_debug; }
trunk/src/emu/diserial.c
r243552r243553
5050{
5151}
5252
53void device_serial_interface::register_save_state(save_manager &save, const char *module, const char *tag)
53void device_serial_interface::register_save_state(save_manager &save, device_t *device)
5454{
55   save.save_item(module, tag, 0, NAME(m_df_start_bit_count));
56   save.save_item(module, tag, 0, NAME(m_df_word_length));
57   save.save_item(module, tag, 0, NAME(m_df_parity));
58   save.save_item(module, tag, 0, NAME(m_df_stop_bit_count));
59   save.save_item(module, tag, 0, NAME(m_rcv_register_data));
60   save.save_item(module, tag, 0, NAME(m_rcv_flags));
61   save.save_item(module, tag, 0, NAME(m_rcv_bit_count_received));
62   save.save_item(module, tag, 0, NAME(m_rcv_bit_count));
63   save.save_item(module, tag, 0, NAME(m_rcv_byte_received));
64   save.save_item(module, tag, 0, NAME(m_rcv_framing_error));
65   save.save_item(module, tag, 0, NAME(m_rcv_parity_error));
66   save.save_item(module, tag, 0, NAME(m_tra_register_data));
67   save.save_item(module, tag, 0, NAME(m_tra_flags));
68   save.save_item(module, tag, 0, NAME(m_tra_bit_count_transmitted));
69   save.save_item(module, tag, 0, NAME(m_tra_bit_count));
70   save.save_item(module, tag, 0, NAME(m_rcv_rate));
71   save.save_item(module, tag, 0, NAME(m_tra_rate));
72   save.save_item(module, tag, 0, NAME(m_rcv_line));
73   save.save_item(module, tag, 0, NAME(m_tra_clock_state));
74   save.save_item(module, tag, 0, NAME(m_rcv_clock_state));
55   const char *module = device->name();
56   const char *tag = device->tag();
57   save.save_item(device, module, tag, 0, NAME(m_df_start_bit_count));
58   save.save_item(device, module, tag, 0, NAME(m_df_word_length));
59   save.save_item(device, module, tag, 0, NAME(m_df_parity));
60   save.save_item(device, module, tag, 0, NAME(m_df_stop_bit_count));
61   save.save_item(device, module, tag, 0, NAME(m_rcv_register_data));
62   save.save_item(device, module, tag, 0, NAME(m_rcv_flags));
63   save.save_item(device, module, tag, 0, NAME(m_rcv_bit_count_received));
64   save.save_item(device, module, tag, 0, NAME(m_rcv_bit_count));
65   save.save_item(device, module, tag, 0, NAME(m_rcv_byte_received));
66   save.save_item(device, module, tag, 0, NAME(m_rcv_framing_error));
67   save.save_item(device, module, tag, 0, NAME(m_rcv_parity_error));
68   save.save_item(device, module, tag, 0, NAME(m_tra_register_data));
69   save.save_item(device, module, tag, 0, NAME(m_tra_flags));
70   save.save_item(device, module, tag, 0, NAME(m_tra_bit_count_transmitted));
71   save.save_item(device, module, tag, 0, NAME(m_tra_bit_count));
72   save.save_item(device, module, tag, 0, NAME(m_rcv_rate));
73   save.save_item(device, module, tag, 0, NAME(m_tra_rate));
74   save.save_item(device, module, tag, 0, NAME(m_rcv_line));
75   save.save_item(device, module, tag, 0, NAME(m_tra_clock_state));
76   save.save_item(device, module, tag, 0, NAME(m_rcv_clock_state));
7577}
7678
7779void device_serial_interface::interface_pre_start()
trunk/src/emu/diserial.h
r243552r243553
130130   const char *parity_tostring(parity_t stop_bits);
131131   const char *stop_bits_tostring(stop_bits_t stop_bits);
132132
133   void register_save_state(save_manager &save, const char *module, const char *tag);
133   void register_save_state(save_manager &save, device_t *device);
134134
135135private:
136136   enum { TRA_TIMER_ID = 10000, RCV_TIMER_ID };
trunk/src/emu/machine/i8251.c
r243552r243553
7777   save_item(NAME(m_data));
7878   save_item(NAME(m_tx_busy));
7979   save_item(NAME(m_disable_tx_pending));
80   device_serial_interface::register_save_state(machine().save(), name(), tag());
80   device_serial_interface::register_save_state(machine().save(), this);
8181}
8282
8383
trunk/src/emu/machine/ins8250.c
r243552r243553
544544   set_tra_rate(0);
545545   set_rcv_rate(0);
546546
547   device_serial_interface::register_save_state(machine().save(), name(), tag());
547   device_serial_interface::register_save_state(machine().save(), this);
548548   save_item(NAME(m_regs.thr));
549549   save_item(NAME(m_regs.rbr));
550550   save_item(NAME(m_regs.ier));
trunk/src/emu/machine/z80dart.c
r243552r243553
563563   save_item(NAME(m_dtr));
564564   save_item(NAME(m_rts));
565565   save_item(NAME(m_sync));
566   device_serial_interface::register_save_state(machine().save(), name(), tag());
566   device_serial_interface::register_save_state(machine().save(), this);
567567}
568568
569569
trunk/src/emu/memory.c
r243552r243553
38743874      int bytes_per_element = space.data_width() / 8;
38753875      astring name;
38763876      name.printf("%08x-%08x", bytestart, byteend);
3877      space.machine().save().save_memory("memory", space.device().tag(), space.spacenum(), name, m_data, bytes_per_element, (UINT32)(byteend + 1 - bytestart) / bytes_per_element);
3877      space.machine().save().save_memory(NULL, "memory", space.device().tag(), space.spacenum(), name, m_data, bytes_per_element, (UINT32)(byteend + 1 - bytestart) / bytes_per_element);
38783878   }
38793879}
38803880
r243552r243553
39213921   }
39223922
39233923   if (!m_anonymous && space.machine().save().registration_allowed())
3924      space.machine().save().save_item("memory", m_tag, 0, NAME(m_curentry));
3924      space.machine().save().save_item(NULL, "memory", m_tag, 0, NAME(m_curentry));
39253925}
39263926
39273927
trunk/src/emu/save.c
r243552r243553
147147//  memory
148148//-------------------------------------------------
149149
150void save_manager::save_memory(const char *module, const char *tag, UINT32 index, const char *name, void *val, UINT32 valsize, UINT32 valcount)
150void save_manager::save_memory(device_t *device, const char *module, const char *tag, UINT32 index, const char *name, void *val, UINT32 valsize, UINT32 valcount)
151151{
152152   assert(valsize == 1 || valsize == 2 || valsize == 4 || valsize == 8);
153153
r243552r243553
183183   }
184184
185185   // insert us into the list
186   m_entry_list.insert_after(*global_alloc(state_entry(val, totalname, valsize, valcount)), insert_after);
186   m_entry_list.insert_after(*global_alloc(state_entry(val, totalname, device, module, tag ? tag : "", index, valsize, valcount)), insert_after);
187187}
188188
189189
r243552r243553
419419//  state_entry - constructor
420420//-------------------------------------------------
421421
422save_manager::state_entry::state_entry(void *data, const char *name, UINT8 size, UINT32 count)
422state_entry::state_entry(void *data, const char *name, device_t *device, const char *module, const char *tag, int index, UINT8 size, UINT32 count)
423423   : m_next(NULL),
424424      m_data(data),
425425      m_name(name),
426      m_device(device),
427      m_module(module),
428      m_tag(tag),
429      m_index(index),
426430      m_typesize(size),
427431      m_typecount(count),
428432      m_offset(0)
r243552r243553
435439//  block of  data
436440//-------------------------------------------------
437441
438void save_manager::state_entry::flip_data()
442void state_entry::flip_data()
439443{
440444   UINT16 *data16;
441445   UINT32 *data32;
trunk/src/emu/save.h
r243552r243553
5151// use this as above, but also to declare that dynamic_array<TYPE> is safe as well
5252#define ALLOW_SAVE_TYPE_AND_ARRAY(TYPE) \
5353   ALLOW_SAVE_TYPE(TYPE); \
54   template<> inline void save_manager::save_item(const char *module, const char *tag, int index, dynamic_array<TYPE> &value, const char *name) { save_memory(module, tag, index, name, &value[0], sizeof(TYPE), value.count()); }
54   template<> inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, dynamic_array<TYPE> &value, const char *name) { save_memory(device, module, tag, index, name, &value[0], sizeof(TYPE), value.count()); }
5555
5656
5757// register items with explicit tags
5858#define state_save_register_item(_mach, _mod, _tag, _index, _val) \
59   (_mach).save().save_item(_mod, _tag, _index, _val, #_val)
59   (_mach).save().save_item(NULL, _mod, _tag, _index, _val, #_val)
6060
6161#define state_save_register_item_pointer(_mach, _mod, _tag, _index, _val, _count) \
62   (_mach).save().save_pointer(_mod, _tag, _index, _val, #_val, _count)
62   (_mach).save().save_pointer(NULL, _mod, _tag, _index, _val, #_val, _count)
6363
6464#define state_save_register_item_array(_mach, _mod, _tag, _index, _val) \
65   (_mach).save().save_item(_mod, _tag, _index, _val, #_val)
65   (_mach).save().save_item(NULL, _mod, _tag, _index, _val, #_val)
6666
6767#define state_save_register_item_2d_array(_mach, _mod, _tag, _index, _val) \
68   (_mach).save().save_item(_mod, _tag, _index, _val, #_val)
68   (_mach).save().save_item(NULL, _mod, _tag, _index, _val, #_val)
6969
7070#define state_save_register_item_bitmap(_mach, _mod, _tag, _index, _val) \
71   (_mach).save().save_item(_mod, _tag, _index, *(_val), #_val)
71   (_mach).save().save_item(NULL, _mod, _tag, _index, *(_val), #_val)
7272
7373
7474
r243552r243553
7676//  TYPE DEFINITIONS
7777//**************************************************************************
7878
79class state_entry
80{
81public:
82   // construction/destruction
83   state_entry(void *data, const char *name, device_t *device, const char *module, const char *tag, int index, UINT8 size, UINT32 count);
84
85   // getters
86   state_entry *next() const { return m_next; }
87
88   // helpers
89   void flip_data();
90
91   // state
92   state_entry *       m_next;                 // pointer to next entry
93   void *              m_data;                 // pointer to the memory to save/restore
94   astring             m_name;                 // full name
95   device_t *          m_device;               // associated device, NULL if none
96   astring             m_module;               // module name
97   astring             m_tag;                  // tag name
98   int                 m_index;                // index
99   UINT8               m_typesize;             // size of the raw data type
100   UINT32              m_typecount;            // number of items
101   UINT32              m_offset;               // offset within the final structure
102};
103
79104class save_manager
80105{
81106   // type_checker is a set of templates to identify valid save types
r243552r243553
104129   void dispatch_postload();
105130
106131   // generic memory registration
107   void save_memory(const char *module, const char *tag, UINT32 index, const char *name, void *val, UINT32 valsize, UINT32 valcount = 1);
132   void save_memory(device_t *device, const char *module, const char *tag, UINT32 index, const char *name, void *val, UINT32 valsize, UINT32 valcount = 1);
108133
109134   // templatized wrapper for general objects
110135   template<typename _ItemType>
111   void save_item(const char *module, const char *tag, int index, _ItemType &value, const char *valname)
136   void save_item(device_t *device, const char *module, const char *tag, int index, _ItemType &value, const char *valname)
112137   {
113138      if (type_checker<_ItemType>::is_pointer) throw emu_fatalerror("Called save_item on a pointer with no count!");
114139      if (!type_checker<_ItemType>::is_atom) throw emu_fatalerror("Called save_item on a non-fundamental type!");
115      save_memory(module, tag, index, valname, &value, sizeof(value));
140      save_memory(device, module, tag, index, valname, &value, sizeof(value));
116141   }
117142
118143   // templatized wrapper for 1-dimensional arrays
119144   template<typename _ItemType, std::size_t N>
120   void save_item(const char *module, const char *tag, int index, _ItemType (&value)[N], const char *valname)
145   void save_item(device_t *device, const char *module, const char *tag, int index, _ItemType (&value)[N], const char *valname)
121146   {
122147      if (!type_checker<_ItemType>::is_atom) throw emu_fatalerror("Called save_item on a non-fundamental type!");
123      save_memory(module, tag, index, valname, &value[0], sizeof(value[0]), N);
148      save_memory(device, module, tag, index, valname, &value[0], sizeof(value[0]), N);
124149   }
125150
126151   // templatized wrapper for 2-dimensional arrays
127152   template<typename _ItemType, std::size_t M, std::size_t N>
128   void save_item(const char *module, const char *tag, int index, _ItemType (&value)[M][N], const char *valname)
153   void save_item(device_t *device, const char *module, const char *tag, int index, _ItemType (&value)[M][N], const char *valname)
129154   {
130155      if (!type_checker<_ItemType>::is_atom) throw emu_fatalerror("Called save_item on a non-fundamental type!");
131      save_memory(module, tag, index, valname, &value[0][0], sizeof(value[0][0]), M * N);
156      save_memory(device, module, tag, index, valname, &value[0][0], sizeof(value[0][0]), M * N);
132157   }
133158
134159   // templatized wrapper for pointers
135160   template<typename _ItemType>
136   void save_pointer(const char *module, const char *tag, int index, _ItemType *value, const char *valname, UINT32 count)
161   void save_pointer(device_t *device, const char *module, const char *tag, int index, _ItemType *value, const char *valname, UINT32 count)
137162   {
138163      if (!type_checker<_ItemType>::is_atom) throw emu_fatalerror("Called save_item on a non-fundamental type!");
139      save_memory(module, tag, index, valname, value, sizeof(*value), count);
164      save_memory(device, module, tag, index, valname, value, sizeof(*value), count);
140165   }
141166
142167   // global memory registration
143168   template<typename _ItemType>
144   void save_item(_ItemType &value, const char *valname, int index = 0) { save_item("global", NULL, index, value, valname); }
169   void save_item(_ItemType &value, const char *valname, int index = 0) { save_item(NULL, "global", NULL, index, value, valname); }
145170   template<typename _ItemType>
146   void save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { save_pointer("global", NULL, index, value, valname, count); }
171   void save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { save_pointer(NULL, "global", NULL, index, value, valname, count); }
147172
148173   // file processing
149174   static save_error check_file(running_machine &machine, emu_file &file, const char *gamename, void (CLIB_DECL *errormsg)(const char *fmt, ...));
r243552r243553
171196      save_prepost_delegate m_func;               // delegate
172197   };
173198
174   class state_entry
175   {
176   public:
177      // construction/destruction
178      state_entry(void *data, const char *name, UINT8 size, UINT32 count);
179
180      // getters
181      state_entry *next() const { return m_next; }
182
183      // helpers
184      void flip_data();
185
186      // state
187      state_entry *       m_next;                 // pointer to next entry
188      void *              m_data;                 // pointer to the memory to save/restore
189      astring             m_name;                 // full name
190      UINT8               m_typesize;             // size of the raw data type
191      UINT32              m_typecount;            // number of items
192      UINT32              m_offset;               // offset within the final structure
193   };
194
195199   // internal state
196200   running_machine &       m_machine;              // reference to our machine
197201   bool                    m_reg_allowed;          // are registrations allowed?
r243552r243553
232236//-------------------------------------------------
233237
234238template<>
235inline void save_manager::save_item(const char *module, const char *tag, int index, bitmap_ind8 &value, const char *name)
239inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, bitmap_ind8 &value, const char *name)
236240{
237   save_memory(module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
241   save_memory(device, module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
238242}
239243
240244template<>
241inline void save_manager::save_item(const char *module, const char *tag, int index, bitmap_ind16 &value, const char *name)
245inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, bitmap_ind16 &value, const char *name)
242246{
243   save_memory(module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
247   save_memory(device, module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
244248}
245249
246250template<>
247inline void save_manager::save_item(const char *module, const char *tag, int index, bitmap_ind32 &value, const char *name)
251inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, bitmap_ind32 &value, const char *name)
248252{
249   save_memory(module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
253   save_memory(device, module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
250254}
251255
252256template<>
253inline void save_manager::save_item(const char *module, const char *tag, int index, bitmap_rgb32 &value, const char *name)
257inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, bitmap_rgb32 &value, const char *name)
254258{
255   save_memory(module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
259   save_memory(device, module, tag, index, name, &value.pix(0), value.bpp() / 8, value.rowpixels() * value.height());
256260}
257261
258262
r243552r243553
261265//-------------------------------------------------
262266
263267template<>
264inline void save_manager::save_item(const char *module, const char *tag, int index, attotime &value, const char *name)
268inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, attotime &value, const char *name)
265269{
266270   astring tempstr(name, ".attoseconds");
267   save_memory(module, tag, index, tempstr, &value.attoseconds, sizeof(value.attoseconds));
271   save_memory(device, module, tag, index, tempstr, &value.attoseconds, sizeof(value.attoseconds));
268272   tempstr.cpy(name).cat(".seconds");
269   save_memory(module, tag, index, tempstr, &value.seconds, sizeof(value.seconds));
273   save_memory(device, module, tag, index, tempstr, &value.seconds, sizeof(value.seconds));
270274}
271275
272276
trunk/src/emu/schedule.c
r243552r243553
260260   }
261261
262262   // save the bits
263   machine().save().save_item("timer", name, index, NAME(m_param));
264   machine().save().save_item("timer", name, index, NAME(m_enabled));
265   machine().save().save_item("timer", name, index, NAME(m_period));
266   machine().save().save_item("timer", name, index, NAME(m_start));
267   machine().save().save_item("timer", name, index, NAME(m_expire));
263   machine().save().save_item(m_device, "timer", name, index, NAME(m_param));
264   machine().save().save_item(m_device, "timer", name, index, NAME(m_enabled));
265   machine().save().save_item(m_device, "timer", name, index, NAME(m_period));
266   machine().save().save_item(m_device, "timer", name, index, NAME(m_start));
267   machine().save().save_item(m_device, "timer", name, index, NAME(m_expire));
268268}
269269
270270
trunk/src/emu/sound.c
r243552r243553
7777   // create a unique tag for saving
7878   astring state_tag;
7979   state_tag.printf("%d", m_device.machine().sound().m_stream_list.count());
80   m_device.machine().save().save_item("stream", state_tag, 0, NAME(m_sample_rate));
80   m_device.machine().save().save_item(&m_device, "stream", state_tag, 0, NAME(m_sample_rate));
8181   m_device.machine().save().register_postload(save_prepost_delegate(FUNC(sound_stream::postload), this));
8282
8383   // save the gain of each input and output
8484   for (int inputnum = 0; inputnum < m_input.count(); inputnum++)
8585   {
86      m_device.machine().save().save_item("stream", state_tag, inputnum, NAME(m_input[inputnum].m_gain));
87      m_device.machine().save().save_item("stream", state_tag, inputnum, NAME(m_input[inputnum].m_user_gain));
86      m_device.machine().save().save_item(&m_device, "stream", state_tag, inputnum, NAME(m_input[inputnum].m_gain));
87      m_device.machine().save().save_item(&m_device, "stream", state_tag, inputnum, NAME(m_input[inputnum].m_user_gain));
8888   }
8989   for (int outputnum = 0; outputnum < m_output.count(); outputnum++)
9090   {
9191      m_output[outputnum].m_stream = this;
92      m_device.machine().save().save_item("stream", state_tag, outputnum, NAME(m_output[outputnum].m_gain));
92      m_device.machine().save().save_item(&m_device, "stream", state_tag, outputnum, NAME(m_output[outputnum].m_gain));
9393   }
9494
9595   // Mark synchronous streams as such
trunk/src/emu/tilemap.c
r243552r243553
407407
408408   // save relevant state
409409   int instance = manager.alloc_instance();
410   machine().save().save_item("tilemap", NULL, instance, NAME(m_enable));
411   machine().save().save_item("tilemap", NULL, instance, NAME(m_attributes));
412   machine().save().save_item("tilemap", NULL, instance, NAME(m_palette_offset));
413   machine().save().save_item("tilemap", NULL, instance, NAME(m_scrollrows));
414   machine().save().save_item("tilemap", NULL, instance, NAME(m_scrollcols));
415   machine().save().save_item("tilemap", NULL, instance, NAME(m_rowscroll));
416   machine().save().save_item("tilemap", NULL, instance, NAME(m_colscroll));
417   machine().save().save_item("tilemap", NULL, instance, NAME(m_dx));
418   machine().save().save_item("tilemap", NULL, instance, NAME(m_dx_flipped));
419   machine().save().save_item("tilemap", NULL, instance, NAME(m_dy));
420   machine().save().save_item("tilemap", NULL, instance, NAME(m_dy_flipped));
410   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_enable));
411   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_attributes));
412   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_palette_offset));
413   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_scrollrows));
414   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_scrollcols));
415   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_rowscroll));
416   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_colscroll));
417   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dx));
418   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dx_flipped));
419   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dy));
420   machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dy_flipped));
421421
422422   // reset everything after a load
423423   machine().save().register_postload(save_prepost_delegate(FUNC(tilemap_t::postload), this));
trunk/src/emu/video/psx.c
r243552r243553
568568   }
569569
570570   // icky!!!
571   machine().save().save_memory( "globals", NULL, 0, "m_packet", (UINT8 *)&m_packet, 1, sizeof( m_packet ) );
571   machine().save().save_memory( this, "globals", NULL, 0, "m_packet", (UINT8 *)&m_packet, 1, sizeof( m_packet ) );
572572
573573   save_pointer(NAME(p_vram), width * height );
574574   save_item(NAME(n_gpu_buffer_offset));


Previous 199869 Revisions Next


© 1997-2024 The MAME Team