mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 01:25:33 -07:00
Allow PCjr FDC to be disabled
This commit is contained in:
@@ -66,6 +66,9 @@ typedef struct pcjr_s {
|
||||
int serial_pos;
|
||||
uint8_t pa;
|
||||
uint8_t pb;
|
||||
|
||||
uint8_t option_fdc;
|
||||
|
||||
pc_timer_t send_delay_timer;
|
||||
|
||||
} pcjr_t;
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <86box/rom.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
#include <86box/sound.h>
|
||||
#include <86box/snd_speaker.h>
|
||||
#include <86box/snd_sn76489.h>
|
||||
@@ -653,6 +654,8 @@ kbd_read(uint16_t port, void *priv)
|
||||
case 0x62:
|
||||
ret = (pcjr->latched ? 1 : 0);
|
||||
ret |= 0x02; /* Modem card not installed */
|
||||
if (!pcjr->option_fdc)
|
||||
ret |= 0x04; /* Diskette card not installed */
|
||||
if (mem_size < 128)
|
||||
ret |= 0x08; /* 64k expansion card not installed */
|
||||
if ((pcjr->pb & 0x08) || (cassette == NULL))
|
||||
@@ -846,6 +849,8 @@ machine_pcjr_init(UNUSED(const machine_t *model))
|
||||
|
||||
pcjr = calloc(1, sizeof(pcjr_t));
|
||||
|
||||
pcjr->option_fdc = 0;
|
||||
|
||||
is_pcjr = 1;
|
||||
|
||||
pic_init_pcjr();
|
||||
@@ -877,7 +882,10 @@ machine_pcjr_init(UNUSED(const machine_t *model))
|
||||
|
||||
nmi_mask = 0x80;
|
||||
|
||||
device_add(&fdc_pcjr_device);
|
||||
if (fdc_current[0] == FDC_INTERNAL) {
|
||||
device_add(&fdc_pcjr_device);
|
||||
pcjr->option_fdc = 1;
|
||||
}
|
||||
|
||||
device_add(&ns8250_pcjr_device);
|
||||
/* So that serial_standalone_init() won't do anything. */
|
||||
|
||||
@@ -300,7 +300,7 @@ const machine_t machines[] = {
|
||||
.max_multi = 0
|
||||
},
|
||||
.bus_flags = MACHINE_PCJR,
|
||||
.flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE,
|
||||
.flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE | MACHINE_FDC,
|
||||
.ram = {
|
||||
.min = 64,
|
||||
.max = 640,
|
||||
@@ -316,7 +316,7 @@ const machine_t machines[] = {
|
||||
.gpio_acpi = 0xffffffff,
|
||||
.device = NULL,
|
||||
.kbd_device = NULL,
|
||||
.fdc_device = NULL,
|
||||
.fdc_device = &fdc_pcjr_device,
|
||||
.sio_device = NULL,
|
||||
.vid_device = &pcjr_device,
|
||||
.snd_device = NULL,
|
||||
|
||||
Reference in New Issue
Block a user