@abw
I'm continuing to have an extremely hard time grasping the structure of the map drawing, even with the DQ2 disassembly. It's hard for me to even know how to ask for specific help on this, but here's a list of questions that I hope will help clarify.
VOCABULARY
Some terminology / conceptuals I could use clarifaction on:
Control flow target: google would indicate that the control flow is the main program sequence and the targets are the subroutines that get called per the control flow. Is that the right idea?
Map buffer: this is a function of the PPU I would assume?
Map data handler: not finding much in my research for this terminology
"map stack": is this different than the normal stack register?
index to top of "map stack": not sure what indexing means
popping the bottom of the "map stack": also not clear on meaning
process next control code: is this referring to the next step in the main flow of the program?
flag for whether xxxx handler wrote tile IDs: I would assume that flag means write a yes or no indication?
read the next text token and interpolate any variable control codes: not clear on this concept of interpolating.
FORMATTING
A question about how your disassembly is formatted:
Example:
0x00AE5B|$02:$AE4B:B0 03 BCS $AE50 ; read 2 bits of map data: if #$00 or #$01, rotate in that direction and draw the current tile ID; if #$02, push to "map stack" then read 1 bit of map data, rotate in that direction, and draw current tile ID; if #$03, read 1 bit of map data and if set, pop from "map stack", else loop to 0b10 handler to start drawing at a new co-ordinate
Your description here seems to describe a routine, but the notes seems to correspond to a single instruction to branch if carry is set. Are you describing the function of the routine that gets branched to if the criteria is met? I imagine this must be the case.
CONCEPTS
Here are some high level questions about what is going on.
Is it correct to say that *ALL* all of the drawing instructions are ultimately found in the cluster of map data, and that the code / routines involved in the map drawing go through the same structure of processes for every map? Therefore, as long as I understand what purpose each byte in the map data serves, I should be able enact changes? This was my hope, but when I read the disassembly, I have a hard time determining exactly which bytes of map data are getting read from and how it all translates in to the routine structure.
Am I correct in my suspicion that the material in this disassembly most relevant to my map drawing concerns is located about 2/3 of the way down the file?
Ok, that's all I have for now, but I suspect there will be additional rounds of questions coming.
Yup, the map building routine is definitely "special"
. I think it took me a couple of multi-hour sessions to work through it enough to understand what was going on, and then several more sessions to document it.
Why again am I even attempting something that even the likes of you finds difficult?
