Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #128

Catching prodos commands

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 <brendan.robert@gmail.com>
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> (permalink)
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

Show key headers only | View raw


Found a fun thing to do: Re-route calls to $a685 to a custom parser in prodos.  This is the prodos syntax check routine, so if you replace the contents of the keyboard buffer with something else before resuming the command, you can essentially extend the recognized commands almost indefinitely.

Here's my proof of concept stub in the JACE code to do this, though right now I just print out the intercepted command it can be used for much more interesting 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() != getScopeStart()) return;
                    String in = "";
                    for (int i=0x0200; i < 0x0300; i++) {
                        char c = (char) (getMemory().read(i, false) & 0x07f);
                        if (c == 0x0d) break;
                        in += c;
                    }
                    System.err.println("Intercepted command: "+in);
                }

Back to comp.sys.apple2.programmer | Previous | NextNext in thread | Find similar


Thread

Catching prodos commands BLuRry <brendan.robert@gmail.com> - 2012-02-04 23:00 -0800
  Re: Catching prodos commands Antoine Vignau <antoine.vignau@laposte.net> - 2012-02-05 05:51 -0800
    Re: Catching prodos commands BLuRry <brendan.robert@gmail.com> - 2012-02-05 06:42 -0800
      Re: Catching prodos commands "Michael J. Mahon" <mjmahon@aol.com> - 2012-02-08 11:25 -0800
        Re: Catching prodos commands BLuRry <brendan.robert@gmail.com> - 2012-02-08 21:49 -0800

csiph-web