Re: [hatari-devel] Memory bank configuration register

[ Thread Index | Date Index | More Archives ]

On 23/06/2013 16:44, Troed Sångberg wrote:
On Sat, Jun 22, 2013 at 6:34 PM, Nicolas Pomarède
<npomarede@xxxxxxxxxxxx <mailto:npomarede@xxxxxxxxxxxx>> wrote:

    On 22/06/2013 18:21, Troed Sångberg wrote:

        on real hardware ;) Thanks for the heads up - I hadn't looked
        into why
        yet but I did suspect our memtop handling.

    Note that in stMemory.c we set ff8001 to what the user chose as RAM
    size in Hatari configuration, unless another program modify this
    byte, you should be safe to read it to know how many RAM is
    "detected" on STF/STE.

    So using ff8001 should give correct results under real HW or Hatari
    ; are you using another way to detect RAM size ? (writing at higher
    RAM location and checking if you read what you just wrote ?)

No, but my code writes to $ff8001 ;) If that doesn't stick in Hatari it
could indeed cause the behaviour I've seen - I think. As I said, I
haven't debugged it.
(The code I have working on Hatari but not on real hardware has to do
with where TOS puts the video buffer - which I assume is done using
memtop. I'll look into it when I'm back with my STE in a few weeks)


In that case, you will certainly get different results. In Hatari, writes to ff8001 have no effect, it won't affect the physical memory (only RAM config under F12 key will change RAM size) while on a real ST it might disable one memory bank (but I don't really remember what it does for real ? Never needed to look at it so far).

I don't recall any program so far that manipulates ff8001 (ie they all work without having to emulate writes to ff8001). Maybe you could use another method if you want to be compatible with current state of Hatari and real HW ?


Mail converted by MHonArc 2.6.19+