From f6dd7ba6149949f7dfbd2df9ec9975e054622e59 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sat, 2 Nov 2024 12:07:30 +0100 Subject: nec/pc9801_v.cpp: double height 0 fontsel tiles when LR is 16 and monitor is 24kHz * fix arcus2 intro and gamepac1:03:valiant gameplay graphics --- src/mame/nec/bungo.cpp | 32 ++++++++++++++++---------------- src/mame/nec/bungo.h | 2 +- src/mame/nec/pc9801.cpp | 3 +++ src/mame/nec/pc9801_v.cpp | 16 +++++++++++++--- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/mame/nec/bungo.cpp b/src/mame/nec/bungo.cpp index 1794725def4..16e9c0a2121 100644 --- a/src/mame/nec/bungo.cpp +++ b/src/mame/nec/bungo.cpp @@ -2,20 +2,20 @@ // copyright-holders:Angelo Salese /************************************************************************************************** - NEC 文豪 / "Bungo" Word Processors (laptop family) - - TODO: - - needs list of components, no documentation available from the net except for bare specs here: - https://museum.ipsj.or.jp/en/computer/word/0058.html - - Needs an actual dump of the kanji ROM; - - Garbled message tells user to reset machine and hold SHIFT+MENU while having the - auxiliary disk in - https://www.leadedsolder.com/2022/10/15/pwp50sx-nec-mini5-psu-repair-pickup.html - NB: MENU key doesn't exist with current PC98 keyboard device, also note that the usual - I/O at $41-$43 is not polled (either expects an irq or perhaps they relocated) - - Verify what exactly the handwritten “Function 2 + F2 = Floppy.” printed on aux disk - means. - - Verify how much of PC-98 this really uses if anything at all. +NEC 文豪 / "Bungo" Word Processors (laptop family) + +TODO: +- needs list of components, no documentation available from the net except for bare specs here: + https://museum.ipsj.or.jp/en/computer/word/0058.html +- Needs an actual dump of the kanji ROM; +- Garbled message tells user to reset machine and hold SHIFT+MENU while having the + auxiliary disk in + https://www.leadedsolder.com/2022/10/15/pwp50sx-nec-mini5-psu-repair-pickup.html + NB: MENU key doesn't exist with current PC98 keyboard device, also note that the usual + I/O at $41-$43 is not polled (either expects an irq or perhaps they relocated) +- Verify what exactly the handwritten “Function 2 + F2 = Floppy.” printed on aux disk + means. +- Verify how much of PC-98 this really uses if anything at all. **************************************************************************************************/ @@ -136,8 +136,8 @@ void bungo_mini5sx_state::mini5sx_config(machine_config &config) // m_ppi_sys->in_pc_callback().set_constant(0xa0); // 0x80 cpu triple fault reset flag? // m_ppi_sys->out_pc_callback().set(FUNC(pc98lt_state::ppi_sys_beep_portc_w)); - // TODO: unverified, known to have a serial port - pc9801_serial(config); + // TODO: unverified, known to have a serial port + pc9801_serial(config); I8255(config, m_ppi_prn, 0); // m_ppi_prn->in_pb_callback().set_ioport("PRNB"); diff --git a/src/mame/nec/bungo.h b/src/mame/nec/bungo.h index 385b9022835..6abe110dbb7 100644 --- a/src/mame/nec/bungo.h +++ b/src/mame/nec/bungo.h @@ -38,7 +38,7 @@ private: u16 fake_dict_r(offs_t offset); - // just suppress for now, TBD + // just suppress for now, TBD virtual void uart_irq_check() override {}; void bungo_palette(palette_device &palette) const; diff --git a/src/mame/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp index 7b8a0dc7e02..f32fa2f6c01 100644 --- a/src/mame/nec/pc9801.cpp +++ b/src/mame/nec/pc9801.cpp @@ -3060,6 +3060,7 @@ COMP( 1986, pc9801vx, 0, 0, pc9801vx, pc9801rs, pc9801vm_state, init_p // ... // PC-H98 (Hyper 98, '90-'93 high end line with High-reso, proprietary NESA bus, E²GC) +// PC-H98S cfr. pc_h98.cpp // PC-H98T (LCD Hyper 98) // SV-H98 "98SERVER" (i486, later Hyper 98 revision) // SV-98 (Pentium based, second gen of 98SERVER) @@ -3096,6 +3097,8 @@ COMP( 1993, pc9801bx2, 0, 0, pc9801bx2, pc9801rs, pc9801bx_state, init_p // ... // PC-98LT / PC-98HA -> cfr. pc98ha.cpp +// PC-9801N "98NOTE" (V30 based, EMS + 3.5" floppy, 8.9" FL blue LCD). +// PC-9801N* (98NOTE upgrades) // PC-9801T (i386SX, extremely expensive TFT or LCD laptop with C-Bus slots, de-facto a "portable" desktop machine) // PC-9801LX (i286, belongs to pc98ha.cpp?) // PC-9801LS (i386SX, Plasma laptop) diff --git a/src/mame/nec/pc9801_v.cpp b/src/mame/nec/pc9801_v.cpp index 0043f55828a..94d5bae5bbe 100644 --- a/src/mame/nec/pc9801_v.cpp +++ b/src/mame/nec/pc9801_v.cpp @@ -86,6 +86,16 @@ void pc9801_state::draw_text(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd, // uint8_t interlace_on = m_video_ff[INTERLACE_REG]; uint8_t char_size = m_video_ff[FONTSEL_REG] ? 16 : 8; + uint8_t font_shift = 0; + const uint8_t char_base_mult = char_size; + // arcus2 (intro mask) and gamepac1:03:valiant double height tiles + // with lr = 16 and fontsel off (-> 8x8) in 24 kHz mode + // TODO: verify with LR slightly above or below this threshold + if (!m_video_ff[FONTSEL_REG] && lr >= 16) + { + font_shift = 1; + char_size = 16; + } uint8_t x_step; uint8_t lastul = 0; @@ -118,6 +128,7 @@ void pc9801_state::draw_text(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd, //kanji_lr |= (tile & 0x80) >> 7; // tokisg3 // ... but then ginga and gage expects working LR for PCG depending on the attribute. // beast3 uses tile bit 7 for the heart shaped char displayed on first screen. + // TODO: rename pcg to gaiji (actual nomenclature) const u8 pcg_lr = (BIT(knj_tile, 7) || BIT(tile, 7)); tile &= 0x7f; tile <<= 8; @@ -227,6 +238,7 @@ void pc9801_state::draw_text(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd, int gfx_bit; gfx_bit = (xi & 4); + // TODO: unverified for arcus2 case above, may be just base mult gfx_bit+= (yi & (2 << (char_size == 16 ? 0x01 : 0x00)))>>(1+(char_size == 16)); gfx_bit+= (yi & (4 << (char_size == 16 ? 0x01 : 0x00)))>>(1+(char_size == 16)); @@ -234,9 +246,7 @@ void pc9801_state::draw_text(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd, } else { - // TODO: arcus2 pretends to mask during intro via tile 0x87, lr = 16 and fontsel off (-> 8x8) in 24 kHz mode - // is it double heighting tiles? - tile_data = (m_char_rom[tile*char_size+m_video_ff[FONTSEL_REG]*0x800+yi]); + tile_data = (m_char_rom[tile*char_base_mult+m_video_ff[FONTSEL_REG]*0x800+(yi >> font_shift)]); } } -- cgit v1.2.3