Ask anything your want about Megadrive/Genesis programming.
Moderator: BigEvilCorporation
-
sbroumley
- Interested
- Posts: 29
- Joined: Wed Feb 11, 2009 11:23 pm
Post
by sbroumley » Fri Mar 27, 2009 1:14 am
I have an issue in my emulator where during gameplay in Virtual FighterII, there are corrupted characters across the first few lines of pattern A.
I'm pretty sure it's not a dma emulation problem, so I might have a mask problem or something wrong in my pattern render code, but for the life of me I can't see anything obvious.
Does anyone know if there is any special pattern map address or tile address masking or something else that I might be missing?
cheers,
Steve.
-
Snake
- Very interested
- Posts: 206
- Joined: Sat Sep 13, 2008 1:01 am
Post
by Snake » Fri Mar 27, 2009 2:25 am
Hey Steve,
It's almost certainly the window. Remember that BGA is masked wherever the window is.
-
sbroumley
- Interested
- Posts: 29
- Joined: Wed Feb 11, 2009 11:23 pm
Post
by sbroumley » Fri Mar 27, 2009 2:52 am
Ah - that totally makes sense.
So if there are non transparent BGA tiles behind a window which contains transparent tiles (ie. has color index zero in them), then BGA will not be visible, but BGB instead? (Assuming BGB is lower pri than BGA).
-
Snake
- Very interested
- Posts: 206
- Joined: Sat Sep 13, 2008 1:01 am
Post
by Snake » Fri Mar 27, 2009 4:41 am
(Assuming BGB is lower pri than BGA).
The window basically replaces BGA, so if the window is transparent, you see BGB through it - regardless of priority.
-
sbroumley
- Interested
- Posts: 29
- Joined: Wed Feb 11, 2009 11:23 pm
Post
by sbroumley » Fri Mar 27, 2009 4:48 am
Got it. And adding correct BGA window masking fixed the problem.
Thanks so much Mr.Snake!