flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > [IDEA] Emulator for x86-64 |
Author |
|
revolution 28 Feb 2008, 04:21
There is Bochs. IIRC It does either 64bit emulation or is planned. It is free and open source.
|
|||
28 Feb 2008, 04:21 |
|
Hicel 28 Feb 2008, 05:33
I know BOCHS but it emulates the whole machine and OS. I more meant just to Emulate the PE64 .exe on the current 32-Bit Windows system.
|
|||
28 Feb 2008, 05:33 |
|
revolution 28 Feb 2008, 06:23
An app written for 64bit will also expect to find a 64bit OS. So it would seem to make sense to emulate the OS also. And a 64bit OS would expect to find a 64bit processor. So it would seem to make sense to emulate the 64bit CPU also. a 64bit CPU would expect to find itself running on dedicated hardware designed for it. So it would seem to make sense to emulate the hardware also. That it why we see software like BOCHS, to do it any differently would be extremely difficult.
|
|||
28 Feb 2008, 06:23 |
|
vid 28 Feb 2008, 07:04
Hicel: that would require tremedous effort to translate all 32bit system structures to 64bit ones. i'd say this is "too ambitious" project.
|
|||
28 Feb 2008, 07:04 |
|
f0dder 28 Feb 2008, 12:09
Too bothersome a project with too little gain, imho. Emulating/fixing the code itself probably isn't that bad a task (but still a lot of work). As vid says, though, you'd have a hell of a lot of work making API conversion thunks...
|
|||
28 Feb 2008, 12:09 |
|
edfed 28 Feb 2008, 12:19
Quote:
looks like the Tomb Raider's quests, find the item to find another item to find the key to open the door that hide an item that permit to finish the current level Quote: Hicel: that would require tremedous effort to translate all 32bit system structures to 64bit ones. i'd say this is "too ambitious" project. yep, the first thing to do is to code an emulator for very little µP, like 6809, if you can make it, then you can have the ambition to make it for a 8086, and then, you can try to make it for 386 and so on. step by step. bosch just emulate a X86 platform, it is to you to install an os in a drive image and execute it with bosch. bosch cannot be a very good reference in emulation as it is very very slow. it takes more time on my machines to boot bosch on a floppy image than to reboot the computer, try the floppy, and restart windows. the problem with emulators is that the best one is VIRTUAL PC, the M$ one, as they are the owner of the OS, it's normal. but it works only on XP based machines. impossible for win98 a good idea is to make a faster emulator for x86-32 than bosch. |
|||
28 Feb 2008, 12:19 |
|
f0dder 28 Feb 2008, 12:40
Keep in mind that bochs emulate, VirtualPC and VmWare translate... which is why they run a lot faster than pure emulation. Note that bochs appearantly got a lot faster in the most recent version. There's also QEMU which can do either pure emulation or some translation as well.
PS: bochs, not bosch. |
|||
28 Feb 2008, 12:40 |
|
Hicel 28 Feb 2008, 13:42
Yes. I see the point. It would be too much to complain on the OS side. But I still have two ideas in my mind.
1. What about interactive code emulation or something. I mean like in Olly you can follow API calls and get the code until ret. So you would emulate the PE64 and if a call to an API function let's say MessageBox is made the following code till ret is cut out and somehow also emulated and translated to emulated 64-Bit 2. Idea is translating all 64-Bit stuff in the PE to 32-Bit machine code also variables registers.. calls etc. This way you would not need to complain about the api except the fastcall2stdcall conversion. (But this way you would loose data because if 64-bit is fully used 32-bit cannot represent the data values that are greater than a dword) Hmm It all seemed easier in my mind before you all came up with these problems |
|||
28 Feb 2008, 13:42 |
|
vid 28 Feb 2008, 13:59
neither of these would work
1. tracing 32bit code doesn't in any way make it able to work with different 64bit structures 2. this doesn't solve structures too |
|||
28 Feb 2008, 13:59 |
|
Hicel 28 Feb 2008, 14:17
Ok I give up.
|
|||
28 Feb 2008, 14:17 |
|
itsnobody 28 Feb 2008, 21:05
Hmm....
How about instead of an Emulator or Interpreter you just make something that converts the 64-bit EXEs files into 32-bit EXEs....this seems easier, and it would be a lot faster ,the same as machine code |
|||
28 Feb 2008, 21:05 |
|
f0dder 29 Feb 2008, 00:22
itsnobody wrote: Hmm.... First you'll have to write a disassembler that's at least as good as IDA - and then there's the translation down to 32-bit code, which takes quite some work as well (fewer & narrower registers, different calling conventions, different pointer sizes, ...). This isn't going to be easier than the "simple" emulation layer proposed easier, and requires not just 64->32 stuff but also knowledge about the entire windows API. _________________ - carpe noctem |
|||
29 Feb 2008, 00:22 |
|
edfed 29 Feb 2008, 00:30
Quote:
assuming it's for windows... |
|||
29 Feb 2008, 00:30 |
|
f0dder 29 Feb 2008, 00:36
edfed wrote:
_________________ - carpe noctem |
|||
29 Feb 2008, 00:36 |
|
Hicel 29 Feb 2008, 01:35
itsnobody wrote: Hmm.... Thats what I meaned by: Quote: 2. Idea is translating all 64-Bit stuff in the PE to 32-Bit machine code also variables registers.. calls etc. This way you would not need to complain about the api except the fastcall2stdcall conversion. (But this way you would loose data because if 64-bit is fully used 32-bit cannot represent the data values that are greater than a dword) I don't know if it would work but its like f0dder said.. It is a lot of work. Well I will try this way starting with the PE64 Hello World from fasm examples. Then I can decide going further or not. I'll let you all know Regards |
|||
29 Feb 2008, 01:35 |
|
MazeGen 29 Feb 2008, 08:00
Hicel, even in the 32-bit world, it is very difficult to disassemble a middle-sized application and reassemble it back with keeping the original functionality along. A hello-world like app is doable, but nobody cares about reassembling such a small app.
And if you add the translation, it would be even more difficult. However, go ahead and try it, you can learn many new things even if you won't make it usable. |
|||
29 Feb 2008, 08:00 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.