Wednesday, August 28, 2013

Being as underemployed as I am it is very hard to allocate funds such as this, but I threw 80 bucks at a new soldering station because this is no longer a hobby. I may only make a little here and there, but soldering and designing electronics is now a profitable experience.

I thought to myself "If I wish to further my abilities, then I had better stop limiting myself with this horrid Radio Shack iron..." So I did. :)

I researched and asked and polled for the best station under $80 and the 'nearly' unanimous response was the Kada (or similar) 852D+ 2-in-1 SMD rework station. The one I picked up is by XPower, but it uses the same iron and case as other clones; it probably even has the same 'stolen' program as Kada's.

So far, my experience has been very positive. I haven't given it any extensive use as of yet, but my Gameboy Programmer Boards will be arriving soon! If you've read that post, they have some surface mounted IC's and I am just dying to try out my new hot air gun! I have watched a few videos on how to apply SMT chips and components with a hot air gun and solder paste. It seems as simple as if I were to glue them on and blow dry it!

Once the boards and parts arrive, I may make a video on the completion of one board. The video will also be a review of the station so that others may learn before they buy. (Though I suggest any self-respecting modder should) ;)

well here she is:

I REALLY need to clean off my desk...This should fit well at the back but I still have to build my solder-smoke filters to rest underneath. Those will be another post soon enough.

Now then, lets start talking about sprites, maps and other graphic elements. As you very well know, the Dot matrix gameboy displays four shades of grey (or green). Each shade is represented by two bits: 00, 01, 10 or 11 respectively. It isn't that important to know right now, but while setting up the palette in your gameboy code, it is commonly done as follows:

Where "rBGP" Equates to $FF47, an address representative of the specially reserved I/O Register...but why am I just repeating what you have already read, right?

Now, back to the point. You may choose to design all of your characters and objects for your game strictly in binary or hexadecimal data if you wish but I prefer the visual approach. You know, the kind with a GUI. ;)

Both of these tools will help you create and visualize the output of tiles and maps. Tiles are going to be used both for maps and for sprites, you can imagine a sprite or character figure to be a collection of tiles. Pretty simple.

You'll start by opening Gameboy Tile Designer (or GBTD.exe). I like to keep the default color palette which is "Gameboy Pocket" because it is easier to work in shades of black rather than shades of green. Under View, I also like to switch to "simple" and use nibble markers, though they are not very easy to see.

Next select the color you would like to draw with by adding it to either your left mouse button or right mouse button by clicking on it with the corresponding button. Start filling in squares to your liking. You make design single 8 x 8 sprites or larger. Anything you wish as long as it is four colors. Once you finish a tile, click on the next blank tile on the far right of GBTD.

You will save the file with whatever content you have at this point and name it something relative to the content. Open Gameboy Map Builder (or GBMB.exe) and click file > Map Properties then use the browse button to locate your new *.GBR file that you made in GBTD. For no, you may ignore width and height because you can add columns and rows at will.

Once you have loaded in your tiles, you may continue to make more tiles! Make and place tiles, side-by-side by having both programs open at once. Each time you save your *.GBR file in GBTD, GBMB will automatically update! How cool is that?

Here are some time-elapsed screenshots of my own work.

The above Map is simply a 160x144px image that I can manipulate on screen. REMEMBER:
"The main GameBoy screen buffer (background) consists of 256x256 pixels or 32x32 tiles (8x8 pixels each). Only 160x144 pixels can be displayed on the screen." That means that where ever I place the image on the gameboy, there will be large empty scape on the sides. If I wanted to, I could have designed a full 256x256px map and used a scroll option and the d-pad buttons to view it all.

My process of designing such a large map was that I took an image I had re-sized and pixelized in Photoshop. There are a few options when pixelizing and for this one, I chose "pattern."

Below is the full 160x144 image which I have then transposed into GBTD...one tile at a time. It took nearly four hours, but I figured out that I was able to copy and paste a few of the colors. It turened out that the three lightest colors could be copied and pasted from PS to GBTD. I still had to fill in the black (11) pixels though.

With a temporary frame, I was able to see more clearly which pixels I was currently working on. Again, I did this one 8x8 tile at a time.

Once you get better at creating tiles, you can create all sorts of maps and sprites, both for game characters and even art!

When I am able to write better ASM code, I will demonstrate how to export these files and INCLUDE them into your very own ROM images.
Thanks for reading!

Wednesday, August 7, 2013

I plan on doing a small run of two sided PCBs based on Reiner Ziegler's Reader. I have redesigned the board in EagleCAD as a mostly SMT populated board, though some components have either option! I do not plan on supplying full kits, so part ordering will be up to you.

If you wish to throw some money into the pool and have a board sent your way, email me here:
Apple2ja*Cmich*edu (dots instead of asterisks).

Here are some pics, dimensions and a 3D render:

Some notes about the boards, I have decided to add vias if people want to use through-hole components rather than SMT components. This does not include the ICs because these components are too large to fit within my strict board limitations. The photos show no through-hole resistors, but I am adding them shortly.

Lets try not to add both version of said components, k? If you choose to use a ceramic resonator rather than an ordinary crystal oscillator, be sure to ignore the cap locations. If you choose to place an crystal oscillator, be sure to check the data sheet as to the capacitance of caps you will need.

Also note that the ICSP connector must be on the bottom of the board. After programming the Atmega8515, you may remove the ICSP connector since there will probably never be any updates.