From ff69b227397a0360ab5781c2d87fb02dbff3edcb Mon Sep 17 00:00:00 2001 From: angelosa Date: Sun, 6 Oct 2024 22:30:02 +0200 Subject: nec/pc9801.cpp: kanji window don't bother with LR setting --- src/mame/nec/pc9801.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/mame/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp index 85122303865..66eb887c76b 100644 --- a/src/mame/nec/pc9801.cpp +++ b/src/mame/nec/pc9801.cpp @@ -680,26 +680,25 @@ uint8_t pc9801vm_state::pc9801rs_knjram_r(offs_t offset) { uint32_t pcg_offset; - pcg_offset = (m_font_addr & 0x7fff) << 5; - pcg_offset|= offset & 0x1e; - pcg_offset|= m_font_lr; - if(!(m_font_addr & 0xff)) { int char_size = m_video_ff[FONTSEL_REG]; return m_char_rom[(m_font_addr >> 8) * (8 << char_size) + (char_size * 0x800) + ((offset >> 1) & 0xf)]; } - if((m_font_addr & 0xff00) == 0x5600 || (m_font_addr & 0xff00) == 0x5700) + pcg_offset = (m_font_addr & 0x7fff) << 5; + pcg_offset|= offset & 0x1e; + + // 8x16 charset selector + // telenetm defintely mirrors offset & 1 for 8x16 romaji title songs, would otherwise blank them out + if((m_font_addr & 0x7c00) == 0x0800) return m_kanji_rom[pcg_offset]; - // TODO: do we really need to recalculate? - pcg_offset = (m_font_addr & 0x7fff) << 5; - pcg_offset|= (offset & 0x1e); - // telenetm defintely needs this for 8x16 romaji title songs, otherwise it blanks them out - // (pc9801vm never reads this area btw) - pcg_offset|= (offset & m_font_lr) & 1; -// pcg_offset|= (m_font_lr); + // mezaset2 don't bother with LR setting, implying it just read this linearly + pcg_offset|= offset & 1; + + if((m_font_addr & 0xff00) == 0x5600 || (m_font_addr & 0xff00) == 0x5700) + return m_kanji_rom[pcg_offset]; return m_kanji_rom[pcg_offset]; } -- cgit v1.2.3