Rewriting my core
I started to rewrite RB65. I have RB6502, RB6510 and RB6588 (6502 for XT) in the mean time, three seperate files. An error found in an opcode means I have to edit three files. So I decided to lift out that part that is completely hardware independant, called RB65. RB65 is now to be embedded into RB6502, RB6520 etc. RB6502 etc. from now on handle th hardware part.
This means I need an universal interface between RB65 and the higher level cores. If we agree on a general interface, it would mean we can exchange cores in seconds. For example this would mean I could load my Godil with RB6502 but with André's basic 6502 core. Or T65 or Free_6502, as long as the interface is the same.
At this moment my interface looks like this:
Code:
entity RB65 is
Port (
A : out std_logic_vector(15 downto 0);
Din : in std_logic_vector(7 downto 0);
Dout : out std_logic_vector(7 downto 0);
IRQ : in std_logic;
NMI : in std_logic;
RDY : in std_logic;
PHI0 : in std_logic; -- input single clock
PHID : in std_logic; -- input double clock
RESET : in std_logic;
RW : out std_logic; -- Read/Write line
SO_n : in std_logic;
SYNC : out std_logic;
SSB : in std_logic; -- Single Step Busy
SSC : in std_logic; -- Single Step Clock
OpcC : out std_logic_vector(4 downto 0); -- Opcode step counter
Version : out std_logic_vector(7 downto 0)
);
end RB65;
The nice thing is that one can define as many OUTs as he wants: if the upper level doesn't need them, you won't have to define a counterpart for them.
INs is a different story. I thought I needed SSB and SSC for debugging but writing this I realised they can be moved up a level and be combined with RDY.
PHID needs an explanation. I already mentioned my "double clock", enabling me to perform two actions every clock, like the real 6502 does. But it also enables me to execute some 1-byte opcodes in one clock cycle, something T65 cannot (like ASL A).
A core not using this feature, like T65, accepts it as input but then doesn't use anything with it.
I would like to write more but I have to go now to the church. But I hope I gave you enough material to discuss.
(TAB does work quite correct in CODE mode I just noticed in preview mode)
_________________
Code:
___
/ __|__
/ / |_/ Groetjes, Ruud
\ \__|_\
\___| URL: www.baltissen.org