Sakura Wars 3 English Translation Project

Moderators: pcwzrd13, deluxux, VasiliyRS

User avatar
The Opponent
rebel
Posts: 21
Contact:

Sakura Wars 3 English Translation Project

Post#1 » Wed May 18, 2022 2:32 pm





Aux fans francophones de Sakura Wars:

Merci pour votre soutien depuis l'annonce de la traduction en anglais de Sakura Wars 3. Les outils que nous sommes en train de développer pour le patch sont disponibles au public. Une fois le patch anglais réalisé, nous souhaitons soutenir la création d'une traduction en français. Merci de votre patience.




I am The Opponent, one of the lead programmers for this translation project. We have begun work on a translation of Sakura Wars 3, and we require assistance from the larger Dreamcast hacking community to overcome some fundamental roadblocks.

The project is known as the Taisho Romanization. See this post for our current personnel listing.

This project was made possible with assistance from ateam, without whom we would not have had a stable workflow for debugging and testing.

Translation progress is preliminary, but we've made enough progress in text insertion and documenting data formats to produce a proof of concept. I am documenting the data formats used by this game and publishing scripts for working with them on GitHub.

We've succeeded in doing the following:
  • Decompressing the primary script format and inserting text. The script files are PRS-compressed but have additional wrapping that contains a header with compressed and uncompressed file sizes.
  • Changing text character width and increasing the amount of text per line, with the information from this thread.
  • Creating custom fonts. We are exploring the possibility of creating an alternate version of the patch using OpenDyslexic for the primary font.
  • Replacing textures for system menus.
  • Decoupling lip movement for voiced lines from the text, so the lip movements can be preserved after changing the text.

At present, we face two issues that must be solved to continue with the project. I am posting this thread with permission from Small Nerd to request assistance with these problems.
  • The text engine properly centers LIPS text even after changing horizontal text offset, but it forces strange line breaking behavior on strings longer than 18 characters. This occurs after text is loaded to memory but before it is drawn to screen. In Double LIPS dialogs, when the choices change over after half of the time limit elapses, the text can be seen to be drawn correctly until the text animation ends, at which point the line breaking occurs and disrupts the strings. The limit of 18 characters has no link to the character limit for the text box, and will need to be changed or disabled for correct LIPS choice display. Because of this issue, the proof of concept video does not show translated LIPS strings. This issue was solved on May 24, 2022.
  • The graphics for the battle stage interface are not stored in any obvious fashion. It is possible that they are compressed, but most of the files that are likely to contain them are not in any format that current Dreamcast tools are able to process. This issue was solved on June 1, 2022.
Last edited by The Opponent on Tue Feb 07, 2023 12:58 pm, edited 5 times in total.

User avatar
The Opponent
rebel
Posts: 21
Contact:

Re: Sakura Wars 3 English Translation Project

Post#2 » Wed May 18, 2022 3:28 pm

Attempting to insert more than 18 characters in a LIPS string will cause bizarre line breaking, as seen in the attachment. It is not shown in the video, as we have been unable to determine how and where the value of 18 is used as a character limit.
Attachments
0004067.png

User avatar
ateam
Heroine Console
Posts: 478

Re: Sakura Wars 3 English Translation Project

Post#3 » Wed May 18, 2022 9:40 pm

Fantastic work to all involved! It's awesome to see the progress you've made thus far, and I'm so much more than happy to help as much as my current workload/family-life allows. It makes me happy to know that any of the tips, advice, or guidance I've given you (or the others on your team) has contributed to the fantastic progress you've made thus far.

As a diehard lover of SEGA's swansong console who's dedicated to doing as much for this community as possible, it truly warms my heart to see more and more projects like these.

That being said, I do recall some peculiarities with the LIPS responses in "Sakura Wars: Columns 2", but it was mostly around premature string termination if certain ASCII byte values were part of the response text when interpreted by the script parser function(s). For example, Shift-JIS 8140 was fine for a space character, but ASCII 20 caused the premature termination. Similarly, Shift-JIS numbers 0-9 were okay, but 0-9 in ASCII broke it.

With the immense modifications I've implemented to Nakoruru's text-rendering functions, I've found that there are often not "obvious" integer values representing things like maximum characters per line, or per box. Instead, I've frequently found code that does on-the-fly calculations based on any number of other values. For example, in some cases, if I wanted to display 52 characters per dialog line (instead of original limit of 26), I had to ensure maximum horizontal pixel width for font tiles per dialog line was 572, so that my new tile width of 11 would produce 572 / 11 = 52.

In your case, there might be code calculating the starting and ending X coordinates for the LIPS responses based on total width of "the screen" (e.g., 640px) or something similar. With additional digging and trial-and-error, surely you'll figure it out =)
Find me on...

DreamcastForever.com
GitHub
Reddit
SegaXtreme
Twitter
YouTube
• Discord: derek.ateam

User avatar
The Opponent
rebel
Posts: 21
Contact:

Re: Sakura Wars 3 English Translation Project

Post#4 » Wed May 18, 2022 11:01 pm

All text in this game is multi-byte, and byte 00 is always interpreted as a null terminator.

