Merge pull request #2764 from rzero9/patch-2

fmtowns: fix kanji offset calculation
master
R. Belmont 2017-11-01 08:55:37 -04:00 committed by GitHub
commit 6ed80ab6d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

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