From f10b8ebf0c70f3cf4794ab15445deb6f61bee8f5 Mon Sep 17 00:00:00 2001 From: angelosa Date: Mon, 4 Nov 2024 10:45:03 +0100 Subject: video/upd7220.cpp: experimentally allow area 3 graphic drawing in forced bitmap mode * fix pc98:steamhea gameplay drawing --- hash/pc98.xml | 63 +++++++++++++++++++++++++------------------ src/devices/video/upd7220.cpp | 20 +++++++------- 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/hash/pc98.xml b/hash/pc98.xml index 6d23f87b9c2..d4d4e229008 100644 --- a/hash/pc98.xml +++ b/hash/pc98.xml @@ -25,13 +25,9 @@ TODO (most of these should be generic hash rulesets but anyway ...): - de-cloneize data disks, use comma separated info name="datadisk" instead; - Verify disk labels, several are mislabeled (i.e. has numbers instead of letters and viceversa); - Mark as baddump any SW disk(s) that sports non-default factory saves; -- Verify .hdm 3.5" entries, all of them but 100best35 may be really 5.25" instead. +- Verify .hdm 3.5" entries, all of them but 100best35 works on 5.25" interface instead. + Unless 123note is right and .hdm filesize is that trimmed ... - document any unorthodox way for running a given sw; -- document (and support) alternative file types (FDD, NFD, FIX) - can we convert some of those to FDI or D88? or some protection schemes need - such format? (Note that some disks come in DIP, DCP, DCU formats: these shall - be just plain images, like FDI, just with different headers with the track - "map") - fix doujin software names; - Remove manufacturer= and instead assign proper manufacturer naming for Victor freeware software (+ bad dump flag), bootleg for the PC9801 Game Packs; @@ -2439,10 +2435,14 @@ Not extensively tested (has several spreadsheet examples) - - Lotus Freelance (demo) - 19?? + + Lotus Freelance (R3J Auto Demo v1.0) + 1989 + Lotus + @@ -3433,14 +3433,13 @@ Incorrect layout on track 0 head 0, expected_size=166666, current_size=261600 - - + 5 Jikanme no Venus 1995 フェアリーダスト (Fairy Dust) + @@ -5702,11 +5701,13 @@ Every [kanji] character has one line of corruption - Animahjong V3 1993 ソニア (Sogna) + @@ -11862,11 +11863,17 @@ Missing [7220] text selector for choices (btanb? May just require specific keys, - - + Sid Meier's Civilization 1992 マイクロプローズジャパン (MicroProse Japan) + @@ -11900,12 +11907,14 @@ Missing [7220] text selector for choices (btanb? May just require specific keys, + + @@ -15917,15 +15926,14 @@ Is it really game like intended? [FDC] investigation required - Diadrum 1993 日本クリエイト (Nihon Create) + @@ -16166,10 +16174,11 @@ During a game [mouse] clicking is too fast (skips intermediate selections) ビクター音楽産業 (Victor Musical Industries) + - + @@ -18060,13 +18069,10 @@ Couple of "Unimplemented floating point control" opcodes triggered in error.log - + Duel 1990 呉ソフトウエア工房 (KSK) - @@ -61929,6 +61935,11 @@ Untested on [HDD] install Steam-Heart's 1994 戯画 (Giga) + diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp index 087e775c44d..107290888ae 100644 --- a/src/devices/video/upd7220.cpp +++ b/src/devices/video/upd7220.cpp @@ -19,7 +19,8 @@ TODO: - microbx2: sets mode=0x1f (interlace), oddly cuts off area scroll on prompt (double height chars?) while DEMO.1 don't. - repeat fields interlace mode; -- better honoring of visible area; +- support non-draw on retrace mode (pc98 bitmap layer -> potential raster effects), better + honoring of visible area (bail out thru m_al, cutting off unnecessary comparisons); - light pen; **************************************************************************************************/ @@ -32,7 +33,7 @@ TODO: #define LOG_CRTC (1U << 1) #define LOG_DRAW (1U << 2) -#define LOG_AREA (1U << 3) // print works best with -oslog +#define LOG_AREA (1U << 3) // printout works best with -oslog #define LOG_CMD (1U << 4) #define LOG_CMD2 (1U << 5) // DE related commands #define LOG_CMD3 (1U << 6) // memory interface (RDAT/WDAT) @@ -1805,8 +1806,7 @@ void upd7220_device::draw_graphics_line(bitmap_rgb32 &bitmap, uint32_t addr, int for (int sx = 0; sx < aw; sx++) { - // TODO: remove bump from both - if((sx << 4) < m_aw * 16 && y < al) + if(sx < m_aw && y < al) m_display_cb(bitmap, y, sx << 4, addr + (wd + 1) * (sx % pitch)); } } @@ -1837,20 +1837,22 @@ void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &clip if(im || force_bitmap) { // according to documentation only areas 0-1-2 can be drawn in bitmap mode - // PC98 Quarth definitely needs area 2 for player section. + // - pc98:quarth definitely needs area 2 for player section. + // - pc98:steamhea wants area 3 for scrolling and dialogue screens to work together, + // contradicting the doc. Fixed in 7220A or applies just for mixed mode? // TODO: what happens if combined area size is smaller than display height? // documentation suggests that it should repeat from area 0, needs real HW verification (no known SW do it). - if(area >= 3) - break; + if (area >= 3 && !force_bitmap) + break; - // PC98 madoum1-3 sets up ALL areas to a length of 0 after initial intro screen. + // pc98:madoum1-3 sets up ALL areas to a length of 0 after initial intro screen. // madoum1: area 0 sad==0 on gameplay (PC=0x955e7), sad==0xaa0 on second intro screen (tower) then intentionally scrolls up and back to initial position. // Suggests that length should be treated as max size if this occurs, this is also proven to be correct via real HW verification. // TODO: check if text partition do the same. if (len == 0) len = 0x400; - if(interlace) + if (interlace) len <<= 1; for(y = 0; y < len; y++) -- cgit v1.2.3