Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gigaherz

Pages: 1 2 [3] 4 5
51
Q-Gears / Re: Battle script (SCENE.BIN) + more
« on: 2007-01-29 20:01:24 »
Script Length? No length marker that I am aware of I believe since the record size is fixed to 7808 bytes that means that you check if there are any scripts.  Then after that you perform much the same computation as you did to find the compressed file lengths (between scripts) the final one can be done using the end of the record. If you have one script though it means from the offset to the end of record is the AI.  There are a few battles that are like that.  Look at the ProudClod battle that might help.

Cyb

Ok done I had some troubles to figure out WHERE did the offsets start to count from: the first byte of the ai is the first byte of the offsets, so offset=6 is the first byte of actual data!

After that, each AI has a 16-entry script table with the offset counting from the start of the AI, so script_offset=0 would be the first byte of the table.

I have noticed all/most (haven't read all of them) end with a 0x73 byte, so I'm assuming opcode73=RET
Based on that assumption ("all scripts will end with a 0x73") I will also assume all the 0xFF bytes at the end are padding, and I will cut them (else the dump grows to 7mb).

EDIT: I did that, checked the last byte of all the scripts and yes, all of them, without exception, have a 0x73 as the last opcode.

EDIT2: As it's way too big to paste in a code block, I uploaded the output of my program to sendspace in case anyone wants to look at it.

52
Q-Gears / Re: Battle script (SCENE.BIN) + more
« on: 2007-01-29 12:35:19 »
I checked the uncompressed sizes, and ALL of them give me 7808 bytes, without exception. I made a basic "checksum" calculation for the blocks, and most of them give me different values, meaning there is different data, xcept for a few files that are empty (the ones that compress to only 11 words).
From that I deduce your decompression method doesn't work as it should.

OK I defined the structs in the wiki and managed to get coherent enemy info:
Code: [Select]
...
 * File 8: Offset = 1187 words (4748 bytes); Length = 180 words (720 bytes); Uncompressed = 7808; Checksum = 6dd434fc
 * * Enemy IDs: 72, 73, 74
 * * Battle Locations: 67, 67, 67, 67
 * * Enemy 0: Devil Ride  level 13.
 * * Enemy 1: Custom Sweeper  level 15.
 * * Enemy 2: Kalm Fang  level 10.
 * File 9: Offset = 1367 words (5468 bytes); Length = 230 words (920 bytes); Uncompressed = 7808; Checksum = 35f32891
 * * Enemy IDs: 73, 74, 75
 * * Battle Locations: 67, 67, 2, 2
 * * Enemy 0: Custom Sweeper  level 15.
 * * Enemy 1: Kalm Fang  level 10.
 * * Enemy 2: Prowler  level 12.
 * File 10: Offset = 1597 words (6388 bytes); Length = 211 words (844 bytes); Uncompressed = 7808; Checksum = da779ba6
 * * Enemy IDs: 72, 74, 75
 * * Battle Locations: 2, 2, 2, 2
 * * Enemy 0: Devil Ride  level 13.
 * * Enemy 1: Kalm Fang  level 10.
 * * Enemy 2: Prowler  level 12.
...

other names show weird chars so I assume they are either "leftovers" from the japanese version (debug enemies?), or special codes for other things:
Code: [Select]
* File 0: Offset = 16 words (64 bytes); Length = 177 words (708 bytes); Uncompressed = 7808; Checksum = 90385f1c
 * * Enemy IDs: 0, 1, 2
 * * Battle Locations: 0, 4, 0, 49
 * * Enemy 0: œ™0(Š–) level 3.
 * * Enemy 1: œ™1() level 2.
 * * Enemy 2: œ™2(–) level 4.
 * File 1: Offset = 193 words (772 bytes); Length = 112 words (448 bytes); Uncompressed = 7808; Checksum = b7d0083f
 * * Enemy IDs: 4, 5, 6
 * * Battle Locations: 4, 4, 67, 7
 * * Enemy 0: œ™4(‘š) level 6.
 * * Enemy 1: œ™5(‡–™) level 7.
 * * Enemy 2: œ™6(–‰) level 4.
 * File 2: Offset = 305 words (1220 bytes); Length = 197 words (788 bytes); Uncompressed = 7808; Checksum = 995d2f8e
 * * Enemy IDs: 0, 2, 4
 * * Battle Locations: 30, 23, 0, 0
 * * Enemy 0: œ™0(Š–) level 3.
 * * Enemy 1: œ™2(–) level 4.
 * * Enemy 2: œ™4(‘š) level 6.
 * File 3: Offset = 502 words (2008 bytes); Length = 80 words (320 bytes); Uncompressed = 7808; Checksum = 595d3c7e
 * * Enemy IDs: 7, 8, 9
 * * Battle Locations: 0, 0, 0, 0
 * * Enemy 0: œ™7(œ–A) level 4.
 * * Enemy 1: œ™8(œ–B) level 4.
 * * Enemy 2: œ™9(œ–C) level 4.
 * File 5: Offset = 593 words (2372 bytes); Length = 240 words (960 bytes); Uncompressed = 7808; Checksum = 2603d575
 * * Enemy IDs: 0, 57, 58
 * * Battle Locations: 58, 71, 0, 0
 * * Enemy 0: œ™0(Š–) level 3.
 * * Enemy 1: Mighty Grunt  level 12.
 * * Enemy 2: Mighty Grunt  level 12.
 * File 6: Offset = 833 words (3332 bytes); Length = 213 words (852 bytes); Uncompressed = 7808; Checksum = 18288071
 * * Enemy IDs: 0, 1, 172
 * * Battle Locations: 0, 0, 23, 85
 * * Enemy 0: œ™0(Š–) level 3.
 * * Enemy 1: œ™1() level 2.
 * * Enemy 2: Adamantaimai level 30.
 * File 1: Offset = 270 words (1080 bytes); Length = 117 words (468 bytes); Uncompressed = 7808; Checksum = 6fd6f46f
 * * Enemy IDs: 0, -1, -1
 * * Battle Locations: 4, 4, 4, 4
 * * Enemy 0: œ™0(Š–) level 3.
 * File 2: Offset = 387 words (1548 bytes); Length = 287 words (1148 bytes); Uncompressed = 7808; Checksum = c078c605
 * * Enemy IDs: 0, 233, -1
 * * Battle Locations: 37, 4, 4, 4
 * * Enemy 0: œ™0(Š–) level 3.
 * * Enemy 1: Tonberry  level 25.
 * File 2: Offset = 817 words (3268 bytes); Length = 234 words (936 bytes); Uncompressed = 7808; Checksum = 40a26a06
 * * Enemy IDs: 2, 335, -1
 * * Battle Locations: 60, 60, 60, 60
 * * Enemy 0: œ™2(–) level 4.
 * * Enemy 1: Ultimate Weapon level 61.
 * File 4: Offset = 1222 words (4888 bytes); Length = 181 words (724 bytes); Uncompressed = 7808; Checksum = 18ded3fc
 * * Enemy IDs: 0, 2, -1
 * * Battle Locations: 4, 4, 52, 0
 * * Enemy 0: œ™0(Š–) level 3.
 * * Enemy 1: œ™2(–) level 4.

EDIT: I have been trying to figure out how to "get" the script length, but I'm starting to think there isn't any length marker and the scripts just exit when they are done executing...

53
Q-Gears / Re: Battle script (SCENE.BIN) + more
« on: 2007-01-29 01:22:09 »
I coded a small console C++ program to read my scene.bin.
As you can see my sizes are usually smaller than yours. If the info in the wiki is right, then my code is fine (I read the code 20 times to make sure it had no bugs), and my sizes look even more wrong...

Here's my code if you want to try it with your data... it comes with source and exe, and the source should be standard enough to be compilable in any C++ compiler.

You can put it in the same place as scene.bin, or specify the path in the first param.

http://www.sendspace.com/file/mqvy9p

The output of my program:
Code: [Select]
Block 0:
 * File 0: Offset = 16 words (64 bytes); Length = 177 words (708 bytes).
 * File 1: Offset = 193 words (772 bytes); Length = 112 words (448 bytes).
 * File 2: Offset = 305 words (1220 bytes); Length = 197 words (788 bytes).
 * File 3: Offset = 502 words (2008 bytes); Length = 80 words (320 bytes).
 * File 4: Offset = 582 words (2328 bytes); Length = 11 words (44 bytes).
 * File 5: Offset = 593 words (2372 bytes); Length = 240 words (960 bytes).
 * File 6: Offset = 833 words (3332 bytes); Length = 213 words (852 bytes).
 * File 7: Offset = 1046 words (4184 bytes); Length = 141 words (564 bytes).
 * File 8: Offset = 1187 words (4748 bytes); Length = 180 words (720 bytes).
 * File 9: Offset = 1367 words (5468 bytes); Length = 230 words (920 bytes).
 * File 10: Offset = 1597 words (6388 bytes); Length = 211 words (844 bytes).
 * File 11: Offset = 1808 words (7232 bytes); Length = 6384 words (25536 bytes).
Block 1:
 * File 0: Offset = 16 words (64 bytes); Length = 245 words (980 bytes).
 * File 1: Offset = 261 words (1044 bytes); Length = 253 words (1012 bytes).
 * File 2: Offset = 514 words (2056 bytes); Length = 352 words (1408 bytes).
 * File 3: Offset = 866 words (3464 bytes); Length = 328 words (1312 bytes).
 * File 4: Offset = 1194 words (4776 bytes); Length = 311 words (1244 bytes).
 * File 5: Offset = 1505 words (6020 bytes); Length = 6687 words (26748 bytes).
Block 2:
 * File 0: Offset = 16 words (64 bytes); Length = 305 words (1220 bytes).
 * File 1: Offset = 321 words (1284 bytes); Length = 291 words (1164 bytes).
 * File 2: Offset = 612 words (2448 bytes); Length = 343 words (1372 bytes).
 * File 3: Offset = 955 words (3820 bytes); Length = 217 words (868 bytes).
 * File 4: Offset = 1172 words (4688 bytes); Length = 191 words (764 bytes).
 * File 5: Offset = 1363 words (5452 bytes); Length = 197 words (788 bytes).
 * File 6: Offset = 1560 words (6240 bytes); Length = 6632 words (26528 bytes).
Block 3:
 * File 0: Offset = 16 words (64 bytes); Length = 279 words (1116 bytes).
 * File 1: Offset = 295 words (1180 bytes); Length = 362 words (1448 bytes).
 * File 2: Offset = 657 words (2628 bytes); Length = 138 words (552 bytes).
 * File 3: Offset = 795 words (3180 bytes); Length = 173 words (692 bytes).
 * File 4: Offset = 968 words (3872 bytes); Length = 247 words (988 bytes).
 * File 5: Offset = 1215 words (4860 bytes); Length = 273 words (1092 bytes).
 * File 6: Offset = 1488 words (5952 bytes); Length = 275 words (1100 bytes).
 * File 7: Offset = 1763 words (7052 bytes); Length = 6429 words (25716 bytes).
Block 4:
 * File 0: Offset = 16 words (64 bytes); Length = 241 words (964 bytes).
 * File 1: Offset = 257 words (1028 bytes); Length = 148 words (592 bytes).
 * File 2: Offset = 405 words (1620 bytes); Length = 356 words (1424 bytes).
 * File 3: Offset = 761 words (3044 bytes); Length = 436 words (1744 bytes).
 * File 4: Offset = 1197 words (4788 bytes); Length = 237 words (948 bytes).
 * File 5: Offset = 1434 words (5736 bytes); Length = 6758 words (27032 bytes).
Block 5:
 * File 0: Offset = 16 words (64 bytes); Length = 344 words (1376 bytes).
 * File 1: Offset = 360 words (1440 bytes); Length = 360 words (1440 bytes).
 * File 2: Offset = 720 words (2880 bytes); Length = 332 words (1328 bytes).
 * File 3: Offset = 1052 words (4208 bytes); Length = 279 words (1116 bytes).
 * File 4: Offset = 1331 words (5324 bytes); Length = 271 words (1084 bytes).
 * File 5: Offset = 1602 words (6408 bytes); Length = 6590 words (26360 bytes).
Block 6:
 * File 0: Offset = 16 words (64 bytes); Length = 165 words (660 bytes).
 * File 1: Offset = 181 words (724 bytes); Length = 186 words (744 bytes).
 * File 2: Offset = 367 words (1468 bytes); Length = 175 words (700 bytes).
 * File 3: Offset = 542 words (2168 bytes); Length = 266 words (1064 bytes).
 * File 4: Offset = 808 words (3232 bytes); Length = 243 words (972 bytes).
 * File 5: Offset = 1051 words (4204 bytes); Length = 299 words (1196 bytes).
 * File 6: Offset = 1350 words (5400 bytes); Length = 373 words (1492 bytes).
 * File 7: Offset = 1723 words (6892 bytes); Length = 6469 words (25876 bytes).
Block 7:
 * File 0: Offset = 16 words (64 bytes); Length = 403 words (1612 bytes).
 * File 1: Offset = 419 words (1676 bytes); Length = 289 words (1156 bytes).
 * File 2: Offset = 708 words (2832 bytes); Length = 268 words (1072 bytes).
 * File 3: Offset = 976 words (3904 bytes); Length = 252 words (1008 bytes).
 * File 4: Offset = 1228 words (4912 bytes); Length = 211 words (844 bytes).
 * File 5: Offset = 1439 words (5756 bytes); Length = 268 words (1072 bytes).
 * File 6: Offset = 1707 words (6828 bytes); Length = 133 words (532 bytes).
 * File 7: Offset = 1840 words (7360 bytes); Length = 6352 words (25408 bytes).
Block 8:
 * File 0: Offset = 16 words (64 bytes); Length = 96 words (384 bytes).
 * File 1: Offset = 112 words (448 bytes); Length = 141 words (564 bytes).
 * File 2: Offset = 253 words (1012 bytes); Length = 141 words (564 bytes).
 * File 3: Offset = 394 words (1576 bytes); Length = 214 words (856 bytes).
 * File 4: Offset = 608 words (2432 bytes); Length = 98 words (392 bytes).
 * File 5: Offset = 706 words (2824 bytes); Length = 68 words (272 bytes).
 * File 6: Offset = 774 words (3096 bytes); Length = 150 words (600 bytes).
 * File 7: Offset = 924 words (3696 bytes); Length = 159 words (636 bytes).
 * File 8: Offset = 1083 words (4332 bytes); Length = 159 words (636 bytes).
 * File 9: Offset = 1242 words (4968 bytes); Length = 231 words (924 bytes).
 * File 10: Offset = 1473 words (5892 bytes); Length = 248 words (992 bytes).
 * File 11: Offset = 1721 words (6884 bytes); Length = 6471 words (25884 bytes).
Block 9:
 * File 0: Offset = 16 words (64 bytes); Length = 222 words (888 bytes).
 * File 1: Offset = 238 words (952 bytes); Length = 214 words (856 bytes).
 * File 2: Offset = 452 words (1808 bytes); Length = 199 words (796 bytes).
 * File 3: Offset = 651 words (2604 bytes); Length = 264 words (1056 bytes).
 * File 4: Offset = 915 words (3660 bytes); Length = 260 words (1040 bytes).
 * File 5: Offset = 1175 words (4700 bytes); Length = 258 words (1032 bytes).
 * File 6: Offset = 1433 words (5732 bytes); Length = 235 words (940 bytes).
 * File 7: Offset = 1668 words (6672 bytes); Length = 6524 words (26096 bytes).
Block 10:
 * File 0: Offset = 16 words (64 bytes); Length = 321 words (1284 bytes).
 * File 1: Offset = 337 words (1348 bytes); Length = 206 words (824 bytes).
 * File 2: Offset = 543 words (2172 bytes); Length = 148 words (592 bytes).
 * File 3: Offset = 691 words (2764 bytes); Length = 154 words (616 bytes).
 * File 4: Offset = 845 words (3380 bytes); Length = 197 words (788 bytes).
 * File 5: Offset = 1042 words (4168 bytes); Length = 221 words (884 bytes).
 * File 6: Offset = 1263 words (5052 bytes); Length = 223 words (892 bytes).
 * File 7: Offset = 1486 words (5944 bytes); Length = 226 words (904 bytes).
 * File 8: Offset = 1712 words (6848 bytes); Length = 6480 words (25920 bytes).
Block 11:
 * File 0: Offset = 16 words (64 bytes); Length = 245 words (980 bytes).
 * File 1: Offset = 261 words (1044 bytes); Length = 312 words (1248 bytes).
 * File 2: Offset = 573 words (2292 bytes); Length = 126 words (504 bytes).
 * File 3: Offset = 699 words (2796 bytes); Length = 267 words (1068 bytes).
 * File 4: Offset = 966 words (3864 bytes); Length = 228 words (912 bytes).
 * File 5: Offset = 1194 words (4776 bytes); Length = 220 words (880 bytes).
 * File 6: Offset = 1414 words (5656 bytes); Length = 221 words (884 bytes).
 * File 7: Offset = 1635 words (6540 bytes); Length = 6557 words (26228 bytes).
Block 12:
 * File 0: Offset = 16 words (64 bytes); Length = 240 words (960 bytes).
 * File 1: Offset = 256 words (1024 bytes); Length = 239 words (956 bytes).
 * File 2: Offset = 495 words (1980 bytes); Length = 426 words (1704 bytes).
 * File 3: Offset = 921 words (3684 bytes); Length = 164 words (656 bytes).
 * File 4: Offset = 1085 words (4340 bytes); Length = 373 words (1492 bytes).
 * File 5: Offset = 1458 words (5832 bytes); Length = 312 words (1248 bytes).
 * File 6: Offset = 1770 words (7080 bytes); Length = 6422 words (25688 bytes).
Block 13:
 * File 0: Offset = 16 words (64 bytes); Length = 180 words (720 bytes).
 * File 1: Offset = 196 words (784 bytes); Length = 275 words (1100 bytes).
 * File 2: Offset = 471 words (1884 bytes); Length = 267 words (1068 bytes).
 * File 3: Offset = 738 words (2952 bytes); Length = 245 words (980 bytes).
 * File 4: Offset = 983 words (3932 bytes); Length = 231 words (924 bytes).
 * File 5: Offset = 1214 words (4856 bytes); Length = 242 words (968 bytes).
 * File 6: Offset = 1456 words (5824 bytes); Length = 190 words (760 bytes).
 * File 7: Offset = 1646 words (6584 bytes); Length = 228 words (912 bytes).
 * File 8: Offset = 1874 words (7496 bytes); Length = 6318 words (25272 bytes).
Block 14:
 * File 0: Offset = 16 words (64 bytes); Length = 214 words (856 bytes).
 * File 1: Offset = 230 words (920 bytes); Length = 268 words (1072 bytes).
 * File 2: Offset = 498 words (1992 bytes); Length = 227 words (908 bytes).
 * File 3: Offset = 725 words (2900 bytes); Length = 298 words (1192 bytes).
 * File 4: Offset = 1023 words (4092 bytes); Length = 174 words (696 bytes).
 * File 5: Offset = 1197 words (4788 bytes); Length = 172 words (688 bytes).
 * File 6: Offset = 1369 words (5476 bytes); Length = 340 words (1360 bytes).
 * File 7: Offset = 1709 words (6836 bytes); Length = 6483 words (25932 bytes).
Block 15:
 * File 0: Offset = 16 words (64 bytes); Length = 173 words (692 bytes).
 * File 1: Offset = 189 words (756 bytes); Length = 212 words (848 bytes).
 * File 2: Offset = 401 words (1604 bytes); Length = 171 words (684 bytes).
 * File 3: Offset = 572 words (2288 bytes); Length = 248 words (992 bytes).
 * File 4: Offset = 820 words (3280 bytes); Length = 196 words (784 bytes).
 * File 5: Offset = 1016 words (4064 bytes); Length = 217 words (868 bytes).
 * File 6: Offset = 1233 words (4932 bytes); Length = 261 words (1044 bytes).
 * File 7: Offset = 1494 words (5976 bytes); Length = 194 words (776 bytes).
 * File 8: Offset = 1688 words (6752 bytes); Length = 6504 words (26016 bytes).
Block 16:
 * File 0: Offset = 16 words (64 bytes); Length = 245 words (980 bytes).
 * File 1: Offset = 261 words (1044 bytes); Length = 174 words (696 bytes).
 * File 2: Offset = 435 words (1740 bytes); Length = 206 words (824 bytes).
 * File 3: Offset = 641 words (2564 bytes); Length = 325 words (1300 bytes).
 * File 4: Offset = 966 words (3864 bytes); Length = 163 words (652 bytes).
 * File 5: Offset = 1129 words (4516 bytes); Length = 213 words (852 bytes).
 * File 6: Offset = 1342 words (5368 bytes); Length = 224 words (896 bytes).
 * File 7: Offset = 1566 words (6264 bytes); Length = 6626 words (26504 bytes).
Block 17:
 * File 0: Offset = 16 words (64 bytes); Length = 249 words (996 bytes).
 * File 1: Offset = 265 words (1060 bytes); Length = 298 words (1192 bytes).
 * File 2: Offset = 563 words (2252 bytes); Length = 252 words (1008 bytes).
 * File 3: Offset = 815 words (3260 bytes); Length = 127 words (508 bytes).
 * File 4: Offset = 942 words (3768 bytes); Length = 194 words (776 bytes).
 * File 5: Offset = 1136 words (4544 bytes); Length = 266 words (1064 bytes).
 * File 6: Offset = 1402 words (5608 bytes); Length = 172 words (688 bytes).
 * File 7: Offset = 1574 words (6296 bytes); Length = 182 words (728 bytes).
 * File 8: Offset = 1756 words (7024 bytes); Length = 6436 words (25744 bytes).
Block 18:
 * File 0: Offset = 16 words (64 bytes); Length = 282 words (1128 bytes).
 * File 1: Offset = 298 words (1192 bytes); Length = 215 words (860 bytes).
 * File 2: Offset = 513 words (2052 bytes); Length = 150 words (600 bytes).
 * File 3: Offset = 663 words (2652 bytes); Length = 306 words (1224 bytes).
 * File 4: Offset = 969 words (3876 bytes); Length = 222 words (888 bytes).
 * File 5: Offset = 1191 words (4764 bytes); Length = 205 words (820 bytes).
 * File 6: Offset = 1396 words (5584 bytes); Length = 258 words (1032 bytes).
 * File 7: Offset = 1654 words (6616 bytes); Length = 199 words (796 bytes).
 * File 8: Offset = 1853 words (7412 bytes); Length = 6339 words (25356 bytes).
Block 19:
 * File 0: Offset = 16 words (64 bytes); Length = 284 words (1136 bytes).
 * File 1: Offset = 300 words (1200 bytes); Length = 228 words (912 bytes).
 * File 2: Offset = 528 words (2112 bytes); Length = 231 words (924 bytes).
 * File 3: Offset = 759 words (3036 bytes); Length = 179 words (716 bytes).
 * File 4: Offset = 938 words (3752 bytes); Length = 325 words (1300 bytes).
 * File 5: Offset = 1263 words (5052 bytes); Length = 161 words (644 bytes).
 * File 6: Offset = 1424 words (5696 bytes); Length = 237 words (948 bytes).
 * File 7: Offset = 1661 words (6644 bytes); Length = 6531 words (26124 bytes).
Block 20:
 * File 0: Offset = 16 words (64 bytes); Length = 279 words (1116 bytes).
 * File 1: Offset = 295 words (1180 bytes); Length = 320 words (1280 bytes).
 * File 2: Offset = 615 words (2460 bytes); Length = 316 words (1264 bytes).
 * File 3: Offset = 931 words (3724 bytes); Length = 267 words (1068 bytes).
 * File 4: Offset = 1198 words (4792 bytes); Length = 292 words (1168 bytes).
 * File 5: Offset = 1490 words (5960 bytes); Length = 6702 words (26808 bytes).
Block 21:
 * File 0: Offset = 16 words (64 bytes); Length = 321 words (1284 bytes).
 * File 1: Offset = 337 words (1348 bytes); Length = 328 words (1312 bytes).
 * File 2: Offset = 665 words (2660 bytes); Length = 329 words (1316 bytes).
 * File 3: Offset = 994 words (3976 bytes); Length = 194 words (776 bytes).
 * File 4: Offset = 1188 words (4752 bytes); Length = 239 words (956 bytes).
 * File 5: Offset = 1427 words (5708 bytes); Length = 237 words (948 bytes).
 * File 6: Offset = 1664 words (6656 bytes); Length = 6528 words (26112 bytes).
Block 22:
 * File 0: Offset = 16 words (64 bytes); Length = 283 words (1132 bytes).
 * File 1: Offset = 299 words (1196 bytes); Length = 159 words (636 bytes).
 * File 2: Offset = 458 words (1832 bytes); Length = 226 words (904 bytes).
 * File 3: Offset = 684 words (2736 bytes); Length = 254 words (1016 bytes).
 * File 4: Offset = 938 words (3752 bytes); Length = 309 words (1236 bytes).
 * File 5: Offset = 1247 words (4988 bytes); Length = 224 words (896 bytes).
 * File 6: Offset = 1471 words (5884 bytes); Length = 6721 words (26884 bytes).
Block 23:
 * File 0: Offset = 16 words (64 bytes); Length = 328 words (1312 bytes).
 * File 1: Offset = 344 words (1376 bytes); Length = 255 words (1020 bytes).
 * File 2: Offset = 599 words (2396 bytes); Length = 221 words (884 bytes).
 * File 3: Offset = 820 words (3280 bytes); Length = 290 words (1160 bytes).
 * File 4: Offset = 1110 words (4440 bytes); Length = 267 words (1068 bytes).
 * File 5: Offset = 1377 words (5508 bytes); Length = 224 words (896 bytes).
 * File 6: Offset = 1601 words (6404 bytes); Length = 277 words (1108 bytes).
 * File 7: Offset = 1878 words (7512 bytes); Length = 6314 words (25256 bytes).
Block 24:
 * File 0: Offset = 16 words (64 bytes); Length = 222 words (888 bytes).
 * File 1: Offset = 238 words (952 bytes); Length = 178 words (712 bytes).
 * File 2: Offset = 416 words (1664 bytes); Length = 321 words (1284 bytes).
 * File 3: Offset = 737 words (2948 bytes); Length = 190 words (760 bytes).
 * File 4: Offset = 927 words (3708 bytes); Length = 249 words (996 bytes).
 * File 5: Offset = 1176 words (4704 bytes); Length = 198 words (792 bytes).
 * File 6: Offset = 1374 words (5496 bytes); Length = 205 words (820 bytes).
 * File 7: Offset = 1579 words (6316 bytes); Length = 6613 words (26452 bytes).
Block 25:
 * File 0: Offset = 16 words (64 bytes); Length = 328 words (1312 bytes).
 * File 1: Offset = 344 words (1376 bytes); Length = 232 words (928 bytes).
 * File 2: Offset = 576 words (2304 bytes); Length = 121 words (484 bytes).
 * File 3: Offset = 697 words (2788 bytes); Length = 302 words (1208 bytes).
 * File 4: Offset = 999 words (3996 bytes); Length = 224 words (896 bytes).
 * File 5: Offset = 1223 words (4892 bytes); Length = 225 words (900 bytes).
 * File 6: Offset = 1448 words (5792 bytes); Length = 176 words (704 bytes).
 * File 7: Offset = 1624 words (6496 bytes); Length = 151 words (604 bytes).
 * File 8: Offset = 1775 words (7100 bytes); Length = 6417 words (25668 bytes).
Block 26:
 * File 0: Offset = 16 words (64 bytes); Length = 295 words (1180 bytes).
 * File 1: Offset = 311 words (1244 bytes); Length = 248 words (992 bytes).
 * File 2: Offset = 559 words (2236 bytes); Length = 257 words (1028 bytes).
 * File 3: Offset = 816 words (3264 bytes); Length = 285 words (1140 bytes).
 * File 4: Offset = 1101 words (4404 bytes); Length = 277 words (1108 bytes).
 * File 5: Offset = 1378 words (5512 bytes); Length = 319 words (1276 bytes).
 * File 6: Offset = 1697 words (6788 bytes); Length = 6495 words (25980 bytes).
Block 27:
 * File 0: Offset = 16 words (64 bytes); Length = 268 words (1072 bytes).
 * File 1: Offset = 284 words (1136 bytes); Length = 291 words (1164 bytes).
 * File 2: Offset = 575 words (2300 bytes); Length = 372 words (1488 bytes).
 * File 3: Offset = 947 words (3788 bytes); Length = 413 words (1652 bytes).
 * File 4: Offset = 1360 words (5440 bytes); Length = 6832 words (27328 bytes).
Block 28:
 * File 0: Offset = 16 words (64 bytes); Length = 388 words (1552 bytes).
 * File 1: Offset = 404 words (1616 bytes); Length = 351 words (1404 bytes).
 * File 2: Offset = 755 words (3020 bytes); Length = 303 words (1212 bytes).
 * File 3: Offset = 1058 words (4232 bytes); Length = 319 words (1276 bytes).
 * File 4: Offset = 1377 words (5508 bytes); Length = 6815 words (27260 bytes).
Block 29:
 * File 0: Offset = 16 words (64 bytes); Length = 366 words (1464 bytes).
 * File 1: Offset = 382 words (1528 bytes); Length = 404 words (1616 bytes).
 * File 2: Offset = 786 words (3144 bytes); Length = 438 words (1752 bytes).
 * File 3: Offset = 1224 words (4896 bytes); Length = 447 words (1788 bytes).
 * File 4: Offset = 1671 words (6684 bytes); Length = 6521 words (26084 bytes).
Block 30:
 * File 0: Offset = 16 words (64 bytes); Length = 464 words (1856 bytes).
 * File 1: Offset = 480 words (1920 bytes); Length = 463 words (1852 bytes).
 * File 2: Offset = 943 words (3772 bytes); Length = 448 words (1792 bytes).
 * File 3: Offset = 1391 words (5564 bytes); Length = 253 words (1012 bytes).
 * File 4: Offset = 1644 words (6576 bytes); Length = 6548 words (26192 bytes).
Block 31:
 * File 0: Offset = 16 words (64 bytes); Length = 254 words (1016 bytes).
 * File 1: Offset = 270 words (1080 bytes); Length = 117 words (468 bytes).
 * File 2: Offset = 387 words (1548 bytes); Length = 287 words (1148 bytes).
 * File 3: Offset = 674 words (2696 bytes); Length = 267 words (1068 bytes).
 * File 4: Offset = 941 words (3764 bytes); Length = 231 words (924 bytes).
 * File 5: Offset = 1172 words (4688 bytes); Length = 136 words (544 bytes).
 * File 6: Offset = 1308 words (5232 bytes); Length = 353 words (1412 bytes).
 * File 7: Offset = 1661 words (6644 bytes); Length = 6531 words (26124 bytes).
Block 32:
 * File 0: Offset = 16 words (64 bytes); Length = 500 words (2000 bytes).
 * File 1: Offset = 516 words (2064 bytes); Length = 301 words (1204 bytes).
 * File 2: Offset = 817 words (3268 bytes); Length = 234 words (936 bytes).
 * File 3: Offset = 1051 words (4204 bytes); Length = 171 words (684 bytes).
 * File 4: Offset = 1222 words (4888 bytes); Length = 181 words (724 bytes).
 * File 5: Offset = 1403 words (5612 bytes); Length = 11 words (44 bytes).
 * File 6: Offset = 1414 words (5656 bytes); Length = 11 words (44 bytes).
 * File 7: Offset = 1425 words (5700 bytes); Length = 11 words (44 bytes).
 * File 8: Offset = 1436 words (5744 bytes); Length = 11 words (44 bytes).
 * File 9: Offset = 1447 words (5788 bytes); Length = 11 words (44 bytes).
 * File 10: Offset = 1458 words (5832 bytes); Length = 6734 words (26936 bytes).

EDIT: I have made the program dump the first 16 bytes of data, and I have noticed all the file data starts directly with the gzip info (1f 8b 08 00 ...), so I'm pretty much sure my code works fine.
That also means either the gzip structure has some means to know when it's done, or there is just no way to know it, except for the total padded length.
Talking about gzip, I'm assuming it's the same gzip you can find in zlib, else I don't know what is it...

EDIT2: ok it is, I modified the extractor function from qgears to inflate the data to save time. :p
Now my program can dump the uncompressed data to a file. I will look at the data structures and see if I can make them show logically coherent info.

54
Q-Gears / Re: Battle script (SCENE.BIN) + more
« on: 2007-01-27 02:50:01 »
Get vmware, virtualpc or qemu, install some XP on it, and you will have a nice virtual machine to test things on... :P

I tried it but as I'm clueless on the data is should have, I can't tell. :/

55
Q-Gears / Re: Battle script (SCENE.BIN) + more
« on: 2007-01-23 17:12:40 »
You can try to upload it at sendspace... it's not a permament hosting but it works...

56
Q-Gears / Re: Hi guys, me again...
« on: 2007-01-19 17:38:49 »
You can get Dev-c++ (dev-cpp) and compile with it.

57
Q-Gears / Re: Back to the ISO system
« on: 2007-01-06 16:07:54 »
There is a simple write to do that.

first write a (simple) function with the same params as printf + an extra "level" param, like log(int leve, char *fmt, ...)
then define the constants
or use an enum:
#define MSG_INFO 0
#define MSG_WARNING 1
#define MSG_ERROR 2
#define MSG_CRITICAL 3

then the user coudl specify the "logging level" and "console logging level", where the default settings would be 0 to file and 2 to console, for debug/testing builds, could be 2,2 or 2,3 for "release" builds.

then the log function would decide what to do:
if the file log couldn't be open it should write a warning to the console, and then set the console logging to min(file_level,console_level).

58
Q-Gears / Re: field specs...
« on: 2007-01-01 13:04:52 »
ADPCM (Sony will sue you for mispelling it really! ;) )

