Rockbox Technical Forums

Support and General Use => Plugins/Viewers => Topic started by: MrFoxhead on March 26, 2018, 08:03:11 AM

Title: RockBoy Display Issues on AGPTEK Rocker
Post by: MrFoxhead on March 26, 2018, 08:03:11 AM
Hi, I'm having this annoying issue with Rockboy
Basically, the screen is like it has a light blue tint, altering the colors.
I've tried replacing the Rockboy.rock with the one for the Zen Mozaic and the one from my old iPod install, but both have the same issue.
Attaching pic related to show the color alteration
Title: Re: RockBoy Display Issues on AGPTEK Rocker
Post by: alcaier on March 26, 2018, 03:24:32 PM
This patch should fix it. gba bas higher resolution than agptek so some of the pixels will be missing which for instance makes text harder to read. Could be made better with antialiasing but.. meh..
If there are problems with the keymap look at
https://github.com/wodz/rockbox-wodz/commit/103f963d646f29e2958d8f44c24d1e85d8ff3e94 and post your changes.
Oh yeah, buttons A and B should be swapped for rockboy.

It should be possible to change font size by installing theme from http://themes.rockbox.org/ but I am not sure which player would have display size close to 128x160 that of agptek.

Code: [Select]
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 31bab1c..3a1f3c6 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -261,7 +261,7 @@ void vid_init(void)
     fb.enabled=1;
 
 #if defined(HAVE_LCD_COLOR)
-#if LCD_DEPTH == 24
+#if LCD_DEPTH >= 24
     fb.cc[0].r = 0;  /* 8-8 (wasted bits on red) */
     fb.cc[0].l = 16; /* this is the offset to the R bits (24-8) */
     fb.cc[1].r = 0;  /* 8-6 (wasted bits on green) */
Title: Re: RockBoy Display Issues on AGPTEK Rocker
Post by: MrFoxhead on March 26, 2018, 04:27:25 PM
This patch should fix it. gba bas higher resolution than agptek so some of the pixels will be missing which for instance makes text harder to read. Could be made better with antialiasing but.. meh..
If there are problems with the keymap look at
https://github.com/wodz/rockbox-wodz/commit/103f963d646f29e2958d8f44c24d1e85d8ff3e94 and post your changes.
Oh yeah, buttons A and B should be swapped for rockboy.

It should be possible to change font size by installing theme from http://themes.rockbox.org/ but I am not sure which player would have display size close to 128x160 that of agptek.

Code: [Select]
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 31bab1c..3a1f3c6 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -261,7 +261,7 @@ void vid_init(void)
     fb.enabled=1;
 
 #if defined(HAVE_LCD_COLOR)
-#if LCD_DEPTH == 24
+#if LCD_DEPTH >= 24
     fb.cc[0].r = 0;  /* 8-8 (wasted bits on red) */
     fb.cc[0].l = 16; /* this is the offset to the R bits (24-8) */
     fb.cc[1].r = 0;  /* 8-6 (wasted bits on green) */
No, the problem is not the missing 16 horizontal pixels (AGPTEK has the same screen as the Zen Mozaic and similar targets) nor the button mapping which can be easily changed trough the Rockboy settings, but rather the light blue tint on the area where the emulator screen is drawn.
If you set the orientation to off without stretching (if enabled it makes the AGPTEK freeze or gives back a segmentation error), you can see what I mean with light blue tint, since I can't post a pic of it right now.
Title: Re: RockBoy Display Issues on AGPTEK Rocker
Post by: alcaier on March 26, 2018, 05:35:40 PM
This patch should fix it. gba bas higher resolution than agptek so some of the pixels will be missing which for instance makes text harder to read. Could be made better with antialiasing but.. meh..
If there are problems with the keymap look at
https://github.com/wodz/rockbox-wodz/commit/103f963d646f29e2958d8f44c24d1e85d8ff3e94 and post your changes.
Oh yeah, buttons A and B should be swapped for rockboy.

It should be possible to change font size by installing theme from http://themes.rockbox.org/ but I am not sure which player would have display size close to 128x160 that of agptek.

Code: [Select]
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 31bab1c..3a1f3c6 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -261,7 +261,7 @@ void vid_init(void)
     fb.enabled=1;
 
 #if defined(HAVE_LCD_COLOR)
-#if LCD_DEPTH == 24
+#if LCD_DEPTH >= 24
     fb.cc[0].r = 0;  /* 8-8 (wasted bits on red) */
     fb.cc[0].l = 16; /* this is the offset to the R bits (24-8) */
     fb.cc[1].r = 0;  /* 8-6 (wasted bits on green) */
No, the problem is not the missing 16 horizontal pixels (AGPTEK has the same screen as the Zen Mozaic and similar targets) nor the button mapping which can be easily changed trough the Rockboy settings, but rather the light blue tint on the area where the emulator screen is drawn.
If you set the orientation to off without stretching (if enabled it makes the AGPTEK freeze or gives back a segmentation error), you can see what I mean with light blue tint, since I can't post a pic of it right now.

Well, the patch above fixes one palette issue that certainly is going to mess up the colors. gbc colors seem to match original as far as I can tell.
I noticed that if I play some music and then start gbc game, it will not start because of lack of memory. I am wondering if some of these seemingly random segfaults could be caused by eg. malloc returning null. Kernel does not seem to support swap file but one could try if it is more stable with say 512mb swap partition.
Title: Re: RockBoy Display Issues on AGPTEK Rocker
Post by: MrFoxhead on March 26, 2018, 05:51:00 PM
So, now the question is:
How do I apply that patch?
I'll admit I'm pretty newb with such things.
And concering the memory boundaries, (for me at least) It's not such a big issue since the music will be covered by the game sound anyways, but swapping between memory and the swap file might slow down the emulation tho
Title: Re: RockBoy Display Issues on AGPTEK Rocker
Post by: saratoga on March 26, 2018, 06:54:31 PM
So, now the question is:
How do I apply that patch?

https://www.rockbox.org/wiki/WorkingWithPatches

In the future, please put generic rockbox questions in the proper forum or thread rather than development threads.
Title: Re: RockBoy Display Issues on AGPTEK Rocker
Post by: alcaier on March 26, 2018, 07:09:40 PM
So, now the question is:
How do I apply that patch?
I'll admit I'm pretty newb with such things.
And concering the memory boundaries, (for me at least) It's not such a big issue since the music will be covered by the game sound anyways, but swapping between memory and the swap file might slow down the emulation tho
I uploaded patched rockboy.rock to https://uploadfiles.io/v63vb It should go to .rockbox/rocks/viewers/ .
There seems to be no support for swap at all with this kernel. If there would of been it could make it little easier to see if there are memory leaks somewhere that is causing the segfaults.  I cannot seem to be able to make gbc emulation crash with or without scaling.

There are some usable themes at http://themes.rockbox.org/index.php?target=creativezenmozaic like lebellium .