| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[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)
|
|
|
|
| |
to new license tagged form.
|
|
|
| |
i8089: improved debugger view
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and set_state() to set_state_int() for consistency.
Update all callers. Also add set_pc() helper and updated
all callers to use that instead of set_state_int(STATE_GENPC)
[Aaron Giles]
Added device_t::state() method to get the state interface.
Added redundant device_state_interface::state() method to
catch redundant use of it. [Aaron Giles]
Removed cpu_get_reg() and cpu_set_reg() macros in favor of
using the above methods. [Aaron Giles]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and paths consistently for devices, I/O ports, memory
regions, memory banks, and memory shares. [Aaron Giles]
NOTE: there are likely regressions lurking here, mostly
due to devices not being properly found. I have temporarily
added more logging to -verbose to help understand what's
going on. Please let me know ASAP if anything that is being
actively worked on got broken.
As before, the driver device is the root device and all
other devices are owned by it. Previously all devices
were kept in a single master list, and the hierarchy was
purely logical. With this change, each device owns its
own list of subdevices, and the hierarchy is explicitly
manifest. This means when a device is removed, all of its
subdevices are automatically removed as well.
A side effect of this is that walking the device list is
no longer simple. To address this, a new set of iterator
classes is provided, which walks the device tree in a depth
first manner. There is a general device_iterator class for
walking all devices, plus templates for a device_type_iterator
and a device_interface_iterator which are used to build
iterators for identifying only devices of a given type or
with a given interface. Typedefs for commonly-used cases
(e.g., screen_device_iterator, memory_interface_iterator)
are provided. Iterators can also provide counts, and can
perform indexed lookups.
All device name lookups are now done relative to another
device. The maching_config and running_machine classes now
have a root_device() method to get the root of the hierarchy.
The existing machine->device("name") is now equivalent to
machine->root_device().subdevice("name").
A proper and normalized device path structure is now
supported. Device names that start with a colon are
treated as absolute paths from the root device. Device
names can also use a caret (^) to refer to the owning
device. Querying the device's tag() returns the device's
full path from the root. A new method basetag() returns
just the final tag.
The new pathing system is built on top of the
device_t::subtag() method, so anyone using that will
automatically support the new pathing rules. Each device
has its own internal map to cache successful lookups so
that subsequent lookups should be very fast.
Updated every place I could find that referenced devices,
memory regions, I/O ports, memory banks and memory shares
to leverage subtag/subdevice (or siblingtag/siblingdevice
which are built on top).
Removed the device_list class, as it doesn't apply any
more. Moved some of its methods into running_machine
instead.
Simplified the device callback system since the new
pathing can describe all of the special-case devices that
were previously handled manually.
Changed the core output function callbacks to be delegates.
Completely rewrote the validity checking mechanism. The
validity checker is now a proper C++ class, and temporarily
takes over the error and warning outputs. All errors and
warnings are collected during a session, and then output in
a consistent manner, with an explicit driver and source file
listed for each one, as well as additional device and/or
I/O port contexts where appropriate. Validity checkers
should no longer explicitly output this information, just
the error, assuming that the context is provided.
Rewrote the software_list_device as a modern device, getting
rid of the software_list_config abstraction and simplifying
things.
Changed the way FLAC compiles so that it works like other
external libraries, and also compiles successfully for MSVC
builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
existing modern devices and the legacy wrappers to work in this
environment. This in general greatly simplifies writing a modern
device. [Aaron Giles]
General notes:
* some more cleanup probably needs to happen behind this change,
but I needed to get it in before the next device modernization
or import from MESS :)
* new template function device_creator which automatically defines
the static function that creates the device; use this instead of
creating a static_alloc_device_config function
* added device_stop() method which is called at around the time
the previous device_t's destructor was called; if you auto_free
anything, do it here because the machine is gone when the
destructor is called
* changed the static_set_* calls to pass a device_t & instead of
a device_config *
* for many devices, the static config structure member names over-
lapped the device's names for devcb_* functions; in these cases
the members in the interface were renamed to have a _cb suffix
* changed the driver_enumerator to only cache 100 machine_configs
because caching them all took a ton of memory; fortunately this
implementation detail is completely hidden behind the
driver_enumerator interface
* got rid of the macros for creating derived classes; doing it
manually is now clean enough that it isn't worth hiding the
details in a macro
|
|
|
|
|
|
|
|
|
|
|
| |
meant adding a machine() accessor but it's worth it for consistency.
This will allow future changes from reference to pointer to happen
transparently for devices. [Aaron Giles]
Simple S&R:
m_machine( *[^ (!=;])
machine()\1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove redundant machine items from address_space and device_t.
Neither machine nor m_machine are directly accessible anymore.
Instead a new getter machine() is available which returns a
machine reference. So:
space->machine->xxx ==> space->machine().xxx
device->machine->yyy ==> device->machine().yyy
Globally changed all running_machine pointers to running_machine
references. Any function/method that takes a running_machine takes
it as a required parameter (1 or 2 exceptions). Being consistent
here gets rid of a lot of odd &machine or *machine, but it does
mean a very large bulk change across the project.
Structs which have a running_machine * now have that variable
renamed to m_machine, and now have a shiny new machine() method
that works like the space and device methods above. Since most of
these are things that should eventually be devices anyway, consider
this a step in that direction.
98% of the update was done with regex searches. The changes are
architected such that the compiler will catch the remaining
errors:
// find things that use an embedded machine directly and replace
// with a machine() getter call
S: ->machine->
R: ->machine\(\)\.
// do the same if via a reference
S: \.machine->
R: \.machine\(\)\.
// convert function parameters to running_machine &
S: running_machine \*machine([^;])
R: running_machine \&machine\1
// replace machine-> with machine.
S: machine->
R: machine\.
// replace &machine() with machine()
S: \&([()->a-z0-9_]+machine\(\))
R: \1
// sanity check: look for this used as a cast
(running_machine &)
// and change to this:
*(running_machine *)
|
|
|
|
| |
counter displays. [Robbbert]
|
|
|
|
| |
accordingly to keep beamx and beamy aligned. (no whatsnew)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
devices. Debugger now creates one for each device. C++-ified most
debugger operations to hang off the debugging class, and updated
most callers. This still needs a little cleanup, but it fixes most
issues introduced when the CPUs were moved to their own devices.
Got rid of cpu_count, cpu_first, cpu_next, etc. as they were badly
broken. Also removed cpu_is_executing, cpu_is_suspended,
cpu_get_local_time, and cpu_abort_timeslice.
Some minor name changes:
state_value() -> state()
state_set_value() -> set_state()
|
|
|
|
|
|
|
|
|
|
|
|
| |
this object which can be called multiple times to append new devices
after the initial machine configuration is set up. Updated member
variables to match new naming convention.
Changed the running_machine to take a constructed machine_config
object in the constructor, instead of creating one itself, for
consistency. Also added machine->total_colors() as a shortcut to
machine->config->m_total_colors.
|
|
|
|
| |
Fixes disassembly for sdl.
|
|
like them, but it's a start. Split implementation of individual view
types out to separate files. Updated all callers.
Also:
* fixed okim6295 memory view
* changed emualloc to free resource pools from earliest to latest
so that early objects can safely clean up stuff they allocated
|