It's not like if ADPCM was a sony name... there are many other ADPCM implementations not by Sony. The D in the name means "Differential" or sometimes "Delta" (same meaning) because the data in the samples gets decoded as a "difference" from the last sample. The format the PSX (and PS2) use is XA ADPCM, and is the same audio compression in the CD/XA specification.
One of the other projects I work on is a SPU2 plugin for ps2 emulators (basically only pcsx2 now), I haven't released it publicly yet, tho.
If someone has "decoded" the instrument files in the FF7 data, or the sound effects files, it wouldn't be too hard for me to code a "note renderer" for it... someday (I'm kinda busy with another project now).

59
Q-Gears / Re: Q-Gears.0.10
« on: 2006-12-18 23:43:57 »
Oh yeh... vc isn't able to allocate a fixed-size array from a variable... :/

c:\qgears\svn_original\src\ffvii\worldmap\mapfile.cpp(38) : error C2057: expected constant expression
c:\qgears\svn_original\src\ffvii\worldmap\mapfile.cpp(38) : error C2466: cannot allocate an array of constant size 0
c:\qgears\svn_original\src\ffvii\worldmap\mapfile.cpp(38) : error C2133: 'cell_data' : unknown size

EDIT: updated the vs2005 files for the latest source changes and added a missing "return ret;"

