summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/data/data_gameinit.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/data/data_gameinit.lua')
-rw-r--r--plugins/data/data_gameinit.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/data/data_gameinit.lua b/plugins/data/data_gameinit.lua
new file mode 100644
index 00000000000..040cfb7745b
--- /dev/null
+++ b/plugins/data/data_gameinit.lua
@@ -0,0 +1,23 @@
+local dat = {}
+local ver, info
+
+local datread = require("data/load_dat")
+datread, ver = datread.open("gameinit.dat", "# GAMEINIT.DAT")
+
+function dat.check(set, softlist)
+ if softlist or not datread then
+ return nil
+ end
+ local status
+ status, info = pcall(datread, "mame", "info", set)
+ if not status or not info then
+ return nil
+ end
+ return "Gameinit"
+end
+
+function dat.get()
+ return info
+end
+
+return dat