Home | Forums | What's new | Resources | |
Translating Cotton 2 0.9 |
nanash1 - May 22, 2020 |
1 | 2 | 3 | 4 | Next> |
Mr Conan | May 23, 2020 | |||
For the vfw you would probably need to rewrite a portion of the drawing routine, jsr Or jmp to a new area of code due to the extra instructions required, and then return. You could write in asm or C and paste the binary into an unused area. For the C binary make sure to link in needed libraries. I use the gcc command line tools in saturnorbit Easiest way to add code is to either overwrite something thats always in memory thats no longer needed or increase the size of something that gets loaded in and is always there. Then theres no extra cd load to memory code required. An existing kanji table since you wont need all of it anyway works well. In your case that might not be an option. It sounds like the kanji gets swapped in and out per scene? (Of course you could copy the new draw routine into all font tables) You could also add to the end of the initial executable and increase the load size in the game header. Im assuming thats always in memory since its a simpler game. You would need to check and see how much unused space follows that executable in an emulator. That would be the code size limitation there |
paul_met | May 23, 2020 | |||
If the image data is not compressed, there is no need to write any specific software to display it correctly. All this can be done with standard tools like Tilemolester or CrystalTile2. Don't waste your time writing utilities for a specific game. It is better to spend time studying existing utilities. Believe me. -------- You can view the location of the palette in the texture description in the VDP1 debugger of Yabause. If the palette is represented as 4 BPP(16 color LUT), then it is located in VDP1 memory. Otherwise, it is in VDP2 CRAM. |
nanash1 | May 23, 2020 | |||||
My problem with these tile editors is that their function is somewhat limited and I've never used them. I know how to use Photoshop, so I think it's faster for me to just convert them to png. I already have a working program that does that. At the moment I can't wrap my head around how the color banks mode works exactly. I know that the game uses the color bank mode thanks to Yabasanshiro. It also tells me an address that I suppose is the bank address in the VDP2 CRAM. If I look at that address, however, there are only zeros to be found. The documentation tells me that I need to add the 4 bits of pixel color to the color bank address, but this way I could only address 8 bit colors so there must be something I'm missing. |
paul_met | May 23, 2020 | |||
You can use these tile editors to view any graphics correctly. Tilemolester supports any palette. You can load it from an address, or from a separate file. If your palette is in CRAM, then you should divide its address by 8 (for normal screen mode) or divide it by 4 (for Hi-res mode) - for 16 bit and 8bit color mode respectively. |
nanash1 | May 23, 2020 | |||
Thank for the help, but I still don't understand how the color banks work. Basically I used YabaSanshiro to export a bmp of one of the font tiles. Then I checked the RGB values of the colors and reconstructed the 16 bit color values. This allowed me to find the color palette in the CRAM. The color banks are actually written repeatedly throughout the entire CRAM in 0x1000 offsets. The palette that I need always starts at offset 0xA0, so I assume it's bank 5. How I should have gotten that from the information "color bank: 00018280" that YabaSanshiro displays I still don't understand. Edit: It has gotten pretty late again, but I can show the first result. For this test I didn't bother to adjust the spacing. Also I forgot to create an empty tile as space between words. But in principal it seems to be working. |
rorirub | May 24, 2020 | |||
It would be nice to see this game with the English translated text in it. Someone already translated all of it:
|
fafling | May 28, 2020 | |||
@nanash1... First, Yabause and YabaSanshiro have a bug in the VDP1 debug screen which shifts the color bank by 3 bit to the left. So the hex value 18280 should actually display 3050. Shameless plug : this bug is corrected in Kronos. The color bank is a 16 bit parameter of the drawing command that VDP1 uses to complete the 4 bpp texture pixels to obtain 16 bit framebuffer pixels. VDP1 uses the 12 upper bits of the color bank for that. To understand the structure of the framebuffer pixels, and the color bank bits that they contain, you have to check the sprite type displayed in General info in VDP2 debug screen. Here it's type 5. The sprite types are described in VDP2 manual p. 201. Type 5 uses the 11 lower bits of the framebuffer pixels for color RAM index. So for the font tile framebuffer pixels, the 4 lower bits (DC0 to DC3) come from the texture, and the rest is from the color bank. It means that the 7 upper bits of the color RAM index (DC4 to DC10) are bit 4 to bit 10 of the color bank. Adding those bits to the texture pixels is just like adding the hex value A0 that you have found. Note that VDP2 can offset the color RAM indexes of the sprites with the color RAM offset, also displayed in General info in VDP2 debug screen. Here it's 0, so it changes nothing. |
nanash1 | Jun 1, 2020 | |||
Here is a small update on my progress: As shown in the picture I posted before, I've got a font ready. It still needs some touching up, but I like how it looks. It fits the style of the menu font and with the adjusted spacing, I don't think a variable font spacing is necessary. I can also easily change the characters that are displayed, so showing my own text already works. However, there is also a problem. When I try to insert more text than the scene is programmed for, the text will glitch as soon as the dialog starts. At the moment I'm trying to figure out how exactly the scripting in the game works. I don't really understand how it functions at the moment, but at least I've got some leads. It looks like the scripting has nothing to do with the MF files. They just contain pictures and instructions on the sequence in which to load them. Some of the pictures are just placeholders though. For example the line feed character. So they must be interpreted as instruction by the text box routine in some way. But, as I said, this probably has nothing to do with the scripting as such. The scripting seems to be handled in VS0.bin. There is group of functions that have an initializer called "EventManager", going by a string that's still in the compiled file. These functions seem to be responsible for the timings of the scene. At the core there is a long list of 44 byte wide entries. I know that the first 4 bytes are function pointers. The game goes through this list and executes the pointers according to some rules derived from the rest of the 44 bytes. There are also functions that edit the list when certain events occur. For example when the text box is disabled before the dialog starts. Getting to the bottom of it all won't be easy, but for now I think it's doable. I hope that once I figured it all out. I'll find a way to pause at the beginning of scene and display more text before the screen starts to scroll downwards. |
nanash1 | Jun 6, 2020 | |||
I can report some more progress. I found a way to delay the start scene in order to insert more text. It's actually pretty simple once you know how to do it. The scene is timed by an integer counter. The counter starts negative and once it's larger than zero the screen begins to scroll. So all I had to do was increase the negative offset and now I can insert all text I want. Also the music track is long enough for the increased length of the first scene and even if it wasn't, it would loop. Of course once that problem was solved several others became apparent. Each dialog scene is initialized separately and I had to adjust each dialog box's starting position within the script separately. Also each box has it's own timer that determines when the next text appears and scene progresses. Since they're all scattered over different functions, finding all of them took some time. Now the only thing left that I want to adjust is the horizontal text position, so the longer lines are centered better. I can actually already do this for each text box, but not for the speaker icon. I made a short video of the current state of the intro. Obviously this work in progress. The script isn't final. Since I'm not a native speaker there are probably some awkward sentences. Hopefully once everything is done, I can find some native speaker to proofread everything.
|
Ardiloso | Jun 6, 2020 | |||||
You are doing a great job. This text sound is really annoying though, any chances you do a separate patch without it? I couldn't finish the video. |
nanash1 | Jun 7, 2020 | |||||
Thanks. It's probably possible. I already disabled the sound by accident once while messing with other stuff. I'll decide when the bulk of the work is done and it's time for fine tuning. |
OriginalName | Jun 12, 2020 | |||||
Hey! I'm a native English speaker and have worked as a journalist and creative writer for many years. If it helps, I also lived in Japan for three years and am conversational in Japanese. I'd love to help you out with this! |
nanash1 | Jun 12, 2020 | |||||
Thanks for the offer! I'll send you the script once I'm done transcribing it. Since my last update I've focused on the compression used for most of the larger images and I'm mostly done with with that. I've written a compression and decompression function and it seems to be working. I haven't had time to test it on the emulator yet, but my compressed files have the same size as the original ones. They're not identical, but I think that's just because I find different matches in the search buffer since I go backwards through it instead of forwards. I think I've sorted out all the rom hacking stuff now, so the next step is to transcribe all the text in the dialog scenes and find all the images that contain text. Then, once the script is finalized, I can program it into the game. |
rorirub | Jun 12, 2020 | |||
Not sure if you missed it, but I already posted the script translation... |
nanash1 | Jun 12, 2020 | |||
I saw it, but I still need to transcribe the text to see how the Japanese characters correspond to the text commands. I also think it's better to at least check the Japanese text. I don't want to use some random translation without checking it. Additionally the translation wasn't created with inserting the text into the game in mind. For example, it's better to not make the text too long, since it will cause the scenes to run too long. |
nanash1 | Jun 14, 2020 | |||||||
I need some help with the text in one of the opening pictures. The Japanese text in this picture is barely readable and I can't figure out some the Kanjis. Maybe someone with a better grasp of Japanese can identify them from context. Here is what I've transcribed so far, the Kanjis I couldn't read are replaced with question marks. @OriginalName... Maybe you can help? Edit: I think I've figured the text for Appli out. I'm still not sure about the two missing Kanjis in Needles description, but I know they must be some synonym for "royal family" from context and the manual. I guess that's good enough. |
TrekkiesUnite118 | Jun 14, 2020 | |||
If it's not baked into that image, then you can try disabling different layers in an emulator until you get just the text on a black background. That might make it easier to identify the characters. |
1 | 2 | 3 | 4 | Next> |