GFX Related Questions
Moderator: ZSNES Mods
I have another question. This one being about palettes in the PCX file.
I downloaded 'Palettes out of Chaos' / PalExChaos because it apparently lets you change the palette of a PCX without actually changing the way the image is displayed. I'm using this to change the palette so that colour 0 of the palette is the transparent colour I want it to be. But, when I switch the colours around or add some in it actually does change the image itself.
It has a fair bit of options but it doesn't come with any documentation so I don't know what alot of them do.
Any tips for using this program?
I downloaded 'Palettes out of Chaos' / PalExChaos because it apparently lets you change the palette of a PCX without actually changing the way the image is displayed. I'm using this to change the palette so that colour 0 of the palette is the transparent colour I want it to be. But, when I switch the colours around or add some in it actually does change the image itself.
It has a fair bit of options but it doesn't come with any documentation so I don't know what alot of them do.
Any tips for using this program?
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
If I understand you correctly: You can use Paint Shop Pro to export the palette, change it and then import it again with the "nearest color matching" option.
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
bsnes launcher with recent files list
Ok, I got some questions on the topic of 'seamless' scrolling as in changing the tile map of a certain background as you scrolling to display something new I guess. Some stuff about sprites too.
From what I know you can have various sizes for your map but lets say I'm using 64x32 map (The width being twice the height). Its stored by 2 32x32 tiles next to each other in VRAM. When you scroll past X co-ordinate 511 it will just wrap around to first map and start again. But what if we switch out the first 32x32 block before it becomes visible again? (I think this change would occur when the X co-ord 256 so only the second map will be visible?). Then, just before you hit 512 again you replace the map with the next map you want to view. I assume this is ONE way to do it. Is it viable though? Its 2 kilobytes to transfer and 1 frame to do it in. I dont know if this is a whopping 2 kilobytes or an insignificant 2 kilobytes because I really dont know how much you can transfer during the time. You got your 544 bytes of OAM on top of it + your PPU changes so I'm not too sure about this.
Only other idea I got is to change only the pointer of the map and have all your maps uploaded before. But with only 32 spots to put each one it doesn't sound to good either...
When I saw commercial games running and looking at the map address areas it just....I dont know whats going on there, so many changes but I cant really follow whats happening and the method they're using for this.
Also, on qwetie's SNES doc it says that 13 bits are for setting the scroll value for each of the Horizontal and Vertical registers. I can only imagine using 9 of these to get the 512 for the bigger maps. Are they just to be ignored or do they serve some purpose?
I'm lost on this...but it seems like one of the simpler things of the program.
As for sprites...well I got the format (rows 512 bytes apart) clear I think. The 4 bytes of oam for the 1st table and 2 bits for the second table for each sprite I mostly understand. One register confuses me though.
So this determines where the sprite tiles would need to be stored and for you to pick out your 2 sizes. The base I understand; only 2 of the bits are used here and are LSH'd 14 times to get your starting byte address for 512 tiles of 4bpp / 16kilobytes (11 = byte 49,152 / word address 6000?) The name selection bits I'm not sure what that they're suppose to do. Qwertie doesn't say anything about and google isn't much help.
Can someone clear this up?
Thanks again
edit: forgot to ask: most of my info is coming from qwertie's docs which are apparently 8 years old and I've heard some places that they have mistakes in them?
From what I know you can have various sizes for your map but lets say I'm using 64x32 map (The width being twice the height). Its stored by 2 32x32 tiles next to each other in VRAM. When you scroll past X co-ordinate 511 it will just wrap around to first map and start again. But what if we switch out the first 32x32 block before it becomes visible again? (I think this change would occur when the X co-ord 256 so only the second map will be visible?). Then, just before you hit 512 again you replace the map with the next map you want to view. I assume this is ONE way to do it. Is it viable though? Its 2 kilobytes to transfer and 1 frame to do it in. I dont know if this is a whopping 2 kilobytes or an insignificant 2 kilobytes because I really dont know how much you can transfer during the time. You got your 544 bytes of OAM on top of it + your PPU changes so I'm not too sure about this.
Only other idea I got is to change only the pointer of the map and have all your maps uploaded before. But with only 32 spots to put each one it doesn't sound to good either...
When I saw commercial games running and looking at the map address areas it just....I dont know whats going on there, so many changes but I cant really follow whats happening and the method they're using for this.
Also, on qwetie's SNES doc it says that 13 bits are for setting the scroll value for each of the Horizontal and Vertical registers. I can only imagine using 9 of these to get the 512 for the bigger maps. Are they just to be ignored or do they serve some purpose?
I'm lost on this...but it seems like one of the simpler things of the program.
As for sprites...well I got the format (rows 512 bytes apart) clear I think. The 4 bytes of oam for the 1st table and 2 bits for the second table for each sprite I mostly understand. One register confuses me though.
Code: Select all
Register $2101: OAM Size (1b/W)
sssnnbbb s: Object size n: name selection b: base selection
Size bit in OAM table: 0 1
Bits of object size: 000 8x8 16x16
001 8x8 32x32
010 8x8 64x64
011 16x16 32x32
100 16x16 64x64
101 32x32 64x64
110,111 Unknown behavior
Can someone clear this up?
Thanks again

