Kuribo64
Views: 23,105,646 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
12-06-24 07:46 PM
Guest:

0 users reading Editor development | 3 bots

Main - General SM64DS hacking - Editor development Hide post layouts | New reply

Pages: 1 2 3 4 5 6 7 8 9 10 ... 27 28 29 30 31
Skelux
Posted on 04-15-13 06:49 AM (rev. 3 of 04-15-13 07:59 AM) Link | #20445
Jolly Roger Bay (Inside Ship)

Edit: I forgot to mention one thing. If I replace all the strings from the credits with blank space, the dialog file becomes bigger, so how can it be that the original is replaced?
Edit 2: I recompiled r45 and edited one string, but CCC did not freeze. I may have just accidentally changed something, I'll add in all the strings and see how it goes.

Fiachra
Posted on 04-15-13 08:14 AM (rev. 2 of 04-15-13 08:15 AM) Link | #20448
Posted by Skelux
Edit: I forgot to mention one thing. If I replace all the strings from the credits with blank space, the dialog file becomes bigger, so how can it be that the original is replaced?

Can you try the latest one? I made a mistake with shrinking entries, forgot that lengthDif was negative, so I was adding it instead of subtracting, meaning that smaller entries were doubling the size of an entry.

Skelux
Posted on 04-15-13 10:23 AM Link | #20450
False alarm, it's still not working, I was just editing the french text.

Fiachra
Posted on 04-15-13 10:32 AM Link | #20451
Does it happen every time any string is read in CCC? Does it read an unedited version fine? If so, what if you edit an entry not referenced by CCC?
I put a sign in JRB Ship reading an edited string 0 and it displayed.

Skelux
Posted on 04-15-13 10:34 AM (rev. 2 of 04-15-13 10:35 AM) Link | #20452
Simply editing any string with r44+ makes the level crash on entry (white screen). If I open it again after this in r42 and save any one string, the level will cease crashing on entry. Also, removing 90% of objects in the level prevents it from crashing even after being edited in r44.

Fiachra
Posted on 04-15-13 11:04 AM Link | #20453
The difference I can see is that r42 pads the end of each entry with zeroes because it overestiamtes the new string length, meaning offsets are shifted forward as well but I don't see how that would crash it.

I noticed the end of the file has nine FF bytes that r42 removes, r44+ doesn't and after saving r44's version with r42 they are removed. Can you try manually removing them and testing if your level crashes?

Skelux
Posted on 04-15-13 01:05 PM (rev. 5 of 04-15-13 01:54 PM) Link | #20457
It made no difference. Where is the address 0x08 into the file supposed to point to? It looks like it was supposed to point to the end of the file, but it's off by about 0x1000+ only in my star road rom. I tried correcting it but it made no difference.

Edit 1: I found msg_data_eng.bin in the rom's file table and setting it to end halfway through the file made CCC work, so It is again looking like a size issue. I am starting to suspect that a whole heap of padding has ended up in there somehow, but it is definitely not at the end of the file (not much of it, anyway).

Fiachra
Posted on 04-15-13 03:06 PM Link | #20463
Mega-Mario's Documentation:

BMG files hold the message (text) data. They are originally LZ77 compressed, with the 'LZ77' string at the beginning, but can be reinserted without compression, pretty much like any file in SM64DS's file system. Well, you quickly get why they are compressed: they're above 80k raw, and compression halves their size

Once decompressed, the file begins with the following 32 byte long header:
0x00 [4b]: GSEM (0x4D455347)
0x04 [4b]: 1mgb (0x626D6731)
0x08 [4b]: size of the whole file
0x0C [4b]: number of sections? always 2
0x10 [4b]: ???
0x14 [12b]: zero

Followed by the INF1 section, which tells where each string is in the file. The section begins with a 16 byte header:
0x00 [4b]: 1FNI (0x494E4631)
0x04 [4b]: size of the whole section
0x08 [2b]: number of string entries
0x0A [2b]: ???
0x0C [4b]: zero
Followed by as many entries as said in the header. Each entry is 8 bytes long and laid out as such:
0x00 [4b]: offset to string data, relative from the end of the DAT1 section header (see below)
0x04 [2b]: ???
0x06 [2b]: ???

Now comes the meat: the DAT1 section. It's started by a 8 byte long header:
0x00 [4b]: 1TAD (0x44414531)
0x04 [4b]: size of the whole section
And the string data. At this point, you're just past the DAT1 section header, and the string offsets in the INF1 sections are relative from here.

String data is not ASCII. Each byte represents the corresponding character in the alphabets posted above. For example, 0x00 is a '0', 0x0C is a 'C', 0x20 is a 'W', and 0x33 is a 'a'.
There are also some special bytes, which are not characters. Here are the main ones:
0xFF: end of string data
0xFD: linebreak
0xFE: special code begin

