News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Info on BG DATA?

Started by PHOSPHOTiDYL, August 26, 2017, 08:39:46 PM

Previous topic - Next topic

PHOSPHOTiDYL

I have this so far...

;//[$82E039 = set up DMA transfer to VRAM]
;//[source address ($0003 bytes)]
;//[VRAM address ($0002 bytes)]
;//[transfer size ($0002 bytes)]
;//[ex. 7E4000,1000,2000]

;//[$82E5D9 = bg data routine]
;//[ex. 0004,BAA69F,4000/0002,7E4000,4800,1000/0000]
;//0004BA = source address & bank byte ($05C2) (LDA $0000,y : STA $05C0 : LDA $0001,y : STA $05C1)
;//A69F = offset for VRAM (LDA $0003,y : STA $05BE)
;//4000 = transfer size of VRAM (LDA $0005,y : STA $05C3)

;//0002 = ???
;//7E4000 = source address??
;//4800 = ???
;//1000 = ADC #$0009 for next bg entry, it's not a consistent value, what is this??

;//0000 = end data read most likely

I'm preferring the bg data option now, would like to make new ones, I appreciate any help.


PHOSPHOTiDYL

So it's a door check, source address, vram address, byte size.
Except that's only for one format type.

Thanks, just what I needed.

PHOSPHOTiDYL

Here's enough bg data data..

PHOSPHOTiDYL

Missed phantoon's room, which was the whole point of this...

[E113] 000A,0000

000A clears layer 2, which phantoon uses to move.
Just want a bg for phantoon, it's very annoying.

P.JBoy

To the best of my knowledge, BG_Data works as follows:

Type DDB  Source Dest Size
0008      9AB200 2000 1000  Set layer 3 and copy 1000h bytes from $9A:B200 to VRAM $2000
0004      B9FA38 4000       Decompress $B9:FA38 to $7E:4000
0002      7E4000 4000 1000  Copy 1000h bytes from $7E:4000 to VRAM $4000
0004      B9FE3E 4000       Decompress $B9:FE3E to $7E:4000
0002      7E4000 4800 1000  Copy 1000h bytes from $7E:4000 to VRAM $4800
0000                        End of BG_Data

000A                        Clear layer 2
0000                        End of BG_Data

0008      9AB200 2000 1000  Set layer 3 and copy 1000h bytes from $9A:B200 to VRAM $2000
000C                        Clear layer 3
0000                        End of BG_Data

000E 8A12 8AC180 4800 0800  Copy 800h bytes from $8A:C180 to VRAM $4800 if current DDB is $8A12
000E 8AEA 8AD980 4800 0800  Copy 800h bytes from $8A:D980 to VRAM $4800 if current DDB is $8AEA
000E A18C 8AB980 4C00 0800  Copy 800h bytes from $8A:B980 to VRAM $4C00 if current DDB is $A18C
000E A1B0 8AD980 4800 0800  Copy 800h bytes from $8A:D980 to VRAM $4800 if current DDB is $A1B0
000E A1E0 8AB180 4800 0800  Copy 800h bytes from $8A:B180 to VRAM $4800 if current DDB is $A1E0
000E A300 8AC980 4C00 0800  Copy 800h bytes from $8A:C980 to VRAM $4C00 if current DDB is $A300
0000                        End of BG_Data


Also see the disassembly here and a list here.

N.B. the scrolling sky patch modifies the 000E type handler to deduce the values for source and dest based on the Y position of the door instead of using a hard coded list
...