Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mahlemiut committed Nov 24, 2023
2 parents 4019e29 + 95832c8 commit 70efc30
Show file tree
Hide file tree
Showing 621 changed files with 42,632 additions and 16,499 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ bool sockatmark(socket_type s, asio::error_code& ec)
# endif // defined(ENOTTY)
#else // defined(SIOCATMARK)
int value = ::sockatmark(s);
get_last_error(ec, result < 0);
get_last_error(ec, value < 0);
#endif // defined(SIOCATMARK)

return ec ? false : value != 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ PaError PaPulseAudio_StartStreamCb( PaStream * s )
pulseaudioState = pa_stream_get_state( stream->outputStream );
PaPulseAudio_UnLock( pulseaudioHostApi->mainloop );

if( pulseaudioState = PA_STREAM_READY )
if( pulseaudioState == PA_STREAM_READY )
{
break;
}
Expand Down
4 changes: 2 additions & 2 deletions android-project/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mamedev.mame"
android:versionCode="259"
android:versionName="0.259"
android:versionCode="260"
android:versionName="0.260"
android:installLocation="auto">

<!-- OpenGL ES 2.0 -->
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
# built documents.
#
# The short X.Y version.
version = '0.259'
version = '0.261'
# The full version, including alpha/beta/rc tags.
release = '0.259'
release = '0.261'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 3 additions & 0 deletions docs/source/initialsetup/compilingmame.rst
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@ NO_USE_PORTAUDIO
NO_USE_PULSEAUDIO
Set to **1** to disable building the PulseAudio sound output module on
Linux.
USE_WAYLAND
Set to **1** to include support for bgfx video output with the Wayland
display server.
USE_TAPTUN
Set to **1** to include the tap/tun network module, or set to **0** to
disable building the tap/tun network module. The tap/tun network module is
Expand Down
10 changes: 5 additions & 5 deletions docs/source/luascript/ref-common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ Methods
emu.wait(duration, …)
Yields for the specified duration in terms of emulated time. The duration
may be specified as an :ref:`attotime <luascript-ref-attotime>` or a number
in seconds. Any additional arguments are returned to the caller. Returns a
Boolean indicating whether the duration expired normally.
in seconds. Any additional arguments are returned from the coroutine.
Returns a Boolean indicating whether the duration expired normally.

All outstanding calls to ``emu.wait`` will return ``false`` immediately if a
saved state is loaded or the emulation session ends. Calling this function
from callbacks that are not run as coroutines will raise an error.
emu.wait_next_update(…)
Yields until the next video/UI update. Any arguments are returned to the
caller. Calling this function from callbacks that are not run as coroutines
Yields until the next video/UI update. Any arguments are returned from the
coroutine. Calling this function from callbacks that are not run as coroutines
will raise an error.
emu.wait_next_frame(…)
Yields until the next emulated frame completes. Any arguments are returned
to the caller. Calling this function from callbacks that are not run as
from the coroutine. Calling this function from callbacks that are not run as
coroutines will raise an error.
emu.add_machine_reset_notifier(callback)
Add a callback to receive notifications when the emulated system is reset.
Expand Down
18 changes: 14 additions & 4 deletions docs/source/luascript/ref-mem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -419,18 +419,28 @@ manager.machine.devices[tag]:memregion(tag)
Methods
~~~~~~~

region:read(offs, len)
Reads up to the specified length in bytes from the specified offset in the
memory region. The bytes read will be returned as a string. If the
specified length extends beyond the end of the memory region, the returned
string will be shorter than requested. Note that the data will be in host
byte order.
region:read_i{8,16,32,64}(offs)
Reads a signed integer value of the size in bits from the specified offset
in the memory region.
in the memory region. The offset is specified in bytes. Reading beyond the
end of the memory region returns zero.
region:read_u{8,16,32,64}(offs)
Reads an unsigned integer value of the size in bits from the specified
offset in the memory region.
offset in the memory region. The offset is specified in bytes. Reading
beyond the end of the memory region returns zero.
region:write_i{8,16,32,64}(offs, val)
Writes a signed integer value of the size in bits to the specified offset in
the memory region.
the memory region. The offset is specified in bytes. Attempting to write
beyond the end of the memory region has no effect.
region:write_u{8,16,32,64}(offs, val)
Writes an unsigned integer value of the size in bits to the specified offset
in the memory region.
in the memory region. The offset is specified in bytes. Attempting to
write beyond the end of the memory region has no effect.

