Re: [hatari-devel] Hatari/TT VME adress space behavior |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Hatari/TT VME adress space behavior
- From: Uwe Seimet <Uwe.Seimet@xxxxxxxxx>
- Date: Sun, 20 Jul 2025 19:46:55 +0200
- Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1753033630; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=R8VrI/V+yOxexPRyA0uJEhjVkI8R+kb1BMrM1+Deq2k=; b=QcrjxjnGE9lqp9m7vebKg3XtaziSSwClIeTY2ETTS/MOD6E3CXOaGS3XD1gppNU/GM o4e7RAwyNiHVDe0LtQ5ENbx6sjAVazFYuSOKsZjrwU4+G+UsSjG7N3DZBbwoc+6OgkFp /pCsQnpyZRWZDhZuJlPaEgMtGMkcGOVI+KQOliPxN8dsap2/p35xotgI6Oz0vQ5Ju9sY njWUk9IloTaUYaPyQUJU64JEekNkCW3otu7uEWAafcJ2pCEF/nTalCS6RveUriTioURM UzocQw9fRZVyBE+gOH7UACI9vxcco0KhoDVa6hHi5sjzEHn/kM6HvGqwppP9/Yw8gQN0 FJHQ==
- Arc-seal: i=1; a=rsa-sha256; t=1753033630; cv=none; d=strato.com; s=strato-dkim-0002; b=md50B/Kgxc4OZj7bKeAjBjCyW/+tm1isJHvu3DE4B0/nu/5rqxviXBA6S/ldQur20P SoB/UeJ5o8gMvCxr0l49pQ26DCzcI2rwfgADkBTvPnoQ9ZbtaSp0MDuLqkKkuh+BuasH Q+auETuP7AdWpCfzGIqrecStieQm6wNN+OqxOh22PBY+ItgilN+qwxVdry+FcBs9/hwU R1Tl6pDq9AWB4kM0FCPdQeuV8uWR0KSiuNeq8/xEhlBkP3gJM12V6H3WGxCFjTi8V1HT sP1QSeFtvrR3C91yDz9Zn+KXzmTb5sQCyJHqliOaoTjeOBJhYg92tGogPv/bFRbYOOjp mTHw==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1753033630; s=strato-dkim-0002; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=R8VrI/V+yOxexPRyA0uJEhjVkI8R+kb1BMrM1+Deq2k=; b=Tprr5W1cDSvMrSNcWm5jirdehRDCLc38EWZm5VDRNkvCa9xf/Tc2ew/FmwMA+BKu3O fPl2B3SVGL8JwkFyLBrF09vn3yFHHRjOmLuR0H2N25b4A5HeHYmHdnM0Kvu8/1OXECr0 gLnUMAzhQCJb84BBWu59HOf+bXMImw/E55+wsh6SoCC2Ronys4EHqKMkIsnbRbWUGSwX t/s90w+pkSArXhUI73hSQJzDmTiQ/0UN2U9oyHif+dpOD5jDiPAksvb122F2kx0WB1D3 XwNo6c882OsgLVYzqI1714vg5CElhjyGmxQ38XzpoBvu9L62uxagAQcCsHW5suEQs4TL Io/Q==
- Dkim-signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1753033630; s=strato-dkim-0003; d=seimet.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date:Cc:Date:From: Subject:Sender; bh=R8VrI/V+yOxexPRyA0uJEhjVkI8R+kb1BMrM1+Deq2k=; b=PCIa02NBAQed00wqfM9Vhhb1Md4ALdOgzMoao/q+A9+pbUT8r5SzkPInIfIMc2MvfD PRfIBr8DPQvUA4WVDIDQ==
Hi,
I can confirm that on both TT and MegaSTE the patch works as expected.
Regarding the MegaSTE I was surprised, though, because even without the
patch there was a bus error before. I thought I had tested this and there
was no bus error in the past, but I am probably mistaken.
Anyway, for both machines the behavior looks correct now. Thank you for
addressing this issue.
Best regards
Uwe
> Le 08/07/2025 à 10:14, Nicolas Pomarède a écrit :
> > Le 08/07/2025 à 10:12, Uwe Seimet a écrit :
> >> Hi,
> >>
> >>> although some changes for SCU support can be seen as related to the VME
> >>> bus and its registers, Hatari does in fact very little regarding VME
> >>> itself, so it's quite possible it doesn't behave similarly to a real TT
> >>> as you describe.
> >>>
> >>> But using reports as yours comparing real TT to emulation, it should be
> >>> possible to improve this, especially returning bus error should not be
> >>> too difficult (as Hatari doesn't support VME card emulation)
> >>
> >> Any chance to get this implemented/fixed? After looking at the sources I
> >> do not know how to do this, but maybe for somebody who has more
> >> insight it
> >> is just a minor effort?
> >>
> >
> > Hi
> >
> > it seems I lost track of this mail after the discussion went on DKIM /
> > mails problem.
> > I will add this to my todo list
> >
>
> Hi
>
> can you try the attached patch on top of the current git devel version
> of hatari ?
>
> it should return bus error when accessing $FExxxxxx regions in MegaSTE
> and TT mode.
>
> Nicolas
> diff --git a/src/cpu/memory.c b/src/cpu/memory.c
> index c60d8bdb..2cbd8590 100644
> --- a/src/cpu/memory.c
> +++ b/src/cpu/memory.c
> @@ -47,6 +47,8 @@ static uae_u32 TTmem_mask;
> #define IOmem_start 0x00FF0000
> #define TTmem_start 0x01000000 /* TOS 3 and TOS 4 always expect extra RAM at this address */
> #define TTmem_end 0x80000000 /* Max value for end of TT ram, which gives 2047 MB */
> +#define VMEmem_start 0xFE000000 /* MegaSTE and TT support a VME bus. This returns a bus error */
> +#define VMEmem_end 0xFF000000 /* when no board is plugged */
>
> #define IdeMem_size 65536
> #define IOmem_size 65536
> @@ -1813,6 +1815,13 @@ void memory_init(uae_u32 NewSTMemSize, uae_u32 NewTTMemSize, uae_u32 NewRomMemSt
> map_banks_ce(&BusErrMem_bank, IdeMem_start >> 16, 0x1, 0, CE_MEMBANK_CHIP16, CE_MEMBANK_NOT_CACHABLE);
> }
>
> + /* VME region on MegaSTE and TT : 0xFE000000 - 0xFEFFFFFF */
> + /* Hatari doesn't emulate VME board for now, so this region should return bus errors */
> + if ( Config_IsMachineMegaSTE() || Config_IsMachineTT() )
> + {
> + map_banks_ce(&BusErrMem_bank, VMEmem_start >> 16, ( VMEmem_end - VMEmem_start ) >> 16 , 0, CE_MEMBANK_CHIP16, CE_MEMBANK_NOT_CACHABLE);
> + }
> +
> /* Illegal memory regions cause a bus error on the ST: */
> map_banks_ce(&BusErrMem_bank, 0xF10000 >> 16, 0x9, 0, CE_MEMBANK_CHIP16, CE_MEMBANK_NOT_CACHABLE);
>