60
Q-Gears / Re: Hello! I am G ;)
« on: 2006-12-18 19:36:51 »
I learn Japanese (in a crappy way) by watching RAW anime :P

Depending on the anime you watch, that could be bad... you could end up speaking like a young girl or something like that.  :P

61
Q-Gears / Re: Q-Gears.0.10
« on: 2006-12-18 19:31:13 »
You should also make sure all files get loaded correctly, maybe it tries to load a lsz you haven't copied from the psx cd, or maybe some dir is wrong...

62
Q-Gears / Re: Create branch.
« on: 2006-12-15 21:28:40 »
If you put it that way... :P

But i doesn't need to be that way, I mean let me explain:
Without branching, when a dev wants to "try" something without breaking the trunk, he needs to keep the code local until it's stable enough to commit, but if the dev wants to keep the code online, and still keep the trunk clean, then branching seems the only option.

I can propose something else too: do it the other way around.
When a milestone is reached, create a branch with the "working" code of that milestone (so it can be bugfixed later and release a revised version without any experimental code in it), and keep the current code in the trunk, where the devs would continue working.

63
Q-Gears / Re: Create branch.
« on: 2006-12-15 17:10:23 »
I never used it yet, but TortoiseSVN has an option to merge. From what I deduced, it lets you tell the two branches you want to merge and which was the revision number they had when they got branched, then it tries to merge all changes together, and tells you of the conflicts.
I don't know if the normal SVN distribution has that feature, but if it does, then I don't see any big troubles with merging branches into trunk when needed. The only problem would be if the changes break too much the rest of the code, so the other changes need to be adapted or rewritten to work on the new base... andthat should NOT happen too often.

