(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 slow
(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 reply