It is currently Fri Nov 24, 2017 6:13 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Tue Apr 11, 2017 5:38 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
Action 53 supports the same mirroring options as MMC1: horizontal, vertical, or 1-screen mirroring.


Top
 Profile  
 
PostPosted: Tue Apr 11, 2017 10:31 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5838
Location: Canada
JRoatch wrote:
vblank overflow

I notice there is an (E) in the filename. Is this game intended for PAL only? (Which would explain a vblank overflow in NTSC.)


Top
 Profile  
 
PostPosted: Fri Apr 14, 2017 2:23 am 
Offline
User avatar

Joined: Wed Dec 28, 2016 7:16 am
Posts: 40
It's intended to deliver the best experience on PAL (music and gamespeed) but should run on NTSC. Bugs on hardware have two main causes: I am new to NES dev and I have no flashable card to test.

So, on the first point. As I understand it a vblank overflow is when I continue to try to write on PPU's nametable after the end of the v-blank. I am right? It would make sense since the config screen initialization subroutine writes a lot of buffers to be processed by the next nmi. So, to force process it before re-enabling the PPU may be an efficient fix. I'll test it when I will be back home (on monday.)

About my hardware issue, if someone near Paris (France) has a powerpack, everdrive, home-made flashable cart, ... I can offer pizzas, retrogaming and 6502 fun for a day of tests. Contact me ;)

_________________
Super Tilt Bro.: https://sgadrat.itch.io/super-tilt-bro


Top
 Profile  
 
PostPosted: Sat Apr 15, 2017 4:00 pm 
Offline
Formerly 43110
User avatar

Joined: Wed Feb 05, 2014 7:01 am
Posts: 313
Location: us-east
When you have both the background and objects turned off in PPU_MASK ($2001), that vblank availability is extended until rendering is re-enabled.

So the algorithm would be something like:
Code:
wait for nmi
disable rendering: PPU_MASK = 0x00
render all buffers
wait for nmi
enable rendering: PPU_MASK = 0x1E


Top
 Profile  
 
PostPosted: Sat Apr 15, 2017 7:23 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10118
Location: Rio de Janeiro - Brazil
JRoatch wrote:
When you have both the background and objects turned off in PPU_MASK ($2001), that vblank availability is extended until rendering is re-enabled.

But then you need to re-enable rendering always at the same time, otherwise the picture will jump. If you're doing this just as a safety measure, it's not so bad to have occasional jumps in the few cases where you extrapolate the vblank time, but if you consistently need more time, you should look into timing the moment you re-enable rendering or the screen-shaking will be unbearable.

Another thing to consider when enabling rendering late is that the scroll can't be set by regular $2000/5/5 writes, because those don't affect the vertical scroll once rendering has begun. In this case, you need a $2006/5/5/6 sequence to properly set the scroll.


Top
 Profile  
 
PostPosted: Sun Apr 16, 2017 6:44 am 
Offline
User avatar

Joined: Wed Dec 28, 2016 7:16 am
Posts: 40
The vblank overflow should be fixed. Every time the game changes screen, drawing and NMIs are disabled, an appropriate "screen init" subroutine is called then the drawing is re-enabled (see change_global_game_state subroutine.) So the fix was to process buffers in the "screen init" of the configuration screen instead of relying on the next NMI to do it. Thank you all for the help on this, I definitely learned a thing or two ... Actually four things!

As for the uninitialized nametable used when hitting, this is the behaviour with vertical mirroring. The game expects horizontal mirroring. So with vertical mirroring it initialize the bad nametable and scrolls fully on it instead of using the mirror of nametable 1 when setting scroll_x to 255. Is mirroring an option for the game in a53 or should Super Tilt Bro do something special to activate horizontal mirroring?

Bonus fix on this version: in the configuration screen, the "player 2" option changed when changing "stocks" option from "one" to "five". Saw that re-reading the code while investigating vblank overflow.


Attachments:
File comment: Fixed vblank overflow
Super_Tilt_Bro_v4_(E).nes [24.02 KiB]
Downloaded 38 times

_________________
Super Tilt Bro.: https://sgadrat.itch.io/super-tilt-bro
Top
 Profile  
 
PostPosted: Sun Apr 16, 2017 9:48 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
RogerBidon wrote:
As for the uninitialized nametable used when hitting, this is the behaviour with vertical mirroring. The game expects horizontal mirroring. So with vertical mirroring it initialize the bad nametable and scrolls fully on it instead of using the mirror of nametable 1 when setting scroll_x to 255. Is mirroring an option for the game in a53 or should Super Tilt Bro do something special to activate horizontal mirroring?

Mirroring is an option, but games with a 128 kbit PRG ROM are currently treated specially in the build process (autosubmulti.py), and I have to specify their mirroring in the config file. I'll look at what's causing the wrong mirroring to be used.

EDIT: autosubmulti.py was to blame


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

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