Implemented experimental Headland HT102 chipset based EMS support.

Added Trigem 266M and AMA-932J machines.
Patch from Greatpsycho.
This commit is contained in:
SarahW 2018-11-12 20:32:53 +00:00
commit 461cb221ca
8 changed files with 560 additions and 11 deletions

View file

@ -20,11 +20,14 @@ typedef struct oti067_t
uint8_t regs[32];
uint8_t pos;
uint8_t dipswitch_val;
uint32_t vram_size;
uint32_t vram_mask;
} oti067_t;
static uint8_t oti067_dipswitch_val = 0x18;
void oti067_out(uint16_t addr, uint8_t val, void *p)
{
oti067_t *oti067 = (oti067_t *)p;
@ -111,7 +114,7 @@ uint8_t oti067_in(uint16_t addr, void *p)
temp = oti067->index | (2 << 5);
break;
case 0x3DF:
if (oti067->index==0x10) temp = 0x18;
if (oti067->index==0x10) temp = oti067_dipswitch_val;
else temp = oti067->regs[oti067->index];
break;
@ -192,6 +195,8 @@ void oti067_enable_disable(void *p, int enable)
io_sethandler(0x46e8, 0x0001, oti067_pos_in, NULL, NULL, oti067_pos_out, NULL, NULL, oti067);
mem_mapping_enable(&oti067->svga.mapping);
}
oti067->dipswitch_val = 0x18;
}
void *oti067_init()
@ -209,6 +214,14 @@ void *oti067_acer386_init()
return oti067;
}
void *oti067_ama932j_init()
{
oti067_t *oti067 = oti067_common_init("ama932j/oti067.bin", 512);
oti067->dipswitch_val |= 0x20;
return oti067;
}
static int oti067_available()
{
return rom_present("oti067/bios.bin");
@ -294,3 +307,14 @@ device_t oti067_acer386_device =
oti067_force_redraw,
oti067_add_status_info
};
device_t oti067_ama932j_device =
{
"Oak OTI-067 (AMA-932J)",
0,
oti067_ama932j_init,
oti067_close,
oti067_available,
oti067_speed_changed,
oti067_force_redraw,
oti067_add_status_info
};