summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mame/drivers/vtech2.cpp6
-rw-r--r--src/mame/includes/vtech2.h1
-rw-r--r--src/mame/machine/vtech2.cpp2
-rw-r--r--src/mame/video/vtech2.cpp10
4 files changed, 15 insertions, 4 deletions
diff --git a/src/mame/drivers/vtech2.cpp b/src/mame/drivers/vtech2.cpp
index 63ccf135811..78c72c220f2 100644
--- a/src/mame/drivers/vtech2.cpp
+++ b/src/mame/drivers/vtech2.cpp
@@ -150,8 +150,10 @@ static INPUT_PORTS_START( laser500 )
PORT_START("ROW5") /* KEY ROW 5 */
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BS") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_CONFNAME( 0x30, 0x30, "Language")
+ PORT_CONFSETTING( 0x10, "French")
+ PORT_CONFSETTING( 0x20, "German")
+ PORT_CONFSETTING( 0x30, "English")
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
diff --git a/src/mame/includes/vtech2.h b/src/mame/includes/vtech2.h
index 8c91a93bbeb..06d69009c1a 100644
--- a/src/mame/includes/vtech2.h
+++ b/src/mame/includes/vtech2.h
@@ -106,6 +106,7 @@ private:
int m_cassette_bit;
int m_laser_bg_mode;
int m_laser_two_color;
+ u8 m_language;
memory_region *m_cart_rom;
};
diff --git a/src/mame/machine/vtech2.cpp b/src/mame/machine/vtech2.cpp
index e66c86be3d6..4b31ef031f3 100644
--- a/src/mame/machine/vtech2.cpp
+++ b/src/mame/machine/vtech2.cpp
@@ -90,6 +90,8 @@ void vtech2_state::laser_machine_init(int bank_mask, int video_mask)
for (int i = 0; i < ARRAY_LENGTH(m_laser_bank); i++)
laser_bank_select_w(m_maincpu->space(AS_PROGRAM), i, 0);
+
+ m_language = m_io_keyboard[5]->read() & 0x30;
}
void vtech2_state::machine_reset()
diff --git a/src/mame/video/vtech2.cpp b/src/mame/video/vtech2.cpp
index 9107ea2effb..b873993eb5f 100644
--- a/src/mame/video/vtech2.cpp
+++ b/src/mame/video/vtech2.cpp
@@ -120,6 +120,12 @@ uint32_t vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &
uint8_t *videoram = m_videoram;
int offs, x, y;
int full_refresh = 1;
+ int lang_offs = 0;
+ if (m_language == 0x10)
+ lang_offs = 0x300;
+ else
+ if (m_language == 0x20)
+ lang_offs = 0x200;
if( full_refresh )
bitmap.fill(((m_laser_bg_mode >> 4) & 15)<<1, cliprect);
@@ -262,7 +268,7 @@ uint32_t vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &
int sx, sy, code, color = m_laser_two_color;
sy = BORDER_V/2 + y * 8;
sx = BORDER_H/2 + x * 8;
- code = videoram[0x3800+offs];
+ code = videoram[0x3800+offs] + lang_offs;
m_gfxdecode->gfx(0)->opaque(bitmap,cliprect,code,color,0,0,sx,sy);
}
}
@@ -278,7 +284,7 @@ uint32_t vtech2_state::screen_update_laser(screen_device &screen, bitmap_ind16 &
int sx, sy, code, color = 0;
sy = BORDER_V/2 + y * 8;
sx = BORDER_H/2 + x * 16;
- code = videoram[0x3800+offs];
+ code = videoram[0x3800+offs] + lang_offs;
color = videoram[0x3801+offs];
m_gfxdecode->gfx(1)->opaque(bitmap,cliprect,code,color,0,0,sx,sy);
}