summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/memory.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* renamed memory.* to emumem.* (nw) Miodrag Milanovic2016-04-081-944/+0
|
* Avoid auto return types; silence some unused variable warnings (nw) AJR2016-03-311-3/+3
|
* Iterate over core classes C++11 style AJR2016-03-311-12/+8
| | | | | | | | C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.) device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config. memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
* Make octal flag part of address_space/address_space_config, not ↵ AJR2016-02-041-2/+5
| | | | (illogically) device_execute_interface (nw)
* Add macros for alignment checking (nw) AJR2016-01-301-0/+6
|
* Remove this==NULL comps, nw therealmogminer@gmail.com2016-01-231-6/+4
|
* reverting: Miodrag Milanovic2016-01-201-12/+12
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* Revert "Memory region to use std::string (nw)" Miodrag Milanovic2016-01-201-4/+4
| | | | This reverts commit 14d0bff4d0dca0fb6e6b7bd70e29b3d4f0d18061.
* Memory region to use std::string (nw) Miodrag Milanovic2016-01-201-4/+4
|
* tags are now strings (nw) Miodrag Milanovic2016-01-161-12/+12
| | | | fix start project for custom builds in Visual Studio (nw)
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-26/+26
|
* Initial conversion of core to C++14. Note that compilers are now limited to ↵ Miodrag Milanovic2015-12-031-3/+3
| | | | GCC 4.9.0 and up, Clang 3.4.0 and up, and VS2013 and up [Miodrag Milanovic]
* Some errors pointed by ReSharperC++ (nw) Miodrag Milanovic2015-11-071-2/+0
|
* thomson.c: reduce tagmap lookups (nw) Wilbert Pol2015-08-021-0/+7
|
* some extremely low hanging pedantic fruit Cowering2015-07-081-1/+1
|
* memory: Remove support for decrypted bases, use an address space instead [O. ↵ Olivier Galibert2015-06-241-83/+30
| | | | Galibert]
* Revert "Remove unnecessary null checks" for now, undefined behavior but ↵ balr0g2015-05-171-1/+3
| | | | | | breaks too much, will have to revisit (nw) This reverts commit 53635d12d7760da4713a5b26705ec0b0d0335ce7.
* Remove unnecessary null checks (nw) balr0g2015-05-161-1/+1
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-4/+4
|
* Replace dynamic_array with std::vector [O. Galibert] Olivier Galibert2015-04-141-3/+3
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-3/+3
|
* Cleanups and version bumpmame0156 Miodrag Milanovic2014-11-261-1/+1
|
* Touching all the candy again: [Alex Jackson] Alex W. Jackson2014-11-171-17/+13
| | | | | | | | | | | | | | | | Fixed an annoying inconsistency between memory_share and memory_region: the width() method of the former returned the width in bits (8, 16, 32 or 64) while the width() method of the latter returned the width in bytes (1, 2, 4 or 8). Now both classes have a bitwidth() method and a bytewidth() method. Updated all callers to use whichever one was more appropriate. Removed the implicit-cast-to-any-integer-pointer ability of memory_regions, which was rather unsafe (if you weren't careful with your * operators and casts it was easy to accidentally get a pointer to the memory_region object itself instead of to the data, with no warning from the compiler... or at least I kept doing it) Updated all devices and drivers that were accessing regions that way to use a region_ptr_finder when possible, and otherwise to call base() explicitly.
* More cleanups, there is issue with srcclean that needs to be taken care as ↵ Miodrag Milanovic2014-07-221-1/+1
| | | | well, just doing now what we can
* removed lot of legacy code in memory system and removed corresponding macros ↵ Miodrag Milanovic2014-05-051-118/+1
| | | | (nw)
* modernized last DIRECT_UPDATE_HANDLER user (nw) Miodrag Milanovic2014-04-291-1/+0
|
* h8: Rewrite [O. Galibert] Olivier Galibert2014-03-251-0/+4
| | | (mess) mu100: Main screen turn on [O. Galibert]
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Aaron Giles] * these classes now no longer take a resource_pool; everything is managed globally -- this means that objects added to lists must be allocated with global_alloc * added new auto_pointer<> template which wraps a pointer and auto-frees it upon destruction; it also defaults to NULL so it doesn't need to be explicitly initialized * moved tagged_list template to tagmap.h Redo of the low-level memory tracking system: [Aaron Giles] * moved low-level tracking out of emu\emualloc into lib\util\corealloc so it can be shared among all components and used by core libraries * global_alloc and friends no longer use a resource pool to track allocations; turns out this was a wholly redundant system that wasted a lot of memory * removed global_resource_pool entirely * added global_free_array to delete arrays allocated with global_alloc_array * added tracking of object versus array allocation; we will now error if you use global_free on an array, or global_free_array on an object Added new utility helper const_string_pool which can be used to efficiently accumulate strings that are not intended to be modified. Used by updated makelist and software list code. [Aaron Giles] Updated png2bdc and makelist tools to not leak memory and use more modern techniques (no more MAX_DRIVERS in makelist, for example). [Aaron Giles] Deprecated auto_strdup and removed all uses by way of caller-managed astrings and the software list rewrite. [Aaron Giles] Rewrote software list management: [Aaron Giles] * removed the notion of a software_list that is separate from a software_list_device; they are one and the same now * moved several functions into device_image_interface since they really didn't belong in the core software list class * lots of simplification as a result of the above changes Additional notes (no whatsnew): Moved definition of FPTR to osdcomm.h. Some changes happened in the OSD code to fix issues, especially regarding freeing arrays. SDL folks may need to fix up some of these. The following devices still are using tokens and should be modernized (I found them because they kept their token as void * and tried to delete it, which you can't): namco_52xx_device (mame/audio/namco52.c) namco_54xx_device (mame/audio/namco54.c) namco_06xx_device (mame/machine/namco06.c) namco_50xx_device (mame/machine/namco50.c) namco_51xx_device (mame/machine/namco51.c) namco_53xx_device (mame/machine/namco53.c) voodoo_device (emu/video/voodoo.c) mos6581_device (emu/sound/mos6581.c) aica_device (emu/sound/aica.c) scsp_device (emu/sound/scsp.c) dmadac_sound_device (emu/sound/dmadac.c) s3c2440_device (emu/machine/s3c2440.c) wd1770_device (emu/machine/wd17xx.c) latch8_device (emu/machine/latch8.c) duart68681_device (emu/machine/68681.c) s3c2400_device (emu/machine/s3c2400.c) s3c2410_device (emu/machine/s3c2410.c) strataflash_device (mess/machine/strata.c) hd63450_device (mess/machine/hd63450.c) tap_990_device (mess/machine/ti99/990_tap.c) omti8621_device (mess/machine/omti8621.c) vdt911_device (mess/video/911_vdt.c) apollo_graphics_15i (mess/video/apollo.c) asr733_device (mess/video/733_asr.c)
* Another round of auto_alloc_array conversions. Aaron Giles2014-02-201-3/+2
| | | | | Some minor enhancements to dynamic_array, including clearing to specific values and expanding and clearing newly allocated values.
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* New AM_(DEV)SETOFFSET feature for address maps. Michael Zapf2013-09-211-0/+18
|
* Cleanups and version bumpmame0149u1 Miodrag Milanovic2013-07-231-1/+1
|
* Memory system: added endianness to the memory_share class. Aaron Giles2013-07-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tilemap system: numerous changes: * Moved remaining legacy macros and typedefs to tilelgcy.h. This revealed a few drivers mixing and matching modern & legcy, which have now been fixed. * Changed get info callback signature to no longer pass the user_data pointer, but instead pass a reference to the tilemap object itself. Updated those few drivers using user_data to pull it out of the tilemap object with the new user_data() getter method. * Changed get info and mapping callbacks to be device_delegates so that they can be described at config time. * Added tilemap_memory object that is used internally for reading/ writing to memory that backs a tilemap. This object is used to track a memory pointer that backs tilemap memory, and also is designed to transparently handle all bus width and endianness associated with reading and writing data in a tilemap. * Incorporated two tilemap_memory objects (basemem and extmem) into the tilemap object and added accessors to them, as well as read/write handlers for reading/writing to entries stored in the memory. This means that tilemap get info callbacks can now easily read data out of the tilemap in a generic way. * Rejiggered the initialization sequence for tilemap objects so that the tilemap_manager is not required to be present at instantiation. * Created a new tilemap_device, which can be used to declare a tilemap in the machine config, and which also is a tilemap object itself. The tilemap device will look for shared memory regions called "<tag>" and "<tag>_ext" and automatically plug them into the tilemap. The device also provides write handlers that can be used to write to the tilemap memory and mark tiles dirty, saving the need for each driver to write their own. Device system: moved required/optional device finders to a new header devfind.h. Atari drivers: removed all playfield and alpha memory and tilemap variables, apart from those needed by atarivc-using games (this will become a device in a future update). Updated all Atari 16-bit drivers to use the new tilemap_device instead, which provides all the needed functionality in a more generic way.
* memory: Need moar tables [O. Galibert] Olivier Galibert2013-06-151-8/+10
|
* Cleanups and version bumpmame0149 Miodrag Milanovic2013-06-111-17/+17
|
* Cleanup. (nw) Curt Coder2013-06-101-8/+8
|
* Added macros for read/write delegates. [Curt Coder] Curt Coder2013-06-061-0/+20
|
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-212/+212
|
* added missing initialization of memory_share.m_next (nw) Oliver Stöneberg2012-12-261-1/+2
|
* memory: Fix dynamic recursive device mapping [O. Galibert] Olivier Galibert2012-10-101-1/+1
| | | | | | | | | | | Situation: - you have a device (pc-fdc) with a memory map on it - you map it dynamically into a cpu (maincpu) address space with install_device (isa-fdc does that) - the device pc-fdc has a subdevice (upd765) - the subdevice upd765 has its own memory map - the pc-fdc memory map includes the upd765 memory map through AM_DEVICE("upd765", ...) Before the fix, the code would search for upd765 as a subdevice of maincpu and not of pc-fdc.
* Moved device_delegates into their own files. Employed a Aaron Giles2012-09-261-10/+10
| | | | | | | | | | | | | non-templatized helper class so that the code can live co-located, rather than invading device.h. Changed the read/write delegates to derive from device_delegate. Updated the address map macros to create these properly. Removed remnants of the old AM_BASE/SIZE macros from the memory system.
* Remove all traces of read/write*_device_func from memory.c. Aaron Giles2012-09-181-12/+12
| | | | | | All legacy device callbacks are now promoted to delegates and handed off to the modern read/write handler managers. Fixed ibm5150 and surely many other broken systems. (nw)
* Memory handler cleanup 3. Add mem_mask parameter Aaron Giles2012-09-171-4/+13
| | | | | | | | to 8-bit handlers to match the others. To ease pain, added DECLARE_READ/WRITE_HANDLER macros that set up a default parameter. Also updated devcb so that the handlers can be called with or without the mem_mask. [Aaron Giles]
* Memory handler normalization, part 2. Change legacy Aaron Giles2012-09-171-31/+31
| | | | | | | read/write handlers to take an address_space & instead of an address_space *. Also update pretty much all other functions to take a reference where appropriate. [Aaron Giles]
* Memory handler normalization, part 1. Aaron Giles2012-09-171-16/+25
| | | | | | | | | | | | | READ/WRITE_DEVICE*_HANDLERs are now passed an address_space &, and the 8-bit variants get a mem_mask as well. This means they are now directly compatible with the member function delegates. Added a generic address space to the driver_device that can be used when no specific address space is available. Also added DECLARE_READ/WRITE_DEVICE*_HANDLER macros to declare device callbacks with default mem_mask parameters. [Aaron Giles]
* memory: Add support for dynamically mapping devices [O. Galibert] Olivier Galibert2012-08-031-1/+12
| | | | | | | | | | | | | | | | | | Just call install_device on the space with as parameters: - start and end of the mapping zone - device (not pointer to the device) - map method and optionally, if the device data width is not the same than the space data width: - device data width (for consistency checking) - unit mask For instance, the static mapping: AM_RANGE(0x02114100, 0x02114107) AM_DEVICE8("fdc", n82077aa_device, amap, 0xffffffff) can be converted to a dynamic mapping (where fdc is a pointer to the device): machine().device("maincpu")->memory().space(AS_PROGRAM)-> install_device(0x02114100, 0x02114107, *fdc, &n82077aa_device::amap, 8, 0xffffffff);
* Use a tagged_list for memory_banks. Aaron Giles2012-04-241-3/+2
|
* Clean-ups and version bumpmame0145u7 Angelo Salese2012-04-221-1/+1
|
* Make memory shares follow the same pattern as memory Aaron Giles2012-04-201-4/+1
| | | | regions and memory banks, accessible only via the device.
* Changed device->subregion to device->memregion. Moved Aaron Giles2012-04-201-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memory_region management into the memory manager instead of directly in the machine. Hid the global region method; now all regions must be looked up relative to a device. If you're a member function, you can just use memregion("tag") directly. If you're a global function or a device referencing global regions, use machine().root_device().memregion("tag") to look up regions relative to the root. S&R to convert all references: machine([()]*)\.region machine\1\.root_device\(\).subregion Then remove redundant machine().root_device() within src/mame: ([ \t])machine\(\)\.root_device\(\)\. \1 And use state->memregion() if we have a state variable present: (state *= *[^;]+driver_data[^}]+)([^ \t]*)machine[()]*\.root_device\(\)\. \1state-> Finally some cleanup: screen.state-> state-> device->state-> state-> space->state-> state-> And a few hand-tweaks.