| Re: [hatari-devel] EmuTOS boot freeze with Hatari git on 040/060 + MMU | 
[ Thread Index | 
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
] 
Le 15/03/2024 à 11:45, Nicolas Pomarède a écrit :
Le 15/03/2024 à 11:44, Christian Zietz a écrit :
Nicolas Pomarède schrieb:
stupid bug spotted and fixed, please try the attached patch on current
devel sources, it should use the correct MFP vector in case of interrupt
(iack_cycle() result was incorrectly saved in 'nr' instead of
'vector_nr', as in Exception_mmu030() )
Probably, the following line (even though it is only a debug output) 
should now changed to use 'STMemory_ReadLong (regs.vbr + 4* 
vector_nr)', too?
https://git.tuxfamily.org/hatari/hatari.git/tree/src/cpu/newcpu.c?id=a167cb4b7752f21dff9c2f1cf34e4b24d0cc00f2#n3305
Yes, I was planning to change it in the final commit once the fix is 
confirmed :)
Fix committed to hatari
Toni, appended patch could be applied to WinUAE too, even it won't 
affect it.
For some reason I see the bug about vector_nr was not present in WinUAE, 
I remember I wrote by hand the patch I sent you and the typo was not 
there :)
Nicolas
--- newcpu.cpp	2024-03-15 15:22:14.215727181 +0100
+++ newcpu.cpp	2024-03-15 15:29:25.378123721 +0100
@@ -2939,7 +2939,7 @@
 	if (interrupt)
 		vector_nr = iack_cycle(nr);
 
-	exception_debug (nr);
+	exception_debug (vector_nr);
 	MakeSR ();
     
 	if (!regs.s) {
@@ -3002,7 +3002,7 @@
 	// operations don't allocate new cachelines
 	cache_default_data |= CACHE_DISABLE_ALLOCATE;
 	
-	exception_debug (nr);
+	exception_debug (vector_nr);
 	MakeSR ();
 
 	if (!regs.s) {
@@ -3141,7 +3141,7 @@
 		g1 = generates_group1_exception(regs.ir);
 	}
 
-	exception_debug (nr);
+	exception_debug (vector_nr);
 	MakeSR ();
 
 	if (!regs.s) {