GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment: Got The Conexant Cx25874 Chip To Work - GP32X.com - GP32 GP2X Pandora The Wiz - open source entertainment

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Got The Conexant Cx25874 Chip To Work yay! :)

#1 User is offline   rlyeh

  • GP32 Hardcore
  • Icon
  • Group: GP Guru
  • Posts: 277
  • Joined: 25-March 03
  • Location:49°9' East latitude, 126°43' South longitude: in your deeper thoughts.
  • Interests:sex what else!

Post icon  Posted 04 November 2006 - 08:40 AM

Hello folks,

I've got the CX25784 encoder video chip to work while coding the minimal library 0.C
I can currently use the i2c, enable/disable tv out, center the screen and set/unset PAL/NTSC video modes, within my app and with no need of the gp2xmenu help at all ]:)

As soon as I get my library fully working I'll paste the code here (it has some small issues at the moment).
(I'm trying to support my own custom tv video modes right now. Wish me luck!)

Greetings from the darkness...


PS: I'll see if I can retrieve the GP2X ID through the i2c too. Not sure about this yet.

#2 User is online   slaanesh

  • Mega GP Mania
  • Icon
  • View blog
  • Group: GP Guru
  • Posts: 1,870
  • Joined: 09-November 05
  • Gender:Male
  • Location:Melbourne, Australia
  • Interests:GP32, GP2X, Zodiac, PSP, Dingoo, Pandora.

Posted 04 November 2006 - 08:47 AM

This sounds very promising. Looking forward to seeing the code! :)

#3 User is online   PokeParadox

  • Founder of Pirate Games - Penjin Coder
  • PipPipPipPipPipPip
  • View blog
  • Group: GP32 Hardcore
  • Posts: 3,710
  • Joined: 08-December 05
  • Gender:Male
  • Location:UK
  • Interests:Homebrew and Emulation!

Posted 04 November 2006 - 11:10 AM

Yes it will be nice to have an update to minimal lib :) ! Great stuff.

#4 User is offline   GnoStiC

  • GP32 Hardcore
  • PipPipPipPip
  • Group: Members
  • Posts: 170
  • Joined: 03-March 06
  • Location:izmir/TR
  • Interests:intro, demo, mod, magic, tv series, movies.. etc..

Posted 04 November 2006 - 11:52 AM

enable/disable tv out : 0x2800
set/unset PAL/NTSC video modes: 0x2818

center the screen: which register do you use here?

#5 User is offline   slygamer

  • Mega GP Mania
  • PipPipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 791
  • Joined: 19-September 05
  • Location:Brisbane, Australia

Posted 04 November 2006 - 12:56 PM

View Postrlyeh, on Nov 4 2006, 06:40 PM, said:

PS: I'll see if I can retrieve the GP2X ID through the i2c too. Not sure about this yet.

There has already been a thread on here with code showing how to retrieve the GP2X serial number through the i2c.

#6 User is offline   Vimacs

  • Don't be evil!
  • Icon
  • Group: X-treme Team
  • Posts: 5,208
  • Joined: 22-October 03
  • Location:Germany

Posted 04 November 2006 - 02:37 PM

great news, one step closer to vga/rgb output.
Have you found out how to set the res/overscan and other interesting stuff?
Does someone know which legs of the chip you would need to solder rgb to?

#7 User is offline   YakumoFuji

  • GP32 Hardcore
  • PipPipPipPip
  • Group: Members
  • Posts: 189
  • Joined: 30-September 05

Posted 04 November 2006 - 03:19 PM

View Postslygamer, on Nov 4 2006, 07:56 AM, said:

View Postrlyeh, on Nov 4 2006, 06:40 PM, said:

PS: I'll see if I can retrieve the GP2X ID through the i2c too. Not sure about this yet.

There has already been a thread on here with code showing how to retrieve the GP2X serial number through the i2c.


and if you bothered to read that thread you know it only worked i think on v1.4 firmwares and not 2.x series.

#8 User is online   Tripmonkey_uk

  • Sorry, but I suck at explaining stuff :P
  • PipPipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 1,889
  • Joined: 22-December 05
  • Gender:Male
  • Location:The cesspit of the world, Bradford U.K
  • Interests:All of the above!

Posted 04 November 2006 - 05:26 PM

:o Dodgy TV-out is one of the only things left that's wrong with the GP2X IMO.
Good luck with this rlyeh & I hope it goes well :)

p.s. Would this help to fix ryo's problems with TV-out on gmenu2x?

This post has been edited by Tripmonkey_uk: 04 November 2006 - 05:28 PM


#9 User is offline   Shikaku

  • ROFL THE WORD PENIS IS HILARIOUS!
  • PipPipPipPipPipPip
  • Group: Banned
  • Posts: 2,802
  • Joined: 11-January 06
  • Location:USA... I feel lonely, not that many people from USA know what a GP2X is...

