1
0
mirror of https://github.com/prirun/p50em.git synced 2026-01-11 23:42:56 +00:00

allow demo emulator to access 2 drives

This commit is contained in:
Jim 2019-07-04 11:47:24 -04:00
parent ebd8a8a3fa
commit 3dbd7630fb
2 changed files with 16 additions and 6 deletions

20
emdev.h
View File

@ -1,10 +1,20 @@
/* this is for testing what happens if gettimeofday is overridden */
/* this is to test what happens when gettimeofday is overridden. On
an idle machine, a little more than one second ticks every hour.
The dongle is still required but it does allow the emulator to run
w/o a license. However there are several bad time-related
side-effects. The worst seems to be that timeslicing doesn't work,
so a CPU-bound job more-or-less locks up the machine.
*/
#if 0
int gettimeofday(struct timeval *tv, struct timezone *tz) {
int ctr = 0;
int gettimeofday(struct timeval *tv, void *tz) {
tv->tv_sec = 0;
tv->tv_sec = 1342600000;
tv->tv_usec = 0;
tv->tv_sec = 1342600000 + ctr/1000000;
tv->tv_usec = ctr % 1000000;
ctr++;
if (ctr % 1000000 == 0) printf("%d\n", ctr);
return 0;
}
#endif
@ -2129,8 +2139,8 @@ int devdisk (int class, int func, int device) {
break;
}
if (u == 1) u = 0;
#ifndef DEMO
else if (u == 2) u = 1;
#ifndef DEMO
else if (u == 4) u = 2;
else if (u == 8) u = 3;
else if (u == 16) u = 4;

2
geom.h
View File

@ -1,7 +1,7 @@
/* static structure for disk file suffixes and config data */
#ifdef DEMO
#define MAXDRIVES 1
#define MAXDRIVES 2
#define MAXCTRL 1 /* 1 controller supported at device address '26 */
#define NUMGEOM 7