summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2017-03-06 22:14:39 +0100
committer GitHub <noreply@github.com>2017-03-06 22:14:39 +0100
commit58b3d34358ecbc4a7e3ea143544f180b37de2d0e (patch)
treee811259d9421eaa56036f9dc14d749cb347ddc91
parent4b914177c88ab5b62664210374d276cc2bf5e670 (diff)
parenta3e214b089812cc99a4de1973cdbd7d1d7c59461 (diff)
Merge pull request #2092 from SailorSat/master
vicdual: nsub gradient
-rw-r--r--src/mame/drivers/polyplay.cpp2
-rw-r--r--src/mame/drivers/vicdual.cpp6
-rw-r--r--src/mame/includes/vicdual.h1
-rw-r--r--src/mame/video/vicdual.cpp17
4 files changed, 24 insertions, 2 deletions
diff --git a/src/mame/drivers/polyplay.cpp b/src/mame/drivers/polyplay.cpp
index 9e957d405bf..aaa7d885969 100644
--- a/src/mame/drivers/polyplay.cpp
+++ b/src/mame/drivers/polyplay.cpp
@@ -268,7 +268,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( polyplay_io_zrepp, AS_IO, 8, polyplay_state )
AM_IMPORT_FROM(polyplay_io_zre)
- // TODO: add SIO ports here
+ AM_RANGE(0x88, 0x8b) AM_DEVREADWRITE(Z80SIO_TAG, z80sio_device, read, write)
ADDRESS_MAP_END
static INPUT_PORTS_START( polyplay )
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index a4a1910b3c1..b704f867d68 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -2247,7 +2247,11 @@ WRITE8_MEMBER(vicdual_state::nsub_io_w)
{
if (offset & 0x01) assert_coin_status();
if (offset & 0x02) { /* nsub_audio_w(0, data) */ }
- if (offset & 0x04) palette_bank_w(space, 0, data);
+ if (offset & 0x04)
+ {
+ palette_bank_w(space, 0, data);
+ m_gradient = data & 4;
+ }
}
diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h
index d13b3befec8..6b7b6a8f75f 100644
--- a/src/mame/includes/vicdual.h
+++ b/src/mame/includes/vicdual.h
@@ -58,6 +58,7 @@ public:
uint8_t m_coin_status;
uint8_t m_palette_bank;
+ uint8_t m_gradient;
uint8_t m_samurai_protection_data;
int m_nsub_coin_counter;
int m_nsub_play_counter;
diff --git a/src/mame/video/vicdual.cpp b/src/mame/video/vicdual.cpp
index f541766edfd..12c8c83d34a 100644
--- a/src/mame/video/vicdual.cpp
+++ b/src/mame/video/vicdual.cpp
@@ -112,6 +112,23 @@ uint32_t vicdual_state::screen_update_color(screen_device &screen, bitmap_rgb32
fore_pen = pens_from_color_prom[(color_prom[offs] >> 5) & 0x07];
}
+ if (m_gradient == 0x04)
+ {
+ // used by nsub and starrkr (maybe others)
+ // bit 4 on palette_bank_w seems to enable/disable the starfield/gradient
+ // how exactly those work is unclear right now
+ if (x >= 24 && x < 105)
+ {
+ // nsub - black to blue gradient
+ back_pen = rgb_t(0x00, 0x00, (x - 24) * 3);
+ }
+ if (x >= 105 && x < 233)
+ {
+ // nsub - blue to cyan gradient
+ back_pen = rgb_t(0x00, 0x80 + (x - 105), 0xff);
+ }
+ }
+
/* plot the current pixel */
pen = (video_data & 0x80) ? fore_pen : back_pen;
bitmap.pix32(y, x) = pen;