Создать ответ 
 
Рейтинг темы:
  • Голосов: 0 - Средняя оценка: 0
  • 1
  • 2
  • 3
  • 4
  • 5
RegionChanger: KOS.fs_open broken?
Автор Сообщение
Dreamkey Не на форуме
Новичок
*

Сообщений: 5
Зарегистрирован: 23.05.2014
Рейтинг: 0
Сказал спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщ.
Сообщение: #1
RegionChanger: KOS.fs_open broken?
Hi SWAT,

First of all, thanks a lot for DreamShell, it's really a nice work!

So my problem: some times ago, I tried the Region Changer on my Dreamcast, but I failed the soldered joint and the Dreamcast boots with a grey logo and refuses to start games. I don't know if there is a physical damage or not.
Now I was able to revive it with the dual-BIOS mod with Link83's bios. It boots some games but more importantly DreamShell.

I plan to reflash the flash with Region Changer from DreamShell RC2 but it fails.
I made some changes in the main.lua, like this:
Код:
function RegionChanger:RestoreBackup()

    self:ChangeProgress(0.9);

    local file = "sd/flash.bin";
    local f = KOS.fs_open(file, KOS.O_RDONLY);
    self:ChangeProgress(0.7);
    local data = RC.flash_read_factory();
    self:ChangeProgress(0.5);

    if f > -1 then
But the progress bar is stuck to 90%.
And if I try to create a backup, the file got deleted but the bar stays at 10%.

If I open the console, I can see this error:
Код:
[...]/main.lua: error in function "fs_open'.
argument #2 is 'nil': 'number' expected.

What can I try? I'm willing to test anything you want Smile
Thanks!
24.05.2014 00:24
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #2
RE: RegionChanger: KOS.fs_open broken?
Sorry, this is a bug in a luaKOS module.
I'm fixed it now, you can download update on GitHub or redownload archive on DreamShell page.

[Изображение: barbers.png]
(Последний раз сообщение было отредактировано 24.05.2014 в 16:18, отредактировал пользователь SWAT.)
24.05.2014 16:17
Вебсайт Найти все сообщения Цитировать это сообщение
Dreamkey Не на форуме
Новичок
*

Сообщений: 5
Зарегистрирован: 23.05.2014
Рейтинг: 0
Сказал спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщ.
Сообщение: #3
RE: RegionChanger: KOS.fs_open broken?
Thanks, now the backup works but not the restore, it freezes at 40%, the controller doesn't respond and the button animation stays on the button pressed state.

I checked your code; based on the status bar, it seems to stuck on the fs_read at line 197. The 'data' argument comes from the RC.flash_read_factory(). In this function, if you go on the else condition, it seems that 'size' and 'start' are initialized.
Sorry if I'm misreading it!

Also I'm wondering, is it possible to flash the full 128Ko? I don't know what it contains because of my mistake, and from what I understand I can only flash/restore 8Ko.
24.05.2014 18:51
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #4
RE: RegionChanger: KOS.fs_open broken?
You have DreamShell SDK with installed toolchain?
If yes, you can change RC module and compile it himself.
Source code of Region Changer module available on GitHub and in released SDK archive. See in "applications/region_changer/modules".
If not, I can change and compile it for you.

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

Сообщений: 5
Зарегистрирован: 23.05.2014
Рейтинг: 0
Сказал спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщ.
Сообщение: #5
RE: RegionChanger: KOS.fs_open broken?
Sorry, I plan to do it soon but I need to make some place first.
I just understood that the create/restore backup option is only for the user's settings, so if you can change RC to flash a full flash (like the dceu_pal.bin in the archive), I'll be happy to try it Smile
24.05.2014 20:07
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #6
RE: RegionChanger: KOS.fs_open broken?
Try attached module. I added function:

PHP код:
RC.flash_write_file("/sd/firmware/flash/dcus_ntsc.bin"); 


Прикрепления
.7z  app_region_changer.7z (Размер: 3.87 Кб / Загрузок: 2)

[Изображение: barbers.png]
24.05.2014 20:41
Вебсайт Найти все сообщения Цитировать это сообщение
Dreamkey Не на форуме
Новичок
*

Сообщений: 5
Зарегистрирован: 23.05.2014
Рейтинг: 0
Сказал спасибо: 0
Поблагодарили 0 раз(а) в 0 сообщ.
Сообщение: #7
RE: RegionChanger: KOS.fs_open broken?
Thanks but no luck here.
Your function works because I can see an error message if I give a bad filename, but I'm still having the same problem.
I guess my Dreamcast has a hardware problem, but I'll try to build the DreamShell SDK and use my coder cable to debug it.

Can you publish your code for 'flash_write_file'? Thanks again.
24.05.2014 22:02
Найти все сообщения Цитировать это сообщение
SWAT Не на форуме
Администратор
*******

Сообщений: 7126
Зарегистрирован: 04.01.2005
Рейтинг: 30
Сказал спасибо: 130
Поблагодарили 1169 раз(а) в 727 сообщ.
Сообщение: #8
RE: RegionChanger: KOS.fs_open broken?
Now the update on GitHub.

[Изображение: barbers.png]
25.05.2014 11:40
Вебсайт Найти все сообщения Цитировать это сообщение
Создать ответ 


Переход:


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