From a6e866c0e547f4bffca287e425bdf598e7966a62 Mon Sep 17 00:00:00 2001 From: Akamaki <97360908+akmed772@users.noreply.github.com> Date: Tue, 18 Feb 2025 22:34:27 +0900 Subject: [PATCH] added comments --- src/disk/hdc_esdi_mca.c | 16 ++++++++++++++-- src/floppy/fdc.c | 2 +- src/machine/m_ps2_mca.c | 6 +++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/disk/hdc_esdi_mca.c b/src/disk/hdc_esdi_mca.c index 690f658a0..8f1def137 100644 --- a/src/disk/hdc_esdi_mca.c +++ b/src/disk/hdc_esdi_mca.c @@ -1471,16 +1471,28 @@ static device_config_t { .type = -1 } }; +/* +Device for an IBM DBA (Direct Bus Attachment) hard disk. +The Disk BIOS is included in the System ROM. +Some models have an exclusive channel slot for the DBA hard disk. +Following IBM machines are supported: + * PS/2 model 55SX + * PS/2 model 65SX + * PS/2 model 70 type 3 (Slot #4) + * PS/2 model 70 type 4 (Slot #4) + * PS/55 model 5550-T (Slot #5) + * PS/55 model 5550-V (Slot #5) +*/ const device_t esdi_integrated_device = { - .name = "IBM Integrated Fixed Disk Controller (MCA)", + .name = "IBM Integrated Fixed Disk and Controller (MCA)", .internal_name = "esdi_integrated_mca", .flags = DEVICE_MCA, .local = ESDI_IS_INTEGRATED, .init = esdi_init, .close = esdi_close, .reset = esdi_reset, - .available = NULL, /* The Disk BIOS is included in the System ROM */ + .available = NULL, .speed_changed = NULL, .force_redraw = NULL, .config = esdi_integrated_config diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 8a1a33f2f..5de1a8ef4 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -740,7 +740,7 @@ fdc_write(uint16_t addr, uint8_t val, void *priv) drive = real_drive(fdc, fdc->dor & 3); fdc_update_rwc(fdc, drive, (val & 0x30) >> 4); } - /* Bit 2: FIFO test mode (PS/55 only? This is not documented in neither the PS/2 HITR nor the 82077AA datasheet.) + /* Bit 2: FIFO test mode (PS/55 5550-S,T only. Undocumented) The Power-on Self Test of PS/55 writes and verifies 8 bytes of FIFO buffer through I/O 3F5h. If it fails, then floppy drives will be treated as DD drives. */ if (fdc->flags & FDC_FLAG_PS2_MCA) { diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index 1edff2991..ac22af2fe 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -1890,7 +1890,11 @@ machine_ps55_model_50t_init(const machine_t* model) * Planar ID * FFFAh - PS/55 model 5551-S0x, T0x (stage 1?) * FFEEh - PS/55 model 5551-S1x, T1x (stage 2?) - * POST (P/N 38F6933) determination: FBxx -> 4 slots (error), xxEE -> 5 slots (ok), others -> 8 (error) + * Verification in BIOS P/N 38F6933: FBxx -> 4 slots (error), xxEE -> 5 slots (ok), others -> 8 (error) + * + * The only difference between S and T models is the CPU speed (16 MHz vs 20 MHz). + * The POST measures the speed, and sets a flag in the BIOS Data Area to indicate the sub model. + * The VM in 86Box runs faster than the real, so the POST always determines it as the T model. */ ps2.planar_id = 0xffee; ps55_mca_board_model_50t_init();