Posted 04 November 2006 - 06:58 PM

Name=GOD

#10 User is offline   PSyMastR

  • \m/O__O\m/
  • PipPipPipPipPipPip
  • View blog
  • Group: GP32 Hardcore
  • Posts: 2,917
  • Joined: 14-September 05
  • Location:Somewhere on the east coast of America... depending on the time of year
  • Interests:[img]http://img501.imageshack.us/img501/3125/craigixyl4.jpg[/img]

Posted 04 November 2006 - 08:12 PM

Go rlyeh. I hope your bugs are squashed!

#11 User is offline   rlyeh

  • GP32 Hardcore
  • Icon
  • Group: GP Guru
  • Posts: 277
  • Joined: 25-March 03
  • Location:49°9' East latitude, 126°43' South longitude: in your deeper thoughts.
  • Interests:sex what else!

Posted 05 November 2006 - 02:27 AM

hello there

im still working on it... getting much better results
i've been working with other tv video modes (1024x768,800x600,640x480,720x480,720x576,720x400,etc) but im having troubles with CRT timings

i'll answer the questions tomorrow
gonna sleep

#12 User is offline   mfk

  • GP Mania
  • PipPipPipPipPip
  • Group: GP32 Hardcore
  • Posts: 485
  • Joined: 10-December 05
  • Location:Istanbul, TR

Posted 05 November 2006 - 10:09 AM

Too good to be true. :)

#13 User is offline   rlyeh

  • GP32 Hardcore
  • Icon
  • Group: GP Guru
  • Posts: 277
  • Joined: 25-March 03
  • Location:49°9' East latitude, 126°43' South longitude: in your deeper thoughts.
  • Interests:sex what else!

Post icon  Posted 05 November 2006 - 09:00 PM

View PostPokeParadox, on Nov 4 2006, 12:10 PM, said:

Yes it will be nice to have an update to minimal lib :) ! Great stuff.


current changes :-)

  What's new:
  ===========
 
  0.C: added full 64mb support finally! :)
	   added optimized RAM timings (thanks god_at_hell & craigix)
	   added overclocking support (thanks RobBrown, sasq & whizzbang)
	   added preliminary gp2x hardware blitter support (thanks Paeryn, Reesy & Squidge)
	   added TV out support by using CX24785 encoder directly
	   added I2C (CX24785) support
	   added battery check support (thanks Squidge)
	   added leds support (thanks K-teto & RobBrown)
	   added BMP file image handling
	   added TGA file image handling
	   added default 200 MHz clock setting when initializing your program
	   added default leds when initializing your program
	   added low battery led when initializing your program
	   added gunzip library by Pasi Ojala
	   added hFILE library (HPL subset library for file, network & device handling)
	   added stereo/mono sound support
	   added 3D DAC boost support
	   added 6db pre-DAC attenuation support
	   added bass/treble intensity support
	   added headphones detection support
	   added memory card detection support
	   added flushing cache support
	   fixed white LCD bug when using TV out (thanks THB for the report)
	   fixed hsync/vsync polarity for firmware 2.0.0 (thanks K-teto)
	   fixed YUV aspect ratio (thanks Puck2099)
	   fixed dualcore support again (broken in 0.B)
	   fixed two stupid typos in sound.c tutorial (thanks Nawa for the report)
	   changed video buffering for 16bits mode (triple now)
	   changed video buffering for 8bits mode (sextuple now!)
	   changed YUV/RGB/dualcore/cursor memory mappings
	   changed whole memory mapping to a better layout featuring a free, big and contiguous memory block of 31 Mb.
	   changed dualcore initialization method
	   changed dualcore memory mapping method
	   changed dualcore shared area usage through gp2x_dualcore_data() macro (easier to use now)
	   changed dualcore stack area to a bigger and safer one (using 64kb now)
	   changed dualcore 940t icache/dcache settings (should be faster now)
	   changed dualcore 940t binary limit from 10Mb to 31Mb
	   changed rgb region initialization method
	   changed joystick read handling. You can check also for absolute values now.
 
	   added functions:
	   - gp2x_image_bmp() 
	   - gp2x_image_tga() 
	   - gp2x_unimage()
	   - gp2x_dualcore_clock()
	   - gp2x_timer_raw()
	   - gp2x_timer_raw_to_ticks()
	   - gp2x_timer_raw_one_second()
	   - gp2x_misc_led()
	   - gp2x_misc_lcd()
	   - gp2x_misc_battery()
	   - gp2x_misc_flushcache()
	   - gp2x_misc_headphones()
	   - gp2x_misc_memcard()
	   - gp2x_sound_stereo()
	   - gp2x_sound_3Dboost()
	   - gp2x_sound_attenuation()
	   - gp2x_sound_setintensity()
	   - gp2x_i2c_read()
	   - gp2x_i2c_write()
	   - gp2x_tv_setmode()
	   - gp2x_tv_adjust()
 
	   modified variables:
	   - *gp2x_dualcore_ram
 
	   modified structs:
	   - deleted { *screen8, *screen16, *screen32 } pointers in gp2x_video_YUV[0,1,2,3].
	   - deleted { *screen8, *screen16, *screen32 } pointers in gp2x_video_RGB[0].
	   - added { void *screen } pointer into gp2x_video_YUV[0,1,2,3]
	   - added { void *screen } pointer into gp2x_video_RGB[0]


