It is currently Sun Oct 22, 2017 1:31 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Sep 10, 2005 7:43 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2131
Location: Minneapolis, Minnesota, United States
Okay, my sprite shows up just fine on every emulator except for Nintendulator. When I move my sprite, you can see it move, but you can't see it when it's still. Any explanation for this? I do the load sprite method just fine:

Code:
         lda #8
         sta cy      ; ypos
         lda #5
         sta ct       ; tile number
         lda #8
         sta cx      ; xpos, and we didn't do anything to attributes, because it's not neccisary
         lda #high(cynthi)    ;sprite dma
         sta $4014



any explanation? I'd really like if I could figure this out, because it's annoying. thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 10, 2005 8:25 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
1. Write 0 to $2003 before performing a sprite DMA
2. Make sure you do your sprite DMA during VBLANK.

_________________
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: Sat Sep 10, 2005 9:11 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
Are you making sure to use the same tile number when it's still and when it's moving? If not, then perhaps you are loading the walking cels but not loading the standing cels.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 11, 2005 9:59 am 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2131
Location: Minneapolis, Minnesota, United States
you mean like this?:

lda #$00
sta $2003
sta $2003
bit $2002
lda #high(cynthi)
sta $4014

because if so, that doesn't work. I can't really think of a way to do it in vblank besides in bit testing $2002. I wish I could just say:

see if bit 7 is on

and be done with that. Sorry, I hope I'm not looking stupid here...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 11, 2005 10:08 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
Celius wrote:
lda #$00
sta $2003
sta $2003


Umm, why are you setting the SPR-RAM address twice?
The SPR-RAM address is only 8 bits wide, so it is a single-write register (contrary to GbaGuy's tutorial which erroneously treats it the same as $2005 and $2006).

As for doing it in VBLANK, you shouldn't be "detecting if you are in VBLANK", but should instead be simply performing the sprite DMA at the beginning of your NMI routine.

One other minor thing to note: ALWAYS read $2002 at least once before enabling NMIs via $2000, or you may find yourself receiving an immediate NMI if you happened to enable them during VBLANK without having read $2002 earlier...

_________________
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: Sun Sep 11, 2005 11:35 am 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2131
Location: Minneapolis, Minnesota, United States
Oh, man.. Something happened to my controls, and it's really bad. Well first of all, yes, my sprite does show up in Nintendulator, but when you press right, the sprite goes left really fast, when you press left, the sprite goes southwest really slow, when you press up, it goes up really fast, and when you press down, you go down a little slower, but not much. Oh, and if you press up twice, then press left, and it just goes left really slow. But if you press down twice, it goes southwest again. What happened? My controls code is fine, there's something else wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 8:39 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2131
Location: Minneapolis, Minnesota, United States
Never mind, I fixed it. Okay, I was wondering something. What if you want things in your NMI to happen, but you want some things in your routine to happen at different times? Like, I want to increment vbl_count constantly, but I don't always want my sprite sitting there on the screen. How could I avoid this? Okay, this is bad, but I was thinking of something like this:

Code:
nmi:
       inc vbl_count
       lda rmlod    ;variable for saying room is loaded
       cmp #1      ; if variable is 1 (I add one to this variable when the room is loaded)
       beq continue
       rti

continue:
       lda #0
       sta $2003
       jsr handlepad       ; joypad
       lda #high(cynthi)
       sta $4014
       rts


it's because I only want my sprite to appear when the level is loaded. I tried that, didn't work, because I'm bad at coding. Okay, any suggestions?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 13, 2005 8:49 am 
Online
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7233
Location: Chexbres, VD, Switzerland
Disable sprites via $2001 when the level is not loaded, and/or clear the whole OAM with any value from $f0 to $ff, so all sprites won't be visible.
Not doing sprite DMA in a frame won't make sprites to disapear, they'll just stand where they were the last frame without moving.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 17, 2005 8:09 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2131
Location: Minneapolis, Minnesota, United States
Oh by the way, I forgot to say thank you, because your method worked. And also, is there any way to turn on clipping in Nintendulator? Because without clipping, FF3 is really bothering me, and I want it to be clipped. Any way to turn it on?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 17, 2005 8:10 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
If, by "clipping", you mean restricting the rendered screen to 256x224, there is no such option. Any other forms of clipping are already implemented.

_________________
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: Sat Sep 17, 2005 9:23 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
Quietust wrote:
If, by "clipping", you mean restricting the rendered screen to 256x224, there is no such option.

Then despite the excellent accuracy otherwise, if it can't be set to cut off the lines that a typical television cuts off, it is a poor emulation of an NES connected to a consumer TV.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 17, 2005 9:30 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
Nintendulator's goal is not to emulate an NES connected to a consumer TV - if it did, it would support fullscreen with VSYNC and have a bunch of graphic filters for 2xSAI, HQ2x, scanlines, and all that crap.

_________________
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: Sun Sep 18, 2005 10:17 am 
Offline

Joined: Tue Nov 23, 2004 9:35 pm
Posts: 615
If you wanted to do that you would probably have to clip a few pixels on each side of the screen as well.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 18, 2005 10:38 am 
Offline

Joined: Wed Feb 09, 2005 9:31 am
Posts: 418
tepples wrote:
Quietust wrote:
If, by "clipping", you mean restricting the rendered screen to 256x224, there is no such option.

Then despite the excellent accuracy otherwise, if it can't be set to cut off the lines that a typical television cuts off, it is a poor emulation of an NES connected to a consumer TV.


Good NES emulation should be measured by what it looks like when connected to the same TV as a real NES. I am sure that there is very little overscan if I hooked up my NES to my computer CRT. This is why I hate scanlines and such features in emulators. If you want the look of a crappy monitor, then hook up your computer to a crappy old TV via RCA composite.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 18, 2005 10:50 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
Quote:
Good NES emulation should be measured by what it looks like when connected to the same TV as a real NES. I am sure that there is very little overscan if I hooked up my NES to my computer CRT.


Good point; what is really wanted here (by some) is an NTSC television emulator. A real NES emulator would of course just output a raw NTSC composite video stream. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 8 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