Known special codes (0xFE character included, listed as hex):
FE 05 03 00 00 - D-pad glyph
FE 05 03 00 01 - (A) glyph
FE 05 03 00 02 - (B) glyph
FE 05 03 00 03 - (X) glyph
FE 05 03 00 04 - (Y) glyph
FE 05 03 00 05 - (L] glyph
FE 05 03 00 06 - [R) glyph
FE 07 01 00 00 00 XX - number of stars till you get XX
FE 07 01 00 00 02 XX - number of glowing rabbits till you have caught XX

0x08 is the entire file size. I simply read it and add/subtract the difference in length of the new string, same with DAT1 + 0x04.
I may add the option to import/export strings from TXT/XML to help with situations like this.

Skelux
Posted on 04-16-13 07:38 AM (rev. 2 of 04-16-13 07:43 AM) Link | #20615
I finally fixed it, there was an error in the compression caused by me continually resetting the dialog file and changing things, making the file decompress to a very large size. I reverted everything correctly this time, edited some strings and it worked.

Since that is resolved, I'll tell you that strings with special commands such as this one do not compile correctly:

Save now?

[0xFE]5200[0xFE]5202 Save and continue
[0xFE]5202 Save and play mini-games
[0xFE]5202 Continue, don't save

Fiachra
Posted on 04-16-13 07:49 AM Link | #20616
Hooray!

I know, I'm actually working on that at the minute.

Skelux
Posted on 04-16-13 08:06 AM Link | #20617
Also, this: http://www3.mediafire.com/convkey/2f64/dak3bg325hjcwni9g.jpg

I'll work on finding some more useful patches to add to the list now.

Fiachra
Posted on 04-16-13 08:16 AM Link | #20618
OK, will merge 3 and 4 again. (In the meantime setting param. 4 to F4 should work).

Thanks.

Skelux
Posted on 04-16-13 08:36 AM Link | #20619
Do you know where I can find Yoshi's model? I had an idea for making Bowser playable with working animations.

Fiachra
Posted on 04-16-13 08:48 AM Link | #20620
Posted by Skelux
Do you know where I can find Yoshi's model? I had an idea for making Bowser playable with working animations.

Yoshi's and other players' models are in ARCHIVE/arc0.narc/data/Player.

Skelux
Posted on 04-16-13 10:14 AM (rev. 2 of 04-16-13 10:14 AM) Link | #20623
---All Minigames Unlocked---
EUR: ROM 0x13644 to 0xFF00A0E3
US: ROM 0x13520 to 0xFF00A0E3
US 1.1: ROM 0x13598 to 0xFF00A0E3
JAP: ROM 0x13598 to 0xFF00A0E3

I am trying to swap run and walk so you hold Y to walk, but so far I've only got this:
0209D51C - Button Activator 1 (EUR)
022EC79C - Button Activator 2 (EUR)

Fiachra
Posted on 04-16-13 10:44 AM (rev. 3 of 04-16-13 12:38 PM) Link | #20624
OK, thanks, I'll add that to the list.

Would this AR code be helpful (EUR)?

Press L=Up to run at light speed:
94000130 FDBF0000
6209B450 00000000
B209B450 00000000
00000098 1000FFFF
D2000000 00000000

I'll start a new thread where patches can be posted.

Rev. 47 (16/04/2013)
- Improved/fixed and much easier handling of special characters within text editor
- Import and export text strings to XML

Skelux
Posted on 04-17-13 11:01 AM Link | #20708
The most recent revision crashes when you open Lethal Lava Land, unless it's just me.

Fiachra
Posted on 04-17-13 11:10 AM Link | #20711
Posted by Skelux
The most recent revision crashes when you open Lethal Lava Land, unless it's just me.

It works fine for me. Have you edited the level at all?

AdrienTD
Posted on 04-17-13 01:47 PM Link | #20714
Posted by Fiachra
Posted by Skelux
The most recent revision crashes when you open Lethal Lava Land, unless it's just me.

It works fine for me. Have you edited the level at all?

Me too. When I open Lethal Lava Land, an exception dialog displays that the program was trying to read a non existent file in the ROM. The problem was in the code that renders the puzzle tiles.

Fiachra
Posted on 04-17-13 02:12 PM Link | #20715
Should be fine now. I had made changes to LevelObject.cs and then reverted back but forgot to commit the changes.
Pages: 1 2 3 4 5 6 7 8 9 10 ... 27 28 29 30 31

Main - General SM64DS hacking - Editor development Hide post layouts | New reply

Page rendered in 0.034 seconds. (2048KB of memory used)
MySQL - queries: 28, rows: 234/234, time: 0.016 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.