15Fermer17
FarewellLe 21/07/2009 à 14:10
--- Vectors.asm.old	2009-07-16 20:41:31.000000000 +0200
+++ Vectors.asm	2009-07-21 12:02:48.619049088 +0200
@@ -150,8 +150,9 @@
 	move.w	(sp)+,d1		; Get Old SR
 	move.l	(sp)+,a0		; Get Address of the 'crash'
 	move.w	(a0)+,d0		; We get the instruction and a0 ->next instruction
-	subi.w	#$F800,d0		; Is it > $F800 ? 
+	cmpi.w	#$F800,d0
 	bls.s	\no			; No, so it is a crash (First_Window isn't a ROM_CALL)
+		subi.w	#$F800,d0
 		move.l	a0,a1		; Jsr/Jmp with a 32 bits offset	
 		cmp.w	#$FFF0-$F800,d0
 		bne.s	\NoRelJsr
@@ -175,7 +176,18 @@
 \Jump			move.w	d1,SR		; Restore SR
 			pea	(a0)		; Push return address
 			jmp	(a1)		; Jump to Rom_call function
-\no:	lea	Line1111_str(Pc),a0
+\no:	subi.w	#$F000,d0
+	cmpi.w	#MAX_RAMCALL,d0
+	bcc.s	\error
+		move.w	d1,SR			; Restore SR
+		pea	(a0)			; Push return adress
+		add.w	d0,d0			; Offset *2
+		add.w	d0,d0			; *4 (table of longwords)
+		lea.l	RAM_TABLE(pc),a0	; Get ramcalls table ptr (Kernel.asm)
+		adda.w	d0,a0			; Set pointer to the right ramcall
+		rts				; Come back
+
+\error:	lea	Line1111_str(Pc),a0
 	bra	FATAL_ERROR

tromb Fichier joint : patch.diff smile

C'est optimisable au niveau du nettoyage du f-line. Mais faut changer les bcc et j'ai pas voulu me faire chier. Mais ça marche.