Создать ответ 
 
Рейтинг темы:
  • Голосов: 0 - Средняя оценка: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Question about reading and writing data with sd card
Автор Сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #5
RE: Question about reading and writing data with sd card
(30.12.2022 13:56)SWAT писал(а):  Manual assembler doesn't help you increase speed a lot.
The main problem is the long reaction of the port pins in the software emulation of SPI itself, it takes CPU time and can't be better than hardware interfaces in general. Don't waste too much time on this. Just a little unroll loops, do not move pointers every byte, write to RAM at least 32 bit and that's all.
Modern versions of GCC are good at doing optimizations on their own, as they manage superscalar CPU well (arranging instructions in a certain way to execute them in parallel). Manually it's tricky and confusing, I've tried this here. You can't do it much better, because you need to keep a table with instructions in your mind that can be executed by SH4 in parallel and arrange them in the right order. It is not enough just to write in assembly language to be effective.

Yes, I have checked the software manual of Renesas sh4-A, and Chapter 4 is about pipelining (page 36-55)
It details which instructions can be executed in parallel.
So, writing assembly by hand paying careful attention to every instruction can be confusing and frustrating indeed.
Hahaha, these are not the key points, the point is that the single-line transmission is indeed too slowBig Grin
[Изображение: attachment.php?aid=1131]




(30.12.2022 13:56)SWAT писал(а):  It's not easy and it has been developed over the years to get good results.
All functions here that name start from "gdc" is a BIOS system calls replacements for GD-ROM:

https://github.com/DC-SWAT/DreamShell/bl...lls.c?ts=4

It seems very complicated, but if I only write to the address 8c004000, I should be able to apply this template directly, and it should be enough to write the memory here, thank you very much



(30.12.2022 13:56)SWAT писал(а):  In my videos you can find SD and HDD tests for the same game:
https://www.youtube.com/@SWAT-DC/videos

But you will never reach the speed of even the drive, and even more so HDD.

Of course, I know that the spi mode is the slowest, but I just want to compare it, how much difference can it make with CD-ROM reading cdr? By the way, is it 1-6x faster to read cdr?

Thank you very much for your replyBig Grin


Прикрепления
.jpg  5.jpg (Размер: 85.71 Кб / Загрузок: 208)
(Последний раз сообщение было отредактировано 31.12.2022 в 07:28, отредактировал пользователь kof888.)
31.12.2022 07:25
Найти все сообщения Цитировать это сообщение
Создать ответ 


Сообщения в этой теме
RE: Question about reading and writing data with sd card - kof888 - 31.12.2022 07:25

Похожие темы
Тема: Автор Ответов: Просмотров: Посл. сообщение
Улыбка A few questions about using sd card kof888 5 5151 03.03.2022 12:46
Посл. сообщение: fafadou
  SD Card Адаптор для Dreamcast и запуск игр. ands 51 206943 09.04.2017 04:47
Посл. сообщение: SILENT_Pavel
  SD card mod Dreamcast. Какую флешку лучше использовать? DreamcastFANpro 18 61202 24.09.2016 08:05
Посл. сообщение: SWAT
  Проблемы с SD card DreamcastFANpro 44 112771 13.09.2016 19:50
Посл. сообщение: ands

Переход:


Пользователи просматривают эту тему: 1 Гость(ей)