64
Q-Gears / Re: File system.
« on: 2006-12-14 23:08:28 »
It's jut my oppinion but I would use packed structs to read the data, and declare all unknown data as unknownX vars, this way you don't have to mess with offsets at all, just do something like:
Code: [Select]
struct some_data_struct {
    int8 field1;
    int16 field2;
};

some_data_struct sd;
f.Read(&sd,sizeof(sd));

or if you prefer dynamic objects:
Code: [Select]
some_data_struct *sd=(some_data_struct *)f.AllocAndRead(sizeof(sd));

this last one is a bit exotic though.
The only problem is the way to tell how to pack changes from compiler to compiler...

65
Q-Gears / Re: About SDL_main in Main.cpp.
« on: 2006-12-14 20:10:59 »
I did that... I didn't know about SDL_main.h, and the code worked fine without anything else in the other compilers, so instead of risking it to break the other compilers, I #ifdef'ed it. If including SDL_main.h makes it works without the #ifdef, then I will fix it.

66
Q-Gears / Re: Hello! I am G ;)
« on: 2006-12-13 15:33:24 »
That reminds me why I gave up trying to learn jap... too many things for my tiny patience.

67
Q-Gears / Re: Warning Code comments ;)
« on: 2006-12-12 13:06:50 »
gigaherz: naming convention depends on users. I saw few of conventions and each was hated by someone else ;)
I know, but I still think using _ in identifiers seems like wasting chars... :p

