Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: X5 dual boot

X5 dual boot

From: RaeNye <raenye_at_netvision.net.il>
Date: 2006-05-01

Hi list,

I have a non-working X5 dual-boot patch and I'm trying to figure what's
wrong.

I rebased the RB bootloader and merged it into the OF.
I added a small routine that dispatches either RB or the OF based on whether
REC button is pressed or not.

The patched bootloader always boots RB since the PCF50606 write (during the
ADC scan) fails.

Pseudocode:

  int result = PCF50606_write_byte(0x2f, 0x80 | (5<<1) | 1); // ADCMUX=5
(ADCIN2)
  if (!result) // HERE IT ALWAYS FAILS
  {
    unsigned char tmp[2] = {0,0};
    while ( ! (tmp[1] & 0x80)) // ADCRDY
      PCF50606_read(0x30, tmp, 2);
    
    if (tmp[0] >= 0x7c && tmp[0] < 0x98)
      boot_original();
  }
  boot_rockbox();

I use the PCF50606 read/write routines copied to DRAM by the OF preloader
(the part on flash addr 0x0 to 0x10000).
The preloader uses them to check for low-batt, so they're functional.

Any ideas?

TIA,
R.
Received on Sun Apr 30 23:46:32 2006


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa