Re: [hatari-devel] defaulting to SMALL_MEM

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


Am Sun, 20 Feb 2022 08:48:16 +0000
schrieb Thomas Huth <th.huth@xxxxxxxxx>:

> Am Sat, 19 Feb 2022 14:29:01 +0100
> schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> [...] 
> > I don't think SMALL_MEM is really necessary given today's computer
> > and it's only 16 MB to allocate, but that's only my opinion, I
> > understand other would like to save ram.
> > 
> > Then as a trade off between really more complex code and lowering
> > RAM usage and keeping the possibility to emulate border tricks even
> > when video points outside physical RAM, I would go for nbr 3 and
> > always allocate 4 MB + margin.  
> 
> As we've recently learnt, SMALL_MEM is even a little bit faster than
> using the big 16 MiB array, and 4 MiB (+2 MiB for I/O and ROM) is
> still better than 16 MiB, so I think I'd vote for the option #3 now.

I've now added a patch that implements this as good as possible. I also
had to adjust the DMA mask to 23 bit if using 8 MiB of RAM, and
allocate the full 16 MiB if using more than 8 MiB of RAM, so it's still
somewhat ugly, but I guess it's still the best compromise between the
two extremes (either allocating less memory and adding lots of sanity
checks, or always using an STRam array with 16 MiB).
Please check whether it works as expected - especially the TT mode and
ST modes with more than 4 MiB might behave a little bit different now.

 Thomas



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