edit: forgot to ask: most of my info is coming from qwertie's docs which are apparently 8 years old and I've heard some places that they have mistakes in them?
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
Why do you want to replace the entire map during one frame? I don't have the specs handy, but I don't think you can do THAT much between one frame.
All you really need to do is replace the tiles offscreen that can possibly come into view in one frame's movement. That's not even going to be more than a quarter screen length most likely.
I don't know if you've done any PC 2D programming before, but you can apply some of the concepts of how you would implement scrolling yourself to this application.
There's a few ways to approach this. I'm not sure what is the most dominent method used by commercial SNES games as I haven't looked at them for this purpose, but you can use whatever works for you.
All you really need to do is replace the tiles offscreen that can possibly come into view in one frame's movement. That's not even going to be more than a quarter screen length most likely.
I don't know if you've done any PC 2D programming before, but you can apply some of the concepts of how you would implement scrolling yourself to this application.
There's a few ways to approach this. I'm not sure what is the most dominent method used by commercial SNES games as I haven't looked at them for this purpose, but you can use whatever works for you.
[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
Qwertie's documents are horribly inaccurate (not his fault, there was little information available back then), and he's also a nudist. Just thought you'd like to know that before you accidentally click the blog link on his website.
Look for anomie's register document, it's on romhacking.net. That's the best there is.
OAM name selection is a trick for cheap sprite animation, ignore it until you learn how to experiment on your own.
Just about everything wraps, keep that in mind. If your tilemap is 64x32 with 8x8 tiles, then only the lower 9 bits of the scroll register matter.
Look for anomie's register document, it's on romhacking.net. That's the best there is.
OAM name selection is a trick for cheap sprite animation, ignore it until you learn how to experiment on your own.
Just about everything wraps, keep that in mind. If your tilemap is 64x32 with 8x8 tiles, then only the lower 9 bits of the scroll register matter.
-
- Seen it all
- Posts: 2302
- Joined: Mon Jan 03, 2005 5:04 pm
- Location: Germany
- Contact:
Thanks for the input.
Anomie's doc looks great, should make this a fair bit easier.
As for scrolling, I chose replacing the whole map because its quick and cheap but I wasn't sure it would be all that viable. I'm thinking replacing a line / column of the tile map before it comes into view (64 bytes compared to 2kb) by DMA'ing with the 32 word increment. Each line is 64 bytes so it should end up pointing to the same column each time I think. All I would have to do is set up the map so it would be able to be transfered like this. It would take place every 8 pixels scrolled and $2116 would be incremented (and eventually 'reset' as you wrap around) as you go along.
I should be able to put something together with this I think.
Anomie's doc looks great, should make this a fair bit easier.
As for scrolling, I chose replacing the whole map because its quick and cheap but I wasn't sure it would be all that viable. I'm thinking replacing a line / column of the tile map before it comes into view (64 bytes compared to 2kb) by DMA'ing with the 32 word increment. Each line is 64 bytes so it should end up pointing to the same column each time I think. All I would have to do is set up the map so it would be able to be transfered like this. It would take place every 8 pixels scrolled and $2116 would be incremented (and eventually 'reset' as you wrap around) as you go along.
I should be able to put something together with this I think.
-
- Romhacking God
- Posts: 922
- Joined: Wed Jul 28, 2004 11:27 pm
- Contact:
The site as of yesterday has now officially moved to http://www.romhacking.net.
The archive at romhacking.deadbeat-inc.com will be taken offline, so you probably won't want to link to material there anymore.

[url=http://transcorp.romhacking.net]TransCorp[/url] - Home of the Dual Orb 2, Cho Mahou Tairyku Wozz, and Emerald Dragon SFC/SNES translations.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.
[url=http://www.romhacking.net]ROMhacking.net[/url] - The central hub of the ROM hacking community.