Properties
~~~~~~~~~~
Expand Down
69 changes: 61 additions & 8 deletions docs/source/luascript/ref-render.rst
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,9 @@ emu.bitmap_yuy16(source, [x0, y0, x1, y1])
format. Raises an error if coordinates are specified representing a
rectangle not fully contained within the source bitmap’s clipping rectangle.
emu.bitmap_rgb32(source, [x0, y0, x1, y1])
Creates an RGB format bitmap with 4:2:2 chroma subsampling representing a
view of a portion of an existing bitmap. The initial clipping rectangle is
set to the bounds of the view. The source bitmap will be locked, preventing
resizing and reallocation.
Creates an RGB format bitmap representing a view of a portion of an existing
bitmap. The initial clipping rectangle is set to the bounds of the view.
The source bitmap will be locked, preventing resizing and reallocation.

If no coordinates are specified, the new bitmap will represent a view of the
source bitmap’s current clipping rectangle. If coordinates are specified,
Expand All @@ -496,10 +495,10 @@ emu.bitmap_rgb32(source, [x0, y0, x1, y1])
format. Raises an error if coordinates are specified representing a
rectangle not fully contained within the source bitmap’s clipping rectangle.
emu.bitmap_argb32(source, [x0, y0, x1, y1])
Creates an ARGB format bitmap with 4:2:2 chroma subsampling representing a
view of a portion of an existing bitmap. The initial clipping rectangle is
set to the bounds of the view. The source bitmap will be locked, preventing
resizing and reallocation.
Creates an ARGB format bitmap representing a view of a portion of an
existing bitmap. The initial clipping rectangle is set to the bounds of the
view. The source bitmap will be locked, preventing resizing and
reallocation.

If no coordinates are specified, the new bitmap will represent a view of the
source bitmap’s current clipping rectangle. If coordinates are specified,
Expand Down Expand Up @@ -619,6 +618,12 @@ bitmap:plot_box(x, y, width, height, color)
Fills the intersection of the clipping rectangle and the rectangle with top
left (x, y) and the specified height and width with the specified colour
value. Coordinates and dimensions are in units of pixels.
bitmap:resample(dest, [color])
Copies the bitmap into the destination bitmap, scaling to fill the
destination bitmap and using a re-sampling filter. Only ARGB format source
and destination bitmaps are supported. The source pixel values will be
multiplied by the colour if it is supplied. It must be a
:ref:`render colour <luascript-ref-rendercolor>`.

