Miscellaneous cleanup/fixes:

segac2.cpp: Fixed bloxeedu credits to start DIP switches.

luaengine*.cpp: Used unchecked optional getter after explicit check.

informer_213.cpp: Comment out very noisy logerror.

votrhv.cpp: XTAL is for crystals/resonators, not any old oscillator.
This commit is contained in:
Vas Crabb 2020-11-28 16:16:23 +11:00
parent ddc1c44624
commit 49e5d2f6c8
7 changed files with 28 additions and 22 deletions

View File

@ -82,7 +82,7 @@ static void sd725_floppies(device_slot_interface &device)
}
//-------------------------------------------------
// device_add_mconfigfloppy_image
// device_add_mconfig
//-------------------------------------------------
void spc1000_fdd_exp_device::device_add_mconfig(machine_config &config)

View File

@ -92,9 +92,9 @@ protected:
auto p(sol::stack::unqualified_check_get<T *>(L, 1));
if (!p)
luaL_error(L, "sol: 'self' is not of type '%s' (pass 'self' as first argument with ':' or call on proper type)", sol::detail::demangle<T>().c_str());
if (!p.value())
if (*p)
luaL_error(L, "sol: 'self' argument is nil (pass 'self' as first argument with ':' or call on a '%s' type", sol::detail::demangle<T>().c_str());
return *p.value();
return **p;
}
struct indexed_iterator

View File

@ -429,7 +429,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<int> >());
if (result)
{
return result.value();
return *result;
}
else
{
@ -458,7 +458,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<int> >());
if (result)
{
return result.value();
return *result;
}
else
{
@ -487,7 +487,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<render_bounds> >());
if (result)
{
b = result.value();
b = *result;
}
else
{
@ -516,7 +516,7 @@ void lua_engine::initialize_render()
auto result(invoke(cbfunc).get<sol::optional<render_color> >());
if (result)
{
c = result.value();
c = *result;
}
else
{

View File

@ -167,7 +167,7 @@ uint32_t informer_213_state::screen_update(screen_device &screen, bitmap_rgb32 &
uint8_t code = m_program.read_byte(addr);
uint8_t attr = m_program.read_byte(addr+0x1000);
logerror("%02d.%02d %04x %02x %02x\n", x, y, addr, code, attr);
//logerror("%02d.%02d %04x %02x %02x\n", x, y, addr, code, attr);
if (code == 0xc0 || code == 0xe8)
line_attr = attr;

View File

@ -1327,23 +1327,25 @@ static INPUT_PORTS_START( bloxeedc )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) /* Button 3 Unused */
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x01, 0x01, "Credits to Start (VS)" ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x00, "Same as Normal" )
PORT_DIPSETTING( 0x01, "Double" )
PORT_DIPNAME( 0x02, 0x02, "Credits to Start (Normal)" ) PORT_DIPLOCATION("SW2:2")
PORT_DIPNAME( 0x01, 0x01, "Credits to Start (VS)" ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x00, "1" ) PORT_CONDITION("DSW", 0x02, EQUALS, 0x02)
PORT_DIPSETTING( 0x01, "2" ) PORT_CONDITION("DSW", 0x02, EQUALS, 0x02)
PORT_DIPSETTING( 0x00, "2" ) PORT_CONDITION("DSW", 0x02, EQUALS, 0x00)
PORT_DIPSETTING( 0x01, "4" ) PORT_CONDITION("DSW", 0x02, EQUALS, 0x00)
PORT_DIPNAME( 0x02, 0x02, "Credits to Start (Normal)" ) PORT_DIPLOCATION("SW2:2")
PORT_DIPSETTING( 0x02, "1" )
PORT_DIPSETTING( 0x00, "2" )
//"SW2:3" unused
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:4")
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6")
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6")
PORT_DIPSETTING( 0x20, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
//"SW2:7" unused
PORT_DIPNAME( 0x80, 0x00, "High Speed Mode" ) PORT_DIPLOCATION("SW2:8")
PORT_DIPNAME( 0x80, 0x00, "High Speed Mode" ) PORT_DIPLOCATION("SW2:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
INPUT_PORTS_END
@ -1352,10 +1354,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( bloxeedu )
PORT_INCLUDE( bloxeedc )
PORT_MODIFY("DSW") //"SW2:1" has opposite effect in US version
PORT_DIPNAME( 0x01, 0x00, "Credits to Start (VS)" ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "Same as Normal" )
PORT_DIPSETTING( 0x00, "Double" )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x03, 0x03, "Credits to Start (Normal / VS)" ) PORT_DIPLOCATION("SW2:1,2")
PORT_DIPSETTING( 0x01, "1 / 1" )
PORT_DIPSETTING( 0x03, "1 / 2" )
PORT_DIPSETTING( 0x02, "1 / 2" )
PORT_DIPSETTING( 0x00, "2 / 4" )
INPUT_PORTS_END

View File

@ -445,7 +445,7 @@ WRITE_LINE_MEMBER( votrhv_state::reset_counter )
// is the timer already running/non-zero? if not, start it.
if (!m_resume_timer->enabled())
{
m_resume_timer->adjust(attotime::from_hz((XTAL(2'000'000)/2)/0x20));
m_resume_timer->adjust(attotime::from_hz(2'000'000/2/0x20));
}
}
else // state == ASSERT_LINE
@ -659,7 +659,9 @@ uint8_t hc120_state::input_r()
void votrhv_state::votrhv(machine_config &config)
{
/* basic machine hardware */
M6800(config, m_maincpu, XTAL(2'000'000) / 2 ); // ~1'000'000 done using two 74L123 multivibrators with cap 100pf res 11k, which each oscillate at 1.8-2.5mhz, but since you need two clock phases for the 6800, each multivibrator does one phase and the falling edge of one triggers the other, so the actual clock rate is half the rate of each.
// ~1MHz done using two 74L123 multivibrators with cap 100pf res 11k, which each oscillate at 1.8-2.5mhz
// since you need two clock phases for the 6800, each multivibrator does one phase and the falling edge of one triggers the other, so the actual clock rate is half the rate of each
M6800(config, m_maincpu, 2'000'000 / 2 );
m_maincpu->set_addrmap(AS_PROGRAM, &votrhv_state::mem_map);
INPUT_MERGER_ALL_LOW(config, m_reset).output_handler().set(FUNC(votrhv_state::reset_counter));

View File

@ -435,7 +435,7 @@ void m72_state::majtitle_draw_sprites(bitmap_ind16 &bitmap,const rectangle &clip
{
u16 *spriteram16_2 = m_spriteram2;
for (int offs = 0; offs < m_spriteram2.bytes()/2; offs += 4)
for (int offs = 0; offs < m_spriteram2.length(); offs += 4)
{
const int code = spriteram16_2[offs+1];
const u32 color = spriteram16_2[offs+2] & 0x0f;