Re: Overclocking The CPU with software control (hardmod)

Start a work log and update it occasionally with your projects progress
Post Reply
Dark-Show
Curious PSXDEV User
Curious PSXDEV User
Posts: 32
Joined: May 02, 2012

Re: Overclocking The CPU with software control (hardmod)

Post by Dark-Show » May 8th, 2012, 3:57 pm

This is a very experimental mod thats adding too the double clock speed mod posted here: http://kyorune.com/modding/article.php?id=44
I by no means take any credit for the initial overclocking guide.

My plan possibly with a frequency divider circuit, is too have a digital circuit that is connected to an output bus from the psone (serial or parallel). This bus when sent some sort of signal will activate the digital circuit and switch the pins from default to the 64mhz pin. If this works ill make a series of commands to be able to send the bus, and using a few flip-flips ill make a frequency divider circuit capable of a few preset multipliers.

All input is welcome :)

for the preset frequencies I'm thinking of a few or even a single separate oscillator such as this one.
http://www.electronics-tutorials.ws/osc ... pitts.html

Might also start programming by developing a set of CPU/RAM/GPU benchmarking tools for the PSone to go along with this overclocking mod.

Code: Select all

https://www.msu.edu/~mrr/mycomp/bench.htm
Simple Benchmark

Here are the results of a simple benchmark program (shown below) that I have run on a number of computers over time. It's a lousy program--for one thing, it's floating-point intensive, and I don't find floating point performance very interesting. Unfortunately, I can't go back in time with a better benchmark.


Machine             OS and Compiler                 Seconds

Pentium III-866     Win2000 MS C 12.00.8804 cl /Ox      0.218
Gateway G6-P180     NT MS C 11.00.7022 cl /Ox           0.991
Apex Pentium 133    NT MS C 11.00.7022 cl /Ox           1.331
SGI Challenge/L     cc -O3                              1.78
CYBER 2000          NOS/VE 1.8.3; Fortran scalar        1.889
IBM RS/6000-560:    AIX 3.2.3? xlc -O                   2.640
IBM RS/6000-560:    AIX 3.2.3? f77 -O                   3.160
IBM RS/6000-350     AIX 3.2.5 cc -O                     3.60
IBM 3090-180        VM/SP HPO 4.2 opt(3)                5.8   
Compaq ProLi 486/66 NT MS C 11.00.7022 cl /Ox           6.819
VAXstation 4000-60  FORTRAN /OPT                        7.1
Gateway 4DX2-66/V   NT MS For Powerstation 1.0          9.06
AMD64 3200+ DtCyber NOS 2.8.1 FTN OPT=2                 9.698
Sun ELC             f77 -cg89 -O4 pi.f                 12.3
Sun ELC             gcc -O4                            13.6
VAX 8650            VMS 4.5       /opt/check=none      16.5 
CDC 750             Hustler       opt=3                18.0
Gateway 4DX2-66V    NT; DOS For 5.1 fl /AL/FPi87/Ox    20.0
IBM 4381-1          VM/SP R. 4.0  opt(3)               46.5 
MicroVAX II         VMS 4.5       (default)           106.5  
CDC 810             NOS/VE 1.2.1  opt=high            109.8
Sun 3/50            Unix          -O -f68881          140.2 
Please note that the Desktop Cyber software emulator ran faster, on a modern PC, than the original Cyber 750!
FORTRAN Source

Here is the original source to the benchmark program. It was written in FORTRAN because that was the language available on most of the machines I was testing at the time.

      PROGRAM RANPI

c   Program to compute PI by probability.
c   By Mark Riordan  24-DEC-1986; 
c   Original version apparently by Don Shull.
c   To be used as a CPU benchmark.

      write(*,*) 'Starting PI...'      
      ztot = 0.0
      low = 1
      ixran = 1907
      yran = 5813.0
      ymult = 1307.0
      ymod = 5471.0
      itot = 1200000
      DO 100 j=1,itot

c   X and Y are two uniform random numbers between 0 and 1.
c   They are computed using two linear congruential generators.
c   A mix of integer and real arithmetic is used to simulate a
c   real program.  Magnitudes are kept small to prevent 32-bit
c   integer overflow and to allow full precision even with a 23-bit
c   mantissa.

        iprod = 27611 * ixran
        ixran = iprod - 74383*(iprod/74383)
        x = float(ixran) / 74383.0
        prod = ymult * yran
        yran = (prod - ymod*int(prod/ymod))
        y = yran / ymod
        Z = X*x + Y*y
        call myadd(ztot,z)
        IF ( Z .LE. 1.0 ) THEN
          low = low + 1
        ENDIF
100   continue
      write(*,9000) x,y,low,j
