Re: [hatari-devel] Hatari/TT VME adress space behavior

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


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);
>  




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