nec/pc9801.cpp: kanji window don't bother with LR setting

This commit is contained in:
angelosa 2024-10-06 22:30:02 +02:00
parent 18a6031090
commit ff69b22739

View File

@ -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];
}