How to show graphics on the screen?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Optiroc
Posts: 129
Joined: Thu Feb 07, 2013 1:15 am
Location: Sweden

Re: How to show graphics on the screen?

Post by Optiroc »

Optiroc wrote:I’m finishing up full PCE support tonight, probably.
Done. PCE map output isn't really tested but "should work". :)

I'm still not confident that my Windows builds work as expected, so feel free to PM me if it doesn't work (or do work, for that matter!).
ccovell
Posts: 1045
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: How to show graphics on the screen?

Post by ccovell »

Thanks for the newest version. It seems to generate valid maps, palettes, etc for 24-bit and indexed PNGS. 1024x512-pixel-large images also seem to remap just fine.

I'll actually test the tool and images out on my PCE tonight or in a couple of days.
Optiroc
Posts: 129
Joined: Thu Feb 07, 2013 1:15 am
Location: Sweden

Re: How to show graphics on the screen?

Post by Optiroc »

ccovell wrote:Thanks for the newest version. It seems to generate valid maps, palettes, etc for 24-bit and indexed PNGS. 1024x512-pixel-large images also seem to remap just fine.

I'll actually test the tool and images out on my PCE tonight or in a couple of days.
Awesome. There should be no particular size limit on the images used. For instance, a possible use case is to generate level maps out of severely large PNGs (which is probably not something you want to do in a “real life” scenario, but still).

Report any issues or questions you have, and I’ll try my best to address them!
ccovell
Posts: 1045
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: How to show graphics on the screen?

Post by ccovell »

Hi, sorry, but I have one important suggestion for any tile format (PCE, SFC...) and that is the ability to specify the starting VRAM address of the first graphics tile. Tiles can't all start at VRAM $0000, as often the MAP/BAT is located there. Thus the tile numbers in the MAP will be incorrect.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How to show graphics on the screen?

Post by tepples »

Optiroc wrote:There should be no particular size limit on the images used. For instance, a possible use case is to generate level maps out of severely large PNGs (which is probably not something you want to do in a “real life” scenario, but still).
Several NES games I've worked on for Retrotainment Games do exactly that, and then the tiles and map get postprocessed for compression. It beats making a custom map editor, porting it to Windows, and training artists two states away on its use.
Optiroc
Posts: 129
Joined: Thu Feb 07, 2013 1:15 am
Location: Sweden

Re: How to show graphics on the screen?

Post by Optiroc »

ccovell wrote:Hi, sorry, but I have one important suggestion for any tile format (PCE, SFC...) and that is the ability to specify the starting VRAM address of the first graphics tile. Tiles can't all start at VRAM $0000, as often the MAP/BAT is located there. Thus the tile numbers in the MAP will be incorrect.
Ah, too true. I’ll add a tile-index offset option for map generation.

This might be of some use on SNES too, albeit not as often since tile base offset is configurable per BG (which is why there’s no such option here in the first place).
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: How to show graphics on the screen?

Post by dougeff »

tile base offset is configurable per BG
Yeah, I can't imagine needing an index offset for SNES.
nesdoug.com -- blog/tutorial on programming for the NES
Optiroc
Posts: 129
Joined: Thu Feb 07, 2013 1:15 am
Location: Sweden

Re: How to show graphics on the screen?

Post by Optiroc »

tepples wrote:Several NES games I've worked on for Retrotainment Games do exactly that, and then the tiles and map get postprocessed for compression. It beats making a custom map editor, porting it to Windows, and training artists two states away on its use.
Yep, it’s not completely unreasonable either, which is why I added options like custom splitting and column-major order for map output. :wink:
Optiroc
Posts: 129
Joined: Thu Feb 07, 2013 1:15 am
Location: Sweden

Re: How to show graphics on the screen?

Post by Optiroc »

ccovell wrote:Hi, sorry, but I have one important suggestion for any tile format (PCE, SFC...) and that is the ability to specify the starting VRAM address of the first graphics tile. Tiles can't all start at VRAM $0000, as often the MAP/BAT is located there. Thus the tile numbers in the MAP will be incorrect.
As of this release there is a "--tile-base-offset" parameter to the main/map commands. It's simply an integer that will be added to all tile indices during map export, which I hope solves your issue.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How to show graphics on the screen?

Post by tepples »

--tile-base-offset 128 could help with Game Boy as well, as the most common background display mode uses tiles 128-255 then 0-127.
Post Reply