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

Author Topic: SMB1: Changing the text colour  (Read 1154 times)

szemigi

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
SMB1: Changing the text colour
« on: September 06, 2018, 08:54:48 pm »
In SMB2J, this

"Peace is paved
With kingdom saved
Hurrah to Mario
Our only hero
This ends your trip
Of a long friendship"

text has blue and orange colours.


Question: How can I modify the text colour in SMB1 like that? Like I want green text and red text for example (for the ending text, etc.)

Tell me!

Psyklax

  • Hero Member
  • *****
  • Posts: 804
    • View Profile
    • Psyklax Translations
Re: SMB1: Changing the text colour
« Reply #1 on: September 07, 2018, 04:06:43 am »
Tell me!

Calm down.

It's perfectly possible: at some point in the game code, there's an instruction telling the PPU which palette to use for each part of the screen, you just need to find that code and change it.

Two possible drawbacks: the palette you want isn't already there and changing a palette may have effects elsewhere; and the code may simply be "make this whole block the same palette", rather than "here's a list of palette choices for every single tile". Without having a look myself, I can't say which it is.

Eden.GT

  • Jr. Member
  • **
  • Posts: 85
  • Hardcore SMB1 Player and Hacker
    • View Profile
Re: SMB1: Changing the text colour
« Reply #2 on: September 07, 2018, 08:33:55 am »
I'd go with the option of changing the text colour pointers instead of the default pipe palette pointer if you have no other choice, but this is still beyond my (ASM) skill set.
Want to get more into SMB Hacking alongside with help support? Send me a private message for a Discord invite link: SMB Arena

szemigi

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Re: SMB1: Changing the text colour
« Reply #3 on: September 07, 2018, 09:02:55 am »
I'd go with the option of changing the text colour pointers instead of the default pipe palette pointer if you have no other choice, but this is still beyond my (ASM) skill set.

If you can do it, so that I can really change the text colours for each screen, I can wait. It would also be good for other modders as well. That's why I especially asked for this.

RetroGameFan

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: SMB1: Changing the text colour
« Reply #4 on: September 07, 2018, 11:20:06 am »
@szemigi - A better way of referring to what you call "SMB2J" is Super Mario Bros.: The Lost Levels. That's what it's better known by anyway, although there's no question that it was Super Mario Bros. 2 in Japan. You don't have to be politically correct, but whatever, you can do what you want here as long as you don't break any rules. I'm just giving out advice.

Edit: Never mind, I saw some of your hacks, and you go by the Japanese system of styling sequels fashioned after the original SMB. I'm sorry if I wasted your time. :(
« Last Edit: September 07, 2018, 11:26:23 am by RetroGameFan »

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6615
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: SMB1: Changing the text colour
« Reply #5 on: September 07, 2018, 12:57:50 pm »
If you can do it, so that I can really change the text colours for each screen, I can wait. It would also be good for other modders as well. That's why I especially asked for this.
Is this a request? We like to help people learn how to do it here.

Assuming there is a suitable palette already loaded, what you would need to look for is data written what is known as the "attribute table". It tells the game which palette to use for each 16x16 pixel reqion of the screen.
FCEUX' debugger could help that. You would need to play the game and before the text is printed, set a Breakpoint on PPU Writes to $23C0-23FF in VRAM.
So that when the game tries to write to the Attribute Table, you can see what data that is.

The problem I could see is that, since the level is already the same colors, the game might not even bother updating the AT.

Oh wait, you're talking about changing the text in SMB1.
Well, I believe the above still applies.
We have a disassembly for that game so someone could easily check if the AT stuff is feasible or if that would need extra coding added (which I hear SMB1 has almost no free space).
"My watch says 30 chickens" Google, 2018