Jul 5, 2006 at 2:11 AM
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
I found out something. Turns out each *channel* is 0x70 bytes in length, not each sound. This means it's impossible to add channels to a sound without altering the pointers I mentionned in my first post. A bit of a bummer, but most sounds use 2 channels anyhow.
So! At the bottom of the pxt file, there are 4 rows of values between curly brackets. This is the data for each of the 4 channels. Each value in a channel is converted in-game to a 4-byte value (except for floating point numerals; those 0.50 or 2.00 things.) Floating point numerals, I'm not quite sure yet. 5.00 is 00 00 00 00 00 00 00 00 00 00 14 40, for instance. Exactly how it gets to that, I dunno.
Also, the final 32 bit value is padded with 0.
I tried that, and now it works fine.
(for those of you looking for a pointer table, I'll have one in a few moments...)
Edit
ID 0x01 [1 channel(s)]: 0x00907b0
ID 0x02 [1 channel(s)]: 0x00909e0
ID 0x03 [1 channel(s)]: 0x00934c0
ID 0x04 [1 channel(s)]: 0x0090890
ID 0x05 [1 channel(s)]: 0x0090660
ID 0x06 [1 channel(s)]: 0x0093530
ID 0x07 [1 channel(s)]: 0x00935a0
ID 0x0b [1 channel(s)]: 0x0090740
ID 0x0c [2 channel(s)]: 0x0090c80
ID 0x0e [1 channel(s)]: 0x0090a50
ID 0x0f [1 channel(s)]: 0x008fbe0
ID 0x10 [2 channel(s)]: 0x0090350
ID 0x11 [3 channel(s)]: 0x0090430
ID 0x12 [1 channel(s)]: 0x0090820
ID 0x14 [2 channel(s)]: 0x0090900
ID 0x15 [1 channel(s)]: 0x0090c10
ID 0x16 [1 channel(s)]: 0x00906d0
ID 0x17 [1 channel(s)]: 0x008fcc0
ID 0x18 [1 channel(s)]: 0x008fc50
ID 0x19 [2 channel(s)]: 0x0090d60
ID 0x1a [2 channel(s)]: 0x0090b30
ID 0x1b [1 channel(s)]: 0x0090e40
ID 0x1c [2 channel(s)]: 0x00910e0
ID 0x1d [1 channel(s)]: 0x00911c0
ID 0x1e [1 channel(s)]: 0x0091ee0
ID 0x1f [1 channel(s)]: 0x0091310
ID 0x20 [2 channel(s)]: 0x008f940
ID 0x21 [2 channel(s)]: 0x008fa20
ID 0x22 [2 channel(s)]: 0x008fb00
ID 0x23 [3 channel(s)]: 0x0090eb0
ID 0x25 [2 channel(s)]: 0x0092810
ID 0x26 [2 channel(s)]: 0x0091230
ID 0x27 [3 channel(s)]: 0x0091000
ID 0x28 [2 channel(s)]: 0x0092730
ID 0x29 [2 channel(s)]: 0x0092730
ID 0x2a [1 channel(s)]: 0x0091380
ID 0x2b [1 channel(s)]: 0x00913f0
ID 0x2c [3 channel(s)]: 0x0091460
ID 0x2d [1 channel(s)]: 0x00915b0
ID 0x2e [1 channel(s)]: 0x0091620
ID 0x2f [1 channel(s)]: 0x0091700
ID 0x30 [1 channel(s)]: 0x0091770
ID 0x31 [2 channel(s)]: 0x00917e0
ID 0x32 [2 channel(s)]: 0x008fd30
ID 0x33 [2 channel(s)]: 0x008fe10
ID 0x34 [2 channel(s)]: 0x008fef0
ID 0x35 [2 channel(s)]: 0x0090580
ID 0x36 [2 channel(s)]: 0x0091a80
ID 0x37 [2 channel(s)]: 0x0092ea0
ID 0x38 [2 channel(s)]: 0x0092650
ID 0x39 [2 channel(s)]: 0x00928f0
ID 0x3a [2 channel(s)]: 0x0092dc0
ID 0x3b [1 channel(s)]: 0x0093060
ID 0x3c [1 channel(s)]: 0x00930d0
ID 0x3d [1 channel(s)]: 0x0093140
ID 0x3e [2 channel(s)]: 0x00931b0
ID 0x3f [2 channel(s)]: 0x0093290
ID 0x40 [2 channel(s)]: 0x0093370
ID 0x41 [1 channel(s)]: 0x0093450
ID 0x46 [2 channel(s)]: 0x008ffd0
ID 0x47 [2 channel(s)]: 0x00900b0
ID 0x48 [2 channel(s)]: 0x0090190
ID 0x64 [1 channel(s)]: 0x00918c0
ID 0x65 [3 channel(s)]: 0x0091930
ID 0x66 [2 channel(s)]: 0x0091b60
ID 0x67 [2 channel(s)]: 0x0091c40
ID 0x68 [1 channel(s)]: 0x0091cb0
ID 0x68 [1 channel(s)]: 0x0092c00
ID 0x69 [1 channel(s)]: 0x0091d20
ID 0x6a [2 channel(s)]: 0x0091d90
ID 0x6b [1 channel(s)]: 0x0091e70
ID 0x6c [1 channel(s)]: 0x0091f50
ID 0x6d [1 channel(s)]: 0x0091fc0
ID 0x6e [1 channel(s)]: 0x0092030
ID 0x6f [1 channel(s)]: 0x00920a0
ID 0x70 [1 channel(s)]: 0x0092110
ID 0x71 [1 channel(s)]: 0x0092180
ID 0x72 [2 channel(s)]: 0x00921f0
ID 0x73 [3 channel(s)]: 0x0092ab0
ID 0x74 [3 channel(s)]: 0x0092c70
ID 0x75 [2 channel(s)]: 0x0092f80
ID 0x96 [2 channel(s)]: 0x00922d0
ID 0x97 [2 channel(s)]: 0x00923b0
ID 0x98 [1 channel(s)]: 0x0092490
ID 0x99 [1 channel(s)]: 0x0092500
ID 0x9a [2 channel(s)]: 0x0092570
ID 0x9b [2 channel(s)]: 0x00929d0
These are also all of the existing sounds in the game - other sounds may either crash or do nothing. The current listing of sounds in... tsc.txt I think? is incomplete and doesn't include instruments (the last numbers.) These are in hex and not in decimal, so please adjust accordingly.
So! At the bottom of the pxt file, there are 4 rows of values between curly brackets. This is the data for each of the 4 channels. Each value in a channel is converted in-game to a 4-byte value (except for floating point numerals; those 0.50 or 2.00 things.) Floating point numerals, I'm not quite sure yet. 5.00 is 00 00 00 00 00 00 00 00 00 00 14 40, for instance. Exactly how it gets to that, I dunno.
Also, the final 32 bit value is padded with 0.
I tried that, and now it works fine.
(for those of you looking for a pointer table, I'll have one in a few moments...)
Edit
ID 0x01 [1 channel(s)]: 0x00907b0
ID 0x02 [1 channel(s)]: 0x00909e0
ID 0x03 [1 channel(s)]: 0x00934c0
ID 0x04 [1 channel(s)]: 0x0090890
ID 0x05 [1 channel(s)]: 0x0090660
ID 0x06 [1 channel(s)]: 0x0093530
ID 0x07 [1 channel(s)]: 0x00935a0
ID 0x0b [1 channel(s)]: 0x0090740
ID 0x0c [2 channel(s)]: 0x0090c80
ID 0x0e [1 channel(s)]: 0x0090a50
ID 0x0f [1 channel(s)]: 0x008fbe0
ID 0x10 [2 channel(s)]: 0x0090350
ID 0x11 [3 channel(s)]: 0x0090430
ID 0x12 [1 channel(s)]: 0x0090820
ID 0x14 [2 channel(s)]: 0x0090900
ID 0x15 [1 channel(s)]: 0x0090c10
ID 0x16 [1 channel(s)]: 0x00906d0
ID 0x17 [1 channel(s)]: 0x008fcc0
ID 0x18 [1 channel(s)]: 0x008fc50
ID 0x19 [2 channel(s)]: 0x0090d60
ID 0x1a [2 channel(s)]: 0x0090b30
ID 0x1b [1 channel(s)]: 0x0090e40
ID 0x1c [2 channel(s)]: 0x00910e0
ID 0x1d [1 channel(s)]: 0x00911c0
ID 0x1e [1 channel(s)]: 0x0091ee0
ID 0x1f [1 channel(s)]: 0x0091310
ID 0x20 [2 channel(s)]: 0x008f940
ID 0x21 [2 channel(s)]: 0x008fa20
ID 0x22 [2 channel(s)]: 0x008fb00
ID 0x23 [3 channel(s)]: 0x0090eb0
ID 0x25 [2 channel(s)]: 0x0092810
ID 0x26 [2 channel(s)]: 0x0091230
ID 0x27 [3 channel(s)]: 0x0091000
ID 0x28 [2 channel(s)]: 0x0092730
ID 0x29 [2 channel(s)]: 0x0092730
ID 0x2a [1 channel(s)]: 0x0091380
ID 0x2b [1 channel(s)]: 0x00913f0
ID 0x2c [3 channel(s)]: 0x0091460
ID 0x2d [1 channel(s)]: 0x00915b0
ID 0x2e [1 channel(s)]: 0x0091620
ID 0x2f [1 channel(s)]: 0x0091700
ID 0x30 [1 channel(s)]: 0x0091770
ID 0x31 [2 channel(s)]: 0x00917e0
ID 0x32 [2 channel(s)]: 0x008fd30
ID 0x33 [2 channel(s)]: 0x008fe10
ID 0x34 [2 channel(s)]: 0x008fef0
ID 0x35 [2 channel(s)]: 0x0090580
ID 0x36 [2 channel(s)]: 0x0091a80
ID 0x37 [2 channel(s)]: 0x0092ea0
ID 0x38 [2 channel(s)]: 0x0092650
ID 0x39 [2 channel(s)]: 0x00928f0
ID 0x3a [2 channel(s)]: 0x0092dc0
ID 0x3b [1 channel(s)]: 0x0093060
ID 0x3c [1 channel(s)]: 0x00930d0
ID 0x3d [1 channel(s)]: 0x0093140
ID 0x3e [2 channel(s)]: 0x00931b0
ID 0x3f [2 channel(s)]: 0x0093290
ID 0x40 [2 channel(s)]: 0x0093370
ID 0x41 [1 channel(s)]: 0x0093450
ID 0x46 [2 channel(s)]: 0x008ffd0
ID 0x47 [2 channel(s)]: 0x00900b0
ID 0x48 [2 channel(s)]: 0x0090190
ID 0x64 [1 channel(s)]: 0x00918c0
ID 0x65 [3 channel(s)]: 0x0091930
ID 0x66 [2 channel(s)]: 0x0091b60
ID 0x67 [2 channel(s)]: 0x0091c40
ID 0x68 [1 channel(s)]: 0x0091cb0
ID 0x68 [1 channel(s)]: 0x0092c00
ID 0x69 [1 channel(s)]: 0x0091d20
ID 0x6a [2 channel(s)]: 0x0091d90
ID 0x6b [1 channel(s)]: 0x0091e70
ID 0x6c [1 channel(s)]: 0x0091f50
ID 0x6d [1 channel(s)]: 0x0091fc0
ID 0x6e [1 channel(s)]: 0x0092030
ID 0x6f [1 channel(s)]: 0x00920a0
ID 0x70 [1 channel(s)]: 0x0092110
ID 0x71 [1 channel(s)]: 0x0092180
ID 0x72 [2 channel(s)]: 0x00921f0
ID 0x73 [3 channel(s)]: 0x0092ab0
ID 0x74 [3 channel(s)]: 0x0092c70
ID 0x75 [2 channel(s)]: 0x0092f80
ID 0x96 [2 channel(s)]: 0x00922d0
ID 0x97 [2 channel(s)]: 0x00923b0
ID 0x98 [1 channel(s)]: 0x0092490
ID 0x99 [1 channel(s)]: 0x0092500
ID 0x9a [2 channel(s)]: 0x0092570
ID 0x9b [2 channel(s)]: 0x00929d0
These are also all of the existing sounds in the game - other sounds may either crash or do nothing. The current listing of sounds in... tsc.txt I think? is incomplete and doesn't include instruments (the last numbers.) These are in hex and not in decimal, so please adjust accordingly.