Hello - Introduction and Project

What is a Uzebox? How can I get one? Check here!
Post Reply
blue_knight
Posts: 48
Joined: Sun Dec 06, 2009 8:08 am

Hello - Introduction and Project

Post by blue_knight »

Hello, I'm new here. I've been interested in building a console and working on some fun NES style projects on it. I have previous experience with programming, usually doing work with 3D games and projects. I'm also a Zelda fan and have attempted a Zelda 2 remake in the past within another engine. However I had to deal with limitations and issues in that engine and spent so much time scripting that I stopped working on it - I really wanted to code the entire engine, not shoehorn it into an existing engine. Couple this with an interest in electronics and challenges - I work on robot projects as well - and well, I decided to take the challenge of porting Zelda 2 to this platform, I'd write the tile engine, fit all the tiles and other data in memory (over 500 8x8 tiles) as well as write the game logic and so on.

On the NES title, the tiles are 2bpp where index 0 is the background color or transparency (if a sprite). Each tile is then assigned to a "CSet" which is part of a 16 color level palette (there are 5 CSets + 1 background color -> 5x3 colors + 1 background). Different levels can use different palettes and tiles can be assigned to different CSets in order to get a lot of re-use and variety. So in program memory, 512 tiles at 2bpp can be compressed to about 8Kb and each level can store a list of used tiles (and CSets) which can be decompressed into "video memory." So at runtime, the tile engine doesn't have to do paletted lookups but gets compressed at 2bpp in program memory. Since it only decompresses the necessary tiles for a given set of screens then the runtime memory usage is minimized.

Obviously I've just started out (a few hours total at most), so most of this is just planned at the moment. However I do have some stuff working, such as basic input, tile rendering (mode 3) - just decompressed 8 bit tiles right now, and part of the initial palace map built. I got some scrolling working, though I'm still having some issues there. Scrolling right works perfectly but I'm having some issues when scrolling left. Basically when I load columns for the left side, I seem to be loading the wrong data. From what I understand tiles are arranged in "vram" in a fixed 32x32 (or whatever v tiles is set to, 28 in my case I think), and when the scroll value is modified the visible "window" to these tiles is shifted and wraps. The ScrollX value wraps at 256, which is exactly the distance needed for 32 tiles in memory. So when the screen scrolls to the next tile boundary I calculate the column in vram to write to and write the next column of data from the master map array. For scrolling right this works perfectly and scrolling left is still acting funny. Anyway once this works I'll change the monolithic map to multiple maps and eventually include repeating patterns like Platz to save memory. Once scrolling is worked out, the next task will be to get the character to work properly.

The idea is to match the NES game and then use the mature engine to make future Zelda 2 style games.

Here is some very early test screenshots from the emulator, remember this is very early. On a few tiles have been made so far, I'm making them by hand at the moment. Click on the images to see full size.

Image Image Image
User avatar
Jhysaun
Posts: 214
Joined: Tue Nov 04, 2008 12:32 am

Re: Hello - Introduction and Project

Post by Jhysaun »

Welcome aboard.

Those screens look stunning :D Looking forward to this.

>J
Lerc wrote:I intend to use my powerful skills of procrastination to ensure that when I get to making things, the chips will be available.
User avatar
Flecko
Posts: 158
Joined: Mon Jan 05, 2009 11:50 pm

Re: Hello - Introduction and Project

Post by Flecko »

/drool!

Man, thats an amazing task if you're up for the challenge, and it sounds like you are. Welcome aboard, and be sure to ask any questions or post updates when you can!

This should give me some more inspirational fuel to get on with my game...
blue_knight
Posts: 48
Joined: Sun Dec 06, 2009 8:08 am

Re: Hello - Introduction and Project

Post by blue_knight »

Thanks for the comments.

When I fix the scrolling and get the character working, I'll start a progress thread for this project in the Games&Demos sub-forum.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Hello - Introduction and Project

Post by uze6666 »

:shock: Wow, that's a big challenge for a first Uzebox project! I'm curious to see how you will approach a palette based tile engine. It's been discussed in the past and it looks like it's not for the feint of heart!

Anyhow, welcome on board! There's lots of knowledgeable peoples here so feel free to ask about nebulous parts of the console, engine or else!

-Uze
blue_knight
Posts: 48
Joined: Sun Dec 06, 2009 8:08 am

Re: Hello - Introduction and Project

Post by blue_knight »

Thanks for the welcome. And yes the project will be challenging but that's the point, really. I really do think the hardware is capable of playing this game though.
Post Reply