Hextator’s patch has some problems.
[6/16/2014 8:04:01 PM] Archiblad: man I wish I knew why this was borked
[6/16/2014 8:04:03 PM] Archiblad: http://puu.sh/9wZUi/1d70678fb0.png game gets all glitchy when you just go up and down the shop menus
[6/16/2014 8:06:15 PM] Eric: if you have too many icons
[6/16/2014 8:06:24 PM] Eric: they start to overwrite each other?
[6/16/2014 8:06:28 PM] Eric: idk i feel like I’ve seen it before
[6/16/2014 8:06:32 PM] Cam: Oh
[6/16/2014 8:06:46 PM] Cam: I think I might know what’s going wrong
[6/16/2014 8:06:52 PM] Eric: even if you have alex’s patch
[6/16/2014 8:07:24 PM] Eric: because i think his patch only fixes the bug in the–yeah see that’s what I mean
[6/16/2014 8:07:26 PM] Cam: if you expand the icon sheet
[6/16/2014 8:07:30 PM] Eric: and it’s too much for the memory to handle
[6/16/2014 8:07:33 PM] Cam: it makes the OAM buffer screw up
[6/16/2014 8:07:51 PM] Archiblad: yeah somebody should fix that someday
[6/16/2014 8:07:56 PM] Cam: (this is the kind of thing that I think is more worth paying hextator for)
[6/16/2014 8:07:57 PM] Eric: cough cam go cough
[6/16/2014 8:08:49 PM] Archiblad: http://puu.sh/9x0cb/fc3e75dd5e.png Hahah and then everything turns into the wing clipper
[6/16/2014 8:09:04 PM] Cam: are you just like
[6/16/2014 8:09:05 PM] Eric: i’ve seen that error before
[6/16/2014 8:09:06 PM] Cam: going up and down
[6/16/2014 8:09:07 PM] Cam: repeatedly
[6/16/2014 8:09:08 PM] Archiblad: yeah
[6/16/2014 8:15:01 PM] zahlman: then depending on the order of things in vram
[6/16/2014 8:15:18 PM] zahlman: theoretically one of them could overwrite the section of vram data that’s used for the tile map for the background
[6/16/2014 8:15:29 PM] zahlman: and it would naturally overwrite the beginning of that data → top of the screen
[6/16/2014 8:15:49 PM] Cam: ah
[6/16/2014 8:16:03 PM] zahlman: and the portrait would be fine because it’s on another layer
[6/16/2014 8:46:16 PM] Cam: http://puu.sh/9x2qW/dcb7d805fd.png as you go up and down
[6/16/2014 8:46:19 PM] Cam: those entire rows of tiles
[6/16/2014 8:46:23 PM] Cam: gradually become weapon icons
[6/16/2014 8:46:28 PM] Cam: when they’re all weapon icons
[6/16/2014 8:46:29 PM] Cam: it bugs
[6/16/2014 8:47:02 PM] zahlman: right, because those rows after the weapon icons aren’t actual tiles, they’re tile maps, amirite
[6/16/2014 8:47:29 PM] Cam: it’s /definitely/ a problem with hextator’s fix
[6/16/2014 8:47:35 PM] zahlman: my guess is it’s coded to load new icons sequentially as needed
[6/16/2014 8:47:37 PM] Cam: he did something funky to make it load custom icons
[6/16/2014 8:47:41 PM] Cam: because
[6/16/2014 8:47:44 PM] zahlman: except it just keeps going, instead of reusing old space
[6/16/2014 8:47:55 PM] zahlman: like
[6/16/2014 8:48:01 PM] zahlman: see how there are 5 icons normally
[6/16/2014 8:48:06 PM] zahlman: corresponding to 5 slots in the menu
[6/16/2014 8:48:16 PM] zahlman: those should be getting treated as like a circular buffer
[6/16/2014 8:48:32 PM] Cam: Oh, I get it
[6/16/2014 8:48:40 PM] Cam: When it comes to an icon that isn’t in the vanilla table
[6/16/2014 8:48:45 PM] Cam: instead of going back into the circle
[6/16/2014 8:48:47 PM] Cam: it reloads it
[6/16/2014 8:49:06 PM] Cam: because the icons that are overwriting stuff
[6/16/2014 8:52:37 PM] Cam: http://puu.sh/9x2Ny/b74d51e218.png this is after opening it once
[6/16/2014 8:53:13 PM] Cam: http://puu.sh/9x2Pu/3cc3347e0d.png this is after going up and down a few times
[6/16/2014 8:53:35 PM] Cam: http://puu.sh/9x2Qx/e66070afca.png this is after the glitch occurs
[6/16/2014 9:03:06 PM] Cam: it seems you’re saying that
[6/16/2014 9:03:26 PM] Cam: when it’s loading the weapon icon bitmap data into VRAM
[6/16/2014 9:03:30 PM] Cam: it’s overwriting some of the “TSA” data
[6/16/2014 9:03:37 PM] Cam: hence why there are random fucked up tiles on the top of the scree
[6/16/2014 9:03:38 PM] Cam: ?
[6/16/2014 9:03:38 PM] zahlman: that’s my best guess
[6/16/2014 9:04:09 PM] zahlman: a weapon icon needs 4 tiles, so it would potentially fuck up 64 tiles worth of screen mapping = 2 whole rows
[6/16/2014 9:15:19 PM] Cam: http://dl.dropboxusercontent.com/u/336940/Software/Hextator’s%20Doc/Media/Games/Reverse%20Engineering/Console/NGBA/Fire%20Emblem/Apps/FEditor%20Adv/asm/FE7/Item%20Icon%20Bug%20Fix/Item%20Icon%20Bug%20Fix.txt
[6/16/2014 9:15:49 PM] zahlman: >bugfix
[6/16/2014 9:15:52 PM] Cam: luckily i was wrong
[6/16/2014 9:15:57 PM] Cam: According to rey
[6/16/2014 9:16:06 PM] Cam: it screwed up for expanded item icons before
[6/16/2014 9:16:16 PM] Cam: like they didn’t work period they all turned into vulneraries
[6/16/2014 9:16:30 PM] Cam: so i guess it sort of did its job?
[6/16/2014 9:17:37 PM] Cam: hmm
[6/16/2014 9:18:08 PM] Cam: wait what
[6/16/2014 9:18:21 PM] Cam: gonna be honest i have no idea wtf this does
[6/16/2014 9:19:05 PM] zahlman: idgi either
[6/16/2014 9:19:43 PM] Cam: presumably 0x80 is the size of the vanilla weapon icons
[6/16/2014 9:19:54 PM] Cam: idk what it does for beyond that
[6/16/2014 9:19:43 PM] Cam: presumably 0x80 is the size of the vanilla weapon icons
[6/16/2014 9:19:54 PM] Cam: idk what it does for beyond that
[6/16/2014 9:19:56 PM] zahlman: it looks like this code is intended to be jumped to by replacing part of the original code with an unconditional branch
[6/16/2014 9:19:59 PM] zahlman: and then it jumps back
[6/16/2014 9:20:20 PM] zahlman: where do you see 0x80
[6/16/2014 9:20:34 PM] zahlman: oh, the cmp
[6/16/2014 9:22:27 PM] zahlman: ok so
[6/16/2014 9:23:51 PM] zahlman: if an icon id >= 0x80 is calculated, it stores 0x02026A50 + 4 x r4 into r5
and then jumps to 0x4DDC in thumb
otherwise it just jumps to 0x4DC4 in thumb
[6/16/2014 9:24:30 PM] zahlman: so that’s a WRAM address
[6/16/2014 9:24:42 PM] zahlman: and it looks like there’s an array with 4 bytes per custom icon
[6/16/2014 9:25:46 PM] Cam: but it’s not just a table with all the custom icons
[6/16/2014 9:25:54 PM] Cam: because it doesn’t subtract out the 0x80
[6/16/2014 9:26:10 PM] Cam: is it just a table with all the icons?
[6/16/2014 9:59:34 PM] Archiblad: okay 6 custom icon test
[6/16/2014 9:59:51 PM] Archiblad: http://puu.sh/9x6Fe/6f41e81aaf.png
[6/16/2014 9:59:53 PM] zahlman: wait jake did it mess up with 11 normal icons?
[6/16/2014 9:59:56 PM] Archiblad: nope
[6/16/2014 10:01:18 PM] Cam: does it mess up if you can’t scroll?
[6/16/2014 10:01:21 PM] Cam: I would assume not
[6/16/2014 10:01:53 PM] Archiblad: nope
[6/16/2014 10:04:58 PM] Archiblad: hold on I want to check something
[6/16/2014 10:05:07 PM] Archiblad: cuz greatlance and battle axe are where vanilla icons would be and the tonic is just over the standard vulnerary
[6/16/2014 10:06:30 PM] Cam: wtf
[6/16/2014 10:06:41 PM] Cam: that
[6/16/2014 10:06:45 PM] Archiblad: it might be anything after the affinity icons
[6/16/2014 10:06:45 PM] Cam: makes no sense
[6/16/2014 10:06:50 PM] Cam: Oh
[6/16/2014 10:06:51 PM] Cam: maybe?
[6/16/2014 10:06:56 PM] Archiblad: that’s what I’m tryna test
[6/16/2014 10:08:41 PM] Cam: so it’s “after the affinity icons”?
[6/16/2014 10:08:44 PM] Archiblad: looks like it
[6/16/2014 10:23:26 PM] Cam: http://puu.sh/9x7Ui/9e36e0880e.png aha
[6/16/2014 10:23:47 PM] Cam: the same kind of issue happens in the status screen
[6/16/2014 10:23:50 PM] Cam: we just
[6/16/2014 10:23:52 PM] Cam: don’t notice
[6/16/2014 10:25:09 PM] Cam: http://puu.sh/9x7Z0/fe3deae95b.png - original, http://puu.sh/9x7ZP/d805d559e2.png - after scrolling
[6/16/2014 10:25:46 PM] Cam: http://puu.sh/9x82f/95af39c0bb.png aha
[6/16/2014 10:26:17 PM] Cam: it breaks the horse/wyvern icon too
[6/16/2014 10:26:32 PM | Edited 10:26:34 PM] Cam: arch do you know offhand/can you check what 0x80 is on the icon table
[6/16/2014 10:27:21 PM] Archiblad: 0x80 is the anima icon
[6/16/2014 10:27:30 PM] Cam: is that the last one
[6/16/2014 10:27:32 PM] Archiblad: yup
[6/16/2014 10:27:34 PM] Archiblad: horse is next
[6/16/2014 10:27:52 PM] Cam: then it’s definitely hextator’s fault
[6/16/2014 10:28:12 PM] Cam: confirmed
[6/16/2014 10:28:15 PM] Cam: it doesn’t do that on the vanilla ROM
[6/16/2014 10:29:13 PM] Cam: http://puu.sh/9x8e6/bff10d2c98.png gdi hex
This was our little trial and error sesh last night. Any icon past 0x80 borks the weapon icon display when being repeatedly reloaded, which results in the glitched shop interface and disappearing icons on the status screen.