Looking for ABP12.COM

Post your CP/M & TDOS questions here
User avatar
joltguy
Posts: 91
Joined: Wed Aug 21, 2019 5:17 am
Location: Toronto, Canada
Contact:

Looking for ABP12.COM

Post by joltguy » Tue Jul 07, 2020 12:45 am

In the CP/M 2.2 Workshop section of NIAD Newsletter #36/37 http://www.sacnews.net/adamcomputer/new ... 201988.pdf the author mentions getting a new Orphanware 256K expander. Among the software that came with it was a utility for CP/M called ABP12.COM - Adam BIOS Patch. Coded by Tony Morehen, this tool apparently lets CP/M 2.2 use all of your expansion memory as a RAMdisk that will persist between resets and also adds support for disks larger than the standard 160K.

I’ve checked the archive and also gone through all of the NIAD disks in search of ABP12.COM but have come up empty. Does anybody out there have a copy?

User avatar
Milli
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Looking for ABP12.COM

Post by Milli » Wed Jul 08, 2020 8:50 pm

I believe it’s in one of these archives, I just saw it last weekend

http://adamarchive.org/updates.php?d=07/02/2020
Milli

User avatar
joltguy
Posts: 91
Joined: Wed Aug 21, 2019 5:17 am
Location: Toronto, Canada
Contact:

Re: Looking for ABP12.COM

Post by joltguy » Thu Jul 09, 2020 6:47 am

I had the same thought last night and you're right... there is a file called ABP10.COM in the cpm directory of the archive! I tried it out this morning (in the emulator) and it did patch CP/M successfully but it didn't seem to add support for larger disks as it still can't handle anything other than the 160K.

One minor benefit is that it gave the M: drive 61K instead of the 55K given by the stock Coleco version. I set my emulator up for 256K RAM expansion but the RAM disk remained at 61K so it didn't utilize the extra RAM as I had hoped.

I'm chalking these issues up to my assumption that (based on the ABP10 file name) this is likely version 1.0 of the tool while the one mentioned in the article is ABP12 or version 1.2. It's possible that the storage enhancements were added into the later version.

User avatar
Milli
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Looking for ABP12.COM

Post by Milli » Sat Jul 11, 2020 11:32 am

joltguy wrote:
Thu Jul 09, 2020 6:47 am
I had the same thought last night and you're right... there is a file called ABP10.COM in the cpm directory of the archive! I tried it out this morning (in the emulator) and it did patch CP/M successfully but it didn't seem to add support for larger disks as it still can't handle anything other than the 160K.

One minor benefit is that it gave the M: drive 61K instead of the 55K given by the stock Coleco version. I set my emulator up for 256K RAM expansion but the RAM disk remained at 61K so it didn't utilize the extra RAM as I had hoped.

I'm chalking these issues up to my assumption that (based on the ABP10 file name) this is likely version 1.0 of the tool while the one mentioned in the article is ABP12 or version 1.2. It's possible that the storage enhancements were added into the later version.
Inside the adam disk eproms folder is APB26 which does a lot of patching.

http://adamarchive.org/archive/Adam/Chi ... Eproms.zip

Code: Select all

                         ADAM Bios Patch V2.6

Introduction

The  primary function of the ADAM Bios Patch program  (ABP26.COM) 
is  to  modify  the CP/M system provided by  Coleco  to  properly 
support single-sided, double-sided or any combination of  single- 
and  double-sided  disk drives.  This software will also  set  up 
your  system to fully support the new 3.5" 720K disk drives.  For
example,  you  can make Disk Drive 1 double-sided and  keep  Disk 
Drive 2 single-sided and CP/M will recognize that the two  drives 
are different sizes.  Other available double-sided drive  patches 
do not allow this.

