Quantcast
Channel: nesdev.org
Viewing all articles
Browse latest Browse all 780

Suggestions for map compression

$
0
0
Hi,

I'm working on converting a 16x15 tile map into a 32X30 one I can load into a namespace. However, I'm running into some issues when I try to make it work, since I have to put two 8X8 tiles on one row and two on the next for each metatile in the compressed map. So far I've tried:

1. Setting the PPU address to $2000 and running through the row, dumping the top two 8X8 tiles into $2007, then cycling back over the row once it's done to dump the bottom pair. I have this in bank 1:

Code:

tileDefinitions:  emptySpace:  .byte $00, $00, $00, $00    brownBlock:  .byte $01, $02, $03, $04
2. Creating a flag for the first (#$00) and second row (#$02) in the metatile. I cycle through the compressed map, and depending on which row of 8X8 tiles it's on, I add the flag amount to the tile number (they're all loaded in this order: x = tile number is top left tile of metatile, x+1 = top left, x+2 bottom left, etc). It's basically the first thing I tried, but without the tile definitions.

3. I loop through the tile definitions in the first example, load the top pair of tiles, then store the bottom two for the current row elsewhere in memory to be dumped into $2007.

I'm not having much luck, but that might be a skill issue since I don't get much time to practice. Are any of these correct, and if not, what would you guys recommend?

Statistics: Posted by sneed_generator — Mon Jul 01, 2024 7:30 pm — Replies 1 — Views 52



Viewing all articles
Browse latest Browse all 780

Trending Articles