Oh, I misunderstood. I thought you wanted to use the same code for two different collision types. What you want might be a pretty tall order. When the collision checks happen, it's only looking up what collision type is at that tile location. The actually graphical metatile information is only retrieved when changing the tile, you would have to switch to Bank 16, but the tile collision stuff happens in bank 14. So if you try switching to Bank 16, the game will most likely lock up. One thing you can do is write some code in the static bank to JSR to from the tile code. Then when you are in the static bank, swap the dynamic bank to 16, get the information you want, swap back to bank 14, then RTS back to the tile code. It's probably not something you would want to do too often in your code, but it can work.
As for accessing the info... uh... this is going to be a sort of Frankensteined guess work on my part, but maybe something like this:
First you need the pointer to the nametable that stores screen graphics info. Use code like this:
Code:
LDA currentScreen
ASL
TAY
LdA update_screen_details
CMP #$01
;;; if it is zero, it is a special screen.
;;; one is map 1
;;; two is map 2
BNE +
;;;;; UPDATE THIS TO FIND THE RIGHT MAP
LDA NameTablePointers_Map1,y
STA updateNT_ntPointer
LDA NameTablePointers_Map1+1,y
STA updateNT_ntPointer+1
JMP ++
+
LDA NameTablePointers_Map2,y
STA updateNT_ntPointer
LDA NameTablePointers_Map2+1,y
STA updateNT_ntPointer+1
++
Then you need to store the tile positional index in to Y. (What I mean is that each tile on screen is part of a list of tiles, so the tile in the upper left is $00, next to it on the right is $01, and so on)
To do that, you need the y and x position of the tile which are probably still stored in the variables tileY and tileX at this point, then do this:
Code:
LDA tileY
AND #%11110000
STA temp3 ;Maybe not temp3, just any temp variable that is not being used
LDA tileX
LSR
LSR
LSR
LSR
ORA temp3
TAY
Ok, so now you will have the nametable pointer and the tile position index. I think at this point all you need to do is this:
Code:
LDA (updateNT_ntPointer),y
And now you should have the graphical index of the tile stored in the Accumulator. ...I think. Like I said, I'm doing a lot of guesswork here. A lot could go wrong.