As  a bonus, ABP26.COM makes other changes to the CP/M system  to 
provide support for 2 serial cards (on user selectable I-O ports) 
and for a parallel printer port.  It also fixes several errors in 
the  original  ADAM  bios  and  adds  a  Hex/Decimal/Ascii/Binary 
converter  that  is  available  whenever  the  WildCard  key   is 
presssed.  As well, ABP26.COM provides support for Orphanware  or 
Eve  Electronic's  80  column  display  adapters.  This   support 
includes  provision for SmartKey descriptions on line 25 of a  80 
column  monitor when permitted by the monitor or configuation  of 
the  display  adapter.  Finally, ABP26.COM provides  support  for 
large Ram Disks  similar to the 256K unit supplied by Orphanware.  
Systems  patched  with  ABP26.COM automatically  adjust  for  the 
larger  Ram  Disk so that there is no need to repatch  your  CP/M 
system  if  you upgrade to a larger memory expander  at  a  later 
date.  Because the adjustment is automatic, you will not be asked 
about  the size of your memory expander.  As a by-product of  the 
adjustment  process,  the  effective size  of  the  standard  64K 
expander will be increased from 56K to 61K.

The errors corrected by this program include:
     1)  The contents of the Ram Disk will remain intact  through 
         a Computer Reset though not through a power-down.
     2)  DIR will now report the correct directory whenever disks 
         are changed.
     3)  CP/M's  random  write function will now  work  correctly 
         under  all circumstances.                          
     4)  The  original Bios  had an error that  sometimes  caused 
         damage to the disk directory.  This is now fixed.

Program Requirements

Adam Bios Patch has the following minimum system requirements:

                    One data drive
                and CP/M 2.2 for the Adam.

Of course, if you wish to make full use of the program, a double-
sided  drive  such as those sold by In-House Service Reps  or  an 
upgrade to either 320 or 720K by Orphanware or Eve Electronics is 
highly desirable.

Backing Up Adam Bios Patch

It  is strongly recommended that you create at least  two  backup 
copies  of Adam Bios Patch before attempting to use the  program.  
one  of the copies will be your working copy of  ABP26.COM  while 
the  other  will be your primary backup copy.   The  distribution 
disk  should not be used again unless some disaster destroys  the 
working and the primary backup copies.

Adam  Bios  Patch is not copy-protected so making a backup  is  a 
relatively simple procedure.  Use PIP.COM or COPY.COM to copy the
ABP26.COM  to two CP/M formatted disks that have at least  6K  of 
free space available.  STAT.COM can be used to verify that 8K  is 
available on the destination disk.

Examples:

     A>PIP C:ABP26.COM=A:ABP26.COM<return>
       or A>COPY A:ABP26.COM C:<return>

The  two examples copy ABP26.COM from drive A to drive  C.   When 
the two backup copies are made, put the distribution disk away in 
a safe location.

Using ADAM Bios Patch

Insert  your working copy of ADAM Bios Patch in  the  appropriate 
drive and at the CP/M command prompt, run the program as follows:

     A>ABP26 <return>

Once the program is loaded, the screen will clear and you will be 
asked for the drive to be patched.  You can either respond with a 
drive  designation,  A to D, or you can respond Z for  no  drive.  
The latter choice is used when you just want to patch the  system 
that  is  already  in  memory,  for  example,  if  you  want   to 
temporarily  reconfigure  a double-sided drive  for  single-sided 
operation.

At this point you should remove the ADAM Bios Patch disk and  put 
the  disk  with  the  system that you  intend  to  patch  in  the 
appropriate drive.

Once  you have selected the drive to patch, you will be asked  to 
select  the size of disk drive 1 (Check the switches on the  back 
of your drives to determine which is disk 1 and which is disk 2).  
Note that the sizes presented in the menu are the amount of  free 
space available on an empty disk...in other words, the disk  size 
as  reported by programs such as STAT.COM or SD.COM.  The  actual 
physical size of the disk is bigger but the space for the  system 
tracks and directory has been deducted.

The 3 choices are:
     0 - 145K  (no change)
     1 - 254K  (medium-sized double-sided)
     2 - 304K  (full-sized double-sided)
     3 - 720K  (full-sized quad-density)

If  disk drive 1 is single-sided or if you wish to reconfigure  a 
double-sided disk to be a single-sided one, chose option 0.

