feat(core): add font set, quirks config, and save-state snapshot
This commit is contained in:
1 parent
434dcbae15
commit
87ac07c68e
3 files changed
+175
No files matched your search
@@ -0,0 +1,56 @@
|
||||
namespace Chip8.Core;
|
||||
|
||||
public sealed class Quirks
|
||||
{
|
||||
public bool shiftUsesVy { get; set; }
|
||||
|
||||
public bool jumpWithVx { get; set; }
|
||||
|
||||
public bool loadStoreIncrementsI { get; set; }
|
||||
|
||||
public bool resetVfOnLogic { get; set; }
|
||||
|
||||
public bool clipSprites { get; set; }
|
||||
|
||||
public bool addToIndexSetsCarry { get; set; }
|
||||
|
||||
public static Quirks cosmacVip() => new()
|
||||
{
|
||||
shiftUsesVy = true,
|
||||
jumpWithVx = false,
|
||||
loadStoreIncrementsI = true,
|
||||
resetVfOnLogic = true,
|
||||
clipSprites = true,
|
||||
addToIndexSetsCarry = false,
|
||||
};
|
||||
|
||||
public static Quirks modern() => new()
|
||||
{
|
||||
shiftUsesVy = false,
|
||||
jumpWithVx = false,
|
||||
loadStoreIncrementsI = false,
|
||||
resetVfOnLogic = false,
|
||||
clipSprites = true,
|
||||
addToIndexSetsCarry = false,
|
||||
};
|
||||
|
||||
public static Quirks superChip() => new()
|
||||
{
|
||||
shiftUsesVy = false,
|
||||
jumpWithVx = true,
|
||||
loadStoreIncrementsI = false,
|
||||
resetVfOnLogic = false,
|
||||
clipSprites = true,
|
||||
addToIndexSetsCarry = false,
|
||||
};
|
||||
|
||||
public static Quirks xoChip() => new()
|
||||
{
|
||||
shiftUsesVy = false,
|
||||
jumpWithVx = false,
|
||||
loadStoreIncrementsI = false,
|
||||
resetVfOnLogic = false,
|
||||
clipSprites = false,
|
||||
addToIndexSetsCarry = false,
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user