Skip to content

Commit 8c94b30

Browse files
committed
v 1.4
Fixed carry issue
1 parent afc96de commit 8c94b30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CPU.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ public void IZY() {
539539
//INSTRUCTIONS
540540
public void ADC() {
541541
fetch();
542-
short temp = (short)((short)a + (short)fetched + (short)(getFlag('C') ? 1 : 0));
542+
short temp = (short)((short)Byte.toUnsignedInt(a) + (short)Byte.toUnsignedInt(fetched) + (short)(getFlag('C') ? 1 : 0));
543543
setFlag('C', temp > 255);
544544
setFlag('Z', (temp & 0x00FF) == 0);
545545
setFlag('N', (temp & 0x80) == 0x80);

src/EaterEmulator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
public class EaterEmulator extends JFrame implements ActionListener {
1111
public static EaterEmulator emu;
12-
public static String versionString = "1.3";
12+
public static String versionString = "1.4";
1313

1414
//Swing Things
1515
JPanel p = new JPanel();

0 commit comments

Comments
 (0)