Homebrew TextDS v1.0

Stormwave

Well-Known Member
OP
Member
Joined
Apr 22, 2010
Messages
237
Trophies
0
Website
Visit site
XP
229
Country
I've released a Text viewer for the DS. I made it primarily for viewing FAQs from GameFAQs on the DS. Navigation is quick and responsive even for very large files. All text files must be converted to TDS files using the included "TDS Creator", which embeds fonts, chapters and text into a TDS file.

Download TextDS 1.1

More details can be viewed on the filetrip page.

If anyone has any ideas on how I can expand this, I'm looking for new ideas
smile.gif
 

CannonFoddr

Regular GBATemp Lurker
Member
Joined
Sep 23, 2006
Messages
4,134
Trophies
1
Age
56
Location
Sitting by computer
Website
www.youtube.com
XP
1,287
Country
Hmm - I'd would like an 'ini' file with an option to 'tell' it WHERE to look instead of the '/TDS/' folder on the root (I keep Text files in a folder called '/Text/' on my root)

Can I also give a suggestion (if it's possible to do so)
In moonshell you can expand the files it can load by placing a renamed copy of a nds file into /Extlink/ folder (for example if you place 'tunavid.nds' into this folder & rename it to 'avi.tunavid.nds' - you can then select AVI files from within Moonshell)

However MOST programs will not allow 'autoloading' the selected file - you would usually select the file & Moonshell would start the program up... but then you would STILL need to browse again to the file to load it

Would it be possible to have a version of this that allows 'autoloading' in Moonshell2 ???

EDIT: Oh by the way - I'm having trouble 'converting' - the TDS Creator keep crashing with 'Unhandled exception has occured'
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
at TDS_Creator.TDS.Create(Font Font, String Text)
at TDS_Creator.Form1.SaveAs()
at TDS_Creator.Form1.toolStripMenuItem3_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TDS Creator
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/Documents%20and%20Settings/Kevin.HOME/My%20Documents/My%20Downloads/11227-TextDS%201.0/TDS%20Creator.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:





When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
I'm using Windows Xp 32-bit & running the program from my 'D:' drive if that's any help
The file I tried to convert was a Zelda Spirit track walkthrough ~400lines and ~20kb in size
 

Stormwave

Well-Known Member
OP
Member
Joined
Apr 22, 2010
Messages
237
Trophies
0
Website
Visit site
XP
229
Country
Thanks for the feedback. The INI file thing is a good idea, I'll add that in. Should be pretty straightforward.

I'm not sure about the auto-loading thing
unsure.gif
I think I get what you mean, and I was toying about with the idea of making the TDS creator crete an NDS file instead, with the TDS file embedded inside. Which would mean you could run an NDS file from moonshell and it would "autoload" the TDS file. I haven't looked into it yet though, I'll mess about with it.

As for your bug, from looking at that error, the program might be having a problem with a specific character in the walkthrough. The size of the file shouldn't be a problem, I've used 22000 line file, at 800kb and the program handled it fine. I think the limit where the program would struggle would be about 3mb, but I've never seen a FAQ that big
smile.gif
. Is there any chance you can link me the walkthrough so I can try it out? Another possibility could be the font, have you got the Lucida Console font installed?

*EDIT*
Also, it could be that the walkthrough is too "wide" and the program is having trouble finding a small enough font to compensate for it. I've just tested that out and that will cause the error. I'd recommend making sure none of the lines are word-wrapping, as the program presently reads a line until it reaches a return character, and a long word-wrapped line will mess that up. I'll try and find a fix for the next version.

*EDIT*

The problem should be fixed in the latest version.
 

twiztidsinz

Taiju Yamada Fan
Member
Joined
Dec 23, 2008
Messages
4,979
Trophies
0
Website
Visit site
XP
220
Country
United States
I'm guessing that you have to copy/pate the text into the TDS creator...
Can you add an Open dialogue for .TXT files?
And add right click context menu for cut/copy/paste?
Also... File -> Exit doesn't work
tongue.gif



I also get an Unhandled exception every time I try to do something...
Preview, RegEx in Chapters, Save/Save As...
CODESee the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
ÂÂ at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
ÂÂ at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
ÂÂ at TDS_Creator.TDS.Create(Font Font, String Text)
ÂÂ at TDS_Creator.Form1.SaveAs()
ÂÂ at TDS_Creator.Form1.toolStripMenuItem4_Click(Object sender, EventArgs e)
ÂÂ at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
ÂÂ at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
ÂÂ at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
ÂÂ at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
ÂÂ at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
ÂÂ at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
ÂÂ at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
ÂÂ at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
ÂÂ at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
ÂÂ at System.Windows.Forms.Control.WndProc(Message& m)
ÂÂ at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
ÂÂ at System.Windows.Forms.ToolStrip.WndProc(Message& m)
ÂÂ at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
ÂÂ at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
ÂÂ at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
ÂÂ at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
ÂÂÂÂAssembly Version: 2.0.0.0
ÂÂÂÂWin32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
ÂÂÂÂCodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TDS Creator
ÂÂÂÂAssembly Version: 1.0.0.0
ÂÂÂÂWin32 Version: 1.0.0.0
ÂÂÂÂCodeBase: file:///C:/Users/Jeff/Desktop/TDS%20Creator.exe
----------------------------------------
System.Windows.Forms
ÂÂÂÂAssembly Version: 2.0.0.0
ÂÂÂÂWin32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
ÂÂÂÂCodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
ÂÂÂÂAssembly Version: 2.0.0.0
ÂÂÂÂWin32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
ÂÂÂÂCodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
ÂÂÂÂAssembly Version: 2.0.0.0
ÂÂÂÂWin32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
ÂÂÂÂCodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
ÂÂÂÂAssembly Version: 2.0.0.0
ÂÂÂÂWin32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
ÂÂÂÂCodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:


ÂÂÂÂ


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 

Stormwave

Well-Known Member
OP
Member
Joined
Apr 22, 2010
Messages
237
Trophies
0
Website
Visit site
XP
229
Country
hehe, I guess I focused too much on the NDS side, the windows program was originally never meant to be more than a hacky fix to go alongside it.
The File->Exit not working made me laugh though, lol, it's something I used to have a bad habit of doing, thought I'd grown out of it by now.

All problems fixed anyway, as far as I'm aware. I'll add the INI file and have a look at the auto-loading thing tomorrow.
 

twiztidsinz

Taiju Yamada Fan
Member
Joined
Dec 23, 2008
Messages
4,979
Trophies
0
Website
Visit site
XP
220
Country
United States
jurassicplayer said:
If you take a look at the auto-loading, you might want to take a look at the example extlink that Moonlight included in the Moonshell2 download (in the extlink folder).
the way he explained, it wouldn't have anything to do with extlink.
He'd make it build an almost self-contained NDS file that has the document and would launch the reader.

If it's just for moonshell, it's way over done since, as you said he can just use the extlink function of Moonshell...
But his way has the added benefit of working for any firmware since it's an NDS file.
 

twiztidsinz

Taiju Yamada Fan
Member
Joined
Dec 23, 2008
Messages
4,979
Trophies
0
Website
Visit site
XP
220
Country
United States
Pliskron said:
There are some ds txt readers that do a fine job without needing to convert files.
Well... since Moonshell 2 came out of Beta, I don't know of any double-screen plain-text readers that skips two screens at a time and doesn't have critical bugs, like DSReader.
I love DS Reader, but it's issues outweigh the usability IMO and I use DSLibris and Calibre to convert files to ePub.


I'm always open to suggestions... so please send any my way.
 

Stormwave

Well-Known Member
OP
Member
Joined
Apr 22, 2010
Messages
237
Trophies
0
Website
Visit site
XP
229
Country
QUOTE said:
There are some ds txt readers that do a fine job without needing to convert files.

True, and for normal jobs they tend to work fine. The main reason I wrote this was that most FAQs on GameFAQs are formatted in their own way, using a fixed width font with a set line length. On most text viewers I've tried, unless the text is formatted with no line-breaks (auto word-wrapping) then it looks very bad and is very difficult to read. This program allows you to keep the exact formatting the FAQ author intended, but on a much smaller screen. Plus, making the TDS files allows you to add chapters to your files, handy for FAQs to jump straight to a specific point.

*EDIT*

I looked into embedding the TDS files inside an NDS file, and it should be possible. Not sure what the overheads would be like. I would basically create a 2mb (maybe more?) empty buffer inside a GBFS section of the TextDS.NDS file, which will be read from the program via gbfs. The TDS Creator can then write the TDS file into this buffer, theoretically. I'll try it out tomorrow, not sure how well it'll work.
 

jurassicplayer

Completionist Themer
Member
Joined
Mar 7, 2009
Messages
4,484
Trophies
1
Location
Pantsuland
Website
www.youtube.com
XP
2,902
Country
United States
twiztidsinz said:
the way he explained, it wouldn't have anything to do with extlink.
He'd make it build an almost self-contained NDS file that has the document and would launch the reader.

If it's just for moonshell, it's way over done since, as you said he can just use the extlink function of Moonshell...
But his way has the added benefit of working for any firmware since it's an NDS file.
I guess that is true...although if he embeds the files in nds files, then each .nds file would also have to have the tdf reader as well (right?) and take up a bit of extra space (not much of a problem, but meh its still something that could end up doing some harm if someone has a lot of them). I think that was one of the things Xenon++ didn't like about his first version of mshl2wrap (thus the linktemplate xD).
 

CannonFoddr

Regular GBATemp Lurker
Member
Joined
Sep 23, 2006
Messages
4,134
Trophies
1
Age
56
Location
Sitting by computer
Website
www.youtube.com
XP
1,287
Country
OK I've just tried the latest version - The text convertor seems to be working now this time (no crashes),
but now TextDS.nds seems to have a problem

When starting it I get the fileselector - but when I select a file, all I get is 2 white screens

I don't think it due to the font/text line length etc 'cos I produced a 'test.txt' using Notepad that contained only 5 lines of ~ 10 character per line (with word wrap turned off) - & that doesn't work

I tried it through moonshell (as a 'plugin' & as a 'stand alone'), & also through AKAIO 1.6RC2 with AND without 'homebrew softreset' turned on - each time I get the file selector but once I select a file - 2 white screens again
 

Stormwave

Well-Known Member
OP
Member
Joined
Apr 22, 2010
Messages
237
Trophies
0
Website
Visit site
XP
229
Country
Strange, I'm not sure what could be causing that. Is it only that one file you've tried, or do all do it? The two white screens means it's crashing whilst attempting to open/read the file, but I've no idea why it would be crashing. I'll have a look into it.
 

Arm73

Well-Known Member
Member
Joined
Mar 4, 2006
Messages
2,046
Trophies
0
Location
Switzerland
XP
587
Country
Italy
Well it works fine here, it takes some time to convert a file on the PC and there is no indication that something is going on and sometime I don't know whether the application stopped responding or is still working on the conversion.
Out of the 4 or 5 FAQs that I converted , one didn't load on the DS ( I got 2 white screens ), the others worked just fine.
This application has a lot of potential and I like it a lot, this is actually what I've been looking for quite sometime now.
I also love DS Reader but as it has been pointed out, the glitches outweigh the usability, too bad it isn't updated anymore.
But back to TextDS, it is certainly a step in the right direction.
Like many others I find it slight inconvenient to have to convert the txt files on the PC beforehand, but the result is actually worth it.
Certainly it would be nice if the program could load plain txt files and convert them on the fly ( I still don't understand why the conversion is strictly necessary if I don't want to create chapters or special formatting, if a txt file is already formatted at let's say 80 columns width , it should stay that way ).
And it would be nice to be able to change the font size.
As it is, the bottom screen is perfectly readable and the top screen is barely readable ( but it offers a full screen view ).
It would be nice to be able to choose a font size for the bottom screen, if I don't mind smaller characters ( but still readable ) in favor of a wider view and less scrolling left and right, it should be a valid option.
Also DS Reader has some nice anti-aliased or subpixel rendering of the character, making small fonts really nice and still readable ( would be great on the DSiXL ), while TextDS output is somehow lackluster.
After all is said and done, it's a great little application and it goes right on my top 5 favorite homebrews, I hope you keep working on it and make it even better ( it really needs some kind of configurable options like changing background colors , font style and size, type of rendering and so on).
Cheers, keep up the good work.
 

CannonFoddr

Regular GBATemp Lurker
Member
Joined
Sep 23, 2006
Messages
4,134
Trophies
1
Age
56
Location
Sitting by computer
Website
www.youtube.com
XP
1,287
Country
Stormwave said:
Strange, I'm not sure what could be causing that. Is it only that one file you've tried, or do all do it? The two white screens means it's crashing whilst attempting to open/read the file, but I've no idea why it would be crashing. I'll have a look into it.
I've tried 3 different text files - with & w/o text wrap - tried changing the font used (Times/Arial), even saved a gamefaq walkthrough (pokemon gold) & tried that
 

Stormwave

Well-Known Member
OP
Member
Joined
Apr 22, 2010
Messages
237
Trophies
0
Website
Visit site
XP
229
Country
Hmm, still not sure CannonFoddr. It might be having a problem accessing your memory card. In the next version, when I upload it, I've added a debug mode thing that should help me diagnose these problems in future. Also, the next version will allow embedded TDS files which will remove the need for libfat entirely (if you choose to use the embedded files), which will fix incompatability with certain flashcarts. I'll post when the new update is up.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    I @ idonthave: :)