Difference between revisions of "News Channel"

From WiiBrew
Jump to navigation Jump to search
m
(12 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{Infobox channel
 
{{Infobox channel
 
| title      = News Channel
 
| title      = News Channel
| image      = [[Image:News Channel.png|200px]]
+
| image      = [[File:Newschannel.png|200px]]
| desc        = News informations
+
| desc        = News information
 +
| id          = HAGA, HAGx
 
| type        = General channel
 
| type        = General channel
| version    =  
+
| version    = 0.7 (7)
| peripherals = {{Wiimote1}} {{Internet}}  
+
| peripherals = {{Wiimote1}} {{Internet}}
 +
| wc24        = 1
 
}}
 
}}
  
The News channel download data packages from Nintendo servers via plain http connection.
+
The '''News Channel''' downloads data packages from Nintendo servers via plain HTTP connection.  The official servers for the News Channel were discontinued on June 28, 2013; however, [[RiiConnect24]] has since restored its functionality.
  
Some examples:
+
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 [https://github.com/RiiConnect24/Kaitai-Files/blob/master/Kaitais/news_file.ksy here], and code used by RiiConnect24 to download news data and generate files is available [https://github.com/RiiConnect24/File-Maker/tree/master/Channels/News_Channel here].
 
 
http://news.wapp.wii.com/1/076/news.bin.08<br>
 
 
 
Nowadays, it seems the news file has moved:
 
 
 
http://news.wapp.wii.com/v2/1/076/news.bin.00
 
 
 
...
 
 
 
http://news.wapp.wii.com/v2/1/076/news.bin.23
 
 
 
http://news.wapp.wii.com/ formerly displayed a Red Hat Enterprise Linux Test Page. It now displays a 403: Forbidden error.
 
  Now displays a RED Hat Enterprise Test page again! WiiCracker
 
File 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 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>
 
[[Category:Software]]
 

Revision as of 05:31, 9 April 2021

News Channel
Newschannel.png
Version 0.7 (7)
Description News information
Title ID HAGA, HAGx
Type General channel
Peripherals Wiimote1.svg Internet
Requires WiiConnect24

The News Channel downloads data packages from Nintendo servers via plain HTTP connection. The official servers for the News Channel were discontinued on June 28, 2013; however, RiiConnect24 has since restored its functionality.

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, and code used by RiiConnect24 to download news data and generate files is available here.