upd7220.cpp: make a bitmap partition of len==0 to be max size, fixes pc98 madoum1-2-3 [Angelo Salese, sampson] (#8009)

* upd7220.cpp: make a bitmap partition of len==0 to be max size, fixes pc98 madoum1-2-3 [Angelo Salese, sampson]

* pc98.xml: consistency DAC1BIT tag, update dbuster QA note
This commit is contained in:
Angelo Salese 2021-04-30 12:54:35 +02:00 committed by GitHub
parent 6c7c3a3388
commit d7000112a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 14 deletions

View File

@ -7286,7 +7286,7 @@ only have some part of Windows file and a Video driver(CLGD?).
</part> </part>
</software> </software>
<!-- boot OK on RS class, on intro uses PCM1BIT and some text doesn't seem to be drawn? --> <!-- boot OK on RS class, on intro uses DAC1BIT and some text doesn't seem to be drawn? -->
<!-- black screen after Cocktail Soft logo on VM class (btanb?) --> <!-- black screen after Cocktail Soft logo on VM class (btanb?) -->
<software name="bishotsu" supported="partial"> <software name="bishotsu" supported="partial">
<description>Bishoujo Tsuushin - Chat no Susume</description> <description>Bishoujo Tsuushin - Chat no Susume</description>
@ -7603,7 +7603,7 @@ only have some part of Windows file and a Video driver(CLGD?).
</part> </part>
</software> </software>
<!-- This game is supposed to play sound effects through the beeper, but in MAME it just outputs a constant beep (PCM1BIT) --> <!-- This game is supposed to play sound effects through the beeper, but in MAME it just outputs a constant beep (DAC1BIT) -->
<software name="blockouta" cloneof="blockout" supported="partial"> <software name="blockouta" cloneof="blockout" supported="partial">
<description>Block Out (Patched?)</description> <description>Block Out (Patched?)</description>
<year>1991</year> <year>1991</year>
@ -16327,7 +16327,7 @@ only have some part of Windows file and a Video driver(CLGD?).
</part> </part>
</software> </software>
<!-- Sprites leave "trails" on screen --> <!-- boot OK, on VM class and RS class sprites leave "trails" on screen (GRCG or EGC regression) -->
<software name="dbuster" supported="partial"> <software name="dbuster" supported="partial">
<description>Dragon Buster</description> <description>Dragon Buster</description>
<year>1989</year> <year>1989</year>
@ -28336,8 +28336,11 @@ only have some part of Windows file and a Video driver(CLGD?).
</part> </part>
</software> </software>
<!-- no bitmap GFXs during gameplay --> <!-- all three Madou Monogatari sports a "Madou Monogatari 1-2-3" title screen -->
<software name="madoum1" supported="no"> <!-- verify if these were really released as stand alone. -->
<!-- boot OK, uses DAC1BIT samples -->
<software name="madoum1" supported="partial">
<description>Madou Monogatari 1</description> <description>Madou Monogatari 1</description>
<year>1991</year> <year>1991</year>
<publisher>コンパイル (Compile)</publisher> <publisher>コンパイル (Compile)</publisher>
@ -28357,8 +28360,8 @@ only have some part of Windows file and a Video driver(CLGD?).
</part> </part>
</software> </software>
<!-- no bitmap GFXs during gameplay --> <!-- boot OK, uses DAC1BIT samples -->
<software name="madoum2" supported="no"> <software name="madoum2" supported="partial">
<description>Madou Monogatari 2</description> <description>Madou Monogatari 2</description>
<year>1991</year> <year>1991</year>
<publisher>コンパイル (Compile)</publisher> <publisher>コンパイル (Compile)</publisher>
@ -28378,7 +28381,8 @@ only have some part of Windows file and a Video driver(CLGD?).
</part> </part>
</software> </software>
<software name="madoum3"> <!-- boot OK, uses DAC1BIT samples -->
<software name="madoum3" supported="partial">
<description>Madou Monogatari 3</description> <description>Madou Monogatari 3</description>
<year>1991</year> <year>1991</year>
<publisher>コンパイル (Compile)</publisher> <publisher>コンパイル (Compile)</publisher>

View File

@ -3,6 +3,7 @@
/********************************************************************** /**********************************************************************
Intel 82720 Graphics Display Controller emulation Intel 82720 Graphics Display Controller emulation
also known as NEC uPD7220
**********************************************************************/ **********************************************************************/
@ -22,7 +23,7 @@
- A5105 has a FIFO bug with the RDAT, should be a lot larger when it scrolls up. - A5105 has a FIFO bug with the RDAT, should be a lot larger when it scrolls up.
Can be fixed with a DRDY mechanism for RDAT/WDAT; Can be fixed with a DRDY mechanism for RDAT/WDAT;
- Some later SWs on PC-98 throws "Invalid command byte 05" (zettmj on Epson logo), - Some later SWs on PC-98 throws "Invalid command byte 05" (zettmj on Epson logo),
actual undocumented command to reset something? actual undocumented command to reset something or perhaps just check if upd7220 isn't really a upd72120 instead?
- honor visible area - honor visible area
- wide mode (32-bit access) - wide mode (32-bit access)
@ -1730,18 +1731,29 @@ void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &clip
if(im || force_bitmap) if(im || force_bitmap)
{ {
if(area >= 3) // TODO: most likely to be correct, Quarth (PC-98xx) definitely draws with area 2. We might see an area 3 someday ... // according to documentation only areas 0-1-2 can be drawn in bitmap mode
// PC98 Quarth definitely needs area 2 for player section.
// 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; break;
// 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; len <<= 1;
for(y = 0; y < len; y++) for(y = 0; y < len; y++)
{ {
/* TODO: again correct? // TODO: not completely correct, all is drawn half size with real HW tests on pc98 msdos by just changing PRAM values.
Quarth (PC-98xx) doesn't seem to use pitch here and it definitely wants bsy to be /2 to make scrolling to work. // pc98 quarth doesn't seem to use pitch here and it definitely wants bsy to be /2 to make scrolling to work.
Xevious (PC-98xx) wants the pitch to be fixed at 80, and wants bsy to be /1 // pc98 xevious wants the pitch to be fixed at 80, and wants bsy to be /1
Dragon Buster (PC-98xx) contradicts with Xevious with regards of the pitch tho ... */ // pc98 dbuster contradicts with Xevious with regards of the pitch tho ...
uint32_t const addr = ((sad << 1) & 0x3ffff) + ((y / (mixed ? 1 : m_lr)) * (m_pitch << (im ? 0 : 1))); uint32_t const addr = ((sad << 1) & 0x3ffff) + ((y / (mixed ? 1 : m_lr)) * (m_pitch << (im ? 0 : 1)));
for(int z = 0; z <= m_disp; ++z) for(int z = 0; z <= m_disp; ++z)
{ {