If you are defining 'int' constants which you want to use in the definition of code (for example as size of the array) then const would not work, in that case I suggest to define it as in enumerate.
If you can't use a const var in an array declaration, then it's an horrible flaw in the language. A const should be handled internally, replacing it in constant expressions or reading it from memory where it's better, but I suppose the definition for a "const" in C/C++ is just a variable that can't be written (so it's no longer variable)...

68
Q-Gears / Re: Warning Code comments ;)
« on: 2006-12-12 12:32:54 »
I don't really like macros at all. In C/C++ they are still better than constants, but I agree with what someone told me, that macros is are an old feature for when compilers weren't complex enough, and that they should be mostly gone already (you should be able to use consts isntead of numeric defines and inline functions instead of macros in most cases).
Anyway there is something else I don't like in those examples: using _ in the constant/variable/function names, it looks just bad (IMO). I would do thing like someName or SomeName instead.

69
Q-Gears / Re: OpenGL?
« on: 2006-12-03 15:24:15 »
someone could port mesaGL to the GP2x, or write a software renderer, doesn't need to be any of us tho :P

70
Q-Gears / Re: OpenGL?
« on: 2006-12-02 20:03:18 »
Obviously... if there is a software renderer, it will help. The project has the rendering part in separate objects so it's not hard to change the rendering API, or build a software renderer in it.

