Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
1 user currently in Rom Hacking: |
Acmlm's Board - I2 Archive - Rom Hacking - FF Hacking FAQ/Running Q&A | | | |
Pages: 1 2 3 4 5 6 7 | Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Dish Spiny Level: 38 Posts: 46/596 EXP: 355646 For next: 14801 Since: 03-15-04 From: Disch Since last post: 18 days Last activity: 18 days |
| ||
The cursors are redrawn every frame for all the menus I've looked at (it clears the $200 area in RAM, which is used as sprite memory, then rewrites all the sprite data to it every frame). To do this, the game typically reads the cursor position (which is at $62 in RAM, or at least it is in every menu I've checked) and *sometimes* runs that value through a lookup table of coords (which is easily editable). Otherwise, it does some sort of math formula to determine the position (it does this for the larger menus, like item and magic menus). Those are more of a pain to work with. Anyway, if you break on $62 reads in a menu... it should immediatly stop at the code you're interested in. So you can figure out where and how it's getting the coords from. BUT... if you're looking for specific offsets ... the coords for the main menu subcursor (the one which selects which character you're pointing to) are at $3B7E9 (2 byte pairs.. first byte X.. 2nd byte Y) Note that since the cursor is a sprite, changing the coords by 1 will move 1 pixel (not 8, like boxes and text... since those were the background). So you'll be working with bigger numbers here. |
|||
Imajin Buster Beetle Level: 34 Posts: 244/452 EXP: 234863 For next: 18788 Since: 03-15-04 From: Kingdom of Zeal Since last post: 39 days Last activity: 53 days |
| ||
Is it possible to kill the "world-wrap" feature the maps have? (just make it stop scrolling when the edge of the map is reached) | |||
Dish Spiny Level: 38 Posts: 47/596 EXP: 355646 For next: 14801 Since: 03-15-04 From: Disch Since last post: 18 days Last activity: 18 days |
| ||
Can't help you with that one. That might proove to be a little difficult... or it might be cake. Probably the biggest difficulty you'd have to overcome is you'd have to manually adjust the player's sprite coords (the player is always drawn center screen... and never moves. So you'd not only have to stop screen scrolling, but you'd also have to move the character's graphics). There might also be complications if the overworld and inner maps share the same code. I'd assume you would still want the overworld map to wrap.. unless you have some weird end-of-earth plan ;D |
|||
NightHawk Bob-Omb Level: 39 Posts: 6/621 EXP: 374743 For next: 30028 Since: 03-26-04 From: Switzerland Since last post: 432 days Last activity: 339 days |
| ||
Hi everyone, I've got a couple new questions. 1) I've been collecting lots of info about where and how the game stores and processes various pieces of data, and I'd like to make it available to others for whom it would be useful, but how would be the best way? I don't have a website, nor the spare time to manage one 2) I've been able to modify both the magic and status screens to what I want for my hack (more or less -- I still have a bit left to finish with them), but I can't figure out how the game fills in the character boxes in the main menu. Can anyone help me a bit with that? Thanks in advance. |
|||
drjayphd Beamos What's that spell? pimp! Level: 56 Posts: 206/1477 EXP: 1387410 For next: 10766 Since: 03-15-04 From: CT Since last post: 2 hours Last activity: 2 hours |
| ||
I can help you on #1: ROM Hacking Repository should have what you're looking for. | |||
Dish Spiny Level: 38 Posts: 49/596 EXP: 355646 For next: 14801 Since: 03-15-04 From: Disch Since last post: 18 days Last activity: 18 days |
| ||
The routine which draws the text in the main menu character boxes is at $3B992. A is set to 00,40,80, or C0 when that routine is called (which character's stats to draw) The first thing it does is it checks the player's max charges (with a LDA command and 7 following ORA commands). If the player has no MP, it skips ahead... otherwise it draw player MP. I haven't fully deciphered the MP drawing section because I didn't have a need to (I ended up rewriting it to conform to drawing the new style MP). After that... it draws the player's current and max HP values (the numerical values). It writes a string to $0300 in RAM, then jumps to a routine (at $3B954) which formats and draws that string. After it draws HP... it draws a big chunk of text which has the player's name, his level, and the text "HP". Here's a snippit from my file:
"LDA $0300 ; load character ID" < -- the "character ID" was previously stored at $0300. It is $1x where x is 0,1,2, or 3 depending on which char's stats are to be retreived. The way it works is... each character is pulled and drawn from that string unless it's a special character. $1x signals to retreive and draw a character stat... and the following byte determines which stat. So "10 00" would draw the player 1's name... "12 05" would draw player 3's current HP, etc. $3E,$3F are set to $0300, which is the address of the string to be formatted. $3A and $3B are the coords at which that text is to be drawn. The code in this area only adds/subtracts to $3B. I don't think it ever alters $3A. |
|||
NightHawk Bob-Omb Level: 39 Posts: 10/621 EXP: 374743 For next: 30028 Since: 03-26-04 From: Switzerland Since last post: 432 days Last activity: 339 days |
| ||
Originally posted by DischThat was all I'd been able to figure out from this routine so far. $0300? Well, that explains part of my trouble -- the other screens I'd hacked all had their strings in $6C00. Yeah, I'd already figured out those codes it uses, because it does the same thing in the magic and status screens. Thanks again for the help Oh, and btw, that string is NULL terminated -- "10 02" always draws "HP", it doesn't have subcodes. |
|||
Dish Spiny Level: 38 Posts: 50/596 EXP: 355646 For next: 14801 Since: 03-15-04 From: Disch Since last post: 18 days Last activity: 18 days |
| ||
aw..crap. You're right lol. well that solves that mystery ^^ . Thanks. |
|||
NightHawk Bob-Omb Level: 39 Posts: 42/621 EXP: 374743 For next: 30028 Since: 03-26-04 From: Switzerland Since last post: 432 days Last activity: 339 days |
| ||
Okay, something of a complex question... In the last 2 pages (page = 256 bytes) of the ROM, there seems to be a lot of unused "space" that's either filled with $00's, $01's, or seemingly random "stuff". Does anyone know if that stuff is actually USED at somewhere? Or is it just "filler"? (Note: I'm not talking of the various routines in that area, or the vector table at the end of the ROM). |
|||
Dish Spiny Level: 38 Posts: 61/596 EXP: 355646 For next: 14801 Since: 03-15-04 From: Disch Since last post: 18 days Last activity: 18 days |
| ||
The log file I made a while back marked those areas as unused. Now that doesn't mean that they're for certain unused... but I'd say it's a pretty safe assumption (It's certainly not executable code... and it probably isn't be a lookup table, since it's all the same data). | |||
NightHawk Bob-Omb Level: 39 Posts: 71/621 EXP: 374743 For next: 30028 Since: 03-26-04 From: Switzerland Since last post: 432 days Last activity: 339 days |
| ||
Okay... it's me again, lol. Another couple questions... 1) From what I can tell, $1x seems to be "scratch space", for temporary values, meaning that I can use it as I need to without worrying about stepping on another routine's toes... correct or not? And either way, is there any free space I can use to store variables where they won't be touched? EDIT: Nevermind the second question, I figured that one out. I just watched what it put into sprite memory, and kinda worked backwards from there... (edited by NightHawk on 05-11-04 04:52 AM) |
|||
Kefka Indefinitely Unbanned Level: 81 Posts: 1639/3392 EXP: 4826208 For next: 166641 Since: 03-15-04 From: Pomona, CALIFORNIA BABY! Since last post: 4 hours Last activity: 4 hours |
| ||
Originally posted by NightHawk Not that this helps much (I'll just let Disch do the talking ), but use a corruptor (like Disch's Corrupster ) or a disassembler for all your data finding needs. |
|||
NightHawk Bob-Omb Level: 39 Posts: 73/621 EXP: 374743 For next: 30028 Since: 03-26-04 From: Switzerland Since last post: 432 days Last activity: 339 days |
| ||
Originally posted by KefkaThat won't really help at allOriginally posted by NightHawk The cursor position is stored in RAM, not ROM (I'm talking about the position in a menu, not the position on screen). |
|||
Kefka Indefinitely Unbanned Level: 81 Posts: 1646/3392 EXP: 4826208 For next: 166641 Since: 03-15-04 From: Pomona, CALIFORNIA BABY! Since last post: 4 hours Last activity: 4 hours |
| ||
Well why didn't you say so? |
|||
Dish Spiny Level: 38 Posts: 63/596 EXP: 355646 For next: 14801 Since: 03-15-04 From: Disch Since last post: 18 days Last activity: 18 days |
| ||
$1x pretty much is scratch space... however... I've run into times where I wanted to use those areas, but couldn't =\. There's a few bytes (like 8) that go unused at $70-$77. And 16 more at $Ax. $340-$3BF go unused as well. And theres yet more at $6DC0-$6EFF. |
|||
Blue Antoid Newcomer Level: 4 Posts: 2/4 EXP: 195 For next: 84 Since: 03-16-04 From: Arvada, Colorado, USA Since last post: 95 days Last activity: 1 day |
| ||
Just curious. Has the text parsing routine been located? It'd be nice to be able to jam in extra functionality for printing the names of party members in standard dialogue, which I'd have to imagine would be fairly feasible with a modest amount of ASM knowledge. (Of course, maybe that wouldn't be a good idea, considering I'd just feel it neccessary to keep implementing stuff I don't have the talent for, like extra conditional pointers and whatnot. I swear, EarthBound has spoiled me like none other. There are over 200 unique control bytes in the primary text format alone... ) |
|||
NightHawk Bob-Omb Level: 39 Posts: 139/621 EXP: 374743 For next: 30028 Since: 03-26-04 From: Switzerland Since last post: 432 days Last activity: 339 days |
| ||
Originally posted by Blue AntoidIt already has that feature, and more. The text parsing routine is responsible for printing party member names, the gold count, stats, etc. The text parsing routine NORMALLY used is at $3DE46, I think, but it uses a different routine for printing spell names in battle (oddly enough, it uses the normal one for the magic screen outside of battle). I don't know where the other routine is, or if there are more.... |
|||
Imajin Buster Beetle Level: 34 Posts: 290/452 EXP: 234863 For next: 18788 Since: 03-15-04 From: Kingdom of Zeal Since last post: 39 days Last activity: 53 days |
| ||
Hm, are you saying that it's possible to have a character's name in dialouge? How? | |||
NightHawk Bob-Omb Level: 39 Posts: 141/621 EXP: 374743 For next: 30028 Since: 03-26-04 From: Switzerland Since last post: 432 days Last activity: 339 days |
| ||
Originally posted by ImajinIn the text string where you want a character's name, insert $10 (for character 1; for other characters you'd use $11/$12/$13), followed by $00. That'll print that character's name. You can also print their class by $10 (or $11/$12/$13) followed by $01. $10 ($11/$12/$13) can be followed by any value up to up $42 (higher values act just like $42), and each one does something different. Oh... in the menus where you choose a specific character (like the magic screen outside of battle, or the character status screen), $10 is replace with the appropriate code for the chosen character. |
|||
Dish Spiny Level: 38 Posts: 78/596 EXP: 355646 For next: 14801 Since: 03-15-04 From: Disch Since last post: 18 days Last activity: 18 days |
| ||
I tried inserting that in dialogue... it doesn't quite work. Dialogue must use a different drawing routine. Battles must use a different routine as well.. since they don't support DTE. (edited by Disch on 06-01-04 12:07 PM) |
Pages: 1 2 3 4 5 6 7 | Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Rom Hacking - FF Hacking FAQ/Running Q&A | | | |