Added PS/1 model 2011 emulation.
This commit is contained in:
parent
0bf3e231e5
commit
9f09e9c370
13 changed files with 320 additions and 71 deletions
17
src/fdc.c
17
src/fdc.c
|
|
@ -38,6 +38,8 @@ typedef struct FDC
|
|||
|
||||
int data_ready;
|
||||
int inread;
|
||||
|
||||
int dskchg_activelow;
|
||||
} FDC;
|
||||
|
||||
static FDC fdc;
|
||||
|
|
@ -374,7 +376,12 @@ uint8_t fdc_read(uint16_t addr, void *priv)
|
|||
switch (addr&7)
|
||||
{
|
||||
case 1: /*???*/
|
||||
temp=0x50;
|
||||
// temp=0x50;
|
||||
temp = 0x70;
|
||||
if (fdc.dor & 1)
|
||||
temp &= ~0x40;
|
||||
else
|
||||
temp &= ~0x20;
|
||||
break;
|
||||
case 3:
|
||||
temp = 0x20;
|
||||
|
|
@ -426,7 +433,7 @@ uint8_t fdc_read(uint16_t addr, void *priv)
|
|||
temp = (disc_changed[fdc.dor & 1] || drive_empty[fdc.dor & 1])?0x80:0;
|
||||
else
|
||||
temp = 0;
|
||||
if (AMSTRADIO) /*PC2086/3086 seem to reverse this bit*/
|
||||
if (fdc.dskchg_activelow) /*PC2086/3086 seem to reverse this bit*/
|
||||
temp ^= 0x80;
|
||||
// printf("- DC %i %02X %02X %i %i - ",fdc.dor & 1, fdc.dor, 0x10 << (fdc.dor & 1), discchanged[fdc.dor & 1], driveempty[fdc.dor & 1]);
|
||||
// discchanged[fdc.dor&1]=0;
|
||||
|
|
@ -942,6 +949,7 @@ void fdc_indexpulse()
|
|||
void fdc_init()
|
||||
{
|
||||
timer_add(fdc_callback, &disctime, &disctime, NULL);
|
||||
fdc.dskchg_activelow = 0;
|
||||
}
|
||||
|
||||
void fdc_add()
|
||||
|
|
@ -968,3 +976,8 @@ void fdc_discchange_clear(int drive)
|
|||
{
|
||||
disc_changed[drive] = 0;
|
||||
}
|
||||
|
||||
void fdc_set_dskchg_activelow()
|
||||
{
|
||||
fdc.dskchg_activelow = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue