Jarska333
What do you want?
Wouldn't a "bios/firmware version > 1.6.6 = BLU+" work?
Edit: OK, common sense took a slight respite...
				
			Edit: OK, common sense took a slight respite...
You could do a BLU init first, if user selects BLU+ you write the file, init for BLU+ and continue.because before you can prompt the user to make any kind of input you have to init the screen....
Probably because noone has researched it yet.so.. wyh don't someone post the GPSDK init code then?
Right, but I think it's safe to assume that Mirko doesn't currently have the necessary information to implement this, otherwise he had done it already. So that information would have to be acquired first (and not necessarily by Mirko himself ofcourse).Just get mirko to init the LCD display the same way that the sdk does, if he hasn't already, then recompile.
Rant over, sorry, just woke up so forgive me.
The non-plus BLU firmware version is also 1.6.6. (Recall that to distinguish BLU from BLU+ you have to look at the date code, not the firmware version because they're both 1.6.6). Besides, we don't know if there will be another non-plus BLU firmware version available in the future (unlikely maybe, but something that should be taken into account.)Hi,
fdave solution works fine (just tested), as long as every flashed firmware has the correct version. 1.66 for BLU+ and 1.57 or below for all the GP32 with Samsung LCD.
The best solution would probably be to use the same way of initting the LCD that GPSDK uses, which presumably involves calling some BIOS function. I'm not sure whether or not anyone has reverse engineered this yet.
reading the BIOS version is IMHo not the key because of the various existing/coming BIOS's. What is the Problem with that .cfg? I just one standard procedure everybody has to code
1.) is there a cfg file?
2a.) NO: ask the user if he/she sees any grey bar of if he has a BLU+
3a.) create .cfg reboot GP32
2b.) YES: load .cfg
so what? only ONE reboot per SMC, I think this is acceptable. So all coders have to commit oneself to include these procedure (whick should be standard/open source/ for both SDKs)....
Where is the date code?
4 bytes up?
Yeah, btw, 0x1018 also seems to contain a date code (in the 1.5.7e firmware it's 2001-11-01). Anyone know what that refers to?
static int InitFrameBuffer(void *buffer,int depth,int rate){
 int bios=0;
 char lcdType = 0;
 // Check if text file exists
 if (text_file_exists){
   // Load the first byte
   lcdType = read_first_byte();
 }
 // Otherwise, check bios version
 else{
   // Find out if it's a new LCD or an old one:
   bios=*(int *)0x1014;
   if (bios>=0x01030606){ lcdType = '1'; }
   // Create the text file with the detected version
   create_text_file( lcdType );
 }
 
 // Do actual framebuffer init
 if (lcdType=='1'){
   return gp_initFramebufferBP(buffer,depth,rate);
 }else{
   return gp_initFramebuffer  (buffer,depth,rate);
 }               
}
	Let us assume the following for a moment:
1) Somebody somewhere ...
2) The official SDK ...
3) Mirko's code is ...
4) Somebody who has the ...
So surely we can come to the conclusion that there is no need for a file that you are going to expect newbie users to put in before their stuff works properly.
;************************************************************************
;int GpGraphicModeSet(int gd_bpp, int * gp_pal)  
;************************************************************************
	IMPORT	__gpver_for_hw
	IMPORT	__gpver_for_fw
GpGraphicModeSet
  stmdb	sp!,{r12,lr}
  stmdb	sp!,{r0-r2}
  mov  r0,#GOS_RES_GDI
  bl  _gp_os_res_lock
  ldr  r0,[sp],#4
  ldr  r1,[sp],#4
  mov  r2,#0
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;by achi 2002.1.8
;register backup
  stmdb	sp!,{r0}  ;sp-->r0,r2,r12,lr
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	
  swi  _SCMD_LCD_STATUS
  stmdb	sp!,{r0,r1}  ;sp-->r0,r1,org r0,r2,r12,lr
  mov  r0,#GOS_RES_GDI
  bl  _gp_os_res_unlock
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
;by achi 2002.1.8
;bug fixing code for 16bit graphic mode set
;	call swi_get_base. argument is 8
;	if fw version is less than 1.5, r0 & r1 should be NULL
;add
  ldmia	sp!,{r0-r2}  ;load r0, r1, original r0 --> so r2 is original r0. i.e. gd_bpp
  stmdb	sp!,{r0,r1}  ;sp-->r0,r1,r2,r12,lr
  cmp  r2,#0x10
  bne  %F0    ;if not 16bpp then, exit
  
  mov  r0,#8
  mov  r1,#0
  swi  _SCMD_GET_BASE
  add  r0,r0,r1
  cmp  r0,#0x10
  bge  %F0    ;if version base get swi exists, then fw is normal !!!
  ldr  r0,=0x14a00010	;else you can access hardware address (LCDCON5)
  ldr  r1,[r0]
  bic  r1,r1,#0x3
  orr  r1,r1,#0x1  ;bswap disable, hwswap enable
  str  r1,[r0]
0
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  ldmia	sp!,{r0-r2,r12,pc}
	
	