Fixed hardcoded memory size on Toshiba T1000/T1200.
Added ability to disable video on T1200. Patch form John Elliott.
This commit is contained in:
parent
ff94c18a91
commit
636fd9748d
3 changed files with 23 additions and 2 deletions
10
src/t1000.c
10
src/t1000.c
|
|
@ -210,7 +210,7 @@ static void ems_set_hardram(struct t1000_system *sys, uint8_t val)
|
|||
sys->ems_base = 0;
|
||||
}
|
||||
/* pclog("EMS base set to %02x\n", val); */
|
||||
sys->ems_pages = 48 - 4 * sys->ems_base;
|
||||
sys->ems_pages = ((mem_size - 512) / 16) - 4 * sys->ems_base;
|
||||
if (sys->ems_pages < 0) sys->ems_pages = 0;
|
||||
/* Recalculate EMS mappings */
|
||||
for (n = 0; n < 4; n++)
|
||||
|
|
@ -421,6 +421,14 @@ static void write_t1000_ctl(uint16_t addr, uint8_t val, void *priv)
|
|||
}
|
||||
}
|
||||
break;
|
||||
/* It looks as if the T1200, like the T3100, can disable
|
||||
* its builtin video chipset if it detects the presence of
|
||||
* another video card. */
|
||||
case 6: if (romset == ROM_T1200)
|
||||
{
|
||||
t1000_video_enable(val & 0x01 ? 0 : 1);
|
||||
}
|
||||
break;
|
||||
/* EMS control*/
|
||||
case 0x0F:
|
||||
switch (sys->sys_ctl[0x0E])
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ static uint8_t language;
|
|||
* Bit 0: Thin font
|
||||
*/
|
||||
static uint8_t st_video_options;
|
||||
static uint8_t st_enabled = 1;
|
||||
static uint8_t st_display_internal = -1;
|
||||
|
||||
void t1000_video_options_set(uint8_t options)
|
||||
|
|
@ -35,6 +36,11 @@ void t1000_video_options_set(uint8_t options)
|
|||
st_video_options |= language;
|
||||
}
|
||||
|
||||
void t1000_video_enable(uint8_t enabled)
|
||||
{
|
||||
st_enabled = enabled;
|
||||
}
|
||||
|
||||
void t1000_display_set(uint8_t internal)
|
||||
{
|
||||
st_display_internal = internal;
|
||||
|
|
@ -413,12 +419,18 @@ static void t1000_poll(void *p)
|
|||
{
|
||||
t1000_t *t1000 = (t1000_t *)p;
|
||||
|
||||
if (t1000->video_options != st_video_options)
|
||||
if (t1000->video_options != st_video_options ||
|
||||
t1000->enabled != st_enabled)
|
||||
{
|
||||
t1000->video_options = st_video_options;
|
||||
t1000->enabled = st_enabled;
|
||||
|
||||
/* Set the font used for the external display */
|
||||
t1000->cga.fontbase = ((t1000->video_options & 3) * 256);
|
||||
|
||||
if (t1000->enabled) /* Disable internal chipset */
|
||||
mem_mapping_enable(&t1000->mapping);
|
||||
else mem_mapping_disable(&t1000->mapping);
|
||||
}
|
||||
/* Switch between internal plasma and external CRT display. */
|
||||
if (st_display_internal != -1 && st_display_internal != t1000->internal)
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ extern device_t t1000_device;
|
|||
|
||||
void t1000_video_options_set(uint8_t options);
|
||||
void t1000_display_set(uint8_t internal);
|
||||
void t1000_video_enable(uint8_t enabled);
|
||||
|
|
|
|||
Loading…
Reference in a new issue