Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: BLuRry Newsgroups: comp.sys.apple2.programmer Subject: Catching prodos commands Date: Sat, 4 Feb 2012 23:00:55 -0800 (PST) Organization: http://groups.google.com Lines: 27 Message-ID: <17766543.815.1328425255235.JavaMail.geo-discussion-forums@yqtt30> Reply-To: comp.sys.apple2.programmer@googlegroups.com NNTP-Posting-Host: 70.123.154.97 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1328425341 19434 127.0.0.1 (5 Feb 2012 07:02:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 5 Feb 2012 07:02:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.123.154.97; posting-account=HyIOQgoAAAAfAUGOevdCSBhPYcDSPtM9 User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.sys.apple2.programmer:128 Found a fun thing to do: Re-route calls to $a685 to a custom parser in prod= os. This is the prodos syntax check routine, so if you replace the content= s of the keyboard buffer with something else before resuming the command, y= ou can essentially extend the recognized commands almost indefinitely. Here's my proof of concept stub in the JACE code to do this, though right n= ow I just print out the intercepted command it can be used for much more in= teresting things later: new RAMListener(RAMEvent.TYPE.READ, RAMEvent.SCOPE.ADDRESS, RAMEvent.VALUE.= ANY) { @Override protected void doConfig() {setScopeStart(0x0a685);} @Override protected void doEvent(RAMEvent e) { if (getCpu().getProgramCounter() !=3D getScopeStart()) = return; String in =3D ""; for (int i=3D0x0200; i < 0x0300; i++) { char c =3D (char) (getMemory().read(i, false) & 0x0= 7f); if (c =3D=3D 0x0d) break; in +=3D c; } System.err.println("Intercepted command: "+in); }