Added support for Tandy 1000 HX and SL/2. As part of this commit :
- FDC now selects drive number from DOR (0x3f2) - FDC now fails seeks on drives > 1 - XT systems no longer have BIOS mapping at E0000-EFFFF - SN76489 now distinguishes between SN76496 (PCjr and early Tandy 1000), NCR8496 (later Tandy 1000 - different noise handling) and PSSJ - Removed redundant limits on memory configuration - allows selection of 768k for Tandy 1000 SL/2
This commit is contained in:
parent
79202cc5c0
commit
2ca86ba028
24 changed files with 1420 additions and 64 deletions
|
|
@ -26,6 +26,7 @@ typedef struct tandy_t
|
|||
uint8_t stat;
|
||||
|
||||
uint8_t *vram, *b8000;
|
||||
uint32_t b8000_mask;
|
||||
|
||||
int linepos, displine;
|
||||
int sc, vc;
|
||||
|
|
@ -116,12 +117,14 @@ void tandy_recalcaddress(tandy_t *tandy)
|
|||
{
|
||||
tandy->vram = &ram[((tandy->memctrl & 0x06) << 14) + tandy->base];
|
||||
tandy->b8000 = &ram[((tandy->memctrl & 0x30) << 11) + tandy->base];
|
||||
tandy->b8000_mask = 0x7fff;
|
||||
// printf("VRAM at %05X B8000 at %05X\n",((tandy->memctrl&0x6)<<14)+tandy->base,((tandy->memctrl&0x30)<<11)+tandy->base);
|
||||
}
|
||||
else
|
||||
{
|
||||
tandy->vram = &ram[((tandy->memctrl & 0x07) << 14) + tandy->base];
|
||||
tandy->b8000 = &ram[((tandy->memctrl & 0x38) << 11) + tandy->base];
|
||||
tandy->b8000_mask = 0x3fff;
|
||||
// printf("VRAM at %05X B8000 at %05X\n",((tandy->memctrl&0x7)<<14)+tandy->base,((tandy->memctrl&0x38)<<11)+tandy->base);
|
||||
}
|
||||
}
|
||||
|
|
@ -148,7 +151,7 @@ void tandy_write(uint32_t addr, uint8_t val, void *p)
|
|||
|
||||
egawrites++;
|
||||
// pclog("Tandy VRAM write %05X %02X %04X:%04X %04X:%04X\n",addr,val,CS,pc,DS,SI);
|
||||
tandy->b8000[addr & 0x7fff] = val;
|
||||
tandy->b8000[addr & tandy->b8000_mask] = val;
|
||||
}
|
||||
|
||||
uint8_t tandy_read(uint32_t addr, void *p)
|
||||
|
|
@ -159,7 +162,7 @@ uint8_t tandy_read(uint32_t addr, void *p)
|
|||
|
||||
egareads++;
|
||||
// pclog("Tandy VRAM read %05X %02X %04X:%04X\n",addr,tandy->b8000[addr&0x7FFF],CS,pc);
|
||||
return tandy->b8000[addr & 0x7fff];
|
||||
return tandy->b8000[addr & tandy->b8000_mask];
|
||||
}
|
||||
|
||||
void tandy_recalctimings(tandy_t *tandy)
|
||||
|
|
@ -689,6 +692,8 @@ void *tandy_init()
|
|||
mem_mapping_set_addr(&ram_low_mapping, 0, (mem_size - 128) * 1024);
|
||||
io_sethandler(0x03d0, 0x0010, tandy_in, NULL, NULL, tandy_out, NULL, NULL, tandy);
|
||||
io_sethandler(0x00a0, 0x0001, tandy_in, NULL, NULL, tandy_out, NULL, NULL, tandy);
|
||||
tandy->b8000_mask = 0x3fff;
|
||||
|
||||
return tandy;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue