Hi gbatempers!
I'm playing with NDS Touch Screen Controller.
Acording to Gbatek :
Setting breakpoint to 0x040001C2, I succesfully retrieve the Control Byte and have a good understanding on how it works.
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!
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.
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!