i386: fix cycles when leaving rep when out of cycles and count == 0

fmtowns_cd: add note about microcosm
This commit is contained in:
cracyc 2024-07-18 20:51:26 -05:00
parent 1b2697df93
commit 7e33c3fbf3
2 changed files with 3 additions and 2 deletions

View file

@ -17458,7 +17458,8 @@ User/save disks that can be created from the game itself are not included.
</part>
</software>
<software name="mcosm">
<!-- requires cheat to reduce cpu clock on 16Mhz model to 75% to avoid hang -->
<software name="mcosm" supported="partial">
<!--
Origin: redump.org
<rom name="Microcosm (Japan) (Rev A) (Track 1).bin" size="423007200" crc="dce333fc" sha1="63daf9e93740a007cdfc59c9105b108a924dee68"/>

View file

@ -1278,7 +1278,7 @@ void i386_device::i386_repeat(int invert_flag)
count = --REG32(ECX);
else
count = --REG16(CX);
if (m_cycles <= 0)
if (count && (m_cycles <= 0))
goto outofcycles;
}
while( count && (!flag || (invert_flag ? !*flag : *flag)) );