Properties
~~~~~~~~~~
Expand Down Expand Up @@ -987,6 +992,11 @@ Properties
layout.device (read-only)
The device that caused the layout file to be loaded. Usually the root
machine device for external layouts.
layout.elements[] (read-only)
The :ref:`elements <luascript-ref-renderlayelem>` created from the layout
file. Elements are indexed by name (i.e. the value of the ``name``
attribute). The index get method has O(1) complexity, and the ``at`` and
``index_of`` methods have O(n) complexity.
layout.views[] (read-only)
The :ref:`views <luascript-ref-renderlayview>` created from the layout file.
Views are indexed by unqualified name (i.e. the value of the ``name``
Expand Down Expand Up @@ -1194,6 +1204,9 @@ Properties
item.id (read-only)
Get the optional item identifier. This is the value of the ``id`` attribute
in the XML layout file if present, or ``nil``.
item.element (read-only)
The :ref:`element <luascript-ref-renderlayelem>` used to draw the item, or
``nil`` for screen items.
item.bounds_animated (read-only)
A Boolean indicating whether the item’s bounds depend on its animation
state.
Expand Down Expand Up @@ -1246,3 +1259,43 @@ item.element_state (read-only)
item.animation_state (read-only)
Get the current animation state. This will call the animation state
callback function to handle bindings.


.. _luascript-ref-renderlayelem:

Layout element
--------------

Wraps MAME’s ``layout_element`` class, representing a visual element that can be
drawn in a :ref:`layout view <luascript-ref-renderlayview>`. Elements are
created from XML layout files, which may be loaded from external artwork or
internal to MAME. Note that layout element callbacks are not run as coroutines.

Instantiation
~~~~~~~~~~~~~

layout.elements[name]
Gets a layout element by name.
layout.views[name].items[id].element
Gets the layout element used to draw a
:ref:`view item <luascript-ref-renderlayitem>`.

Methods
~~~~~~~

element:invalidate()
Invalidate all cached textures for the element, ensuring it will be redrawn
when the next video frame is drawn.
element.set_draw_callback(cb)
Set a function to call the perform additional drawing after the element’s
components have been drawn. The function is passed two arguments: the
element state (an integer) and the 32-bit ARGB
:ref:`bitmap <luascript-ref-bitmap>` at the required size. The function
must not attempt to resize the bitmap. Call with ``nil`` to remove the
callback.

Properties
~~~~~~~~~~

element.default_state (read-only)
The integer default state for the element if set or ``nil``.
22 changes: 22 additions & 0 deletions docs/source/techspecs/layout_script.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ providing what’s needed:
creating :ref:`attotime <luascript-ref-attotime>`, :ref:`bounds
<luascript-ref-renderbounds>` and :ref:`colour <luascript-ref-rendercolor>`
objects.
* ``emu.bitmap_ind8``, ``emu.bitmap_ind16``, ``emu.bitmap_ind32``,
``emu.bitmap_ind64``, ``emu.bitmap_yuy16``, ``emu.bitmap_rgb32`` and
``emu.bitmap_argb32`` objects for creating
:ref:`bitmaps <luascript-ref-bitmap>`.
* ``emu.print_verbose``, ``emu.print_error``, ``emu.print_warning``,
``emu.print_info`` and ``emu.print_debug`` functions for diagnostic output.
* Standard Lua ``tonumber``, ``tostring``, ``pairs`` and ``ipairs`` functions,
Expand Down Expand Up @@ -667,3 +671,21 @@ Get item vertical scroll position
item; larger values pan down. Call with ``nil`` as the argument to restore
the default vertical scroll position handler (based on bindings in the
``yscroll`` child element).

.. _layscript-events-element:

Layout element events
~~~~~~~~~~~~~~~~~~~~~

Layout element events apply to an individual visual element definition.

Draw
``element:set_draw_callback(cb)``

Set callback for additional drawing after the element’s components have been
drawn. This gives the script direct control over the final texture when an
element item is drawn.

The callback is passed two arguments: the element state (an integer) and the
32-bit ARGB bitmap at the required size. The callback must not attempt to
resize the bitmap.
24 changes: 21 additions & 3 deletions docs/source/usingmame/aboutromsets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,24 @@ If you hit problems with a set not working, there are several things to check--
ROMs and CHDs
-------------

ROM chip data tends to be relatively small and gets loaded to system memory outright. Some games also used additional storage mediums such as hard drives, CD-ROMs, DVDs, and Laserdiscs. Those storage mediums are, for multiple technical reasons, not well-suited to being stored the same way as ROM data and won't fit completely in memory in some cases.

Thus, a new format was created for these in the CHD file. **Compressed Hunks of Data**, or CHD for short, are designed very specifically around the needs of mass storage media. Some arcade games, consoles, and PCs will require a CHD to run. As CHDs are already compressed, they should **NOT** be stored in a ZIP or 7Z file as you would for ROM images.
ROM chip data tends to be relatively small and are loaded into system memory in
their entirety. Some games also used additional storage media such as hard
disks, CD-ROMs, DVDs, and LaserDiscs. Those storage media are, for multiple
technical reasons, not well-suited to being stored the same way as ROM data and
won’t fully fit in memory in some cases.

Thus, a new format was created for these in the CHD file. **Compressed Hunks of
Data** files, or CHD files for short, are designed very specifically around the
needs of mass storage media. Some arcade games, consoles, and PCs will require
one or more CHD files to run. As CHD files are already compressed, they
**should not** be stored PKZIP or 7-Zip archives as ROM images would be.

To save space when multiple variants of a system or software item are present,
MAME supports *delta CHD* files. A delta CHD file only stores the parts of the
data that differ from its *parent CHD* file. This allows large space savings
when different variants share a lot of data. Delta CHD files can only be used
for clone systems, devices with a parent ROM device, and clone software items.
A delta CHD file must use a (non-delta) CHD file from the parent system, parent
ROM device or parent software item as its parent CHD file. The parent CHD file
must be present to use a delta CHD file, or MAME will not be able to read the
shared data from it.
18 changes: 7 additions & 11 deletions docs/source/usingmame/assetsearch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ item ROMs in the following locations:
* A folder or archive matching the short name of the parent software item, if
applicable. (This is for convenience for software items that also run as
stand-alone systems with the same short name, such as Neo Geo games.)
* Any folders and archives that would be searched for system or device ROMs for
the system or device that the software list belongs to. This is for
historical reasons due to the way software list support was originally added
to MESS and will be removed in a future version of MAME.

If you load the German version of Dune II from the Mega Drive/Genesis cartridge
software list in the PAL Mega Drive console, MAME will look for the cartridge
Expand All @@ -255,13 +251,6 @@ ROM as follows:
* Still ignoring the short name of the software list, MAME will use the short
name of the parent software item only, looking for a folder called **dune2**,
a PKZIP archive called **dune2.zip** or a 7-Zip archive called **dune2.7z**.
* The short name of the PAL Mega Drive system is ``megadriv``, so MAME will look
for a folder called **megadriv**, a PKZIP archive called **megadriv.zip**, or
a 7-Zip archive called **megadriv.7z**.
* The parent system of the PAL Mega Drive is the North American Genesis system,
which has the short name ``genesis``, so MAME will look for a folder called
**genesis**, a PKZIP archive called **genesis.zip**, or a 7-Zip archive called
**genesis.7z**.

CHD format disk images
~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -284,6 +273,13 @@ almost the same way it searches for ROMs, with just a few differences:
file itself. The checksum of the CHD file itself can vary depending on
compression options.

To save space, MAME allows delta CHD files to be used for clone systems, devices
with parent ROM devices and clone software items. The delta CHD file must use a
CHD format disk image from the parent system, parent ROM device or parent
software item as its parent CHD file. The space saved depends on how much
content can be reused from the parent CHD file. MAME searches the same
locations for parent CHD files that it would search for the disk image itself.

Loose software
~~~~~~~~~~~~~~

Expand Down
8 changes: 4 additions & 4 deletions hash/amiga_a3000.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SuperKickstart disks, SCSI installation disks and AMIX
</part>
<part name="tape" interface="a3000_cass">
<feature name="part_id" value="Installation Tape"/>
<dataarea name="cass" size="0">
<dataarea name="cass" size="1">
<rom name="cass" size="0" status="nodump" />
</dataarea>
</part>
Expand All @@ -94,7 +94,7 @@ SuperKickstart disks, SCSI installation disks and AMIX
</part>
<part name="tape" interface="a3000_cass">
<feature name="part_id" value="Installation Tape"/>
<dataarea name="cass" size="0">
<dataarea name="cass" size="1">
<rom name="cass" size="0" status="nodump" />
</dataarea>
</part>
Expand All @@ -118,7 +118,7 @@ SuperKickstart disks, SCSI installation disks and AMIX
</part>
<part name="tape" interface="a3000_cass">
<feature name="part_id" value="Installation Tape"/>
<dataarea name="cass" size="0">
<dataarea name="cass" size="1">
<rom name="cass" size="0" status="nodump" />
</dataarea>
</part>
Expand Down Expand Up @@ -148,7 +148,7 @@ SuperKickstart disks, SCSI installation disks and AMIX
</part>
<part name="tape" interface="a3000_cass">
<feature name="part_id" value="Installation Tape"/>
<dataarea name="cass" size="0">
<dataarea name="cass" size="1">
<rom name="cass" size="0" status="nodump" />
</dataarea>
</part>
Expand Down
Loading

0 comments on commit 70efc30

Please sign in to comment.