You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've begun a large refactor using these original sources to build something a little more expandable and maintainable (although I must say the code was still a breeze to work with even in this state!)
I've currently done the following:
Cleanup everything from main into seperate files
Abstracted away the translation code for the 6502, which means that in theory another CPU like the z80 could be added.
Added some more opcodes like being able to call functions from existing assembly (through the cdecl calling convention), which paves the way for 16bit math (which should really not be inlined)
Began work on unit tests (using google test)
Added initial support for custom interrupt vectors for IRQ and NMI. Having a cdecl void named irq or nmi will generate this code as an interrupt, also generating a rti instruction instead of rts.
Fixed some minor bugs
Parse error when running on clang on windows (unindented directive line)
Parse error when some instructions are generated with a comment behind it (fixed regex)
Changed optimization to O2, since O3 wants to unroll loops which seems like a really bad idea (why was it O3?)
Added CI jobs on travis-ci (clang) and appveyor (vs2017)
Added support for the SP/ESP registers (untested on commodore, I've picked 2 seemingly? free addresses from the zero page)
Replaced register numbers with a proper enum containing all supported i386 registers (readability)
Added some godbolt example config and script which can be used to plug it straight into godbolt without needing additional changes. The only limitation here is that additional arguments given in the browser are ignored at the moment
If you're interrested, perhaps we should discuss the way forward to get things in sync. I've spend a few afternoons tinkering with it, but I'm sure it can be improved and I'd love to hear your ideas.
Hey Jason,
I've begun a large refactor using these original sources to build something a little more expandable and maintainable (although I must say the code was still a breeze to work with even in this state!)
I've currently done the following:
If you're interrested, perhaps we should discuss the way forward to get things in sync. I've spend a few afternoons tinkering with it, but I'm sure it can be improved and I'd love to hear your ideas.
Check it out at https://github.com/robindegen/x86-to-6502
The text was updated successfully, but these errors were encountered: