[Simh] vmb.exe - info - source code ? / vax (no O.S.) disk programming

Matt Burke matt at 9track.net
Tue May 12 17:53:53 EDT 2020


On 12/05/2020 15:23, Mike Stramba wrote:
> What is the "story"  with vmb.exe ?
>
> Is there source code for it ?
>
> If not, why not ?
>
> Is it "abandon ware" ?
>
> I'm interested in seeing how it  does  "raw disk" access.
>
> I have MSCP Basic Disk Functions Manual AA-L619A-TK Version 1.2 and
> EK-UDA50-UG-002_UDA50_Users_Guide_Oct82.pdf
>
> Are there any other relevant docs ?
>

VMB has different drivers that are invoked for each controller type
(MASSBUS, MSCP etc). These drivers are just minimal equivalents of the
full drivers within the operating system. Usually they rely on polling
rather than using interrupts. Other than that there is nothing
particularly special that takes place here.

Other documents to look at are:

http://www.bitsavers.org/pdf/dec/dsa/mscp/Mass_Storage_Control_Protocol_Ver_2.4.0_Jun92.txt

and

http://www.bitsavers.org/pdf/dec/disc/uda50/AA-L621A-TK_UnibusPortDescription_1982.pdf

In particular look at chapter 4 which describes the command and response
rings and chapter 9 which describes the initialisation sequence.

Probably the best way to see VMB in action would be to use the debug
feature within Simh. I would recommend using the VAX-11/780 simulator
for this as VMB is loaded directly after issuing the boot command:

sim> set debug stdout
sim> set rq debug
sim> boot rq0

DBG(5000)> RQ TRACE: rq_reset
DBG(5000)> RQ TRACE: rq_clrint
Loading boot code from internal vmb.exe
DBG(3470473)> RQ TRACE: rq_reset
DBG(3470473)> RQ TRACE: rq_clrint

Writing to the initialisation/polling register resets the controller:

DBG(3483139)> RQ REG: rq_wr(PA=0x2013F468 [IP], access=2, data=0x0000)
DBG(3483139)> RQ TRACE: rq_reset
DBG(3483139)> RQ TRACE: rq_clrint

Values (as described in chapter 9) are written to the status & address
register in order to complete the 4 step initialisation sequence:

DBG(3483139)> RQ REQ: initialization started
DBG(3486350)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x0940
DBG(3486357)> RQ REG: rq_wr(PA=0x2013F46A [SA], access=2, data=0x8000)
DBG(3486807)> RQ TRACE: rq_quesvc
DBG(3486807)> RQ INIT: CSTA=0, SAW=0x8000
DBG(3489569)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x1080
DBG(3489576)> RQ REG: rq_wr(PA=0x2013F46A [SA], access=2, data=0xDDD8)
DBG(3490026)> RQ TRACE: rq_quesvc
DBG(3490026)> RQ INIT: CSTA=2, SAW=0xDDD8
DBG(3492788)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x2000
DBG(3492795)> RQ REG: rq_wr(PA=0x2013F46A [SA], access=2, data=0x0003)
DBG(3493245)> RQ TRACE: rq_quesvc
DBG(3493245)> RQ INIT: CSTA=3, SAW=0x3
DBG(3496007)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x4063
DBG(3496014)> RQ REG: rq_wr(PA=0x2013F46A [SA], access=2, data=0x0001)
DBG(3496024)> RQ TRACE: rq_quesvc
DBG(3496024)> RQ INIT: CSTA=6, SAW=0x1
DBG(3496024)> RQ REQ: initialization complete

The initialisation/polling register is read to notify the controller
that a new command packet had been placed in the command ring by the host:

DBG(3496029)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x0000
DBG(3496033)> RQ REG: rq_rd(PA=0x2013F468 [IP], access=0)=0x0000
DBG(3496033)> RQ REQ: poll started, PC=1076
DBG(3496034)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x0000

The controller processes a "Set Controller Characteristics" command from
the command ring:

DBG(3496133)> RQ TRACE: rq_quesvc
DBG(3496133)> RQ REQ: cmd=0004(SCC), mod=0000, unit=0, bc=00000000,
ma=000000FF, lbn=00000000
DBG(3496133)> RQ TRACE: rq_mscp - Queue
DBG(3496133)> RQ TRACE: rq_scc

A response packet is placed in the response ring by the controller:

DBG(3496133)> RQ REQ: rsp=0084, sts=0000

The initialisation/polling register is read again to notify the
controller that a another command packet had been placed in the command
ring by the host:

DBG(3496148)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x0000
DBG(3496152)> RQ REG: rq_rd(PA=0x2013F468 [IP], access=0)=0x0000
DBG(3496152)> RQ REQ: poll started, PC=1076
DBG(3496153)> RQ REG: rq_rd(PA=0x2013F46A [SA], access=0)=0x0000

The controller processes an "Online Drive" command from the command ring:

DBG(3496233)> RQ TRACE: rq_quesvc
DBG(3496233)> RQ REQ: cmd=0009(ONL), mod=0000, unit=0, bc=00000000,
ma=00000000, lbn=00000000
DBG(3496233)> RQ TRACE: rq_mscp - Queue
DBG(3496233)> RQ TRACE: rq_onl
DBG(3496233)> RQ TRACE: rq_putr_unit

A response packet is placed in the response ring by the controller:

DBG(3496233)> RQ REQ: rsp=0089, sts=0023
DBG(3496333)> RQ TRACE: rq_quesvc

%BOOT-F-Failed to initialize device
HALT instruction, PC: 000004C7 (BLBS 549,4C6)

The "Online Drive" command fails because no disk image was attached to
the device.

Matt


More information about the Simh mailing list