#14 User is offline   Shikaku

  • ROFL THE WORD PENIS IS HILARIOUS!
  • PipPipPipPipPipPip
  • Group: Banned
  • Posts: 2,802
  • Joined: 11-January 06
  • Location:USA... I feel lonely, not that many people from USA know what a GP2X is...

Posted 05 November 2006 - 09:03 PM

Quote

changed dualcore initialization method
changed dualcore memory mapping method
changed dualcore shared area usage through gp2x_dualcore_data() macro (easier to use now)
changed dualcore stack area to a bigger and safer one (using 64kb now)
changed dualcore 940t icache/dcache settings (should be faster now)
changed dualcore 940t binary limit from 10Mb to 31Mb


:o :o :o :o :o :o :o :o :o :o :o :o :o :o :o :o

RLYEH = GOD OF GP2X

This post has been edited by Shikaku: 05 November 2006 - 09:04 PM


#15 User is offline   rlyeh

  • GP32 Hardcore
  • Icon
  • Group: GP Guru
  • Posts: 277
  • Joined: 25-March 03
  • Location:49°9' East latitude, 126°43' South longitude: in your deeper thoughts.
  • Interests:sex what else!

Posted 05 November 2006 - 09:22 PM

View PostGnoStiC, on Nov 4 2006, 12:52 PM, said:

enable/disable tv out : 0x2800
set/unset PAL/NTSC video modes: 0x2818

center the screen: which register do you use here?


Those registers won't work at all and you can't adjust TV that way.

Here you have a quick guide done from my own research, although it is not the final code I promised.
Stay tuned for that.
All sources will be in my minimal 0.c library.

Let's go:
int handle;

//this is your program. i'm working with LCD...
...

//now activate TV out by opening this device
handle=open("/dev/cx25874",O_RDWR);

//set TV video mode (mode 3 is 720x480Ix16_30Hz NTSC; mode 4 is 720x576Ix16_50Hz PAL)
//note: there are other video modes supported by the module driver (modes 0,1 and 5) but they do not work at all in our gp2xs/tvs. trust me.
ioctl(handle, _IOW('v', 0x02, unsigned char), mode);

//this optional call adjusts 1 pixel the screen position (position: 0 left, 1 right, 2 up, 3 down)
ioctl(handle, _IOW('v', 0x0A, unsigned char), position);

//now working with TV... please do not close handle until you're done with all your tv usage
...blah...

//back to LCD...
close(handle);


That was a really quick guide.
In order to enable the missing 46 video modes, and other nice stuff you'll have to talk the CX25784 chip directly through the I2C chip.

Some code following:
typedef struct { unsigned char id,addr,data;} i2cw;
typedef struct { unsigned char id,addr,*pdata;} i2cr;

void gp2x_i2c_write(unsigned char addr, unsigned char data)
{
 i2cw a = {.id = 0x8A, .addr = addr, .data = data};
 ioctl(handle, _IOW('v', 0x00, i2cw), &a); 
}

unsigned char gp2x_i2c_read(unsigned char addr)
{
 unsigned char temp;
 i2cr a = {.id = 0x8A, .addr = addr, .pdata = &temp };
 ioctl(handle, _IOW('v', 0x01, i2cr), &a); 
 return (*a.pdata);
}

//I'd suggest you to read the CX25784 chipset before using those i2c functions (just in the odd case you need 'em really).
//I'm currently managing to get hsync, vsync, external clock, timings, etc to work. It's a hell, but I'm getting some success (got my first 720x576I mode to work directly using the autoconfiguration encoder settings :-)



View PostVimacs, on Nov 4 2006, 03:37 PM, said:

Have you found out how to set the res/overscan and other interesting stuff?


Yep, although timing CRTs is a mad nightmare.
PS: No idea about the RGB pins you mentioned before.

View PostTripmonkey_uk, on Nov 4 2006, 06:26 PM, said:

:o Dodgy TV-out is one of the only things left that's wrong with the GP2X IMO.
Good luck with this rlyeh & I hope it goes well :)

p.s. Would this help to fix ryo's problems with TV-out on gmenu2x?


Yeah, trying to get a native 320x240 tv out mode right now (no more squeezing :-)
Btw, what are ryo's problems?

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic