Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

gofmt

  • Loading branch information...
commit 887886118903daac60fd4f72be9a17fc5da64c21 1 parent 5fd1dfe
@scottferg authored
Showing with 14 additions and 14 deletions.
  1. +14 −14 6502.go
View
28 6502.go
@@ -421,18 +421,18 @@ func (c *Cpu) Iny() {
}
func (c *Cpu) SetBranchCycleCount(a uint16) {
- if ((ProgramCounter - 1) & 0xFF00) != (a & 0xFF00) {
- c.CycleCount += 2
- } else {
- c.CycleCount += 1
- }
+ if ((ProgramCounter - 1) & 0xFF00) != (a & 0xFF00) {
+ c.CycleCount += 2
+ } else {
+ c.CycleCount += 1
+ }
}
func (c *Cpu) Bpl() {
if !c.getNegative() {
a := c.relativeAddress()
-
- c.SetBranchCycleCount(a)
+
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
@@ -444,7 +444,7 @@ func (c *Cpu) Bmi() {
if c.getNegative() {
a := c.relativeAddress()
- c.SetBranchCycleCount(a)
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
@@ -456,7 +456,7 @@ func (c *Cpu) Bvc() {
if !c.getOverflow() {
a := c.relativeAddress()
- c.SetBranchCycleCount(a)
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
@@ -468,7 +468,7 @@ func (c *Cpu) Bvs() {
if c.getOverflow() {
a := c.relativeAddress()
- c.SetBranchCycleCount(a)
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
@@ -480,7 +480,7 @@ func (c *Cpu) Bcc() {
if !c.getCarry() {
a := c.relativeAddress()
- c.SetBranchCycleCount(a)
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
@@ -492,7 +492,7 @@ func (c *Cpu) Bcs() {
if c.getCarry() {
a := c.relativeAddress()
- c.SetBranchCycleCount(a)
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
@@ -504,7 +504,7 @@ func (c *Cpu) Bne() {
if !c.getZero() {
a := c.relativeAddress()
- c.SetBranchCycleCount(a)
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
@@ -516,7 +516,7 @@ func (c *Cpu) Beq() {
if c.getZero() {
a := c.relativeAddress()
- c.SetBranchCycleCount(a)
+ c.SetBranchCycleCount(a)
ProgramCounter = a
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.