Proposal for an NES Graphics Format

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Proposal for an NES Graphics Format
by on (#151563)
My idea for an NES Graphics Format would display a still image with a minimal PRG used only for moveable sprites (as opposed to BG tiles in the nametable). Nametable rendering would be automatic.

What do you think of it, how would you do it, and what could make it better?
Re: Proposal for an NES Graphics Format
by on (#151568)
Here's the format I planned for the .sav file used by my graphics editor and converter:

$0000-$0FFF: Pattern table for background
$1000-17FF: Pattern table for sprites
$1800-$1BFF: Nametable
$1C00-$1CFF: OAM
$1F00-$1F1F: Palette

Only the background-related parts ($0000-$0FFF, $1800-$1BFF, $1F00-$1F0F) are implemented because I ran out of steam due to dearth of feedback.
Re: Proposal for an NES Graphics Format
by on (#151670)
I had a extended format for this thread based on tepples editor.
Format description and example files are at https://jroatch.nfshost.com/2015/nes/ne ... corpus.zip

$0000-$0fff: Background CHR tiles.
$1000-$13ff: Sprite CHR tiles.
$1400-$1bff: 2 Nametables (in reverse order). or CHR tiles and a single Nametable.
$1c00-$1c0f: mirroring control, etc.
$1c10-$1c5f: Unused.
$1c60-$1c7f: Bitmap of reserved background tiles. For editor use.
$1c80-$1cff: 4 Palettes (in reverse order).
$1d00-$1dff: Object RAM.
$1e00-$1fff: Private editor/viewer save/scratch space, I'm using it to contain the whole decoder.

tepples wrote:
$1C00-$1CFF: OAM

Shoot, when did that happen? Should I swap pages $1c and $1d in my format then?
Re: Proposal for an NES Graphics Format
by on (#151678)
43110 wrote:
tepples wrote:
$1C00-$1CFF: OAM

Shoot, when did that happen? Should I swap pages $1c and $1d in my format then?

Possibly, because the background palette in my editor has always been stored at $7F00-$7F0F, and drawing OAM would probably have been placed immediately after the nametable. Here are relevant definitions from my editor's global include file:
Code:
SRAM_BGCHR = $6000
SRAM_BGCHR_END = $7000
SRAM_OBJCHR = $7000
SRAM_OBJCHR_END = $7800
SRAM_NT = $7800
SRAM_NT_END = $7C00
SRAM_PALETTE = $7F00
Re: Proposal for an NES Graphics Format
by on (#151682)
Oh well, At this point it'll be hard to change 64 sav/bin files I have, So I'll stick with what I have until someone makes a editor that edits OAM in your 8KiB sav files.

The palette location was the one thing I chose not to be compatible in definition with. Yet my example files in the zip archive will work in editor 0.05 anyway due to redundancy.

I did like how the OAM often looked like a strong horizontal rule when viewed as CHR data.
Re: Proposal for an NES Graphics Format
by on (#153691)
Just today I changed up the format I have linked. I moved the mirroring control page to $1e00, and changed it to allow for some interesting setups like 4-screen mirroring or even 4 pages of OAM. It's a little more complex compared to what I had at first, but I was able to write a limited viewer assembled to less then 256 bytes. Eventually I hope to make a nametable editor as a browser javascript app to edit these files.