-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathGBFileFormatTests.cs
More file actions
35 lines (31 loc) · 930 Bytes
/
GBFileFormatTests.cs
File metadata and controls
35 lines (31 loc) · 930 Bytes
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
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.IO;
using ZXBox.Snapshot;
namespace ZXBox.Core.Tests.GameBoy;
[TestClass]
public class GBFileFormatTests
{
[TestMethod]
public void TestLoadGBFile()
{
var bytes = File.ReadAllBytes(@"C:\Code\Roms\Test.gb");
var ff = new GBFileFormat();
ff.LoadSnapshot(bytes, new ZXSpectrum());
}
[TestMethod]
public void LoadTileTest()
{
var bytes = File.ReadAllBytes(@"C:\Code\Roms\Test.gb");
var ff = new GBFileFormat();
var gb = new Gameboy();
ff.LoadSnapshot(bytes, gb);
List<int> tiles = new List<int>();
//gb.PC = 0x100; //Entry point
gb.DoInstructions(1000000000);
for (ushort b = 0x8000; b <= 0x97FF; b++)
{
tiles.Add(gb.ReadByteFromMemory(b));
}
}
}