DOUBLE-SIDED MD2 CONVERSION-THE FINAL WORD!
 
These instructions modify the software for the MD2 to accommodate 
double-sided  disk drives.  They are specifically written for  an 
MD2 with Rev. 1.1 circuit board, Rev. 1.3 ROM, CP/M 2.2 Rev. 1.5,  
SYSGEN Ver. 2.0 MD1.2, and FORMAT Rev 2.3.

This  article  is based on articles originally  written  by  Greg 
Smith in MOR Vol. 3, #3 and Derrek Lee Beatty in MOR Vol. 2,  #1. 
Derek's  article was helpful in spotting some apparent  omissions 
in Greg's article that caused difficulty when attempting to  make 
the conversion. 

GETTING STARTED:
You  need two disks. Disk #1 must be FORMATted and  SYSGENed  and 
contain  DDT.COM, PIP.COM, STAT.COM, FORMAT.COM and  SYSGEN.COM.  
If  it  contains additional programs, that is O.K., but  it  must 
have at least 36K of space remaining.

Disk #2 can be a blank DSDD disk. You'll format this one later as 
a  double-sided  disk, and it will become your  new  double-sided 
sytem disk when you have completed the modifications.

These notations are used throughout the instructions:
     1.  Type everything that is underlined.
     2.  <R> means press RETURN key.
     3.  ^C  means  hold  down CTRL  key  while  typing  C.  This          
         returns you to system.
     4.  "xxxx" represents a four-character expression which  you 
         may ignore.
     5.  Comments are bracketed "{...}".

YOUR FIRST STEP-Capturing a copy of CP/M:

Press the RESET button and insert disk #1 in drive A and disk  #2 
in  drive  B.  Press  RETURN, and  start  your  modifications  as 
follows:

A>SYSGEN<R>
SYSGEN VER 2.0 MD1.2
SOURCE DRIVE NAME (OR RETURN TO SKIP) A
SOURCE ON A, THEN TYPE RETURN<R>
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)<R>
A>SAVE 48 CPM0.COM<R>

NOTES:  (1) The Dynamic Debugging Tool, DDT, will be used in  the 
following  procedures  to find necessary addresses  and  to  make 
program  changes.  You'll notice that  DDT uses  "-" as a  prompt 
just as the CP/M system uses "A>". (2) When entering data, nearly 
all  characters  that  look like "zeroes" or "o's"  are  in  fact 
zeroes.   The only "o's" ever entered are in the words "COM"  and 
"FORMAT".
.pa
FIND THE DPB (Disk Parameter Block) TABLE:

A>DDT<R>
DDT VERS 2.2                
-A100<R>                             Work table:
0100 MVI C,1F<R>         --------------------------------------- 
0102 CALL 5<R>          | GG=       NN=        PPPP=            | 
0105 RST 7<R>            --------------------------------------- 
0106 <R>                | KK=       JJ=        KKJJ=            | 
-G100<R>                 --------------------------------------- 
*0105                   | LL=       MM=        LLMM=            | 
-X<R>                    --------------------------------------- 
                               
After  you  complete  these instructions, you  will  see  a  line 
containing  a number of characters, one of which will be  H=GGJJ. 
Write down GG and JJ in the work table. Substitute the characters 
for GG in the following procedure:

-HGG,CF<R>
xxxx 00KK 
-^C

Write down KK in your table. Then write down the combination KKJJ
{This is the address of DPB.}

FIND THE MTAB (Motor TABle):

A>DDT CPM0.COM<R>
DDT VERS 2.2
NEXT PC
3100 0100
-S2344<R>     
2344 MM<R>   
2345 NN.<R>

Write  down MM and NN in the table.  {MM is the low byte  of  the 
MTAB  address,  and  NN is the high byte of  the  MTAB  address.} 
Substitute the characters for NN in the following procedure. 

-HNN,CF<R>
xxxx 00LL

Write down LL. {This is the "high byte of MTAB address in  SYSGEN 
image".} Write down the combination LLMM in your table. {This  is 
the MTAB address in SYSGEN image.}  Substitute the characters for 
LLMM in the following procedure:

-HLLMM,9<R>
PPPP xxxx

