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

Author Topic: FCEUX Graphic Debugging Question  (Read 960 times)

FCandChill

  • Hero Member
  • *****
  • Posts: 530
    • View Profile
FCEUX Graphic Debugging Question
« on: May 27, 2019, 07:51:54 pm »
Greetings. Her-saki and I are working on Metal Slader Glory for the NES. The initial translation has been completed (it still needs to be quality checked and proofread however). The entire script has been inserted by expanding the ROM. Here's a video...

https://www.youtube.com/watch?v=fGp_06mqEGo

Almost all of the ASM work is done. The text speed has been dramatically increased.



We added a font shadow by using an extra color, however, this color is shared by other graphics. There's two places which using the extra color is problematic...

The password screen (the colors surrounding the top screen should be dark grey not black)


Elina's portrait in a dark background (the shadow should be black). In the video, the font shadow is black so it hides the error, but we want this to be grey...


We came up with theoretical solutions for each.
1. Change the palette the border chooses from.
2. Prevent the shadow from writing to the screen when a certain palette is black.

However, the question is how to we use the FCEUX's debugger to trace the graphics? In other words, how would we use the FCEUX debugger to track where the palettes onscreen are assigned and how the game writes tiles onscreen? Having font shadows makes the game look a lot nicer, but it's not completely necessary.
« Last Edit: May 28, 2019, 11:05:48 pm by FCandChill »

Cyneprepou4uk

  • Full Member
  • ***
  • Posts: 216
  • Самый лысый ромхакер
    • View Profile
Re: FCEUX Graphic Debugging Question
« Reply #1 on: May 27, 2019, 08:35:50 pm »
Debug -> Hex Editor -> View -> PPU Memory. Palette colors are $3F00-$3F0F for background and $3F10-$3F1F for sprites.

Nametables for background most likely are $2000-$23FF and/or $2400-$27FF. Change some bytes here to see changes on the screen, so you can locate wanted addresses.

Basically game writes colors to palette, writes tiles to a background and sets its color attributes. Read this article about colors for background https://wiki.nesdev.com/w/index.php/PPU_attribute_tables

You can set write breakpoints to ppu addresses with a right click, and use debugger to search for the code. Everything written to ppu is done via $2007 register, with previously setting aim address through $2006 register, which (aim) will be increased by 1 with every next write to $2007. If you need to track executed code backwards, use Debug -> Trace Logger.
I am the baldest romhacker
NES Romhacking Guide

maseter

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: FCEUX Graphic Debugging Question
« Reply #2 on: May 27, 2019, 08:51:30 pm »
You know there already is a translation?
https://www.romhacking.net/translations/3755/

I also recommend to try the Mesen NES emulator, it's PPU viewer is great:
https://ci.appveyor.com/project/Sour/mesen/build/artifacts

And can you share the offset address for text speed?
Or even better, release a standalone text speed patch!

Pennywise

  • Hero Member
  • *****
  • Posts: 2257
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: FCEUX Graphic Debugging Question
« Reply #3 on: May 27, 2019, 08:57:00 pm »
Every character has their own text speed, sound etc. It's stored with the speaker name in the ROM.

FCandChill

  • Hero Member
  • *****
  • Posts: 530
    • View Profile
Re: FCEUX Graphic Debugging Question
« Reply #4 on: May 27, 2019, 09:29:21 pm »
@Cyneprepou4uk Thanks! I'll look into it.

You know there already is a translation?
https://www.romhacking.net/translations/3755/

Yes. I thought it might be fun to do the NES version.

And can you share the offset address for text speed?
Or even better, release a standalone text speed patch!

Every character has their own text speed, sound etc. It's stored with the speaker name in the ROM.

I made an ASM patch to universally increase the text speed so I didn't have to change the namecards. Also, I did some ASM work to reduce the amount of sound effects for the text so it isn't annoying.

May 27, 2019, 09:49:07 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Or even better, release a standalone text speed patch!

I could release a patch if enough people want it.
« Last Edit: May 27, 2019, 09:49:07 pm by FCandChill »

Cyneprepou4uk

  • Full Member
  • ***
  • Posts: 216
  • Самый лысый ромхакер
    • View Profile
Re: FCEUX Graphic Debugging Question
« Reply #5 on: May 28, 2019, 07:18:16 am »
You know there already is a translation?
https://www.romhacking.net/translations/3755/

Yes. I thought it might be fun to do the NES version.

Actually this IS a nes version in the link
I am the baldest romhacker
NES Romhacking Guide

Psyklax

  • Hero Member
  • *****
  • Posts: 1075
    • View Profile
    • Psyklax Translations
Re: FCEUX Graphic Debugging Question
« Reply #6 on: May 28, 2019, 08:08:57 am »
Actually this IS a nes version in the link

This is what confused me. I don't see how the OP's translation is different to the one in the database, other than the welcome addition of faster text. I mean, if it's a better translation then that's lovely, but I'm still a little perplexed.