Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	makefile
  • Loading branch information
Robbbert committed Aug 1, 2024
2 parents bdb593b + 955ecd0 commit 077bc1f
Show file tree
Hide file tree
Showing 24 changed files with 1,750 additions and 775 deletions.
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="267"
android:versionName="0.267"
android:versionCode="268"
android:versionName="0.268"
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.267'
version = '0.268'
# The full version, including alpha/beta/rc tags.
release = '0.267'
release = '0.268'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ endif

ifeq (posix,$(SHELLTYPE))
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo '#define BARE_BUILD_VERSION "0.268.1"' > $@
@echo '#define BARE_BUILD_VERSION "0.268.x"' > $@
@echo '#define BARE_VCS_REVISION "$(NEW_GIT_VERSION)"' >> $@
@echo 'extern const char bare_build_version[];' >> $@
@echo 'extern const char bare_vcs_revision[];' >> $@
Expand All @@ -1588,7 +1588,7 @@ $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo 'const char build_version[] = BARE_BUILD_VERSION " (" BARE_VCS_REVISION ")";' >> $@
else
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo #define BARE_BUILD_VERSION "0.268.1" > $@
@echo #define BARE_BUILD_VERSION "0.268.x" > $@
@echo #define BARE_VCS_REVISION "$(NEW_GIT_VERSION)" >> $@
@echo extern const char bare_build_version[]; >> $@
@echo extern const char bare_vcs_revision[]; >> $@
Expand Down
3 changes: 2 additions & 1 deletion src/devices/bus/odyssey2/chess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
/******************************************************************************
Videopac C7010 Chess Module emulation
The chess engine is "Gambiet", written by Wim Rens
The chess engine is Wim Rens's Gambiet, evidently based on the 1980 version.
Hardware notes:
- NSC800 (Z80-compatible) @ 4.43MHz
Expand Down
251 changes: 126 additions & 125 deletions src/emu/ioport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,22 +338,22 @@ void ioport_list::append(device_t &device, std::string &errorbuf)
// input_type_entry - constructors
//-------------------------------------------------

input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard) noexcept
: m_type(type),
m_group(group),
m_player(player),
m_token(token),
m_name(name)
input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard) noexcept :
m_type(type),
m_group(group),
m_player(player),
m_token(token),
m_name(name)
{
m_defseq[SEQ_TYPE_STANDARD] = m_seq[SEQ_TYPE_STANDARD] = standard;
}

input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard, input_seq decrement, input_seq increment) noexcept
: m_type(type),
m_group(group),
m_player(player),
m_token(token),
m_name(name)
input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard, input_seq decrement, input_seq increment) noexcept :
m_type(type),
m_group(group),
m_player(player),
m_token(token),
m_name(name)
{
m_defseq[SEQ_TYPE_STANDARD] = m_seq[SEQ_TYPE_STANDARD] = standard;
m_defseq[SEQ_TYPE_INCREMENT] = m_seq[SEQ_TYPE_INCREMENT] = increment;
Expand Down Expand Up @@ -423,12 +423,12 @@ void input_type_entry::restore_default_seq() noexcept
// digital_joystick - constructor
//-------------------------------------------------

digital_joystick::digital_joystick(int player, int number)
: m_player(player),
m_number(number),
m_current(0),
m_current4way(0),
m_previous(0)
digital_joystick::digital_joystick(int player, int number) :
m_player(player),
m_number(number),
m_current(0),
m_current4way(0),
m_previous(0)
{
}

Expand Down Expand Up @@ -565,10 +565,10 @@ void ioport_condition::initialize(device_t &device)
// ioport_setting - constructor
//-------------------------------------------------

ioport_setting::ioport_setting(ioport_field &field, ioport_value _value, const char *_name)
: m_field(field),
m_value(_value),
m_name(_name)
ioport_setting::ioport_setting(ioport_field &field, ioport_value _value, const char *_name) :
m_field(field),
m_value(_value),
m_name(_name)
{
}

Expand All @@ -582,10 +582,10 @@ ioport_setting::ioport_setting(ioport_field &field, ioport_value _value, const c
// ioport_diplocation - constructor
//-------------------------------------------------

ioport_diplocation::ioport_diplocation(const char *name, u8 swnum, bool invert)
: m_name(name),
m_number(swnum),
m_invert(invert)
ioport_diplocation::ioport_diplocation(const char *name, u8 swnum, bool invert) :
m_name(name),
m_number(swnum),
m_invert(invert)
{
}

Expand All @@ -599,34 +599,34 @@ ioport_diplocation::ioport_diplocation(const char *name, u8 swnum, bool invert)
// ioport_field - constructor
//-------------------------------------------------

ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value defvalue, ioport_value maskbits, const char *name)
: m_next(nullptr),
m_port(port),
m_modcount(port.modcount()),
m_mask(maskbits),
m_defvalue(defvalue & maskbits),
m_type(type),
m_player(0),
m_flags(0),
m_impulse(0),
m_name(name),
m_read(port.device()),
m_write(port.device()),
m_write_param(0),
m_digital_value(false),
m_min(0),
m_max(maskbits),
m_sensitivity(0),
m_delta(0),
m_centerdelta(0),
m_crosshair_axis(CROSSHAIR_AXIS_NONE),
m_crosshair_scale(1.0),
m_crosshair_offset(0),
m_crosshair_altaxis(0),
m_crosshair_mapper(port.device()),
m_full_turn_count(0),
m_remap_table(nullptr),
m_way(0)
ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value defvalue, ioport_value maskbits, const char *name) :
m_next(nullptr),
m_port(port),
m_modcount(port.modcount()),
m_mask(maskbits),
m_defvalue(defvalue & maskbits),
m_type(type),
m_player(0),
m_flags(0),
m_impulse(0),
m_name(name),
m_read(port.device()),
m_write(port.device()),
m_write_param(0),
m_digital_value(false),
m_min(0),
m_max(maskbits),
m_sensitivity(0),
m_delta(0),
m_centerdelta(0),
m_crosshair_axis(CROSSHAIR_AXIS_NONE),
m_crosshair_scale(1.0),
m_crosshair_offset(0),
m_crosshair_altaxis(0),
m_crosshair_mapper(port.device()),
m_full_turn_count(0),
m_remap_table(nullptr),
m_way(0)
{
// reset sequences and chars
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
Expand Down Expand Up @@ -1356,15 +1356,15 @@ void ioport_field::init_live_state(analog_field *analog)
// ioport_field_live - constructor
//-------------------------------------------------

ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
: analog(analog),
joystick(nullptr),
value(field.defvalue()),
impulse(0),
last(0),
toggle(field.toggle()),
joydir(digital_joystick::JOYDIR_COUNT),
lockout(false)
ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog) :
analog(analog),
joystick(nullptr),
value(field.defvalue()),
impulse(0),
last(0),
toggle(field.toggle()),
joydir(digital_joystick::JOYDIR_COUNT),
lockout(false)
{
// fill in the basic values
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
Expand Down Expand Up @@ -1412,12 +1412,12 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
// ioport_port - constructor
//-------------------------------------------------

ioport_port::ioport_port(device_t &owner, const char *tag)
: m_next(nullptr),
m_device(owner),
m_tag(tag),
m_modcount(0),
m_active(0)
ioport_port::ioport_port(device_t &owner, const char *tag) :
m_next(nullptr),
m_device(owner),
m_tag(tag),
m_modcount(0),
m_active(0)
{
}

Expand Down Expand Up @@ -1636,10 +1636,10 @@ void ioport_port::update_defvalue(bool flush_defaults)
// ioport_port_live - constructor
//-------------------------------------------------

ioport_port_live::ioport_port_live(ioport_port &port)
: defvalue(0),
digital(0),
outputvalue(0)
ioport_port_live::ioport_port_live(ioport_port &port) :
defvalue(0),
digital(0),
outputvalue(0)
{
// iterate over fields
for (ioport_field &field : port.fields())
Expand Down Expand Up @@ -1672,15 +1672,15 @@ ioport_port_live::ioport_port_live(ioport_port &port)
// ioport_manager - constructor
//-------------------------------------------------

ioport_manager::ioport_manager(running_machine &machine)
: m_machine(machine)
, m_safe_to_read(false)
, m_last_frame_time(attotime::zero)
, m_last_delta_nsec(0)
, m_playback_accumulated_speed(0)
, m_playback_accumulated_frames(0)
, m_deselected_card_config()
, m_applied_device_defaults(false)
ioport_manager::ioport_manager(running_machine &machine) :
m_machine(machine),
m_safe_to_read(false),
m_last_frame_time(attotime::zero),
m_last_delta_nsec(0),
m_playback_accumulated_speed(0),
m_playback_accumulated_frames(0),
m_deselected_card_config(),
m_applied_device_defaults(false)
{
for (auto &entries : m_type_to_entry)
std::fill(std::begin(entries), std::end(entries), nullptr);
Expand Down Expand Up @@ -3165,13 +3165,13 @@ void ioport_manager::record_port(ioport_port &port)
// ioport_configurer - constructor
//-------------------------------------------------

ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, std::string &errorbuf)
: m_owner(owner),
m_portlist(portlist),
m_errorbuf(errorbuf),
m_curport(nullptr),
m_curfield(nullptr),
m_cursetting(nullptr)
ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, std::string &errorbuf) :
m_owner(owner),
m_portlist(portlist),
m_errorbuf(errorbuf),
m_curport(nullptr),
m_curfield(nullptr),
m_cursetting(nullptr)
{
}

Expand Down Expand Up @@ -3368,10 +3368,10 @@ ioport_configurer& ioport_configurer::onoff_alloc(const char *name, ioport_value
// dynamic_field - constructor
//-------------------------------------------------

dynamic_field::dynamic_field(ioport_field &field)
: m_field(field)
, m_shift(0)
, m_oldval(field.defvalue())
dynamic_field::dynamic_field(ioport_field &field) :
m_field(field),
m_shift(0),
m_oldval(field.defvalue())
{
// fill in the data
for (ioport_value mask = field.mask(); !(mask & 1); mask >>= 1)
Expand Down Expand Up @@ -3425,36 +3425,36 @@ void dynamic_field::write(ioport_value newval)
// analog_field - constructor
//-------------------------------------------------

analog_field::analog_field(ioport_field &field)
: m_field(field)
, m_shift(compute_shift(field.mask()))
, m_adjdefvalue((field.defvalue() & field.mask()) >> m_shift)
, m_adjmin((field.minval() & field.mask()) >> m_shift)
, m_adjmax((field.maxval() & field.mask()) >> m_shift)
, m_adjoverride((field.defvalue() & field.mask()) >> m_shift)
, m_sensitivity(field.sensitivity())
, m_reverse(field.analog_reverse())
, m_delta(field.delta())
, m_centerdelta(field.centerdelta())
, m_accum(0)
, m_previous(0)
, m_previousanalog(0)
, m_minimum(osd::input_device::ABSOLUTE_MIN)
, m_maximum(osd::input_device::ABSOLUTE_MAX)
, m_center(0)
, m_reverse_val(0)
, m_scalepos(0)
, m_scaleneg(0)
, m_keyscalepos(0)
, m_keyscaleneg(0)
, m_positionalscale(0)
, m_absolute(false)
, m_wraps(false)
, m_autocenter(false)
, m_single_scale(false)
, m_interpolate(false)
, m_lastdigital(false)
, m_use_adjoverride(false)
analog_field::analog_field(ioport_field &field) :
m_field(field),
m_shift(compute_shift(field.mask())),
m_adjdefvalue((field.defvalue() & field.mask()) >> m_shift),
m_adjmin((field.minval() & field.mask()) >> m_shift),
m_adjmax((field.maxval() & field.mask()) >> m_shift),
m_adjoverride((field.defvalue() & field.mask()) >> m_shift),
m_sensitivity(field.sensitivity()),
m_reverse(field.analog_reverse()),
m_delta(field.delta()),
m_centerdelta(field.centerdelta()),
m_accum(0),
m_previous(0),
m_previousanalog(0),
m_minimum(osd::input_device::ABSOLUTE_MIN),
m_maximum(osd::input_device::ABSOLUTE_MAX),
m_center(0),
m_reverse_val(0),
m_scalepos(0),
m_scaleneg(0),
m_keyscalepos(0),
m_keyscaleneg(0),
m_positionalscale(0),
m_absolute(false),
m_wraps(false),
m_autocenter(false),
m_single_scale(false),
m_interpolate(false),
m_lastdigital(false),
m_use_adjoverride(false)
{
// set basic parameters based on the configured type
switch (field.type())
Expand Down Expand Up @@ -3666,10 +3666,11 @@ s32 analog_field::apply_settings(s32 value) const
value -= osd::input_device::ABSOLUTE_MIN;

// map differently for positive and negative values
const s32 adjust = m_field.analog_reset() ? 0 : (1 << 23);
if (value >= 0)
value = apply_scale(value, m_scalepos);
value = ((s64(value) * m_scalepos) + adjust) / (1 << 24);
else
value = apply_scale(value, m_scaleneg);
value = ((s64(value) * m_scaleneg) - adjust) / (1 << 24);
value += m_adjdefvalue;

// for relative devices, wrap around when we go past the edge
Expand Down
Loading

0 comments on commit 077bc1f

Please sign in to comment.