| |||
Views: 88,432,215 |
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search | 04-18-24 10:35 AM |
|
Guest: Register | Login |
0 users currently in ROM Hacking | 1 guest |
Main - ROM Hacking - Searching for Free Bytes | New thread | New reply |
Trax |
| ||
Yellow Stalfos Level: 71 Posts: 714/1145 EXP: 3033814 Next: 133300 Since: 07-06-07 From: Québec Last post: 3619 days Last view: 2871 days |
Okay, I'm currently working on some serious ASM hacking, and I need a few bytes to store extra variables. Are there any tricks to make sure a memory spot is never used? |
Matrixz |
| ||
Ninji Level: 35 Posts: 36/225 EXP: 266203 Next: 13733 Since: 04-07-07 From: Norway Last post: 3098 days Last view: 1775 days |
If we are talking NES..
You could try searching the rom like this: for zero-page memory ($00-$FF): A5 D0 <- search for "LDA $D0" 85 D0 <- search for "STA $D0" for other memory ($100-$FFFF): AD 34 12 <- search for "LDA $1234" 8D 34 12 <- search for "STA $1234" It's not completely reliable. These 4 examples only covers the A register.. And this will not give result when the memory is accessed using other addressing modes. But it could give results, very fast. |
never-obsolete |
| ||
Rat Level: 24 Posts: 41/96 EXP: 74448 Next: 3677 Since: 02-22-07 From: Phoenix, AZ Last post: 2588 days Last view: 2588 days |
assuming the nes:
-set a r/w breakpoint on a location that seems unused and play the game. -some games don't go too deep in the stack and you may be able to use locations in the lower part of the page. -if the mapper supports on-cart ram and the game doesn't already have it, add it. -if the game uses chr-ram, you could store it there as well. though you'd have to do all r/w durring vblank or disable rendering. |
koala_knight |
| ||
Buzzy Beetle Level: 44 Posts: 273/384 EXP: 590855 Next: 20430 Since: 06-01-07 From: Miami Last post: 4118 days Last view: 4105 days |
Posted by never-obsolete Is that difficult to do or is it as simple as changing a value in the header? |
never-obsolete |
| ||
Rat Level: 24 Posts: 42/96 EXP: 74448 Next: 3677 Since: 02-22-07 From: Phoenix, AZ Last post: 2588 days Last view: 2588 days |
change byte 6 of the header (from http://nesdevwiki.org/wiki/INES):
|
koala_knight |
| ||
Buzzy Beetle Level: 44 Posts: 275/384 EXP: 590855 Next: 20430 Since: 06-01-07 From: Miami Last post: 4118 days Last view: 4105 days |
Thanks! |
Main - ROM Hacking - Searching for Free Bytes | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 62, rows: 87/88, time: 0.016 seconds. |