From 7e0266be649f243656609113eb7e8c06990b9a57 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 27 Nov 2022 11:16:52 -0500 Subject: scmp: Fix unreliable order of execution in JMP instruction --- src/devices/cpu/scmp/scmp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/devices/cpu/scmp/scmp.cpp b/src/devices/cpu/scmp/scmp.cpp index 4646305e0b6..07cfc91b21a 100644 --- a/src/devices/cpu/scmp/scmp.cpp +++ b/src/devices/cpu/scmp/scmp.cpp @@ -269,7 +269,8 @@ void scmp_device::execute_one(int opcode) // Transfer Instructions case 0x90 : case 0x91 : case 0x92 : case 0x93 :// JMP m_icount -= 11; - m_PC.w.l = ADD12(GET_PTR_REG(ptr)->w.l,(int8_t)ARG()); + tmp = ARG(); // PC must be updated before the destination address is calculated + m_PC.w.l = ADD12(GET_PTR_REG(ptr)->w.l,(int8_t)tmp); break; case 0x94 : case 0x95 : case 0x96 : case 0x97 : // JP -- cgit v1.2.3 From b36c7a90bf0e6b9229f75f1856ebe9d2cd12dd65 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 29 Nov 2022 02:39:24 +1100 Subject: emu/rendlay.cpp: Fixed locale-sensitive number handling (fixes MT08521). --- src/emu/rendlay.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index 2e54112f269..cf4910112b8 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -224,12 +224,18 @@ private: { if (m_float_valid) { - m_text = std::to_string(m_float); + std::ostringstream stream; + stream.imbue(std::locale::classic()); + stream << m_float; + m_text = std::move(stream).str(); m_text_valid = true; } else if (m_int_valid) { - m_text = std::to_string(m_int); + std::ostringstream stream; + stream.imbue(std::locale::classic()); + stream << m_int; + m_text = std::move(stream).str(); m_text_valid = true; } } -- cgit v1.2.3 From 78599e367c0e56099818282db67447f999300219 Mon Sep 17 00:00:00 2001 From: 0kmg <9137159+0kmg@users.noreply.github.com> Date: Sun, 27 Nov 2022 10:05:04 -0800 Subject: misc/cocoloco.cpp: Corrected DIP switch name Cocoloco typo. (#10607) --- src/mame/misc/cocoloco.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/misc/cocoloco.cpp b/src/mame/misc/cocoloco.cpp index f549e0f9cb2..edbb7fb000e 100644 --- a/src/mame/misc/cocoloco.cpp +++ b/src/mame/misc/cocoloco.cpp @@ -447,7 +447,7 @@ static INPUT_PORTS_START( cocoloco ) PORT_DIPNAME( 0x20, 0x00, "Monsters" ) PORT_DIPLOCATION("DSW2:!6") PORT_DIPSETTING( 0x00, "4" ) PORT_DIPSETTING( 0x20, "5" ) - PORT_DIPNAME( 0xc0, 0x00, "Vitamine Time" ) PORT_DIPLOCATION("DSW2:!7,!8") + PORT_DIPNAME( 0xc0, 0x00, "Vitamin Time" ) PORT_DIPLOCATION("DSW2:!7,!8") PORT_DIPSETTING( 0x00, "Long" ) PORT_DIPSETTING( 0x40, "Medium-Long" ) PORT_DIPSETTING( 0x80, "Medium-Short" ) -- cgit v1.2.3 From 7f1fa1f22602ce2585a341c39d77e0583a0a8c38 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 29 Nov 2022 16:09:59 +1100 Subject: barcrest/mpu4.cpp: Fixed regression for games using sampled sound. [James Wallace] --- src/mame/barcrest/mpu4.cpp | 50 +++++++++++++++++++++++----------------------- src/mame/barcrest/mpu4.h | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/mame/barcrest/mpu4.cpp b/src/mame/barcrest/mpu4.cpp index 8f8876d6544..51ac7e02950 100644 --- a/src/mame/barcrest/mpu4.cpp +++ b/src/mame/barcrest/mpu4.cpp @@ -225,6 +225,8 @@ To change between them, follow these instructions: #include "mpu4.lh" #include "mpu4ext.lh" +#include + /* LED Segments related to pins (5 is not connected): @@ -289,7 +291,7 @@ void mpu4_state::lamp_extend_large(uint8_t data, uint8_t column, bool active) for (int i = 0; i < 8; i++) { // this includes bit 7, so you don't get a true 128 extra lamps as the last row is always 0 or 1 depending on which set of 64 we're dealing with - m_lamps[(8*column)+i+128+lampbase] = BIT(data, i); + m_lamps[(8*column) + i + 128 + lampbase] = BIT(data, i); } m_lamp_strobe_ext[bit7] = column; } @@ -302,10 +304,10 @@ void mpu4_state::lamp_extend_large(uint8_t data, uint8_t column, bool active) } } -void mpu4_state::led_write_extender(uint8_t latch, uint8_t data, uint8_t starting_column) +void mpu4_state::led_write_extender(uint8_t latch, uint8_t data, uint8_t column) { const uint8_t diff = (latch ^ m_last_latch) & latch; - const uint8_t ext_strobe = (7 - starting_column) * 8; + const uint8_t ext_strobe = (7 - column) * 8; data = ~data;//invert drive lines for (int i = 0; i < 5; i++) @@ -383,16 +385,16 @@ void mpu4_state::update_meters() break; } - m_meters->update(7, (data & 0x80)); + m_meters->update(7, data & 0x80); - for (int meter = 0; meter < 4; meter ++) + for (int meter = 0; meter < 4; meter++) { m_meters->update(meter, (data & (1 << meter))); } if (m_reel_mux == STANDARD_REEL) { - for (int meter = 4; meter < 7; meter ++) + for (int meter = 4; meter < 7; meter++) { m_meters->update(meter, (data & (1 << meter))); } @@ -535,7 +537,7 @@ void mpu4_state::pia_ic3_porta_w(uint8_t data) for (int i = 0; i < 8; i++) { - m_lamps[(8*m_input_strobe)+i] = BIT(data, i); + m_lamps[(8*m_input_strobe) + i] = BIT(data, i); } m_lamp_strobe = m_input_strobe; } @@ -556,7 +558,7 @@ void mpu4_state::pia_ic3_portb_w(uint8_t data) for (int i = 0; i < 8; i++) { - m_lamps[(8*m_input_strobe)+i+64] = BIT(data, i); + m_lamps[(8*m_input_strobe) + i + 64] = BIT(data, i); } m_lamp_strobe2 = m_input_strobe; } @@ -695,17 +697,17 @@ uint8_t mpu4_state::pia_ic4_portb_r() { m_ic4_input_b = 0x00; - if (m_serial_output) m_ic4_input_b |= 0x80; + if (m_serial_output) m_ic4_input_b |= 0x80; if (!m_reel_mux) { - if (m_optic_pattern & 0x01) m_ic4_input_b |= 0x40; /* reel A tab */ + if (m_optic_pattern & 0x01) m_ic4_input_b |= 0x40; /* reel A tab */ - if (m_optic_pattern & 0x02) m_ic4_input_b |= 0x20; /* reel B tab */ + if (m_optic_pattern & 0x02) m_ic4_input_b |= 0x20; /* reel B tab */ - if (m_optic_pattern & 0x04) m_ic4_input_b |= 0x10; /* reel C tab */ + if (m_optic_pattern & 0x04) m_ic4_input_b |= 0x10; /* reel C tab */ - if (m_optic_pattern & 0x08) m_ic4_input_b |= 0x08; /* reel D tab */ + if (m_optic_pattern & 0x08) m_ic4_input_b |= 0x08; /* reel D tab */ } else { @@ -817,7 +819,6 @@ void mpu4_state::pia_ic5_porta_w(uint8_t data) { m_mpu4leds[((m_input_strobe | 8) << 3) | i] = BIT(data, i); } - // m_digits[m_input_strobe | 8] = data; } break; @@ -837,7 +838,7 @@ void mpu4_state::pia_ic5_porta_w(uint8_t data) #if 0 if ((m_ic23_active) && m_card_live) { - for(int i=0; i<8; i++) + for (int i = 0; i < 8; i++) { m_mpu4leds[(m_last_b7 << 6) | (m_input_strobe << 3) | i] = BIT(~data, i); } @@ -1023,7 +1024,7 @@ void mpu4_state::pia_ic6_porta_w(uint8_t data) if (m_ay8913.found()) { m_ay_data = data; - update_ay();// + update_ay(); } } @@ -1035,7 +1036,7 @@ WRITE_LINE_MEMBER(mpu4_state::pia_ic6_ca2_w) { if ( state ) m_ay8913_address |= 0x01; else m_ay8913_address &= ~0x01; - update_ay();// + update_ay(); } } @@ -1104,7 +1105,7 @@ uint8_t mpu4_state::pia_ic7_portb_r() all eight meters are driven from this port, giving the 8 line driver chip 9 connections in total. */ - //This may be overkill, but the meter sensing is VERY picky + //This may be overkill, but the meter sensing is VERY picky. uint8_t combined_meter = m_meters->get_activity(0) | m_meters->get_activity(1) | m_meters->get_activity(2) | m_meters->get_activity(3) | @@ -1239,12 +1240,12 @@ uint8_t mpu4_state::pia_gb_portb_r() // if ( m_msm6376->nar_r() ) data |= 0x80; - else data &= ~0x80; + else data &= ~0x80; if ( m_msm6376->busy_r() ) data |= 0x40; - else data &= ~0x40; + else data &= ~0x40; - return ( data | m_expansion_latch ); + return data | m_expansion_latch; } WRITE_LINE_MEMBER(mpu4_state::pia_gb_ca2_w) @@ -1299,11 +1300,10 @@ void mpu4_state::ic3ss_w(offs_t offset, uint8_t data) m_t3l = data; } - float num = (1720000/((m_t3l + 1)*(m_t3h + 1))); - float denom1 = ((m_t3h *(m_t3l + 1)+ 1)/(2*(m_t1 + 1))); + float const num = float(1'720'000) / ((m_t3l + 1) * (m_t3h + 1)); + float const denom = std::ceil(float(m_t3h * (m_t3l + 1) + 1) / (2 * (m_t1 + 1))); //need to round up, this gives same precision as chip - uint8_t denom2 = denom1 + 0.5f;//need to round up, this gives same precision as chip - uint8_t freq=num*denom2; + int const freq = int(num * denom); if (freq) { diff --git a/src/mame/barcrest/mpu4.h b/src/mame/barcrest/mpu4.h index ae2acf8c1c6..18982b273d0 100644 --- a/src/mame/barcrest/mpu4.h +++ b/src/mame/barcrest/mpu4.h @@ -360,7 +360,7 @@ protected: void mpu4_memmap_bl_characteriser_blastbank(address_map &map); void lamp_extend_small(uint8_t data); - void lamp_extend_large(uint8_t data,uint8_t column,bool active); + void lamp_extend_large(uint8_t data, uint8_t column, bool active); void led_write_extender(uint8_t latch, uint8_t data, uint8_t column); void update_meters(); void ic23_update(); -- cgit v1.2.3 From b7cbe74c4bee57eddcfcda4a2041233693e18f27 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 29 Nov 2022 16:41:19 +1100 Subject: Bump version to 0.250 --- android-project/app/src/main/AndroidManifest.xml | 4 ++-- docs/source/conf.py | 4 ++-- makefile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml index cdecdea9a3a..8e69fecf6b6 100644 --- a/android-project/app/src/main/AndroidManifest.xml +++ b/android-project/app/src/main/AndroidManifest.xml @@ -4,8 +4,8 @@ --> diff --git a/docs/source/conf.py b/docs/source/conf.py index 8311d5e4af1..685aececc66 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -63,9 +63,9 @@ copyright = u'1997-2022, MAMEdev and contributors' # built documents. # # The short X.Y version. -version = '0.249' +version = '0.250' # The full version, including alpha/beta/rc tags. -release = '0.249' +release = '0.250' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/makefile b/makefile index 8cee176b982..bdb001b7876 100644 --- a/makefile +++ b/makefile @@ -1579,7 +1579,7 @@ endif ifeq (posix,$(SHELLTYPE)) $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo '#define BARE_BUILD_VERSION "0.249"' > $@ + @echo '#define BARE_BUILD_VERSION "0.250"' > $@ @echo '#define BARE_VCS_REVISION "$(NEW_GIT_VERSION)"' >> $@ @echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char bare_vcs_revision[];' >> $@ @@ -1589,7 +1589,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.249" > $@ + @echo #define BARE_BUILD_VERSION "0.250" > $@ @echo #define BARE_VCS_REVISION "$(NEW_GIT_VERSION)" >> $@ @echo extern const char bare_build_version[]; >> $@ @echo extern const char bare_vcs_revision[]; >> $@ -- cgit v1.2.3