Release PNDconfig Q&A and suggestions


dimag0g

Very Active Member
Joined
Jan 12, 2011
Messages
608
Location
Strasbourg, France
This thread is about PNDconfig, I'd love to see any comments / suggestions / questions you may have. For those who don't know, PNDconfig is a tool to configure your pandora before running specific PNDs via PND_pre_script.sh and PND_post_script.sh

CHANGELOG:

v.1
Initial release

v.2
1. Fixed "Turn WIFI off" action
2. Added "Regenerate scripts" menu item
3. Fixed TV out actions to allow s-video
4. Added actual screenshots
5. Added memory size info to sysinfo.txt
6. Added backlight on and off actions
7. Added "customize script actions" menu item:
    - add and remove pre/post script actions
    - modify existing pre/post script actions
    - modify PND_pre/post_scripts
8. Search for PNDs by name is now case-insensitive

v.3

1. Added zram swap actions (enable/disable)
2. Added "configure nubs mode" action
3. Fixed "Restore default nubs mode" action (now uses nubs.state)
4. Added "Activate QJoyPad layout" action
5. Code fixes and cleanups:
    .sh extensions for all script files
    if-then alignement
    error checks
    chmod a+x on generated scripts
    -e to check for file presence
6. Added help file
7. Added "Toggle system startup script" menu item
8. Added TV out enable/disable actions
9. avoid the limit of 99 configured PNDs in "Remove PND configuration"

v.4

1. Fixed "Turn WIFI off" action (several checks are made for established connections before turning off)
2. Added "Wait for Internet connection" action
3. Added "Synchronize clock" action
4. Fixed several bugs related to multiple SD cards access
    + performance tweaks in appdata scanning actions (app2.list etc.)
5. Added "check video driver for EGL" action

v.5 (beta)

1. Fixed: pre/post scripts are no longer executed when PND documentation is accessed

2. Added "Run Tor router" action

3. Added regular swap actions (enable/disable)

4. Added "Spoof MAC address" action

5. Fixed "Turn WIFI off" action (cd to /tmp to allow for PND umount)

6. Minor fix on "LCD saver" action (doesn't check lid action anymore)

7. Added ABMouse map/unmap actions

8. Added "Scan appdata for orphans" menu item

9. Fixed: temporary files app.list and app2.list are no longer needed

10.Fixed bugs with appdata subdirs containing spaces

    (credit goes to Darkkinght512 for ABMouse test case)

11. Added "Allocate OMAP framebuffer" action

12. Added "Increase charge current" and "Set default charge current" actions

13. Fixed appdata directory actions being performed on similarly named dirs

14. Fixed: empty pre/post script files are no longer generated
 
Last edited by a moderator:
I like your current ideas.


Maybe you can do something with controller mapping?


By this I mean check if QJoyPad mapper pnd is installed and set it to a specifc profile?


This could mean that if a user is using tv out and a usb controller is detected "mirrored mode" of pandora controls could be set on the joypad. (QJoyPad doesn't work on all apps but e.g. let's you play SuperHexagon with a usb controller)
 
A few of my later PND (World of Padman, ioQuake3, RtCW, JK2&3, ET:Legacy, Forsaken, and UFO:AI but with a different default control) use text files "left_nub" and "right_nub" to define behavour of the Nubs. By default I set them to left_nub as "absolute" and right_nub to "mouse", but I you could handled that PNDConfig, that would be great.
 
I still couldn't test your tool but it sounds really useful.

If it isn't included already I'd like to see SGX driver installation before and after launching a PND.
 
PokeParadox,

I downloaded QJoyPad, and form what I've seen there is no problem to change profiles on per-PND basis. Unfortunately, I have no external controllers right now (out of town for at least a month), so I cannot test anything myself. Can you tell me if the user has to create QJoyPad profiles manually, or they get created when external controllers are detected?

I think I could eventually add an action "Mirror USB controller" which would set all connected external controllers to mirror mode. Would that be what you wanted?

ptitSeb,

PNDconfig is intended as a mean to configure apps which don't provide native configuration options. I also don't really like the idea of generating all sorts of config files, I prefer to stick to PND_pre/post scripts.

What if I add a script action "Configure nubs" (maybe instead of "Force nubs to absolute mode"). This action would ask the user once about the preferred nub configuration for the PND, store this configuration in text files compatible with your apps, and then apply it every time the PND starts. This way, the action could be used with any app, and your apps could also use the config. Is that OK?

Askarus,

I've thought about this already, but there are two downsides to this approach. First, this will write in the NAND every time you start your configured apps, wearing the chip and risking to brick the device (imagine the user takes out the card or powers off the unit during the process). Second, it will substantially increase the size of my package (I could use the SGX installer contents instead, but that means any update of SGX installer would break PNDconfig, so it's not an option). Maybe I could include only a couple of useful drivers at keep the size reasonable.

Anyhow, if you want this option really bad, maybe you could help me by preparing (or finding) a compatibility table:

app \ driver   4.00   4.03   4.04    etc....

descent         -      +/-    +

quake           +       -     +/-

drastic         -       +     +

etc....
 
