[FC64] Event-based I/O?
robert.eaglestone at gmail.com
Fri Apr 1 12:21:18 EDT 2011
Hello oh-so-quiet list,
I was thinking about the IEC bus awhile back, and coded up a Databus for
patching the I/O lines between FC64 and, well, virtual disk drives. It's
elegant and beautiful, thanks to Flex's event framework.
Has anyone else given this any thought? I had looked at actual IEC
emulation code, as well as IEC patching code, and agree with Claus that the
task of emulation is not for the faint of heart; rather, it's for that
particular sort of fanatic who likes writing hardware emulations.
Apparently not my cup of tea.
On the other hand, using Flex's event framework to implement a databus was
fun and easy. The trick, unfortunately, is in wiring the patched I/O into
FC64's emulator without slowing it down by two or three orders of
magnitude... and without looking like a squirrely job to begin with.
So I ask: has anyone got any ideas about this?
In a nutshell: the IECDatabus is a nearly trivial singleton event
dispatcher, with little innards beyond that. The IECController has two
methods: writeFile() and readFile() which sends events in order (ATN,
LISTEN, Open, UNLISTEN, ATNRLS), and passes file data as needed, and
readFileResult(), which sends one event back to the bus
(IECControllerFileRead). The IECDevice, finally, has methods to handle each
event being listened for: handleATN(), handleATNRLS(), then doListen(),
doTalk(), doUnlisten(), doUntalk(), doOpen() and doClose(). That's really
all there is.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FC64