From 745b8c71b128c541c09b7666d35f55e6e8f74f15 Mon Sep 17 00:00:00 2001 From: holub Date: Wed, 3 Apr 2024 14:25:03 -0400 Subject: [PATCH] machine/spi_sdcard.cpp: Report status for requests of CMD58 (READ_OCR) (#12212) --- src/devices/machine/spi_sdcard.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/devices/machine/spi_sdcard.cpp b/src/devices/machine/spi_sdcard.cpp index 23296a94b33..4fc97be2773 100644 --- a/src/devices/machine/spi_sdcard.cpp +++ b/src/devices/machine/spi_sdcard.cpp @@ -430,14 +430,8 @@ void spi_sdcard_device::do_command() case 58: // CMD58 - READ_OCR m_data[0] = 0; - if (m_type == SD_TYPE_HC) - { - m_data[1] = 0x40; // indicate SDHC support - } - else - { - m_data[1] = 0; - } + m_data[1] = 0x80; // Busy Status: 1b - Initialization Complete + m_data[1] |= (m_type == SD_TYPE_V2) ? 0 : 0x40; // Card Capacity Status: 0b - SDCS, 1b SDHC, SDXC m_data[2] = 0; m_data[3] = 0; m_data[4] = 0;