From 17a99e46e7952fb8d1af34e2f5666c56006a205b Mon Sep 17 00:00:00 2001 From: dwsJason Date: Sat, 22 Feb 2020 16:20:52 -0500 Subject: [PATCH] PEI: allow both addressing styles $dp, and ($dp) --- x65.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x65.cpp b/x65.cpp index 449d993..a9d56b2 100644 --- a/x65.cpp +++ b/x65.cpp @@ -503,7 +503,7 @@ enum AddrMode { AM8_JML = AMM_REL_L | AMM_ABS_L, AM8_BRL = AMM_BRANCH_L | AMM_ABS, AM8_MVN = AMM_BLK_MOV, - AM8_PEI = AMM_ZP_REL, + AM8_PEI = AMM_ZP_REL | AMM_ZP, AM8_PER = AMM_BRANCH_L | AMM_ABS, AM8_REP = AMM_IMM | AMM_ZP, // Merlin allows this to look like a zp access }; @@ -807,7 +807,7 @@ struct mnem opcodes_65816[] = { { "mvp", AM8_MVN, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44 } }, { "mvn", AM8_MVN, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54 } }, { "pea", AMM_ABS, { 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, - { "pei", AMM_ZP, { 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, + { "pei", AM8_PEI, { 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, { "per", AM8_PER, { 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, { "rep", AM8_REP, { 0x00, 0xc2, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, { "sep", AM8_REP, { 0x00, 0xe2, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },