| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
(this changes STATIC_COUNT from 0x100 to 0xff)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
r31731 (nw)
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
(nw)
|
| |
|
|
|
|
| |
specified (nw)
|
|
|
|
| |
Galibert]
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[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)
|
| |
|
|
|
|
|
| |
Some minor enhancements to dynamic_array, including clearing to specific values
and expanding and clearing newly allocated values.
|
|
|
|
| |
to new license tagged form.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
invsubmask (nw)
|
|
|
|
| |
[Oliver Stöneberg]
|
|
|
|
| |
Studio-only issues/crashes in paso1600, multi16, x68030 and t1000* sets (MT05124,MT05110,MT05112) [Olivier Galibert]
|
| |
|
|
|
|
| |
cpus coming from config fragments aren't happy. [O. Galibert]
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
intended differences from previous behavior. For drivers,
the main change is that input_port_read() no longer exists.
Instead, the port must be fetched from the appropriate device,
and then read() is called.
For member functions, this is actually simpler/cleaner:
value = ioport("tag")->read()
For legacy functions which have a driver_data state, it goes:
value = state->ioport("tag")->read()
For other legacy functions, they need to fetch the root device:
value = machine.root_device().ioport("tag")->read()
The other big change for drivers is that IPT_VBLANK is gone.
Instead, it has been replaced by a device line callback on the
screen device. There's a new macro PORT_VBLANK("tag") which
automatically points things to the right spot.
Here's a set of imperfect search & replace strings to convert
the input_port_read calls and fix up IPT_VBLANK:
input_port_read( *\( *)(machine\(\)) *, *([^)]+ *\))
ioport\1\3->read\(\)
input_port_read( *\( *)(.*machine[()]*) *, *([^)]+ *\))
\2\.root_device\(\)\.ioport\1\3->read\(\)
(state = .*driver_data[^}]+)space->machine\(\)\.root_device\(\)\.
\1state->
(state = .*driver_data[^}]+)device->machine\(\)\.root_device\(\)\.
\1state->
input_port_read_safe( *\( *)(machine\(\)) *, *([^,]+), *([^)]+\))
ioport\1\3->read_safe\(\4\)
IPT_VBLANK( *\))
IPT_CUSTOM\1 PORT_VBLANK("screen")
|
| |
|
| |
|
|
|
|
|
|
| |
Removed global port lookups, now all lookups must be
done through device_t::ioport().
|
|
|
|
| |
regions and memory banks, accessible only via the device.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subbanks of a device and directly acting on them.
First round S&R:
memory_configure_bank( *)\(( *)([^,]+), *([^,]+), *
\3.root_device().subbank\1\(\2\4\2\)->configure_entries\1\(\2
memory_configure_bank_decrypted( *)\(( *)([^,]+), *([^,]+), *
\3.root_device().subbank\1\(\2\4\2\)->configure_decrypted_entries\1\(\2
memory_set_bank( *)\(( *)([^,]+), *([^,]+), *
\3.root_device().subbank\1\(\2\4\2\)->set_entry\1\(\2
memory_set_bankptr( *)\(( *)([^,]+), *([^,]+), *
\3.root_device().subbank\1\(\2\4\2\)->set_base\1\(\2
Then convert single entries to simpler form:
configure_entries( *\( *[^,]+, *)1 *, *([^,]+),[^)]+\)
configure_entry\1\2\)
configure_decrypted_entries( *\( *[^,]+, *)1 *, *([^,]+),[^)]+\)
configure_decrypted_entry\1\2\)
Remove renundant root_device lookup for methods:
([ \t])machine\(\)\.root_device\(\)\.
\1
Use state-> instead of root_device lookup where available (this
one must be done by hand unfortunately):
([^ \t]*)machine[()]*\.root_device\(\)\.
state->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bank manipulation APIs from memory_manager, and instead added a
memory_manager::bank("tag") function which will return a pointer to
the representative memory_bank. Operations can then be performed as
expected directly on the memory_bank. Most code did not need an update
yet, as I haven't done the search/replace to move away from global
functions (which still exist for now).
Added device_t::subbank("tag") to return a bank that is owned by the
given device.
Switched YM2151 interfaces over to devcb callbacks.
Created proper sound devices for the Williams NARC, CVSD and ADPCM
sound boards. Updated midyunit, midtunit, williams(joust2), and
mcr68(archrivl/pigskin/trisport) to use the new devices.
|
|
|
|
|
|
|
|
| |
This update passes validity checks but will certainly have
a number of drivers failing at startup because all pointers
are defaulted to required by the automated scripts used.
Will fix problems once we get a regression run to find out
which drivers need attention.
|
| |
|
| |
|
|
|
|
|
|
| |
operations into methods on it. Converted the less-popular cases over
in drivers that used them, leaving the bank management APIs global
for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
driver_device base class. The palette base is now specified via an
AM_SHARE of "paletteram" or "paletteram2". The driver_device base
class now finds these pointers and places them in
m_generic_paletteram_8/_16/_32 and m_generic_paletteram2_8/_16/_32.
Removed machine.generic.paletteram*, and machine.generic entirely.
Removed AM_BASE_GENERIC/AM_SIZE_GENERIC as they don't apply anymore.
Changed required_/optional_shared_ptr to support set_target with
base and size for manually configuring a shared pointer, and a new
allocate method for dynamically allocating (and registering the
memory for save states).
A few subsequent cleanups are coming related to this, but wanted
to get this in before the next modern push.
|
|
|
|
| |
use emu.h (nw)
|