I am regular conference speaker, trainer, and C++ contractor.
I am available for code reviews and on-site training.
- Host of the YouTube channel C++ Weekly
- Ex-co-host of CppCast
- C++ T-Shirts available!
License: The Unlicense
I am regular conference speaker, trainer, and C++ contractor.
I am available for code reviews and on-site training.
Hi,
Using the same technology would it be possible to write in C++ and then translate the assembler to Z80 cpus ? Of course re-writing x86-to-6502 project. I want to know if it is possible and how hard would it be for someone who does not know assembler language at all (but wants to learn it).
Thank you very much for this and for your youtube videos. Sorry if this is the wrong place to post, I did not know a better place.
best regards,
ovi
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
When the translator cannot handle the x86 "pull" or "sbbb" instructions, it is issuing a misleading error message "Cannot translate sbb instruction". Likewise, similar error messages say "movl" instead of "xorl" and "cmb" instead of "cmpb".
The first commit in pull request 1 would address these as well as implement a 16-bit translation of the 32-bit shrl instruction.
z80 support is really missing! :)
How do you manage the translation of the registers? I assume there are less registers on 6502 than on x86.
This can be fairly convenient, as the user can input an executable file and this app can spit out another executable, ready to go. Example:
x86to6502 i8086-test-executable.com -o 6502-test-executable.bin
Or this:
i8086-gcc test.c -S -o - | x86to6502 -o 6502-test.bin
As time permits please add support for 'illegal opcodes.' An excellent reference exists at NMOS 6510 Unintended Opcodes: No More Secrets.
The 6510 on the C64 had these op-codes but other variants of the MOS 65xx family did not. For example, the 8-bit chip 65C02 (common in early C64 accelerators) lacked support for these op-codes. Also, the 16 bit variant WDC 65C816 found in the SuperCPU, the Apple 2GS, etc. redefined these codes to entirely different (now valid) op-codes. So, you'll probably want to use a command line switch to enable/disable this feature if you add it.
It's worth noting that modern C64 accelerators such as the Turbo Chameleon 64 do support these op-codes and even today some demo coders use them to save a few CPU cycles now and again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.