diff options
author | 2020-11-08 05:43:57 +1100 | |
---|---|---|
committer | 2020-11-08 05:43:57 +1100 | |
commit | 7dcf0c013f499946cbf050d3560b8b8270744dd4 (patch) | |
tree | 2d8214efb123ed987a7bee0f42c6beee2c351ef9 /docs/source/techspecs | |
parent | db7343d4ab4903062a0624d06ef6301e8f94285a (diff) |
emu/devfind.h: Added missing memory_share_array_creator.
Also some miscellaneous tidying up.
Diffstat (limited to 'docs/source/techspecs')
-rw-r--r-- | docs/source/techspecs/object_finders.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/source/techspecs/object_finders.rst b/docs/source/techspecs/object_finders.rst index 0a47ff7835d..3fd8be922fd 100644 --- a/docs/source/techspecs/object_finders.rst +++ b/docs/source/techspecs/object_finders.rst @@ -343,6 +343,8 @@ finder array types are provided. The object finder array type names have +------------------------+------------------------------+ | optional_shared_ptr | optional_shared_ptr_array | +------------------------+------------------------------+ +| memory_share_creator | memory_share_array_creator | ++------------------------+------------------------------+ A common case for an object array finder is a key matrix:: @@ -435,3 +437,23 @@ brace-enclosed initialiser list of tags:: private: required_device_array<dm9368_device, 6> m_digits; }; + +If the underlying object finders require additional constructor arguments, +supply them after the tag format and index offset (the same values will be used +for all elements of the array):: + + class dreamwld_state : public driver_device + { + public: + dreamwld_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_vram(*this, "vram_%u", 0U, 0x2000U, ENDIANNESS_BIG) + { + } + + private: + memory_share_array_creator<u16, 2> m_vram; + }; + +This finds or creates memory shares with tags ``vram_0`` and ``vram_1``, each of +of which is 8 KiB organised as 4,096 big-Endian 16-bit words. |