Changes

Jump to navigation Jump to search
722 bytes removed ,  04:33, 9 April 2021
no edit summary
Line 11: Line 11:     
Forecast Channel allows weather reports and forecasts to be downloaded onto the console from the Internet via the WiiConnect24 service. Since the official servers for this were discontinued on June 28, 2013, [[RiiConnect24]] has since bought this back.
 
Forecast Channel allows weather reports and forecasts to be downloaded onto the console from the Internet via the WiiConnect24 service. Since the official servers for this were discontinued on June 28, 2013, [[RiiConnect24]] has since bought this back.
 +
 +
The data files are RSA-2048-SHA1 signed, and the LZ10 compressed content begins at 0x140. A Kaitai file documenting the file structure can be found here: [https://github.com/RiiConnect24/Kaitai-Files/blob/master/Kaitais/forecast_file.ksy forecast.bin] and [https://github.com/RiiConnect24/Kaitai-Files/blob/master/Kaitais/forecast_file_short.ksy short.bin], and code used by RiiConnect24 to download news data and generate files is available [https://github.com/RiiConnect24/File-Maker/tree/master/Channels/Forecast_Channel here].
    
== Description ==
 
== Description ==
Line 26: Line 28:  
== Region without the Forcast Channel ==
 
== Region without the Forcast Channel ==
 
The Forecast Channel is not available in South Korea.
 
The Forecast Channel is not available in South Korea.
  −
== Technical Information ==
  −
The Forecast channel download data packages from Nintendo servers via plain http connection.
  −
  −
Some examples:
  −
  −
http://weather.wapp.wii.com/1/076/short.bin<br />
  −
http://weather.wapp.wii.com/1/076/forecast.bin<br />
  −
  −
http://news.wapp.wii.com/ displays a Red Hat Enterprise Linux Test Page.
  −
  −
File [[WC24_Content|structure]]:
  −
  −
<pre>
  −
$0000 - $003F: padding (00)
  −
$0040 - $013F: rsa encrypted sha-1 signature of rest of the file
  −
$0140 - $0143: header
  −
$0144 - .....: compressed data
  −
</pre>
  −
  −
The compression is very [[LZ77|simple]]:
  −
# Read one byte
  −
# For each bit of the byte, msb-to-lsb,
  −
#* if 0, copy one byte to the output
  −
#* if 1, read 16 bits msb first in v, copy n bytes at offset m from the end of the output, n=3+(v>>12), m=v & fff
  −
  −
Quick and very dirty C code:
  −
<source lang="c">
  −
  i = 0x144;
  −
  j = 0;
  −
  while(i < size) {
  −
    int k;
  −
    int v = data[i++];
  −
    for(k=0; k<8; k++)
  −
      if(!(v & (1 << (7-k)))) {
  −
        result_data[j++] = data[i++];
  −
      } else {
  −
        int vv = (data[i] << 8) | data[i+1];
  −
        int nb = 3+(vv >> 12);
  −
        int off = (vv & 0xfff);
  −
        int l;
  −
        i+=2;
  −
        for(l=0; l<nb; l++) {
  −
          result_data[j] = result_data[j-off-1];
  −
          j++;
  −
        }
  −
      }
  −
  }
  −
</source>
 
326

edits

Navigation menu