It is currently Tue Oct 17, 2017 9:03 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Issue with windows
PostPosted: Mon Jan 27, 2014 2:23 pm 
Offline

Joined: Tue Jul 14, 2009 11:04 am
Posts: 55
Image

I'm having an issue with part of a window appearing on screen when it shouldn't be and I'm somewhat confused as to why it is happening. I'm thinking this is controlled by an I/O register, but I don't really know a whole lot how screens get pieced together other than their positioning on screen with Window X and Y, which I'm pretty sure isn't related to this issue.

Just for an extra bit of context, this is what the screen looks like in VRAM.

Image

What am I missing here? Thanks.


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Mon Jan 27, 2014 4:34 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2799
Are you making an emulator or is this a game you are making?


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Mon Jan 27, 2014 5:11 pm 
Offline

Joined: Tue Jul 14, 2009 11:04 am
Posts: 55
I'm hacking a game.


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Mon Jan 27, 2014 5:19 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2799
Looking at the screenshot, the window layer may be reenabled too soon. There probably is a scanline interrupt being used to disable the Window Layer for a number of lines, but it looks like it's being reenabled too soon. I guess this is a translation hack right?


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Tue Jan 28, 2014 7:35 pm 
Offline

Joined: Tue Jul 14, 2009 11:04 am
Posts: 55
Yeah, translating.

I'm still not entirely clear on what I'm looking for. Since the God window is variable in height depending on the number of gods available and the issue doesn't happen with one god, it'll probably be easier to focus on that part. What is the process of getting from VRAM to the screen on the GB? Are VRAM transfers handled with DMA?


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Tue Jan 28, 2014 8:02 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19093
Location: NE Indiana, USA (NTSC)
DMA to VRAM (aka "Blast Processing") works on Game Boy Color, not original Game Boy. Original Game Boy has to copy data the hard way, by using instructions to load data from ROM and write it to VRAM.

The principle of rendering on the Game Boy is essentially the same as that on the NES, modulo some timing differences (NES's pixel output is fixed rate while GB's is variable). While rendering is turned on, the system will use the nametables and pattern tables in VRAM to determine what pixels to output.


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Tue Jan 28, 2014 8:43 pm 
Offline

Joined: Sat Aug 28, 2010 9:01 am
Posts: 190
Could you tell us which game this is, or maybe even give us your current work progress on the ROM?

Are you sure the game is even using the window for this? It could actually be changing the tile map source and SCX/SCY values midscreen on the right scanline, for example using the LCD interrupt.


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Wed Jan 29, 2014 1:58 pm 
Offline

Joined: Tue Jul 14, 2009 11:04 am
Posts: 55
I found the problem which was apparently caused by my accidental changing of 1 byte that was used for the FF45 register, LYC.


Top
 Profile  
 
 Post subject: Re: Issue with windows
PostPosted: Wed Jan 29, 2014 10:26 pm 
Offline
User avatar

Joined: Wed Dec 06, 2006 8:18 pm
Posts: 2799
You changed when the scanline interrupt was firing then. It does explain how it ended up looking then.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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