#53483 - headspin - Thu Sep 08, 2005 6:24 pm
Most DS coders eventually have to write a touchscreen keyboard. So here are my versions of it. It's not rocket science, but it can save you messing around writing one when you want basic text input in your own app.
I have two demo's, one that shows a very basic keyboard based on Pictochat, and another which has an extended keyboard based on a design by Dejital of DSLinux.
Feel free to add them to your own apps, or if any of the library developers or tutorial writers want to add a keyboard example, feel free to use code and/or graphics.
http://headkaze.webpal.info/
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
Last edited by headspin on Sun Sep 11, 2005 9:28 pm; edited 1 time in total
#53508 - Chetic - Thu Sep 08, 2005 10:04 pm
[EDITED]
You added a keyboard!
I want to have your babies!
_________________
Packin':
Grey DS with FlashMe v7
1Gbit XG2T 2005 (Neoflash compatible)
GBAMP, Supercard CF, 512Mb Magic Key 3 and EZFA 256Mbit
#53780 - headspin - Sun Sep 11, 2005 9:27 pm
#53868 - juhees - Mon Sep 12, 2005 8:58 pm
Hi,
looks good on screenshots, but it dosn't run in dsemu. Could there be a problem with the jpeg routines and emus? Becouse i couldn't get the jpeg example run in any emu too. (I can't run homebrew on hardware yet to test that).
If it should run in emus, what could the problem be?
greetings
juhees
#53871 - headspin - Mon Sep 12, 2005 9:28 pm
I've noticed the new libnds versions of the examples don't work on DSEmu whereas the older ndslib versions do. They all work fine on hardware though.
The libnds examples use the sourceforge tarball versions (20050804), not the latest CVS builds.
I may modify them again using the very latest CVS build of libnds and see if DSEmu works with that. I doubt it, since the updates of libnds are occuring much more frequently than DSEmu.
BTW I tried removing the jpeg display code from the keyboard example and they still don't work. So it's something else causing the problem. We need doublec to do an update to DSEmu.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
#54565 - headspin - Tue Sep 20, 2005 1:34 pm
Extended Keyboard Example 3
This is an extended key implementation with a beveled keyboard skin using tiles and touchscreen processing.
This adds some extra keys to the previous example.
- Better touch-screen processing.
- Changed jump detection from a "distance check" to a "Z register is not zero" check.
- Added key highlight to make it easer to identify typing mistakes.
- Added keyboard "click" audio feedback.
- Shift key now works like in Pictochat (activates shift for next keypress only).
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
#54567 - El Hobito - Tue Sep 20, 2005 2:01 pm
your link is broken i cant download it
#54568 - headspin - Tue Sep 20, 2005 2:16 pm
Stupid free hosts; must have gone over the size limit. Ok, I've removed the audio conversion directory from the archive. Should be ok now.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
#54569 - El Hobito - Tue Sep 20, 2005 2:30 pm
thanks!
#57651 - El Hobito - Mon Oct 17, 2005 4:35 pm
Hey head spin i've noticed that the newer libnds breaks compatability due to effectively removing the console.h functionality any chance of a fix?
#57735 - headspin - Tue Oct 18, 2005 1:29 am
Extended Keyboard Example 4
Changed keyboard to have indented keys.
* Fixed hi-light bug
* Moved keyboard source into separate file
* Updated for new libnds
http://headkaze.webpal.info/
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
#57745 - headspin - Tue Oct 18, 2005 4:45 am
Sorry, update again...
- fixed some more bugs
- nicer keyboard function (uses your own string at a length you specify)
- backspace now works over multiple lines (bloody escape sequences!)
- added echo on/off to console
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
#57755 - cory1492 - Tue Oct 18, 2005 7:29 am
Using simple keyboard, trying to integrate it into EToolSMS but I ran into a hitch - I figured I could get by on my own with it but after more than a couple weeks working on it here and there I am now asking: any chance you feel like adding something to the simple keyboard demo so I can see where my guess at how things are working is slightly off?
My goal:
To retain the jpeg headspin guy while putting the keyboard ontop, and using one of the not used keys to hide/show ... of course, I may be 'barking up the wrong tree' if you dont know how or really dont have the time either, and in that case, thanks for the awesome keyboards and I will continue hacking at it till I figure something out (or simply not bother with a background at all).
#57763 - headspin - Tue Oct 18, 2005 8:28 am
The jpeg image cant display while the keyboard is displaying cos they are different video modes. The only way would be to reduce it to 16 colors and it would look horrid.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game
#57783 - El Hobito - Tue Oct 18, 2005 3:36 pm
wow that was quick! thanks headspin
edit: headspin your missing the power on function which is required for m3 and g6 compatability
#57814 - josath - Tue Oct 18, 2005 6:28 pm
El Hobito wrote: |
edit: headspin your missing the power on function which is required for m3 and g6 compatability |
this seems like a problem with their firmware, not the homebrew. If it works on all standard flashcarts, but not a g6, then i would think the g6 is at fault. Someone should tell them, so they can update their firmware
#57822 - El Hobito - Tue Oct 18, 2005 7:22 pm
its pretty standard to do and should be in all homebrew for power efficiency if nothing else.
Quote: |
POWER_CR=POWER_ALL_2D; |
should be sufficient
now the fact that lcd_swap() causes it to be on the wrong screens is a firmware bug.
#57823 - cory1492 - Tue Oct 18, 2005 7:34 pm
headspin wrote: |
The jpeg image cant display while the keyboard is displaying cos they are different video modes. The only way would be to reduce it to 16 colors and it would look horrid. |
Thanks HeadSpin, I thought of that as well, but I see:
Code: |
BG3_CR = BG_BMP16_256x256; |
for the background bitmap and Code: |
BG0_CR = BG_COLOR_16 |
for the tiles, and assumed they were both BG's in 16 bit and could work with eachother... obviously I needed to clear up this misconception before I continue learning anything about graphics, kinda essential - thanks for pointing out my oversight.
Could they keyboard not be rendered as 2 bitmaps (caps and nocaps, copied in only under those conditions) and still retain the keyboard map and touchscreen functionality? It would lose any ability to simply have button presses on-screen, but... I guess I could also use a 16 color background wrather than a 16 bit bitmap, would be a heck of alot simpler too.
El Hobito: which firmware? G6/M3 or the DS's?
#57840 - El Hobito - Tue Oct 18, 2005 9:24 pm
Quote: |
El Hobito: which firmware? G6/M3 or the DS's? |
m3/g6