9000  format(' x=',f8.5,' y=',f8.5,' low=',i7,' j=',i7)
      Pi = 4.0 * float(low)/float(Itot)
      write(*,*) 'Pi = ',pi,' ztot = ',ztot,' itot = ',itot
      STOP
      END
      subroutine myadd(sum,addend)

c   Simple adding subroutine thrown in to allow subroutine
c   calls/returns to be factored in as part of the benchmark.

      sum = sum + addend
      return
      end
C Source

Here's the same program, hand-translated to C. Most of the more recent machines were run with this version.


/*--- pi.c       PROGRAM RANPI
 *
 *   Program to compute PI by probability.
 *   By Mark Riordan  24-DEC-1986; 
 *   Original version apparently by Don Shull.
 *   To be used as a CPU benchmark.
 *  
 *  Translated to C from FORTRAN 20 Nov 1993
 */
#include <stdio.h>

void
myadd(float *sum,float *addend);

int
main(int argc, char *argv[]) {
   float ztot, yran, ymult, ymod, x, y, z, pi, prod;
   long int low, ixran, itot, j, iprod;

      printf("Starting PI...\n");
      ztot = 0.0;
      low = 1;
      ixran = 1907;
      yran = 5813.0;
      ymult = 1307.0;
      ymod = 5471.0;
      itot = 1200000;

      for(j=1; j<=itot; j++) {

/*
c   X and Y are two uniform random numbers between 0 and 1.
c   They are computed using two linear congruential generators.
c   A mix of integer and real arithmetic is used to simulate a
c   real program.  Magnitudes are kept small to prevent 32-bit
c   integer overflow and to allow full precision even with a 23-bit
c   mantissa.
*/

        iprod = 27611 * ixran;
        ixran = iprod - 74383*(long int)(iprod/74383);
        x = (float)ixran / 74383.0;
        prod = ymult * yran;
        yran = (prod - ymod*(long int)(prod/ymod));
        y = yran / ymod;
        z = x*x + y*y;
        myadd(&ztot,&z);
        if ( z <= 1.0 ) {
          low = low + 1;
        }
      }
      printf(" x=%8.5f y=%8.5f low=%7d j=%7d\n",x,y,low,j);
      pi = 4.0 * (float)low/(float)itot;
      printf("Pi = %9.6f ztot=%12.2f itot=%8d\n",pi,ztot,itot);

      return 0;
}

void
myadd(float *sum,float *addend) {

/*
c   Simple adding subroutine thrown in to allow subroutine
c   calls/returns to be factored in as part of the benchmark.
*/
      *sum = *sum + *addend;
}

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » May 8th, 2012, 5:27 pm

The clock speeds that they mention in the above link, are not correct I believe.

Benchmarking was a feature I was going to add into PSIO OS. This way, users could test their hardware and check its performance. Mainly checking the CD-ROM.

http://nfggames.com/forum2/index.php?topic=3680.0


You would use a h-bridge with an arduino to do the overclock logic. Thats a quick way to do the circuit. lol. Just get the mini Atmega or whatever. You only need 2-3 input/output lines.

You can even reuse my logic. It's all coded and ready to go :D
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

Dark-Show
Curious PSXDEV User
Curious PSXDEV User
Posts: 32
Joined: May 02, 2012

Post by Dark-Show » May 8th, 2012, 6:05 pm

Dont listen to them the voltage of the clock signal should affect they way it works as long as its in spec. The input frequency is tis the key lol and the r3000 is default max 40mhz so anything above this is gods blessing ill be testing stability when i overclock thats why i want to make a bench marker. Also realizing that the max is 40, sony technically underclocks the cpu so pumping in 66mhz isnt exactly a 100% overclock, which probably explains why its stable. Also their were fan mods made on the PSone to increase stability at this overclocked rate, and this fan mod could also be controlled via software as soon as the cpu is overclocked the fan would start.

Dark-Show
Curious PSXDEV User
Curious PSXDEV User
Posts: 32
Joined: May 02, 2012

Post by Dark-Show » May 9th, 2012, 2:23 am

I know a simpler way ahaha with 1 ic and 1npn transistor

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » May 9th, 2012, 6:01 am

Well, I would love to see it. I knew there was an easier way, but I didn't think it would be with only 1 IC. I never thought of using an NPN transistor either.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

Dark-Show
Curious PSXDEV User
Curious PSXDEV User
Posts: 32
Joined: May 02, 2012

Post by Dark-Show » May 9th, 2012, 8:57 am

Im good at doing this stuff aha went too school for it. Im just getting in to programmable controllers and such i learned using discrete components lol

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » May 9th, 2012, 5:49 pm

It is good to not use such a huge and powerful IC for such a small project. Using basic components is the best way :)
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest