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.
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.
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.
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.
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.
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....
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.
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?
The demo seems to work now, and it scrolls quite smoothly (looks like 1 pixel per frame).
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.