| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Read callbacks now need a default return value supplied at construction.
Replaced isnull() with isunset() which tells you if the callback wasn't
configured rather than whether it isn't safe to call.
Enabled validation of device callbacks (it seems it was disabled at some
point, probably accidentally).
Device callbacks and object finders now implement the same interface for
resolution.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies looking up the target device during configuration. It
is useful when configuring child devices in things like CPUs with
integrated peripherals.
emu/device.h: Allow templated subdevice() and siblingdevice() to work
with classes that don't derive from device_t (e.g. classes that derive
from device_interface).
util/delegate.h: Added more noexcept. Won't make much difference as
most of the affected member functions are inline anyway.
|
|
|
|
|
|
|
|
|
| |
* emu/devfind.h: Allow range-based for loops on memory share finders.
* emu/emucore.h: Choose correct emu_fatalerror constructor when format
string is an rvalue.
* osborne/osborne1.cpp: Allocate main RAM as a flat share, and use a
view to switch in atttribute RAM.
* Reduced scope of some variables and edited some copy/pasted comments.
|
|
|
|
|
|
| |
nonsense for byte-width RAM"
This reverts commit cfbffd321529cc21a5880e16c6a66c750f3b3e3b.
|
|
|
|
| |
byte-width RAM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The UI controls are described as zoom in/out, but they had the
opposite effect on the palette and tile viewers. That has been
changed to make them consistent with the tilemap viewer.
* Made the default zoom key not act as a toggle. People are familiar
with the function of Ctrl+0/=/- in web browsers, so making them behave
similarly in MAME should make it more approachable. Also added the
default zoom key to the relevant documentation page.
* Implemented the default zoom key for the palette and tile viewers.
* In the tilemap viewer, if the view is in default expand to fit mode,
zoom in/out starting from the actual zoom ratio. Once again, this
behaves more like the zoom controls in a web browser displaying an
image so it should be more intuitive.
* Made more messages from the tilemap viewer localisable.
-util/zippath.cpp: Fixed MT08074.
* There were multiple issues at play here. After #8443 was applied,
is_root was simply never returning true on Windows, as OSD_WINDOWS
isn't actually defined outside libosd and libocore. This caused
phantom parent items to appear in disk roots on Windows, but it meant
that the check in zippath_resolve would always fail so the trailing
backslash would be trimmed. Fixing the macro test in is_root meant
the trailing backslash from C:\ would no longer be trimmed, which
caused the stat in zippath_resolve to fail.
-bigbord2.cpp: Hooked up floppy DRQ that had somehow got lost.
-Reduced tag map lookups in several drivers and devices.
-util/coretmpl.h: Removed an overload of bitswap that can be avoided
using if constexpr.
-Added doxygen comments to some classes, and fixed several doxygen
warnings.
-util, osd: Test for _WIN32 rather than WIN32.
* In C++17 mode, WIN32 is no longer a predefined macro, although various
things in 3rdparty define it to maintain legacy support. We're better
off moving forward anyway for when WIN32 disappears entirely. (WIN32
is not a reserved name, while _WIN32 is, starting with an underscore
follwed by an uppercase letter.)
|
|
|
|
|
|
|
|
|
| |
Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter.
unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename.
Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums.
Allow mounting TI-99 RPK from inside archives.
|
|
|
|
|
| |
* Refactored mas3507d and k573dio/fpga to be more accurate to real hardware.
-3rdparty/minimp3: Updated to latest master and removed local changes.
|
|
|
|
|
|
|
|
|
|
|
| |
* Removed .mask(), as it’s not reliable in the general case.
* Added asserts to things that assume power-of-two sizes.
* Got rid of virtual qualifier on pointer-to-member operator.
* Made helpers a bit more assertive about logging warnings.
-emu/rendlay.cpp: Use delegates to avoid hot conditional branches.
-docs: Finished off description of object finders and output finders.
|
|
|
|
| |
Also some miscellaneous tidying up.
|
|
|
|
| |
-docs: Added the next couple of sections explaining object finders.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Harmonised memory region/share finder/creator APIs.
* Moved .found() to optional object finders.
* Added truth test operator to optional object finders.
* Fixed things that were testing .found() on required object finders.
* Improved Doxygen API documentation.
-dec8.cpp: Moved csilver to its own state class.
-docs: Added some notes about setting up and using MSYS2.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
API impact:
- install_ram/rom/writeonly now requires a non-null pointer. If you want
automatically managed ram, add it to a memory map, not in machine_start
- install_*_bank now requires a memory_bank *, not a string
- one can create memory banks outside of memory maps with memory_bank_creator
- one can create memory shares outside of memory maps with memory_share_creator
Memory maps impact:
- ram ranges with overlapping addresses are not shared anymore. Use .share()
- ram ranges touching each other are not merged anymore. Stay in your range
Extra note:
- there is no need to create a bank just to dynamically map some memory/rom.
Just use install_rom/ram/writeonly
|
|
|
|
| |
to make purpose more obvious.
|
|
|
|
| |
(excluding slot cards)
|
| |
|
|
|
|
| |
comments to doxygen format
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* screen: validate crystal values used for set_raw
* driver: get rid of sound start/reset overrides in machine configuration
* vrender0.cpp, nexus3d.cpp: corrected pixel clock crystal value
* mw8080bw.cpp: turned several audio subsystems into devices
* bus/sat_ctrl: don't start subdevices in device_start - the machine does it for you
* mb14241.cpp: simplify handlers
* fgoal.cpp: updated for simplified handlers
* devfind, screen: repair some doxy comments that had rotted with refactoring
* doxygen: disable warnings for undocumented things - it's most of our codebase
* snowbros.cpp: restore an output level setting lost in MCFG removal
There's an outstanding validation error from the HP98543 DIO video card
not using a valid crystal value. Someone needs to find a picture of the
card and confirm or deny the existence of the 39.504MHz crystal.
The various start/reset overrides are bugs waiting to happen. It's not
immediately obvious that the ones run earlier can end up being called
multiple times if subsequent ones throw missing dependencies exceptions.
They're a relic of when everything from the old C-style drivers was
thrown into classes all jumbled together.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
|
|
|
|
|
| |
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing
changes made to 009cba4fb8102102168ef32870892438327f3705.
|
| |
|
|
|
|
| |
(nw) The constructor and set_tag methods for required_address_space and optional_address_space work slightly differently from other finders in that they take the address space number as an extra argument. There is also an option to request a space having a specific data width, and validation checks this as well as the space number. There is also no (required|optional)_address_space_array, but that shouldn't really be necessary since devices shouldn't need large numbers of these finders.
|
|
|
|
|
|
|
|
|
|
| |
I'm not sure this API is a great idea - see inline comment on https://github.com/mamedev/mame/commit/796abaf7f3200a96499440a4c40bec3440d55209
I realise it seems intuitive, but it breaks with a use-after-free (not even a
validity error) if you replace/remove the target device. Implementing it in a
way that isn't fragile and doesn't hurt the performance of -romident,
-validate and -listxml seems impossible. If it causes developer confusing and
things start breaking, back to literal tags we go for this case.
|
|
|
|
| |
happens to be an interface (nw)
|
| |
|
|
|
|
|
|
|
| |
suddenly silenced
* streamline templates in addrmap.h
* get rid of overloads on read/write member names - this will become even more important in the near future
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
start in a safer way
devfind: revert previous change - if finders aren't set in stone after device_resolve_objects it's going to lead to all kinds of hard-to-diagnose bugs (I'll add more checks for this some time after release)
(nw) also clean up rotting tabulation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start replacing special device macros with additional constructors,
starting with ISA, INTELLEC 4 and RS-232 buses.
Allow an object finder to take on the target of another object finder.
(For a combination of the previous two things in action, see either the
INTELLEC 4 driver, or the Apple 2 PC Exporter card. Also check out
looping over a device finder array to instantiate devices in some
places. Lots of things no longer need to pass tags around.)
Start supplying default clocks for things that have a standard clock or
have all clocks internal.
Eliminate the separate DEV versions of the DEVCB_ macros. Previously,
the plain versions were a shortcut for DEVICE_SELF as the target. You
can now supply a string tag (relative to current device being
configured), an object finder (takes on the base and relative tag), or
a reference to a device/interface (only do this if you know the device
won't be replaced out from under it, but that's a safe assumption for
your subdevices). In almost all cases, you can get the effect you want
by supplying *this as the target.
Eliminate sound and CPU versions of macros. They serve no useful
purpose, provide no extra checks, make error messages longer, add
indirection, and mislead newbies into thinking there's a difference.
Remove a lot of now-unnecessary ":" prefixes binding things relative to
machine root.
Clean up some miscellaneous rot.
Examples of new functionality in use in (some more subtle than others):
* src/mame/drivers/intellec4.cpp
* src/mame/drivers/tranz330.cpp
* src/mame/drivers/osboren1.cpp
* src/mame/drivers/zorba.cpp
* src/mame/devices/smioc.cpp
* src/devices/bus/a2bus/pc_xporter.cpp
* src/devices/bus/isa/isa.h
* src/devices/bus/isa/isa.h
* src/devices/bus/intellec4/intellec4.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allows defaulted clocks (see subtle example with vboy)
* Allows additional constructors (see RS232 port in tranz330)
* Allows use of device finder in place of tag in MCFG_DEVICE_ADD
* Requires out-of-line destructor for devices using incomplete types
* Requires XTAL or explicit u32 for clocks for devices with private types
Devices must still define the standard constructor. When writing
additional constructors, be aware that the constructor runs before
device_add_mconfig in the context of the existing device, not the new
device. See osborne1, zorba, tranz330, and vboy for examples of this in
use. Compilation is a bit slower, but this is temporary while
refactoring is in progress.
Eliminated the need for MCFG_SOUND_ROUTE_EX.
Removed macros from slot option configuration - they just obfuscated
code and slowed it down with needless dynamic casts, but didn't actually
simplify it.
|
|
|
|
|
|
|
|
|
|
| |
finder. This works outside machine configuration context so the
workarounds in ATA HLE and MSX slots are no longer necessary. It also
allows reduction in tag repetition in machine configuration (see
converted osborne1.cpp, zorba.cpp or the more extreme tranz330.cpp).
Allow reimagined device instantiation to take a device finder based on
current device being configured to reduce repetition (see tranz330.cpp).
|
|
|
|
|
|
|
|
| |
Also, look Ma - no magic prologue!
Slot card additions run in the context of the slot itself, which isn't
entirely intuitive. Slot configuration needs a bunch of other cleanup
anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the finder's owner. This meand you no longer need to care about the
your relationship to the object being configured and a lot of ^ and :
can disappear. There's a bit reduction in string pasting in macros from
this.
Yes, I have to make this apply to devcb etc. as well, but that's a job
for another day.
There's probably at least one thing broken by this where optional
objects are involved. Most things can be solved by just getting rid of
the now-problematic ^ and : prefixes.
|
| |
|
|
|
|
| |
range-based for and many algorithms to work)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h"
* Get rid of import of cstdint types to global namespace (C99 does this anyway)
* Remove the cstdint types from everything in emu
* Get rid of U64/S64 macros
* Fix a bug in dps16 caused by incorrect use of macro
* Fix debugcon not checking for "do " prefix case-insensitively
* Fix a lot of messed up tabulation
* More constexpr
* Fix up many __names
|
|
|
|
|
| |
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
|
| |
|
|
|
|
| |
Also, I added a size() accessor to object_array_finder. If there is a better way to do this, let me know.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
casts, dereferencing and array access, not something that's part pointer, part reference, part vector
* Require dummy tag to be specified explicitly, magical defaults are unhelpful here as the more common case it to search for a real object
* Make the search methods private in concrete classes where possible as users should rely on the resolution process for these things
Still can't hide the memory bank find method since atari400.cpp subverts the resolution process.
Can't get rid of set_target on shared_ptr_finder as it's abused all over the place.
|
| |
|
|
|
|
| |
more templates, more preparation for crud removal
|
| |
|
|
|
|
|
|
| |
* Eliminate a lot of boilerplate code from devfind.h
* Keep instantiation of templates in one place to improve build time
* Remove some dangerous accessors
|