Applied all relevant PCem commits;
Extensively cleaned up and changed the CD-ROM code; Removed CD-ROM IOCTTL (it was causing performance and stability issues); Turned a lot of things into device_t's; Added the PS/1 Model 2011 XTA and standalone XTA hard disk controllers, ported from Varcem; Numerous FDC fixes for the PS/1 Model 2121; NVR changes ported from Varcem; The PCap code no longer requires libpcap to be compiled; Numerous fixes to various SCSI controllers; Updated NukedOPL to 1.8; Fixes to OpenAL initialization and closing, should give less Audio issues now; Revorked parts of the common (S)VGA code (also based on code from QEMU); Removed the Removable SCSI hard disks (they were a never finished experiment so there was no need to keep them there); Cleaned up the SCSI hard disk and Iomega ZIP code (but more cleanups of that are coming in the future); In some occasions (IDE hard disks in multiple sector mode and SCSI hard disks) the status bar icon is no longer updated, should improve performance a bit; Redid the way the tertiary and quaternary IDE controllers are configured (and they are now device_t's); Extensively reworked the IDE code and fixed quite a few bugs; Fixes to XT MFM, AT MFM, and AT ESDI code; Some changes to XTIDE and MCA ESDI code; Some fixes to the CD-ROM image handler.
This commit is contained in:
12
src/pit.c
12
src/pit.c
@@ -39,6 +39,12 @@ float VGACONST1,
|
||||
float RTCCONST;
|
||||
|
||||
int64_t firsttime=1;
|
||||
void setrtcconst(float clock)
|
||||
{
|
||||
RTCCONST=clock/32768.0;
|
||||
TIMER_USEC = (int64_t)((clock / 1000000.0f) * (float)(1 << TIMER_SHIFT));
|
||||
}
|
||||
|
||||
void setpitclock(float clock)
|
||||
{
|
||||
cpuclock=clock;
|
||||
@@ -52,8 +58,8 @@ void setpitclock(float clock)
|
||||
video_update_timing();
|
||||
|
||||
xt_cpu_multi = (int64_t)((14318184.0*(double)(1 << TIMER_SHIFT)) / (double)machines[machine].cpu[cpu_manufacturer].cpus[cpu_effective].rspeed);
|
||||
RTCCONST=clock/32768.0;
|
||||
TIMER_USEC = (int64_t)((clock / 1000000.0f) * (float)(1 << TIMER_SHIFT));
|
||||
/* RTCCONST=clock/32768.0;
|
||||
TIMER_USEC = (int64_t)((clock / 1000000.0f) * (float)(1 << TIMER_SHIFT)); */
|
||||
device_speed_changed();
|
||||
}
|
||||
|
||||
@@ -336,7 +342,6 @@ void pit_write(uint16_t addr, uint8_t val, void *p)
|
||||
{
|
||||
PIT *pit = (PIT *)p;
|
||||
int t;
|
||||
cycles -= (int)PITCONST;
|
||||
|
||||
switch (addr&3)
|
||||
{
|
||||
@@ -444,7 +449,6 @@ uint8_t pit_read(uint16_t addr, void *p)
|
||||
PIT *pit = (PIT *)p;
|
||||
int64_t t;
|
||||
uint8_t temp = 0xff;
|
||||
cycles -= (int)PITCONST;
|
||||
switch (addr&3)
|
||||
{
|
||||
case 0: case 1: case 2: /*Timers*/
|
||||
|
||||
Reference in New Issue
Block a user