{"id":1992,"date":"2016-02-08T16:00:56","date_gmt":"2016-02-08T16:00:56","guid":{"rendered":"https:\/\/www.reenigne.org\/blog\/?p=1992"},"modified":"2016-02-08T08:37:15","modified_gmt":"2016-02-08T08:37:15","slug":"isa-bus-sniffer-update","status":"publish","type":"post","link":"https:\/\/www.reenigne.org\/blog\/isa-bus-sniffer-update\/","title":{"rendered":"ISA Bus Sniffer update"},"content":{"rendered":"<p>Several years ago, I designed the <a href=\"https:\/\/www.reenigne.org\/blog\/isa-bus-sniffer\/\">ISA bus sniffer<\/a>, a sort of special-purpose logic analyzer for capturing the signals from the CPU and ISA bus in an XT-class system. Well, I finally got around to finishing it, writing the three pieces of software needed to make it work (the <a href=\"https:\/\/github.com\/reenigne\/reenigne\/tree\/master\/8088\/isa_bus_sniffer\">microcontroller program<\/a>, the <a href=\"https:\/\/github.com\/reenigne\/reenigne\/tree\/master\/8088\/trace\">8088 test harness<\/a> and the <a href=\"https:\/\/github.com\/reenigne\/reenigne\/tree\/master\/8088\/xtserver\/sniffer_decode\">decoder<\/a>, as well as making the changes to the XT Server to retrieve traces.<\/p>\n<p>Here is what the contraption looks like:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.reenigne.org\/misc\/isa_bus_sniffer_complete.jpg\" alt=\"ISA Bus Sniffer, completed\" \/><\/p>\n<p>In this picture you can also see the board that goes into the 8087 FPU socket to probe the CPU pins. The yellow wires go to a switch so that I can remotely reset the microcontroller for reflashing.<\/p>\n<p>Here is how it fits into the machine:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.reenigne.org\/misc\/isa_bus_sniffer_in_situ.jpg\" alt=\"ISA Bus Sniffer in situ\" \/><\/p>\n<p>Here is what the XT Server currently looks like:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/www.reenigne.org\/misc\/xtserver.jpg\" alt=\"ISA Bus Sniffer in situ\" \/><\/p>\n<p>And here is an example of what the output from the sniffer looks like after decoding:<\/p>\n<pre>\r\n20FFF .p...  00F24 FF 00 FC .......\r\n20FFF Ip...  00F24 FF 01 FC .......                          I\r\n20FF1 SC...  00F24 FF 01 FC .......  T1                      S F6E1         MUL CL\r\n00F25 .C...  00F25 FF 01 FC .....D.  T2 S0\r\n20F25 .C...  00F25 FF 01 FC .....D.  T3 S1\r\n20F25 .C...  0020B FF 10 FC .....D.  Tw S2\r\n20F25 .C...  0020B FF 10 FC ..r..D.  Tw S3\r\n20F25 .C...  0020B FF 10 FC .Wr..D.  Tw S4 FF <-d [   0020B]\r\n20F25 .C...  0020B FF 00 FC .....D.  Tw\r\n20FFF .C...  00F25 FF 00 FC ..r....  Tw\r\n20FF6 .C...  00F25 F6 00 FC ..r....  Tw\r\n20FF6 .p...  00F25 F6 00 FC ..r....  T4    F6 <-f [   00F25]\r\n20FF6 .C...  00F25 F6 00 FC .......  T1\r\n00F26 .C...  00F26 F6 00 FC .......  T2\r\n20F26 .C...  00F26 FF 00 FC ..r....  T3\r\n20FE1 .p...  00F26 E1 00 FC ..r....  T4    E1 <-f [   00F26]\r\n20FE1 .p...  00F26 E1 00 FC .......\r\n<\/pre>\n<p>From left to right the columns are: CPU address\/data, CPU flags, bus address, bus data, DMA requests and acks, interrupt requests, bus flags, bus states for CPU and DA accesses, transfers, prefetch queue status, instruction data and decoded instruction.<\/p>\n<p>You can try this out! Grab these files:<br \/>\n<a href=\"https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/defaults_bin.asm\">https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/defaults_bin.asm<\/a><br \/>\n<a href=\"https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/defaults_common.asm\">https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/defaults_common.asm<\/a><br \/>\n<a href=\"https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/trace\/trace.asm\">https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/trace\/trace.asm<\/a><br \/>\n<a href=\"https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/trace\/build.bat\">https:\/\/github.com\/reenigne\/reenigne\/blob\/master\/8088\/trace\/trace.asm<\/a><br \/>\n<a href=\"http:\/\/yasm.tortall.net\/Download.html\">http:\/\/yasm.tortall.net\/Download.html<\/a> (NASM should work too with minor modifications).<\/p>\n<p>Replace the code under \"testRoutine:\" with the code that you'd like to get a trace of (it needs to run exactly the same each time it's run, so be sure to initialize all registers and memory you use - I made that mistake and it has me scratching my head for a bit). Build trace.bin and upload it to <a href=\"http:\/\/www.reenigne.org\/xtserver\">http:\/\/www.reenigne.org\/xtserver<\/a> - within seconds you should get a link to a trace like the one above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Several years ago, I designed the ISA bus sniffer, a sort of special-purpose logic analyzer for capturing the signals from the CPU and ISA bus in an XT-class system. Well, I finally got around to finishing it, writing the three pieces of software needed to make it work (the microcontroller program, the 8088 test harness [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,38],"tags":[],"class_list":["post-1992","post","type-post","status-publish","format-standard","hentry","category-computer","category-emulation"],"_links":{"self":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/comments?post=1992"}],"version-history":[{"count":1,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1992\/revisions"}],"predecessor-version":[{"id":1993,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1992\/revisions\/1993"}],"wp:attachment":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/media?parent=1992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/categories?post=1992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/tags?post=1992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}