Codigo fuente de los modchips free?

Algun modchip que publiqu ademas del hex el cod fuente??

seria interesante conocer el cod fuente y poder analizarlo.
Actualmente por lo menos YO, solo eh visto 2 que son opensource


Este en particular es para usar en PIC

1: WIIFREE Pagina del Autor

Este otro es para usar en AVR, ya sea Atmega 8, o el clasico AT90S2313

2: OPENWII Pagina del Autor



Codigo Fuente del WiiFree 1.51

-- --------------------------------------------------------------------------
--
-- The WiiFree team is proud to announce the:
-- WiiFree 1.51 sourcecode

El Equipo WiiFree se enorgullece de anunciar el:
Codigo Fuente del WiiFree 1.51

-- You can compile the source with JalV2

Usted puede compilar el código fuente con JalV2

--
-- This source is for you to learn how easy it can be to programm a PIC

Este Codigo es para que usted aprenda lo fácil que puede ser
Programar un PIC


-- Please use it to create ideas for making a better WiiFree
-- Post all your suggestions on http://www.wiinewz.com

Por favor úselo para crear ideas, y mejorar el WiiFree
Poner todas las sugerencias en wiinewz


-- If you're not good at PIC programming, but would like to have a WiiFree
-- preprogrammed, you can order one at http://www.eurasia.nu

Si no eres un buen programador de PIC, Pero te gustaría tener
Un WiiFree Pre Programado. Se le puede ordenar en
http://www.eurasia.nu



-- Have FUN with the source and share your knowledge!!!!
--
-- Special credits go to WAB (http://www.wab.com) for the first public
-- release of the simple method being used by WiiFree.

Diviértase con el código fuente y comparta su conocimiento!!!!
Créditos en especial a WAB por la primera liberacion publica del simple
Método usado por WiiFree


--
-- The WiiFree team
El Equipo WiiFree

-- --------------------------------------------------------------------------

const word _fuses = 0x1184
pragma target clock 4_000_000

include 12f675_inc_all

ansel = 0x00 ;compatibility for 12F675

var bit P_IN is pin_a2
pin_a2_direction = input

var bit P_OUT is pin_a1
pin_a1_direction = output

var bit ST_OUT is pin_a4
pin_a4_direction = output

var bit ST2_OUT is pin_a5
pin_a5_direction = output

var bit CLOCK is pin_a0
pin_a0_direction = output

var byte command[] = { 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
var byte in1
var byte in2
var byte in3

var word emuflag
var word unlock_addr
var word mediaflag1
var word mediaflag2

procedure delay_some_us ( byte in N ) is
var byte counter
for N loop
assembler
nop
end assembler
end loop
end procedure


procedure justwait is
delay_some_us( 12 )
end procedure

function read_bit return bit is
var bit in_bit
CLOCK = high
CLOCK = low
in_bit = P_IN
CLOCK = high
return in_bit
end function

procedure write_bit (bit in inbit) is
CLOCK = high
P_OUT = inbit
CLOCK = low
CLOCK = high
end procedure

function read_byte return byte is
var byte b_in = 0
var bit inbit at b_in : 7
for 8 loop
b_in = b_in >> 1
inbit = read_bit
end loop
justwait
return b_in
end function

procedure cn302_sync_queue is
var word buffer = 0
var bit inbit at buffer : 15
while buffer != 0xEEEE loop
buffer = buffer >> 1
inbit = read_bit
end loop
end procedure


procedure write_byte( byte in bout ) is
var bit outbit at bout : 0
var byte pos
for 8 using pos loop
write_bit(outbit)
bout = bout >> 1
end loop
justwait
end procedure

procedure response is
in1 = read_byte
in2 = read_byte
in3 = read_byte
end procedure

procedure write_command(byte in cmd, byte in b1, byte in b2, byte in offset_high, word in offset, byte in s1 ) is
var byte pos
var bit doit = true
while doit loop
command[0] = cmd
command[2] = (offset >> 8) & 0xFF
command[3] = offset & 0xFF
command[4] = b1
command[5] = offset_high
command[6] = b2
command[8] = s1
for 10 using pos loop
write_byte( command[pos] )
end loop
response()
if in2 != 0 then
cn302_sync_queue()
doit = true
else
doit = false
end if
end loop
end procedure

procedure unlock is
write_command(0xFE, 0x41, 0x00, 0x00, unlock_addr, 0x01 )
end procedure

procedure poke_byte ( byte in offset_high, word in offset, byte in b1 ) is
write_command(0xFE, b1, 0x00, offset_high, offset, 0x01 )
end procedure

function peek_byte( byte in offset_high, word in offset ) return byte is
write_command(0xFF, 0x00, 0x00, offset_high, offset, 0x01 )
return in3
end function

procedure detect_wii() is
emuflag = 0
if peek_byte( 0x40, 0xBCA6 ) == 0x20 then ;Check for D2A
emuflag = 0x8598
unlock_addr = 0x82B6
mediaflag1 = 0x8576
mediaflag2 = 0x8577
end if
if peek_byte( 0x40, 0xBCB2 ) == 0x20 then ;Check for D2B
emuflag = 0x85A2
unlock_addr = 0x82BE
mediaflag1 = 0x8580
mediaflag2 = 0x8581
end if
if emuflag == 0 then ;Alternate blinking LEDs
forever loop ;when unrecognized Wii
ST_OUT = !ST_OUT
ST2_OUT = !ST_OUT
delay_100ms(3)
end loop
end if
end procedure

procedure patch_wii is
var byte disco = 0
var byte tmp
while peek_byte(0x40, 0xBA06) != 0xD2 loop ;Wait for backup disc
disco = disco + 1
if disco == 75 then ;DISCO!!
ST2_OUT = !ST2_OUT
disco = 0
end if
end loop
unlock()
tmp = peek_byte( 0x00, emuflag)
tmp = (tmp & 0b111110111) | 0b00000100 ;Remove bit3 and set bit2
poke_byte( 0x00, emuflag, tmp )
tmp = peek_byte( 0x00, mediaflag1)
tmp = (tmp & 0b11101111) | 0b00100000 ;Remove bit4 and set bit5
poke_byte( 0x00, mediaflag1, tmp )
while peek_byte(0x40, 0xBA06) != 0xF1 loop
end loop
tmp = tmp | 0b00010000 ;Set bit4
poke_byte( 0x00, mediaflag1, tmp )
end procedure

cn302_sync_queue()
detect_wii()
forever loop
ST_OUT = !ST_OUT
patch_wii()
end loop
gracias, muy interesante.
2 respuestas