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

Author Topic: Death blocks/munchers in SMB?  (Read 1318 times)

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Death blocks/munchers in SMB?
« on: July 05, 2019, 01:25:45 pm »
Is there a way to create death blocks/munchers in SMB? I've seen a patch for it but it only works with mushroom platforms, I'd like to use a custom block that can be used in any level. Could the data for the poison mushroom be used? There is a patch for it as well.
Thanks a lot in advance.

#

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #1 on: July 05, 2019, 03:15:35 pm »
Of course there is. But if you want to add something to the SMB ROM you'll need to remove another object from the game first so the custom object can take its place. This is also what the poison mushroom patch does, it replaces the 1 Up mushrooms. So you'll have to decide what to remove first.

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #2 on: July 05, 2019, 03:20:37 pm »
Let's say i would want to replace the brick with 10 coins inside, how would i proceed? I'd also need to change the sprite

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #3 on: July 05, 2019, 03:30:42 pm »
create death blocks/munchers
You mean mario should die when he hits it or steps on in?
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #4 on: July 05, 2019, 03:33:20 pm »
Damage you, so if you are Big Mario or Fire Mario you become small.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #5 on: July 05, 2019, 03:41:14 pm »
Damage him, right.

First I would find a routine with that coin block, and a routine with damaging a player, and tried to jump from one to another (roughly speaking).

Speaking of changing tile of that block, I think this information should be somewhere in level drawing code.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #6 on: July 05, 2019, 04:34:52 pm »
I'm gonna try that but since I don't know much ASM I don't think I'll make it work. I checked the disassembly as well but couldn't find anything useful.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #7 on: July 05, 2019, 04:39:12 pm »
Yep, without knowledge of assembly you are pretty much screwed. And for your future questions - most of changes in any game require code reading and editing skill
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #8 on: July 05, 2019, 05:00:24 pm »
Do you know where I could find a Hex to opcode converter and viceversa? The ones I've found online always give me errors.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #9 on: July 05, 2019, 05:08:29 pm »
Debugger in fceux emulator will show you opcodes. But if you really need a converter, use something like 6502d program. Not sure about vice versa though
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #10 on: July 05, 2019, 05:23:13 pm »
If I post opcodes here will you help me identify the dmg routines?

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #11 on: July 05, 2019, 05:32:27 pm »
No, I don't think so. First of all, there will be tons of code lines from a game. Second, a romhacker needs to know purpose of particular ram addresses when he reads a code. For example, if you know where an address with mario's power (small, big, fire) is located in ram, you can find routines with this address by setting breakpoints to it, you don't need to look thought ALL existing game's code
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #12 on: July 05, 2019, 06:01:24 pm »
Yea but I don't know what breakpoint to set to see the dmg routine.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #13 on: July 05, 2019, 06:02:22 pm »
set a write breakpoint
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #14 on: July 05, 2019, 07:20:07 pm »
I set a breakpoint for $0722 which is Sprite0HitDetectFlag and got this when hit by a goomba:


Code: [Select]
$91D2:8D 22 07  STA $0722 = #$01
$91D5:A9 80     LDA #$80
$91D7:85 FC     STA $FC = #$00
$91D9:AD 5A 07  LDA $075A = #$00
$91DC:10 0B     BPL $91E9
$91DE:A9 00     LDA #$00
$91E0:8D 72 07  STA $0772 = #$03
$91E3:A9 03     LDA #$03
$91E5:8D 70 07  STA $0770 = #$01
$91E8:60        RTS
$91E9:AD 5F 07  LDA $075F = #$00
$91EC:0A        ASL
$91ED:AA        TAX
$91EE:AD 5C 07  LDA $075C = #$00
$91F1:29 02     AND #$02
$91F3:F0 01     BEQ $91F6
$91F5:E8        INX
$91F6:BC BD 91  LDY $91BD,X @ $91BD = #$56
$91F9:AD 5C 07  LDA $075C = #$00
$91FC:4A        LSR
$91FD:98        TYA
$91FE:B0 04     BCS $9204


What could the dmg part be?

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #15 on: July 05, 2019, 07:34:06 pm »
No, sprite 0 hit doesn't have anything to do with damage, it's a graphics stuff
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Alpdrucken

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #16 on: July 05, 2019, 07:35:42 pm »
There's this in the disassembly when player is hit by a firebar or a hammer:
jmp InjurePlayer

but I don't know how to find the hex routine starting from the disassembled text.

Cyneprepou4uk

  • Sr. Member
  • ****
  • Posts: 334
  • I am the baldest romhacker
    • View Profile
Re: Death blocks/munchers in SMB?
« Reply #17 on: July 05, 2019, 07:42:13 pm »
I don't have experience working with disassembly files. If it doesn't show you code location address, try manually convert several opcodes to bytes and search them in fceux hex editor, then go to that address in debugger and set some execute breakpoints there
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension