[Dreamcast] Apps Dreamshell for Change Language

Discussion in 'Sega Dreamcast Development and Research' started by dragoncity, May 18, 2018 at 4:38 AM.

  1. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    Hello ! :)

    If you change the bios by a Dreamshell Bios without change the language before,you can't change the language after because you need to go in the SEGA Bios for change Language.

    [​IMG]

    Of course,if you reflash in SEGA Bios for change..it works but I would like to find an easy solution when you forgot to change the language ! :)

    I contacted "Japanese_Cake",but he is very busy.
    He told me for a DEV (I am not a dev...) it's very easy to create an App for that.

    So I hope to find help with one of you to create this application under Dreamshell ! :)

    Thank you in advance ! :)
     
  2. Mrneo240

    Mrneo240 Robust Member

    Joined:
    Sep 15, 2017
    Messages:
    213
    Likes Received:
    126
    Doesn't sound hard. Take a flash dump. Change language. Flash dump. Duplicate changes.
     
  3. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    Thanks for your answer.

    Hum I don't understand or if it's that it's not fast :)

    The first solution,easy it's change the bios > change language > rechange the bios.

    But not a good solution... so I search a solution for change directly the language through dreamshell.
     
  4. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    2,711
    Likes Received:
    585
    He means you can manually compare flash dumps where only the language changed to figure out what has to change, then simply implement the flash writing part in your application.
     
    Traace likes this.
  5. Mrneo240

    Mrneo240 Robust Member

    Joined:
    Sep 15, 2017
    Messages:
    213
    Likes Received:
    126

    Yup.

    Sorry, trying to stay away from the forums while traveling. I can't imagine there are many changes you'd have to make
     
  6. megavolt85

    megavolt85 Spirited Member

    Joined:
    Jan 8, 2015
    Messages:
    189
    Likes Received:
    178
    is bad idea ;)
     
  7. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    Ok I understand better now :)
    But for me it's not simple,I am sorry can you tell me step by step?

    I know the language it's in IC502,and need to change the value in this component.
    I know also with "Region Changer" when you change language it does not matter ! (just the region it's OK!)

    So now I have 2 idea,maybe not the better but it's that :

    1 - The first idea it's not my idea,japanese_cake say :
    "you create a game cdi and by way of binary you take the last mega byte of a retail bios: a bios is 2mo so you just cut it in half and take the second part and rename it " 1ST_READ.BIN ""

    2 - Create an App,I don't know how...and this App change directly the value of language.

    You are stronger than me for that ! :)
     
  8. TapamN

    TapamN Member

    Joined:
    Sep 16, 2005
    Messages:
    22
    Likes Received:
    4
    I've looked into how the data is stored on the flash. It's not as simple as changing a few bits in the flash and updating it. A super simple copy-on-write filesystem is used to store system settings. I'm having trouble finding my notes, so there might be some mistakes since this is completely from memory.

    Most data, like online settings and boot menu settings, are stored in the last partition of the flash. At the start of the partition, there is a header to identify that the flash is correctly formatted, followed by the actual data (and array of files), with a allocation bitmap at the end.

    Each "file" consists of 32 bytes. The first two bytes are a little endian number that serves as a file name, and the last two bytes are a checksum, leaving 28 bytes of data in the middle. For things that need more than 28 bytes, like internet settings, the data is spread over multiple files, with contiguous file names. I think BIOS settings are stored in file 5 or 7. Unused files are all ones bits (FF in a hex dump). I'm not sure what checksum is used, it's probably one of the commonly used CRC-16 variants.

    The allocation bitmap shows what files have been written. If it's a 1, the file is unused, if it's a 0 is has been used.

    To read a file, you start at the last file, and search backwards for the file you want.

    With flash, you can change one bits to zeroes on a write, but changing a zero bit to a one requires erasing everything and rewriting everything. Also, you can only preform an erase a limited number of times before the flash wears out an becomes unusable. This system allows you to update a file without needing a erase cycle every time. Just write to the next free file and clear the free bit in the allocation bitmap. If you run out of free files, you need to read everything in, erase the partition, and rewrite it with the current versions of the files, with correct header and bitmap. You should also verify that the data is successfully written to the flash, in case part of the flash starts going bad, and try rewriting it to the next free spot if it was corrupted.

    One partition seems to record what games have been played on the system. It seems to mostly be for Japanese and online games. Codebreaker stores some code in flash.
     
  9. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    Thank you for your message ! :)

    In the meantime with your messages I thought about it again, and I told myself why to talk about flash .. because clearly with the bios SEGA we only modify a data, we do not flash anything it's not as if we flashed the region.

    We must be able to just send to the dreamcast this modification, I imagine 0 for English, and to 2 for French, I say that for the example.
     
  10. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,115
    Likes Received:
    969
    Flash is the type of storage. He's not talking about flashing the chip. He's talking about write the data to the flash chip.

    Flash chips
    Eprom
    Etc

    He's quite throughly explained how it works, it's just that you do not understand it.
     
    dragoncity and -=FamilyGuy=- like this.
  11. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    Ho ok effectively.. for me flash..is like flash the bios... ^^

    I do not despair if you tell me what to do I'll do it, even if it's a Dreamshell script (.dsc) I do not care :)
     
  12. megavolt85

    megavolt85 Spirited Member

    Joined:
    Jan 8, 2015
    Messages:
    189
    Likes Received:
    178
    all info in KOS source code, flashrom.c and flashrom.h
    What need:
    1) create new func flashrom_get_block or modify, need get adress in flashrom adress space
    2) rebuild KOS
    3) rebuild dreamshell kernel
    4) now you can write new APP or change app "Settings"
     
  13. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    It's not possible to load a bios directly in Dreamshell?

    For exemple load jc-bootROM-retail-v1.031.bin
     
  14. megavolt85

    megavolt85 Spirited Member

    Joined:
    Jan 8, 2015
    Messages:
    189
    Likes Received:
    178
    you can load half bios on;y if you have GD-ROM
     
  15. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    Hum no Dreamshell "No-Gdrom" ^^
     
  16. dragoncity

    dragoncity Rising Member

    Joined:
    Nov 20, 2017
    Messages:
    68
    Likes Received:
    6
    So not easy in fact...
     

Share This Page