Создать ответ 
 
Рейтинг темы:
  • Голосов: 0 - Средняя оценка: 0
  • 1
  • 2
  • 3
  • 4
  • 5
vmu read and write
Автор Сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #1
vmu read and write
Hello everyoneBlush

I want to learn how to read and write vmu.

I read some information from http://mc.pp.se/dc/vms/flashmem.html,

may I ask where there are some practical examples for reference What?

Thanks ReplyBig Grin
13.01.2021 17:22
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #2
RE: vmu read and write
You mean low-level?

[Изображение: barbers.png]
14.01.2021 11:39
Вебсайт Найти все сообщения Цитировать это сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #3
RE: vmu read and write
I mean ordinary, basic. Recently, in the game conversion of atomiswave, we found that although the archive is very large, we can simply compress it with DC's SH4 CPU before storing it in VMU. After compression, we can reduce the space by about 70%, so that we don't need too much space to archive it in VMU. But I'm not familiar with VMU. I haven't touched it before, so I'm not familiar with reading and writing VMU archives. So I want to ask if there are any materials and examples for reference.
(Последний раз сообщение было отредактировано 14.01.2021 в 13:37, отредактировал пользователь kof888.)
14.01.2021 13:36
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #4
RE: vmu read and write
Maple Bus simple code:
https://github.com/DC-SWAT/DreamShell/bl...rc/maple.c

VMU block r/w simple code:
https://github.com/DC-SWAT/DreamShell/bl.../src/vmu.c

VMU FAT filesystem code:
https://github.com/KallistiOS/KallistiOS...fs/vmufs.c


But it's not easy way. Better find in-game functions from KATANA SDK and use it.

[Изображение: barbers.png]
(Последний раз сообщение было отредактировано 18.01.2021 в 06:55, отредактировал пользователь SWAT.)
18.01.2021 06:52
Вебсайт Найти все сообщения Цитировать это сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #5
RE: vmu read and write
Thank you for providing information. I have watched some games these days. KATANA is a lot more complicated. I found some related function sections. However, the method of reading and writing is more complicated. It is probably achieved by switching access permissions? (0x8c switches to 0xac and 0x0c)
18.01.2021 15:02
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #6
RE: vmu read and write
Maple bus data is transfering by DMA to/from maple controller with some frequency.
Different areas of RAM used by some reasons. For example at 0xac area disabled CPU cache, or 0x0c it's a physical address uses for DMA transfers and 0x8c used as default work area.

[Изображение: barbers.png]
(Последний раз сообщение было отредактировано 21.01.2021 в 10:48, отредактировал пользователь SWAT.)
21.01.2021 10:45
Вебсайт Найти все сообщения Цитировать это сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #7
RE: vmu read and write
(21.01.2021 10:45)SWAT писал(а):  Maple bus data is transfering by DMA to/from maple controller with some frequency.
Different areas of RAM used by some reasons. For example at 0xac area disabled CPU cache, or 0x0c it's a physical address uses for DMA transfers and 0x8c used as default work area.

Thank you swatSmile

at 0xac area disabled CPU cache, or 0x0c it's a physical address uses for DMA transfers and 0x8c used as default work area.

Can you elaborate on this?
I have been troubled by this. Is the address starting with 0xac and the memory address starting with 0x8c the same? Is there just a difference in caching?
such asHuh

0xac010000
0x8c010000
0x0c010000
Are these 3 addresses one? Is there a difference between caching


I found several KATANA games and put them together with other functions, and the assembly seems particularly difficult.

Can you recommend a KATANA game or app about the use of these functions?
(Последний раз сообщение было отредактировано 21.01.2021 в 18:17, отредактировал пользователь kof888.)
21.01.2021 18:13
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #8
RE: vmu read and write
0xac and 0x8c is the mirror of 0x0c. So yes, it is the same memory.

[Изображение: barbers.png]
22.01.2021 13:18
Вебсайт Найти все сообщения Цитировать это сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #9
RE: vmu read and write
Thank you for your help. At present, the file reading function of the katana game has been found. After reading a few games, it seems to be similar. It seems to be the function library of katana.

The current result is that the game archive can be encrypted, decrypted or compressed (many games have a separate set in addition to the CRC set with the system, and some games have too large archives, such as Advanced Daisenryaku 2001, which actually requires 194 frames. The memory card space, if we simply compress it, theoretically it can be reduced by half)

But if I want to copy the archive reading function and use it alone, it's too difficult. Give up temporarily...
23.02.2021 07:22
Найти все сообщения Цитировать это сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #10
RE: vmu read and write
After all this time, I can finally make some sense of it

What I want to ask is, does it have any effect to cancel this sentence when writing the archive data to the memory card?

/* Gotta wait a bit to let the flash catch up */
sleep(20);


Maybe I can do a test with this game

https://www.bilibili.com/video/bv1qF411b778
(Последний раз сообщение было отредактировано 25.11.2021 в 17:24, отредактировал пользователь kof888.)
21.11.2021 07:20
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #11
RE: vmu read and write
I'm not sure, but I think you should wait some milliseconds for writing data by maple bus controller and/or VMU.

[Изображение: barbers.png]
26.11.2021 14:03
Вебсайт Найти все сообщения Цитировать это сообщение
kof888 Не на форуме
Продвинутый
***

Сообщений: 189
Зарегистрирован: 29.06.2009
Рейтинг: 5
Сказал спасибо: 8
Поблагодарили 61 раз(а) в 27 сообщ.
Сообщение: #12
RE: vmu read and write
(26.11.2021 14:03)SWAT писал(а):  I'm not sure, but I think you should wait some milliseconds for writing data by maple bus controller and/or VMU.

Thanks for the answer, I've seen the code for the KATANA game about this and most of the games have the same loop code here
To be honest, the loops in there are a bit confusing to me


Ok, looks like I found them from your github....

timer_init ();
timer_prime();
timer_start ();
timer_spin_sleep_bios(20);

Ok, looks like I found them from your github

I think there are no more errors, thanks again
(Последний раз сообщение было отредактировано 27.11.2021 в 12:57, отредактировал пользователь kof888.)
26.11.2021 19:00
Найти все сообщения Цитировать это сообщение
Создать ответ 


Переход:


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