1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-28 11:51:09 +00:00

Updated KickAsm with newest version of 45GS02 CPU. Now all opcodes match between KickC and KickAsm.

This commit is contained in:
jespergravgaard 2020-07-31 01:47:49 +02:00
parent 462c05552d
commit 0f7061bcf0
23 changed files with 153 additions and 98 deletions

View File

@ -1,13 +1,13 @@
<component name="libraryTable">
<library name="Maven: cml.kickass:kickassembler:5.16-65ce02.e">
<library name="Maven: cml.kickass:kickassembler:5.16-65ce02.g">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/cml/kickass/kickassembler/5.16-65ce02.e/kickassembler-5.16-65ce02.e.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/cml/kickass/kickassembler/5.16-65ce02.g/kickassembler-5.16-65ce02.g.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/cml/kickass/kickassembler/5.16-65ce02.e/kickassembler-5.16-65ce02.e-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/cml/kickass/kickassembler/5.16-65ce02.g/kickassembler-5.16-65ce02.g-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/cml/kickass/kickassembler/5.16-65ce02.e/kickassembler-5.16-65ce02.e-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/cml/kickass/kickassembler/5.16-65ce02.g/kickassembler-5.16-65ce02.g-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@ -18,7 +18,7 @@
<orderEntry type="library" name="Maven: org.antlr:antlr4-runtime:4.8-1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: cml.kickass:kickassembler:5.16-65ce02.e" level="project" />
<orderEntry type="library" name="Maven: cml.kickass:kickassembler:5.16-65ce02.g" level="project" />
<orderEntry type="library" name="Maven: info.picocli:picocli:4.2.0" level="project" />
<orderEntry type="library" name="Maven: javax.json:javax.json-api:1.1.4" level="project" />
<orderEntry type="library" name="Maven: org.glassfish:javax.json:1.1.4" level="project" />

View File

@ -44,7 +44,7 @@
<dependency>
<groupId>cml.kickass</groupId>
<artifactId>kickassembler</artifactId>
<version>5.16-65ce02.e</version>
<version>5.16-65ce02.g</version>
</dependency>
<dependency>
<groupId>info.picocli</groupId>

View File

@ -0,0 +1,4 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Fri Jul 31 01:27:42 CEST 2020
kickassembler-5.16-65ce02.f.pom>=
kickassembler-5.16-65ce02.f.jar>=

View File

@ -0,0 +1 @@
8f2fc839572e172aa68bd32ba103ebb4

View File

@ -0,0 +1 @@
08d00ab1a17b81e03b5a22acaa9e6f53713d37a1

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>cml.kickass</groupId>
<artifactId>kickassembler</artifactId>
<version>5.16-65ce02.f</version>
<description>POM was created from install:install-file</description>
</project>

View File

@ -0,0 +1 @@
6e6beee8b96c6681c832ed6ffca57967

View File

@ -0,0 +1 @@
38826370ac61ebc769df62c5d46cbaab7e10de34

View File

@ -0,0 +1,4 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Fri Jul 31 01:33:28 CEST 2020
kickassembler-5.16-65ce02.g.pom>=
kickassembler-5.16-65ce02.g.jar>=

View File

@ -0,0 +1 @@
16f65570e465946f20c6d02cd896df88

View File

@ -0,0 +1 @@
0c1ef7349dbf78c824a7782615fa110b175d23cc

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>cml.kickass</groupId>
<artifactId>kickassembler</artifactId>
<version>5.16-65ce02.g</version>
<description>POM was created from install:install-file</description>
</project>

View File

@ -0,0 +1 @@
caa1da8b13085baaa9a481e2bd66607e

View File

@ -0,0 +1 @@
9819994e0ee59543d951bdb0d82e1646d2588517

View File

