{"id":2735,"date":"2017-10-15T11:05:08","date_gmt":"2017-10-15T11:05:08","guid":{"rendered":"http:\/\/avitech.com.au\/?page_id=2735"},"modified":"2017-10-15T20:04:56","modified_gmt":"2017-10-15T20:04:56","slug":"scsi2sd-on-qbus-pdp-11","status":"publish","type":"page","link":"https:\/\/avitech.com.au\/?page_id=2735","title":{"rendered":"SCSI2SD on QBUS PDP-11"},"content":{"rendered":"<p>Until recently I was using an MFM hard drive as the primary hard drive on my QBUS PDP-11 systems. Typically this would be an RD31 (ST-225) on an RQDX3 MSCP controller.<\/p>\n<p>Over time, I am converting to using an 8GB microSDHC card as the primary hard drive. This is achieved by using a QBUS SCSI controller (either an Emulex UC07 or a CMD CQD220) connected to a V5.0a orV5.0b SCSI2SD board.<\/p>\n<p>The SCSI2SD  is configured using a PC-based application called &#8220;scsi2sd-util.exe&#8221;, with the SCSI2SD board connected to the PC via a USB cable.<\/p>\n<p>The SCSI2SD firmware allows you to configure the SCSI2SD board to appear (on the SCSI bus) as up to 4 virtual devices.  All these virtual devices are on the one microSDHC card. Each device can be a hard drive or a CDROM drive. You can&#8217;t drag-and-drop virtual hard drive files on to the microSDHC card, but you can import\/export them from the card using the Linux &#8220;dd&#8221; command. When you configure the SCSI2SD card, you tell the firmware where each device starts on the microSDHC card, and the length of the device. Knowing these parameters, it is easy to use the &#8220;dd&#8221; command to import and export virtual hard drive (or CDROM) images.<\/p>\n<p>The &#8220;standard&#8221; memory map that I am using for the SCSI2SD (with an 8GB microSDHC card) is as follows (the values in square brackets are for use with the &#8220;dd&#8221; command&#8217;s skip, seek and count options):<\/p>\n<ul>\n<li>Device DU0: Up to 256M (524,288 [or 512K] sectors, starting at sector 0 on the card)<\/li>\n<li>Device DU1: Up to 256M (524,288 [or 512K] sectors, starting at sector 524,288 [512K])<\/li>\n<li>Device DU2: Up to 2G (4,194,304 [or 4M] sectors, starting at sector 2,097,152 [2M])<\/li>\n<li>Device DU3: Up to 2G (4,194,304 [or 4M] sectors, starting at sector 6,291,456 [6M])<\/li>\n<\/ul>\n<p>Note: On this webpage I am using the same convention as &#8220;dd&#8221; uses for units (ie &#8220;M&#8221; means 1024 x 1024 bytes, &#8220;MB&#8221; = 1,000,000 bytes, etc). Sectors are always 512 bytes in length.<\/p>\n<p>Here are the settings I am using in scsi2sd to implement the above memory map (as at 15 October 2017):<\/p>\n<table style=\"width:90%;margin-left:5%;\">\n<tr class=\"bb\">\n<th style=\"width:20%;text-align:left;\">&nbsp;<\/th>\n<th style=\"width:20%;text-align:left;\">Device 1<\/th>\n<th style=\"width:20%;text-align:left;\">Device 2<\/th>\n<th style=\"width:20%;text-align:left;\">Device 3<\/th>\n<th style=\"width:20%;text-align:left;\">Device 4<\/th>\n<\/tr>\n<tr class=\"topjust\">\n<td>SCSI ID<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Device Type<\/td>\n<td>Hard Drive<\/td>\n<td>Hard Drive<\/td>\n<td>Hard Drive<\/td>\n<td>Hard Drive<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>SD card start sector<\/td>\n<td>0<\/td>\n<td>524288 [512K]<\/td>\n<td>2097152 [2M]<\/td>\n<td>6291456 [6M]<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Sector size (bytes)<\/td>\n<td>512<\/td>\n<td>512<\/td>\n<td>512<\/td>\n<td>512<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Sector count<\/td>\n<td>524288 [512K]<\/td>\n<td>524288 [512K]<\/td>\n<td>4194304 [4M]<\/td>\n<td>4194304 [4M]<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Device size<\/td>\n<td>256.00 MB<\/td>\n<td>256.00 MB<\/td>\n<td>2.00 GB<\/td>\n<td>2.00 GB<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Vendor<\/td>\n<td>codesrc<\/td>\n<td>codesrc<\/td>\n<td>codesrc<\/td>\n<td>codesrc<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Product ID<\/td>\n<td>RD54<\/td>\n<td>RD54<\/td>\n<td>RA92<\/td>\n<td>RA92<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Revision<\/td>\n<td>4.71<\/td>\n<td>4.71<\/td>\n<td>4.71<\/td>\n<td>4.71<\/td>\n<\/tr>\n<tr class=\"topjust\">\n<td>Serial Number<\/td>\n<td>1<\/td>\n<td>2<\/td>\n<td>3<\/td>\n<td>4<\/td>\n<\/tr>\n<\/table>\n<p>Here is the XML configuration file that I am using for my SCSI2SD board -> <a href=\"http:\/\/www.avitech.com.au\/mm-files\/scsi2sd\/scsi2sd-config-mal-20171015.xml\" rel=\"noopener\" target=\"_blank\">scsi2sd-config-mal-20171015.xml<\/a>.<\/p>\n<h4>Moving DU disk files between SIMH and the SCSI2SD microSDHC card<\/h4>\n<p>I&#8217;ve found that virtual files for DU drives in SIMH can be transferred directly to\/from the microSDHC card, without the need for any manipulation. I use &#8220;WinSCP&#8221; or &#8220;FileZilla&#8221; to transfer the SIMH files from my Windows laptop (where I run SIMH) to a HP N40L Microserver (where I do most of my Linux work). I do the transfers between the Linux box and the microSDHC card using the Linux &#8220;dd&#8221; command, with the microSDHC card plugged into a USB-to-microSDHC card reader.<\/p>\n<p>Before plugging the microSDHC card into the Linux box, I use the following command to list the existing hard drives and partitions that make up the Linux system:<\/p>\n<pre>malcolm@n40l:~$ ls -l \/dev\/sd*\r\nbrw-rw---- 1 root disk 8,  0 Oct 15 11:58 \/dev\/sda\r\nbrw-rw---- 1 root disk 8,  1 Oct 15 11:58 \/dev\/sda1\r\nbrw-rw---- 1 root disk 8,  2 Oct 15 11:58 \/dev\/sda2\r\nbrw-rw---- 1 root disk 8,  3 Oct 15 11:58 \/dev\/sda3\r\nbrw-rw---- 1 root disk 8,  5 Oct 15 11:58 \/dev\/sda5\r\nbrw-rw---- 1 root disk 8,  6 Oct 15 11:58 \/dev\/sda6\r\nmalcolm@n40l:~$<\/pre>\n<p>I then plug in the microSDHC card (via a USB-to-microSDHC card reader), and repeat the same command:<\/p>\n<pre>malcolm@n40l:~$ ls -l \/dev\/sd*\r\nbrw-rw---- 1 root disk 8,  0 Oct 15 11:58 \/dev\/sda\r\nbrw-rw---- 1 root disk 8,  1 Oct 15 11:58 \/dev\/sda1\r\nbrw-rw---- 1 root disk 8,  2 Oct 15 11:58 \/dev\/sda2\r\nbrw-rw---- 1 root disk 8,  3 Oct 15 11:58 \/dev\/sda3\r\nbrw-rw---- 1 root disk 8,  5 Oct 15 11:58 \/dev\/sda5\r\nbrw-rw---- 1 root disk 8,  6 Oct 15 11:58 \/dev\/sda6\r\nbrw-rw---- 1 root disk 8, 16 Oct 15 19:40 \/dev\/sdb\r\nmalcolm@n40l:~$<\/pre>\n<p>This tells me that my microSDHC card appears as \/dev\/sdb.<\/p>\n<p>We can now use the &#8220;dd&#8221; command to transfer individual virtual disk files (each one corresponding to a particular DU device). Extreme care needs to be taken here, as you can very easily trash your microSDHC card (or the main hard drive in your Linux system!) by any miscalculation or typo.<\/p>\n<p>Some notable things about the dd command:<\/p>\n<ul>\n<li>&#8220;bs&#8221; is the block size. We set this to 512 bytes, as this is the standard DEC sector length<\/li>\n<li>&#8220;skip&#8221; is the number of blocks of the input file to skip past, before reading the input file<\/li>\n<li>&#8220;seek&#8221; is the number of blocks of the output file to seek past, before writing to the output file<\/li>\n<li>&#8220;count&#8221; is the maximum number of blocks to read or write<\/li>\n<li>&#8220;conv=fdatasync&#8221; ensures the data actually gets written to the SD card<\/li>\n<\/ul>\n<p>IMPORTANT NOTE: Sometimes dd will work without the &#8220;conv=fdatasyn&#8221; switch, other times it will silently fail. I recommend using it all the time when reading or writing SD cards with the dd command. Without this switch, sometimes only partial data gets written to the card. You can see this by reading back from the SD card (after writing) using the dd command again, then examining the resultant file with the &#8220;xxd&#8221; command.<\/p>\n<p><strong>Writing files to the microSDHC card<\/strong><\/p>\n<p>For the sake of this example, let&#8217;s say we want to transfer the following virtual disk files (perhaps created in SIMH) to the microSDHC card:<\/p>\n<ul>\n<li>&#8220;~\/Downloads\/images\/rtv57-sysgend.dsk&#8221; will be stored as DU0:<\/li>\n<li>&#8220;~\/Downloads\/images\/rtv53.dsk&#8221; will be stored as DU1:<\/li>\n<li>&#8220;~\/Downloads\/images\/saturn-mscp.dsk&#8221; will be stored as DU2:<\/li>\n<\/ul>\n<p>First, let&#8217;s store &#8220;rtv57-sysgend.dsk&#8221; as DU0: (stating location is sector 0, maximum length is 512K sectors):<\/p>\n<pre>malcolm@n40l:~$ sudo dd if=~\/Downloads\/images\/rtv57-sysgend.dsk of=\/dev\/sdb bs=512 seek=0 count=512K conv=fdatasync\r\n41820+0 records in\r\n41820+0 records out\r\n21411840 bytes (21 MB) copied, 5.9549 s, 3.6 MB\/s\r\nmalcolm@n40l:~$<\/pre>\n<p>Second, let&#8217;s store &#8220;rtv53.dsk&#8221; as DU1: (starting location is sector 512K, maximum length is 512K sectors):<\/p>\n<pre>malcolm@n40l:~$ sudo dd if=~\/Downloads\/images\/rtv53.dsk of=\/dev\/sdb bs=512 seek=512K count=512K conv=fdatasync\r\n22272+0 records in\r\n22272+0 records out\r\n11403264 bytes (11 MB) copied, 3.31455 s, 3.4 MB\/s\r\nmalcolm@n40l:~$<\/pre>\n<p>Third, let&#8217;s store &#8220;\/saturn-mscp.dsk&#8221; as DU2: (starting location is sector 2M, maximum length is 4M sectors):<\/p>\n<pre>malcolm@n40l:~$ sudo dd if=~\/Downloads\/images\/saturn-mscp.dsk of=\/dev\/sdb bs=512 seek=2M count=4M conv=fdatasync\r\n44480+0 records in\r\n44480+0 records out\r\n22773760 bytes (23 MB) copied, 5.50866 s, 4.1 MB\/s\r\nmalcolm@n40l:~$<\/pre>\n<p><strong>Reading files from the microSDHC card<\/strong><\/p>\n<p>We can read the first hard drive from the microSD card using the following command (Note: this assumes the drive is a DEC RD31, which has 41,820 sectors):<\/p>\n<pre>malcolm@n40l:~$ sudo dd if=\/dev\/sdb of=~\/Downloads\/images\/rtv57-sysgend.dsk bs=512 skip=0 seek=0 count=41820 conv=fdatasync\r\n41820+0 records in\r\n41820+0 records out\r\n21411840 bytes (21 MB) copied, 0.941215 s, 22.7 MB\/s\r\nmalcolm@n40l:~$<\/pre>\n<h4>Sector length of various DEC hard drives<\/h4>\n<p>Here is the assumed length of DEC hard drives (this list will grow as I work with different drives in SIMH):<\/p>\n<ul>\n<li>RD31 (ST-225): 41,820 sectors (615 cylinders x 4 heads x 17 sectors)<\/li>\n<li>RD54 (XT-2190): 312,120 sectors (1224 cylinders x 15 heads x 17 sectors)<\/li>\n<\/ul>\n<p>Note: I&#8217;ve not been able to positively confirm the number of cylinders that the RD54 has. Perhaps the best guide is <a href=\"http:\/\/manx-docs.org\/collections\/antonio\/chrisq\/1014286_Rev_A_-_XT1000,2000_OEM_Manual_&#038;_Product_Specification.pdf\" rel=\"noopener\" target=\"_blank\">Maxtor&#8217;s Product Specification and OEM manual<\/a>. The calculations shown in Section 1.2.3 of that document confirms the cylinder count (1224) and total sector count (312,120) that I have outlined above. However, when you read Section 7.1 carefully, it suggests the drive may have up to 1226 (or 1227?) cylinders of usable space. At some point I need to look carefully at the SIMH source code, to determine how many total cylinders (including any that are set aside for bad block replacements, etc) SIMH uses for the RD54.<\/p>\n<h4>Links<\/h4>\n<p><span style=\"padding-left: 30px;\"><a href=\"http:\/\/www.ultimate.com\/phil\/pdp10\/dec.disks\" rel=\"noopener\" target=\"_blank\">DEC Disk History<\/a><\/span><\/p>\n<p><span style=\"padding-left: 30px;\"><a href=\"http:\/\/manx-docs.org\/collections\/antonio\/chrisq\/1014286_Rev_A_-_XT1000,2000_OEM_Manual_&#038;_Product_Specification.pdf\" rel=\"noopener\" target=\"_blank\">Maxtor&#8217;s XT-1000\/2000 Product Specification and OEM Manual<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Until recently I was using an MFM hard drive as the primary hard drive on my QBUS PDP-11 systems. Typically this would be an RD31 (ST-225) on an RQDX3 MSCP controller. Over time, I am converting to using an 8GB microSDHC card as the primary hard drive. This is achieved by using a QBUS SCSI ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/avitech.com.au\/?page_id=2735\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2735","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P7xTsk-I7","jetpack-related-posts":[{"id":2634,"url":"https:\/\/avitech.com.au\/?page_id=2634","url_meta":{"origin":2735,"position":0},"title":"DEC PDP-11\/73 in BA123 cabinet","author":"malcolm","date":"30-September-2017","format":false,"excerpt":"I have built up a PDP-11\/73 system in a BA123 cabinet. My aim is for this system to be able to boot either RT-11 V5.7 or RSX-11M+. The primary MSCP controller is a CMD CQD-220 controller with a SCSI2SD device connected to it. Up to 4 logical devices can exist\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":645,"url":"https:\/\/avitech.com.au\/?page_id=645","url_meta":{"origin":2735,"position":1},"title":"RQDX Breakout Board","author":"malcolm","date":"28-June-2016","format":false,"excerpt":"Quick Links Feel free to click on one of the links in this section to jump to the material you are looking for: Introduction \u00a0 Quickstart Guide \u00a0 Floppy Drives \u00a0 Hard Drives \u00a0 Miscellaneous \u00a0 Downloads \u00a0 Table of Contents \u00a0 Contact Details Introduction DEC made a series of\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"rqdx3-cropped","src":"https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2016\/06\/rqdx3-cropped-300x175.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1468,"url":"https:\/\/avitech.com.au\/?page_id=1468","url_meta":{"origin":2735,"position":2},"title":"Pertec T8640A Tape Transport","author":"malcolm","date":"3-January-2017","format":false,"excerpt":"I have a Pertec T8640A Tape Transport that is now working nicely on a QBUS PDP-11 system. While I still have a lot to learn about the operation of magtape systems (and their advantages and limitations), I am now able to successfully \"INItialize\", write to and read from magtapes in\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/01\/20170105_093142-Large-e1483572635195.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/01\/20170105_093142-Large-e1483572635195.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/01\/20170105_093142-Large-e1483572635195.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/01\/20170105_093142-Large-e1483572635195.jpg?resize=700%2C400 2x, https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/01\/20170105_093142-Large-e1483572635195.jpg?resize=1050%2C600 3x"},"classes":[]},{"id":1887,"url":"https:\/\/avitech.com.au\/?page_id=1887","url_meta":{"origin":2735,"position":3},"title":"Digital Electronics QBUS Cabinet","author":"malcolm","date":"18-April-2017","format":false,"excerpt":"In my collection I have this rather interesting third-party QBUS system. The manufacturer was an Australian company called \"Digital Electronics\". This appears to have been specifically designed and built for lab A\/D work. The front panel has various analogue I\/O connectors. At the top of the rack is a separate\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/04\/20170324_112154_1492508841761_resized.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/04\/20170324_112154_1492508841761_resized.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/04\/20170324_112154_1492508841761_resized.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/04\/20170324_112154_1492508841761_resized.jpg?resize=700%2C400 2x, https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/04\/20170324_112154_1492508841761_resized.jpg?resize=1050%2C600 3x, https:\/\/i0.wp.com\/avitech.com.au\/wp-content\/uploads\/2017\/04\/20170324_112154_1492508841761_resized.jpg?resize=1400%2C800 4x"},"classes":[]},{"id":3697,"url":"https:\/\/avitech.com.au\/?page_id=3697","url_meta":{"origin":2735,"position":4},"title":"UNIX V6 on QBUS PDP-11","author":"malcolm","date":"17-November-2019","format":false,"excerpt":"I've starting playing around with UNIX v6 on the PDP-11. I'm using the \"v6_rl02_unknown\" image, which is discussed and available for download from https:\/\/github.com\/eunuchs\/unix-archive\/tree\/master\/PDP-11\/Boot_Images. This is an RL02 image. It must have a modified kernel, as apparently V6 was not originally distributed on RL02 media. Hardware The hardware used was\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10110,"url":"https:\/\/avitech.com.au\/?page_id=10110","url_meta":{"origin":2735,"position":5},"title":"My Early x86 Personal Computer Collection","author":"malcolm","date":"19-July-2024","format":false,"excerpt":"I'm not an intentional collector of x86 PCs. However, I have always kept a few PC's laying around for the purpose of running legacy (MSDOS) software and as a host for legacy (ISA) hardware. In more recent years though I've come to appreciate these machines in their own right and\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages\/2735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/avitech.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2735"}],"version-history":[{"count":10,"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages\/2735\/revisions"}],"predecessor-version":[{"id":2750,"href":"https:\/\/avitech.com.au\/index.php?rest_route=\/wp\/v2\/pages\/2735\/revisions\/2750"}],"wp:attachment":[{"href":"https:\/\/avitech.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}