C128 BDOS question -- Faster CP/M???

C128 BDOS question -- Faster CP/M???

Post by d.. » Sun, 05 Jan 1992 21:03:46



  I was recently llooking through the source code of the BDOS for the C128 CP/M
and noticed that they had an option for use$fast -- apparently to speed up the
Z80 into 4 mhz mode from 2 mhz by toggling the clock speed at the appropriate
points (ie: the clock speed can't be 4mhz when switching processors and a
couple of other similair situations).  However, IT DOESN'T WORK.  I changed the
equate to true (file cxequ.lib). And recompiled the whole thing (talk about
growing old) and no go.
   Any suggestions?  If CP/M on the 128 ran twice as fast I might start using
it more than I do now...

- Craig Taylor

 
 
 

C128 BDOS question -- Faster CP/M???

Post by Kent SULLIV » Mon, 06 Jan 1992 03:57:59



>  I was recently llooking through the source code of the BDOS for the C128 CP/M
>and noticed that they had an option for use$fast -- apparently to speed up the
>Z80 into 4 mhz mode from 2 mhz by toggling the clock speed at the appropriate
>points (ie: the clock speed can't be 4mhz when switching processors and a
>couple of other similair situations).  However, IT DOESN'T WORK.  I changed the
>equate to true (file cxequ.lib). And recompiled the whole thing (talk about
>growing old) and no go.

Let's see if I can get this right... $usefast basically shuts off the 40-col.
display by turning off the VIC chip that drives it.  It does NOT change the
speed at which the Z80 runs.  Unlike the other processor in the C-128, the
8502, there is no way to change the speed of the Z80 through software.

I think that possibly $usefast = true also puts the 8502 into 2 Mhz. mode, so
that the times when it is turned on things run faster.  Of course, much of the
time when it is on, I/O is being done (like to the disk), which means things
are stepped down to 1 Mhz. again.

You can check this by recompiling with it set to true then looking at the 40
col. screen.  If it's blank (a solid color, no text) then that's what's going
on.  Shutting of the VIC gives you some speed increase because the VIC steals
cycles to get its refresh.

I believe the Z80 is actually running at 4 Mhz. but that the architecture of
the computer is such that it only runs for a fraction of each second.  The
rest of the time is given to other chips in the computer.   So the _effective_
rate is 2 Mhz.
--

The opinions expressed in this article are my own and do not necessarily
reflect those of my employer.

 
 
 

C128 BDOS question -- Faster CP/M???

Post by d.. » Mon, 06 Jan 1992 15:06:16




>>  I was recently llooking through the source code of the BDOS for the C128 CP/M
>>and noticed that they had an option for use$fast -- apparently to speed up the
>>Z80 into 4 mhz mode from 2 mhz by toggling the clock speed at the appropriate
>>points (ie: the clock speed can't be 4mhz when switching processors and a
>>couple of other similair situations).  However, IT DOESN'T WORK.  I changed the
>>equate to true (file cxequ.lib). And recompiled the whole thing (talk about
>>growing old) and no go.

> [Discussion of use$fast turnning off the 40col screen on bootup]

> I think that possibly $usefast = true also puts the 8502 into 2 Mhz. mode, so
> that the times when it is turned on things run faster.  Of course, much of the
> time when it is on, I/O is being done (like to the disk), which means things
> are stepped down to 1 Mhz. again.

> [Discussion of way to check if 40col screen is being turned off on bootup]

  Nope, The 40col screen is not affected by booting CP/M after compiling it
with use$fast.  The code that I've looked at (briefly - I like 6502 better)
looked like it was saving the system speed (at 53296 regular 128 mode -- 4get
the hex address) and toggling to 1mhz mode and then doing the opposite after
some section of code.  However, apparently the system speed is never set to 2/4
mhz and so useless swapping is done.  I tried adding in a set routine but it
bombed right before it gave me the command prompt.

Quote:

> I believe the Z80 is actually running at 4 Mhz. but that the architecture of
> the computer is such that it only runs for a fraction of each second.  The
> rest of the time is given to other chips in the computer.   So the _effective_
> rate is 2 Mhz.

  Okay, (After checking the C128 programmer's reference guide). The C128 gets
its 4mhz clock from the VIC chip during AEC low (in other words, it's working
1/2 the time) .... Now, my question is why is use$fast in there???
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

               {Note crosspost to comp.os.cbm}

> --

> The opinions expressed in this article are my own and do not necessarily
> reflect those of my employer.

- Craig Taylor

 
 
 

1. a cp/m BDOS question

I'm trying to write so code that accepts an ambiguous file specifier
then for each matched file do something with it.

My code creates an anbiguous FCB (not at 5CH) and then calls BDOS function
17 (dec) Search for First dir. entry, creates a new second FCB for the
found file and then processes the file. The code then loops
on BDOS function 18 (dec) Search for next, doing the same with each
returned directory entry.

If my program simply displays the name of the file returned, all is well
and I have a simple 'DIR' program. However if the program does any disk
access to the file then the search next function seems to repeatedly
return the first entry - it never moves on. Is this a known BDOS
problem ? Do I have to loop and preserve the returned file details,
and use the list to do the processing after the directory has been
scanned 'without interuption'?

Jim Jackson

2. Invalid File Associations

3. C128 CP/M, CP/M upgrades

4. Running a HP9000/7xx as a DTC-Server

5. CP/M BDOS to Disk Operations on website

6. FS: 2 (two) Indy R4600 units.

7. CP/M BDOS to Disk Operations Part III

8. Full Harddrive Setup 4 A2000 - $100

9. CP/M BDOS to Disk Operations Updated Part IV

10. CP/M BDOS to Disk Operations Part IV

11. CP/M BDOS to Disk Operations in TXT mode

12. CP/M BDOS to Disk Operations PART II

13. CP/M BDOS to Disk Operations