Search found 22 matches

by johnnystarr
Sat Dec 29, 2012 6:09 pm
Forum: NESdev
Topic: What is the best way to delay events?
Replies: 29
Views: 7023

Re: What is the best way to delay events?

SECOND: .rs $3C This will reserve 60 ($3C) bytes, and I don't think you want that... The argument to .rs is the number of bytes you want to reserve, not an address (the idea is to NOT hardcode variables to addresses, so that you can easily move them around if you have to) or an initialization value...
by johnnystarr
Sat Dec 29, 2012 6:02 pm
Forum: NESdev
Topic: What is the best way to delay events?
Replies: 29
Views: 7023

Re: What is the best way to delay events?

You don't release any memory. You can reuse it. You can do whatever you want, this is assembly. There are no functions. There is nothing. You program what you want to do. But zeropage is used for pointers, and stuff you use often and it would really help to have quicker memory access. LOL, you are ...
by johnnystarr
Sat Dec 29, 2012 3:05 pm
Forum: NESdev
Topic: What is the best way to delay events?
Replies: 29
Views: 7023

Re: What is the best way to delay events?

Zero page reserve?
Does it store it in zero page?

Would you be able to release the zp bytes if you needed them?
by johnnystarr
Sat Dec 29, 2012 2:21 pm
Forum: NESdev
Topic: What is the best way to delay events?
Replies: 29
Views: 7023

Re: What is the best way to delay events?

3gengames wrote:No, you use a RAM reserve directive. Never, EVER hardcode anything. Especially like that.
Ok, so like this:

Code: Select all

   SECOND: .rs $3C
Is that what you mean?

Sorry, I'm pretty new to this. Could you explain the difference?
by johnnystarr
Sat Dec 29, 2012 1:38 pm
Forum: NESdev
Topic: What is the best way to delay events?
Replies: 29
Views: 7023

Re: What is the best way to delay events?

Just keep a counter variable. 2 seconds is about 120 frames. Start the counter at 120, and decrement it once per frame. Once it reaches zero, run the code that changes the character's state. Ahh, I see now. The NMI is run once per frame right? So, if I created the constant SECOND = $3C (dec 60), I ...
by johnnystarr
Sat Dec 29, 2012 1:16 pm
Forum: NESdev
Topic: What is the best way to delay events?
Replies: 29
Views: 7023

What is the best way to delay events?

I have been reading several tutorials lately that focus on animation of meta sprites. While I have learned a great deal, I haven't yet found any information on timing and delays. Having a strong background in C, I am confident with my abilities to discern memory efficient coding. The hard part for m...
by johnnystarr
Thu Dec 27, 2012 8:26 pm
Forum: NES Graphics
Topic: Sprite animation
Replies: 3
Views: 3796

Sprite animation

I have been trying to locate any animation tutorials online but havent so far. I have gone over basic tutorials and have been learning quite a bit. An example or two might go a long way. I have a few questions as well: Can you run the animation routine during NMI? Is there any built in PPU tricks, o...