mmarvin: just use PORT_ADJUSTER for the tone/speed configuration knobs

This commit is contained in:
hap 2022-09-12 17:51:57 +02:00
parent 392a52f5fa
commit e30b1f7623
5 changed files with 24 additions and 39 deletions

View File

@ -5215,7 +5215,7 @@ ROM_END
Entex Musical Marvin
* TMS1100 MP1228 (no decap)
* 1 7seg LED, 8 other leds, 1-bit sound with volume decay
* dials for speed, tone (volume decay), volume (also off/on switch)
* knobs for speed, tone (volume decay), volume (also off/on switch)
The design patent was assigned to Hanzawa (Japan), so it's probably
manufactured by them.
@ -5261,8 +5261,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(mmarvin_state::speaker_decay_sim)
{
m_volume->flt_volume_set_volume(m_speaker_volume);
// volume decays when speaker is off, decay scale is determined by tone dial
double step = (1.01 - 1.003) / 255.0; // approximation
// volume decays when speaker is off, decay scale is determined by tone knob
double step = (1.01 - 1.003) / 100.0; // approximation
m_speaker_volume /= 1.01 - (double)(u8)m_inputs[5]->read() * step;
}
@ -5277,10 +5277,10 @@ void mmarvin_state::write_r(u32 data)
// R2-R5: input mux
m_inp_mux = data >> 2 & 0xf;
// R6: trigger speed dial timer
// R6: trigger speed knob timer
if (m_r & 0x40 && ~data & 0x40)
{
double step = (2100 - 130) / 255.0; // duration range is around 0.13s to 2.1s
double step = (2100 - 130) / 100.0; // duration range is around 0.13s to 2.1s
m_speed_timer->adjust(attotime::from_msec(2100 - (u8)m_inputs[4]->read() * step));
}
@ -5335,10 +5335,10 @@ static INPUT_PORTS_START( mmarvin )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("Space")
PORT_START("IN.4")
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(15) PORT_KEYDELTA(15) PORT_CENTERDELTA(0) PORT_PLAYER(1) PORT_NAME("Speed Dial")
PORT_ADJUSTER(50, "Speed Knob")
PORT_START("IN.5")
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(15) PORT_KEYDELTA(15) PORT_CENTERDELTA(0) PORT_PLAYER(2) PORT_NAME("Tone Dial")
PORT_ADJUSTER(50, "Tone Knob")
INPUT_PORTS_END
void mmarvin_state::mmarvin(machine_config &config)

View File

@ -116,8 +116,6 @@ private:
required_region_ptr<u8> m_samplerom;
// video-related
tilemap_t *m_bg_tilemap = nullptr;
void videoram_w(offs_t offset, u8 data);
void colorram_w(offs_t offset, u8 data);
void flipscreen_w(u8 data);
@ -126,13 +124,9 @@ private:
void adjust_palette();
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
// misc
u16 m_soundcmd = 0;
u8 m_sample_latch = 0;
u16 m_sample_address = 0;
void sound_command_w(offs_t offset, u8 data);
void sample_latch_w(u8 data);
void sample_start_w(u8 data);
@ -141,6 +135,11 @@ private:
void main_map(address_map &map);
void sound_map(address_map &map);
tilemap_t *m_bg_tilemap = nullptr;
u16 m_soundcmd = 0;
u8 m_sample_latch = 0;
u16 m_sample_address = 0;
};
void olibochu_state::machine_start()
@ -240,7 +239,7 @@ void olibochu_state::video_start()
m_bg_tilemap->set_transparent_pen(0);
}
void olibochu_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
void olibochu_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// 8x8 sprites
for (int offs = m_spriteram[0].bytes() - 4; offs >= 0; offs -= 4)

View File

