|Re: [hatari-devel] defaulting to SMALL_MEM|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] defaulting to SMALL_MEM
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 20 Feb 2022 21:08:42 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1645391325; bh=NmxpdhGAn2gp5neP0nRe6rd46B5QeIdNeMAueXuvfoU=; h=Date:From:To:Subject:From; b=M87lYxlXYaj0c7MPcyVb3aIDDDEai6yR+clgZgnEh/h+6pm68MzlXj2gF4Y/kpyvN UscKZAzg6h4KY3DRekwzjejHHm8x0graOKe+iB1NKpFj55MTBrTNrOV1GU5VdWBr/Z 4DBld+lzOMI5ChhXkN2OAeZZWv5lkp2z2FjWPzM2fqDFpvqR/U4kA40/jidVvilBBa yPZ0ART09V38mT4iXJ3gLOZzJq5n0/J3LRMHQSjtLruOXU7LrAqWBUV49O52+xnbap 7KQ56VWLAxfzgTwpbZER+xjwMlHEVx3FSBbklF0gLQP710cCNdvvW6N4NoT7ekKQ4Y UEozBza2PxyKw==
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.