PCem

changeset 107:0202ec1f468e

Bodged PIT reads slightly, fixed Lotus III hangs.
author TomW
date Sun Jun 08 15:53:09 2014 +0100
parents af02d3d16c98
children 5c0964dd09f0
files src/pit.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/pit.c	Sun Jun 08 13:45:26 2014 +0100
     1.2 +++ b/src/pit.c	Sun Jun 08 15:53:09 2014 +0100
     1.3 @@ -252,7 +252,7 @@
     1.4  //        pclog("pit_read_timer: t=%i using_timer=%i m=%i\n", t, pit.using_timer[t], pit.m[t]);
     1.5          if (pit.using_timer[t])
     1.6          {
     1.7 -                int read = pit.c[t] / PITCONST;
     1.8 +                int read = (pit.c[t] / PITCONST) - 1;
     1.9                  if (pit.m[t] == 2)
    1.10                          read++;
    1.11                  if (read < 0)
    1.12 @@ -274,6 +274,7 @@
    1.13          int t;
    1.14          cycles -= (int)PITCONST;
    1.15  //        if (val != 0x40) pclog("Write PIT %04X %02X %04X:%08X %i %i\n",addr,val,CS,pc,ins, pit.gate[0]);
    1.16 +        
    1.17          switch (addr&3)
    1.18          {
    1.19                  case 3: /*CTRL*/
    1.20 @@ -424,7 +425,7 @@
    1.21                  break;
    1.22          }
    1.23  //        pclog("%02X\n", temp);
    1.24 -//        printf("%02X %i %i %04X:%04X\n",temp,pit.rm[addr&3],pit.wp,cs>>4,pc);
    1.25 +//        printf("%02X %i %i %04X:%04X %i\n",temp,pit.rm[addr&3],pit.wp,cs>>4,pc, ins);
    1.26          return temp;
    1.27  }
    1.28