Re: [hatari-devel] Regression (?) in 2.4.1 - Time Slices by Defence Force |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Regression (?) in 2.4.1 - Time Slices by Defence Force
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Thu, 29 Dec 2022 16:29:40 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1672331383; bh=oI4ZxtqWkQN7mSC1tCo2O2fs/r/PJVS/r8WiNxXy4KE=; h=Date:From:To:Subject:From; b=PqDI/vjlEeOAFPKqS6w5iX//+mMlR2g0mQztAgIh9Mfn0/l/fXjv4v6TsxwfasJZA DGvJeWT7NDxTt8Trfr7gF6WaLQKepHXaIYL6h++Ce0InC4ChVyrg1fBM6wYdOirNWL d+DGYlusGd4Pbs2cm1gQNzHtW72zRMJtNMezRuzfHLBY1GibLK259KHzQPBdJI09sN M214lidK0j+P9C0yhHc7prXd4TGyZEqddiJGEd3AFnEmGeifTH8E8BCMq+xJfBz432 AM5it+F+RJfJdKsNacPesLwAPpiQnuL84dTqN5gsx/hRzUIop72+3l4CDWT5/fKNTS UpcaVf59yl+qA==
Am Tue, 27 Dec 2022 16:39:06 +0100
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> Le 27/12/2022 à 15:20, Nicolas Pomarède a écrit :
> > Le 27/12/2022 à 11:49, Troed Sångberg a écrit :
> >> Hi all,
> >>
> >> Just had a discussion on mono Hatari compatibility on IRC and ran the
> >> above mono demo. It's already in the compatibility list as;
> >>
> >> "Monochrome. Vertical STNICCC2015 scroll text is missing and some
> >> parts of the screen have inverted colors"
> >>
> >> (this is actually one and the same issue btw)
> >>
> >> However, both on Windows 64 (official 2.4.1) and on Linux (my own
> >> build) the demo now crashes/segfaults (no console output) after the
> >> "Beat Slappaz" logo. This is where some synced hardware scroll should
> >> appear.
> >>
> >> 1MB STE mono tested, both EmuTOS and TOS 1.62
> >
> > Hi
> >
> > I confirm the crash :
> >
> >
> > Thread 1 "hatari" received signal SIGSEGV, Segmentation fault.
> > 0x000000000062217d in Video_CopyScreenLineMono () at
> > /home/npomarede/src/hatari.git/src/video.c:3425
> > 3425 memcpy(pSTScreen, pVideoRaster, SCREENBYTES_MONOLINE);
> >
> >
> > (gdb) bt
> > #0 0x000000000062217d in Video_CopyScreenLineMono () at
> > /home/npomarede/src/hatari.git/src/video.c:3425
> > #1 Video_EndHBL () at /home/npomarede/src/hatari.git/src/video.c:3180
> > #2 Video_InterruptHandler_HBL () at
> > /home/npomarede/src/hatari.git/src/video.c:3000
> >
> > it seems pVideoRaster points to out of buffer address at this point. In
> > my case it happens when nHBL=87, might differ for others.
> >
> >
> > This is related to switching to "small mem" mode by default when
> > compiling hatari. If I compile with
> >
> > ./configure --disable-small-mem
> >
> > then crash goes away.
> >
> > Thomas, any idea ? maybe the safe "margin" buffer that was allocated at
> > the end of existing RAM is not big enough ?
>
> The video address was in fact not correctly masked in monochrome mode in
> ST/STE mode. In these cases, MMU should only sees RAM 0 - 0x3fffff,
> anything above that will be masked with 0x3fffff to keep only the 22
> lowest bits of the video address.
>
> This mask was present in color mode since a long time, but not in mono
> mode, hence the crash when using small mem.
>
> I pushed a fix for this, hatari doesn't crash anymore in small mem mode.
Thanks, that looks like the correct fix indeed!
Thomas