From c40ba6a13e2882aebbd0f1afc6f02bc8cd87fcd0 Mon Sep 17 00:00:00 2001 From: r09 Date: Wed, 1 Nov 2017 10:23:33 +0100 Subject: fmtowns: fix kanji offset calculation --- src/mame/video/fmtowns.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mame/video/fmtowns.cpp b/src/mame/video/fmtowns.cpp index e8e5464f287..59a092dc6e1 100644 --- a/src/mame/video/fmtowns.cpp +++ b/src/mame/video/fmtowns.cpp @@ -228,11 +228,11 @@ void towns_state::towns_update_kanji_offset() } else if(m_video.towns_kanji_code_h < 0x70) { - m_video.towns_kanji_offset = ((m_video.towns_kanji_code_l & 0x1f) << 4) - + (((m_video.towns_kanji_code_l - 0x20) & 0x60) << 8) - + ((m_video.towns_kanji_code_h & 0x0f) << 9) + m_video.towns_kanji_offset = (((m_video.towns_kanji_code_l & 0x1f) << 5) + + (((m_video.towns_kanji_code_l - 0x20) & 0x60) << 9) + + ((m_video.towns_kanji_code_h & 0x0f) << 10) + (((m_video.towns_kanji_code_h - 0x30) & 0x70) * 0xc00) - + 0x8000; + + 0x8000) >> 1; } else { @@ -244,6 +244,7 @@ void towns_state::towns_update_kanji_offset() } } + READ8_MEMBER( towns_state::towns_video_cff80_r ) { uint8_t* ROM = m_user->base(); -- cgit v1.2.3