no to cos ambitniejszego:
jak wiadomo, carty SDX sa przelotowe - no wiec czemu nie
to poudajmy sobie 4 cartdridge OSS (Action!, Basic XL, Basic XE oraz MAC/65) ktore mozna wlaczyc poleceniem CAR z poziomu SDX
POKE $D5C0,n przelacza cartridge, a polecenie CAR wlacza wybrany
i tak n=0 wlaczy nam Action, n=1 Basic XL itd
cala zabawka zajmuje 28% ukladu, calosc jest flaszowalna z poziomu Atari
RD4_Int<='0';
WR0<=NOT (PHI2 AND NOT RW);
WR1<=NOT (PHI2 AND NOT RW);
RD<=NOT (PHI2 AND RW);
CLK<=NOT CCTL AND PHI2;
ROM<=NOT (NOT S5 AND ENABLED);
CS0<='1';
ROM_Mapper: process (SDX_REG,OSS_REG,EXTERN)
begin
if EXTERN='1' then
AB(5)<='1';
AB(4 downto 2)<=CAR_TYPE;
AB(1)<=OSS_REG(1);
AB(0)<=OSS_REG(0);
else
AB(5)<='0';
AB(4)<='0';
AB(3)<=not SDX_REG(4);
AB(2)<=not SDX_REG(2);
AB(1)<=not SDX_REG(1);
AB(0)<=not SDX_REG(0);
end if;
end process;
CAR_TYPE_Register: process (clk, A_Bus,DataIN)
begin
if A_Bus(7 downto 5)="110" and RW='0' and falling_edge(clk) then
CAR_TYPE<=DataIN(2 downto 0);
end if;
end process;
SDX_Register: process (clk, A_Bus)
begin
if A_Bus(7 downto 5)="111" and RW='0' and falling_edge(clk) then
SDX_REG<=A_Bus(4 downto 0);
end if;
end process;
SDX_Mux: process (SDX_REG,S4,S5,RD4_Int,RD5_Int)
begin
if SDX_REG(3)='1' and SDX_REG(2)='1' then -- "11" - SDX Off, Ext Off
S4_Int<='1';
S5_Int<='1';
RD4<='1';
RD5<='1';
EXTERN<='0';
ENABLED<='0';
elsif SDX_REG(3)='1' and SDX_REG(2)='0' then -- "10" - SDX Off, Ext On
S4_Int<=S4;
S5_Int<=S5;
RD4<=RD4_Int;
RD5<=RD5_Int;
EXTERN<='1';
ENABLED<='1';
else -- "01" or "00" - SDX On, Ext Off
S4_Int<='1';
S5_Int<='1';
RD4<='0';
RD5<='1';
EXTERN<='0';
ENABLED<='1';
end if;
end process;
OSS_Register: process (clk, A_Bus)
begin
if A_Bus(7 downto 5)="000" and RW='0' and falling_edge(clk) then
OSS_REG(1)<=A_Bus(3);
OSS_REG(0)<=A_Bus(0);
end if;
end process;
OSS_Enable: process (OSS_REG)
begin
if OSS_REG="10" then
RD5_Int<='0';
else
RD5_Int<='1';
end if;
end process;
przechodze na tumiwisizm