[hatari-devel] WinUae CPU for hatari

Thomas Huth huth at users.berlios.de
Thu Nov 18 08:41:57 CET 2010


On Wed, 17 Nov 2010 17:22:05 +0100
Laurent Sallafranque <laurent.sallafranque at free.fr> wrote:

> Last point, I'm not that sure that my yesterday's patch is good, as
> it always return 0.
> Maybe it's this patch that generates all the problems.

I think that patch was the wrong way for a solution.
Have a look at get_wordi at the end of memory.h, it uses wordgeti()
which is defined like this:

#define wordgeti(addr) (call_mem_get_func(get_mem_bank(addr).wgeti, addr))

As you can see, it accesses the wgeti field of the corresponding memory
bank. But when you now look at the memory bank definition in memory.c,
you'll see that the corresponding field is not set!

So please to try to complete the memory bank definitions first, and I
am pretty sure the "--compatible true" mode will also work, e.g.:

static addrbank ROMmem_bank =
{
    ROMmem_lget, ROMmem_wget, ROMmem_bget,
    ROMmem_lput, ROMmem_wput, ROMmem_bput,
    ROMmem_xlate, ROMmem_check,
    // The following fields were missing:
    NULL, "ROM",
    ROMmem_lget, ROMmem_wget, 0
};

I haven't tried it yet, but I am pretty sure that this is the main
problem here.

 Regards,
  Thomas



More information about the hatari-devel mailing list