I have had a busy weekend that did not allow me to do much coding, but I was able to finally work out the kinks in the user interface for the eBook reader. Below is a pic I have come up with to show the user interface.
At first, I was going to implement a totally touch-based UI, but after thinking it over and playing some games with bad touch detection, I decided against it. The face buttons of the NDS are more then enough to browser through an ebook easily. I have come up with a right- and left-handed UI to make it easier for people to use (my girlfriend is left-handed and will be helping me beta-test the program, so it became a necessity). In right-handed "mode" the up and down buttons will turn the pages backward and forward respectively. In left-handed mode, the B and X buttons will be used in their place. The trigger buttons (R-trigger for right-handed, L-trigger for left-handed) will bring up the options menu on the touch-screen. This menu will allow the user to save their place in the ebook, jump to any page, or load up a new file.
I also put some though into the data structures I will be using to store the eBook once it is read by a file. Reading text from the file every time a page is turned seems like a waste as it there will be a pause between pages while the text is being read in. Also, the file must be open while it is being views, which is a waste of resources. I have decided to use an array of strings or chars to hold the text that will be on each page. X amount of characters will be read into an element of the array that is equal to the number of characters that will fit on the screen. The only drawback to this is that the number of characters that can be on each screen at one time must be predetermined. To do this, I must have a fixed font size. I wanted to allow a variable font size, but at this time, it doesn't seem practical when there is more important work to be done. This can be added into a later release, but right now, I want to focus on getting the text read from the file easily.
As for the coding, I have found myself faced with a slight problem. Linux is starting to become a hassle to deal with between the lack of a proper IDE and the emulator I am using to test the code has been giving me problem. I plan on getting around this by using a virtual machine running Windows XP for most of my coding and testing. I can use Visual Studio C++ Express as a development environment and the Windows version of the emulator I am using seems to work without problems. I would rather stick with Linux, but with the problems I have been running into during development and presentations, I made the decision to not fiddle with it anymore. Here's hoping I can fix these problems in the future as I love having the freedom that comes with running a Linux OS.
The other benefit of using a virtual machine for development is that it is portable. I will be getting a iMac soon (hopefully by the end of the month) and would like to code on that due to the larger keyboard and screen compared to my current dev system (my laptop). However, setting up a NDS dev environment on a Mac is not easy; From what I have read, its even harder to set up then on a Linux OS. With the virtual machine, I can just copy it over to the iMac and run it. I will have all the tools I need right away with no extra time wasted on setup. Also, during presentations I can just copy the VM to the Windows partition on my laptop to show my work, saving me the trouble of setting up the deb environment there also.
I hope to have a complete running beta (minus any visual menus) by the end of next week, and a Release Canidate by the second week of July. I have vacation the first week, which will allow me to focus on the project more. This week, I will be working on the first beta, which will read in a text file, break it into "pages" in an array and allow the user to look through it page by page. The filename will be hard-coded just to make life easier for myself. Here's hoping I will have it ready by early next week so I can post it here for people to test.