From 70697c12a82c5b8c57d74ce4a06b57c192f255b7 Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 24 Sep 2018 14:39:16 -0400 Subject: Fix debugger memory view editing for address-shifted spaces --- src/emu/debug/dvmemory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp index 63c2f445b30..fd27ca40abd 100644 --- a/src/emu/debug/dvmemory.cpp +++ b/src/emu/debug/dvmemory.cpp @@ -464,14 +464,16 @@ void debug_view_memory::view_char(int chval) if (hexchar == nullptr) break; + const debug_view_memory_source &source = downcast(*m_source); + offs_t address = (source.m_space != nullptr) ? source.m_space->byte_to_address(pos.m_address) : pos.m_address; u64 data; - bool ismapped = read(m_bytes_per_chunk, pos.m_address, data); + bool ismapped = read(m_bytes_per_chunk, address, data); if (!ismapped) break; data &= ~(u64(0x0f) << pos.m_shift); data |= u64(hexchar - hexvals) << pos.m_shift; - write(m_bytes_per_chunk, pos.m_address, data); + write(m_bytes_per_chunk, address, data); // fall through to the right-arrow press } -- cgit v1.2.3 From d6d7814b04fa14de8c0d792e0a5a346f2dbb63c8 Mon Sep 17 00:00:00 2001 From: DavidHaywood <28625134+DavidHaywood@users.noreply.github.com> Date: Mon, 24 Sep 2018 19:26:17 +0100 Subject: added crude lamp layout to "Video 21" so that it is actually worthy of the 'Working' tag (game doesn't really let you know what to do, it's still vague without a 'deal' lamp, but at least somewhat playable now and I suspect this is how the machine was) --- src/mame/drivers/video21.cpp | 75 ++++++++++++++++++++++++++++--- src/mame/layout/video21.lay | 103 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+), 6 deletions(-) create mode 100644 src/mame/layout/video21.lay diff --git a/src/mame/drivers/video21.cpp b/src/mame/drivers/video21.cpp index 6a0e2d145f1..08384e91095 100644 --- a/src/mame/drivers/video21.cpp +++ b/src/mame/drivers/video21.cpp @@ -18,6 +18,7 @@ To Do: - CPU clock - unknown status bits? eg. hopper - color overlay as seen on flyer upright cabinet +- no lamp for 'Deal' is this correct? When booted, press Key out (mapped to W by default) to get it going. @@ -30,6 +31,7 @@ When booted, press Key out (mapped to W by default) to get it going. #include "screen.h" #include "emupal.h" +#include "video21.lh" class video21_state : public driver_device { @@ -39,18 +41,31 @@ public: , m_maincpu(*this,"maincpu") , m_p_videoram(*this, "videoram") , m_p_chargen(*this, "chargen") + , m_lamps(*this, "lamp%u", 0U) { } void video21(machine_config &config); +protected: + virtual void machine_start() override; + private: + DECLARE_WRITE8_MEMBER(unk_w); + DECLARE_WRITE8_MEMBER(lamp1_w); + DECLARE_WRITE8_MEMBER(lamp2_w); + + void clear_lamps(device_t &device); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void mem_map(address_map &map); void io_map(address_map &map); required_device m_maincpu; required_shared_ptr m_p_videoram; required_region_ptr m_p_chargen; + + int m_offcounter; + output_finder<24> m_lamps; }; @@ -86,6 +101,48 @@ uint32_t video21_state::screen_update(screen_device &screen, bitmap_ind16 &bitma return 0; } +WRITE8_MEMBER(video21_state::unk_w) +{ + // doesn't appear to be lamps + logerror("%s: unk_w %02x\n", machine().describe_context(), data); +} + +WRITE8_MEMBER(video21_state::lamp1_w) +{ + for (int i = 0; i < 8; i++) + { + m_lamps[i+0] = BIT(data, 7-i); + } + m_offcounter = 8; +} + +WRITE8_MEMBER(video21_state::lamp2_w) +{ + for (int i = 0; i < 8; i++) + { + m_lamps[i+8] = BIT(data, 7-i); + } + m_offcounter = 8; +} + +void video21_state::clear_lamps(device_t &device) +{ + // the game stops writing the lamp values in certain situations and expects the lamps to turn off automatically (decay?) + // eg. if you select 'take' in the 'take' or 'stand' choice + + if (m_offcounter > 0) + m_offcounter--; + + if (m_offcounter == 0) + { + for (int i = 0; i < 16; i++) + { + m_lamps[i] = 0; + } + } +} + + void video21_state::mem_map(address_map &map) { map(0x0000,0x0fff).rom().mirror(0x3000); map(0xe000,0xe3ff).ram().share("videoram"); @@ -93,9 +150,9 @@ void video21_state::mem_map(address_map &map) { } void video21_state::io_map(address_map &map) { - map(0x02,0x02).nopw(); // lots of unknown writes, might be some kind of dac - map(0x04,0x04); //.w unknown write - map(0x08,0x08); //.w unknown write + map(0x02,0x02).w(FUNC(video21_state::unk_w)); // lots of unknown writes, might be some kind of dac + map(0x04,0x04).w(FUNC(video21_state::lamp1_w)); + map(0x08,0x08).w(FUNC(video21_state::lamp2_w)); map(0x41,0x41).portr("IN41"); map(0x42,0x42).portr("IN42"); map(0x44,0x44).portr("IN44"); @@ -128,8 +185,8 @@ static INPUT_PORTS_START( video21 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) PORT_START("IN42") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) @@ -180,12 +237,18 @@ static GFXDECODE_START( gfx_video21 ) GFXDECODE_ENTRY( "chargen", 0x0000, video21_charlayout, 0, 1 ) GFXDECODE_END +void video21_state::machine_start() +{ + m_lamps.resolve(); +} + void video21_state::video21(machine_config &config) { /* basic machine hardware */ I8080A(config, m_maincpu, 20.79_MHz_XTAL / 10); // crystal confirmed but divisor unknown (divider appears to be 74LS160) m_maincpu->set_addrmap(AS_PROGRAM, &video21_state::mem_map); m_maincpu->set_addrmap(AS_IO, &video21_state::io_map); + m_maincpu->set_periodic_int(FUNC(video21_state::clear_lamps), attotime::from_hz(240)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -220,4 +283,4 @@ ROM_START( video21 ) ROM_LOAD_NIB_LOW ( "lich_gfx.43", 0x0000, 0x0400, CRC(0ecb0aab) SHA1(7f3f1b93a5d38828ae3e97e5f8ef1a6a96dc798b) ) ROM_END -GAME(1980, video21, 0, video21, video21, video21_state, empty_init, ROT0, "Video Games GmbH", "Video 21", MACHINE_NO_SOUND) +GAMEL(1980, video21, 0, video21, video21, video21_state, empty_init, ROT0, "Video Games GmbH", "Video 21", MACHINE_NO_SOUND, layout_video21) diff --git a/src/mame/layout/video21.lay b/src/mame/layout/video21.lay new file mode 100644 index 00000000000..8a6237eeb9e --- /dev/null +++ b/src/mame/layout/video21.lay @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From b144e84d22aaddfe4d771cdf7ceb2953d80ddf4a Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 25 Sep 2018 16:22:34 +1000 Subject: releases _must_ be srccleaned (nw) --- src/mame/drivers/video21.cpp | 2 +- src/mame/layout/video21.lay | 183 +++++++++++++++++++++---------------------- 2 files changed, 92 insertions(+), 93 deletions(-) diff --git a/src/mame/drivers/video21.cpp b/src/mame/drivers/video21.cpp index 08384e91095..1e569fcfea9 100644 --- a/src/mame/drivers/video21.cpp +++ b/src/mame/drivers/video21.cpp @@ -63,7 +63,7 @@ private: required_device m_maincpu; required_shared_ptr m_p_videoram; required_region_ptr m_p_chargen; - + int m_offcounter; output_finder<24> m_lamps; }; diff --git a/src/mame/layout/video21.lay b/src/mame/layout/video21.lay index 8a6237eeb9e..bcbd2826704 100644 --- a/src/mame/layout/video21.lay +++ b/src/mame/layout/video21.lay @@ -1,103 +1,102 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From ca1be3b88686c711462d4aca772c89652ea3673a Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 25 Sep 2018 16:54:51 +1000 Subject: c64.xml: sargon3 was badly dumped, and bbudge has something special about the last sector not represented properly in .d64 (nw) --- hash/c64_flop.xml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/hash/c64_flop.xml b/hash/c64_flop.xml index 84b6fc85005..39dd8029187 100644 --- a/hash/c64_flop.xml +++ b/hash/c64_flop.xml @@ -57,7 +57,8 @@ Electronic Arts - + + @@ -320,23 +321,6 @@ - - - Sargon III - 1985 - Hayden Software Company - - - - - - - - - - - - Street Hassle 1987 -- cgit v1.2.3 From 5f14eb4831afc8b12643e3f92f2892dfb5269fab Mon Sep 17 00:00:00 2001 From: Robbbert Date: Tue, 25 Sep 2018 21:33:18 +1000 Subject: Video21 marked as NOT WORKING, because it freezes if you win. --- src/mame/drivers/video21.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/video21.cpp b/src/mame/drivers/video21.cpp index 1e569fcfea9..5cf9dca2723 100644 --- a/src/mame/drivers/video21.cpp +++ b/src/mame/drivers/video21.cpp @@ -19,6 +19,7 @@ To Do: - unknown status bits? eg. hopper - color overlay as seen on flyer upright cabinet - no lamp for 'Deal' is this correct? +- If you win, it hangs. This is why it's marked as GNW. When booted, press Key out (mapped to W by default) to get it going. @@ -283,4 +284,4 @@ ROM_START( video21 ) ROM_LOAD_NIB_LOW ( "lich_gfx.43", 0x0000, 0x0400, CRC(0ecb0aab) SHA1(7f3f1b93a5d38828ae3e97e5f8ef1a6a96dc798b) ) ROM_END -GAMEL(1980, video21, 0, video21, video21, video21_state, empty_init, ROT0, "Video Games GmbH", "Video 21", MACHINE_NO_SOUND, layout_video21) +GAMEL(1980, video21, 0, video21, video21, video21_state, empty_init, ROT0, "Video Games GmbH", "Video 21", MACHINE_NOT_WORKING | MACHINE_NO_SOUND, layout_video21) -- cgit v1.2.3 From 856478fbda1d7844c1c88ac4bd89e976ec85610f Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 26 Sep 2018 14:43:31 +1000 Subject: version bump (nw) --- android-project/app/src/main/AndroidManifest.xml | 4 ++-- makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml index 39f7310f1a5..413f1d5e478 100644 --- a/android-project/app/src/main/AndroidManifest.xml +++ b/android-project/app/src/main/AndroidManifest.xml @@ -4,8 +4,8 @@ --> diff --git a/makefile b/makefile index 8d5f60cc1a9..14e89347611 100644 --- a/makefile +++ b/makefile @@ -1584,14 +1584,14 @@ endif ifeq (posix,$(SHELLTYPE)) $(GENDIR)/version.cpp: $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo '#define BARE_BUILD_VERSION "0.201"' > $@ + @echo '#define BARE_BUILD_VERSION "0.202"' > $@ @echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char build_version[];' >> $@ @echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@ @echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@ else $(GENDIR)/version.cpp: $(GENDIR)/git_desc - @echo #define BARE_BUILD_VERSION "0.201" > $@ + @echo #define BARE_BUILD_VERSION "0.202" > $@ @echo extern const char bare_build_version[]; >> $@ @echo extern const char build_version[]; >> $@ @echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@ -- cgit v1.2.3