Animating Nam Tables?

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Animating Nam Tables?

Post by Septr »

Hello all. So I have a quick question/favor to ask.

Is it possible to animate a bacground nam table so that I can create frames of nam tables that the rom will cycle through?
My goal is to use vegaplay for audio but have a animated background cycling indefinitely.

Also I am curious if there is any tips you have on using multiple pallets on a single background. Or am I stuck with using one pallet each frame?

As always thank you.

Also if you feel you have time to help on a more one on one basis, I'm willing to commission your work if you will assist the creation in the code I desire.
Last edited by Septr on Wed Nov 12, 2014 11:14 pm, edited 1 time in total.
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: Animating Nam Tables?

Post by Kasumi »

It really depends on how complex you want your background animation to be. If you're looking to do video like Bad Apple or the stuff here it's pretty difficult. (Especially considering the NSF dictates what RAM is safe to use.)

If you're looking to do simple stuff like The water in Kirby's Adventure, that's easier. You can easily use 4 background palettes (of 3 colors plus one universal color) every frame. Each palette is restricted to a 16x16 pixel area, generally.
Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Re: Animating Nam Tables?

Post by Septr »

just simple stuff. I'm only using 4 locations in my CHR that are completely filled with the 4 possible pallet colors and I am drawing on the NAM level of things switching pallets for the colors I want. I just want to create like... lets say 5-10, nam files containing 1 frame of the animation each. then I want to cycle through those nam tables on screen

also more about the pallet question. I guess my terminology was wrong. I'm currently using up all 4 pallets (4 colors per pallet with the shared color on each) I was wondering if there was any wizardry that would allow another set of 4 pallets to be used or something else that would allow more colors.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Animating Nam Tables?

Post by rainwarrior »

If you don't need to scroll, you can do a double-buffered situation where you update the offscreen nametable a little bit each frame, and then swap when it's finished. You can also buffer CHR-RAM in the same way if you need to update the tiles themselves.

You can very easily send 64 bytes to the PPU in a vblank, but with some mastery you might manage upwards of 200.

There's 4 more palettes that apply to sprites only. You can use sprites to show these colours. Sprites also aren't limited to aligned 16x16 pixel blocks like background tiles are.
Last edited by rainwarrior on Wed Nov 12, 2014 11:24 pm, edited 1 time in total.
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: Animating Nam Tables?

Post by Kasumi »

Rainwarrior ninja'd, so I won't repeat what he said. I'll only say: Yes, that's possible. Do you have the .nams ready?

Edit: And there is some palette wizardry, but it's above my pay grade.
Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Re: Animating Nam Tables?

Post by Septr »

I don't need to scroll, sir ;P.

And forgive my ignorance but most of that went right over my head. I'm not really a coder. I'm a musician. Been using MML and a modified vegaplay for making roms. So I don't know how to perform those tasks myself unfortunately.

And no I have one frame done. I released my project and instead of positive support I was met with rejection and criticism. I'm trying to make my demo better and this is the only way I know how really :/

I can make some place holder frames for you if you want. But I suspect you will need my actual frame material to be effective at helping me huh?

I will start creating the rest of the frames I need as soon as I possibly can.

If your interested in the demo I'm trying to fix..... it can be found here: http://chipmusic.org/forums/topic/15600 ... e-release/
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: Animating Nam Tables?

Post by Kasumi »

Septr wrote:But I suspect you will need my actual frame material to be effective at helping me huh?
Well, nah, if the nametables aren't compressed it literally makes no difference what they look like. But I'm not just gonna do the thing for you with not a lot shown. One year has passed since this, even. :wink:
Hmm... I wonder how a trick like this looks from an NES video signal. That Nyan Cat is just 4 colors. I recall Tepples doing something similar for his falling blocks game.

For the record, I quite understand their sentiments about the cart. Battle Kid 2 is less money and a full game.

RE: Sprites. Sprites are kinda tricky with Vegaplay. You have to find a page of RAM the NSF isn't using, or write your own music driver in which case you don't need Vegaplay.

Edit: Hmm... Don't get sued, also.
Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Re: Animating Nam Tables?

Post by Septr »

haha. Yeah, that is still sitting in the backseat right now. Attached is the rom I was making using yours and lidnariq's help from that thread. I just haven't written any more songs, or transcribed my remaining two into MML yet. Their currently in a midi format for use with MidiNES.

That being said I understand completely. I'll finish up all my frames before asking for anything concrete.

This is just a matter of animating the cat and stars in such a way that I don't need to use very many sprites to cover up the tiles that are affected by the 2x2 shared pallet issue. Which I've actually used that exact ASM from that last thread in this demo. It allowed me to place the sprite exactly where I needed it to in order to cover up that pink tile on the cats face. You can see an image of what I mean at the bottom of that thread

Kasumi wrote: Edit: Hmm... Don't get sued, also.
Shit -_-*
Attachments
Relic - Tyler Barnes.nes
(48.02 KiB) Downloaded 247 times
User avatar
NESHomebrew
Formerly WhatULive4
Posts: 418
Joined: Fri Oct 30, 2009 4:43 am
Contact:

Re: Animating Nam Tables?

Post by NESHomebrew »

Keep in mind (I noticed in your demo), that the borders will be cut off by televisions. This is simulated by most emulators, and you will notice the difference by switching betweel PAL and NTSC regions.
Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Re: Animating Nam Tables?

Post by Septr »

indeed the upper and lower portions are slightly cut off by the CRT I have at home. I'm not too worried about the inevitable crop.
Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Re: Animating Nam Tables?

Post by Septr »

Ok, here are my NAM frames. Their are 7 unique frames repeating twice. So 14 frames in total. I need 14 so I can add the stars at a later day (They move slower than the cat's animation). but the essentials are here. I have 3 locations that I need to hide using sprites, Two of which must be hidden simultaneously.
Attachments
NAM Frames.zip
(9.81 KiB) Downloaded 233 times
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: Animating Nam Tables?

Post by Kasumi »

Don't have time to download/look at it right now, but keep in mind that 14 frames uncompressed would be 14 KB. Your NSF then has to be less than probably 16KB to still fit on NROM. (Assuming around 2KB of code which should probably be enough) Since it is just the one song, that may not be an issue. But it's worth noting. Edit: The frames could almost certainly be compressed, but writing code to do that is much less easy mode.
Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Re: Animating Nam Tables?

Post by Septr »

Hmmmm, Well my nsf is currently 24K, but that is only because mml/ppmck is forcing my samples into bank 2 and all my song data is in bank 0. So I have an entire bank in between filled with nothing. I don't really know how to force the banks to merge since my samples are only 2129 bytes, and my song data are 5235 bytes that is 7364 out of the 8192 in each bank.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: Animating Nam Tables?

Post by zzo38 »

Septr wrote:Hmmmm, Well my nsf is currently 24K, but that is only because mml/ppmck is forcing my samples into bank 2 and all my song data is in bank 0. So I have an entire bank in between filled with nothing. I don't really know how to force the banks to merge since my samples are only 2129 bytes, and my song data are 5235 bytes that is 7364 out of the 8192 in each bank.
Maybe something like #SETBANK A,2 and so on might work. (Also, I believe the ppMCK driver is meant only for .NSFs and not for games. You might be able to work a new driver that can use the same compiler, though.)
(Free Hero Mesh - FOSS puzzle game engine)
Septr
Posts: 43
Joined: Fri Mar 08, 2013 12:19 am

Re: Animating Nam Tables?

Post by Septr »

Yeah, I've fiddled with the bank switching commands quite alot. I've not had any luck getting #NO-BANKSWTCH or #SETBANK to work in my favor.
Post Reply