If  disk drive 1 is double-sided, select options 1 or 2.  A  disk 
drive configured according to option 1 can read from or write  to 
conventional  ADAM single-sided disks but it does not  make  full 
use  of the double-sided drive.  Option 2 does make full  use  of 
the  double-sided  drive but it cannot read from or  write  to  a 
conventional  ADAM single-sided disk.  Under most  circumstances, 
option  1 should be selected.  Option 2 should be  selected  only 
when you are certain that you will not need to read from or write 
to a standard ADAM disk with the double-sided drive on a  regular 
basis such as when you only own double-sided drives and all  your 
frequently used standard format disks have been converted to  the 
304K  format.  The final option would only be used if you  happen 
to  own  one  of  the new 720K  3.5"  disk  drive  upgrades  from 
Orphanware.   This  option will permit you to use  it  with  your 
other   drives  whether  single  or  double  sided.   The   above 
considerations  regarding inability to access other sized  drives 
unless patched for them still apply.  

Converting  disks  from single-sided to  double-sided  format  is 
simply a matter of copying the files on the single-sided disk  to 
a  double-sided  formatted disk in  an  appropriately  configured 
double-sided  drive.  You must use PIP.COM, COPY.COM  or  another 
file  copy utility such as the public domain  NSWEEP.COM  (highly 
recommended) for the copying process.  Do not use BACKUP.COM.  If 
you  have only one disk drive, you must first copy your files  to 
an  intermediate drive such as your ram disk (M:) or  tape  drive 
with your double-sided drive configured according to options 0 or 
1,  reconfigure  your disk drive to options 1,2 or  3,  and  then 
recopy the files back to the disk drive.

Once the size of disk drive 1 has be selected, you will be  asked 
to select the size of disk drive 2 according to the same  options 
as disk drive 1.  Note the disk drive 2 can be larger or  smaller 
than  disk  drive 1.  The two drives do not have to be  the  same 
size.

The  next two menus permit you to configure the default  settings 
of two serial ports.  Naturally, if you do not have a serial card 
or an 80 column display adapter, these steps can be skipped.

Serial  port 1 is a general purpose port and corresponds  to  the 
CP/M physical device TTY:.  It can be accessed by all of the CP/M 
logical devices (CON:, PUN:, RDR: and LST:).  Serial port 2 is  a 
special purpose port, intended for communication with a  external 
terminal  or  another  80 column display adapter  such  as  those 
supplied by Eve Electronics or Orphanware.  It can be accessed by 
the  logical  devices CON:, PUN: and RDR:, not by  LST:.   Though 
serial  port 2 is intended to be used with a terminal, it can  be 
used with other peripherals such as a modem.  However, it is  not 
recommended for use with a printer since serial port 2 can not be 
accessed as the LST: device.

The serial port menu allows you to set the base port address, the 
baud  rate, parity, number of stop bits, and the number  of  bits 
per  word.  The most important setting is the base port  address.  
All of the commercially available serial cards for the ADAM use 4 
consecutive I-O ports of the ADAM's Z80 microprocessor to control 
the  operation of the serial card.  The base port address is  the 
first  of  those ports.  Check the documentation of  your  serial 
card  for  the  appropriate  setting.   Orphanware  documentation 
refers  to port 44H as port A, 54H as port B, 4CH as port  C  and 
5CH  as  port  D.  44H is the most common  setting  and  is,  for 
example,  used by the Eve SP-1.  If your documentation  does  not 
tell  you what ports the serial card uses and 44H does not  work, 
try  the alternative port settings until the peripheral  attached 
to the serial card gives an indication that the card is  working.  
For example, seeing the DTR indicator on an external modem  light 
up  shows that the serial card is working.  Trying to access  the 
serial  port  through  a  wrong address  will  harm  neither  the 
computer or the serial card.  Do not use port 5CH if you have  an 
AdamLink  modem.  The AdamLink modem also uses this port  and  so 
your  serail  card  should not use that port in  order  to  avoid 
conflicts.

Now  set the baud rate, parity, number of stop bits and bits  per 
word according to the requirements of the peripheral connected to 
the  serial  card (check the peripheral's documentation  for  the 
correct  settings).   You  will likely  find  that  the  settings 
already in effect (1200 baud, no parity, 1 stop bits, and 8  bits 
per word) to be satisfactory.