The game is calculating text positions internally and centering text correctly after changing text properties, but look closely at the attached animation. The choices are clearly visible in the correct places during the moment the choices change, but not before or after. Once the timer restarts, line breaking occurs again and causes even more disruption. I reviewed the stack trace when this occurs but couldn't locate what would cause this.

Incidentally, regarding non-obvious values related to text, I discovered that text writing speed is controlled by a floating point value, 4.00. Determining how to change this value to speed up text writing is a low priority.
Attachments
0004126.gif

User avatar
ateam
Heroine Console
Posts: 478

Re: Sakura Wars 3 English Translation Project

Post#5 » Thu May 19, 2022 12:28 am

Thanks for the explanation on the horizontal calculation being done properly. I have similar situations in Nakoruru, where activating certain menus/submenus causes formatting breakage of already-rendered text on screen, or where formatting is off even though it’d seem everything is in order as it should be in the new ASM, as well as when inspecting values in memory.

In the end, for Nakoruru it all comes down to a number of functions that read from/write to text buffer(s) and apply numerous calculations on character/line count. It’s very convoluted, but essentially boils down to a combination of exceeding hardcoded space allocated in RAM, and hardcoded logic in certain functions expecting original limitations of things like character count, etc., as per original buffer size.

This is actually happening in the final bug I have left to squash in Nakoruru, and it would seem (based on my tests) a pretty big rewrite is in order so that those text buffers have plenty of room, and subsequent calculations will be carried out correctly.

EDIT: By the way, have you noticed any pattern or trend when it comes to the unwanted addition of the newline in each LIPS response? If so, it definitely lends to the theory that there is some type of calculation going on which is causing this effect.
Find me on...

DreamcastForever.com
GitHub
Reddit
SegaXtreme
Twitter
YouTube
• Discord: derek.ateam

User avatar
The Opponent
rebel
Posts: 21
Contact:

Re: Sakura Wars 3 English Translation Project

Post#6 » Thu May 19, 2022 2:02 pm

Attached is the trace log for the moment the Double LIPS choices change. It starts a few frames before the text animation ends, while the text still appears correct, and ends a few frames after. It contains a 127 MB text file.

I also noticed that when the text overflows, the lines that get broken up are divided into up to three segments, seen in the below image. The first is aligned to the top-left corner of the text area, outside of the graphic, and the third segment, if present, is aligned to the right edge slightly below the center.
0004095[1].png
Attachments
sh2 - Double LIPS text changeover.7z
(534.39 KiB) Downloaded 285 times

User avatar
VincentNL
core
Posts: 125
Contact:

Re: Sakura Wars 3 English Translation Project

Post#7 » Thu May 19, 2022 2:04 pm

I'm super happy to know this game is finally getting translated! :D

Keep it up guys!
If you like my work or just want to show some love:
https://ko-fi.com/vincentnl
https://www.patreon.com/VincentNL

bshi02
dark night
Posts: 64

Re: Sakura Wars 3 English Translation Project

Post#8 » Fri May 20, 2022 5:06 am

Hello.
Is it possible to fix some critical bug when I play sakura wars3 in G1-ata mod dreamcast?
https://www.youtube.com/watch?v=gRL42lz3x6U
I guess that This problem has to do with difference in speed of GD-ROM and HDD(70Mbit-90Mbit/s)
because Moekan,pia carrot3 also has same problem(when I continuously press A or B button in order to skip dialogue or battle scene. freezing problem often occur.)But unlike Moekan,pia carrot3,It is impossbile to play sakura wars3 without ISO Loader 0.7.x.beta1
As Sakura war3 is one of most unpopular dreamcast game in English-speaking world,So I hope you will fix this problem during you proceed this Project .

You can download vmd image file(which is compatible with flycast emulator and dreamshell's vmu manager) from below link which is the same save data with this youtube video..
https://www.dropbox.com/s/6j1kr45mi5z60 ... 10.7z?dl=0
Last edited by bshi02 on Fri May 20, 2022 8:50 am, edited 4 times in total.

User avatar
fafadou
Gold Lion
Posts: 1653

Re: Sakura Wars 3 English Translation Project

Post#9 » Fri May 20, 2022 6:27 am

Use loader 0.6.11_se true dma else dma 16.

bshi02
dark night
Posts: 64

Re: Sakura Wars 3 English Translation Project

Post#10 » Fri May 20, 2022 7:38 am

fafadou wrote:Use loader 0.6.11_se true dma else dma 16.

The past in dc-swat forum, I said that Sakura wars3 not able to work all of ISO Loader(including 0.6.10,0.6.11,0.6.3,0.6.6,0.6.7,0.7.x beta2,0.7.x beta3) excepting ISO LOADER 0.7.x beta1

http://www.dc-swat.ru/forum/thread-3525-page-59.html

DID YOU REALLY TRY OUT SAKURA WAR3 AND CONFIRM THAT IT OBIVOUSLY WORKS IN ISO Loader 0.6.11_SE,DMA ON ?
AND WHAT MEMORY ADDRESS DID YOU TRY OUT IN ORDER TO WORK SAKURA WAR3 IN ISO Loader 0.6.11_SE?

  • Similar Topics
    Replies
    Views
    Last post

Return to “Modifications”

Who is online

Users browsing this forum: No registered users