Re: [hatari-devel] TT emulation crashes when there is no ACSI drive

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

I'm afraid this patch did not help. There was no visible change.

WARN : Bus Error writing at address $23000002, PC=$fa005c addr_e3=fa005c op_e3=42ae

Best regards

Uwe

> Le 11/08/2019 à 08:02, Uwe Seimet a écrit :
> > Hi,
> > 
> > Disabling IDE disks does not make a difference.
> > 
> > This is the offending commit:
> > 
> > *   50bf142e - Merge new TT MFP code (3 months ago) <Nicolas Pomarede>
> > 
> > Commit ID 65dda3cf and older work fine for me, since 50bf142e there is
> > the crash. My compiler is gcc 8.3.0, by the way.
> > 
> > Best regards
> > 
> > Uwe
> > 
> 
> Hi
> 
> looking at the code, unlike what the commit's name imply, this is mostly 
> about natfeat (which was merged with new MFP code).
> 
> I don't know this part, but this looks suspicious to me :
> 
> static int mem_string_ok(Uint32 addr)
> {
> ...
>          for (i = 0; i < NF_MAX_STRING; i++) {
>                  if (!STMemory_CheckAreaType(addr, 1, ABFLAG_RAM | 
> ABFLAG_ROM)) {
>                          /* ends in invalid area -> error */
>                          M68000_BusError(addr, BUS_ERROR_READ, 
> BUS_ERROR_SIZE_BYTE, BUS_ERROR_ACCESS_DATA);
>                          return 0;
>                  }
>                  if (!buf[i]) {
>                          return i;
>                  }
>          }
> }
> 
> addr should be addr+i in these tests, else this always test the 1st byte 
> which is pointless.
> 
> 
> could you try the following changes in src/debug/natfeats.c :
> 
> --- natfeats.c 2019-05-28 21:49:21.701525671 +0200
> +++ natfeats.c     2019-08-11 10:20:09.387348678 +0200
> @@ -69,9 +69,9 @@ static int mem_string_ok(Uint32 addr)
>                  return 0;
>          }
>          for (i = 0; i < NF_MAX_STRING; i++) {
> -               if (!STMemory_CheckAreaType(addr, 1, ABFLAG_RAM | 
> ABFLAG_ROM)) {
> +               if (!STMemory_CheckAreaType(addr+i, 1, ABFLAG_RAM | 
> ABFLAG_ROM)) {
>                          /* ends in invalid area -> error */
> -                       M68000_BusError(addr, BUS_ERROR_READ, 
> BUS_ERROR_SIZE_BYTE, BUS_ERROR_ACCESS_DATA);
> +                       M68000_BusError(addr+i, BUS_ERROR_READ, 
> BUS_ERROR_SIZE_BYTE, BUS_ERROR_ACCESS_DATA);
>                          return 0;
>                  }
> 
> 
> Nicolas
> 
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/