Quick Post June 2010

Posted by ryochan7 on June 6th, 2010  •  View Comments  • 
Tags: blog

I am not dead. I had been busy with school and now I doing some stuff during my break. First off, even though I am 26 years old, I just got a drivers license a month ago. I still have to get a car but I am looking. One other big task to tackle is getting a job.

As for software projects, I am currently helping with the development of the best Sonic the Hedgehog web site ever: Find the Computer Room. Progress is coming along in testing but I don't know when anything will be placed on the main site. Pizza Py Party is now back in development for the time being thanks to the contributions of reid.kleckner. Pizza Py Party is now on Google Code @ http://code.google.com/p/pizza-py-party/.

As for this blog, I won't post often as I usually don't have anything significant to post. And I'm out.

YouTubed-2x 2010.01.22

Posted by ryochan7 on January 22nd, 2010  •  View Comments  • 
Tags: projects, youtubed-2x
Updated on January 25th, 2010

It has been a while since I put out a release. I have done some experimenting but this version is similar to the last one. Updates

  • Translation support in progress although I doubt this program will every be translated to another language
  • Parsers slightly refactored
  • Broken parsers fixed (can't remember which were broken)
  • Queued items that have not been started are saved when saving a session now. Only items that had been started but were either paused, cancelled or finished would appear in the previous release
  • Made a Windows version for this release
  • Likely more but I can't remember

Downloads:

Linux: http://www.ryochan7.com/files/projects/youtubed2x/youtubed-2x_2010-01-22.tar.gz Windows: http://www.ryochan7.com/files/projects/youtubed2x/youtubed2x-win_2010-01-22.zip Archive: http://www.ryochan7.com/files/projects/youtubed2x/youtubed-2x_archive_2010-01-22.tar.gz

Screenshot:
YouTubed-2x 2010.01.22

New Coding Adventures 2010

Posted by ryochan7 on January 3rd, 2010  •  View Comments  • 
Tags: coding, sucg

Over the past couple of weeks, I have done some coding experiments that I have wanted to do for a while. I first started by brushing up on my Java more. My major goal was to finally make an application that used Swing since I had not directly worked with Swing before; I have worked on one group project that implemented Swing but I did not work on making the UI. Two issues that I have seen with Swing projects at school in the past that people seem to overlook is regarding widgets not being resizeable and being able to resize an application window to the point where you can't see the widgets since no minimum window size had been set. I had not seen one Swing project at school take either of these issues into consideration so I wanted to find a way to avoid both problems.

I ended up making a version of StepMania Unlock Code Generator using Java. Besides learning Swing, I finally learned about many of the classes used for file I/O, anonymous inner classes, sorting, and a little bit about internationalization. NetBeans makes it easy to define text in resource files in order to implement internationalization; the project is my first project that is technically translatable. The project is also my first project where I decided to use the use-case controller approach for keeping business logic organized. I feel like I learned quite a bit about Java that I didn't know in a short period of time.

StepMania Unlock Code Generator in Java

After working on that, I wanted to mess around with making applications for the GP2X. I started by getting the Open2x toolchain and learning how to use it. Then, I compiled the source code for Onscripter and played around with Narcissu; I used the data files from the current GP2X port. This wasn't the best way to learn about GP2X development as it took a long time to figure out how Onscripter worked and learning how much logic was in the game script. I made a few modifications but I gave up on messing with the program within a few days. The current GP2X port of Narcissu has a few bugs that I wanted to try to fix; a couple of the bugs are the game going back to the title screen after exiting the configuration screen and the game crashing during a certain portion early in the game that I can't remember at the moment.

After my failed efforts with Onscripter, I found a simple Hello World example that used SDL and I started to take things slowly. Since I can't get USB Networking support working on my GP2X anymore, I got tired of copying executables to my SD card and then running applications on my GP2X. I figured that it would be better for me to learn SDL on the PC first so that I could have an application that worked on both the PC and the GP2X which would make things easier to test. I started with simple stuff like displaying images and text to a screen. The most that I have done so far is making a Pong clone. For learning resources, I have looked at the source code of many projects and I have read the tutorials on the Lazy Foo' website. Even though I haven't made much progress yet, I am glad that I finally have a reason to program in C++ again.

Now, I am kind of discouraged so I haven't done any coding over the last week. Instead, I have been playing a lot of Sonic Unleashed and trying to get as many achievement points for that game as I can. Sonic Unleashed is the first game that I have ever focused on getting achievements for and it is sometimes really tedious to do some of the tasks required to get some of the achievements.

That has been almost everything that I have been up to during my break from school. At least I am having fun for a change.

Happy New Year 2010

Posted by ryochan7 on December 31st, 2009  •  View Comments  • 
Tags: blog

Just wanted to post and say Happy New Year to everyone. I am sure 2010 will be a better year than 2009 has been. Hopefully it will be for all of you as well.

YouTubed-2x 2009.11.29

Posted by ryochan7 on November 29th, 2009  •  View Comments  • 
Tags: projects, youtubed-2x

It has been a while since the previous release. Not too much has changed since I have been busy with school so much this semester. Anyway, on to the changes.

  • YouTube flagged videos can now be downloaded without user credentials
  • Session support added. List of videos is saved on program exit and restored when program is started
  • Pause support. Downloads can now be paused and resumed at a later time
  • Audio and video bitrate settings completely split. The audio stream of videos is no longer copied but re-encoded. The old method caused problems with some videos from some sites
  • Right-click video menu updated. Input and output videos can be played and the output directory for a video can be opened
  • Bug with right-click video menu fixed. Items can be switched and the menu is updated properly
  • Supported sites window now includes links to associated web sites
  • 4 parsers added (HardSexTube, Spankwire, Spike, YouJizz) and 1 parser removed (Porn2PC)

Also to note, there will not be a Windows build of this version unless some requests it. It wouldn't take much time to make the build but I just don't care right now. There is no point to this release at all. This program is just a major timesink. I don't even use my GP2X much anymore and I think I am going to skip on getting a Wiz.

Downloads:

http://www.ryochan7.com/files/projects/youtubed2x/youtubed-2x_2009-11-29.tar.gz

Screenshot:
YouTubed-2x 2009.11.29

Need to Chillax

Posted by ryochan7 on September 26th, 2009  •  View Comments  • 
Tags: blog, isu

This semester has been one awful mess so far. My time has been almost entirely consumed with school, work and homework. Because of this, my blog and YouTubed-2x have been neglected. Also, I have had almost no time for fun. I am now giving myself a little free time so that I can relax a bit.

Last night, I finally got to see the movie 9; I originally wanted to see it on the 12th. It doesn't have a deep story behind it but it is awesome action flick and it is a visually impressive film. Besides that, I have been playing a little bit of Left 4 Dead and Beyond Good and Evil. I haven't gotten very far in either game yet.

As for school, my COM 223 (Small Group Process) and ITK 353 (Web Development Technologies) classes have been taking up the majority of my time. The assignments in ITK 353 aren't that difficult but they are really time consuming. ITK 353 is a web development technologies course that is revolving around the usage of JSF (JavaServer Faces). COM 223 requires way too much work outside of class; it is to the point where I have to miss other classes in order to work on group projects. The other ITK course that I am taking this semester is actually a useful course so far; the course is a Concepts of Programming Languages course (basically a compiler course). I feel like I am actually learning something in that class and it is challenging enough to change my way of thinking.

That is enough information about my schooling. There are some tasks that are on my agenda to do sometime soon. I am thinking first about converting my blog application to use class-based views. I also want to make some sort of gallery application. My third round of P90X will be done on Nov. 1st. So far, I have lost 3 inches around my waist and I have only gained around 4-5 lbs this round; my waist is actually at 26.5 in. but, even though it is a lot more tight, I still somehow have too much fat in that area to have anything close to a six-pack. Last but not least, I need to update YouTubed-2x at least one more time.

My little experiment with collaborative development with YouTubed-2x has proven to be a complete failure. I just recently found out about the Help Wanted section of SourceForge so I might try to utilize that and see it anyone wants to join the development team. I want to clean up a couple of the newer features, such as session management, and that will be the main motivation for a new release. I had started working on a possible parser updater for YouTubed-2x and I got a very rough prototype working. However, that feature will not be worked on further mainly due to lack of a user base. If you are not a GP2X or Wiz user, I would suggest that you use xVideoServiceThief instead.

That is about everything that I have been up to lately. I guess you will hear back from me in another two months.

Old subdomain getting phased out

Posted by ryochan7 on July 16th, 2009  •  View Comments  • 
Tags: blog, webfaction

When I started this site, I was using the subdomain that I had gotten through WebFaction. Now that I have had my own domain for a while, I figure that it is time to stop having references to my old subdomain on this site. For now, any requests to ryochan7.webfactional.com will redirect to ryochan7.com. I might get rid of the redirect at some point. That is all.

PC-DC Server Guide Part 3: Connection

Posted by ryochan7 on July 11th, 2009  •  View Comments  • 
Tags: dreamcast, linux, pcdc

« Go to Part 2

Now, we can finally get to the good part. Getting the Dreamcast online will be covered in this part.

Setup

First off, you will want to connect the Dreamcast modem to your PC modem. Connect one end of a phone line to the port on the Dreamcast modem and the other end to the LINE phone port on your PC modem. The physical connection has been made. YAY! Progress! Launch Planetweb on the Dreamcast if not loaded already, get your PC ready and fire up your modem.

Starting Mgetty

There are many methods to running the mgetty process. On a desktop, you will likely just want to launch mgetty directly from a terminal. Other methods are using inittab or upstart. On Ubuntu, the old inittab method no longer works due to the incorporation of upstart.

I just launch mgetty from a terminal and that is what I will cover. First off, you must have root access in order for mgetty to work. The only arguments that I give to the program are the device path and a different initialization command. Here is what I use.

sudo mgetty -D /dev/ttyUSB0 -m '"" ATM0'

Here is a quick breakdown of the arguments of the command. The "-D" flag sets the modem to data mode. The device path is specified after that; it is /dev/ttyUSB0 in my case. The "-m" flag is optional and what you can pass will vary depending on what AT commands your modem accepts; read the manual for your PC modem to see which AT commands can be used. With my modem, the speaker is horribly loud so I have to disable it or go deaf. The "M0" portion of the line disables my modem's speaker. The "AT" portion of the line is necessary to make sure the modem goes to AT mode. There is an expect portion at the beginning with the double quotes but I use empty double quotes as I don't have a use for it.

For those who want an upstart example, here is an example script that you can install in the /etc/event.d/ directory and be able to start the script with the start command.

#start on runlevel 3

exec mgetty -D /dev/ttyUSB0 -m '"" ATM0'
respawn

That is enough of that.

Monitor Log Files

I would suggest that you monitor the mgetty process by using "tail -f" on some log files. There are three log files in particular that are helpful. These are the locations of the files under Ubuntu.

  • /var/log/mgetty/mg_(INTERFACE).log
  • /var/log/messages
  • /var/log/syslog

Example:

tail -f /var/log/mgetty/mg_ttyUSB0.log

Dial-in Time

Please read all of this section first before trying it. Mgetty is launched. The Dreamcast is ready. Planetweb is loaded. Now, it is time to start the connection. First off, get a spare terminal ready; I generally have gnome-terminal launched with 4 tabs open. Start the dial up process on Planetweb. Wait about 3 seconds once the output on the Dreamcast stops and then you will issue the following command on your PC to make mgetty answer the line; you must have root access to issue the following command.

sudo killall -USR1 mgetty

The process is very lenient so you don't have to worry about getting your timing exactly right. You should now notice changes to the mgetty log. If all goes well, you will notice changes to the messages log file and the Dreamcast will connect to the PC.

Log Files Examples

This section is just to show what the output of the log files will look like when your Dreamcast is successful in connecting to your Linux box.

/var/log/mgetty/mg_(INTERFACE).log

07/12 15:36:32 SB0  mgetty: interim release 1.1.36-Jun15
07/12 15:36:32 SB0  WARNING: parent process not init(pid=1), but pid=8494 (bash)
07/12 15:36:32 SB0  check for lockfiles
07/12 15:36:32 SB0  locking the line
07/12 15:36:33 SB0  WARNING: DCD line still active, check modem settings (AT&Dx)
07/12 15:36:33 SB0  lowering DTR to reset Modem
07/12 15:36:33 SB0  send: ATM0[0d]
07/12 15:36:34 SB0  waiting...
07/12 15:36:53 SB0  wfr: waiting for ``RING''
07/12 15:36:53 SB0  cannot set controlling tty (ioctl): Operation not permitted
07/12 15:36:53 SB0  >>> this might be caused because you have run mgetty/vgetty
07/12 15:36:53 SB0  >>> from the command line.  Don't do that, use /etc/inittab!
07/12 15:36:53 SB0  send: ATA[0d]
07/12 15:36:53 SB0  waiting for ``CONNECT'' ** found **
07/12 15:37:07 SB0  send: 
07/12 15:37:07 SB0  waiting for ``_'' ** found **
07/12 15:37:10 ##### data dev=ttyUSB0, pid=8599, caller='none', conn='33600 V42bis', name='', cmd='/usr/sbin/pppd', user='/AutoPPP/'

/var/log/messages

Jul 12 15:53:51 navi pppd[8976]: pppd 2.4.5 started by , uid 0
Jul 12 15:53:51 navi pppd[8976]: Using interface ppp0
Jul 12 15:53:51 navi pppd[8976]: Connect: ppp0 <--> /dev/ttyUSB0
Jul 12 15:53:51 navi pppd[8976]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Jul 12 15:53:54 navi pppd[8976]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Jul 12 15:53:55 navi pppd[8976]: user dream logged in on tty ttyUSB0 intf ppp0
Jul 12 15:53:55 navi pppd[8976]: PAP peer authentication succeeded for dream
Jul 12 15:53:55 navi pppd[8976]: found interface wlan0 for proxy arp
Jul 12 15:53:55 navi pppd[8976]: local  IP address 192.168.1.150
Jul 12 15:53:55 navi pppd[8976]: remote IP address 192.168.1.151

The /var/log/syslog file usually just has a more verbose output of what is contained in the messages log file; at least, it does in regards to the pppd messages. Monitoring the syslog file is a good idea for troubleshooting.

End of Part 3

That is it. If nothing went wrong, you should be able to browse the web with your Dreamcast. Part 4 will cover some issues with the PC-DC server and various games.

PC-DC Server Guide Part 2: DC Side Configuration

Posted by ryochan7 on July 11th, 2009  •  View Comments  • 
Tags: dreamcast, linux, pcdc
Updated on July 12th, 2009

« Go to Part 1

Now that the PC side of the system is configured, it is time to configure the Dreamcast to connect to the PC.

Starting Notes

This portion of the guide will focus on configuring the Dreamcast to connect to the PC-DC server using Planetweb 2.62. You can use a different version but I would suggest that you use version 2.0 or greater. Also to note, I occasionally use Dream Passport but I can't use it to configure my Internet connection without issues.

Another really important note is regarding the modem bundled with the Dreamcast. You should probably check the model number of the Dreamcast modem. For North American Dreamcast units, revision 670-14140A does not require the use of a line voltage inducer but revision 670-14140B does require the use of some line voltage inducer or a modem that runs power through the phone line. To check the revision number of the modem, look on the CAUTION sticker located on the silver inner side of the modem. My Dreamcast modem is a 670-14140A.

Dreamcast modem revision pic

Planetweb Configuration

Basic Information

Now, time to configure the Dreamcast. Press the pause button to bring up the control panel and go to options (lower right-hand button). Next, go to Internet Connection. From there, here is a list of the options under the Basic Infomation page and how to configure them.

  • Your Real Name: (Anything will work here)
  • User Login: dream (Put in the user name that you gave the UNIX user in part 1)
  • Password: dreamcast (Put in the password that you gave the UNIX user in part 1)
  • Dial Up Number: 555 (Put in at least a one digit number. Leave area code field blank)
  • Backup number: (Leave blank)
  • DNS1: 0.0.0.0
  • DNS2: 0.0.0.0

NOTE: The DNS portion will be taken care of by the ppp daemon on the Linux box so you don't have to specify DNS servers in your Dreamcast configuration; they will be ignored if you do change the default numbers.

Dial Options

Next, click OK to go to the Dial Options page. Here is a list of the options to configure for the Dial Options portion.

  • Area code you are dialing from: (Leave blank)
  • Long distance call prefix: (Leave blank)
  • Call waiting prefix: (Leave blank)
  • Outside dialing prefix: (Leave blank)
  • Modem Init: AT&F0 (usually the default. Last character is the number zero)
  • Dial: Tone
  • Dial area code: Off
  • Blind Dial: On

The "Blind Dial" option is the most important option on the page. You must have the option turned on. That way, the Dreamcast will not need to detect a dial tone on the line in order to dial out. Just to mention it, there are some games, like Quake 3, that ignore the blind dial option and will try to detect a dial tone on the line. Part 4 will cover how to get around this problem.

Click OK to go on to the Proxy Settings page. There is only one option that you have to check on the Proxy Settings page.

  • Use Proxy: No

Click OK to return to the main options menu and then save the configuration to your Dreamcast.

End of Part 2

That is all for part 2; this part was a lot shorter than the last part. In part 3, we will cover launching the mgetty process, connecting the Dreamcast to the Linux server, and getting on the Internet.

Go to Part 3 »

PC-DC Server Guide Part 1: PC Side Configuration

Posted by ryochan7 on July 11th, 2009  •  View Comments  • 
Tags: dreamcast, linux, pcdc
Updated on July 13th, 2009

« Go to Part 0

Now on to the real start of the guide.

Hardware

First, get a PC that can run a Linux distribution. I mainly use Ubuntu as my distribution of choice but you can probably choose whichever flavor of Linux you like; I remember that at some point I was unsuccessful in making a PC-DC server on Fedora 8. The next important item that you will need is some sort of voice modem. I use a TRENDnet TFM-560X external serial modem. Even though I use a serial modem, a USB modem should work fine. If you can, find a modem that runs power through the phone line. That way you can avoid having to make a line voltage inducer. Most external modems should run power through the phone line. Of course, have a good length telephone line to run between your Dreamcast modem and your PC modem.

Initial setup

Once you get a Linux distribution installed on your PC, we can start with the real details. First off, you might need to check if the kernel that came bundled with your distribution includes PPP support; most desktop Linux distributions bundle a kernel with PPP modules included. Next, install the programs mgetty and pppd if they are not already installed.

Sample apt-get line:

sudo apt-get install mgetty ppp

Now, on to configuring the main software.

Configure Mgetty

On Ubuntu, there are three configuration files bundled with mgetty that are installed under /etc/mgetty/.

I didn't have to worry about editing the default config files for my setup. The main file that you will have to be concerned with is the login.config file. You will need to check whether there are lines for launching ppp and /bin/login. Check the files linked above to look over my config files. You might need to tweak your mgetty.config depending on your setup.

Configure PPP

Now that mgetty is configured, it is time to configure the ppp daemon. There are a lot of configuration files for PPP but there are only a few that you have to be concerned with. The following are typically installed at /etc/ppp/.

NOTE: The last config file listed will vary depending on what the device interface is for your modem. The interface for my modem is ttyUSB0 so the last file in my case is options.ttyUSB0. Also, there might not be a second options file pre-installed so don't worry if one is not in the directory. Make sure you have write access to the /etc/ppp/ directory and make the config file.

options

Example options file:

debug
login
default-asyncmap
require-pap
ms-dns 192.168.1.1
proxyarp
ktune

The most important file in the list of ppp configuration files is the options file. It will likely cause you the most trouble if you don't know what you are doing; it took me several months to get Quake 3 working thanks to this config file. I won't explain the whole configuration file but I will mention a couple of specific things about the file. The ms-dns line of the options file must be filled in with the IP address of your primary DNS server that is also used for your PC connection. My router runs a DNS server so I fill in 192.168.1.1 (IP address of my router). You will likely put in the primary DNS address from your ISP here.

ms-dns 192.168.1.1

The next specific topic is the default-asyncmap option. For the most part, you want the option included. However, for Quake 3 and StarLancer, you will want to disable the option. To do this, you will put in the # symbol before the option to comment the option out.

#default-asyncmap

Lastly, ktune is an option that will automatically enable IP forwarding. This is necessary so that your Dreamcast can access any outside IP address. For more information on various ppp options, read the pppd man page.

options.(INTERFACE)

Thankfully, very little has to be brought up about this file. The IP address that you give the Dreamcast and your ppp proxy should be within the same subnet as your PC; for my network, it is 192.168.1.*. The first address in the first line will be the IP address that you give your proxy and the second address will be the IP address that you will give your Dreamcast. I set my proxy address to 192.168.1.150 and I give my Dreamcast an IP address of 192.168.1.151. The netmask option should match the subnet mask of your network connection; 255.255.255.0 is what most people will use.

Example options.(INTERFACE) file:

192.168.1.150:192.168.1.151
netmask 255.255.255.0

pap-secrets

To let your Dreamcast user log in to the PC-DC server, you will need to alter this file. You will need to specify the user name and the user password in this file in a specific format. Where it is placed in the file doesn't matter; I just place it at the end of the file. The format of the line is as follows:

user * password *

This is an example of the line that would be used for the user that we will make in the guide.

dream   *   dreamcast   *

Making Dreamcast user

We are finally past configuring ppp; that was long. Now, you will make the user that the Dreamcast will use to login to the PC-DC server. I usually use the users-admin application that is bundled with Gnome to make the Dreamcast user but I will show how to do it with the useradd and passwd commands.

sudo useradd -G dialout,dip,users -c "Dreamcast user" -d /home/dream -g users -s /usr/sbin/pppd dream
sudo passwd dream

These command will make a user "dream" on the server. When running passwd, enter dreamcast for the user password when prompted. Here is a quick breakdown of the specific user properties; useful if you are going to use something else to make the user.

  • User name: dream
  • Groups: dialout,dip,users
  • Main group: users
  • Home directory: /home/dream
  • Shell: /usr/sbin/pppd

Under Ubuntu, the dialout group has access to the modem and users in the dip group are allowed to execute the ppp daemon directly; the Dreamcast user has to belong to both groups under Ubuntu Jaunty. You might have to change the group(s) depending on your choice of distribution; check user permissions to find out which groups have access to your modem device and to the pppd executable. Also, check where the pppd program is and use that location for the user's shell; /usr/sbin/pppd is where it will usually be. You can check where the application is with the whereis command.

whereis pppd

End of Part 1

That is it for this part of the guide. Check back in for part 2 which will cover configuring the Dreamcast to login to the PC-DC server.

Go to Part 2 »

More Blog Posts