diff options
author | hap <happppp@users.noreply.github.com> | 2021-09-02 23:48:17 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2021-09-02 23:48:31 +0200 |
commit | d7ae941798bedefd9f1e2bf858e193cb4d958e78 (patch) | |
tree | 5a5e710783180224fe5fc0cd172ce7f65b4b629e | |
parent | 3aaa9551141b221bcfb2d814aba574a2c8768048 (diff) |
n8080: add conf setting for switching spacefev to monochrome
-rw-r--r-- | src/mame/drivers/n8080.cpp | 11 | ||||
-rw-r--r-- | src/mame/includes/n8080.h | 5 | ||||
-rw-r--r-- | src/mame/video/n8080.cpp | 4 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/mame/drivers/n8080.cpp b/src/mame/drivers/n8080.cpp index 6c868116de4..8d50252641e 100644 --- a/src/mame/drivers/n8080.cpp +++ b/src/mame/drivers/n8080.cpp @@ -10,9 +10,6 @@ - Sheriff / Bandido / Western Gun 2 - Helifire -TODO: -- space fever original hw is monochrome - ---------------------------------------------------------------------------- Space Fever (3 sets, Space Fever?, High Splitter?, Space Launcher?) @@ -232,6 +229,11 @@ static INPUT_PORTS_START( spacefev ) PORT_START("IN3") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("VIDEO") // spacefev video hardware is originally monochrome, also exists with color video hardware + PORT_CONFNAME( 0x01, 0x00, "Video Output" ) + PORT_CONFSETTING( 0x01, "Monochrome" ) + PORT_CONFSETTING( 0x00, "Color" ) INPUT_PORTS_END @@ -261,6 +263,9 @@ static INPUT_PORTS_START( highsplt ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused )) PORT_DIPSETTING( 0x80, DEF_STR( Off )) PORT_DIPSETTING( 0x00, DEF_STR( On )) + + PORT_MODIFY("VIDEO") // only exists with color video hardware + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/includes/n8080.h b/src/mame/includes/n8080.h index f0bffde9905..c99f2f8a2d3 100644 --- a/src/mame/includes/n8080.h +++ b/src/mame/includes/n8080.h @@ -95,7 +95,8 @@ class spacefev_state : public n8080_state { public: spacefev_state(const machine_config &mconfig, device_type type, const char *tag) : - n8080_state(mconfig, type, tag) + n8080_state(mconfig, type, tag), + m_video_conf(*this, "VIDEO") { } void spacefev(machine_config &config); @@ -112,6 +113,8 @@ protected: virtual void delayed_sound_2(int data) override; private: + required_ioport m_video_conf; + void spacefev_sound(machine_config &config); TIMER_DEVICE_CALLBACK_MEMBER(vco_voltage_timer); diff --git a/src/mame/video/n8080.cpp b/src/mame/video/n8080.cpp index c80fb805e07..b8e16bf5cf8 100644 --- a/src/mame/video/n8080.cpp +++ b/src/mame/video/n8080.cpp @@ -126,6 +126,7 @@ void helifire_state::video_start() uint32_t spacefev_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + const bool mono = bool(m_video_conf->read()); uint8_t mask = flip_screen() ? 0xff : 0x00; uint8_t const *pRAM = m_videoram; @@ -176,6 +177,9 @@ uint32_t spacefev_state::screen_update(screen_device &screen, bitmap_ind16 &bitm } } + if (mono) + color = 7; // force B&W here + for (int n = 0; n < 8; n++) { pLine[(x + n) ^ mask] = (pRAM[x >> 3] & (1 << n)) ? color : 0; |