overlazy icon indicating copy to clipboard operation
overlazy copied to clipboard

the meaning of overlap - u parameters.

Open ccwl opened this issue 4 years ago • 6 comments

Hello, Eric fry. I'm very interested in overlap. I want to know the meaning of each parameter of overlap - u and how to use it. Can you tell me? thank you!

ccwl avatar Feb 15 '21 09:02 ccwl

running with no arguments should give you basic usage info. Or look at https://github.com/fenugrec/overlazy/blob/7afb9863c0489c2c5d4f211515d5ac4c5811cbb2/main.c#L723

the README also has some basic examples

fenugrec avatar Feb 15 '21 12:02 fenugrec

Thank you for your answer! I'm not very familiar with this. I read the basic usage information, but I don't understand seglut_ POS、OVLLUT_ POS、OVL_ What does base mean. Can you be specific? Thanks again!

ccwl avatar Feb 16 '21 00:02 ccwl

I'll be honest, I haven't looked at a single DOS .exe since I uploaded this. I forgot most of the details; IIRC you need to find those 3 parameters by analyzing the int 3F (overlay call) handler. "LUT" = look-up table. So one for segments, one for overlays; OVL_BASE is where they end up in memory. The idea is that int 3F is called with a parameter giving a function # (I think); the handler needs to figure out what overlay to load @ OVL_BASE , and where to call inside that.

That's about the most I can say; I published this project for the benefit of others, but should be considered "unsupported". I could accept simple bug fixes or PRs but that's about it. Good luck !

fenugrec avatar Feb 16 '21 01:02 fenugrec

Hello fenugrec, I'm interrupting you again! I have a serious look at the source code and reference to the information you provided, and run overlap, output "not enough addressing space to unroll that hit", the reason is that the address space is not allocated enough, but I use IDA 7.5 to open my DOS program, found that IDA can fully expand the overlay segment, it uses 0-1000 address space.I don't know if I can improve overlap. Here is a screenshot of IDA:

a

ccwl avatar Feb 17 '21 05:02 ccwl

found that IDA can fully expand the overlay segment

Yes, maybe IDA improved since I wrote this utility. For sure, the ideal case would be if IDA could correctly work with overlayed .exe and fixup calls and xrefs automatically.

not enough addressing space to unroll that hit

You probably found one of the many limitations of overlazy... I can't help you with that, like I said.

fenugrec avatar Feb 17 '21 12:02 fenugrec

OK, I mainly want to use the program for ghidra. It can decompile 16 bit programs, but it has a bug that can't recognize the overlay segment. Finally, although I can't use your program, anyway, your program gives me great inspiration. I understand the overlay technology of DOS better, and understand the working principle of IDA. Thank you for your program, thank you for your efforts! English is not very good, may not express well, I hope you forgive me!

ccwl avatar Feb 17 '21 13:02 ccwl