Repeat this procedure for serial port 2 if required.  Once  again 
check the documentation of your serial card or peripheral for the 
appropriate  settings.  The setings for Serial port 2 (base  port 
54H,  19200 baud, 8 bits per word, 1 stop bit and no parity)  are 
already  setup  to  work with the Orphanware  80  column  display 
adapter.   If you have the Eve version, change the base  port  to 
4CH and the baud rate to 9600. 8 bits per word, 1 stop bit and no 
parity are fine for the Eve 80 column unit.

Once  the two serial ports are configured, you will be  asked  to 
select  the default IOBYTE setting.  The IOBYTE determines  where 
the ADAM gets its inputs from and where it sends its output.  For 
a  more complete description of the IOBYTE please refer  to  your 
CP/M manual.  The following table summarizes the IOBYTE  settings 
as  supported by this patch program.  Note that the  LST:  device 
supports a parallel printer port such as found on the Eve SP-1 or 
Orphanware's PIA-2.





Logical  Physical Device

   Device              Input            Output
-----------------------------------------------------------------

1) Console

   CON:     TTY:      serial port 1   serial port 1
   CON:     CRT:      keyboard        television
   CON:     BAT:      keyboard        serial port 2
   CON:     UL1:      serial port 2   serial port 2

2) Reader

   RDR:     TTY:      serial port 1   n.a.
   RDR:     PTR:      keyboard        n.a.
   RDR:     UR1:      serial port 2   n.a.
   RDR:     UR2:      keyboard        n.a.

3) Punch

   PUN:     TTY:      n.a.            serial port 1
   PUN:     PTP:      n.a.            television
   PUN:     UP1:      n.a.            serial port 2
   PUN:     UP2:      n.a.            television

4) Printer (List device)

   LST:     TTY:      n.a.            serial port 1
   LST:     CRT:      n.a.            television
   LST:     LPT:      n.a.            ADAM printer
   LST:     UL1:      n.a.            parallel printer port
-----------------------------------------------------------------

For  example,  if you have an 80 column display  using  the  ADAM 
keyboard  and a dot matrix printer using the  Orphanware  printer 
port  or the Eve SP-1, set CON: = BAT: and LST: = UL1:.   If  you 
want  to  use  the  ADAM  with  an  external  terminal  including 
keyboard, set CON: = UL1:.  

Next, you will be asked if you wish to display the description of 
your SmartKeys on line 25 of an 80 column monitor.  Only  respond 
yes  if  you have an 80 column display adapter that is set  to  a 
Heath  H19  emulation mode and if your monitor  supports  a  25th 
line;  most but not all do.  Check your documentation.   If  your 
adapter  does not come from the supplier in H19 mode, it  can  be 
generally  reset  through software or DIP switches to  emulate  a 
Heath H19 display.  Also, your 80 column display adapter may have
to  be set to operate in the 50 Hz vertical refresh  mode.   Once 
again check your documentation for specific procedures.

If  you  reply yes, the 25th line will  display  the  appropriate 
SmartKey  number in inverse video, followed by the  10  character 
SmartKey description that was set by CONFIG.COM.  Below you  will 
find an assembly language subroutine that you can include in your 
own   programs  to  provide  custom  SmartKey  descriptions   and 
responses.

Finally, you will be asked if serial port 2 is configured to  run 
an  Eve 80 column display such as the VD-MB.  Only answer yes  if 
you  have an Eve unit set to run off serial port 2.   Other  ADAM 
owners,  including  those  with  the  Orphanware  video   display 
adapter, should answer no.  

After  you have replied to this last prompt, ABP26 will  read  in 
part  of  the system tracks from the selected drive,  modify  the 
system and write the changes back to disk.  The same changes will 
also be made to the system already in memory.  If you replied "Z" 
to  the drive to patch prompt, only the system in memory will  be 
patched.   This allows you to make temporary changes to  try  out 
various features of the patch program.


Hex/Decimal/Ascii/Binary Converter

