mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
8080bw.cpp: Added color video output emulation to vortex. (#9311) [Mike Coates]
This commit is contained in:
parent
352a505325
commit
ae82b5d4f7
@ -3028,8 +3028,7 @@ void _8080bw_state::vortex(machine_config &config)
|
||||
WATCHDOG_TIMER(config, m_watchdog).set_time(attotime::from_usec(255000000 / (MW8080BW_PIXEL_CLOCK / MW8080BW_HTOTAL / MW8080BW_VTOTAL)));
|
||||
|
||||
/* video hardware */
|
||||
// TODO: replace with modified invaders color renderer code allowing midscanline color writes
|
||||
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_invaders));
|
||||
m_screen->set_screen_update(FUNC(_8080bw_state::screen_update_vortex));
|
||||
|
||||
/* add shifter */
|
||||
MB14241(config, m_mb14241);
|
||||
@ -5849,7 +5848,7 @@ GAME( 1980?,invrvngeb, invrvnge, invrvnge, invrvnge, _8080bw_state, init_in
|
||||
GAME( 1980?,invrvngedu, invrvnge, invrvnge, invrvnge, _8080bw_state, init_invrvnge, ROT270, "Zenitone-Microsec Ltd. (Dutchford license)", "Invader's Revenge (Dutchford, single PCB)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1980?,invrvngegw, invrvnge, invrvnge, invrvnge, _8080bw_state, empty_init, ROT270, "Zenitone-Microsec Ltd. (Game World license)", "Invader's Revenge (Game World, single PCB)", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND )
|
||||
|
||||
GAME( 1980, vortex, 0, vortex, vortex, _8080bw_state, init_vortex, ROT270, "Zilec Electronics", "Vortex", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // Encrypted 8080/IO
|
||||
GAME( 1980, vortex, 0, vortex, vortex, _8080bw_state, init_vortex, ROT270, "Zilec Electronics", "Vortex", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // Encrypted 8080/IO
|
||||
|
||||
GAME( 1979, rollingc, 0, rollingc, rollingc, _8080bw_state, empty_init, ROT270, "Nichibutsu", "Rolling Crash / Moon Base", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE )
|
||||
|
||||
|
@ -224,6 +224,7 @@ private:
|
||||
uint32_t screen_update_ballbomb(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_shuttlei(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_spacecom(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_vortex(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(polaris_60hz_w);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(claybust_gun_callback);
|
||||
|
@ -408,6 +408,55 @@ uint32_t _8080bw_state::screen_update_spacecom(screen_device &screen, bitmap_rgb
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t _8080bw_state::screen_update_vortex(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
uint8_t video_data = 0;
|
||||
rgb_t col = rgb_t::black();
|
||||
|
||||
for (int y = MW8080BW_VCOUNTER_START_NO_VBLANK; y < 0x100; y++)
|
||||
{
|
||||
for (int x = 0; x < 0x100; x++)
|
||||
{
|
||||
// the video RAM is read at every 8 pixels starting with pixel 4
|
||||
if ((x & 0x07) == 0x04)
|
||||
{
|
||||
offs_t const offs = (offs_t(y) << 5) | (x >> 3);
|
||||
video_data = m_main_ram[offs];
|
||||
uint8_t const pix = BIT(m_main_ram[offs + 1], 0);
|
||||
col = rgb_t(pix ? 0 : 255, pix ? 255 : 0, BIT(x, 5) ? 255 : 0);
|
||||
}
|
||||
|
||||
// plot the current pixel
|
||||
pen_t const pen = BIT(video_data, 0) ? col : rgb_t::black();
|
||||
|
||||
if (m_flip_screen)
|
||||
bitmap.pix(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - x) = pen;
|
||||
else
|
||||
bitmap.pix(y - MW8080BW_VCOUNTER_START_NO_VBLANK, x) = pen;
|
||||
|
||||
// next pixel
|
||||
video_data >>= 1;
|
||||
}
|
||||
|
||||
// end of line, flush out the shift register
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
pen_t const pen = BIT(video_data, 0) ? col : rgb_t::black();
|
||||
|
||||
if (m_flip_screen)
|
||||
bitmap.pix(MW8080BW_VBSTART - 1 - (y - MW8080BW_VCOUNTER_START_NO_VBLANK), MW8080BW_HPIXCOUNT - 1 - (256 + i)) = pen;
|
||||
else
|
||||
bitmap.pix(y - MW8080BW_VCOUNTER_START_NO_VBLANK, 256 + i) = pen;
|
||||
|
||||
video_data >>= 1;
|
||||
}
|
||||
|
||||
// at next row, video_data is now 0, so the next line will start with 4 blank pixels
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*******************************************************/
|
||||
/* */
|
||||
/* Model Racing "Orbite" */
|
||||
|
Loading…
Reference in New Issue
Block a user