changeset 920:7cb0b32f1997

fc-pirhackinit works after fixing MAX_MEMREAD_BYTES
author Space Falcon <falcon@ivan.Harhan.ORG>
date Tue, 08 Sep 2015 23:33:38 +0000
parents 1dbc0f0851b3
children 38c7078712ab
files rvinterf/etmsync/pirhackinit.c rvinterf/include/etm.h
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/etmsync/pirhackinit.c	Tue Sep 08 19:50:23 2015 +0000
+++ b/rvinterf/etmsync/pirhackinit.c	Tue Sep 08 23:33:38 2015 +0000
@@ -11,7 +11,6 @@
 #include <strings.h>
 #include "etm.h"
 #include "ffs.h"
-#include "ffserr.h"
 #include "tmffs2.h"
 #include "localtypes.h"
 #include "exitcodes.h"
@@ -41,8 +40,8 @@
 
 	for (remain = total_bytes; remain; remain -= chunk) {
 		chunk = remain;
-		if (chunk > 240)
-			chunk = 240;
+		if (chunk > MAX_MEMREAD_BYTES)
+			chunk = MAX_MEMREAD_BYTES;
 		rc = do_memory_read(memaddr, databuf, chunk);
 		if (rc)
 			return(rc);
--- a/rvinterf/include/etm.h	Tue Sep 08 19:50:23 2015 +0000
+++ b/rvinterf/include/etm.h	Tue Sep 08 23:33:38 2015 +0000
@@ -49,4 +49,4 @@
 #define	TMCORE_OPC_CODEC_WR	0x67
 #define	TMCORE_OPC_DIEID	0x68
 
-#define	MAX_MEMREAD_BYTES	253
+#define	MAX_MEMREAD_BYTES	238