nec/pc9801_v.cpp: kanji select takes over semigraphics

* fix beatvice bitmap layer masking on edges during gameplay
This commit is contained in:
angelosa 2024-10-17 18:49:48 +02:00
parent e05e355a12
commit 8321f9b9b5

View file

@ -189,22 +189,22 @@ void pc9801_state::draw_text(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd,
if(!secret) if(!secret)
{ {
/* TODO: priority */ // kanji select will override semigraphics
if(gfx_mode) // beatvice wants this for bitmap masking on edges during gameplay
if(kanji_sel)
tile_data = (m_kanji_rom[tile*0x20+yi*2+kanji_lr+tile_lr]);
else if(gfx_mode)
{ {
// gfx strip mode (semigraphics)
// number refers to the bit number in the tile data.
// This mode is identical to the one seen in PC-8001
// 00004444
// 11115555
// 22226666
// 33337777
tile_data = 0; tile_data = 0;
/*
gfx strip mode:
number refers to the bit number in the tile data.
This mode is identical to the one seen in PC-8801
00004444
11115555
22226666
33337777
*/
int gfx_bit; int gfx_bit;
gfx_bit = (xi & 4); gfx_bit = (xi & 4);
gfx_bit+= (yi & (2 << (char_size == 16 ? 0x01 : 0x00)))>>(1+(char_size == 16)); gfx_bit+= (yi & (2 << (char_size == 16 ? 0x01 : 0x00)))>>(1+(char_size == 16));
@ -212,8 +212,6 @@ void pc9801_state::draw_text(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd,
tile_data = ((tile >> gfx_bit) & 1) ? 0xff : 0x00; tile_data = ((tile >> gfx_bit) & 1) ? 0xff : 0x00;
} }
else if(kanji_sel)
tile_data = (m_kanji_rom[tile*0x20+yi*2+kanji_lr+tile_lr]);
else else
tile_data = (m_char_rom[tile*char_size+m_video_ff[FONTSEL_REG]*0x800+yi]); tile_data = (m_char_rom[tile*char_size+m_video_ff[FONTSEL_REG]*0x800+yi]);
} }