@ -3,7 +3,7 @@
<groupId>cml.kickass</groupId>
<artifactId>kickassembler</artifactId>
<versioning>
<release>5.16-65ce02.e</release>
<release>5.16-65ce02.g</release>
<versions>
<version>4.19</version>
<version>5.7</version>
@ -18,7 +18,9 @@
<version>5.16-65ce02.c</version>
<version>5.16-65ce02.d</version>
<version>5.16-65ce02.e</version>
<version>5.16-65ce02.f</version>
<version>5.16-65ce02.g</version>
</versions>
<lastUpdated>20200730225045</lastUpdated>
<lastUpdated>20200730233328</lastUpdated>
</versioning>
</metadata>

View File

@ -1 +1 @@
50b97bdbdec01718f617ba829a5b7a34
eb9a688c8421032f2c423c5d756e86c1

View File

@ -1 +1 @@
02f4562d6d64f6c5f0d97d8f443bbafc765445da
9d03b6c6a791a7df649c2a2aa51e03d9f973f1dd

View File

@ -17,88 +17,90 @@ public class Cpu45GS02 extends Cpu65xx {
public Cpu45GS02() {
super(NAME, Cpu65CE02.INSTANCE);
addOpcode(new int[]{0x42, 0x42, 0x5}, "orq", CpuAddressingMode.ZP, 8, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x6}, "aslq", CpuAddressingMode.ZP, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0xA}, "aslq", CpuAddressingMode.NON, 3, "AXYZcnz");
addOpcode(new int[]{0x42, 0x42, 0xD}, "orq", CpuAddressingMode.ABS, 9, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xE}, "aslq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x12}, "orq", CpuAddressingMode.INZ, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x16}, "aslq", CpuAddressingMode.ZPX, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x1A}, "inq", CpuAddressingMode.NON, 3, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x1E}, "aslq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x24}, "bitq", CpuAddressingMode.ZP, 8, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x25}, "andq", CpuAddressingMode.ZP, 8, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x26}, "rolq", CpuAddressingMode.ZP, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x2A}, "rolq", CpuAddressingMode.NON, 3, "AXYZcnz");
addOpcode(new int[]{0x42, 0x42, 0x2C}, "bitq", CpuAddressingMode.ABS, 8, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x2D}, "andq", CpuAddressingMode.ABS, 9, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x2E}, "rolq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x32}, "andq", CpuAddressingMode.INZ, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x36}, "rolq", CpuAddressingMode.ZPX, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x3A}, "deq", CpuAddressingMode.NON, 3, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x3E}, "rolq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x43}, "asrq", CpuAddressingMode.NON, 3, "AXYZcnz");
addOpcode(new int[]{0x42, 0x42, 0x44}, "asrq", CpuAddressingMode.ZP, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x45}, "eorq", CpuAddressingMode.ZP, 8, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x46}, "lsrq", CpuAddressingMode.ZP, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x4A}, "lsrq", CpuAddressingMode.NON, 3, "AXYZcnz");
addOpcode(new int[]{0x42, 0x42, 0x4D}, "eorq", CpuAddressingMode.ABS, 9, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x4E}, "lsrq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x52}, "eorq", CpuAddressingMode.INZ, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0x54}, "asrq", CpuAddressingMode.ZPX, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x56}, "lsrq", CpuAddressingMode.ZPX, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x5E}, "lsrq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x65}, "adcq", CpuAddressingMode.ZP, 8, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0x66}, "rorq", CpuAddressingMode.ZP, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x6A}, "rorq", CpuAddressingMode.NON, 3, "AXYZcnz");
addOpcode(new int[]{0x42, 0x42, 0x6D}, "adcq", CpuAddressingMode.ABS, 9, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0x6E}, "rorq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x72}, "adcq", CpuAddressingMode.INZ, 10, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0x76}, "rorq", CpuAddressingMode.ZPX, 12, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x7E}, "rorq", CpuAddressingMode.ABS, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0x82}, "stq", CpuAddressingMode.ISY, 10, "");
addOpcode(new int[]{0x42, 0x42, 0x85}, "stq", CpuAddressingMode.ZP, 8, "");
addOpcode(new int[]{0x42, 0x42, 0x8D}, "stq", CpuAddressingMode.ABS, 9, "");
addOpcode(new int[]{0x42, 0x42, 0x92}, "stq", CpuAddressingMode.INZ, 10, "");
addOpcode(new int[]{0x42, 0x42, 0xA1}, "ldq", CpuAddressingMode.ISY, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xA5}, "ldq", CpuAddressingMode.ZP, 8, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xAD}, "ldq", CpuAddressingMode.ABS, 9, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xB1}, "ldq", CpuAddressingMode.INZ, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xB2}, "ldq", CpuAddressingMode.INZ, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xB5}, "ldq", CpuAddressingMode.ZPX, 9, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xB9}, "ldq", CpuAddressingMode.ABS, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xBD}, "ldq", CpuAddressingMode.ABS, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xC5}, "cpq", CpuAddressingMode.ZP, 8, "cnz");
addOpcode(new int[]{0x42, 0x42, 0xC6}, "deq", CpuAddressingMode.ZP, 12, "nz");
addOpcode(new int[]{0x42, 0x42, 0xCD}, "cpq", CpuAddressingMode.ABS, 9, "cnz");
addOpcode(new int[]{0x42, 0x42, 0xCE}, "deq", CpuAddressingMode.ABS, 13, "nz");
addOpcode(new int[]{0x42, 0x42, 0xD2}, "cpq", CpuAddressingMode.INZ, 10, "cnz");
addOpcode(new int[]{0x42, 0x42, 0xD6}, "deq", CpuAddressingMode.ZPX, 12, "nz");
addOpcode(new int[]{0x42, 0x42, 0xDE}, "deq", CpuAddressingMode.ABS, 13, "nz");
addOpcode(new int[]{0x42, 0x42, 0xE2}, "ldq", CpuAddressingMode.ISY, 10, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xE5}, "sbcq", CpuAddressingMode.ZP, 8, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0xE6}, "inq", CpuAddressingMode.ZP, 13, "nz");
addOpcode(new int[]{0x42, 0x42, 0xea, 0x12}, "orq", CpuAddressingMode.LIN, 13, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xea, 0x32}, "andq", CpuAddressingMode.LIN, 13, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xea, 0x52}, "eorq", CpuAddressingMode.LIN, 13, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xea, 0x72}, "adcq", CpuAddressingMode.LIN, 13, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0xea, 0x92}, "stq", CpuAddressingMode.LIN, 13, "");
addOpcode(new int[]{0x42, 0x42, 0xea, 0xB2}, "ldq", CpuAddressingMode.LIN, 13, "AXYZnz");
addOpcode(new int[]{0x42, 0x42, 0xea, 0xD2}, "cpq", CpuAddressingMode.LIN, 13, "cnz");
addOpcode(new int[]{0x42, 0x42, 0xea, 0xF2}, "sbcq", CpuAddressingMode.LIN, 13, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0xED}, "sbcq", CpuAddressingMode.ABS, 9, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0xEE}, "inq", CpuAddressingMode.ABS, 14, "nz");
addOpcode(new int[]{0x42, 0x42, 0xF2}, "sbcq", CpuAddressingMode.INZ, 10, "AXYZcvnz");
addOpcode(new int[]{0x42, 0x42, 0xF6}, "inq", CpuAddressingMode.ZPX, 13, "nz");
addOpcode(new int[]{0x42, 0x42, 0xFE}, "inq", CpuAddressingMode.ABS, 14, "nz");
addOpcode(new int[]{0xea, 0x12}, "ora", CpuAddressingMode.LIZ, 7, "Anz");
addOpcode(new int[]{0xea, 0x32}, "and", CpuAddressingMode.LIZ, 7, "Anz");
addOpcode(new int[]{0xea, 0x52}, "eor", CpuAddressingMode.LIZ, 7, "Anz");
addOpcode(new int[]{0xea, 0x72}, "adc", CpuAddressingMode.LIZ, 7, "Acvnz");
addOpcode(new int[]{0xea, 0x92}, "sta", CpuAddressingMode.LIZ, 8, "");
addOpcode(new int[]{0xea, 0xB2}, "lda", CpuAddressingMode.LIZ, 7, "Anz");
addOpcode(new int[]{0xea, 0xD2}, "cmp", CpuAddressingMode.LIZ, 7, "cnz");
addOpcode(new int[]{0xea, 0xF2}, "sbc", CpuAddressingMode.LIZ, 8, "Acvnz");
addOpcode( new int[] {0x42, 0x42, 0x5},"orq",CpuAddressingMode.ZP,8,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x6},"aslq",CpuAddressingMode.ZP,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0xA},"aslq",CpuAddressingMode.NON,3,"AXYZcnz");
addOpcode( new int[] {0x42, 0x42, 0xD},"orq",CpuAddressingMode.ABS,9,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xE},"aslq",CpuAddressingMode.ABS,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x12},"orq",CpuAddressingMode.INZ,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x16},"aslq",CpuAddressingMode.ZPX,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x1A},"inq",CpuAddressingMode.NON,3,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x1E},"aslq",CpuAddressingMode.ABX,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x24},"bitq",CpuAddressingMode.ZP,8,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x25},"andq",CpuAddressingMode.ZP,8,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x26},"rolq",CpuAddressingMode.ZP,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x2A},"rolq",CpuAddressingMode.NON,3,"AXYZcnz");
addOpcode( new int[] {0x42, 0x42, 0x2C},"bitq",CpuAddressingMode.ABS,8,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x2D},"andq",CpuAddressingMode.ABS,9,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x2E},"rolq",CpuAddressingMode.ABS,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x32},"andq",CpuAddressingMode.INZ,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x36},"rolq",CpuAddressingMode.ZPX,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x3A},"deq",CpuAddressingMode.NON,3,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x3E},"rolq",CpuAddressingMode.ABX,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x43},"asrq",CpuAddressingMode.NON,3,"AXYZcnz");
addOpcode( new int[] {0x42, 0x42, 0x44},"asrq",CpuAddressingMode.ZP,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x45},"eorq",CpuAddressingMode.ZP,8,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x46},"lsrq",CpuAddressingMode.ZP,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x4A},"lsrq",CpuAddressingMode.NON,3,"AXYZcnz");
addOpcode( new int[] {0x42, 0x42, 0x4D},"eorq",CpuAddressingMode.ABS,9,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x4E},"lsrq",CpuAddressingMode.ABS,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x52},"eorq",CpuAddressingMode.INZ,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0x54},"asrq",CpuAddressingMode.ZPX,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x56},"lsrq",CpuAddressingMode.ZPX,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x5E},"lsrq",CpuAddressingMode.ABX,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x65},"adcq",CpuAddressingMode.ZP,8,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0x66},"rorq",CpuAddressingMode.ZP,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x6A},"rorq",CpuAddressingMode.NON,3,"AXYZcnz");
addOpcode( new int[] {0x42, 0x42, 0x6D},"adcq",CpuAddressingMode.ABS,9,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0x6E},"rorq",CpuAddressingMode.ABS,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x72},"adcq",CpuAddressingMode.INZ,10,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0x76},"rorq",CpuAddressingMode.ZPX,12,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x7E},"rorq",CpuAddressingMode.ABX,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0x82},"stq",CpuAddressingMode.ISY,10,"");
addOpcode( new int[] {0x42, 0x42, 0x85},"stq",CpuAddressingMode.ZP,8,"");
addOpcode( new int[] {0x42, 0x42, 0x8D},"stq",CpuAddressingMode.ABS,9,"");
addOpcode( new int[] {0x42, 0x42, 0x92},"stq",CpuAddressingMode.INZ,10,"");
addOpcode( new int[] {0x42, 0x42, 0xA1},"ldq",CpuAddressingMode.IZX,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xA5},"ldq",CpuAddressingMode.ZP,8,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xAD},"ldq",CpuAddressingMode.ABS,9,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xB1},"ldq",CpuAddressingMode.IZY,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xB2},"ldq",CpuAddressingMode.INZ,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xB5},"ldq",CpuAddressingMode.ZPX,9,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xB9},"ldq",CpuAddressingMode.ABY,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xBD},"ldq",CpuAddressingMode.ABX,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xC5},"cpq",CpuAddressingMode.ZP,8,"cnz");
addOpcode( new int[] {0x42, 0x42, 0xC6},"deq",CpuAddressingMode.ZP,12,"nz");
addOpcode( new int[] {0x42, 0x42, 0xCD},"cpq",CpuAddressingMode.ABS,9,"cnz");
addOpcode( new int[] {0x42, 0x42, 0xCE},"deq",CpuAddressingMode.ABS,13,"nz");
addOpcode( new int[] {0x42, 0x42, 0xD2},"cpq",CpuAddressingMode.INZ,10,"cnz");
addOpcode( new int[] {0x42, 0x42, 0xD6},"deq",CpuAddressingMode.ZPX,12,"nz");
addOpcode( new int[] {0x42, 0x42, 0xDE},"deq",CpuAddressingMode.ABX,13,"nz");
addOpcode( new int[] {0x42, 0x42, 0xE2},"ldq",CpuAddressingMode.ISY,10,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xE5},"sbcq",CpuAddressingMode.ZP,8,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0xE6},"inq",CpuAddressingMode.ZP,13,"nz");
addOpcode( new int[] {0x42, 0x42, 0xea, 0x12},"orq",CpuAddressingMode.LIN,13,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xea, 0x32},"andq",CpuAddressingMode.LIN,13,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xea, 0x52},"eorq",CpuAddressingMode.LIN,13,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xea, 0x72},"adcq",CpuAddressingMode.LIN,13,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0xea, 0x92},"stq",CpuAddressingMode.LIN,13,"");
addOpcode( new int[] {0x42, 0x42, 0xea, 0xB2},"ldq",CpuAddressingMode.LIN,13,"AXYZnz");
addOpcode( new int[] {0x42, 0x42, 0xea, 0xD2},"cpq",CpuAddressingMode.LIN,13,"cnz");
addOpcode( new int[] {0x42, 0x42, 0xea, 0xF2},"sbcq",CpuAddressingMode.LIN,13,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0xED},"sbcq",CpuAddressingMode.ABS,9,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0xEE},"inq",CpuAddressingMode.ABS,14,"nz");
addOpcode( new int[] {0x42, 0x42, 0xF2},"sbcq",CpuAddressingMode.INZ,10,"AXYZcvnz");
addOpcode( new int[] {0x42, 0x42, 0xF6},"inq",CpuAddressingMode.ZPX,13,"nz");
addOpcode( new int[] {0x42, 0x42, 0xFE},"inq",CpuAddressingMode.ABX,14,"nz");
addOpcode( new int[] {0xea, 0x12},"ora",CpuAddressingMode.LIZ,7,"Anz");
addOpcode( new int[] {0xea, 0x32},"and",CpuAddressingMode.LIZ,7,"Anz");
addOpcode( new int[] {0xea, 0x52},"eor",CpuAddressingMode.LIZ,7,"Anz");
addOpcode( new int[] {0xea, 0x72},"adc",CpuAddressingMode.LIZ,7,"Acvnz");
addOpcode( new int[] {0xea, 0x92},"sta",CpuAddressingMode.LIZ,8,"");
addOpcode( new int[] {0xea, 0xB2},"lda",CpuAddressingMode.LIZ,7,"Anz");
addOpcode( new int[] {0xea, 0xD2},"cmp",CpuAddressingMode.LIZ,7,"cnz");
addOpcode( new int[] {0xea, 0xF2},"sbc",CpuAddressingMode.LIZ,8,"Acvnz");
// TODO: Disable NOP?
}

