mirror of
https://github.com/holub/mame
synced 2025-06-08 22:03:55 +03:00
Eolith HyperStone driver updates:
* eolith/eolith_speedup.cpp: Fixed oversight causing stealsea to crash on start. * eolith/eolith16.cpp: Marked klondkp not working - it locks up on the title screen if you don't insert a coin soon enough. * eolith/eolith.cpp, eolith/eolith16.cpp, eolith/vegaeo.cpp: Added basic support for partial screen updates. * eolith/eolith_speedup.cpp: Renamed base state class to make its purpose more obvious.
This commit is contained in:
parent
c37d2a946d
commit
387e268e7f
@ -115,11 +115,11 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class eolith_state : public eolith_state_base
|
class eolith_state : public eolith_e1_speedup_state_base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eolith_state(const machine_config &mconfig, device_type type, const char *tag)
|
eolith_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: eolith_state_base(mconfig, type, tag)
|
: eolith_e1_speedup_state_base(mconfig, type, tag)
|
||||||
, m_soundcpu(*this, "soundcpu")
|
, m_soundcpu(*this, "soundcpu")
|
||||||
, m_qs1000(*this, "qs1000")
|
, m_qs1000(*this, "qs1000")
|
||||||
, m_eepromoutport(*this, "EEPROMOUT")
|
, m_eepromoutport(*this, "EEPROMOUT")
|
||||||
@ -220,7 +220,7 @@ uint16_t eolith_state::eolith_vram_r(offs_t offset)
|
|||||||
|
|
||||||
void eolith_state::video_start()
|
void eolith_state::video_start()
|
||||||
{
|
{
|
||||||
eolith_state_base::video_start();
|
eolith_e1_speedup_state_base::video_start();
|
||||||
|
|
||||||
m_vram = std::make_unique<uint16_t[]>(0x40000);
|
m_vram = std::make_unique<uint16_t[]>(0x40000);
|
||||||
save_pointer(NAME(m_vram), 0x40000);
|
save_pointer(NAME(m_vram), 0x40000);
|
||||||
@ -231,12 +231,11 @@ void eolith_state::video_start()
|
|||||||
|
|
||||||
uint32_t eolith_state::screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t eolith_state::screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 240; y++)
|
for (int y = cliprect.top(); y <= std::min(cliprect.bottom(), 239); y++)
|
||||||
{
|
{
|
||||||
|
auto *pix = &bitmap.pix(y);
|
||||||
for (int x = 0; x < 320; x++)
|
for (int x = 0; x < 320; x++)
|
||||||
{
|
*pix++ = m_vram[(0x40000/2) * (m_buffer ^ 1) + (y * 336) + x] & 0x7fff;
|
||||||
bitmap.pix(y, x) = m_vram[(0x40000/2) * (m_buffer ^ 1) + (y * 336) + x] & 0x7fff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -251,7 +250,7 @@ uint32_t eolith_state::screen_update_eolith(screen_device &screen, bitmap_ind16
|
|||||||
|
|
||||||
void eolith_state::machine_start()
|
void eolith_state::machine_start()
|
||||||
{
|
{
|
||||||
eolith_state_base::machine_start();
|
eolith_e1_speedup_state_base::machine_start();
|
||||||
|
|
||||||
m_led.resolve();
|
m_led.resolve();
|
||||||
|
|
||||||
@ -261,7 +260,7 @@ void eolith_state::machine_start()
|
|||||||
|
|
||||||
void eolith_state::machine_reset()
|
void eolith_state::machine_reset()
|
||||||
{
|
{
|
||||||
eolith_state_base::machine_reset();
|
eolith_e1_speedup_state_base::machine_reset();
|
||||||
|
|
||||||
m_soundcpu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
|
m_soundcpu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,11 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class eolith16_state : public eolith_state_base
|
class eolith16_state : public eolith_e1_speedup_state_base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eolith16_state(const machine_config &mconfig, device_type type, const char *tag)
|
eolith16_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: eolith_state_base(mconfig, type, tag)
|
: eolith_e1_speedup_state_base(mconfig, type, tag)
|
||||||
, m_special_io(*this, "SPECIAL")
|
, m_special_io(*this, "SPECIAL")
|
||||||
, m_eepromoutport(*this, "EEPROMOUT")
|
, m_eepromoutport(*this, "EEPROMOUT")
|
||||||
, m_vram(*this, "vram", 0x20000, ENDIANNESS_BIG)
|
, m_vram(*this, "vram", 0x20000, ENDIANNESS_BIG)
|
||||||
@ -123,7 +123,7 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
void eolith16_state::video_start()
|
void eolith16_state::video_start()
|
||||||
{
|
{
|
||||||
eolith_state_base::video_start();
|
eolith_e1_speedup_state_base::video_start();
|
||||||
|
|
||||||
m_vrambank->configure_entries(0, 2, memshare("vram")->ptr(), 0x10000);
|
m_vrambank->configure_entries(0, 2, memshare("vram")->ptr(), 0x10000);
|
||||||
m_vrambank->set_entry(0);
|
m_vrambank->set_entry(0);
|
||||||
@ -131,12 +131,11 @@ void eolith16_state::video_start()
|
|||||||
|
|
||||||
uint32_t eolith16_state::screen_update_eolith16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t eolith16_state::screen_update_eolith16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 204; y++)
|
for (int y = cliprect.top(); y <= std::min(cliprect.bottom(), 203); y++)
|
||||||
{
|
{
|
||||||
|
auto *pix = &bitmap.pix(y);
|
||||||
for (int x = 0; x < 320; x++)
|
for (int x = 0; x < 320; x++)
|
||||||
{
|
*pix++ = m_vram[(y * 320) + x] & 0xff;
|
||||||
bitmap.pix(y, x) = m_vram[(y * 320) + x] & 0xff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -259,4 +258,4 @@ void eolith16_state::init_eolith16()
|
|||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
GAME( 1999, klondkp, 0, eolith16, eolith16, eolith16_state, init_eolith16, ROT0, "Eolith", "KlonDike+", MACHINE_SUPPORTS_SAVE )
|
GAME( 1999, klondkp, 0, eolith16, eolith16, eolith16_state, init_eolith16, ROT0, "Eolith", "KlonDike+", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE )
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
this could probably be done a bit better using timers
|
this could probably be done a bit better using timers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void eolith_state_base::speedup_read()
|
void eolith_e1_speedup_state_base::speedup_read()
|
||||||
{
|
{
|
||||||
/* for debug */
|
/* for debug */
|
||||||
//if ((m_maincpu->pc()!=m_speedup_address) && (m_speedup_vblank!=1) )
|
//if ((m_maincpu->pc()!=m_speedup_address) && (m_speedup_vblank!=1) )
|
||||||
@ -40,8 +40,8 @@ static const struct
|
|||||||
|
|
||||||
} eolith_speedup_table[] =
|
} eolith_speedup_table[] =
|
||||||
{
|
{
|
||||||
/* eolith.cpp */
|
// eolith.cpp
|
||||||
{ "linkypip", 0x4000825c, -1,/*0x4000ABAE,*/ 240 }, // 2nd address is used on the planet cutscene between but idle skipping between levels, but seems too aggressive
|
{ "linkypip", 0x4000825c, -1,/*0x4000abae,*/ 240 }, // 2nd address is used on the planet cutscene between but idle skipping between levels, but seems too aggressive
|
||||||
{ "ironfort", 0x40020854, -1, 240 },
|
{ "ironfort", 0x40020854, -1, 240 },
|
||||||
{ "ironfortc",0x40020234, -1, 240 },
|
{ "ironfortc",0x40020234, -1, 240 },
|
||||||
{ "hidnctch", 0x4000bba0, -1, 240 },
|
{ "hidnctch", 0x4000bba0, -1, 240 },
|
||||||
@ -61,15 +61,14 @@ static const struct
|
|||||||
{ "penfana", 0x4001FAb6, -1, 240 },
|
{ "penfana", 0x4001FAb6, -1, 240 },
|
||||||
{ "candy", 0x4001990C, -1, 240 },
|
{ "candy", 0x4001990C, -1, 240 },
|
||||||
{ "hidnc2k", 0x40016824, -1, 240 },
|
{ "hidnc2k", 0x40016824, -1, 240 },
|
||||||
/* eolith16.cpp */
|
// eolith16.cpp
|
||||||
{ "klondkp", 0x0001a046, -1, 240 },
|
{ "klondkp", 0x0001a046, -1, 240 },
|
||||||
/* vegaeo.cpp */
|
// vegaeo.cpp
|
||||||
{ "crazywar", 0x00008cf8, -1, 240 },
|
{ "crazywar", 0x00008cf8, -1, 240 }
|
||||||
{ nullptr, 0, 0 }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void eolith_state_base::init_speedup()
|
void eolith_e1_speedup_state_base::init_speedup()
|
||||||
{
|
{
|
||||||
m_speedup_address = 0;
|
m_speedup_address = 0;
|
||||||
m_speedup_address2 = 0;
|
m_speedup_address2 = 0;
|
||||||
@ -93,7 +92,7 @@ void eolith_state_base::init_speedup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* todo, use timers instead! */
|
/* todo, use timers instead! */
|
||||||
TIMER_DEVICE_CALLBACK_MEMBER(eolith_state_base::eolith_speedup)
|
TIMER_DEVICE_CALLBACK_MEMBER(eolith_e1_speedup_state_base::eolith_speedup)
|
||||||
{
|
{
|
||||||
if (param == 0)
|
if (param == 0)
|
||||||
m_speedup_vblank = 0;
|
m_speedup_vblank = 0;
|
||||||
@ -105,7 +104,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(eolith_state_base::eolith_speedup)
|
|||||||
m_speedup_vblank = 1;
|
m_speedup_vblank = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
READ_LINE_MEMBER(eolith_state_base::speedup_vblank_r)
|
READ_LINE_MEMBER(eolith_e1_speedup_state_base::speedup_vblank_r)
|
||||||
{
|
{
|
||||||
// printf("%s:eolith speedup_read data %02x\n",machine().describe_context().c_str(), m_speedup_vblank);
|
// printf("%s:eolith speedup_read data %02x\n",machine().describe_context().c_str(), m_speedup_vblank);
|
||||||
|
|
||||||
@ -114,7 +113,7 @@ READ_LINE_MEMBER(eolith_state_base::speedup_vblank_r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StealSee doesn't use interrupts, just the vblank
|
// StealSee doesn't use interrupts, just the vblank
|
||||||
READ_LINE_MEMBER(eolith_state_base::stealsee_speedup_vblank_r)
|
READ_LINE_MEMBER(eolith_e1_speedup_state_base::stealsee_speedup_vblank_r)
|
||||||
{
|
{
|
||||||
int pc = m_maincpu->pc();
|
int pc = m_maincpu->pc();
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
#include "emupal.h"
|
#include "emupal.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
|
|
||||||
class eolith_state_base : public driver_device
|
class eolith_e1_speedup_state_base : public driver_device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
eolith_state_base(const machine_config &mconfig, device_type type, const char *tag)
|
eolith_e1_speedup_state_base(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag)
|
: driver_device(mconfig, type, tag)
|
||||||
, m_maincpu(*this, "maincpu")
|
, m_maincpu(*this, "maincpu")
|
||||||
, m_screen(*this, "screen")
|
, m_screen(*this, "screen")
|
||||||
|
@ -26,11 +26,11 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class vegaeo_state : public eolith_state_base
|
class vegaeo_state : public eolith_e1_speedup_state_base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vegaeo_state(const machine_config &mconfig, device_type type, const char *tag)
|
vegaeo_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: eolith_state_base(mconfig, type, tag)
|
: eolith_e1_speedup_state_base(mconfig, type, tag)
|
||||||
, m_soundlatch(*this, "soundlatch")
|
, m_soundlatch(*this, "soundlatch")
|
||||||
, m_qs1000(*this, "qs1000")
|
, m_qs1000(*this, "qs1000")
|
||||||
, m_system_io(*this, "SYSTEM")
|
, m_system_io(*this, "SYSTEM")
|
||||||
@ -163,7 +163,7 @@ INPUT_PORTS_END
|
|||||||
|
|
||||||
void vegaeo_state::video_start()
|
void vegaeo_state::video_start()
|
||||||
{
|
{
|
||||||
eolith_state_base::video_start();
|
eolith_e1_speedup_state_base::video_start();
|
||||||
|
|
||||||
m_vram = std::make_unique<uint8_t[]>(0x14000*2);
|
m_vram = std::make_unique<uint8_t[]>(0x14000*2);
|
||||||
save_pointer(NAME(m_vram), 0x14000*2);
|
save_pointer(NAME(m_vram), 0x14000*2);
|
||||||
@ -172,13 +172,13 @@ void vegaeo_state::video_start()
|
|||||||
|
|
||||||
uint32_t vegaeo_state::screen_update_vega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
uint32_t vegaeo_state::screen_update_vega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 240; y++)
|
for (int y = cliprect.top(); y <= std::min(cliprect.bottom(), 239); y++)
|
||||||
{
|
{
|
||||||
|
auto *pix = &bitmap.pix(y);
|
||||||
for (int x = 0; x < 320; x++)
|
for (int x = 0; x < 320; x++)
|
||||||
{
|
*pix++ = m_vram[0x14000 * (m_vbuffer ^ 1) + (y * 320) + x] & 0xff;
|
||||||
bitmap.pix(y, x) = m_vram[0x14000 * (m_vbuffer ^ 1) + (y * 320) + x] & 0xff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user