When I create a breakpoint for read + write and executes to 0000-FFFF with condition K==#05 it never breaks.
The only breakpoints that are working are to banks #00, #06 and #07.
For testing, I have tried setting 3 forbids for 0000-FFFF RWE to banks #00, #06 and #07 and then setting a breakpoint to any bank with all addresses also for RWE but it never breaks. It will only break on banks 0, 6 and 7... What am I missing here?
Also, Nintendulator has debugging tools. Maybr try it.
The game... at least on one thing I checked.... is executing from bank 7 when its reading the data.
Well, code/data logger marks several addresses as data from ROM addresses 0x14000 forward. I wanted to break on read to some of these to analize how that data is handled, and I calculated that should be bank 5. But there's no way setting breakpoints to those addresses will work. I've even manually "step in" a bunch of times on the debugger until bank 5 was loaded (code is executed there when code/data logger is active, as the little "c" indicates next to each line, then I double click on a line to set a breakpoint which is a way to avoid mistakes, then I go back and play that part and it still doesn't break. I've even started from power on and played for several minutes and nothing. I've tried testing it on a fresh ROM (I figured my deb files may be corrupted) and still nothing. I'm thinking either fceux has a bug on this or I'm not understanding something (which is possible). I'll take a look at nintendulator.
So, what can I do? That area in the ROM really is data. It's where all objects and enemies are stored. I want to better understand how the game interprets that data.
From my notes. This is all mostly data:
Code: Select all
4020-40EF: overworld room ID map 40F0-7BFF: start of each screen mapping in 2x2 metatiles. Each screen is 15x16 (240) bytes long. C020-C0EF: darkworld room ID map C0F0-E0CF: darkworld metatile map 10020-100EF: hidden areas room ID map 100F0-13A1F: the hidden areas metatile map and possibly some beta version or quest 2 unused version of the overworld 13920-13A1F: an unused test room with gold and ladders 14000-1421F: object list mapping for overworld quest 1 1426B-147F6: object list for overworld quest 1. Each item takes 3 bytes. First byte is type, second is horizontal position and third is vertical position. Some items take 4 bytes, so the second is a parameter, and the last two are the position 14A9F-14C60: object list for darkworld 14E60-14FB8: object list for big warpzone 14FB9-15015: object list for medium warpzone 15016-15046: object list for small warpzone
The data that you want to look at is starts at 0x14010 = 0x14020- header. You can tell from the pointer table at the beginning of the section that its been mapped to 0x8000. So you could set a breakpoint for anytime it reads from 0x8010 thru 0x9034 (the end of the data)
The first one I tried was setting a read breakpoint for 8058. It break on this not long after pressing start for player 1. 8058 refers to 0x14068 in the rom if the header is included.
But doesn't fceux's condition only working for the bank it's executed from beat the porpuse of breaking on reads with bank conditions? It must be very often that reads fetch addresses from other banks, no? Mind you this is the first game I'm actually using the debugger, so I have no experience with other games. So I guess when looking for reads one should never set bank conditions unless it's known that it's from the same bank : /
That about clears it up. I didn't get that from reading the documentation, but your description is perfect. Problem solved, thanks!Revenant wrote:According to the documentation, T represents the bank that data is being read from/written to, while K only represents the bank currently being executed.