nepx / halfix

x86 PC emulator that runs both natively and in the browser, via WebAssembly
https://nepx.github.io/halfix-demo/
GNU General Public License v3.0
669 stars 86 forks source link

Can't compile for termux #26

Closed Pixelsuft closed 3 years ago

Pixelsuft commented 3 years ago
node makefile --cc gcc

image1

gcc -v

image2

nepx commented 3 years ago

I had this problem trying to compile on Android as well. If you're using an ARM phone, you can comment out the int3 instructions (https://github.com/nepx/halfix/search?q=int3). Int3 does nothing but trigger a debug breakpoint (I implemented it here: https://github.com/nepx/halfix/blob/master/src/cpu/decoder.c#L1604).

I use it as a GDB breakpoint, but evidently it's a hack that only works on my system.

On 4/25/21, @. @.> wrote:

node makefile --cc gcc

image1

gcc -v

image2

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/nepx/halfix/issues/26

Pixelsuft commented 3 years ago

I fixed errors, but now I'm getting other error: image (I'm installed sdl and sdl2 packages in termux)

nepx commented 3 years ago

That's what I get for not using pkg-config.,, the build system is a giant kludge at this point, all my fault.

You can get rid of -lSDLmain in makefile.js (line 39). In the WASM version I prune it out, but I was not aware that Termux lacked a SDLmain package too.

On 4/26/21, @. @.> wrote:

I fixed errors, but now I'm getting other error: image

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/nepx/halfix/issues/26#issuecomment-827317506

Pixelsuft commented 3 years ago

image Looooooooooooooooooooooooooooooooooooooool

Pixelsuft commented 3 years ago
pkg install tigervnc sdl sdl2 -y
vncserver -geometry 640x480
export DISPLAY=":1"
./halfix -c path-to-config
Pixelsuft commented 3 years ago

I'm optiming halfix for termux on Saturday

Pixelsuft commented 3 years ago

image No lags on slowest phone. Fastest VM for android.