Force CD-ROM TOC to be loaded on startup, booting from CD-ROM should be more reliable.
This commit is contained in:
parent
6fb56149f9
commit
048d332949
3 changed files with 26 additions and 1 deletions
|
|
@ -477,6 +477,26 @@ static uint32_t ioctl_size()
|
||||||
return last_block;
|
return last_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ioctl_reset()
|
||||||
|
{
|
||||||
|
CDROM_TOC ltoc;
|
||||||
|
int temp;
|
||||||
|
long size;
|
||||||
|
|
||||||
|
if (!cdrom_drive)
|
||||||
|
{
|
||||||
|
tocvalid = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ioctl_open(0);
|
||||||
|
temp = DeviceIoControl(hIOCTL, IOCTL_CDROM_READ_TOC, NULL, 0, <oc, sizeof(ltoc), &size, NULL);
|
||||||
|
ioctl_close();
|
||||||
|
|
||||||
|
toc = ltoc;
|
||||||
|
tocvalid = 1;
|
||||||
|
}
|
||||||
|
|
||||||
int ioctl_open(char d)
|
int ioctl_open(char d)
|
||||||
{
|
{
|
||||||
// char s[8];
|
// char s[8];
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@
|
||||||
various platform specific cdrom-ioctl files */
|
various platform specific cdrom-ioctl files */
|
||||||
|
|
||||||
extern int ioctl_open(char d);
|
extern int ioctl_open(char d);
|
||||||
|
extern void ioctl_reset();
|
||||||
|
|
||||||
#endif /* ! CDROM_IOCTL_H */
|
#endif /* ! CDROM_IOCTL_H */
|
||||||
|
|
|
||||||
4
src/pc.c
4
src/pc.c
|
|
@ -245,6 +245,8 @@ void initpc()
|
||||||
// pclog("Init - CPUID %i %i\n",CPUID,cpuspeed);
|
// pclog("Init - CPUID %i %i\n",CPUID,cpuspeed);
|
||||||
shadowbios=0;
|
shadowbios=0;
|
||||||
voodoo_init();
|
voodoo_init();
|
||||||
|
|
||||||
|
ioctl_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetpc()
|
void resetpc()
|
||||||
|
|
@ -292,6 +294,8 @@ void resetpchard()
|
||||||
keyboard_at_reset();
|
keyboard_at_reset();
|
||||||
|
|
||||||
// output=3;
|
// output=3;
|
||||||
|
|
||||||
|
ioctl_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
char romsets[17][40]={"IBM PC","IBM XT","Generic Turbo XT","Euro PC","Tandy 1000","Amstrad PC1512","Sinclair PC200","Amstrad PC1640","IBM AT","AMI 286 clone","Dell System 200","Misc 286","IBM AT 386","Misc 386","386 clone","486 clone","486 clone 2"};
|
char romsets[17][40]={"IBM PC","IBM XT","Generic Turbo XT","Euro PC","Tandy 1000","Amstrad PC1512","Sinclair PC200","Amstrad PC1640","IBM AT","AMI 286 clone","Dell System 200","Misc 286","IBM AT 386","Misc 386","386 clone","486 clone","486 clone 2"};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue