2020-10-15 03:40:01 +00:00
|
|
|
(local link
|
|
|
|
{:switch
|
|
|
|
(fn [self name]
|
|
|
|
(set self.machine (require (.. "link." name)))
|
2020-11-02 00:39:31 +00:00
|
|
|
(set self.name name))
|
2020-11-08 20:36:38 +00:00
|
|
|
:types [:serial :gsplus :tape :mame]})
|
2020-11-02 00:39:31 +00:00
|
|
|
|
2020-10-15 03:40:01 +00:00
|
|
|
(local serial (require :link.serial))
|
|
|
|
(link:switch (if (and (pcall #(serial:connect)) (serial:connected?)) :serial :gsplus))
|
|
|
|
|
|
|
|
link
|