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))
|
2021-09-24 02:28:48 +00:00
|
|
|
:types [:serial :tape :mame :udpdebug]})
|
2020-11-02 00:39:31 +00:00
|
|
|
|
2020-10-15 03:40:01 +00:00
|
|
|
(local serial (require :link.serial))
|
2020-11-10 03:58:57 +00:00
|
|
|
(link:switch (if (and (pcall #(serial:connect)) (serial:connected?)) :serial :mame))
|
2020-10-15 03:40:01 +00:00
|
|
|
|
|
|
|
link
|