n8080: add conf setting for switching spacefev to monochrome

This commit is contained in:
hap 2021-09-02 23:48:17 +02:00
parent 3aaa955114
commit d7ae941798
3 changed files with 16 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;