11 March 2016 - Forum Rules
Started by gzip, September 19, 2020, 06:41:40 PM
Quote from: gzip on September 19, 2020, 06:41:40 PMI'd like to change the text in the dungeons from "Level-1" to "Dungeon-1". In addition to the text change, the text also has to move over to the left one space so it fits well. This is probably an easy change for someone that knows what they're doing. I'm not having much luck.
Quote from: The3Dude on September 19, 2020, 10:57:59 PMFirst things first, if you are hacking an NES game, the EASIEST way to hex edit is by using the FCEUX emulator.
> 01A0DE:B0 01 BCS $A0D1 01A0E0:C8 INY 01A0E1:B1 00 LDA ($00),Y @ $6823 = #$0E 01A0E3:8D 07 20 STA PPU_DATA = #$F6 01A0E6:CA DEX 01A0E7:D0 F5 BNE $A0CE
Quote from: gzip on September 19, 2020, 11:25:31 PMThanks, I've done all this already but the text doesn't really allow me to go beyond the current length without causing corruption. I also need to move the text to the left one space. I imagine that I'll have to relocate the text, read from there, and then tweak the start column and number replacement. Can you point me to the code where the text gets written to the screen?
Quote from: gzip on September 19, 2020, 11:44:50 PMGood idea! I don't have the graphics space though.
Quote from: The3Dude on September 20, 2020, 12:25:07 AMWould you like me to modernize the Zelda title screen font too?
Quote from: gzip on September 20, 2020, 12:28:23 AMHmm, not sure what that means. Maybe in a separate patch. Do you have an example?
// LEVEL-X textorg $9D04 // $19D14 db $20,$42,$07 db "LEVEL-0" db $FF
// LEVEL-X textorg $9D04 // $19D14 db $20,$42,$09 db "DUNGEON-0" db $FF
1A0A2: 48 PHA1A0A3: 8D 0620 STA $20061A0A6: C8 INY1A0A7: B1 00 LDA ($00),Y1A0A9: 8D 0620 STA $20061A0AC: C8 INY1A0AD: B1 00 LDA ($00),Y1A0AF: 0A ASL1A0B0: 48 PHA1A0B1: A5 FF LDA $FF1A0B3: 09 04 ORA #$04 ; set bits .... .x..1A0B5: B0 02 BCS $1A0B91A0B7: 29 FB AND #$FB ; keep bits xxxx x.xx1A0B9: 8D 0020 STA $20001A0BC: 85 FF STA $FF1A0BE: 68 PLA1A0BF: 0A ASL1A0C0: 08 PHP1A0C1: 90 03 BCC $1A0C61A0C3: 09 02 ORA #$02 ; set bits .... ..x.1A0C5: C8 INY1A0C6: 28 PLP1A0C7: 18 CLC1A0C8: D0 01 BNE $1A0CB1A0CA: 38 SEC1A0CB: 6A ROR1A0CC: 4A LSR1A0CD: AA TAX1A0CE: B0 01 BCS $1A0D11A0D0: C8 INY1A0D1: B1 00 LDA ($00),Y1A0D3: 8D 0720 STA $20071A0D6: CA DEX1A0D7: D0 F5 BNE $1A0CE1A0D9: 68 PLA1A0DA: C9 3F CMP #$3F1A0DC: D0 0C BNE $1A0EA1A0DE: 8D 0620 STA $20061A0E1: 8E 0620 STX $20061A0E4: 8E 0620 STX $20061A0E7: 8E 0620 STX $20061A0EA: 38 SEC1A0EB: 98 TYA1A0EC: 65 00 ADC $001A0EE: 85 00 STA $001A0F0: A9 00 LDA #$00 ; A = 001A0F2: 65 01 ADC $011A0F4: 85 01 STA $011A0F6: AE 0220 LDX $20021A0F9: A0 00 LDY #$00 ; Y = 001A0FB: B1 00 LDA ($00),Y1A0FD: 10 A3 BPL $1A0A21A0FF: 60 RTS
Quote from: The3Dude on September 19, 2020, 11:39:54 PMI honestly same as you have no idea on how to move the text offset.
bank 5;org $B02F // 0x1703F sta $6827 // Originally STA $6825
Quote from: ShadowOne333 on September 20, 2020, 10:15:26 AMThe LEVEL text and its PPU transfer don't seem to have any direct pointer that I can track down.
Quote from: abw on September 20, 2020, 12:45:36 PMThis is the easy part. As with many of the other strings in this game, the format is [2-byte PPU address (big endian)] + [1-byte string length] + [string], so changing its screen position is trivial; if you want to move it 1 tile to the left, simply subtract 1 from the PPU address, i.e. $2042 -> $2041.
Quote from: ShadowOne333 on September 20, 2020, 12:57:23 PMThe code @abw pointed out for the number is correct.Changing it to the following:Code Select Expandbank 5;org $B02F // 0x1703F sta $6827 // Originally STA $6825Makes it so the number is now printed two positions to the right from the original one, so once the "DUNGEON-0" pointer has been figured out, having that for the number printing would move the numeral accordingly for the DUNGEON text.
Page created in 0.058 seconds with 20 queries.