It is currently Sun Dec 17, 2017 12:24 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Scrolling jitters
PostPosted: Tue Aug 02, 2005 11:50 am 
I get to the point,

I was wondering if someone could run this rom in an emulator on thier system or even possibly a Mapper #0 development cart (lol yea right). I was wondering if the scrolling appeared to jitter wierdly. It just doesn't scroll as smoothly as I've seen other games in the same emulator (Nintendulator) scroll.

In the program, just press left and right to move about the test map. I included the source code just in case.

Any help would be greatly appreciated.


Top
  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 11:51 am 
Offline
User avatar

Joined: Sat Jul 09, 2005 6:03 am
Posts: 85
That was me that posted. It happened again. Sorry.

EDIT : Doh! I forgot the link http://mbrenaman.com/decursus.zip and said "I" instead of "I'll".

It hasn't been a good day for me.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 12:02 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1393
Er, that demo isn't doing ANYTHING in Nintendulator because you never turned off Frame IRQs (by writing #$40, #$80, or #$C0 to $4017) and it's stuck forever in the IRQ routine.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 12:50 pm 
That very weird. In the source, I don't touch $4017. Not unless there's a gross bug in the program. The only thing I do with related to the IRQ is sei
before initialization and cli when I'm ready to run the game.

I'm using Nintendulator 0.955 and it runs. Let me go download that latest version I suppose.


Top
  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 12:51 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
If it's meant to run on a mapper #0 devcart, why would it ever enable the IRQ in the first place (with cli)? On power-up and reset, the I flag is always set. <looks at source> ...but it does have a cli in the source, and the IRQ handler never clears the APU interrupt (bit $4015), so it would enter an infinite loop 1/60 second after reset.

Another problem I see is the use of polling $2002 each time through the main loop. Unless you're lucky, this will periodically wait two frames and make your animation jumpy.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 12:57 pm 
Offline
User avatar

Joined: Sat Jul 09, 2005 6:03 am
Posts: 85
Well, I tried it in Nintendulator v.950 and it worked. However the only reason I even touched that flag is beacuse that NES101 tutorial suggested it.

As for polling $2002, I thought that's what I was supposed to do. Wait for vblank to start and end, do frame updates, repeat. I'm supposing there's a better way to do it....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 1:36 pm 
Offline
User avatar

Joined: Wed Nov 10, 2004 6:47 pm
Posts: 1845
polling $2002 to wait for VBlank is unreliable, as some VBLanks may be missed.

To wait for VBlank "properly", enable NMIs and have them regulate your program.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 2:00 pm 
Offline
User avatar

Joined: Sat Jul 09, 2005 6:03 am
Posts: 85
Well, I took out the I flag commands and tried to do what I think Disch meant and uploaded it.

This is what I did to time the frames.

(inside the reset part)
main loop:

wait_nmi = 1
do
while wait_nmi == 1

(the nmi)
nmi:

do everything I need to
wait_nmi=0


Does that sound right?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 7:52 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1393
The demo seems to work now, and it scrolls quite smoothly (looks like 1 pixel per frame).

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 03, 2005 12:58 am 
Thanks Quietust. I thought I left it at 2 pixels but either way....
I was going to use this as the code base for my little game, so I wanted to make sure it was functioning properly before I continued.

Once again, I can not express the value of this message board. Thank you everyone for tolerating another newb.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group