View File

@ -4,7 +4,7 @@
cp ./repo/cml/kickass/kickassembler/maven-metadata.xml ./repo/cml/kickass/kickassembler/maven-metadata-local.xml
# mvn install:install-file -Dmaven.repo.local=./repo/ -Dfile=/Applications/KickAssembler/KickAss.jar -DgroupId=cml.kickass -DartifactId=kickassembler -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true -Dversion=5.16
mvn install:install-file -Dmaven.repo.local=./repo/ -Dfile=/Users/jespergravgaard/c64/kickassembler65ce02/out/KickAss65CE02.jar -DgroupId=cml.kickass -DartifactId=kickassembler -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true -Dversion=5.16-65ce02.e
mvn install:install-file -Dmaven.repo.local=./repo/ -Dfile=/Users/jespergravgaard/c64/kickassembler65ce02/out/KickAss65CE02.jar -DgroupId=cml.kickass -DartifactId=kickassembler -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true -Dversion=5.16-65ce02.g
# Finalize by making the local metadata official
pushd ./repo/cml/kickass/kickassembler

View File

@ -1,9 +1,6 @@
package dk.camelot64.cpufamily6502;
import dk.camelot64.cpufamily6502.cpus.Cpu6502Illegal;
import dk.camelot64.cpufamily6502.cpus.Cpu6502Official;
import dk.camelot64.cpufamily6502.cpus.Cpu65C02;
import dk.camelot64.cpufamily6502.cpus.Cpu65CE02;
import dk.camelot64.cpufamily6502.cpus.*;
import kickass._65xx._65xxArgType;
import kickass._65xx.cpus.*;
import org.junit.Assert;
@ -36,6 +33,11 @@ public class TestCpuFamilyKickAssCompatibility {
assertOpcodesMatch(Cpu65CE02.INSTANCE, CPU_65CE02.instance);
}
@Test
public void testOpcodes45GS02() {
assertOpcodesMatch(Cpu45GS02.INSTANCE, CPU_45GS02.instance);
}
private void assertOpcodesMatch(Cpu65xx kcCpu, Cpu kaCpu) {
final Collection<CpuOpcode> kcAllOpcodes = kcCpu.getAllOpcodes();
final Map<String, int[]> kaAllMnemonics = kaCpu.mnemonics;
@ -55,7 +57,22 @@ public class TestCpuFamilyKickAssCompatibility {
final int kaOpcodeRaw = kaOpcodes[kaArgTypeIdx];
if(kaOpcodeRaw >= 0) {
found = true;
final int[] kaOpcode = new int[]{kaOpcodeRaw};
int[] kaOpcode;
if(kcOpcode.getOpcode().length==1) {
kaOpcode = new int[]{kaOpcodeRaw};
} else {
List<Integer> kaOpcodeList = new ArrayList<>();
if(CPU_45GS02.R32_MNEMONICS.contains(kcOpcode.getMnemonic())) {
kaOpcodeList.add((int)CPU_45GS02.R32_OPCODE_PREFIX);
kaOpcodeList.add((int)CPU_45GS02.R32_OPCODE_PREFIX);
}
if (kaArgType == _65xxArgType.indirect32ZeropageZ || kaArgType == _65xxArgType.indirect32Zeropage) {
// Make sure the prefix is unsigned
kaOpcodeList.add(CPU_45GS02.A32_OPCODE_PREFIX&0xff);
}
kaOpcodeList.add(kaOpcodeRaw);
kaOpcode = kaOpcodeList.stream().mapToInt(i->i).toArray();
}
Assert.assertArrayEquals("KickAss opcode not matching for mnemonic " + kcOpcode.toString(), kcOpcode.getOpcode(), kaOpcode);
}
}