diff --git a/SourceGen/SGTestData/2000-allops-value-6502 b/SourceGen/SGTestData/10000-allops-value-6502 similarity index 100% rename from SourceGen/SGTestData/2000-allops-value-6502 rename to SourceGen/SGTestData/10000-allops-value-6502 diff --git a/SourceGen/SGTestData/2002-allops-value-65C02 b/SourceGen/SGTestData/10001-allops-value-65C02 similarity index 100% rename from SourceGen/SGTestData/2002-allops-value-65C02 rename to SourceGen/SGTestData/10001-allops-value-65C02 diff --git a/SourceGen/SGTestData/1000-allops-value-65816 b/SourceGen/SGTestData/10002-allops-value-65816 similarity index 100% rename from SourceGen/SGTestData/1000-allops-value-65816 rename to SourceGen/SGTestData/10002-allops-value-65816 diff --git a/SourceGen/SGTestData/2001-allops-zero-6502 b/SourceGen/SGTestData/10010-allops-zero-6502 similarity index 100% rename from SourceGen/SGTestData/2001-allops-zero-6502 rename to SourceGen/SGTestData/10010-allops-zero-6502 diff --git a/SourceGen/SGTestData/2003-allops-zero-65C02 b/SourceGen/SGTestData/10011-allops-zero-65C02 similarity index 100% rename from SourceGen/SGTestData/2003-allops-zero-65C02 rename to SourceGen/SGTestData/10011-allops-zero-65C02 diff --git a/SourceGen/SGTestData/1001-allops-zero-65816 b/SourceGen/SGTestData/10012-allops-zero-65816 similarity index 100% rename from SourceGen/SGTestData/1001-allops-zero-65816 rename to SourceGen/SGTestData/10012-allops-zero-65816 diff --git a/SourceGen/SGTestData/1002-embedded-instructions b/SourceGen/SGTestData/10022-embedded-instructions similarity index 100% rename from SourceGen/SGTestData/1002-embedded-instructions rename to SourceGen/SGTestData/10022-embedded-instructions diff --git a/SourceGen/SGTestData/1003-flags-and-branches b/SourceGen/SGTestData/10032-flags-and-branches similarity index 100% rename from SourceGen/SGTestData/1003-flags-and-branches rename to SourceGen/SGTestData/10032-flags-and-branches diff --git a/SourceGen/SGTestData/1004-data-recognition b/SourceGen/SGTestData/10042-data-recognition similarity index 100% rename from SourceGen/SGTestData/1004-data-recognition rename to SourceGen/SGTestData/10042-data-recognition diff --git a/SourceGen/SGTestData/2000-allops-value-6502.dis65 b/SourceGen/SGTestData/2000-allops-value-6502.dis65 deleted file mode 100644 index f2d301f..0000000 --- a/SourceGen/SGTestData/2000-allops-value-6502.dis65 +++ /dev/null @@ -1,21 +0,0 @@ -### 6502bench SourceGen dis65 v1.0 ### -{ -"FileDataLength":598,"FileDataCrc32":-1597128799,"ProjectProps":{ -"CpuName":"6502","IncludeUndocumentedInstr":true,"EntryFlags":13566159,"AnalysisParams":{ -"AnalyzeUncategorizedData":true,"MinCharsForString":4}, -"PlatformSymbolFileIdentifiers":[],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{ -}}, -"AddressMap":[{ -"Offset":0,"Addr":4096}],"TypeHints":[{ -"Low":0,"High":0,"Hint":"Code"}],"StatusFlagOverrides":{ -}, -"Comments":{ -}, -"LongComments":{ -}, -"Notes":{ -}, -"UserLabels":{ -}, -"OperandFormats":{ -}} diff --git a/SourceGen/SGTestData/2004-numeric-types b/SourceGen/SGTestData/20000-numeric-types similarity index 100% rename from SourceGen/SGTestData/2004-numeric-types rename to SourceGen/SGTestData/20000-numeric-types diff --git a/SourceGen/SGTestData/2004-numeric-types.cs b/SourceGen/SGTestData/20000-numeric-types.cs similarity index 100% rename from SourceGen/SGTestData/2004-numeric-types.cs rename to SourceGen/SGTestData/20000-numeric-types.cs diff --git a/SourceGen/SGTestData/2004-numeric-types.dis65 b/SourceGen/SGTestData/20000-numeric-types.dis65 similarity index 98% rename from SourceGen/SGTestData/2004-numeric-types.dis65 rename to SourceGen/SGTestData/20000-numeric-types.dis65 index 6d9a8ac..7ff704c 100644 --- a/SourceGen/SGTestData/2004-numeric-types.dis65 +++ b/SourceGen/SGTestData/20000-numeric-types.dis65 @@ -17,7 +17,7 @@ "SmartPlpHandling":true}, "PlatformSymbolFileIdentifiers":[], -"ExtensionScriptFileIdentifiers":["PROJ:2004-numeric-types.cs"], +"ExtensionScriptFileIdentifiers":["PROJ:20000-numeric-types.cs"], "ProjectSyms":{ }}, diff --git a/SourceGen/SGTestData/2001-allops-zero-6502.dis65 b/SourceGen/SGTestData/2001-allops-zero-6502.dis65 deleted file mode 100644 index 733735c..0000000 --- a/SourceGen/SGTestData/2001-allops-zero-6502.dis65 +++ /dev/null @@ -1,21 +0,0 @@ -### 6502bench SourceGen dis65 v1.0 ### -{ -"FileDataLength":598,"FileDataCrc32":1426913860,"ProjectProps":{ -"CpuName":"6502","IncludeUndocumentedInstr":true,"EntryFlags":13566159,"AnalysisParams":{ -"AnalyzeUncategorizedData":true,"MinCharsForString":4}, -"PlatformSymbolFileIdentifiers":[],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{ -}}, -"AddressMap":[{ -"Offset":0,"Addr":4096}],"TypeHints":[{ -"Low":0,"High":0,"Hint":"Code"}],"StatusFlagOverrides":{ -}, -"Comments":{ -}, -"LongComments":{ -}, -"Notes":{ -}, -"UserLabels":{ -}, -"OperandFormats":{ -}} diff --git a/SourceGen/SGTestData/2002-allops-value-65C02.dis65 b/SourceGen/SGTestData/2002-allops-value-65C02.dis65 deleted file mode 100644 index 9f980ca..0000000 --- a/SourceGen/SGTestData/2002-allops-value-65C02.dis65 +++ /dev/null @@ -1,21 +0,0 @@ -### 6502bench SourceGen dis65 v1.0 ### -{ -"_ContentVersion":1,"FileDataLength":489,"FileDataCrc32":2029737363,"ProjectProps":{ -"CpuName":"65C02","IncludeUndocumentedInstr":true,"EntryFlags":32964815,"AnalysisParams":{ -"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true}, -"PlatformSymbolFileIdentifiers":[],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{ -}}, -"AddressMap":[{ -"Offset":0,"Addr":4096}],"TypeHints":[{ -"Low":0,"High":0,"Hint":"Code"}],"StatusFlagOverrides":{ -}, -"Comments":{ -}, -"LongComments":{ -}, -"Notes":{ -}, -"UserLabels":{ -}, -"OperandFormats":{ -}} diff --git a/SourceGen/SGTestData/2003-allops-zero-65C02.dis65 b/SourceGen/SGTestData/2003-allops-zero-65C02.dis65 deleted file mode 100644 index 53c630f..0000000 --- a/SourceGen/SGTestData/2003-allops-zero-65C02.dis65 +++ /dev/null @@ -1,21 +0,0 @@ -### 6502bench SourceGen dis65 v1.0 ### -{ -"_ContentVersion":1,"FileDataLength":489,"FileDataCrc32":-1807290917,"ProjectProps":{ -"CpuName":"65C02","IncludeUndocumentedInstr":true,"EntryFlags":33489103,"AnalysisParams":{ -"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true}, -"PlatformSymbolFileIdentifiers":[],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{ -}}, -"AddressMap":[{ -"Offset":0,"Addr":4096}],"TypeHints":[{ -"Low":0,"High":0,"Hint":"Code"}],"StatusFlagOverrides":{ -}, -"Comments":{ -}, -"LongComments":{ -}, -"Notes":{ -}, -"UserLabels":{ -}, -"OperandFormats":{ -}} diff --git a/SourceGen/SGTestData/Expected/2000-allops-value-6502_64tass.S b/SourceGen/SGTestData/Expected/10000-allops-value-6502_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/2000-allops-value-6502_64tass.S rename to SourceGen/SGTestData/Expected/10000-allops-value-6502_64tass.S diff --git a/SourceGen/SGTestData/Expected/2000-allops-value-6502_Merlin32.S b/SourceGen/SGTestData/Expected/10000-allops-value-6502_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/2000-allops-value-6502_Merlin32.S rename to SourceGen/SGTestData/Expected/10000-allops-value-6502_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/2000-allops-value-6502_acme.S b/SourceGen/SGTestData/Expected/10000-allops-value-6502_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/2000-allops-value-6502_acme.S rename to SourceGen/SGTestData/Expected/10000-allops-value-6502_acme.S diff --git a/SourceGen/SGTestData/Expected/2000-allops-value-6502_cc65.S b/SourceGen/SGTestData/Expected/10000-allops-value-6502_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/2000-allops-value-6502_cc65.S rename to SourceGen/SGTestData/Expected/10000-allops-value-6502_cc65.S diff --git a/SourceGen/SGTestData/Expected/2001-allops-zero-6502_cc65.cfg b/SourceGen/SGTestData/Expected/10000-allops-value-6502_cc65.cfg similarity index 72% rename from SourceGen/SGTestData/Expected/2001-allops-zero-6502_cc65.cfg rename to SourceGen/SGTestData/Expected/10000-allops-value-6502_cc65.cfg index 8c9a1c5..2df3772 100644 --- a/SourceGen/SGTestData/Expected/2001-allops-zero-6502_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10000-allops-value-6502_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 2001-allops-zero-6502 +# 6502bench SourceGen generated linker script for 10000-allops-value-6502 MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=598; diff --git a/SourceGen/SGTestData/Expected/2002-allops-value-65C02_64tass.S b/SourceGen/SGTestData/Expected/10001-allops-value-65C02_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/2002-allops-value-65C02_64tass.S rename to SourceGen/SGTestData/Expected/10001-allops-value-65C02_64tass.S diff --git a/SourceGen/SGTestData/Expected/2002-allops-value-65C02_Merlin32.S b/SourceGen/SGTestData/Expected/10001-allops-value-65C02_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/2002-allops-value-65C02_Merlin32.S rename to SourceGen/SGTestData/Expected/10001-allops-value-65C02_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/2002-allops-value-65C02_acme.S b/SourceGen/SGTestData/Expected/10001-allops-value-65C02_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/2002-allops-value-65C02_acme.S rename to SourceGen/SGTestData/Expected/10001-allops-value-65C02_acme.S diff --git a/SourceGen/SGTestData/Expected/2002-allops-value-65C02_cc65.S b/SourceGen/SGTestData/Expected/10001-allops-value-65C02_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/2002-allops-value-65C02_cc65.S rename to SourceGen/SGTestData/Expected/10001-allops-value-65C02_cc65.S diff --git a/SourceGen/SGTestData/Expected/2003-allops-zero-65C02_cc65.cfg b/SourceGen/SGTestData/Expected/10001-allops-value-65C02_cc65.cfg similarity index 72% rename from SourceGen/SGTestData/Expected/2003-allops-zero-65C02_cc65.cfg rename to SourceGen/SGTestData/Expected/10001-allops-value-65C02_cc65.cfg index 0828cc3..b828bb6 100644 --- a/SourceGen/SGTestData/Expected/2003-allops-zero-65C02_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10001-allops-value-65C02_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 2003-allops-zero-65C02 +# 6502bench SourceGen generated linker script for 10001-allops-value-65C02 MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=489; diff --git a/SourceGen/SGTestData/Expected/1000-allops-value-65816_64tass.S b/SourceGen/SGTestData/Expected/10002-allops-value-65816_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/1000-allops-value-65816_64tass.S rename to SourceGen/SGTestData/Expected/10002-allops-value-65816_64tass.S diff --git a/SourceGen/SGTestData/Expected/1000-allops-value-65816_Merlin32.S b/SourceGen/SGTestData/Expected/10002-allops-value-65816_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/1000-allops-value-65816_Merlin32.S rename to SourceGen/SGTestData/Expected/10002-allops-value-65816_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/1000-allops-value-65816_acme.S b/SourceGen/SGTestData/Expected/10002-allops-value-65816_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/1000-allops-value-65816_acme.S rename to SourceGen/SGTestData/Expected/10002-allops-value-65816_acme.S diff --git a/SourceGen/SGTestData/Expected/1000-allops-value-65816_cc65.S b/SourceGen/SGTestData/Expected/10002-allops-value-65816_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/1000-allops-value-65816_cc65.S rename to SourceGen/SGTestData/Expected/10002-allops-value-65816_cc65.S diff --git a/SourceGen/SGTestData/Expected/1001-allops-zero-65816_cc65.cfg b/SourceGen/SGTestData/Expected/10002-allops-value-65816_cc65.cfg similarity index 72% rename from SourceGen/SGTestData/Expected/1001-allops-zero-65816_cc65.cfg rename to SourceGen/SGTestData/Expected/10002-allops-value-65816_cc65.cfg index 572afd6..ec0095d 100644 --- a/SourceGen/SGTestData/Expected/1001-allops-zero-65816_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10002-allops-value-65816_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 1001-allops-zero-65816 +# 6502bench SourceGen generated linker script for 10002-allops-value-65816 MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=588; diff --git a/SourceGen/SGTestData/Expected/2001-allops-zero-6502_64tass.S b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/2001-allops-zero-6502_64tass.S rename to SourceGen/SGTestData/Expected/10010-allops-zero-6502_64tass.S diff --git a/SourceGen/SGTestData/Expected/2001-allops-zero-6502_Merlin32.S b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/2001-allops-zero-6502_Merlin32.S rename to SourceGen/SGTestData/Expected/10010-allops-zero-6502_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/2001-allops-zero-6502_acme.S b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/2001-allops-zero-6502_acme.S rename to SourceGen/SGTestData/Expected/10010-allops-zero-6502_acme.S diff --git a/SourceGen/SGTestData/Expected/2001-allops-zero-6502_cc65.S b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/2001-allops-zero-6502_cc65.S rename to SourceGen/SGTestData/Expected/10010-allops-zero-6502_cc65.S diff --git a/SourceGen/SGTestData/Expected/2000-allops-value-6502_cc65.cfg b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_cc65.cfg similarity index 73% rename from SourceGen/SGTestData/Expected/2000-allops-value-6502_cc65.cfg rename to SourceGen/SGTestData/Expected/10010-allops-zero-6502_cc65.cfg index 9bd056b..00f32ff 100644 --- a/SourceGen/SGTestData/Expected/2000-allops-value-6502_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10010-allops-zero-6502_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 2000-allops-value-6502 +# 6502bench SourceGen generated linker script for 10010-allops-zero-6502 MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=598; diff --git a/SourceGen/SGTestData/Expected/2003-allops-zero-65C02_64tass.S b/SourceGen/SGTestData/Expected/10011-allops-zero-65C02_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/2003-allops-zero-65C02_64tass.S rename to SourceGen/SGTestData/Expected/10011-allops-zero-65C02_64tass.S diff --git a/SourceGen/SGTestData/Expected/2003-allops-zero-65C02_Merlin32.S b/SourceGen/SGTestData/Expected/10011-allops-zero-65C02_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/2003-allops-zero-65C02_Merlin32.S rename to SourceGen/SGTestData/Expected/10011-allops-zero-65C02_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/2003-allops-zero-65C02_acme.S b/SourceGen/SGTestData/Expected/10011-allops-zero-65C02_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/2003-allops-zero-65C02_acme.S rename to SourceGen/SGTestData/Expected/10011-allops-zero-65C02_acme.S diff --git a/SourceGen/SGTestData/Expected/2003-allops-zero-65C02_cc65.S b/SourceGen/SGTestData/Expected/10011-allops-zero-65C02_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/2003-allops-zero-65C02_cc65.S rename to SourceGen/SGTestData/Expected/10011-allops-zero-65C02_cc65.S diff --git a/SourceGen/SGTestData/Expected/2002-allops-value-65C02_cc65.cfg b/SourceGen/SGTestData/Expected/10011-allops-zero-65C02_cc65.cfg similarity index 72% rename from SourceGen/SGTestData/Expected/2002-allops-value-65C02_cc65.cfg rename to SourceGen/SGTestData/Expected/10011-allops-zero-65C02_cc65.cfg index 6cd85e1..99fa289 100644 --- a/SourceGen/SGTestData/Expected/2002-allops-value-65C02_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10011-allops-zero-65C02_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 2002-allops-value-65C02 +# 6502bench SourceGen generated linker script for 10011-allops-zero-65C02 MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=489; diff --git a/SourceGen/SGTestData/Expected/1001-allops-zero-65816_64tass.S b/SourceGen/SGTestData/Expected/10012-allops-zero-65816_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/1001-allops-zero-65816_64tass.S rename to SourceGen/SGTestData/Expected/10012-allops-zero-65816_64tass.S diff --git a/SourceGen/SGTestData/Expected/1001-allops-zero-65816_Merlin32.S b/SourceGen/SGTestData/Expected/10012-allops-zero-65816_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/1001-allops-zero-65816_Merlin32.S rename to SourceGen/SGTestData/Expected/10012-allops-zero-65816_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/1001-allops-zero-65816_acme.S b/SourceGen/SGTestData/Expected/10012-allops-zero-65816_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/1001-allops-zero-65816_acme.S rename to SourceGen/SGTestData/Expected/10012-allops-zero-65816_acme.S diff --git a/SourceGen/SGTestData/Expected/1001-allops-zero-65816_cc65.S b/SourceGen/SGTestData/Expected/10012-allops-zero-65816_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/1001-allops-zero-65816_cc65.S rename to SourceGen/SGTestData/Expected/10012-allops-zero-65816_cc65.S diff --git a/SourceGen/SGTestData/Expected/1000-allops-value-65816_cc65.cfg b/SourceGen/SGTestData/Expected/10012-allops-zero-65816_cc65.cfg similarity index 72% rename from SourceGen/SGTestData/Expected/1000-allops-value-65816_cc65.cfg rename to SourceGen/SGTestData/Expected/10012-allops-zero-65816_cc65.cfg index 418b453..7f7009f 100644 --- a/SourceGen/SGTestData/Expected/1000-allops-value-65816_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10012-allops-zero-65816_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 1000-allops-value-65816 +# 6502bench SourceGen generated linker script for 10012-allops-zero-65816 MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=588; diff --git a/SourceGen/SGTestData/Expected/1002-embedded-instructions_64tass.S b/SourceGen/SGTestData/Expected/10022-embedded-instructions_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/1002-embedded-instructions_64tass.S rename to SourceGen/SGTestData/Expected/10022-embedded-instructions_64tass.S diff --git a/SourceGen/SGTestData/Expected/1002-embedded-instructions_Merlin32.S b/SourceGen/SGTestData/Expected/10022-embedded-instructions_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/1002-embedded-instructions_Merlin32.S rename to SourceGen/SGTestData/Expected/10022-embedded-instructions_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/1002-embedded-instructions_acme.S b/SourceGen/SGTestData/Expected/10022-embedded-instructions_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/1002-embedded-instructions_acme.S rename to SourceGen/SGTestData/Expected/10022-embedded-instructions_acme.S diff --git a/SourceGen/SGTestData/Expected/1002-embedded-instructions_cc65.S b/SourceGen/SGTestData/Expected/10022-embedded-instructions_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/1002-embedded-instructions_cc65.S rename to SourceGen/SGTestData/Expected/10022-embedded-instructions_cc65.S diff --git a/SourceGen/SGTestData/Expected/1002-embedded-instructions_cc65.cfg b/SourceGen/SGTestData/Expected/10022-embedded-instructions_cc65.cfg similarity index 71% rename from SourceGen/SGTestData/Expected/1002-embedded-instructions_cc65.cfg rename to SourceGen/SGTestData/Expected/10022-embedded-instructions_cc65.cfg index 66c9e0b..0c180db 100644 --- a/SourceGen/SGTestData/Expected/1002-embedded-instructions_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10022-embedded-instructions_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 1002-embedded-instructions +# 6502bench SourceGen generated linker script for 10022-embedded-instructions MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=101; diff --git a/SourceGen/SGTestData/Expected/1003-flags-and-branches_64tass.S b/SourceGen/SGTestData/Expected/10032-flags-and-branches_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/1003-flags-and-branches_64tass.S rename to SourceGen/SGTestData/Expected/10032-flags-and-branches_64tass.S diff --git a/SourceGen/SGTestData/Expected/1003-flags-and-branches_Merlin32.S b/SourceGen/SGTestData/Expected/10032-flags-and-branches_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/1003-flags-and-branches_Merlin32.S rename to SourceGen/SGTestData/Expected/10032-flags-and-branches_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/1003-flags-and-branches_acme.S b/SourceGen/SGTestData/Expected/10032-flags-and-branches_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/1003-flags-and-branches_acme.S rename to SourceGen/SGTestData/Expected/10032-flags-and-branches_acme.S diff --git a/SourceGen/SGTestData/Expected/1003-flags-and-branches_cc65.S b/SourceGen/SGTestData/Expected/10032-flags-and-branches_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/1003-flags-and-branches_cc65.S rename to SourceGen/SGTestData/Expected/10032-flags-and-branches_cc65.S diff --git a/SourceGen/SGTestData/Expected/1003-flags-and-branches_cc65.cfg b/SourceGen/SGTestData/Expected/10032-flags-and-branches_cc65.cfg similarity index 72% rename from SourceGen/SGTestData/Expected/1003-flags-and-branches_cc65.cfg rename to SourceGen/SGTestData/Expected/10032-flags-and-branches_cc65.cfg index 8375593..8fc8fe5 100644 --- a/SourceGen/SGTestData/Expected/1003-flags-and-branches_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10032-flags-and-branches_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 1003-flags-and-branches +# 6502bench SourceGen generated linker script for 10032-flags-and-branches MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=336; diff --git a/SourceGen/SGTestData/Expected/1004-data-recognition_64tass.S b/SourceGen/SGTestData/Expected/10042-data-recognition_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/1004-data-recognition_64tass.S rename to SourceGen/SGTestData/Expected/10042-data-recognition_64tass.S diff --git a/SourceGen/SGTestData/Expected/1004-data-recognition_Merlin32.S b/SourceGen/SGTestData/Expected/10042-data-recognition_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/1004-data-recognition_Merlin32.S rename to SourceGen/SGTestData/Expected/10042-data-recognition_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/1004-data-recognition_acme.S b/SourceGen/SGTestData/Expected/10042-data-recognition_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/1004-data-recognition_acme.S rename to SourceGen/SGTestData/Expected/10042-data-recognition_acme.S diff --git a/SourceGen/SGTestData/Expected/1004-data-recognition_cc65.S b/SourceGen/SGTestData/Expected/10042-data-recognition_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/1004-data-recognition_cc65.S rename to SourceGen/SGTestData/Expected/10042-data-recognition_cc65.S diff --git a/SourceGen/SGTestData/Expected/1004-data-recognition_cc65.cfg b/SourceGen/SGTestData/Expected/10042-data-recognition_cc65.cfg similarity index 73% rename from SourceGen/SGTestData/Expected/1004-data-recognition_cc65.cfg rename to SourceGen/SGTestData/Expected/10042-data-recognition_cc65.cfg index ec05fd7..bbe32f4 100644 --- a/SourceGen/SGTestData/Expected/1004-data-recognition_cc65.cfg +++ b/SourceGen/SGTestData/Expected/10042-data-recognition_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 1004-data-recognition +# 6502bench SourceGen generated linker script for 10042-data-recognition MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=196; diff --git a/SourceGen/SGTestData/Expected/2004-numeric-types_64tass.S b/SourceGen/SGTestData/Expected/20000-numeric-types_64tass.S similarity index 100% rename from SourceGen/SGTestData/Expected/2004-numeric-types_64tass.S rename to SourceGen/SGTestData/Expected/20000-numeric-types_64tass.S diff --git a/SourceGen/SGTestData/Expected/2004-numeric-types_Merlin32.S b/SourceGen/SGTestData/Expected/20000-numeric-types_Merlin32.S similarity index 100% rename from SourceGen/SGTestData/Expected/2004-numeric-types_Merlin32.S rename to SourceGen/SGTestData/Expected/20000-numeric-types_Merlin32.S diff --git a/SourceGen/SGTestData/Expected/2004-numeric-types_acme.S b/SourceGen/SGTestData/Expected/20000-numeric-types_acme.S similarity index 100% rename from SourceGen/SGTestData/Expected/2004-numeric-types_acme.S rename to SourceGen/SGTestData/Expected/20000-numeric-types_acme.S diff --git a/SourceGen/SGTestData/Expected/2004-numeric-types_cc65.S b/SourceGen/SGTestData/Expected/20000-numeric-types_cc65.S similarity index 100% rename from SourceGen/SGTestData/Expected/2004-numeric-types_cc65.S rename to SourceGen/SGTestData/Expected/20000-numeric-types_cc65.S diff --git a/SourceGen/SGTestData/Expected/2004-numeric-types_cc65.cfg b/SourceGen/SGTestData/Expected/20000-numeric-types_cc65.cfg similarity index 83% rename from SourceGen/SGTestData/Expected/2004-numeric-types_cc65.cfg rename to SourceGen/SGTestData/Expected/20000-numeric-types_cc65.cfg index 809e829..5aa65fb 100644 --- a/SourceGen/SGTestData/Expected/2004-numeric-types_cc65.cfg +++ b/SourceGen/SGTestData/Expected/20000-numeric-types_cc65.cfg @@ -1,4 +1,4 @@ -# 6502bench SourceGen generated linker script for 2004-numeric-types +# 6502bench SourceGen generated linker script for 20000-numeric-types MEMORY { MAIN: file=%O, start=%S, size=65536; # MEM000: file=%O, start=$1000, size=1032; diff --git a/SourceGen/SGTestData/README.md b/SourceGen/SGTestData/README.md index d81caaa..dd1151d 100644 --- a/SourceGen/SGTestData/README.md +++ b/SourceGen/SGTestData/README.md @@ -14,18 +14,19 @@ set was generated for: ## Generator/Assembler Tests ## -Files with names like "1000-nifty-test" are regression test data files +Files with names like "10000-nifty-test" are regression test data files for the code generator. The test harness identifies them by filename -pattern: four digits, a hyphen, then one or more alphanumeric and +pattern: five digits, a hyphen, then one or more alphanumeric and hyphens. Files with a '.' or '_' are ignored. -If the leading number is between 1000 and 1999, inclusive, the test file -will be loaded as a new project. A 65816 CPU and load address of $1000 -are assumed. As with all new projects, the first byte will be hinted as -a code entry point. The entry flags are currently set to emulation mode, -but tests should not rely on that. +If the leading number is between 10000 and 19999, inclusive, the test file +will be loaded as a new project. A load address of $1000 is assumed. +The CPU type is determined by the last digit: 0 for 6502, 1 for 65C02, +and 2 for 65816. Undocumented opcodes are enabled. As with all new +projects, the first byte will be hinted as a code entry point. The entry +flags are currently set to emulation mode, but tests should not rely on that. -If the leading number is 2000 or greater, the test file will be loaded as +If the leading number is 20000 or greater, the test file will be loaded as a saved project. A file with the same name plus a ".dis65" extension will be opened as the project file. @@ -50,8 +51,8 @@ the drop list to select which test is shown. The generated sources and assembled output is placed into a temporary directory inside SGTestData that is named after the test. For example, -test 2000-allops-value-6502 will have all of its generated output in a -directory called "tmp2000". If all parts of the test are successful, the +test 10000-allops-value-6502 will have all of its generated output in a +directory called "tmp10000". If all parts of the test are successful, the directory will be removed. If generation or assembly fails, or if you check the "retain output" box in the test harness, the directory and its contents will remain. This allows you to examine the outputs when investigating @@ -66,11 +67,11 @@ If you want to add or update a test, follow these steps: 1. Make the changes to the test data file and test project file. 2. Run the test harness. The generation test will fail and leave output in - the tmpNNNN directory. Make sure the assembly test is succeeding. + the tmpNNNNN directory. Make sure the assembly test is succeeding. 3. After verifying that the generated sources look correct, copy them into the Expected directory, replacing any existing copies. 4. Run the test harness. This should now report success, and will - remove the tmpNNNN directory. + remove the tmpNNNNN directory. Be sure to have the version of the cross-assembler identified at the top of this document configured. diff --git a/SourceGen/SGTestData/Source/2000-allops-value-6502.S b/SourceGen/SGTestData/Source/10001-allops-value-6502.S similarity index 100% rename from SourceGen/SGTestData/Source/2000-allops-value-6502.S rename to SourceGen/SGTestData/Source/10001-allops-value-6502.S diff --git a/SourceGen/SGTestData/Source/2002-allops-value-65C02.S b/SourceGen/SGTestData/Source/10001-allops-value-65C02.S similarity index 100% rename from SourceGen/SGTestData/Source/2002-allops-value-65C02.S rename to SourceGen/SGTestData/Source/10001-allops-value-65C02.S diff --git a/SourceGen/SGTestData/Source/1000-allops-value-65816.S b/SourceGen/SGTestData/Source/10002-allops-value-65816.S similarity index 100% rename from SourceGen/SGTestData/Source/1000-allops-value-65816.S rename to SourceGen/SGTestData/Source/10002-allops-value-65816.S diff --git a/SourceGen/SGTestData/Source/2001-allops-zero-6502.S b/SourceGen/SGTestData/Source/10010-allops-zero-6502.S similarity index 100% rename from SourceGen/SGTestData/Source/2001-allops-zero-6502.S rename to SourceGen/SGTestData/Source/10010-allops-zero-6502.S diff --git a/SourceGen/SGTestData/Source/2003-allops-zero-65C02.S b/SourceGen/SGTestData/Source/10011-allops-zero-65C02.S similarity index 100% rename from SourceGen/SGTestData/Source/2003-allops-zero-65C02.S rename to SourceGen/SGTestData/Source/10011-allops-zero-65C02.S diff --git a/SourceGen/SGTestData/Source/1001-allops-zero-65816.S b/SourceGen/SGTestData/Source/10012-allops-zero-65816.S similarity index 100% rename from SourceGen/SGTestData/Source/1001-allops-zero-65816.S rename to SourceGen/SGTestData/Source/10012-allops-zero-65816.S diff --git a/SourceGen/SGTestData/Source/1002-embedded-instructions.S b/SourceGen/SGTestData/Source/10022-embedded-instructions.S similarity index 100% rename from SourceGen/SGTestData/Source/1002-embedded-instructions.S rename to SourceGen/SGTestData/Source/10022-embedded-instructions.S diff --git a/SourceGen/SGTestData/Source/1003-flags-and-branches.S b/SourceGen/SGTestData/Source/10032-flags-and-branches.S similarity index 100% rename from SourceGen/SGTestData/Source/1003-flags-and-branches.S rename to SourceGen/SGTestData/Source/10032-flags-and-branches.S diff --git a/SourceGen/SGTestData/Source/1004-data-recognition.S b/SourceGen/SGTestData/Source/10042-data-recognition.S similarity index 100% rename from SourceGen/SGTestData/Source/1004-data-recognition.S rename to SourceGen/SGTestData/Source/10042-data-recognition.S diff --git a/SourceGen/SGTestData/Source/2004-numeric-types.S b/SourceGen/SGTestData/Source/20000-numeric-types.S similarity index 100% rename from SourceGen/SGTestData/Source/2004-numeric-types.S rename to SourceGen/SGTestData/Source/20000-numeric-types.S diff --git a/SourceGen/Tests/GenTest.cs b/SourceGen/Tests/GenTest.cs index 0d696ef..9dc1378 100644 --- a/SourceGen/Tests/GenTest.cs +++ b/SourceGen/Tests/GenTest.cs @@ -20,7 +20,7 @@ using System.Diagnostics; using System.IO; using System.Text.RegularExpressions; using System.Windows.Media; - +using Asm65; using CommonUtil; using SourceGen.AsmGen; @@ -40,7 +40,7 @@ namespace SourceGen.Tests { private const string EXPECTED_DIR_NAME = "Expected"; //private static char[] sInvalidChars = new char[] { '.', '_' }; - private const string TestCasePattern = @"^\d\d\d\d-[A-Za-z0-9-]+$"; + private const string TestCasePattern = @"^\d\d\d\d\d-[A-Za-z0-9-]+$"; private static Regex sTestCaseRegex = new Regex(TestCasePattern); /// @@ -185,7 +185,21 @@ namespace SourceGen.Tests { private int GetTestNum(string pathName) { // Should always succeed if pathName matched on our regex. string fileName = Path.GetFileName(pathName); - return int.Parse(fileName.Substring(0, 4)); + return int.Parse(fileName.Substring(0, 5)); + } + + /// + /// Determines the desired CPU from the test case number. + /// + /// + /// + private CpuDef.CpuType GetCpuTypeFromNum(int testNum) { + switch (testNum % 10) { + case 0: return CpuDef.CpuType.Cpu6502; + case 1: return CpuDef.CpuType.Cpu65C02; + case 2: return CpuDef.CpuType.Cpu65816; + default: return CpuDef.CpuType.CpuUnknown; + } } /// @@ -434,8 +448,9 @@ namespace SourceGen.Tests { projectLoadReport = null; int testNum = GetTestNum(dataPathName); + CpuDef.CpuType cpuType = GetCpuTypeFromNum(testNum); - if (testNum < 2000) { + if (testNum < 20000) { // create new disasm project for data file byte[] fileData; try { @@ -446,6 +461,10 @@ namespace SourceGen.Tests { } project.Initialize(fileData.Length); + project.ProjectProps.CpuType = cpuType; + project.ProjectProps.IncludeUndocumentedInstr = true; + project.ProjectProps.TwoByteBrk = false; + project.UpdateCpuDef(); project.PrepForNew(fileData, Path.GetFileName(dataPathName)); // no platform symbols to load } else { @@ -471,6 +490,13 @@ namespace SourceGen.Tests { string extMsgs = project.LoadExternalFiles(); if (!string.IsNullOrEmpty(extMsgs)) { ReportErrMsg(extMsgs); + // keep going + } + + if (project.ProjectProps.CpuType != cpuType) { + ReportErrMsg("Mismatch CPU type for test " + testNum + ": project wants " + + project.ProjectProps.CpuType); + // keep going } } @@ -543,7 +569,7 @@ namespace SourceGen.Tests { /// private void ScrubWorkDirectory(string workDir, int testNum) { string checkString = testNum.ToString(); - if (checkString.Length != 4) { + if (checkString.Length != 5) { Debug.Assert(false); return; }