diff --git a/src/devices/cpu/olms66k/msm665xx.cpp b/src/devices/cpu/olms66k/msm665xx.cpp index 046423b9bda..27c21cc2db2 100644 --- a/src/devices/cpu/olms66k/msm665xx.cpp +++ b/src/devices/cpu/olms66k/msm665xx.cpp @@ -19,7 +19,7 @@ DEFINE_DEVICE_TYPE(MSM66573, msm66573_device, "msm66573", "Oki MSM66573") msm665xx_device::msm665xx_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, address_map_constructor mem_map, address_map_constructor data_map) : cpu_device(mconfig, type, tag, owner, clock) , m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0, mem_map) - , m_data_config("iram", ENDIANNESS_LITTLE, 16, 20, 0, data_map) + , m_data_config("data", ENDIANNESS_LITTLE, 16, 20, 0, data_map) , m_acc(0) , m_pc(0) , m_ppc(0) @@ -30,6 +30,7 @@ msm665xx_device::msm665xx_device(const machine_config &mconfig, device_type type , m_dsr(0) , m_tsr(0) , m_romwin(0x30) + , m_memscon(0) , m_icount(0) { } @@ -64,6 +65,8 @@ void msm66573_device::data_map(address_map &map) map(0x00008, 0x00008).rw(FUNC(msm66573_device::tsr_r), FUNC(msm66573_device::tsr_w)); map(0x00009, 0x00009).rw(FUNC(msm66573_device::dsr_r), FUNC(msm66573_device::dsr_w)); map(0x0000b, 0x0000b).rw(FUNC(msm66573_device::romwin_r), FUNC(msm66573_device::romwin_w)); + map(0x00010, 0x00010).w(FUNC(msm66573_device::memsacp_w)); + map(0x00011, 0x00011).rw(FUNC(msm66573_device::memscon_r), FUNC(msm66573_device::memscon_w)); // TODO: many, many other SFRs map(0x00200, 0x011ff).ram().share("internal"); } @@ -90,7 +93,7 @@ void msm665xx_device::device_start() [this](u32 data) { m_csr = (data >> 16) & 0x0f; m_pc = data & 0xffff; m_ppc = data & 0xfffff; } ).mask(0xfffff).noshow(); state_add(MSM665XX_PSW, "PSW", m_psw); - //state_add(STATE_GENFLAGS, "FLAGS", m_psw).formatstr("%9s").noshow(); // TODO + state_add(STATE_GENFLAGS, "FLAGS", m_psw).formatstr("%8s").noshow(); state_add(MSM665XX_LRB, "LRB", m_lrb); state_add(MSM665XX_SSP, "SSP", m_ssp); u16 *fixed = static_cast(memshare("internal")->ptr()); @@ -99,6 +102,8 @@ void msm665xx_device::device_start() [this, fixed, n]() { return fixed[(m_psw & 0x07) << 2 | n]; }, [this, fixed, n](u16 data) { fixed[(m_psw & 0x07) << 2 | n] = data; } ); + // NOTE: This assumes internal RAM is large enough (≥2KB) to provide all 256 register banks. + // While most nX-8/500S MCUs have that much internal RAM, ML66514 has only 1KB. for (int n = 0; n < 4; n++) state_add(MSM665XX_ER0 + n, util::string_format("ER%d", n).c_str(), [this, fixed, n]() { return fixed[(m_lrb & 0x00ff) << 2 | n]; }, @@ -113,6 +118,7 @@ void msm665xx_device::device_start() state_add(MSM665XX_DSR, "DSR", m_dsr).mask(0x0f); state_add(MSM665XX_TSR, "TSR", m_tsr).mask(0x0f); state_add(MSM665XX_ROMWIN, "ROMWIN", m_romwin); + state_add(MSM665XX_MEMSCON, "MEMSCON", m_memscon).mask(0x03); // save state save_item(NAME(m_acc)); @@ -136,6 +142,7 @@ void msm665xx_device::device_reset() m_csr = 0; m_dsr = 0; m_tsr = 0; + m_memscon = 0; } @@ -186,6 +193,8 @@ u8 msm665xx_device::dsr_r() void msm665xx_device::dsr_w(u8 data) { + if (!BIT(m_memscon, 0)) + logerror("%02X:%04X: Writing %02X to DSR without data memory space expansion\n", m_csr, m_pc, data); m_dsr = data & 0x0f; } @@ -196,6 +205,8 @@ u8 msm665xx_device::tsr_r() void msm665xx_device::tsr_w(u8 data) { + if (!BIT(m_memscon, 1)) + logerror("%02X:%04X: Writing %02X to TSR without program memory space expansion\n", m_csr, m_pc, data); m_tsr = data & 0x0f; } @@ -210,6 +221,22 @@ void msm665xx_device::romwin_w(u8 data) m_romwin = data | 0x30; } +void msm665xx_device::memsacp_w(u8 data) +{ + logerror("%02X:%04X: Writing %02X to MEMSCAP\n", m_csr, m_pc, data); +} + +u8 msm665xx_device::memscon_r() +{ + return m_memscon | 0xfc; +} + +void msm665xx_device::memscon_w(u8 data) +{ + // FIXME: may be written only once after reset after double write to MEMSACP + m_memscon = data & 0x03; +} + void msm665xx_device::execute_run() { @@ -227,7 +254,15 @@ void msm665xx_device::state_string_export(const device_state_entry &entry, std:: switch (entry.index()) { case STATE_GENFLAGS: - // TODO + str = util::string_format("%c%c%c%c%c%c%c%c", + BIT(m_psw, 15) ? 'C' : '.', + BIT(m_psw, 14) ? 'Z' : '.', + BIT(m_psw, 13) ? 'H' : '.', + BIT(m_psw, 12) ? 'D' : '.', + BIT(m_psw, 11) ? 'S' : '.', + BIT(m_psw, 10) ? 'P' : '.', + BIT(m_psw, 9) ? 'V' : '.', + BIT(m_psw, 8) ? 'I' : '.'); break; } } diff --git a/src/devices/cpu/olms66k/msm665xx.h b/src/devices/cpu/olms66k/msm665xx.h index 0399bffb4e9..5ca435e6385 100644 --- a/src/devices/cpu/olms66k/msm665xx.h +++ b/src/devices/cpu/olms66k/msm665xx.h @@ -25,7 +25,7 @@ class msm665xx_device : public cpu_device MSM665XX_R0, MSM665XX_R1, MSM665XX_R2, MSM665XX_R3, MSM665XX_R4, MSM665XX_R5, MSM665XX_R6, MSM665XX_R7, MSM665XX_CSR, MSM665XX_DSR, MSM665XX_TSR, - MSM665XX_ROMWIN + MSM665XX_ROMWIN, MSM665XX_MEMSCON }; // TODO: port callbacks @@ -58,6 +58,9 @@ class msm665xx_device : public cpu_device void tsr_w(u8 data); u8 romwin_r(); void romwin_w(u8 data); + void memsacp_w(u8 data); + u8 memscon_r(); + void memscon_w(u8 data); private: address_space_config m_program_config; @@ -77,6 +80,7 @@ class msm665xx_device : public cpu_device u8 m_dsr; u8 m_tsr; u8 m_romwin; + u8 m_memscon; s32 m_icount; }; diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp index f5e5ec8e0cc..90a8aece75d 100644 --- a/src/lib/util/chd.cpp +++ b/src/lib/util/chd.cpp @@ -135,7 +135,7 @@ struct chd_file::metadata_hash // stream in bigendian order //------------------------------------------------- -inline util::sha1_t chd_file::be_read_sha1(const uint8_t *base)const +inline util::sha1_t chd_file::be_read_sha1(const uint8_t *base) const noexcept { util::sha1_t result; memcpy(&result.m_raw[0], base, sizeof(result.m_raw)); @@ -148,7 +148,7 @@ inline util::sha1_t chd_file::be_read_sha1(const uint8_t *base)const // stream in bigendian order //------------------------------------------------- -inline void chd_file::be_write_sha1(uint8_t *base, util::sha1_t value) +inline void chd_file::be_write_sha1(uint8_t *base, util::sha1_t value) noexcept { memcpy(base, &value.m_raw[0], sizeof(value.m_raw)); } @@ -339,7 +339,7 @@ bool chd_file::parent_missing() const noexcept * @return A sha1_t. */ -util::sha1_t chd_file::sha1() +util::sha1_t chd_file::sha1() const noexcept { try { @@ -350,7 +350,7 @@ util::sha1_t chd_file::sha1() } catch (std::error_condition const &) { - // on failure, return nullptr + // on failure, return null return util::sha1_t::null; } } @@ -368,7 +368,7 @@ util::sha1_t chd_file::sha1() * @return A sha1_t. */ -util::sha1_t chd_file::raw_sha1() +util::sha1_t chd_file::raw_sha1() const noexcept { try { @@ -383,7 +383,7 @@ util::sha1_t chd_file::raw_sha1() } catch (std::error_condition const &) { - // on failure, return nullptr + // on failure, return null return util::sha1_t::null; } } @@ -401,7 +401,7 @@ util::sha1_t chd_file::raw_sha1() * @return A sha1_t. */ -util::sha1_t chd_file::parent_sha1() +util::sha1_t chd_file::parent_sha1() const noexcept { try { @@ -542,20 +542,34 @@ std::error_condition chd_file::hunk_info(uint32_t hunknum, chd_codec_type &compr * @param rawdata The rawdata. */ -void chd_file::set_raw_sha1(util::sha1_t rawdata) +std::error_condition chd_file::set_raw_sha1(util::sha1_t rawdata) noexcept { + uint64_t const offset = (m_rawsha1_offset != 0) ? m_rawsha1_offset : m_sha1_offset; + assert(offset != 0); + // create a big-endian version uint8_t rawbuf[sizeof(util::sha1_t)]; be_write_sha1(rawbuf, rawdata); - // write to the header - uint64_t offset = (m_rawsha1_offset != 0) ? m_rawsha1_offset : m_sha1_offset; - assert(offset != 0); - file_write(offset, rawbuf, sizeof(rawbuf)); + try + { + // write to the header + file_write(offset, rawbuf, sizeof(rawbuf)); - // if we have a separate rawsha1_offset, update the full sha1 as well - if (m_rawsha1_offset != 0) - metadata_update_hash(); + // if we have a separate rawsha1_offset, update the full sha1 as well + if (m_rawsha1_offset != 0) + metadata_update_hash(); + } + catch (std::error_condition const &err) + { + return err; + } + catch (std::bad_alloc const &) + { + return std::errc::not_enough_memory; + } + + return std::error_condition(); } /** @@ -570,19 +584,23 @@ void chd_file::set_raw_sha1(util::sha1_t rawdata) * @param parent The parent. */ -void chd_file::set_parent_sha1(util::sha1_t parent) +std::error_condition chd_file::set_parent_sha1(util::sha1_t parent) noexcept { // if no file, fail if (!m_file) - throw std::error_condition(error::INVALID_FILE); + return std::error_condition(error::INVALID_FILE); + + assert(m_parentsha1_offset != 0); // create a big-endian version uint8_t rawbuf[sizeof(util::sha1_t)]; be_write_sha1(rawbuf, parent); // write to the header - assert(m_parentsha1_offset != 0); - file_write(m_parentsha1_offset, rawbuf, sizeof(rawbuf)); + try { file_write(m_parentsha1_offset, rawbuf, sizeof(rawbuf)); } + catch (std::error_condition const &err) { return err; } + + return std::error_condition(); } /** @@ -969,9 +987,9 @@ std::error_condition chd_file::read_hunk(uint32_t hunknum, void *buffer) if (blockoffs != 0) file_read(blockoffs, dest, m_hunkbytes); else if (m_parent_missing) - throw std::error_condition(error::REQUIRES_PARENT); + return std::error_condition(error::REQUIRES_PARENT); else if (m_parent) - m_parent->read_hunk(hunknum, dest); + return m_parent->read_hunk(hunknum, dest); else memset(dest, 0, m_hunkbytes); return std::error_condition(); @@ -2608,7 +2626,7 @@ void chd_file::hunk_copy_from_self(uint32_t hunknum, uint32_t otherhunk) // only permitted to reference prior hunks if (otherhunk >= hunknum) - throw std::error_condition(std::errc::invalid_argument); + throw std::error_condition(error::HUNK_OUT_OF_RANGE); // update the map entry uint8_t *rawmap = &m_rawmap[hunknum * 12]; @@ -3009,7 +3027,9 @@ std::error_condition chd_file_compressor::compress_continue(double &progress, do osd_work_queue_wait(m_read_queue, 30 * osd_ticks_per_second()); if (!compressed()) return std::error_condition(); - set_raw_sha1(m_compsha1.finish()); + std::error_condition err = set_raw_sha1(m_compsha1.finish()); + if (err) + return err; return compress_v5_map(); } } @@ -3166,23 +3186,26 @@ void chd_file_compressor::async_read() { // do the read uint8_t *dest = &m_work_buffer[0] + (m_read_done_offset % work_buffer_bytes); - assert(dest == &m_work_buffer[0] || dest == &m_work_buffer[work_buffer_bytes/2]); + assert(dest == &m_work_buffer[0] || dest == &m_work_buffer[work_buffer_bytes / 2]); uint64_t end_offset = m_read_done_offset + numbytes; - // if walking the parent, read in hunks from the parent CHD if (m_walking_parent) { + // if walking the parent, read in hunks from the parent CHD uint8_t *curdest = dest; for (uint64_t curoffs = m_read_done_offset; curoffs < end_offset + 1; curoffs += hunk_bytes()) { - m_parent->read_hunk(curoffs / hunk_bytes(), curdest); + std::error_condition err = m_parent->read_hunk(curoffs / hunk_bytes(), curdest); + if (err) + throw err; curdest += hunk_bytes(); } } - - // otherwise, call the virtual function else + { + // otherwise, call the virtual function read_data(dest, m_read_done_offset, numbytes); + } // spawn off work for each hunk for (uint64_t curoffs = m_read_done_offset; curoffs < end_offset; curoffs += hunk_bytes()) diff --git a/src/lib/util/chd.h b/src/lib/util/chd.h index d5a813944e0..7c293f7424e 100644 --- a/src/lib/util/chd.h +++ b/src/lib/util/chd.h @@ -309,18 +309,18 @@ class chd_file uint32_t hunk_count() const noexcept { return m_hunkcount; } uint32_t unit_bytes() const noexcept { return m_unitbytes; } uint64_t unit_count() const noexcept { return m_unitcount; } - bool compressed() const { return (m_compression[0] != CHD_CODEC_NONE); } + bool compressed() const noexcept { return (m_compression[0] != CHD_CODEC_NONE); } chd_codec_type compression(int index) const noexcept { return m_compression[index]; } chd_file *parent() const noexcept { return m_parent.get(); } bool parent_missing() const noexcept; - util::sha1_t sha1(); - util::sha1_t raw_sha1(); - util::sha1_t parent_sha1(); + util::sha1_t sha1() const noexcept; + util::sha1_t raw_sha1() const noexcept; + util::sha1_t parent_sha1() const noexcept; std::error_condition hunk_info(uint32_t hunknum, chd_codec_type &compressor, uint32_t &compbytes); // setters - void set_raw_sha1(util::sha1_t rawdata); - void set_parent_sha1(util::sha1_t parent); + std::error_condition set_raw_sha1(util::sha1_t rawdata) noexcept; + std::error_condition set_parent_sha1(util::sha1_t parent) noexcept; // file create std::error_condition create(std::string_view filename, uint64_t logicalbytes, uint32_t hunkbytes, uint32_t unitbytes, const chd_codec_type (&compression)[4]); @@ -372,8 +372,8 @@ class chd_file struct metadata_hash; // inline helpers - util::sha1_t be_read_sha1(const uint8_t *base) const; - void be_write_sha1(uint8_t *base, util::sha1_t value); + util::sha1_t be_read_sha1(const uint8_t *base) const noexcept; + void be_write_sha1(uint8_t *base, util::sha1_t value) noexcept; void file_read(uint64_t offset, void *dest, uint32_t length) const; void file_write(uint64_t offset, const void *source, uint32_t length); uint64_t file_append(const void *source, uint32_t length, uint32_t alignment = 0); diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp index c59d880374c..c0110002265 100644 --- a/src/lib/util/chdcodec.cpp +++ b/src/lib/util/chdcodec.cpp @@ -553,7 +553,7 @@ const codec_entry f_codec_list[] = // instance of the given type //------------------------------------------------- -const codec_entry *find_in_list(chd_codec_type type) +const codec_entry *find_in_list(chd_codec_type type) noexcept { // find in the list and construct the class for (auto & elem : f_codec_list) @@ -668,7 +668,7 @@ chd_decompressor::ptr chd_codec_list::new_decompressor(chd_codec_type type, chd_ // corresponds to a supported codec //------------------------------------------------- -bool chd_codec_list::codec_exists(chd_codec_type type) +bool chd_codec_list::codec_exists(chd_codec_type type) noexcept { // find in the list and construct the class return bool(find_in_list(type)); @@ -680,7 +680,7 @@ bool chd_codec_list::codec_exists(chd_codec_type type) // codec //------------------------------------------------- -const char *chd_codec_list::codec_name(chd_codec_type type) +const char *chd_codec_list::codec_name(chd_codec_type type) noexcept { // find in the list and construct the class const codec_entry *entry = find_in_list(type); diff --git a/src/lib/util/chdcodec.h b/src/lib/util/chdcodec.h index c3234ea600d..08235ecaae6 100644 --- a/src/lib/util/chdcodec.h +++ b/src/lib/util/chdcodec.h @@ -104,8 +104,8 @@ class chd_codec_list static chd_decompressor::ptr new_decompressor(chd_codec_type type, chd_file &file); // utilities - static bool codec_exists(chd_codec_type type); - static const char *codec_name(chd_codec_type type); + static bool codec_exists(chd_codec_type type) noexcept; + static const char *codec_name(chd_codec_type type) noexcept; }; diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index b664d0fca8c..90fe92e16a8 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -2357,7 +2357,7 @@ ROM_END /********************************************************************************* 龙虎大满贯 (Lóng Hǔ Dà Mǎnguàn), IGS 1999 -龙虎大满贯 (Lóng Hǔ Dà Mǎnguàn Plus), IGS 1999 +龙虎大满贯 对战加强版 (Lóng Hǔ Dà Mǎnguàn Duìzhàn Jiāqiáng Bǎn), IGS 1999 Both boards are identical and use the same mask ROMs, only with changed program EPROM. @@ -2394,7 +2394,7 @@ IGS PCB NO-0240-03 T518B - Reset IC IGS027A - ARM7 CPU with internal ROM. lhdmg - Sticker: B6 - lhdmgplus - Sticker: B4 + lhdmgp - Sticker: B4 *********************************************************************************/ @@ -3085,29 +3085,29 @@ void igs_m027_state::init_chessc2() ***************************************************************************/ // Complete dumps -GAME( 1999, slqz3, 0, slqz3, slqz3, igs_m027_state, init_slqz3, ROT0, "IGS", "Shuang Long Qiang Zhu 3 (China, VS107C)", 0 ) -GAME( 1999, qlgs, 0, qlgs, qlgs, igs_m027_state, init_qlgs, ROT0, "IGS", "Que Long Gaoshou", MACHINE_NODEVICE_LAN ) -GAME( 1999, lhdmg, 0, lhdmg, lhdmg, igs_m027_state, init_lhdmg, ROT0, "IGS", "Long Hu Da Manguan", 0 ) -GAME( 1999, lhdmgp, 0, lhdmg, lhdmg, igs_m027_state, init_lhdmg, ROT0, "IGS", "Long Hu Da Manguan Plus", 0 ) -GAME( 1999, lhzb3, 0, lhdmg, lhzb3, igs_m027_state, init_lhdmg, ROT0, "IGS", "Long Hu Zhengba III", 0 ) -GAME( 2004, lhzb4, 0, lhzb4, lhzb4, igs_m027_state, init_lhzb4, ROT0, "IGS", "Long Hu Zhengba 4", 0 ) -GAME( 1999, lthy, 0, lthy, lthy, igs_m027_state, init_lthy, ROT0, "IGS", "Long Teng Hu Yue", MACHINE_NODEVICE_LAN ) -GAME( 2000, zhongguo, 0, zhongguo, zhongguo, igs_m027_state, init_zhongguo, ROT0, "IGS", "Zhongguo Chu Da D", 0 ) -GAMEL( 200?, jking02, 0, jking02, jking02, igs_m027_state, init_jking02, ROT0, "IGS", "Jungle King 2002 (V209US)", MACHINE_NODEVICE_LAN, layout_jking02 ) +GAME( 1999, slqz3, 0, slqz3, slqz3, igs_m027_state, init_slqz3, ROT0, "IGS", "Shuang Long Qiang Zhu 3 (China, VS107C)", 0 ) // shows V107C5J in service mode +GAME( 1999, qlgs, 0, qlgs, qlgs, igs_m027_state, init_qlgs, ROT0, "IGS", "Que Long Gaoshou (S501CN)", MACHINE_NODEVICE_LAN ) +GAME( 1999, lhdmg, 0, lhdmg, lhdmg, igs_m027_state, init_lhdmg, ROT0, "IGS", "Long Hu Da Manguan (V102C3M)", 0 ) +GAME( 1999, lhdmgp, 0, lhdmg, lhdmg, igs_m027_state, init_lhdmg, ROT0, "IGS", "Long Hu Da Manguan Duizhan Jiaqiang Ban (V400C3M)", 0 ) +GAME( 1999, lhzb3, 0, lhdmg, lhzb3, igs_m027_state, init_lhdmg, ROT0, "IGS", "Long Hu Zhengba III (V400CN)", 0 ) +GAME( 2004, lhzb4, 0, lhzb4, lhzb4, igs_m027_state, init_lhzb4, ROT0, "IGS", "Long Hu Zhengba 4 (V104CN)", 0 ) +GAME( 1999, lthy, 0, lthy, lthy, igs_m027_state, init_lthy, ROT0, "IGS", "Long Teng Hu Yue (S104CN)", MACHINE_NODEVICE_LAN ) +GAME( 2000, zhongguo, 0, zhongguo, zhongguo, igs_m027_state, init_zhongguo, ROT0, "IGS", "Zhongguo Chu Da D (V102C)", 0 ) +GAMEL( 200?, jking02, 0, jking02, jking02, igs_m027_state, init_jking02, ROT0, "IGS", "Jungle King 2002 (V209US)", MACHINE_NODEVICE_LAN, layout_jking02 ) // shows V212US in bookkeeping menu GAME( 2003, mgzz, 0, mgzz, mgzz101cn, igs_m027_state, init_mgzz, ROT0, "IGS", "Manguan Zhizun (V101CN)", 0 ) GAME( 2003, mgzz100cn, mgzz, mgzz, mgzz100cn, igs_m027_state, init_mgzz, ROT0, "IGS", "Manguan Zhizun (V100CN)", 0 ) GAME( 2007, mgcs3, 0, lhzb4, mgcs3, igs_m027_state, init_mgcs3, ROT0, "IGS", "Manguan Caishen 3 (V101CN)", 0 ) GAMEL( 1999, oceanpar, 0, oceanpar, oceanpar105us, igs_m027_state, init_oceanpar, ROT0, "IGS", "Ocean Paradise (V105US)", 0, layout_oceanpar ) // 1999 copyright in ROM GAMEL( 1999, oceanpar101us, oceanpar, oceanpar, oceanpar101us, igs_m027_state, init_oceanpar, ROT0, "IGS", "Ocean Paradise (V101US)", 0, layout_oceanpar ) // 1999 copyright in ROM -GAMEL( 1999, fruitpar, 0, oceanpar, oceanpar105us, igs_m027_state, init_fruitpar, ROT0, "IGS", "Fruit Paradise (V214)", 0, layout_oceanpar ) +GAMEL( 1999, fruitpar, 0, oceanpar, oceanpar105us, igs_m027_state, init_fruitpar, ROT0, "IGS", "Fruit Paradise (V214US)", 0, layout_oceanpar ) GAMEL( 1999, fruitpar206us, fruitpar, oceanpar, fruitpar206us, igs_m027_state, init_fruitpar, ROT0, "IGS", "Fruit Paradise (V206US)", 0, layout_oceanpar ) -GAME( 200?, cjddz, 0, cjddz, cjddz, igs_m027_state, init_cjddz, ROT0, "IGS", "Chaoji Dou Dizhu", 0 ) +GAME( 200?, cjddz, 0, cjddz, cjddz, igs_m027_state, init_cjddz, ROT0, "IGS", "Chaoji Dou Dizhu (V215CN)", 0 ) GAME( 200?, cjddzp, 0, cjddz, cjddzp, igs_m027_state, init_cjddzp, ROT0, "IGS", "Chaoji Dou Dizhu Jiaqiang Ban (S300CN)", MACHINE_NODEVICE_LAN ) GAMEL( 2007, tripslot, 0, tripslot, tripslot, igs_m027_state, init_tripslot, ROT0, "IGS", "Triple Slot (V200VE)", 0, layout_tripslot ) // 2007 date in internal ROM at least, could be later, default settings password is all 'start 1' // this has a 2nd 8255 GAME( 2001, extradrw, 0, extradrw, base, igs_m027_state, init_extradrw, ROT0, "IGS", "Extra Draw (V100VE)", MACHINE_NOT_WORKING ) // these have an IGS025 protection device instead of the 8255 -GAME( 2002, chessc2, 0, chessc2, chessc2, igs_m027_state, init_chessc2, ROT0, "IGS", "Chess Challenge II", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) +GAME( 2002, chessc2, 0, chessc2, chessc2, igs_m027_state, init_chessc2, ROT0, "IGS", "Chess Challenge II (ver. 1445A)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // Incomplete dumps GAME( 1999, amazonia, 0, m027_1ppi, amazonia, igs_m027_state, init_amazonia, ROT0, "IGS", "Amazonia King (V104BR)", MACHINE_NOT_WORKING ) diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp index 639aec22a12..c71ed2a76e8 100644 --- a/src/tools/chdman.cpp +++ b/src/tools/chdman.cpp @@ -1765,8 +1765,10 @@ static void do_verify(parameters_map ¶ms) // fix it if requested; this also fixes the overall one so we don't need to do any more if (params.find(OPTION_FIX) != params.end()) { - input_chd.set_raw_sha1(computed_sha1); - util::stream_format(std::cout, "SHA-1 updated to correct value in input CHD\n"); + std::error_condition err = input_chd.set_raw_sha1(computed_sha1); + if (err) + report_error(1, "Error updating SHA1: %s", err.message()); + util::stream_format(std::cout, "SHA1 updated to correct value in input CHD\n"); } } else @@ -1788,7 +1790,10 @@ static void do_verify(parameters_map ¶ms) if (params.find(OPTION_FIX) != params.end()) { input_chd.set_raw_sha1(computed_sha1); - util::stream_format(std::cout, "SHA-1 updated to correct value in input CHD\n"); + std::error_condition err = input_chd.set_raw_sha1(computed_sha1); + if (err) + report_error(1, "Error updating SHA1: %s", err.message()); + util::stream_format(std::cout, "SHA1 updated to correct value in input CHD\n"); } } }