From 743755248996deb7181ae92f6e60be5656439c44 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Sat, 13 Feb 2021 23:07:15 -0500 Subject: [PATCH] Migrate project defaults into Windfish. --- .../Windfish/Project/Project+Defaults.swift | 253 ++++++++++++++++++ lib/Sources/Windfish/Project/Project.swift | 2 +- 2 files changed, 254 insertions(+), 1 deletion(-) create mode 100644 lib/Sources/Windfish/Project/Project+Defaults.swift diff --git a/lib/Sources/Windfish/Project/Project+Defaults.swift b/lib/Sources/Windfish/Project/Project+Defaults.swift new file mode 100644 index 00000000..deb8a5df --- /dev/null +++ b/lib/Sources/Windfish/Project/Project+Defaults.swift @@ -0,0 +1,253 @@ +import Foundation + +import LR35902 + +extension Project { + public convenience init(rom: Data?) { + var regions: [Region] = [] + var dataTypes: [DataType] = [] + var globals: [Global] = [] + + let numberOfRestartAddresses: LR35902.Address = 8 + let restartSize: LR35902.Address = 8 + let rstAddresses = (0..