News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Increase all hex addresses by x amount. (& palette emphasis question)  (Read 1908 times)

M-Tee

  • Hero Member
  • *****
  • Posts: 596
  • One pixel at a time…
    • View Profile
    • M-Tee Retro Graphics
I'm working on a project and I'm needing to alter my nametables to use a different portion of my pattern tables. So, for each name table that I generate, I need to increase each hex value of the table by a specific amount. What is the best way to automate this? Is there an editor that supports this feature?

Also, I want to toggle palette emphasis real-time in FCEUX to preview each emphasis

I found this on the NESdev wiki.

Quote
Mask ($2001) > write
Common name: PPUMASK
Description: PPU mask register
Access: write
This register controls the rendering of sprites and backgrounds, as well as colour effects.
7  bit  0
---- ----
BGRs bMmG
|||| ||||
|||| |||+- Grayscale (0: normal color, 1: produce a greyscale display)
|||| ||+-- 1: Show background in leftmost 8 pixels of screen, 0: Hide
|||| |+--- 1: Show sprites in leftmost 8 pixels of screen, 0: Hide
|||| +---- 1: Show background
|||+------ 1: Show sprites
||+------- Emphasize red*
|+-------- Emphasize green*
+--------- Emphasize blue*
* NTSC colors. PAL swaps green and red[1].

So, I tried altering address 2001 in the PPU, but it was at 00 to begin with, so I'm pretty sure I'm doing it wrong.
« Last Edit: March 17, 2015, 11:30:02 pm by M-Tee »

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Increase all hex addresses by x amount. (& palette emphasis question)
« Reply #1 on: March 18, 2015, 07:29:59 am »
The register is write only, trying to read it wont work.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7060
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Increase all hex addresses by x amount. (& palette emphasis question)
« Reply #2 on: March 18, 2015, 09:56:56 am »
Games will often keep a RAM mirror of $2000/2001, though, I think.
"My watch says 30 chickens" Google, 2018

M-Tee

  • Hero Member
  • *****
  • Posts: 596
  • One pixel at a time…
    • View Profile
    • M-Tee Retro Graphics
Re: Increase all hex addresses by x amount. (& palette emphasis question)
« Reply #3 on: March 18, 2015, 09:42:23 pm »
Thanks, I figured out the hex offset issue, btw. I'll dig deeper into the palette emphasis, I reckon.

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 970
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Increase all hex addresses by x amount. (& palette emphasis question)
« Reply #4 on: March 19, 2015, 11:39:36 pm »
Thanks, I figured out the hex offset issue, btw. I'll dig deeper into the palette emphasis, I reckon.
I read somewhere that they're better-conceived of as color de-emphasis bits. I also recall validating this via personal spearmintation at some point...