Wiki

Clone wiki

lpcmod_OS / xblast_lite_manual / Developers_documentation

#5. Developers documentation

##5.1 XBlast Lite register map

People who want to develop Xbox homebrew software that interface with the XBlast Lite are very welcome. XBlast Lite communicates exclusively on the LPC port of the Xbox. As the LPC port is mapped in memory, you can access it using CPU IO input/output functions(_inp/_outp in XDK) and supply the correct address that will trigger the XBlast Lite to listen and in the appropriate case, reply to a software command. XBlast Lite will only work with specific "register" addresses. Every 8 bits "register" supported by XBlast Lite as well as their usage and function are described in the table below:

Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0x00FE Read XODUS_ID 0 0 SW2 0 1 0 1 0
Chameleon ID (0xAA), only if external switches SW1 and SW2 are not grounded.
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF701 Read SYSCON_REG 0 0 0 1 0 1 0 1
SmartXX OPX spoof(low nibble) + Xblast mod variant(high nibble).
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF701 Read SYSCON_REG 0 0 0 1 0 1 0 1
SmartXX OPX spoof(low nibble) + Xblast mod variant(high nibble).
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF701 Write LCD_BL LCD-BL5 LCD-BL4 LCD-BL3 LCD-BL2 LCD-BL1 LCD-BL0
LCD backlight register. LSB is ignored..
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF703 Write LCD_CT LCD-CT5 LCD-CT4 LCD-CT3 LCD-CT2 LCD-CT1 LCD-CT0
LCD backlight register. LSB is ignored..
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF700 Write LCD_DATA LCD-D7 LCD-D6 LCD-D5 LCD-D4 LCD-E LCD-RS
LCD data register
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF70D Write XBLAST_IO GPO-3 GPO-2 GPO-1 GPO-0 Enable 5V
GPO=General Purpose Output, GPO-2&3 only accessed when SW1-2 = "11" & D0_control = '1' &A19ctrl = '0'
Enable 5V = Set to '1' to enable 5V rail to LCD.
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF70D Read XBLAST_IO GPO-3 GPO-2 GPO-1 GPO-0 GPI-1 GPI-0 A19_ctrl Enable 5V
GPO=General Purpose Output, GPO-2&3 only accessed when SW1-2 = "11" & D0_control = '1' &A19ctrl = '0'
A19_ctrl = Read state of A19_ctrl. Is '1' when TSOP is split.
Enable 5V = Read state of Enable 5V. Is '1' when enabled.
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF70D Read XBLAST_IO GPO-3 GPO-2 GPO-1 GPO-0 GPI-1 GPI-0 A19_ctrl Enable 5V
GPO=General Purpose Output, GPO-2&3 only accessed when SW1-2 = "11" & D0_control = '1' &A19ctrl = '0'
A19_ctrl = Read state of A19_ctrl. Is '1' when TSOP is split.
Enable 5V = Read state of Enable 5V. Is '1' when enabled.
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0x00FF WRITE XODUS_CONTROL iSW2 A19_ctrl iSW1 #A19_ctrl D0_control/#A19_ctrl A15 iSW1
iSW = internal state of SW. iSW can be disconnected from SW when OS seize control of it.
A19_ctrl = State of TSOP split feature. '1' when TSOP split is enabled.
#A19ctrl = inverted value of A19_ctrl(For Evolution-X support)
D0_control/#A19_ctrl = This bit is set to '1' whenever D0_control = '1' OR A19_ctrl = '0'(For Evolution-X support)
A15 = State of A15. '1' when is grounded.
Address R/W Name in OS bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0xF70F WRITE XBLAST_CONTROL OS Bank ctrl Kill mod A19_ctrl A19 D0_control iSW1 iSW2
OS Bank ctrl = Seize control of iSW1 and iSW2 when set to '1'. Needs a complete power cycle to return to '0'.
Kill mod completely mutes modchip until a power cycle.
A19_ctrl enables TSOP split. Bank is selected by ltch_A19 and/or A19
D0_control/#A19_ctrl = This bit is set to '1' whenever D0_control = '1' OR A19_ctrl = '0'(For Evolution-X support)
D0_control = D0 signal is put to ground when set to '1'.
iSW = Internal state of SW. Is used by OS to select banks on Xblast.

|Bank switches truth table | |iSW1 |iSW2 |Bank | |0 |0 |BNK512 | |0 |1 |BNK512 | |1 |0 |BNK256 | |1 |1 |BNKOS |

|TSOP split control signals truth table | |A19_ctrl |A19 |TSOP Bank | |0 |0 |Full TSOP | |0 |1 |Full TSOP | |1 |0 |Split bank0 | |1 |1 |Split bank1 |

For more information and examples on how to interface the registers. Please check XBlast OS' source code.

##5.2 Debug SPI adapter

To help XBlast OS development and debugging, it is possible to output text strings to a computer's serial console.

To do so, you will need a Xblast Modchip and an Arduino Uno compatible development board. Most Arduino-compatible boards will do. Texts prints are sent via SPI so your Arduino development board must be able to handle SPI. Arduino Uno, Pro or Nano are all good candidates and possibly the cheapest to buy.

###5.2.1 Arduino<->XBlast Mod wiring 3 wires must be connected between both devices. Using SPI terminology, here's the mapping of the logic signals on the XBlast Lite modchip's GPO pads:

  1. OUT0 ---> MOSI

  2. OUT1 ---> SCK

The third connection is a common ground between Xblast Lite and the Arduino.

You need to connect OUT0 to Arduino's MOSI pin, OUT1 to Arduino's SCK pin and one of the Ground pad available on XBlast Modchip to one of your Arduino's ground pin.

Please refer to your Arduino board's specific pinout scheme to link these 3 signals together. Here's some wiring representations for the most common Arduino boards available. [pics of Arduino-XBlast wiring for Arduino Uno,Pro and nano v3]

###5.2.2 Programming and interfacing the Arduino SPI debugger Arduino Sketch is included with XBlast OS source code (in the "Arduino_debugger" folder). You will need to open that sketch and program your Arduino board with it. Arduino communicates at 250000 bps with your computer.

Note: Program your Arduino board before connecting it to your XBlast Modchip. To avoid any potential harm to the XBlast modchip or Arduino board, you should connect both devices together only when Xbox is powered down and Arduino is already powered ON.

###5.2.3 Using debug text print XBlast OS contains code that needs to be enabled to output text prints transmitted via bit-banged SPI on XBlast Mod General Purpose output pads. To enable the debug SPI prints, you must make sure the line "#define SPITRACE" is not commented before compiling XBlast OS. This will activate usage of the C function "debugSPIPrint" throughout the source code of XBlast OS.

Note: When "SPITRACE" isn't defined, every piece of code related to "debugSPIPrint", including function calls throughout the code, will be ignored by the compiler. They will not be compiled in and therefor will not take up space in executable.

Here's an example of what information can be displayed when enabling debug SPI prints: [pic of terminal session booting XBlast OS]

"debugSPIPrint" function works exactly like the common and universal "printf" C function.

"debugSPIPrint" function is limited to sending a maximum of 200 characters per call. The name of the function "debugSPIPrint" was called from does count in this 200 characters limitation. Function name is automatically inserted at start of the outgoing string and doesn't need to be specified in "debugSPIPrint" function call.

Please note that usage of debug SPI prints slows considerably execution of XBlast OS when outputing text. Time-critical code might be negatively impacted when enabling it.

Note: By default, debug SPI prints are not enabled. Developer must compile his own version with it enabled.

Updated