From f241dbb51dd0ce333998b4601c5a7dbcb62f9282 Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Sun, 21 Jan 2024 19:13:46 -0800 Subject: [PATCH] ak2_sd: use a better define name for broken CMD25 Remove test warning while at it --- source/ak2_sd/Makefile_singlewrite | 3 +-- source/ak2_sd/source/dldi_crt0.s | 2 +- source/ak2_sd/source/sddriver.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/ak2_sd/Makefile_singlewrite b/source/ak2_sd/Makefile_singlewrite index 2db023d..a395273 100644 --- a/source/ak2_sd/Makefile_singlewrite +++ b/source/ak2_sd/Makefile_singlewrite @@ -22,11 +22,10 @@ SOURCES := source DATA := data INCLUDES := include -$(warning "SINGLE WRITE ONLY") #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- -ARCH := -mthumb-interwork -DTARGET_SINGLE_BLOCK_WRITE_ONLY +ARCH := -mthumb-interwork -DTARGET_HAS_BROKEN_CMD25 CFLAGS := -g -Wall -O2\ -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer\ diff --git a/source/ak2_sd/source/dldi_crt0.s b/source/ak2_sd/source/dldi_crt0.s index ebf82dd..2412475 100644 --- a/source/ak2_sd/source/dldi_crt0.s +++ b/source/ak2_sd/source/dldi_crt0.s @@ -19,7 +19,7 @@ @--------------------------------------------------------------------------------- @ Text identifier - can be anything up to 47 chars + terminating null -- 48 bytes .align 4 -#ifndef TARGET_SINGLE_BLOCK_WRITE_ONLY +#ifndef TARGET_HAS_BROKEN_CMD25 .asciz "Acekard AK2" #else .asciz "Acekard AK2 (Single-Write version)" diff --git a/source/ak2_sd/source/sddriver.cpp b/source/ak2_sd/source/sddriver.cpp index 1e0b14f..c8e876e 100644 --- a/source/ak2_sd/source/sddriver.cpp +++ b/source/ak2_sd/source/sddriver.cpp @@ -297,7 +297,7 @@ void sddWriteBlocks( u32 addr, u32 blockCount, const void * buffer ) const u8 * pBuffer = (u8 *)buffer; u32 address = _isSDHC ? addr : (addr << 9); -#ifndef TARGET_SINGLE_BLOCK_WRITE_ONLY +#ifndef TARGET_HAS_BROKEN_CMD25 if( 1 == blockCount ) { u32 sdWriteBlock[2] = { 0xd5050018, address }; sendSDCommandR0( sdWriteBlock );