summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/memory.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-4867/+0
|
* making logerror part of machine and device classes [Miodrag Milanovic] Miodrag Milanovic2015-11-011-4/+4
| | | | display tag of device that logged message
* Removed some unused variables (nw) Miodrag Milanovic2015-10-271-2/+0
|
* thomson.c: reduce tagmap lookups (nw) Wilbert Pol2015-08-021-0/+24
|
* blame balrog for this :) (NW) Cowering2015-07-081-2/+2
|
* memory: Remove support for decrypted bases, use an address space instead [O. ↵ Olivier Galibert2015-06-241-112/+10
| | | | Galibert]
* small cleanup (nw) Miodrag Milanovic2015-04-221-20/+14
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-10/+12
|
* some astring to std::string conversion (nw) Miodrag Milanovic2015-04-181-10/+10
|
* Replace dynamic_array with std::vector [O. Galibert] Olivier Galibert2015-04-141-15/+22
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-9/+9
|
* cstr() - > c_str() as preparation for move to std::string (nw) Miodrag Milanovic2015-04-111-7/+7
|
* save: Give the device when available to the state save subsystem [O. Galibert] Olivier Galibert2015-02-141-2/+2
|
* fixed -fsanitize=null error in address_space::prepare_map() (nw) Oliver Stöneberg2015-01-221-1/+1
| | | | by Olivier Galibert
* Fix various typos Zoë Blade2014-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 040fd169bfd6845b33d3f86fd66afb4a632605c6 Author: Zoë Blade <zoe@bytenoise.co.uk> Date: Sun Nov 30 22:24:30 2014 +0000 Fix more typos in comments commit 6121ae593008a574735427e047fdb7a16f4fa47f Author: Zoë Blade <zoe@bytenoise.co.uk> Date: Sun Nov 30 22:20:37 2014 +0000 Fix more typos Not all are in comments this time, but the vast majority are, and the rest are in printed text. None are variable or constant names. commit 84bc72573009bb46f5601f7257a7f7538f25cfc2 Author: Zoë Blade <zoe@bytenoise.co.uk> Date: Sun Nov 30 22:01:46 2014 +0000 Fix some typos
* Cleanups and version bumpmame0156 Miodrag Milanovic2014-11-261-1/+1
|
* Touching all the candy again: [Alex Jackson] Alex W. Jackson2014-11-171-2/+3
| | | | | | | | | | | | | | | | 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.
* fixed signed integer overflow in address_table::subtable_open() - by O. ↵ Oliver Stöneberg2014-10-231-1/+2
| | | | Galibert (nw)
* fix winrun missing 3D Michaël Banaan Ananas2014-10-041-1/+1
| | | (this changes STATIC_COUNT from 0x100 to 0xff)
* Memory system and Namco improvements: [Alex Jackson] Alex W. Jackson2014-09-181-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicit regions in address maps (AM_REGION) are now looked up relative to the device rather than as siblings when in an internal address map (similar to devices and shared pointers) Besides being more orthogonal than before, this allows internal ROMs of MCUs and similar devices to be hooked up in a nicer and more foolproof way. Updated the m37710 and m5074x (m6502 derivative) to take advantage of this. Divided the M37702/M37710 into specific models, with each model having its own internal address map containing the correct amounts of internal RAM and ROM. M37702 MCUs found on various Namco PCBs are now all unique devices and have their respective internal ROMs loaded as device ROMs. (nw) Also did some spring (fall) cleaning in addrmap.c/memory.c/dimemory.c m_devbase (the base device used for tagmap lookup when late-binding handlers and finding memory regions and shares) is now a reference rather than a pointer, since we know what it is when the address_map_entry is constructed and it doesn't change (it depends solely on whether it's an entry in an MCFG-provided address map or an internal one) And for the same reason, there's now only one m_devbase per address_map_entry rather than individual copies for read/write/setoffset/sharedptr. Removed mysterious unused address_map_entry member "m_region_string", along with a silly assert probably left over from when Aaron was replacing AM_BASE with AM_SHARE years ago. Added a comment noting that "make sure all devices exist" in device_memory_interface::interface_validity_check() actually does nothing, like the proverbial goggles. The reason there's just a comment and not a fix is I haven't figured out how to fix it yet (is it possible to extract the original device tag that was given to a proto-delegate? Sorry, the template hell in devdelegate.h and lib/util/delegate.h makes me want to run screaming like a little girl)
* memory.c: fix memdump output for nop/unmapped/watchpoint entries, broken by ↵ Alex W. Jackson2014-09-161-47/+11
| | | | r31731 (nw)
* fm77av: converted various MMU functions to use bankdev. Dragon Buster is now mahlemiut2014-08-221-1/+1
| | | | | | almost 3 times faster than it was. memory.c: increased static handler limit, so that having a larger number of address map bank devices don't hit it.
* Cleanups and version bump Miodrag Milanovic2014-07-221-1/+0
|
* Grrrrr (nw) Olivier Galibert2014-05-181-1/+1
|
* removed lot of legacy code in memory system and removed corresponding macros ↵ Miodrag Milanovic2014-05-051-561/+76
| | | | (nw)
* finished comment in previous commit (nw) Oliver Stöneberg2014-05-031-1/+1
|
* disable logging of unmapped memory accesses when neither -log nor -debug is ↵ Oliver Stöneberg2014-05-031-10/+21
| | | | specified (nw)
* memory: Stop the watchpoints from messing with the opcode decryption [O. ↵ Olivier Galibert2014-04-171-2/+13
| | | | Galibert]
* Moved eminline and related files into /src/osd since it's system related (nw) Miodrag Milanovic2014-04-161-1/+1
| | | | | | | | Moved delegates into /src/lib/util to enable usage of delegates in other project parts Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* Changed mess.mak to display compilation of ymmu100.ppm nicely
* device_gfx_interface and memory system improvements: [Alex Jackson] Alex W. Jackson2014-04-081-12/+12
| | | | | | | | | | | Added macros to facilitate declaring gfxdecode info arrays as members of a device class. AM_SHAREs in a device's internal address map or its default address map are now tagmapped as children of that device rather than siblings (analogous to how handlers in internal/default address maps are scoped). Converted the Namco C45 to device_gfx_interface.
* use ARRAY_LENGTH (nw) Oliver Stöneberg2014-04-031-1/+1
|
* Moved core template container classes up from emutempl.h to coretmpl.h: Aaron Giles2014-03-111-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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)
* Fix gcc 4.8 compile (nw) Alex W. Jackson2014-02-201-2/+1
|
* Another round of auto_alloc_array conversions. Aaron Giles2014-02-201-35/+20
| | | | | 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-1/+142
|
* Memory system: added endianness to the memory_share class. Aaron Giles2013-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-80/+82
|
* memory: Fix subunit reconfiguration [O. Galibert] Olivier Galibert2013-06-121-3/+3
| | | | | | | | | | | | To hit this bug you need to have two subsized handlers on the same address with a different starting address. Something like, in a 64-bits address map: AM_RANGE(0x00, 0x1f) AM_READ32(r1_r, 0xffffffff00000000) AM_RANGE(0x10, 0x1f) AM_READ32(r2_r, 0x00000000ffffffff) Then r2_r (last entry) was called with an incorrect offset. To say that this configuration does not happen often is an understatement.
* Fix address_space_specific::get_write_ptr() -nw- Phil Bennett2013-05-281-1/+1
|
* use proper free function for address_space.m_direct (nw) Oliver Stöneberg2013-02-211-1/+1
|
* memory: Add another missing 32->64 bits conversion when building the ↵ Oliver Stöneberg2013-02-111-1/+1
| | | | invsubmask (nw)
* memory: Add missing 32->64 bits conversion when building the invsubmask ↵ Olivier Galibert2013-02-101-1/+1
| | | | [Oliver Stöneberg]
* replaced bogus memcpy in handler_entry_{read|write} - fixes Visual ↵ Oliver Stöneberg2013-02-031-2/+30
| | | | Studio-only issues/crashes in paso1600, multi16, x68030 and t1000* sets (MT05124,MT05110,MT05112) [Olivier Galibert]
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-246/+246
|
* memory: Map from the cpu's owner, not the root device, otherwise siblings of ↵ Olivier Galibert2012-10-121-1/+1
| | | | cpus coming from config fragments aren't happy. [O. Galibert]
* memory: Fix dynamic recursive device mapping [O. Galibert] Olivier Galibert2012-10-101-2/+2
| | | | | | | | | | | 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-36/+14
| | | | | | | | | | | | | 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-216/+0
| | | | | | 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-8/+8
| | | | | | | | 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]