go fmt
This commit is contained in:
parent
edac661d26
commit
1f526b5331
@ -1,8 +1,8 @@
|
|||||||
package chip8
|
package chip8
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math/rand"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math/rand"
|
||||||
)
|
)
|
||||||
|
|
||||||
const graphicsBufferSize = 64 * 32
|
const graphicsBufferSize = 64 * 32
|
||||||
@ -349,7 +349,7 @@ func (cpu *Chip8) UpdateKeys(newKeys [16]byte) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cpu *Chip8) PerformCycle() {
|
func (cpu *Chip8) PerformCycle() {
|
||||||
cpu.opcode = (uint16(cpu.memory[cpu.pc]) << 8) + uint16(cpu.memory[cpu.pc + 1])
|
cpu.opcode = (uint16(cpu.memory[cpu.pc]) << 8) + uint16(cpu.memory[cpu.pc+1])
|
||||||
cpu.pc += 2
|
cpu.pc += 2
|
||||||
switch cpu.opcode >> 12 {
|
switch cpu.opcode >> 12 {
|
||||||
case 0:
|
case 0:
|
||||||
@ -386,4 +386,3 @@ func (cpu *Chip8) PerformCycle() {
|
|||||||
cpu.fifteenIndexOpcodes()
|
cpu.fifteenIndexOpcodes()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"git.jacknet.io/S.D/Chip-8_Go/chip8"
|
"git.jacknet.io/S.D/Chip-8_Go/chip8"
|
||||||
"fmt"
|
)
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
prog := make([]byte, 6)
|
prog := make([]byte, 6)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user