@ -54,14 +54,6 @@ license:CC0
<element name="text_n6"><text string="LA (A)"><color red="0.7" green="0.1" blue="0.12" /></text></element>
<element name="text_n7"><text string="TI (B)"><color red="0.7" green="0.1" blue="0.12" /></text></element>
<element name="text_l1">
<rect><color red="0.8" green="0.8" blue="0.8" /></rect>
<text string="TONE"><color red="0.6" green="0.6" blue="0.61" /></text>
</element>
<element name="text_l2">
<rect><color red="0.8" green="0.8" blue="0.8" /></rect>
<text string="SPEED"><color red="0.6" green="0.6" blue="0.61" /></text>
</element>
<element name="text_l3">
<rect><color red="0.8" green="0.8" blue="0.8" /></rect>
<text string="SCORE"><color red="0.6" green="0.6" blue="0.61" /></text>
@ -183,14 +175,6 @@ license:CC0
<element ref="hlb" inputtag="IN.3" inputmask="0x02"><bounds x="14.8" y="32.7" width="4" height="4" /><color alpha="0.15" /></element>
<!-- left side -->
<element ref="text_l1"><bounds x="0" y="7.3" width="4.3" height="1.3" /></element>
<element ref="nothing" inputtag="IN.5" inputmask="0x00" inputraw="yes"><bounds x="1.2" y="6" width="2.5" height="1.3" /></element> <!-- block clickable input -->
<element ref="counter" inputtag="IN.5" inputmask="0xff" inputraw="yes"><bounds x="1.2" y="6" width="2.5" height="1.3" /></element>
<element ref="text_l2"><bounds x="6" y="7.3" width="4.3" height="1.3" /></element>
<element ref="nothing" inputtag="IN.4" inputmask="0x00" inputraw="yes"><bounds x="7.2" y="6" width="2.5" height="1.3" /></element> <!-- block clickable input -->
<element ref="counter" inputtag="IN.4" inputmask="0xff" inputraw="yes"><bounds x="7.2" y="6" width="2.5" height="1.3" /></element>
<element ref="text_l3"><bounds x="0" y="24" width="4.3" height="1.3" /></element>
<element ref="black"><bounds x="1" y="20" width="2.3" height="4" /></element>
<element name="digit0" ref="digit"><bounds x="1.3" y="20.85" width="1.7" height="2.3" /><orientation rotate="180" /></element>

View File

@ -172,14 +172,15 @@ namespace {
class kangaroo_state : public driver_device
{
public:
kangaroo_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
kangaroo_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_video_control(*this, "video_control"),
m_videoram(*this, "videoram", 256 * 64 * 4, ENDIANNESS_LITTLE), // video RAM is accessed 32 bits at a time (two planes, 4bpp each, 4 pixels)
m_blitbank(*this, "blitbank"),
m_blitrom(*this, "blitter"),
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette") { }
m_palette(*this, "palette")
{ }
void nomcu(machine_config &config);
@ -216,8 +217,9 @@ private:
class kangaroo_mcu_state : public kangaroo_state
{
public:
kangaroo_mcu_state(const machine_config &mconfig, device_type type, const char *tag)
: kangaroo_state(mconfig, type, tag) { }
kangaroo_mcu_state(const machine_config &mconfig, device_type type, const char *tag) :
kangaroo_state(mconfig, type, tag)
{ }
void mcu(machine_config &config);
@ -236,7 +238,6 @@ private:
};
// video
/*************************************
*
@ -398,7 +399,7 @@ uint32_t kangaroo_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm
return 0;
}
// machine
/*************************************
*
@ -443,6 +444,7 @@ void kangaroo_mcu_state::machine_reset()
m_mcu_clock = 0;
}
/*************************************
*
* Custom CPU RAM snooping

View File

@ -721,7 +721,7 @@ ROM_START( guiness )
ROM_LOAD( "tvg9.94", 0x4000, 0x2000, CRC(776c7ca6) SHA1(23fd1ac15395822b318db4435e48dd4e0e3e61de) )
ROM_REGION( 0x6000, "gfx2", 0 ) /* bg */
ROM_LOAD( "=tvg12.15", 0x0000, 0x2000, CRC(a82c923d) SHA1(2bd2b028d782fac18f2fe9c9ef73ce0af67db347) )
ROM_LOAD( "tvg12.15", 0x0000, 0x2000, CRC(a82c923d) SHA1(2bd2b028d782fac18f2fe9c9ef73ce0af67db347) )
ROM_LOAD( "tvg11.15", 0x2000, 0x2000, CRC(d432c96f) SHA1(0d4b3af778dbd40bc26bad4c673a9ce1ef537c04) )
ROM_LOAD( "tvg10.15", 0x4000, 0x2000, CRC(a53959d6) SHA1(cdf7acf1a75d83b259948c482f06543624a695a3) )