This commit is contained in:
Jasmine Iwanek
2022-02-12 23:20:59 -05:00
parent 0b9c9f32b1
commit 855af3727d
3 changed files with 51 additions and 0 deletions

View File

@@ -103,6 +103,7 @@ extern const device_t pas16_device;
extern const device_t ps1snd_device; extern const device_t ps1snd_device;
/* Tandy PSSJ */ /* Tandy PSSJ */
extern const device_t tndy_device;
extern const device_t pssj_device; extern const device_t pssj_device;
extern const device_t pssj_isa_device; extern const device_t pssj_isa_device;

View File

@@ -224,6 +224,18 @@ void *ncr8496_device_init(const device_t *info)
return sn76489; return sn76489;
} }
void *tndy_device_init(const device_t *info)
{
sn76489_t *sn76489 = malloc(sizeof(sn76489_t));
memset(sn76489, 0, sizeof(sn76489_t));
uint16_t addr = device_get_config_hex16("base");
sn76489_init(sn76489, addr, 0x0008, SN76496, 3579545);
return sn76489;
}
void sn76489_device_close(void *p) void sn76489_device_close(void *p)
{ {
sn76489_t *sn76489 = (sn76489_t *)p; sn76489_t *sn76489 = (sn76489_t *)p;
@@ -231,6 +243,30 @@ void sn76489_device_close(void *p)
free(sn76489); free(sn76489);
} }
static const device_config_t tndy_config[] =
{
{
"base", "Address", CONFIG_HEX16, "", 0x0C0, "", { 0 },
{
{
"0x0C0", 0x0C0
},
{
"0x1E0", 0x1E0
},
{
"0x2C0", 0x2C0
},
{
""
}
}
},
{
"", "", -1
}
};
const device_t sn76489_device = const device_t sn76489_device =
{ {
"TI SN74689 PSG", "TI SN74689 PSG",
@@ -242,6 +278,7 @@ const device_t sn76489_device =
NULL, { NULL }, NULL, NULL, { NULL }, NULL,
NULL NULL
}; };
const device_t ncr8496_device = const device_t ncr8496_device =
{ {
"NCR8496 PSG", "NCR8496 PSG",
@@ -253,3 +290,15 @@ const device_t ncr8496_device =
NULL, { NULL }, NULL, NULL, { NULL }, NULL,
NULL NULL
}; };
const device_t tndy_device =
{
"TNDY",
"tndy"
DEVICE_ISA,
0,
tndy_device_init,
sn76489_device_close,
NULL, { NULL }, NULL,
tndy_config
};

View File

@@ -123,6 +123,7 @@ static const SOUND_CARD sound_cards[] =
#if defined(DEV_BRANCH) && defined(USE_PAS16) #if defined(DEV_BRANCH) && defined(USE_PAS16)
{ &pas16_device }, { &pas16_device },
#endif #endif
{ &tndy_device },
{ &pssj_isa_device }, { &pssj_isa_device },
{ &wss_device }, { &wss_device },
{ &adlib_mca_device }, { &adlib_mca_device },