Skip to content

Commit b6c1af6

Browse files
committed
fix permission bits
1 parent 92cb11a commit b6c1af6

File tree

11 files changed

+7
-7
lines changed

11 files changed

+7
-7
lines changed

.devcontainer/devcontainer.json

100755100644
File mode changed.

.gitignore

100755100644
File mode changed.

Makefile

100755100644
File mode changed.

example/main.c

100755100644
File mode changed.

src/cpu.c

100755100644
+7-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static void set_n(struct cpu *cpu, uint8_t data) {
2929

3030
static void set_v(struct cpu *cpu, uint8_t in1, uint8_t in2, uint8_t out) {
3131
/*
32-
int u_over = (in1 & 0x80) && (in2 & 0x80) && !(out & 0x80);
32+
int u_over = (in1 & 0x80) && (in2 & 0x80) && !(out & 0x80);
3333
int s_over = !(in1 & 0x80) && !(in2 & 0x80) && (out & 0x80);
3434
3535
cpu->p &= ~P_V;
@@ -706,14 +706,14 @@ static int zpx(struct cpu *cpu, const struct bus *bus) {
706706
instructions[cpu->opc].act(cpu);
707707
bus_poke(bus, cpu->ea, cpu->opr1);
708708
return 1;
709-
}
709+
}
710710

711711
cpu->opr1 = bus_peek(bus, cpu->ea);
712712

713713
if (instructions[cpu->opc].act_type == ACTION_RD) {
714714
instructions[cpu->opc].act(cpu);
715715
return 1;
716-
}
716+
}
717717

718718
return 0;
719719
case 4:
@@ -743,14 +743,14 @@ static int zpy(struct cpu *cpu, const struct bus *bus) {
743743
instructions[cpu->opc].act(cpu);
744744
bus_poke(bus, cpu->ea, cpu->opr1);
745745
return 1;
746-
}
746+
}
747747

748748
cpu->opr1 = bus_peek(bus, cpu->ea);
749749

750750
if (instructions[cpu->opc].act_type == ACTION_RD) {
751751
instructions[cpu->opc].act(cpu);
752752
return 1;
753-
}
753+
}
754754

755755
return 0;
756756
case 4:
@@ -829,7 +829,7 @@ static int abx(struct cpu *cpu, const struct bus *bus) {
829829
instructions[cpu->opc].act(cpu);
830830
bus_poke(bus, cpu->ea, cpu->opr1);
831831
return 1;
832-
}
832+
}
833833

834834
cpu->opr1 = bus_peek(bus, cpu->ea);
835835

@@ -1033,7 +1033,7 @@ void cpu_tick(struct cpu *cpu, const struct bus *bus) {
10331033
cpu->opc = bus_peek(bus, cpu->pc++);
10341034
cpu->cycle++;
10351035
return;
1036-
}
1036+
}
10371037

10381038
struct instruction inst = instructions[cpu->opc];
10391039

src/cpu.h

100755100644
File mode changed.

test/6502_functional_test.c

100755100644
File mode changed.

test/6502_functional_test/6502_functional_test.bin

100755100644
File mode changed.

test/6502_functional_test/6502_functional_test.lst

100755100644
File mode changed.

test/6502_functional_test/origin.txt

100755100644
File mode changed.

test/bus_test.c

100755100644
File mode changed.

0 commit comments

Comments
 (0)