Blob Blame History Raw
From 2e5fbe89cd3f67b06b292936dfdf4fdb104b7112 Mon Sep 17 00:00:00 2001
From: Greg King <gregdk@users.sf.net>
Date: Wed, 2 Oct 2019 10:09:48 -0400
Subject: [PATCH 045/170] Made the "none" CPU allow all address sizes.

---
 src/common/cpu.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/common/cpu.c b/src/common/cpu.c
index b055fae8..c1ff400b 100644
--- a/src/common/cpu.c
+++ b/src/common/cpu.c
@@ -95,20 +95,20 @@ int ValidAddrSizeForCPU (unsigned char AddrSize)
             return 1;
 
         case ADDR_SIZE_ZP:
-            /* Not supported by None and Sweet16 */
-            return (CPU != CPU_NONE && CPU != CPU_SWEET16);
+            /* Not supported by Sweet16 */
+            return (CPU != CPU_SWEET16);
 
         case ADDR_SIZE_ABS:
-            /* Not supported by None */
-            return (CPU != CPU_NONE);
+            /* Always supported */
+            return 1;
 
         case ADDR_SIZE_FAR:
-            /* Only supported by 65816 */
-            return (CPU == CPU_65816);
+            /* Supported by "none" and 65816 */
+            return (CPU == CPU_NONE && CPU == CPU_65816);
 
         case ADDR_SIZE_LONG:
-            /* Not supported by any CPU */
-            return 0;
+            /* "none" supports all sizes */
+            return (CPU == CPU_NONE);
 
         default:
             FAIL ("Invalid address size");
-- 
2.26.0