Last edited by a moderator:
Hum, not sure I understood you :( But if there is menu to choose "mouse on left / joy on right" or vice-versa and than you generate the 2 txt files, that would be fine :)
 
The user creates a mapping.

You could set all external controllers to mirror Pandora but that might cause more issue, e.g. if multi controls are plugged to play multiplayer they would conflict.

Additionaly I'm not sure how you would know the best layout for a random usb pad.

I think it would be best if you could read existing QJoypad configs and just let the user choose one for the script.If there are no configs or no PND detected maybe advise the user about QJoypad?

I guess there are many ways to go about it.
 
ptitSeb, let me explain further

I plan to create what I call a script action, "Configure nubs", which the user can incorporate in the PND_pre_script.sh for any app he likes, including yours. When PND_pre_script.sh is called for the first time, it will display the menu with possible modes for left and right nubs. This config will be stored in files called "left_nub" and "right_nub" in the appdata/PND_NAME folder, the same way you store your configs.

On the subsequent runs, the menu is not displayed anymore, and the configs in "left_nub" and "right_nub" are automatically applied to nubs. For all apps except yours, this will mean that the config selected by the user is applied prior to PND start. In case of your PNDs, the app will apply the config stored in "left_nub" and "right_nub" the second time, but it's not a big problem in my view. In both case, the user gets the config he wanted.

PokeParadox,

I think I understand what you want, I will PM you the beta to test when I'm ready (that would most probably be this weekend or next week).
 
A beta version of PNDconfig is attached to the topic.

PokeParadox,
I added support for QJoyPad, however, I don't have any external controllers so it was impossible for me to test. Please report. Don't forget to include "Terminate QJoyPad" in PND_post_script.sh

ptitSeb,
I implemented the nub config which seems to work at least with Jedi Outcast. The config is stored in appdata/pndname/left_nub and appdata/pndname/right_nub, and a copy of these files is created in appdata/pndname/home/. I wouldn't mind if you modify your apps to look for these files in the appdata/pndname/ instead of appdata/pndname/home/, so I don't have to make this copy. Of course, that's some distant future we're talking about.

I also added zram actions, which work great with memory-hungry apps like Firefox, ImageJ, PDF readers, LibreOffice etc. If someone here owns a 256 MB pandora, I'd like to hear how it works on your devices (it gives you extra 156 MB, unless you tweak my script a bit; you should be fine up to 200-250 MB of zram swap).

Askarus,
I've started to look into the SGX drivers, but this will take some more time. I'm not yet sure if I will make anything or not.
 
Last edited by a moderator:
A beta version of PNDconfig is attached to the topic.

ptitSeb,


I implemented the nub config which seems to work at least with Jedi Outcast. The config is stored in appdata/pndname/left_nub and appdata/pndname/right_nub, and a copy of these files is created in appdata/pndname/home/. I wouldn't mind if you modify your apps to look for these files in the appdata/pndname/ instead of appdata/pndname/home/, so I don't have to make this copy. Of course, that's some distant future we're talking about.
Ok, I'll try to uniformize my PND using this.
 
Ah... I realise now why I saw no new features... the beta is attched in the thread. :/

I did try and test but I thought the beta was on the repo so I didn't see any new features. Sorry might be a little while more until I can do a test.
 
No problem, I don't have much time to add new features anyway. Still working on SGX driver feature suggested by Askarus. So far I managed to mount the sgx_drivers_r1.pnd and use drivers from there, but I still need to write to /usr/lib to replace symlinks. If someone here has an idea how to substitute some libs for a given process, I'd like to get some advice. LD_LIBRARY_PATH is probably a bad idea, since many PNDs change this variable themselves.
 
Well basically you create a compressed swap inside the RAM. The access time of this swap is much less compared to an SD card - the data never quits the RAM, the only delay is related to compression/decompression. Plus, writing doesn't wear out RAM as it does for flash memory.

In terms of size, ZRAM swap guarantees to fit a certain amount of data, in return, some RAM is consumed by the ZRAM driver to store the compressed data. A typical compression ratio is 2 (at least so it seems when running web browsers), so if you create a 100 MB swap, it will consume about 50 MB of RAM when filled up completely. You gain about half the swap size worth of RAM, at the expense of higher CPU loads due to compression/decompression.

Although there is no upper limit to ZRAM swap size (other than 32-bit address space limitation), ZRAM driver will be in trouble if there is no free RAM to store compressed data. To be on the safe side, ZRAM swap size should not exceed the amount of RAM you have available after a fresh OS boot (about 150 MB for classic Pandora and about 400 MB for rebirth/1GHz). This way, even if you fill the memory with totally incompressible data, ZRAM will be able to handle it.

Most memory-hungry applications should be able to benefit from ZRAM. I already mentioned web browsers, you should expect similar results with PDF viewers, office apps, image editors, etc., especially when you're multitasking. CPU-intensive applications like games, emulators and video players may get slower if you have lots of swapping going on at the same time, and such applications rarely need an excessive amount of memory. So these apps probably don't need ZRAM. A notable exception is Project X: Forsaken, which doesn't start on my unit without swap, and runs perfectly with ZRAM. The last version of PNDconfig knows about it.
 
Last edited by a moderator:
Back
Top