It'd be cool to have a #uxn compile option where a rom could be specified and compiled into the binary, resulting in a uxnemu or uxncli binary that would only run that one rom.

This would be a nice simple way to distribute uxn programs to people who don't have uxn installed or would have trouble running the rom, like non-tech savvy people.


@makeworld you could convert the rom to a C array and write it in the emulator code. The resulting uxnemu will embed the rom :)

· · Web · 1 · 0 · 1

@neauoire @makeworld this is the core of my approach, but the issue is the resulting binary *has* to be dynamically linked. i've even got a tool that converts binary files into C arrays

@eris @makeworld yeah, I'm not sure what the alternative to that would be? I feel like I've seen people distribute packaged versions of their SDL emulators like Fceux. I'm really not familiar with that part of the release process

@neauoire @makeworld the static binary is probably the best option here; that way your binary will work without fuss on musl and glibc. if you download a musl chroot image, then you can create way smaller static binaries than glibc can

@eris @neauoire @makeworld

you can't really statically link glibc though because it's well a mess

@eris @neauoire why can't it be statically linked? Some poking around online makes it seem like it should be possible, on Linux at least.

@makeworld @neauoire it can be statically linked! but none of the binaries i've produced have gotten it working!

@eris @neauoire hmm. Ok I'll try and see what I can do on Linux.

If I get it working it'd be cool to submit a patch to uxn that allows for this build mode.

@neauoire @makeworld do you want any of my changes? the script to create a C array from binary files is pretty simple, but you need to do some ifdef fuckery

@eris @makeworld I already got one of those :) The bundler won't be part of the emulator, it will be something that contains an uxnemu

@neauoire @eris yeah I was picturing a build mode that alters uxnemu code to contain the rom, and then makes a static build.

@eris @makeworld only if it's something that is a repo that clones uxn/ inside itself and produces a bundled rom/emulator without modifying uxnemu. If there are minor changes to uxnemu that will make this easier without ifdefs by abstracting a couple of things then that's alright too :)

@neauoire @makeworld oh ok. guess i'll have to dust off my ed/sed like i thought i would!

@eris @neauoire let me know if you submit a patch! Just so I don't duplicate work. Currently working through compiling SDL2 lol

@makeworld @neauoire oh, i will - i'll have a version that modifies uxnemu.c done by tomorrow (which devine didn't want), and i'll have a version that doesn't sometime in the future

@neauoire @makeworld i'll probably have it done by tomorrow, then i can get back to bashing my head against the wall on the static linking problem

@eris @neauoire been bashing my head on it already tonight :/

This is what I got as of now:

@makeworld hmm, never seen this error - does it work when dynamically linked?

Show newer

@neauoire @makeworld i think that my version of uxnemu would actually support producing these included uxn binaries, just it's not *perfect*, which annoys me... I can submit my work if it's ok that it doesn't statically link

@neauoire @makeworld it'd be a patch to the uxn repo and the uxnemu.c (just an ifdef and an include ^^)

Sign in to participate in the conversation

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.