65Org16 - extending the instruction set
Posted: Thu Aug 18, 2011 5:51 am
Elsewhere:
Just to recap, the 65Org16 is a cpu core, defined as being very like a 6502 but with 16-bit bytes so it has a 32-bit address space. We presently have an implementation in verilog based on Arlet's 6502 core which has a 6502 instruction set, working in simulation and on a Spartan 3 FPGA. Electric_Eye is working on a dev board. There is no emulator(*). There are two assemblers, by teamtempest and BitWise.
The verilog code exists firstly as a fork on github of Arlet's core. So, to make variations on a theme, there are at least three ways to go:
- make another fork, which anyone is free to do
- make a branch within a fork
- add some `defines within the verilog for optional features
Electric_Eye has in fact taken a fork for the dev board work.
The 65Org16 is already in a branch, to distinguish it from the plain 6502 core.
We already have some `defines, so that the verilog can optionally do BCD, and can produce either 6502 or 65Org16. Maybe one day also 65Org32.
If I were to add BRA (easy) and BSR (slightly less easy) I'd probably start with a branch, and I'd do it using a `define so the extra features would be optional. If that code was tidy enough I'd then merge the branch into my main branch.
I'm happy with these two as suggestions for enhancements: I've added them as tickets on github.
In general, I'm comfortable with adding easy-looking 65C02 instructions (PHX and PHY seem like good candidates too) - I'm also comfortable with there being several forks from active developers, because I'm aware I'm not very active. I've shown that 65Org16 is possible, and the original spec is already complete. There are so many ways it could be extended, and I don't think it's possible to keep a very tight rein on all possible directions.
Note that the core is LGPL licensed - you can take it and use it privately as you like, but if you redistribute then you must also redistribute the source.
Cheers
Ed
Edit: (*) there is now an emulator.
viewtopic.php?t=1907
viewtopic.php?t=1982
teamtempest wrote:
BTW, I want that list to include at least "BSR" and "BRA". I don't care if "BSR" takes an extra cycle compared to "JSR", what I like is easy relocatability.
The verilog code exists firstly as a fork on github of Arlet's core. So, to make variations on a theme, there are at least three ways to go:
- make another fork, which anyone is free to do
- make a branch within a fork
- add some `defines within the verilog for optional features
Electric_Eye has in fact taken a fork for the dev board work.
The 65Org16 is already in a branch, to distinguish it from the plain 6502 core.
We already have some `defines, so that the verilog can optionally do BCD, and can produce either 6502 or 65Org16. Maybe one day also 65Org32.
If I were to add BRA (easy) and BSR (slightly less easy) I'd probably start with a branch, and I'd do it using a `define so the extra features would be optional. If that code was tidy enough I'd then merge the branch into my main branch.
I'm happy with these two as suggestions for enhancements: I've added them as tickets on github.
In general, I'm comfortable with adding easy-looking 65C02 instructions (PHX and PHY seem like good candidates too) - I'm also comfortable with there being several forks from active developers, because I'm aware I'm not very active. I've shown that 65Org16 is possible, and the original spec is already complete. There are so many ways it could be extended, and I don't think it's possible to keep a very tight rein on all possible directions.
Note that the core is LGPL licensed - you can take it and use it privately as you like, but if you redistribute then you must also redistribute the source.
Cheers
Ed
Edit: (*) there is now an emulator.
viewtopic.php?t=1907
viewtopic.php?t=1982