-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2600.go
66 lines (52 loc) · 2.07 KB
/
2600.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package main
import (
"fmt"
"github.com/faiface/pixel/pixelgl"
"Atari2600/VGS"
)
// func checkArgs() {
// if len(os.Args) != 2 {
// fmt.Printf("Usage: %s ROM_FILE\n\n", os.Args[0])
// os.Exit(0)
// }
// }
// func testFile(filename string) {
// if _, err := os.Stat(filename); os.IsNotExist(err) {
// fmt.Printf("File '%s' not found.\n\n", os.Args[1])
// os.Exit(0)
// }
// }
func main() {
fmt.Printf("Atari 2600 Emulator\n")
// Validate the Arguments
//checkArgs()
// Check if file exist
//testFile(os.Args[1])
// Set initial variables values
VGS.Initialize()
// Initialize Timers
VGS.InitializeTimers()
// Read ROM to the memory
// CORE.ReadROM(flag.Arg(0))
// VGS.ReadROM("/Users/cassiano/go/src/6502/TestPrograms/6502_functional_test.bin")
// VGS.ReadROM("/Users/cassiano/go/src/6502/TestPrograms/6502_decimal_test.bin")
// Read ROM to the memory
// VGS.ReadROM(os.Args[1])
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/2colorbg.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/3rainbow.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/4playfieldborder.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/5playerscoreboard.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/6vertical.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/7horizontal-fixed.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/8input.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Bomber/105bomber-collision-fixed.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Combat.a26")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/PosWidth2.bin")
VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Surround.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/Pac-Man.bin")
// VGS.ReadROM("/Users/cassiano/go/src/Atari2600/TestPrograms/cart.bin")
// Reset system
VGS.Reset()
// Start Window System and draw Graphics
pixelgl.Run(VGS.Run)
}