Re: [hatari-devel] VME access

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


Am Sun, 3 Jan 2021 00:51:12 +0200
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> I'm thinking of making VME register access run-
> time configurable, so that Hatari TT emulation can
> be used with Linux.
> 
> Any comments on the attached patch to implement that?

I'm really not a big fan of such hacks. Couldn't you please try to come
up with enough VME emulation instead to fix Linux on the TT? That would
be the better direction.

Apart from that:

@@ -202,13 +216,6 @@ static void IoMem_FixAccessForMegaSTE(void)
 	pInterceptReadTable[0xff8e23 - 0xff8000] = IoMem_VoidRead;
 	pInterceptWriteTable[0xff8e23 - 0xff8000] = IoMem_VoidWrite;
 
-	/* VME bus - we don't support it yet, but TOS uses FF8E09 to detect the Mega-STE */
-	for (addr = 0xff8e01; addr <= 0xff8e0f; addr += 2)
-	{
-		pInterceptReadTable[addr - 0xff8000] = IoMem_ReadWithoutInterception;
-		pInterceptWriteTable[addr - 0xff8000] = IoMem_WriteWithoutInterception;
-	}
-
 	/* The Mega-STE has a Z85C30 SCC serial port, too: */
 	for (addr = 0xff8c80; addr <= 0xff8c87; addr++)
 	{
@@ -329,6 +336,18 @@ void IoMem_Init(void)
 		IoMem_FixAccessForMegaSTE();
 
 
+	/*
+	 * VME bus - we don't support it yet, but whether accessing VME registers
+	 * on machines with VME (MegaSTE/TT) is run-time configurable because:
+	 * - TOS uses FF8E09 to detect Mega-STE, so VME address errors need to
+	 *   be disabled to support that
+	 * - Linux actually uses VME, so it fails to boot, if VME register accesses
+	 *   don't give errors, but VME doesn't work properly
+	 */
+	if (!ConfigureParams.System.bVmeErrors &&
+	    (Config_IsMachineTT() || Config_IsMachineMegaSTE()))
+		IoMem_DisableVmeErrors();

That part looks wrong. Is Mega-STE still working right for both setting
of the bVmeErrors variable?

 Thomas



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