From robert.eaglestone at gmail.com Fri Apr 1 12:21:18 2011 From: robert.eaglestone at gmail.com (Rob Eaglestone) Date: Fri, 1 Apr 2011 11:21:18 -0500 Subject: [FC64] Event-based I/O? Message-ID: 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. Cheers, Robert Eaglestone -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.hauwert at gmail.com Fri Apr 1 13:32:04 2011 From: r.hauwert at gmail.com (Ralph Hauwert) Date: Fri, 1 Apr 2011 19:32:04 +0200 Subject: [FC64] Event-based I/O? In-Reply-To: References: Message-ID: <2790E6AD-B704-4ED4-85F0-1689872E9EDA@gmail.com> Just glancing over for a quick sec (in the middle of dinner believe it or not), I think this will cause some problems. There are cases where the datalines are abused, as well as doing things like controlling the diskdrive by cpu, or using the 1541 6502 cpu as a co processor. Also thinks like fastloaders which twiddle with the bus might go wrong. Events might be emulated with signals, to avoid the overhead of having actual objects being spawned for every transaction; for large transfers / serial reads etc, this might be major overhead.... 2 cents, Ralph. On Apr 1, 2011, at 6:21 PM, Rob Eaglestone wrote: > event From robert.eaglestone at gmail.com Fri Apr 1 13:39:54 2011 From: robert.eaglestone at gmail.com (Rob Eaglestone) Date: Fri, 1 Apr 2011 12:39:54 -0500 Subject: [FC64] Event-based I/O? In-Reply-To: <2790E6AD-B704-4ED4-85F0-1689872E9EDA@gmail.com> References: <2790E6AD-B704-4ED4-85F0-1689872E9EDA@gmail.com> Message-ID: On Fri, Apr 1, 2011 at 12:32 PM, Ralph Hauwert wrote: > Just glancing over for a quick sec (in the middle of dinner believe it or > not), I think this will cause some problems. There are cases where the > datalines are abused, as well as doing things like controlling the diskdrive > by cpu, or using the 1541 6502 cpu as a co processor. Also thinks like > fastloaders which twiddle with the bus might go wrong. > You're right. I tried a quick-and-dirty patch of calls to the IO Kernal routines, and found non-standard things going on for straightforward loads. :( > Events might be emulated with signals, to avoid the overhead of having > actual objects being spawned for every transaction; for large transfers / > serial reads etc, this might be major overhead.... > I admit there are a lot of issues to address that I haven't yet addressed. I'm not too worried about object proliferation (at this point), since there are ways to try to combat it, but then again I am only toe-deep into this. > > 2 cents, Ralph. > Thank you very much for responding, Ralph. As much as I would like to see an IEC bus on the FC64, I find its implementation tedious to the extreme, and wish there were an elegant solution. > On Apr 1, 2011, at 6:21 PM, Rob Eaglestone wrote: > > > event > > > _______________________________________________ > FC64 mailing list > FC64 at osflash.org > http://osflash.org/mailman/listinfo/fc64_osflash.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: