Progress Thread - Super Tilt Bro.

Moderator: Moderators

tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Progress Thread - Super Tilt Bro.

Post by tepples »

Action 53 supports the same mirroring options as MMC1: horizontal, vertical, or 1-screen mirroring.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Progress Thread - Super Tilt Bro.

Post by rainwarrior »

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.)
User avatar
RogerBidon
Posts: 44
Joined: Wed Dec 28, 2016 7:16 am

Re: Progress Thread - Super Tilt Bro.

Post by RogerBidon »

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 ;)
JRoatch
Formerly 43110
Posts: 422
Joined: Wed Feb 05, 2014 7:01 am
Contact:

Re: Progress Thread - Super Tilt Bro.

Post by JRoatch »

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: Select all

wait for nmi
disable rendering: PPU_MASK = 0x00
render all buffers
wait for nmi
enable rendering: PPU_MASK = 0x1E
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Progress Thread - Super Tilt Bro.

Post by tokumaru »

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.
User avatar
RogerBidon
Posts: 44
Joined: Wed Dec 28, 2016 7:16 am

Re: Progress Thread - Super Tilt Bro.

Post by RogerBidon »

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
Super_Tilt_Bro_v4_(E).nes
Fixed vblank overflow
(24.02 KiB) Downloaded 596 times
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Progress Thread - Super Tilt Bro.

Post by tepples »

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
Post Reply