N64 CIC, looking for 710x series info

Discussion in 'Nintendo Game Development' started by jesgdev, Jan 11, 2015.

  1. TriState294

    TriState294 Site supporter 2016

    Joined:
    Feb 20, 2012
    Messages:
    274
    Likes Received:
    48
  2. hennahacker

    hennahacker Member

    Joined:
    Jul 5, 2012
    Messages:
    14
    Likes Received:
    0
    With a functional CIC clone, we really only need a versatile maskrom to create a proper flashable repro cart, which would be awesome for homebrew and romhack distros. Really the only other thing we need are moulds for making new cart shells.
     
  3. LeHaM

    LeHaM Site Soldier

    Joined:
    May 5, 2013
    Messages:
    2,636
    Likes Received:
    295
    what is the pic you used
     
  4. Bad_Ad84

    Bad_Ad84 The Tick

    Joined:
    May 26, 2011
    Messages:
    8,617
    Likes Received:
    1,387
    ATtiny25, like the header of the source and fuse map picture says
     
    Last edited: Apr 13, 2015
  5. fishfash

    fishfash Member

    Joined:
    Aug 15, 2009
    Messages:
    10
    Likes Received:
    0
    Hi,
    Is the code available for download?
    Thanks.
     
  6. Muramasa

    Muramasa Rising Member

    Joined:
    Aug 9, 2014
    Messages:
    60
    Likes Received:
    33
  7. bart_simpson

    bart_simpson Dauntless Member

    Joined:
    May 13, 2011
    Messages:
    768
    Likes Received:
    18
    I would love to do this mod
     
  8. gamer2442

    gamer2442 Newly Registered

    Joined:
    Sep 26, 2015
    Messages:
    2
    Likes Received:
    0
    Last edited: Sep 26, 2015
  9. jesgdev

    jesgdev Member

    Joined:
    Jan 11, 2015
    Messages:
    5
    Likes Received:
    1
    It was all archived when pomf.se went offline, just need to change the https to http. I updated the link in first post.
     
  10. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    This is my switch patch, that i orignally have posted on another forum. ^^
    plus some pictures and info, about compiling and flashing the UltraCIC on linux.
    (or on windows with open source tools instead of Atmel Studio)

    The source has been modified to work with avra

    [​IMG]

    The Maskrom is directed to the back of the console.
    The switch is in NTSC mode, if PIN3 connected to VDD and in PAL mode on GND.


    N64 CIC Pinout
    [​IMG]

    UltraCIC Pinout (ATtiny25)
    PIN3 connects to the switch
    [​IMG]


    patching
    UltracCIC.asm has to be in the same directory
    Code:
    patch < UltraCIC_avra_switch.patch
    http://gnuwin32.sourceforge.net/packages/patch.htm

    compiling
    Code:
    avra UltraCIC.asm
    http://avra.sourceforge.net/downloads.html

    flashing
    low fuse 0xc0 high fuse 0xdf
    Code:
    avrdude -p t25 -P /dev/ttyS0 -c ponyser -U lfuse:w:0xc0:m -U hfuse:w:0xdf:m -U flash:w:UltraCIC.hex
    http://download.savannah.gnu.org/releases/avrdude/

    UltraCIC_avra_switch.patch
    Code:
    --- UltraCIC.asm    2015-09-25 15:21:49.131080164 +0200
    +++ UltraCIC_fix.asm    2015-09-25 15:26:22.661069203 +0200
    @@ -1,7 +1,10 @@
    +
    +.include "/usr/share/avra/includes/tn45def.inc"
    +
    ;------------------------------------------------
    ;Choose CIC_TYPE(pick one):
    ;------------------------------------------------
    -.equ CIC_TYPE=0b0000    ;6102
    +;.equ CIC_TYPE=0b0000    ;6102
    ;.equ CIC_TYPE=0b0001    ;6103
    ;.equ CIC_TYPE=0b0010    ;6106
    ;.equ CIC_TYPE=0b0011    ;6101
    @@ -9,7 +12,7 @@
    ;.equ CIC_TYPE=0b0101    ;6105
    ;.equ CIC_TYPE=0b0110    ;6105
    ;.equ CIC_TYPE=0b0111    ;6105
    -;.equ CIC_TYPE=0b1000    ;7101
    +.equ CIC_TYPE=0b1000    ;7101
    ;.equ CIC_TYPE=0b1001    ;7103
    ;.equ CIC_TYPE=0b1010    ;7106
    ;.equ CIC_TYPE=0b1011    ;7102
    @@ -41,6 +44,7 @@
    .equ CICPIN0=PINB2        ;cic port2 pin0
    .equ CICPIN1=PINB1        ;cic port2 pin1
    .equ CICPIN2=PINB0        ;cic port2 pin2
    +.equ CICPIN3=PINB4        ;cic port2 pin3 ; switch pin
    
    ;Flags(bit location of flag in flags register,  do not change these values)
    .equ FLAG_x105_MODE=0            ;0=x10x, 1=x105
    @@ -63,7 +67,8 @@
        out PRR, scr0            ;power reduction
        ldi scr0, 0x80
        out ACSR, scr0            ;comparator disable
    -    ldi scr0, LOW(RAMEND)    ;STACK!  Make sure SPH is not needed for the part
    +;    ldi scr0, LOW(RAMEND)    ;STACK!  Make sure SPH is not needed for the part
    +    ldi scr0, 0xDF    ;STACK! attiny25 offset when using tn45def.inc
        out SPL, scr0
        nop
        nop
    @@ -98,7 +103,8 @@
    
        ;setup flags and key address
        andi scr0, 0x0F
    -    sbrc scr0, 3
    +    ;sbrc scr0, 3 ; disable register check
    +    sbis CICPINS, CICPIN3 ; replace with pin state
        sbr flags, (1 << FLAG_710x_MODE)
        sbrc scr0, 2
        sbr flags, (1 << FLAG_x105_MODE)
    @@ -212,24 +218,6 @@
    
        ;06:00 - 06:1A(392clk)
    cic_ram_init:
    -    /*
    -    0:0 = Leftover counter value, probably not important
    -    0:1 = ??, will be provided by console
    -    0:2-0:F = Seed from 04:00 area(PAT instruction) LSB
    -    1:0 = Unitialized
    -    1:1 = Set to 0xB but will be provided by console
    -    1:2-1:F = Seed from 04:00 area(PAT instruction) MSB
    -    2:0-3:F = Unitialized(will be set to zero)
    -    RAM(610x): E09A185A13E10DEC
    -              0B14F8B57CD61E98
    -              0000000000000000
    -              0000000000000000
    -          
    -    RAM(710x): E04F51217198575A
    -              0B123F827198115C
    -              0000000000000000
    -              0000000000000000
    -    */
        sbrc flags, FLAG_710x_MODE
        rjmp cic_ram_init_710x
        ldi ZH, HIGH(CIC_INITIAL_RAM_610x * 2)
    @@ -256,7 +244,6 @@
        nop
        nop
    
    -    //06:1B - 06:21(14clk)
    cic_ram_init_2:
        nop
        rcall m0200
    greetings,
    saturnu
     
    Last edited: Sep 27, 2015
    gwald and OzOnE like this.
  11. eb1560

    eb1560 <B>Site Supporter 2014</B>

    Joined:
    Apr 7, 2014
    Messages:
    61
    Likes Received:
    24
  12. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    this costs $5.99 and the switch is pretty much unreachable, if you don't want to make a hole in the back of your shell. :eek:
    an attiny25 costs about $0.90 ;)
    even a usb programmer only costs about $1.69 from china. :D

    i would only recommend this, if programming an attiny25 seems like witchcraft for you. :rolleyes:

    programmer:
    http://www.aliexpress.com/item/Hot-...est=201556_2,201527_1_71_72_73_74_75,201409_3

    btw. if you want to use this programmer you have to set avrdude to usbasp
    flashing
    Code:
    avrdude -p t25  -c usbasp -U lfuse:w:0xc0:m -U hfuse:w:0xdf:m -U flash:w:UltraCIC.hex
     
    Last edited: Sep 27, 2015
  13. gamer2442

    gamer2442 Newly Registered

    Joined:
    Sep 26, 2015
    Messages:
    2
    Likes Received:
    0
    thanks for the help everyone i know how to read avr code the pic is kinda cryptic to me lol .. wish i didnt waste so much time on the google now :)
    i'm interested in looking at the original code. are the dumps or disassembly available?..
     
  14. Helder

    Helder Site Supporter 2014,2015

    Joined:
    Apr 6, 2013
    Messages:
    981
    Likes Received:
    54
    Anyway you can post a compiled hex?
     
  15. saturnu

    saturnu Spirited Member

    Joined:
    Dec 8, 2011
    Messages:
    143
    Likes Received:
    29
    gwald likes this.

Share This Page