Added Power on Setup register (46e8) for OAK OTI-067 - no longer goes to monochrome after reset.
This commit is contained in:
parent
05de040433
commit
4b2eb2e252
1 changed files with 26 additions and 1 deletions
|
|
@ -18,6 +18,8 @@ typedef struct oti067_t
|
||||||
int index;
|
int index;
|
||||||
uint8_t regs[32];
|
uint8_t regs[32];
|
||||||
|
|
||||||
|
uint8_t pos;
|
||||||
|
|
||||||
uint32_t vram_size;
|
uint32_t vram_size;
|
||||||
uint32_t vram_mask;
|
uint32_t vram_mask;
|
||||||
} oti067_t;
|
} oti067_t;
|
||||||
|
|
@ -115,6 +117,28 @@ uint8_t oti067_in(uint16_t addr, void *p)
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void oti067_pos_out(uint16_t addr, uint8_t val, void *p)
|
||||||
|
{
|
||||||
|
oti067_t *oti067 = (oti067_t *)p;
|
||||||
|
|
||||||
|
if ((val & 8) != (oti067->pos & 8))
|
||||||
|
{
|
||||||
|
if (val & 8)
|
||||||
|
io_sethandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067);
|
||||||
|
else
|
||||||
|
io_removehandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067);
|
||||||
|
}
|
||||||
|
|
||||||
|
oti067->pos = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t oti067_pos_in(uint16_t addr, void *p)
|
||||||
|
{
|
||||||
|
oti067_t *oti067 = (oti067_t *)p;
|
||||||
|
|
||||||
|
return oti067->pos;
|
||||||
|
}
|
||||||
|
|
||||||
void oti067_recalctimings(svga_t *svga)
|
void oti067_recalctimings(svga_t *svga)
|
||||||
{
|
{
|
||||||
oti067_t *oti067 = (oti067_t *)svga->p;
|
oti067_t *oti067 = (oti067_t *)svga->p;
|
||||||
|
|
@ -141,7 +165,8 @@ void *oti067_common_init(char *bios_fn, int vram_size)
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
io_sethandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067);
|
io_sethandler(0x03c0, 0x0020, oti067_in, NULL, NULL, oti067_out, NULL, NULL, oti067);
|
||||||
|
io_sethandler(0x46e8, 0x0001, oti067_pos_in, NULL, NULL, oti067_pos_out, NULL, NULL, oti067);
|
||||||
|
|
||||||
oti067->svga.miscout = 1;
|
oti067->svga.miscout = 1;
|
||||||
return oti067;
|
return oti067;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue