Just so you know, what's going on here is that the vram engine detects that the requested frame isn't the same as the current frame, so it goes and follows the linked list of the current frame, setting each slot in vram to be #$0000, which means it's empty so it can be overwritten. Then, the requested frame is uploaded to where it'll fit, and because the beginning of vram is now empty (in this case, because there are no other objects except the one) it uploads the tiles there.
I originally had some trouble, because the last tile in a frame kept getting overwritten, and that was because I then realized that because the last entry in the frame doesn't lead to anywhere, it stays #$0000, which means it's empty, not that it points to the beginning of vram (which it doesn't, #$0002 does, as the table is offset by -2). Luckily though, that was an easy fix.
What I don't get, however is if you disable the delete slot feature I implemented, (comment out delete_vram_loop, but not delete_vram) but have it to where it thinks that are no frames of that kind, (so the vram available to sprites is completely filled) then this happens:
Yeah, I have no clue what's going on there...
When I find out how to fix that, I wonder what I'll do then... I'll probably try and get a tilemap updater created for whenever the level scrolls. I also want to try and find a way to have it to where new tiles are uploaded for BGs whenever the level scrolls, but I don't know how I'm going to accomplish this. It'll be a lot more hardcoded than objects, that's for certain.
Edit: Wow, the aforementioned problem was caused by me making my "VramAddressToTranferAddressTable" incorrect. Here's the correct table, for anyone who cares:
Code: Select all
VramAddressToTransferAddressTable:
.word $0000,$0020,$0040,$0060,$0080,$00A0,$00C0,$00E0
.word $0200,$0220,$0240,$0260,$0280,$02A0,$02C0,$02E0
.word $0400,$0420,$0440,$0460,$0480,$04A0,$04C0,$04E0
.word $0600,$0620,$0640,$0660,$0680,$06A0,$06C0,$06E0
.word $0800,$0820,$0840,$0860,$0880,$08A0,$08C0,$08E0
.word $0A00,$0A20,$0A40,$0A60,$0A80,$0AA0,$0AC0,$0AE0
.word $0C00,$0C20,$0C40,$0C60,$0C80,$0CA0,$0CC0,$0CE0
.word $0E00,$0E20,$0E40,$0E60,$0E80,$0EA0,$0EC0,$0EE0
.word $1000,$1020,$1040,$1060,$1080,$10A0,$10C0,$10E0
.word $1200,$1220,$1240,$1260,$1280,$12A0,$12C0,$12E0
.word $1400,$1420,$1440,$1460,$1480,$14A0,$14C0,$14E0
.word $1600,$1620,$1640,$1660,$1680,$16A0,$16C0,$16E0
.word $1800,$1820,$1840,$1860,$1880,$18A0,$18C0,$18E0
.word $1A00,$1A20,$1A40,$1A60,$1A80,$1AA0,$1AC0,$1AE0
.word $1C00,$1C20,$1C40,$1C60,$1C80,$1CA0,$1CC0,$1CE0
.word $1E00,$1E20,$1E40,$1E60,$1E80,$1EA0,$1EC0,$1EE0


