Hello, Lots of code is duplicated between the various emulators, and one idea was to write a "libemu" that would amalgate all of that code. This is a proposal for such a library; it prunes code from md, nes snes, gb, gba, and c64. Attached is a full diff, and a a tar of joygba, the joynes-like script I used for most games plus starter scripts I used for testing. Notes: pros - removal of lost of duplicated code between emulators - joystick support for all emulators (except c64) - (?) added toggling fullspeed emulation when audio is enabled - (?) dynamic rescaling from x1 to x16 for larger screens; removed -2, -3 - profiling: now toggled at runtime, removed -T - fix for speed up after pausing emulation with audio turned off cons - emalloc, as often reproduced in the emulators; might be better off in libc or nowhere - the signed typedefs might be better placed in /$objtype/include/u.h - another hacky library - not that emulator specific, could be expanded instead - clumsy; input bit vectors are semi-arbitrary and adaptation in some emulators is fairly bad; worse examples: snes and md - regkeyfn is not very useful as is - snes hires and md intla are ignored when scaling - maybe user programs should never care about scaling, and the library should instead do some turbooptimized duff's device on screen flush questions - can we merge 2600 even if it's buggy? can't fix remaining bugs myself right now, maybe someone else would; many games work fine; long-standing project Thanks! qwx