-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
26 lines (24 loc) · 834 Bytes
/
Program.cs
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
using System;
using System.IO;
namespace Chroma_Invaders
{
class Program
{
private static readonly string[] ROM_NAMES = new string[] { "roms/invaders.h", "roms/invaders.g", "roms/invaders.f", "roms/invaders.e" };
// private static readonly string[] ROM_NAMES = new string[] { "roms/TST8080.COM" };
static void Main(string[] args)
{
byte[][] roms = new byte[ROM_NAMES.Length][];
for(int i = 0; i < ROM_NAMES.Length; i++)
{
if (File.Exists(ROM_NAMES[i]))
roms[i] = File.ReadAllBytes(ROM_NAMES[i]);
else {
Console.WriteLine("Error: Missing ROM Part " + ROM_NAMES[i]);
return;
}
}
new Emulator(roms).Run();
}
}
}