Once  your  system has been patched, you will  have  a  full-time 
Hex/Decimal/Ascii/Binary converter available to you whenever  the 
computer  is  waiting  for  keyboard  input.   Simply  press  the 
Wildcard  key followed by the appropriate entry and you will  see 
its hex, decimal, ascii and binary equivalents as follows:

     HH  DDD  AA  BBBBBBBB   where
     HH = hex equivalent (0-FF)
     DDD = decimal equivalent (0-255)
     AA  = ascii equivalent (control characters start with  a  "^ 
     and character beyond DEL are highlighted)


1) A hex number is entered by pressing <wildcard> followed by  an 
"h"  or"H"  and a hex number between 0 and 7F. A bad  entry  will 
produce meaningless results but it will not crash the computer.

2)  A  decimal number is entered by pressing <wildcard>  and  any 
decimal number between 0 and 255.

3)  An ascii value is entered by pressing <wildcard> followed  by 
the single quote "'" and the appropriate key. For example, to see 
the equivalents of "M" enter <wildcard>'M<cr>.

4) A binary value is entered by pressing <wildcard> followed by a 
"b"  or "B" and eight 1's and 0's.  All eight binary digits  must 
be  entered  to get a valid response.  For example,  to  see  the 
equivalent of binary 2 enter <wildcard>B00000010<cr>

Note  that  though the program that you interrupted  to  run  the 
conversion doesn't know that it has been interrupted, your screen 
display  has  been affected ie the output of  the  conversion  is 
still  displayed.   For  most programs  this  will  represent  no 
problem since it will just continue where it left off.   However, 
for full screen programs such as word processors, the  conversion 
output  covers up useful information and the cursor is no  longer 
in  the right space.  The cursor can be returned to  its  correct 
place by pressing the cursor right and left keys (in Wordstar  ^D 
and ^S) and the display can be corrected by displaying a new page 
and then returning to the original page.


Additions and Modifications to the BIOS Jump Table

The  following  is a list of the new routines added to  the  BIOS 
jump  table  to support the two serial cards and  the  25th  line 
SmartKey display.

Address      Description
-----------------------------------------------------------------
0DA54H       Write SmartKey descriptions on line 25
             Input - address of new descriptions saved at  memory 
             locations 044/045H
             Output - none

0DA69H       Output to serial port 1
             Input - character to output in register C
             Output - none

0DA6CH       Input from serial port 1
             Input - none
             Output - character in register A

0DA6FH       Status of serial port 1 output
             Input - none
             Output  - 0FFH in register A if ready to send  0  if 
             not ready

0DA72H       Status of serial port 1 input
             Input - none
             Output - 0FFH in register A if character ready 0  if 
             none ready
  
0DA75H       Initialize serial ports 1 and 2
             Input - none
             Output - none

0DA78H       Output to serial port 2
             Input - character to output in register C
             Output - none

0DA7BH       Input from serial port 2
             Input - none
             Output - character in register A

0DA7EH       Status of serial port 2 output
             Input - none
             Output - 0FFH in register A if ready to send
             0 if not ready

0DA81H       Status of serial port 2 input
             Input - none
             Output - 0FFH in register A if character ready
             0 if none ready
         ______________________________________________________________

Note:  the  serial port input and output routines  wait  until  a 
character is received or sent before returning to the controlling 
program.   To prevent your program from hanging, use  the  status 
routines to check to see if the serial port is ready.


Example Subroutine to Set Custom SmartKey Values

;The ADAM BIOS stores pointers to the SmartKey descriptions 
;  (what you see in your display) and the SmartKey values
;  (what happens when you press a SmartKey) in two locations
;  in page 0. Changing those pointers to ones pointing to 
;  your own descriptions and values allows you to put custom
;  SmartKey displays in your own program.  This subroutine
;  makes use of those pointers and the new BIOS routine to
;  set up a custom SmartKey display on line 25.
 
SmtOn:	LXI	H,smartkey  ;get the pointer to the new smartkey 
;  descriptions
SHLD	44H		;put it in page 0
LXI	H,smartvalue	;get the pointer to the smartkey values
SHLD	42H		;put that in page zero
CALL	0DA54H		;call the new BIOS routine
RET			;return to calling program
	 
;This subroutine restores the system smartkeys 

