fmtowns: fix kanji offset calculation

This commit is contained in:
r09 2017-11-01 10:23:33 +01:00 committed by GitHub
parent 346a935839
commit c40ba6a13e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();