Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,486,842
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-26-24 10:29 AM
Guest: Register | Login

0 users currently in ROM Hacking | 4 guests

Main - ROM Hacking - Mega Man 4 Hack - PPU Address New thread | New reply


MartsINY
Posted on 03-31-11 04:49 AM Link | Quote | ID: 140600


Micro-Goomba
Level: 11

Posts: 1/17
EXP: 4843
Next: 1142

Since: 03-31-11

Last post: 2073 days
Last view: 2073 days
Hi!

I'm making a hack of Mega Man 4.

I'm actually trying to load tile ine the PPU VRAM, and I'M succeding, by setting #$00 in $2001, and then writing my datas at 2006 and 2007.

But the problem, is when #$00 is in 2001, after a certain number of cycle, parts of my screen become black. How can I prevent this?

thx for your time

never-obsolete
Posted on 03-31-11 04:47 PM (rev. 4 of 03-31-11 04:57 PM) Link | Quote | ID: 140608


Rat
Level: 24

Posts: 74/96
EXP: 74495
Next: 3630

Since: 02-22-07
From: Phoenix, AZ

Last post: 2596 days
Last view: 2596 days
Writing #$00 to $2001 disables background and sprite rendering, so you have to add another write to turn them back on. Writing #$00 to $2001 midframe will cause portions of the screen not to be drawn. If you do all your writes to $2006/$2007 during VBlank, you don't need to write #$00 to $2001.

Also, here's a breakdown of what each bit of $2001 does.

MartsINY
Posted on 03-31-11 05:04 PM Link | Quote | ID: 140609


Micro-Goomba
Level: 11

Posts: 2/17
EXP: 4843
Next: 1142

Since: 03-31-11

Last post: 2073 days
Last view: 2073 days
thx a lot!

so I get it, because I do it midframe, my screen turn black, so I have to do it during VBlank.

But to do it during VBlank, it makes a wait during the gameplay of my game...

I don't understand VBlank 100% percent... but is there a way to call it?

For example... I don't know if you know mega man 5.... but in this game, during gameplay, without loading time, tiles are update in the PPU.

and what I don't get is how I can do it if I have to wait for VBlank? can I provoke it?

thx again a lot for the answer, really helpful

never-obsolete
Posted on 03-31-11 05:37 PM (rev. 2 of 03-31-11 05:39 PM) Link | Quote | ID: 140610


Rat
Level: 24

Posts: 75/96
EXP: 74495
Next: 3630

Since: 02-22-07
From: Phoenix, AZ

Last post: 2596 days
Last view: 2596 days
You can't call VBlank, because from the NES point of view, its just an interrupt that is synced to the tv.

You don't normally want to wait for vblank to write directly to VRAM because that will cause your game to slow down. You'd instead want to buffer the data so that it's written on the next VBlank. VBlank is not very long, so be careful you don't go over or you'll glitch the screen.

MartsINY
Posted on 03-31-11 09:36 PM Link | Quote | ID: 140611


Micro-Goomba
Level: 11

Posts: 3/17
EXP: 4843
Next: 1142

Since: 03-31-11

Last post: 2073 days
Last view: 2073 days
thx a lot for the answer, I was able to understand it and do what I had to do!

Main - ROM Hacking - Mega Man 4 Hack - PPU Address New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.020 seconds. (339KB of memory used)
MySQL - queries: 57, rows: 81/82, time: 0.016 seconds.