~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/emu/imagedev/cartslot.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        offset = ROM_GETOFFSET(roment);
79
79
        size = ROM_GETLENGTH(roment);
80
80
        flags = ROM_GETFLAGS(roment);
81
 
        ptr = ((UINT8 *) device().machine().region(region)->base()) + offset;
 
81
        ptr = ((UINT8 *) device().machine().root_device().memregion(region)->base()) + offset;
82
82
 
83
83
        if (load)
84
84
        {
171
171
 
172
172
int cartslot_image_device::process_cartridge(bool load)
173
173
{
174
 
        const rom_source *source;
175
174
        const rom_entry *romrgn, *roment;
176
175
        int result = 0;
177
176
 
178
 
        for (source = rom_first_source(device().machine().config()); source != NULL; source = rom_next_source(*source))
179
 
        {
180
 
                for (romrgn = rom_first_region(*source); romrgn != NULL; romrgn = rom_next_region(romrgn))
 
177
        device_iterator deviter(device().mconfig().root_device());
 
178
        for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
 
179
                for (romrgn = rom_first_region(*device); romrgn != NULL; romrgn = rom_next_region(romrgn))
181
180
                {
182
181
                        roment = romrgn + 1;
183
182
                        while(!ROMENTRY_ISREGIONEND(roment))
185
184
                                if (ROMENTRY_GETTYPE(roment) == ROMENTRYTYPE_CARTRIDGE)
186
185
                                {
187
186
                                        astring regiontag;
188
 
                                        device().siblingtag(regiontag, roment->_hashdata);
 
187
                                        this->device().siblingtag(regiontag, roment->_hashdata);
189
188
 
190
 
                                        if (strcmp(regiontag.cstr(),device().tag())==0)
 
189
                                        if (strcmp(regiontag.cstr(),this->device().tag())==0)
191
190
                                        {
192
191
                                                result |= load_cartridge(romrgn, roment, load);
193
192
 
199
198
                                roment++;
200
199
                        }
201
200
                }
202
 
        }
203
201
 
204
202
        return IMAGE_INIT_PASS;
205
203
}