SysSmt:LXIH ,0DC9DH     ;pointer to system SmartKey descriptions
SHLD 4H		;put in page 0
LXI	H,0DCD9		;pointer to system SmartKey values
SHLD	43H		;in page 0
CALL	0DA54H		;call new BIOS routine
RET			;return to caller
	 
;custom SmartKey descriptions (fill in your own values)
	 
smartkey:
DB	'1234567890'	;SmartKey 1 (10 characters long - must
;  be space filled)
DB	'1234567890'	;2
DB	'1234567890'	;3
DB	'1234567890'	;4
DB	'1234567890'	;5
DB	'1234567890'	;6	

;custom SmartKey values
	 
smartvalue:
DB	'123456789abcdef' ;SmartKey 1 (16 characters - include
;the hex value for carriage return
;0DH as the last character in the 
;return string only if you want the
;command to be executed immediately
;- fill any leftover space with hex 0
DB	'123456789abcdef' ;2
DB	'123456789abcdef' ;3
DB	'123456789abcdef' ;4
DB	'123456789abcdef' ;5
DB	'123456789abcdef' ;6
	 
;to turn on and off line 25, refer to your display adapter's
;documentation. The standard ADAM procedure will not work.
Milli

User avatar
joltguy
Posts: 91
Joined: Wed Aug 21, 2019 5:17 am
Location: Toronto, Canada
Contact:

Re: Looking for ABP12.COM

Post by joltguy » Mon Jul 13, 2020 11:27 am

:o :!: Milli, you are AWESOME!!

Seriously man, great find! Thank you! If this works as expected it is going to make using CP/M so much more enjoyable.

User avatar
Milli
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Looking for ABP12.COM

Post by Milli » Mon Jul 13, 2020 6:12 pm

Let’s know how it works - what drives do you have?
Milli

User avatar
joltguy
Posts: 91
Joined: Wed Aug 21, 2019 5:17 am
Location: Toronto, Canada
Contact:

Re: Looking for ABP12.COM

Post by joltguy » Tue Jul 14, 2020 12:08 am

I only got a chance to try it on the emulator today. Weird thing is that ABP26.com seemed to freeze up the system when trying to access the RAMdisk if the expanded memory was set to more than 128K. Luckily, the archive you pointed me to also contained ABP25.com and this version did not have the same issue. With 256K expansion memory configured, CP/M had access to a 246K RAM disk. Very nice!

On my actual ADAM I have 2 data pack drives and an ADE Lite drive... no actual floppy drive. Being able to access 720K disk images via the ADEL will definitely be helpful as will the more spacious RAM disk (I have a 256K expander in my ADAM).

One odd behaviour I noticed with both ABP25 and 26 was that if I tried to access the tape drive and the secondary disk drive in the same session I would get device errors. Like it would read the disk properly for a DIRectory listing but then would fail if I tried to copy files from one drive to the other. Again, I haven't tried it yet on the real ADAM so we'll see how it goes. It's not a deal breaker anyway as I'd rarely use the tape drive in CP/M.

Still really stoked to have this setup though. I've got a 720K CP/M 2.2 boot disk with lots of room left for utilities and I can mount a 720K data disk for my work. I don't have a hard drive, so this is a pretty good arrangement for me!

User avatar
Milli
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Looking for ABP12.COM

Post by Milli » Wed Jul 15, 2020 2:09 pm

Did you try to get a copy of NEWCCP working?
Milli

User avatar
joltguy
Posts: 91
Joined: Wed Aug 21, 2019 5:17 am
Location: Toronto, Canada
Contact:

Re: Looking for ABP12.COM

Post by joltguy » Wed Jul 15, 2020 4:28 pm

Milli wrote:
Wed Jul 15, 2020 2:09 pm
Did you try to get a copy of NEWCCP working?
No, I haven't tried that yet. Have you?

User avatar
Milli
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Looking for ABP12.COM

Post by Milli » Wed Jul 15, 2020 5:09 pm

joltguy wrote:
Wed Jul 15, 2020 4:28 pm
Milli wrote:
Wed Jul 15, 2020 2:09 pm
Did you try to get a copy of NEWCCP working?
No, I haven't tried that yet. Have you?
I'm trying to figure it out - the instructions are not very good - will see what I can do
Milli

Post Reply