It looks like background assembly is OUT 7 outputted by the room dumper.
Header:
N# N# N# N# ?? ?? ?? ?? N1 N1 N1 N1
N# - Number of something.
?? - Always 00 00 000 in the few files I've looked at.
N1 - Something. Doesn't seem to be an offset. The number of these is the N#.
The tile data is dec12 bytes each.
XX XX YY YY TT TT TT TT ?? ?? ?? ??.
XX - X coordinate on screen
YY - Y coordinate on screen
TT - Three different things are done with this (getting a copy of the value each time).
First, it's shift right 0x0B bits and then ANDed with 0x1F. I don't know what this does yet.
The value is shifted right 0x1B bits and then has 0xE0 added to it. This seems to determine the palette used.
Finally, it's ANDed with 0x7FF, and is apparently the tile used.
I haven't tried much with the last part of it yet, except it might be related to layering.
---
For me, the asm for this is at 0xac5c0 in memory.
000ac5c0: 24a50004 addiu r5,r5,0x0004
000ac5c4: 8ca30004 lw r3,0x0004(r5)
000ac5c8: 8cb00000 lw r16,0x0000(r5)
000ac5d0: 00034c02 srl r9,r3,0x10
000ac5d4: 3055ffff andi r21,r2,0xffff
000ac5d8: 0002b402 srl r22,r2,0x10
000ac5dc: 001012c2 srl r2,r16,0x0b
000ac5e0: 3042001f andi r2,r2,0x001f
000ac5e4: afa20018 sw r2,0x0018(r29)
000ac5e8: 001016c2 srl r2,r16,0x1b
000ac5ec: 244200e0 addiu r2,r2,0x00e0
000ac5f0: 321407ff andi r20,r16,0x07ff
Test by tampering with the code:
[attachment deleted by admin]