ROM Hack DS Touch Screen Controller (TSC)

hackotedelaplaqu

Well-Known Member
OP
Member
Joined
Jan 10, 2009
Messages
606
Trophies
1
Website
wiibrew.org
XP
1,196
Country
France
Hi gbatempers!

I'm playing with NDS Touch Screen Controller.
Acording to Gbatek :
The Touch Screen Controller (for lower LCD screen) is accessed via SPI bus,

Control Byte (transferred MSB first)
0-1 Power Down Mode Select
2 Reference Select (0=Differential, 1=Single-Ended)
3 Conversion Mode (0=12bit, max CLK=2MHz, 1=8bit, max CLK=3MHz)
4-6 Channel Select (0-7, see below)
7 Start Bit (Must be set to access Control Byte)


Channel
0 Temperature 0 (requires calibration, step 2.1mV per 1'C accuracy)
1 Touchscreen Y-Position (somewhat 0B0h..F20h, or FFFh=released)
2 Battery Voltage (not used, connected to GND in NDS, always 000h)
3 Touchscreen Z1-Position (diagonal position for pressure measurement)
4 Touchscreen Z2-Position (diagonal position for pressure measurement)
5 Touchscreen X-Position (somewhat 100h..ED0h, or 000h=released)
6 AUX Input (connected to Microphone in the NDS)
7 Temperature 1 (difference to Temp 0, without calibration, 2'C accuracy)

Setting breakpoint to 0x040001C2, I succesfully retrieve the Control Byte and have a good understanding on how it works.
_SpiRtc7.png


However, I have no clue how to find the channels gbatek is talking about.

The main purpose is just to set a breakpoint in no$gba dev whenever screen is touched (aka Ch5 and Ch1 values changed).

Thanks for your help!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    ButterScott101 @ ButterScott101: +1