TextDS 2

Discussion in 'NDS - Emulation and Homebrew' started by Stormwave, May 18, 2010.

May 18, 2010

TextDS 2 by Stormwave at 11:56 PM (10,339 Views / 0 Likes) 85 replies

  1. Stormwave
    OP

    Member Stormwave GBAtemp Regular

    Joined:
    Apr 22, 2010
    Messages:
    223
    Country:
    United Kingdom
    I decided to completely rewrite my TextDS program based on the feedback I received. Understandly, most people didn't want to convert their text files to TDS files, so I removed the need for it. The new version fully supports text files straight off the memory card.

    The files are still viewed using a 80 character column width, which means FAQs still look completely fine, but it will word-wrap non fixed length text files aswell.

    Supports novel mode which word-wraps in portrait mode for easy viewing of ebooks.
    Supports Moonshell2 extension linking


    Download TextDS 2.43

    Please give feedback on the new updates so I can improve the program [​IMG]
     


  2. GH0ST

    Member GH0ST Your Hero is a Ghost

    Joined:
    Dec 17, 2006
    Messages:
    924
    Location:
    I was here... before...
    Country:
    France
    Thanks Stormwave it looks fine ;-)
     
  3. jurassicplayer

    Member jurassicplayer Completionist Themer

    Joined:
    Mar 7, 2009
    Messages:
    4,280
    Location:
    Pantsuland
    Country:
    United States
    It looks like it works out great. Things that I can think of that would improve it would be the ability to change the fontsize a little (the font could be small for some people, although I like it like this), the ability to change between text files without needing to reset (you are probably adding this anyways xD), maybe wordwrap the text (this is probably a troublesome task), though maybe I'm just too used to the moonshell2 text reader where I didn't need to shift around the view so often, maybe the save/load bookmark option, ability to rotate the screen, and maybe the ability to change the font color (for the hell of it?). As a kind of amusement thing, you could make a Dictionary.txt and use it as a dictionary since that search function is really smexy (although the character limit might pose a problem xD...maybe split it up into volumes A-E, F-K, J-O, etc.)

    Something amusing that I found out, if you go to a nonexistant chapter, you end up at a blank screen, but if you use the touchscreen, the blank screen fixes itself...and although that blank screen is completely useless, I am oddly attracted to it (so I say to keep it =D).
     
  4. geoflcl

    Member geoflcl Permanent GBAtemp Newbie

    Joined:
    Jan 18, 2009
    Messages:
    1,373
    Country:
    United States
    Neat!

    I regret to say so, but TDS files were the only thing keeping me from using TextDS.

    Thanks for satisfying my whiney laziness! [​IMG]
     
  5. KOman

    Newcomer KOman Advanced Member

    Joined:
    Mar 15, 2010
    Messages:
    76
    Country:
    United States
    Does the program have to be started first to open text files or can it be opened by default when opening a text file in moonshell?
     
  6. KOman

    Newcomer KOman Advanced Member

    Joined:
    Mar 15, 2010
    Messages:
    76
    Country:
    United States
    BTW, the program sounds awesome as I've wanted to put GameFAQs files on my card to read on the go
     
  7. Stormwave
    OP

    Member Stormwave GBAtemp Regular

    Joined:
    Apr 22, 2010
    Messages:
    223
    Country:
    United Kingdom
    Currently only by opening the program first KOman, but I'm hoping to change that in a future update.
     
  8. CannonFoddr

    Member CannonFoddr Regular GBATemp Lurker

    Joined:
    Sep 23, 2006
    Messages:
    4,106
    Location:
    Sitting by computer
    Country:
    United Kingdom
    Haven't got my DS with me @ the moment but will definitely try it out when I do....
    but JP suggestion seem like a nice addition

    - perhaps not only the font color but the background as well (through a ini file perhaps - I would still like the option to 'tell' DSText where the text files are stored though)

    With my Black DS, with black 'themed' Moonshell and AKAIO - I think a black background with white text would blend in quite nicely

    EDIT: Finally got back off of Night shift & I've tried out the new version....

    Now this is weird !!! Firstly I best explain my setup
    I use an Acekard 2i - & I have Moonshell2.09 modified for ROM running installed to autoboot on startup - & I can boot into AKAIO 1.6RC2 by selecting 'Reset to firmware'
    (FYI the whole package is called 'MAIO' & is found here - it uses Xenon++ files to do all the 'tricks' to get it to work)

    It seems that DStext2 doesn't seem to work properly if run through Moonshell2 - it starts up but when listing the file(s) I get weird characters added to the name (like screen corruption) but if I 'reset to firmware' & use AKAIO - it runs fine with no problems, the files I've tried load in Ok & display (note I have noticed that some character don't show right like ; and ' but I can live with that)

    At first I thought it might be the modifications done that get MS to autoboot on an acekard that's causing the problem - so I formatted a MSD & installed both clean AKAIO 1.6RC2 and MoonShell2.1Final.
    Switch on & boot straight into AKAIO (instead of moonshell), & I find that DSText doesn't work now even in AKAIO

    When starting DSText2 - it shows the filenames fine BUT when selecting a file to load I get
    • Loadingloading filename 15
      Filename= Y ?
      Loading file /Text/TestText.txt
      Allocating Memory
    (& yes that IS meant to be a smileyface in the text)
    I've tried 4 different txt files & they all show that 'Y ?' - but only with the clean installed AKAIO (& I've redone this twice).

    (The clean installed Moonshell still does the screen corruption regardless of which Moonshell I use to start it [normal/Directboot/Alt] - I'm guessing both DSText and Moonshel memory allocation or something are overlapping that's causing this)
     
  9. Stormwave
    OP

    Member Stormwave GBAtemp Regular

    Joined:
    Apr 22, 2010
    Messages:
    223
    Country:
    United Kingdom
    You can just ignore that "Filename= Y ?" bit, it's due to a bug on my part that shouldn't affect the program at all. I've fixed it for the next version. As for the corruption in the filelist, that is something to worry about. I've just tested it on moonshell2 and can confirm this happens on my side aswell. I'll definately fix that for the next version. Not sure what could be causing it, all the strings are null terminated but it seems for some reason that when loading through Moonshell2 the null terminating chars are being ignored, and so it thinks the filename strings are longer than they are, causing the corruption. Strange how it doesn't happen on my emulator / Sakura.

    Thanks for pointing out that bug, I'll fix it asap.

    *EDIT*

    Fixed it now, it will work in the next version. Still not entirely sure what was causing it. I was only nulling the char at the end of the string (which should suffice normally), but I've rewritten it so that it nulls all of the succeeding chars, and that seems to have solved it. The new version will work when I release it, probably later today or tomorrow [​IMG]
     
  10. Stormwave
    OP

    Member Stormwave GBAtemp Regular

    Joined:
    Apr 22, 2010
    Messages:
    223
    Country:
    United Kingdom
    Ick, hate double posting.

    I've updated TextDS 2 to version 2.1!

    New features include the ability to change colours and font size, hopefully fixed the bug CannonFoddr was having and the ability to open a different text file without resetting the DS (had memory leak problems which is why I didn't have this feature in the first version, but should be fixed now).

    In the future I'll add the Moonshell2 extension link thing, bookmarks and the ability to rotate the screen.
     
  11. jurassicplayer

    Member jurassicplayer Completionist Themer

    Joined:
    Mar 7, 2009
    Messages:
    4,280
    Location:
    Pantsuland
    Country:
    United States
    Some things that I've noticed with the new version:
    -The window stops right before the end of text (only by a couple pixels so it isn't really noticeable on the larger fonts) though if you use find and leave it blank while at the very last line and search, it shows the last line with all of its pixel glory.
    -When changing fonts while reading, the viewable area remains the same (so if you swap from large text to small text while reading, you can scroll down past the end of the text and vice versa swapping from small to large)
    -There is no way to cancel any of the menus (ie. when you click the "A" button on accident, you can't just press B, you have to find. Its not really a problem in terms of the "A" button, but the start button because if you accidentally press it instead of the select button while in the middle of reading...)
    -The scrolling is so fricken awesome (seriously I've been playing with this scroll for the past couple minutes)
    -(Dunno if this was here before...) If you use the chapter jump while in the middle of the text, you instantly jump to the top. I'm not really sure what to make of that since it isn't always inconveniencing and its not like it isn't a terrible ability.

    As some additional thoughts:
    -somehow the button's reaction seems slow (though this might be because I'm using a class 2 mSD rather than the homebrew).
    -Maybe you could add the scrollbar to the other side of the screen as well for left handed users (I'm not left handed, but the scrollbar just rocks xD) or maybe reverse all of the controls for left handed users
    -Maybe add a little bit of smooth end when moving the viewing window (that one sort of effect where you dash the stylus quickly across the screen and then the screen continues to move through "inertia" without the stylus on the screen) for eye candy =D

    That is about all I can tell so far, but if I find anything else or think of anything, I'll just post it up xD.
     
  12. CannonFoddr

    Member CannonFoddr Regular GBATemp Lurker

    Joined:
    Sep 23, 2006
    Messages:
    4,106
    Location:
    Sitting by computer
    Country:
    United Kingdom
    Just tried out 'DSText 2.1' - congratulations, it works through Moonshell just fine (even tried it as a /Extlink/, & that worked as well)

    Have to agree with JP on a couple of things though
    - The button response does seem a little sluggish (I'm also using a class 2 card BTW)
    - Would like a 'cancel' button to 'go back'

    +1 to the ideas of 'bookmarks' & 'rotate the screen'

    Bit puzzled over the 'scrollbar on other side' JP mentioned (unless that only appears in the file/chapter selector pages - haven't tried that bit out yet as I've only had a couple of text files).
    'reverse controls' for left handed people would be a nice addition

    Additional 'bugs' found
    > Not sure if it was something I did - but the blue preview square/window somehow 'wrapped around' on the top DS screen (the right hand side of the box appears over on the left. Haven't managed to repeat it again (yet)
    > As mentioned before, some punctuation marks like ' appear in the text as 'corruption' (or random dots) in the text.
    > DSText 'locked up' on me once when I changed the font settings - but that might've been my fault

    (possible) Additional ideas....
    I noticed the 'settings' file is stored in the 'text' folder, how about some extra settings like
    • TextDir= : default directory for text files
      SettingDir= : directory where 'DSText.ini' is stored
      LeftHand=0/1 :for left handed mode
    > That way, People can choose the folder DSText starts in (just in case people want a folder called 'Gamefaq' or something like that)
    > The settings could be saved in the same directory as DSText (or in the case of my setup - in a hidden folder on the root directory called 'Data', where I store other Homebrew data files like Lemmings)
     
  13. jurassicplayer

    Member jurassicplayer Completionist Themer

    Joined:
    Mar 7, 2009
    Messages:
    4,280
    Location:
    Pantsuland
    Country:
    United States
    Lol that is what I do (I hexedit as many paths as I can to the data folder and then I put all of my homebrew apps in there too, so its an utter mess, but thanks to Xenon++'s favlauncher, I don't really care how messy that folder is xD)
     
  14. Stormwave
    OP

    Member Stormwave GBAtemp Regular

    Joined:
    Apr 22, 2010
    Messages:
    223
    Country:
    United Kingdom
    Thanks for the feedback [​IMG]

    -The window stops right before the end of text (only by a couple pixels so it isn't really noticeable on the larger fonts) though if you use find and leave it blank while at the very last line and search, it shows the last line with all of its pixel glory.

    It's strange how it's cutting that off. It was a problem I had while developing the program, so I added an invsible line underneath to compensate, but on all the files I've tried it looks fine. I'll add a second line aswell, since theres no harm in having some blank space underneath and that should fix the problem.

    -When changing fonts while reading, the viewable area remains the same (so if you swap from large text to small text while reading, you can scroll down past the end of the text and vice versa swapping from small to large)


    Yeah, I noticed that myself after uploading the program, I've fixed it now for the next version. It calculates the width based on the font size, but I forgot to make it recalculate when the font size changes. Fixed in the next version anyway.

    -There is no way to cancel any of the menus (ie. when you click the "A" button on accident, you can't just press B, you have to find. Its not really a problem in terms of the "A" button, but the start button because if you accidentally press it instead of the select button while in the middle of reading...)

    True, I never really thought about that, I'll add that into the next version.

    -somehow the button's reaction seems slow (though this might be because I'm using a class 2 mSD rather than the homebrew).

    Aye, it is quite unresponsive. I'm using keysDown() instead of keysHeld() to stop repetition, but it doesn't seem to work anywhere near as accurately, I'll just make some flags to prevent repetition instead. Expect that to work fine in the next version.

    -Maybe you could add the scrollbar to the other side of the screen as well for left handed users (I'm not left handed, but the scrollbar just rocks xD) or maybe reverse all of the controls for left handed users

    Good idea. Will add that in.


    -Maybe add a little bit of smooth end when moving the viewing window (that one sort of effect where you dash the stylus quickly across the screen and then the screen continues to move through "inertia" without the stylus on the screen) for eye candy =D

    I like that idea, the way it does that on the Moonshell2 text viewer. I'll try and add it in (not entirely sure how to implement it, but I'm sure I'll figure it out)


    Bit puzzled over the 'scrollbar on other side' JP mentioned (unless that only appears in the file/chapter selector pages - haven't tried that bit out yet as I've only had a couple of text files).


    I think he means the invisible scroll bar when scrolling the text, if you place the stylus on the right side of the screen and move it up or down, you can scroll the text.

    > As mentioned before, some punctuation marks like ' appear in the text as 'corruption' (or random dots) in the text.


    Strange, I'll look into that. The program only loads ASCII characters between 32-127, any others will appear corrupted, but ' should appear fine. I'll test a load out and see what happens.


    The main problem I'm having with the INI files is I'm not sure how to open a file within the executing directory. If I don't specifiy a path for fopen, it just defaults to the root of the memory card, not the folder where the executable is (If anyone knows how to rectify that please let me know). So at the minute I have to specify where the INI file is (meaning it can't be moved). As jurassicplayer pointed out, you can easily change the path using a hex editor. Just go to offset 0x86B1C and change the path (provided the string is the same length). It would be good if I could open the INI file from within the same folder as the executing file, I'll look into it.
     
  15. jurassicplayer

    Member jurassicplayer Completionist Themer

    Joined:
    Mar 7, 2009
    Messages:
    4,280
    Location:
    Pantsuland
    Country:
    United States
    It sounds like you have a lot of work cut out for yourself xD. About the INI file problem though, you could probably place the INI file in a nice set little place in the data folder (maybe data/textds/ if anyone ever feels the need to hexedit and shift things around, there is a fair bit of leeway). Then you can not only place all of the needed files (the font...and maybe more fonts since I'm guessing you are going to add that sooner or later since you left the current font as an external file), but also the INI file with all of the great information you need (like where the text folder is and other bits of information like the bookmarked line of blah.txt).
     
  16. CannonFoddr

    Member CannonFoddr Regular GBATemp Lurker

    Joined:
    Sep 23, 2006
    Messages:
    4,106
    Location:
    Sitting by computer
    Country:
    United Kingdom
    Thanks for that info - I'll look into that
     
  17. Stormwave
    OP

    Member Stormwave GBAtemp Regular

    Joined:
    Apr 22, 2010
    Messages:
    223
    Country:
    United Kingdom
    Updated to version 2.2

    New features include:

    - Left or right-handed mode
    - Portrait or Landscape orientation
    - Normal View mode or new Novel Mode (for reading EBooks)
    - Saves the last position and restores it when you next open that file
    - Allows the creation and deletion of bookmarks
    - Included a Path Editor to patch the NDS file and allows custom paths for the INI file, etc.
    - Loads of minor bug fixes
    - Probably more stuff, can't remember
     
  18. twiztidsinz

    Member twiztidsinz Taiju Yamada Fan

    Joined:
    Dec 23, 2008
    Messages:
    4,981
    Country:
    United States
    Is it possible to choose/change fonts?
     
  19. Stormwave
    OP

    Member Stormwave GBAtemp Regular

    Joined:
    Apr 22, 2010
    Messages:
    223
    Country:
    United Kingdom
    You can choose fonts using the included Path Editor, pick a font and folder. It's not possible from within the program presently. To be honest I never added that functionality because it looks pretty crap in any other font, heh. The program uses a fixed-width font system for both viewing modes, and non-fixed width fonts can look quite poor. Feel free to try another font out though, and if you find one that looks good let me know [​IMG]
     
  20. twiztidsinz

    Member twiztidsinz Taiju Yamada Fan

    Joined:
    Dec 23, 2008
    Messages:
    4,981
    Country:
    United States
    I can find the proper paths in the ROM if I open it in a hex editor, but oddly I cannot match "Text" other than TextDS2.ini and some textSize entries.
     

Share This Page