+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Self modifying code.
Pages: [1]
Author Topic: Self modifying code.  (Read 2 times)
DaMarsMan
Guest
« on: August 28, 2008, 06:51:57 pm »

Have you ever seen it used? Where?
Shadowsithe
Guest
« Reply #1 on: August 28, 2008, 07:01:43 pm »

I want to say Golden Sun. There's quite a few GBA titles that do.
tomaitheous
Guest
« Reply #2 on: August 28, 2008, 08:02:36 pm »

Seen it used in quite a few PCE CD games. I also use it in my PCE CD game hacks  Wink
frantik
Guest
« Reply #3 on: August 29, 2008, 12:27:55 am »

what is the benefit of self modifying code?
BRPXQZME
Guest
« Reply #4 on: August 29, 2008, 01:23:59 am »

http://en.wikipedia.org/wiki/Self-modifying_code#Usage

Point 9 pertains the most to the kind of ROM-hacking I’m used to seeing, but you could, in theory, run into it anywhere (2 is very theoretical, for example; however, deep in a complex engine or a cleverly-coded OS, I wouldn’t be surprised to see it put to practical use, amazing or mundane).
MathOnNapkins
Guest
« Reply #5 on: August 29, 2008, 01:57:17 pm »

I'm somewhat certain I've seen it in at least one SPC-700 driver. My lack of complete certainty arises from the fact that there was a bug in the spc disassembler I was using at the time (that I later fixed), and some instructions were dumped incorrectly that coincidentally looked like almost sensible self modifying code.
Hamtaro126
Guest
« Reply #6 on: August 30, 2008, 03:02:56 pm »

I belive that Famicom Disk System games use that techniqe using PRG-RAM.

Also, MMC5 has a similar feature using the same amount of PRG-RAM that FDS has, but was never really used in any games. Disch's Doki Doki Panic hack uses MMC5 with all the PRG-RAM there is availible.
« Last Edit: August 30, 2008, 06:28:44 pm by Hamtaro126 »
tomaitheous
Guest
« Reply #7 on: August 30, 2008, 03:59:05 pm »

Quote from: Hamtaro126 on August 30, 2008, 03:02:56 pm
I belive that Famicom Disk System games use that techniqe using CHRRAM.

Also, MMC5 has a similar feature using the same amount of CHRRAM that FDS has, but was never really used in any games. Disch's Doki Doki Panic hack uses MMC5 with all the CHR RAM there is availible.

 I'm not sure I follow you. How is using chr-ram(pattern table vram) related to self modifying code?
Hamtaro126
Guest
« Reply #8 on: August 30, 2008, 06:29:46 pm »

Quote from: tomaitheous on August 30, 2008, 03:59:05 pm
Quote from: Hamtaro126 on August 30, 2008, 03:02:56 pm
I belive that Famicom Disk System games use that techniqe using CHRRAM.

Also, MMC5 has a similar feature using the same amount of CHRRAM that FDS has, but was never really used in any games. Disch's Doki Doki Panic hack uses MMC5 with all the CHR RAM there is availible.

 I'm not sure I follow you. How is using chr-ram(pattern table vram) related to self modifying code?

Whoops, Fixed what I meant (Not CHR-RAM, PRG-RAM)
tomaitheous
Guest
« Reply #9 on: August 30, 2008, 07:59:13 pm »

ohh  Smiley
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC