Chihiro bios questions

Discussion in 'Chihiro Development' started by obcd, May 9, 2016.

  1. obcd

    obcd Rapidly Rising Member

    Joined:
    Dec 14, 2009
    Messages:
    85
    Likes Received:
    26
    I stumbled trough some of the forum sections. I read a lot of information, of which some likely is wrong.
    The idea is to use a retail xbox board as replacement chihiro board. So, to my knowledge, the differences are:

    MCPX 2 versus MCPX 3.
    128MB ram versus 64MB ram.
    512KB flash versus 1MB flash or 256KB flash.
    EEPROM contents.
    PIC reboot (frag) challenge.
    Conexant video chip versus conexant, focus or excalibur.


    I read somewhere in these forums that it's possible to reflash a debug board and use it as a chihiro board.
    Debug boards are almost as hard to find as chihiro boards. That's why I am considering a normal retail.

    So, MCPX2 has no hidden bootrom and boots from the upper 512bytes of flash. Chihiro bios uses different Xcodes which won't work in the MCPX3 (hidden) startup code.

    Chihiro bios 2bl is not encrypted. The startup code simply copies the code to ram and calculates a TEA hash. When that hash is correct, it jumps to the 2bl entry point in ram.

    Xbox bios 2bl is different between 1.0 and 1.1 or up xboxes. 1.1 also uses a TEA hash. 1.0 used RC4.

    So, for the conversion, I should install 4 additional ramchips to create a retail 128MB unit.

    I should modify the chihiro bios so that the MCPX3 start code understands it's xcodes. I should add some xcodes to let execution continue from addresss 0 when the TEA hashing fails.

    I should alter the eeprom contents.

    What's bugging me, will the pic shutdown the system, or will the chihiro bios properly inform it to stay quiet?

    Some other things that confuse me, and that maybe the forum has an answer 4:

    The chihiro has 2 additional boards. The base board and the dimm board with the network board.

    The base board is connected 2 the xbox mobo power connector and 2 of the gameport connectors.

    The dimmboard is mostly connected 2 the xbox ide connector and 2 the lpc connector. (I could be wrong about this last thing)

    So, how is the bios seeing this 2 boards? It looks like it's mounting the dimm board as a drive, and the baseboard as an usb device. The LPC bus is also used to identify the boards. How does this work? I see that it's reading some port addresses for this queries.

    If I remember correctly, the cypress chip on the baseboard is indeed a 8032 derivate with buildin usb. It first enumerates as a specific usb device requesting the 8032 firmware. After it received that firmware over usb, it resets and re enumerated as a new device with the new usb descriptors being set in that firmware.

    On outrun II cabinets, the force feedback interface is specified as midi. The hardware indeed uses some high speed optocouplers for it's interfaces, the same as specified in the midi specification. I don't see how a conversion from midi to gamepad would possibly work. Maybe the midi port is implemented as an lpc device on the lpc bus? There also are the eeprom chips on the baseboard. How should the chihiro bios interact with those? There also is a CR2032 on that board and a goldcap as well. So, it looks like the baseboard is storing some data in non volatile ram.
    On the other hand, some settings and the high scores are stored in the dimm board ram for outrun 2. If you remove the battery from that module, all high scores are reset.

    The next thing that is totally unclear is the dimm board network interface. It can be used for netbooting, but once the game is running (outrun 2 again), the game code takes posession of that interface and uses it for it's game networking. The original xbox network interface isn't used. How would that additional network card be interfaced to the xbox mobo? Ide doesn't make sense for such a device.
    I assume it will be difficult to run chihiro games on xbox without at least partial emulation of some of the 2 additional chihiro boards. For instance, outrun 2 doesn't run if you disconnect the Steering Force Feedback interface (midi) or the JVS interface.
    Sorry for the long post. Hope you made it till here and find it interesting.
     
    GoTeamScotch and Armorant like this.
  2. Nidge

    Nidge Spirited Member

    Joined:
    Apr 13, 2015
    Messages:
    160
    Likes Received:
    40
    Hi I don't know too much techy stuff about the chihro, but my N64 freak 1ghz, 128mb mobo will play the patched chihro games :)
    xman over on XBMC4xbox forums works with arcade machines, including the chihiro ones :) he may be able to help? I'm not sure if he's here on AG as well? I'm sure he will pop up if he is :cool:
     
  3. obcd

    obcd Rapidly Rising Member

    Joined:
    Dec 14, 2009
    Messages:
    85
    Likes Received:
    26
    Thanks for the answer. I have a look and post my question over there.
     
  4. obcd

    obcd Rapidly Rising Member

    Joined:
    Dec 14, 2009
    Messages:
    85
    Likes Received:
    26
    I know this is old, but if you happen to read it...
    force feedback in the chihiro outrun game can be disabled by setting the cabinet to upright instead of normal.
    xbox 1.3 and 1.4 mobo's have the lframe signal removed from the LPC header pins.
    The dimm board is connected to the LPC port so likely will not work on such a mobo.
    The baseboard has 2 AN2131 microcontrollers with an usb interface. Those are connected to gameport 3 and 4.
    The one is an AN2131QC and the other an AN2131SC. They provide the JVS interface and the force fedback midi interface.
    They also interface to the real time clock and some eeprom memory chips used to store the region code and the high scores of some games.
     
  5. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    632
    Likes Received:
    45
    So game runs?
     
  6. obcd

    obcd Rapidly Rising Member

    Joined:
    Dec 14, 2009
    Messages:
    85
    Likes Received:
    26
    On a ram upgraded retail xbox mobo, in a chihiro setup (with baseboard and dimm board) yes, they run.
    No progres so far in emulating the dimm and baseboard functionallity.
     
  7. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    632
    Likes Received:
    45
    Thx. Do you think is it possible to use mame code about baseboard and mediaboard emulation ? And Phoenix BIOS loader to load Chihiro BIOS?
     
  8. obcd

    obcd Rapidly Rising Member

    Joined:
    Dec 14, 2009
    Messages:
    85
    Likes Received:
    26
    Phoenix Bios Loader works fine. Using the mame code, maybe. The leaked barnabas bios has an example that emulates an xbox controller using a network connection and another xbox or pc. (So I heared)
    The games however look for the usb devices on the bus.
    I also heared you need a physical gamepad connected as well. If that truly is the case, you have a problem.

    Considering the dimm board, mame seems to emulate a model 1 and not a model 3. They probably reused some code they had for naomi dimm emulation (just a guess). You can run pretty much all chihiro games on a model 3 but not on a model 1.

    The first step that needs to be taken is fully understanding the communication between the chihiro main board and it's base board / dimm board. So we basically needs some chihiro homebrew program that can access the devices on the base board so that we can debug that communication if we try to emulate those devices. I am planning to work on that, but real life is getting in the way a little. (Like shortage of spare time.)
     
  9. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    632
    Likes Received:
    45
    Really you succes to run Chihiro BIOS with PBL. I try one time but rend green led...hardware missing I assume m├ędia and base board...
     

Share This Page