Write down PPPP in the table. {This is the "MTAB drive B: address 
in  SYSGEN  image".}

ALTER MTAB FOR DRIVE B:
Alter  the  MTAB  to allow drive B to  operate  as a double-sided 
drive.

-SPPPP<R>
PPPP 02 22<R>
xxxx xx .<R>

ALTER SYSGEN.COM:
Alter  SYSGEN.COM  so  that it will not care  whether  your  disk 
drives are single-sided or double-sided. 

-S389<R>
0389 C2 0<R>
038A B8 0<R>
038B 03 0<R>
038C dd.<R>  
-^C

SAVE YOUR FIRST MODIFICATIONS:
You will now save the modifications made to CPM0.COM as CPM1.COM. 

A>SAVE 48 CPM1.COM<R>
A>CPM1<R>
SYSGEN VER 2.0 MD1.2
SOURCE DRIVE NAME (OR RETURN TO SKIP) <R>
DESTINATION DRIVE NAME (OR RETURN TO REBOOT) A<R>
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <R>
A>

FORMATTING DISK #2:
The changes you have made so far and saved in  CPM1.COM will  now 
allow you to format a DSDD disk.

Press  the  RESET  button on your Microdecision  and  then  press 
RETURN.  {You should see the usual messages, followed by the CP/M 
prompt.   This procedure is sometimes called a "cold boot".   You 
will perform a "cold boot" several times before you're finished.}

In response to the system prompt, A>, type FORMAT<R>. {You should 
see the usual message from FORMAT asking you to enter the name of 
a  drive.}   Enter B.  You should see a new message,  "Single  or 
Double  sided format (S or D)".  Enter D<R>.  79 tracks will  now 
be  formatted  and verified. If the 79 tracks  were  successfully 
formatted,  press  <R> after the "Formatting  done"  message  and 
continue  with  the program changes. If not, recheck  your  work, 
and/or get help. 

NOTE:  You will be using DDT extensively in the next  four  major 
steps.  If you make an error, type .<R>, then S followed  by  the 
four-digit line number you wish to correct.

MODIFY BTAB (Boot TABle):
Modify  the  BTAB in CPM1.COM using DDT and the  "S"  command  as 
follows:

A>DDT CPM1.COM<R>
DDT VERS 2.2
NEXT  PC
3100  0100

-S980<R>   {BTAB is universally located at 0980.}

0980 01 21<R>          0989 28   <R>          0992 C0 E0<R>                       
0981 D8 DC<R>          098A 00   <R>          0993 00   <R>
0982 58 7D<R>          098B 04   <R>          0994 20 30<R>
0983 05 04<R>          098C 0F   <R>          0995 00   <R>
0984 6F AF<R>          098D 01   <R>          0996 02   <R>
0985 03   <R>          098E 5E C2<R>          0997 00   <R>
0986 05   <R>          098F 00   <R>          0998 EF 43<R>
0987 1C   <R>          0990 7F BF<R>          0999 xx  .<R>
0988 FF   <R>          0991 00   <R>          -

{Note  that a period was entered prior to the last <R> to  return 
to the DDT prompt "-".}

MODIFY DPB (Disk Parameter Block):
Patch  the DPB portion of CPM1.COM using DDT and the "S"  command 
again.   Start by substituting the value for KKJJ that you  wrote 
down  earlier.   Alter  15 bytes as shown in  the  first  column, 
continue through the remaining four columns, reading from top  to 
bottom.  As always, disregard whatever value appears for xxxx.

-SKKJJ<R>
KKJJ 28   <R>     28   <R>     28   <R>     28   <R>     28   <R>
xxxx 00   <R>     00   <R>     00   <R>     00   <R>     00   <R>
xxxx 04   <R>     04   <R>     04   <R>     04   <R>     04   <R>
xxxx 0F   <R>     0F   <R>     0F   <R>     0F   <R>     0F   <R>
xxxx 01   <R>     01   <R>     01   <R>     01   <R>     01   <R>
xxxx 5E C2<R>     5E C2<R>     5E C2<R>     5E C2<R>     5E C2<R>
xxxx 00   <R>     00   <R>     00   <R>     00   <R>     00   <R>
xxxx 7F BF<R>     7F BF<R>     7F BF<R>     7F BF<R>     7F BF<R>
xxxx 00   <R>     00   <R>     00   <R>     00   <R>     00   <R>
xxxx C0 E0<R>     C0 E0<R>     C0 E0<R>     C0 E0<R>     C0 E0<R>
xxxx 00   <R>     00   <R>     00   <R>     00   <R>     00   <R>
xxxx 20 30<R>     20 30<R>     20 30<R>     20 30<R>     20 30<R>
xxxx 00   <R>     00   <R>     00   <R>     00   <R>     00   <R>
xxxx 02   <R>     02   <R>     02   <R>     02   <R>     02   <R>
xxxx 00   <R>     00   <R>     00   <R>     00   <R>     00  .<R>

{Note  that a period was entered before the last <R>.}


MODIFY MTAB (Motor TABle):
Using the characters LLMM from your table, alter the MTAB.

-SLLMM<R>
LLMM 01 21<R>     22   <R>     01 21<R>     01 21<R>     01 21<R>
xxxx D8 DC<R>     59 5D<R>     D8 DC<R>     D8 DC<R>     D8 DC<R>
xxxx 58 7D<R>     58 7D<R>     58 7D<R>     58 7D<R>     58 7D<R>
xxxx 05 04<R>     05 04<R>     05 04<R>     05 04<R>     05 04<R>
xxxx 6F DF<R>     6F DF<R>     6F DF<R>     6F DF<R>     6F DF<R>
xxxx 03   <R>     03   <R>     03   <R>     03   <R>     03   <R>
xxxx 05   <R>     05   <R>     05   <R>     05   <R>     05   <R>
xxxx 1C   <R>     1C   <R>     1C   <R>     1C   <R>     1C   <R>
xxxx FF   <R>     FF   <R>     FF   <R>     FF   <R>     FF  .<R>

{Note that a period was entered before the last <R>.}



CHANGE THE LOG-ON MESSAGE:
This patch to your new system disk will change the message  which 
appears  after  each  cold boot from  "Single  Sided  System"  to 
"Double-Sided MD2 System".

-S2DA1<R>                       
2DA1 2A 20<R>                   2DAE 65 20<R>   { }
2DA2 2A 44<R>   {D}             2DAF 64 4D<R>   {M}
2DA3 20 6F<R>   {o}             2DB0 20 44<R>   {D}
2DA4 53 75<R>   {u}             2DB1 53 32<R>   {2}
2DA5 69 62<R>   {b}             2DB2 79 20<R>   { }
2DA6 6E 6C<R>   {l}             2DB3 73 53<R>   {S}
2DA7 67 65<R>   {e}             2DB4 74 79<R>   {y}
2DA8 6C 2D<R>   {-}             2DB5 65 73<R>   {s}
2DA9 65 53<R>   {s}             2DB6 6D 74<R>   {t}
2DNN 20 69<R>   {i}             2DB7 20 65<R>   {e}
2DAB 53 64<R>   {d}             2DB8 2A 6D<R>   {m}
2DAC 69 65<R>   {e}             2DB9 2A 20<R>   { }
2DAD 64 64<R>   {d}             2DBA xx ^C         

SAVE THE NEW CP/M:
You will now save the changes you have made by entering:

A>SAVE 48 CPM64D.COM<R>

{Note  we  have used the "D" in CPM64D.COM to stand  for  double-
sided configuration.}

MAKE NEW SYSTEM DISK:  
With  disk  #2 in drive B, put the double-sided system on  it  by 
doing the following:

A>CPM64D<R>
SYSGEN VER 2.0 MD1.2
SOURCE DRIVE NAME (OR RETURN TO SKIP)<R>
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)B
DESTINATION ON B, THEN TYPE RETURN<R>
FUNCTION COMPLETE
DESTINATION DRIVE NAME (OR RETURN TO REBOOT)<R>
A>

Place  disk #2 (presently in drive B) into drive A and perform  a 
cold  boot.  You should see "Double-sided MD2 System"  after  the 
copyright notice.

Insert  disk #1 into drive A and disk #2 into drive B. Perform  a 
cold boot. 

Copy files to disk #2, your new system disk, as follows:

A>PIP B:=A:*.*[V0]<R>

Now label disk #2 (from drive B) "DOUBLE-SIDED CP/M SYSTEM".  You 
are now through with disk #1.

CHECK YOUR NEW DOUBLE-SIDED CP/M SYSTEM DISK:

Put disk #2 into drive A and perform cold boot.  

A>DIR<R>   You should see the familiar listing of files.

A>STAT:*.*<R>    You  should see the usual  listing  of  records, 
bytes,  etc.  "Bytes remaining" on the last line should  be  162K 
greater than what you started with on disk #1.

Now  you  can "clean up" your new disk  by erasing  CPM0.COM  and 
CPM1.COM:

A>ERA CPM0.COM<R>
A>ERA CPM1.COM<R>

Make a back-up copy of your new DSDD system disk, and you are all 
through.