71
Q-Gears / Re: Q-Gears.0.09
« on: 2006-12-01 22:04:48 »
Hey I have tried to build the svn source, but I'm getting lots of errors from missing members, most of them from Geometry, TotalGeometry and Display, I'm not sure if it's some wrong file in the project or what

72
Q-Gears / Re: Q-Gears.0.09
« on: 2006-11-30 19:19:29 »
q-gears/ff7 needs the PS1 game files, pc data files aren't supported yet

73
Q-Gears / Re: To Do
« on: 2006-11-24 23:47:17 »
Ok... I hope this doesn't break everything!

Oops I just noticed the opcodes.txt file in there, I will have to update it :P

OK, I have managed to fix the crashes when running the program, it was some "data/" parts getting in the way and making it load from "data/data/". Now I'm not sure if the svn is "broken" and doesn't have the code for the gateways, or it's a problem with vs2005...

74
Q-Gears / Re: To Do
« on: 2006-11-24 14:18:46 »
Just to say, I have been coding the math opcodes, so now everything from 7F to 9C is there... the problem is the code doesn't work well with vs2005 now, and I'm not sure what's the problem... so until I'm sure it works fine, I'm not commiting anything (also I prefer to let Akari update to 0.9 so if something is wrong with my changes, I can fix it).

75
Q-Gears / Re: Q-Gears.0.09
« on: 2006-11-24 00:00:08 »
Are you going to be implementing a view window soon? Even though it would be nice to run in 640x480, the actual field window is only 320x240, (or around there, I think I'm +/- a few pixels) and we really don't have the graphical data to display them full screen like that.



Can't you just scale everything to 2x? I know the backgrounds will look pixelated (texture filtering could be used but then the pink/green/yellow areas whatever colors it uses might be a problem), but it seems better than just showing a huge black border arround :P

Anyway, this is getting really nice... :)

Pages: 1 2 [3] 4 5