inited flag is removed when card is ejected

This commit is contained in:
freitz85 2017-08-31 01:07:34 +02:00
parent 30f6b89f2b
commit 63313fd7fa
5 changed files with 83 additions and 79 deletions

3
.gitignore vendored
View File

@ -156,7 +156,7 @@ xlnx_auto_0_xdb/
xst/
_ngo/
_xmsgs/
VHDL/appleiisd_html*
VHDL/*_html
VHDL/*.vhf
VHDL/*.dhp
VHDL/*.gyd
@ -170,3 +170,4 @@ VHDL/*.err
VHDL/*.lfp
Hardware/SD_A2\.b\$1

View File

@ -21,5 +21,7 @@ GENERATEDSIMULATIONMODELTIME 0
SOURCE AppleIISd.vhd
SOURCE AddressDecoder.sch
DEPASSOC appleiisd AppleIISd.ucf
[Normal]
p_CPLDFitterminate=xstvhd, 9500xl, VHDL.t_vm6File, 1504132429, Float
[STRATEGY-LIST]
Normal=True

View File

@ -24,7 +24,6 @@ NET "ndev_sel" LOC = "P24" ;
NET "ng" LOC = "P12" ;
NET "nio_sel" LOC = "P14" ;
NET "nio_stb" LOC = "P42" ;
NET "nirq" LOC = "P44" ;
NET "noe" LOC = "P25" ;
NET "nphi2" LOC = "P8" ;
NET "nreset" LOC = "P20" ;

View File

@ -98,6 +98,7 @@ architecture Behavioral of AppleIISd is
signal spidataout: std_logic_vector (7 downto 0);
signal spiint: std_logic; -- spi interrupt state
signal inited: std_logic; -- card initialized
signal inited_int: std_logic;
-- spi register flags
signal tc: std_logic; -- transmission complete; cleared on spi data read
@ -160,6 +161,7 @@ begin
led <= not (bsy or not slavesel); --'0'; --shifting2; --shiftdone; --shiftcnt(2);
ng <= ndev_sel and nio_sel and nio_stb;
inited <= inited_int and not card;
--------------------------
bsy <= start_shifting or shifting2;
@ -370,7 +372,7 @@ begin
ier <= '0';
slavesel <= '1';
slaveinten <= '0';
inited <= '0';
inited_int <= '0';
divisor <= (others => '0');
elsif (falling_edge(selected) and nrw = '0') then
--elsif (falling_edge(cpu_phi2) and selected='1' and nrw='0') then
@ -391,7 +393,7 @@ begin
when "11" => -- write slave select / slave interrupt enable
slavesel <= int_din(0);
slaveinten <= int_din(4);
inited <= int_din(7);
inited_int <= int_din(7);
when others =>
end case;
end if;

View File

@ -1,5 +1,5 @@
Programmer Jedec Bit Map
Date Extracted: Sun Aug 27 12:15:48 2017
Date Extracted: Thu Aug 31 00:57:26 2017
QF46656*
QP44*
@ -53,8 +53,8 @@ L0000224 00000000 10000000 00000000 00000000*
L0000256 00000000 00000000 00000000 00000000*
L0000288 000000 100000 000000 000000*
L0000312 000000 000000 000000 000000*
L0000336 000000 100000 000000 000100*
L0000360 000000 000000 000000 000000*
L0000336 000000 100000 000000 000000*
L0000360 000000 000000 000000 000100*
L0000384 000000 100000 000000 000000*
L0000408 000000 100000 000000 000000*
L0000432 00000000 00000000 00000000 00000000*
@ -68,8 +68,8 @@ L0000656 00000000 00000000 00000000 00000000*
L0000688 00000100 00000000 00000000 00000000*
L0000720 000000 000000 000000 000000*
L0000744 000000 000000 000000 000000*
L0000768 000000 000000 000000 000000*
L0000792 000000 000000 000000 000100*
L0000768 000000 000000 000000 000100*
L0000792 000000 000000 000000 000000*
L0000816 000000 000000 000000 000000*
L0000840 000000 000000 000000 000000*
L0000864 00000000 00000000 00000000 00000000*
@ -79,11 +79,11 @@ L0000960 00000000 00000000 00000000 00000000*
L0000992 00000000 00000000 00000000 00000000*
L0001024 00000000 00000000 00000000 00000000*
L0001056 00000000 00000000 00000000 00000000*
L0001088 00000000 00000000 00000000 00000000*
L0001120 00000000 00000000 00000000 00000000*
L0001088 00000000 10000000 00000000 00000000*
L0001120 00000010 00000000 00000000 00000000*
L0001152 000000 000000 000000 000000*
L0001176 000000 000000 000000 000000*
L0001200 000000 100000 000000 000000*
L0001200 000000 000000 000000 000000*
L0001224 000000 000000 000000 000000*
L0001248 000000 000000 000000 000000*
L0001272 000000 000000 000000 000000*
@ -113,8 +113,8 @@ L0001952 00000000 00000000 00000000 00000000*
L0001984 00000000 00000000 00000000 00000000*
L0002016 000000 000000 000000 000100*
L0002040 000000 000000 000000 000000*
L0002064 000000 000000 000000 000000*
L0002088 100000 000000 000000 000000*
L0002064 100000 000000 000000 000000*
L0002088 000000 000000 000000 000000*
L0002112 000000 000000 000000 000000*
L0002136 000000 000000 000000 000000*
L0002160 00000000 00000000 00000000 00000000*
@ -128,8 +128,8 @@ L0002384 00000000 00000000 00000000 00000000*
L0002416 00000000 00000000 00000000 00000000*
L0002448 000000 000000 000000 000000*
L0002472 000000 000000 000000 000000*
L0002496 100000 000000 000000 000000*
L0002520 000000 000000 000000 000000*
L0002496 000000 000000 000000 000000*
L0002520 100000 000000 000000 000000*
L0002544 000000 000000 000000 000000*
L0002568 000000 000000 000000 000000*
L0002592 00000010 00000000 00000000 00000000*
@ -140,7 +140,7 @@ L0002720 00000010 00000000 00000000 00000000*
L0002752 00111111 00000000 00000000 00000000*
L0002784 00111100 10000000 00000000 00000000*
L0002816 00111100 00000000 00000000 00000000*
L0002848 00101100 00000000 00000000 00000000*
L0002848 00101100 00000000 00100000 00000000*
L0002880 000001 000000 000000 000000*
L0002904 011000 000000 000000 000000*
L0002928 011000 000000 000000 000000*
@ -214,8 +214,8 @@ L0004848 00000000 00000000 00000000 00000000*
L0004880 00001000 00000000 00000000 00000000*
L0004912 00001000 00000000 00000000 00000000*
L0004944 01000000 00000100 00000000 00010000*
L0004976 00100100 00000000 00000000 00000000*
L0005008 00000000 00000000 00100000 00000000*
L0004976 00100100 00000000 00100000 00000000*
L0005008 00000000 00000000 00000000 00000000*
L0005040 010000 000000 000000 000100*
L0005064 010000 000000 000000 000000*
L0005088 000110 000000 000000 000010*
@ -383,8 +383,8 @@ L0009728 00000000 00000000 00000000 00000000*
L0009760 00000000 00000000 00000000 00000000*
L0009792 000000 000000 000000 000000*
L0009816 000000 000000 000000 000000*
L0009840 000100 000000 000000 000000*
L0009864 000000 000000 000000 000100*
L0009840 000100 000000 000000 000100*
L0009864 000000 000000 000000 000000*
L0009888 000000 000000 000000 000000*
L0009912 000000 000000 000000 000000*
L0009936 00000000 00000010 00000000 00000000*
@ -398,8 +398,8 @@ L0010160 00000000 00000000 00000000 00000001*
L0010192 00000000 00000001 00000000 00000000*
L0010224 000000 000000 000000 000000*
L0010248 000000 000000 000000 000000*
L0010272 000000 000000 000000 000100*
L0010296 001000 000000 000000 000000*
L0010272 000000 000000 000000 000000*
L0010296 001000 000000 000000 000100*
L0010320 000000 000000 000000 000000*
L0010344 000100 000000 000000 000000*
L0010368 00000000 00000000 00000000 00000000*
@ -493,35 +493,35 @@ L0012888 000000 000000 000000 000000*
L0012912 000000 000000 000000 000000*
L0012936 000000 000001 000000 000010*
L0012960 00000000 00000000 00000000 00000000*
L0012992 00000100 00000000 00000000 00000011*
L0012992 00000100 10000000 00000000 00000011*
L0013024 00000000 00000000 00000000 00000000*
L0013056 00000000 10000100 00000000 00000000*
L0013088 00000000 00000000 00000010 00000011*
L0013056 00000000 00000100 00000000 00000000*
L0013088 00000000 10000000 00000010 00000011*
L0013120 00000000 00000000 00000000 00000000*
L0013152 00000000 00000000 00000000 00000000*
L0013184 00000000 00000000 00000001 00000111*
L0013184 00000000 10000000 00000001 00000111*
L0013216 00000000 00000000 00000000 00010100*
L0013248 000000 000000 000000 000000*
L0013248 000000 100000 000000 000000*
L0013272 000000 000000 000000 000000*
L0013296 000000 100000 000000 000000*
L0013296 000000 000000 000000 000000*
L0013320 000000 000000 000000 000010*
L0013344 000000 100000 000000 000000*
L0013368 000000 100000 000000 000000*
L0013344 000000 000000 000000 000000*
L0013368 000000 000000 000000 000000*
L0013392 00000000 00000000 00000000 10000100*
L0013424 00000000 10000100 00000000 00000000*
L0013424 00000000 00000100 00000000 00000000*
L0013456 00000000 00000000 00000000 00000000*
L0013488 00000000 00000000 00000000 00011000*
L0013520 00000100 10000000 00000000 00000000*
L0013488 00000000 10000000 00000000 00011000*
L0013520 00000100 00000000 00000000 00000000*
L0013552 00100000 00000000 00000000 00000000*
L0013584 00000000 00000000 00000000 00000100*
L0013616 00000000 10000000 00000000 00000000*
L0013616 00000000 00000000 00000000 00000000*
L0013648 00000000 00001000 00000000 00000000*
L0013680 000000 100000 000000 000000*
L0013680 000000 000000 000000 000000*
L0013704 000000 000000 000000 000000*
L0013728 000000 000000 000000 000000*
L0013728 000000 100000 000000 000000*
L0013752 000000 000000 000000 000000*
L0013776 000000 000010 000000 001100*
L0013800 000000 000001 000000 000000*
L0013776 000000 100010 000000 001100*
L0013800 000000 100001 000000 000000*
L0013824 00000000 00000000 00000000 00000010*
L0013856 10000001 00000000 00000010 00000010*
L0013888 00000000 00000000 00000000 00000000*
@ -559,8 +559,8 @@ L0014784 10000011 00000011 00000000 00000011*
L0014816 00001010 00000011 00000000 00000000*
L0014848 00000001 00000011 00000000 00000011*
L0014880 10000011 00000011 00000000 00000000*
L0014912 10110000 00000010 00000000 00000001*
L0014944 00101001 00000011 10100000 00000010*
L0014912 10110000 00000010 00100000 00000001*
L0014944 00101001 00000011 10000000 00000010*
L0014976 000001 000000 000000 000000*
L0015000 000000 000000 000000 000000*
L0015024 100110 000001 000000 000000*
@ -574,8 +574,8 @@ L0015216 00000000 00000000 00000000 00000000*
L0015248 01110100 00000000 00000000 00000000*
L0015280 00111100 00000100 10100000 00000000*
L0015312 01000000 00000100 00000000 00000000*
L0015344 00001100 00000000 10100000 00000000*
L0015376 00000100 00000000 00000000 00000000*
L0015344 00001100 00000000 10000000 00000000*
L0015376 00000100 00000000 00100000 00000000*
L0015408 010000 000000 000000 000000*
L0015432 011000 000000 000000 000000*
L0015456 000001 000000 000000 000000*
@ -618,8 +618,8 @@ L0016480 00000000 00000000 00000000 00000000*
L0016512 00000000 00000000 00000000 00000000*
L0016544 00001100 00000000 00000000 00000000*
L0016576 00000000 00000000 00000000 00000000*
L0016608 00000000 00000000 00000000 00000000*
L0016640 10000000 00000000 00000000 00000000*
L0016608 10000000 00000000 00000000 00000000*
L0016640 00000000 00000000 00000000 00000000*
L0016672 00000000 00000000 00000000 00000000*
L0016704 000000 000000 000000 000000*
L0016728 000000 000000 000000 000000*
@ -633,8 +633,8 @@ L0016912 00000011 00000000 00000000 00000001*
L0016944 00000011 00000010 00000000 00000001*
L0016976 00000010 00000011 00000000 00000000*
L0017008 00000001 00000001 00000000 00000001*
L0017040 10000011 00000000 00000000 00000000*
L0017072 00000000 00000000 00000000 00000000*
L0017040 00000011 00000000 00000000 00000000*
L0017072 10000000 00000000 00000000 00000000*
L0017104 00000001 00000001 00000000 00000010*
L0017136 000000 000000 000000 000000*
L0017160 000000 000000 000000 000000*
@ -872,10 +872,10 @@ L0023792 00000000 00000010 00000010 00000000*
L0023824 00000010 00000000 00000000 00000010*
L0023856 00000000 00000000 00000000 00000000*
L0023888 00000000 00000010 00000010 00000000*
L0023920 00000000 00000000 00100000 00000000*
L0023920 00000000 00000000 00000000 00000000*
L0023952 00000000 00000000 00000000 00000000*
L0023984 00000000 00000000 00000000 00000000*
L0024016 00000000 00000000 00000000 00000000*
L0024016 00000000 00000000 00100000 00000000*
L0024048 000000 000000 000000 000000*
L0024072 000000 000000 000000 000000*
L0024096 000000 000000 000000 000000*
@ -962,9 +962,9 @@ L0026384 00000000 00000010 00000000 00000010*
L0026416 00000000 00000000 00000010 00000000*
L0026448 00000000 01000000 00000000 00000000*
L0026480 00000010 00000010 00000000 00000010*
L0026512 00000000 00000000 00000000 00000000*
L0026512 00000000 00000000 00100000 00000000*
L0026544 00000000 00000000 00000000 00000000*
L0026576 00000000 00000000 00100000 00000000*
L0026576 00000000 00000000 00000000 00000000*
L0026608 10000000 01000000 00000000 00000000*
L0026640 000000 000000 000000 000000*
L0026664 000000 000000 000000 000000*
@ -1043,8 +1043,8 @@ L0028736 00000000 00000000 00000000 00000000*
L0028768 00000000 00000000 00000000 00000000*
L0028800 000000 000000 000000 000000*
L0028824 000000 000000 000000 000000*
L0028848 100000 000000 000000 000000*
L0028872 000000 000000 000000 000000*
L0028848 000000 000000 000000 000000*
L0028872 100000 000000 000000 000000*
L0028896 000000 000000 000000 000000*
L0028920 000011 000000 000000 000000*
L0028944 00000010 00000001 00000010 00000000*
@ -1058,15 +1058,15 @@ L0029168 00000000 00000000 00000000 00000000*
L0029200 00000000 00000000 00000000 00000000*
L0029232 000000 000000 000000 000000*
L0029256 000000 000000 000000 000000*
L0029280 000011 000000 000000 100000*
L0029304 100000 000000 000000 000000*
L0029280 100011 000000 000000 100000*
L0029304 000000 000000 000000 000000*
L0029328 000000 000000 000000 000000*
L0029352 000000 000000 000000 000000*
L0029376 00000000 00000000 00000000 00000000*
L0029408 00000000 01000000 00000001 00000010*
L0029440 00000000 00000000 00000000 00000000*
L0029472 00000000 00000000 00000000 00000000*
L0029504 00000000 10000000 00000001 00000001*
L0029504 00000000 00000000 00000001 00000001*
L0029536 00000000 00000000 00000000 00000000*
L0029568 00000000 00000000 00000000 00000000*
L0029600 00000000 00000000 00000000 00000000*
@ -1076,7 +1076,7 @@ L0029688 000000 000000 000000 000000*
L0029712 000000 000000 000000 000000*
L0029736 000000 000000 000000 000000*
L0029760 000000 000000 000000 000000*
L0029784 000000 000000 000000 000000*
L0029784 000000 100000 000000 000000*
L0029808 00000010 00000001 00000000 00000001*
L0029840 00000010 00000001 00000000 00000001*
L0029872 00000000 01000000 00000000 00000000*
@ -1126,7 +1126,7 @@ L0031104 00000000 00000001 00000000 00000000*
L0031136 00000000 00000001 00000000 00000010*
L0031168 00000000 00000010 00000000 00000000*
L0031200 00000000 00000000 00000000 00000000*
L0031232 00000010 00000001 00000000 00000000*
L0031232 00000010 10000001 00000000 00000000*
L0031264 00000000 00000000 00000000 00000000*
L0031296 00000000 00000000 00000000 00000000*
L0031328 00000000 00000000 00000000 00000000*
@ -1136,7 +1136,7 @@ L0031416 000000 000000 000000 000000*
L0031440 000000 000000 000000 000000*
L0031464 000000 000000 000000 000000*
L0031488 000000 000000 000000 000000*
L0031512 000000 100000 000000 000000*
L0031512 000000 000000 000000 000000*
L0031536 00000000 00000001 00000000 00000000*
L0031568 00000001 00000001 00000000 00000000*
L0031600 00000000 00000000 00000000 00000000*
@ -1159,11 +1159,11 @@ L0032064 00000000 00000000 00000000 00000000*
L0032096 00000000 00000001 00000000 00000000*
L0032128 00000000 00000000 00000000 00000000*
L0032160 00000000 00000000 00000000 00000100*
L0032192 00000000 10000000 00000000 00000000*
L0032192 00000000 00000000 00000000 00000000*
L0032224 00000000 00000000 00000000 00000000*
L0032256 000000 000000 000000 000000*
L0032280 000000 000000 000000 000000*
L0032304 000000 000000 000000 100000*
L0032304 000000 100000 000000 100000*
L0032328 000000 000000 000000 000000*
L0032352 000000 000000 000000 000000*
L0032376 000000 000000 000000 000000*
@ -1243,7 +1243,7 @@ L0034488 000000 000000 000000 000000*
L0034512 000000 000000 000000 000000*
L0034536 000000 000000 000000 000000*
L0034560 00000000 00000000 00000000 00000000*
L0034592 00000000 10000000 00000000 00000000*
L0034592 00000000 00000000 00000000 00000000*
L0034624 10000000 00000000 00000000 00000000*
L0034656 00000000 00000000 00000000 00011000*
L0034688 00000000 00000000 00000000 00000000*
@ -1255,7 +1255,7 @@ L0034848 000000 000000 000000 000000*
L0034872 000000 000000 000000 000000*
L0034896 000000 000000 000000 000000*
L0034920 000000 000000 000000 000000*
L0034944 000000 000000 000000 001110*
L0034944 000000 100000 000000 001110*
L0034968 000000 000000 000000 000000*
L0034992 00000000 00000000 00000000 00000000*
L0035024 00000000 00000000 00000000 00000000*
@ -1365,13 +1365,13 @@ L0037992 000000 100000 000000 000000*
L0038016 00000000 00000000 00000000 00000000*
L0038048 00000000 00000000 00000000 00010000*
L0038080 00000000 00000000 00000000 00000000*
L0038112 00000000 00000000 00000000 00000000*
L0038112 00000000 10000000 00000000 00000000*
L0038144 00000000 00000000 00000000 00000000*
L0038176 00000000 00000000 00000000 00000000*
L0038208 10000000 00000000 00000000 00000000*
L0038240 00000000 00000000 00000000 00000000*
L0038208 00000000 00000000 00000000 00000000*
L0038240 10000000 00000000 00000000 00000000*
L0038272 00000000 00000000 00000000 00000000*
L0038304 000000 100000 000000 000000*
L0038304 000000 000000 000000 000000*
L0038328 000000 000000 000000 000000*
L0038352 000000 000000 000000 000000*
L0038376 000000 000000 000000 000000*
@ -1383,8 +1383,8 @@ L0038512 00000000 00000000 00000000 00010000*
L0038544 00000000 00000000 00000000 00000000*
L0038576 00000000 00000000 00000000 00000000*
L0038608 00000000 00000000 00000000 00000000*
L0038640 00000000 00000000 00000000 00000000*
L0038672 10000000 00000000 00000000 00000000*
L0038640 10000000 00000000 00000000 00000000*
L0038672 00000000 00000000 00000000 00000000*
L0038704 00000000 00000000 00000000 00000000*
L0038736 000000 000000 000000 000000*
L0038760 000000 000000 000000 000000*
@ -1457,10 +1457,10 @@ L0040640 00000000 01000000 00000000 00000000*
L0040672 00000000 01000000 00000000 00000000*
L0040704 00000000 00000000 00000000 00000000*
L0040736 00000000 00000000 00000000 00000000*
L0040768 00000000 00000100 00000000 00000000*
L0040768 00000000 00000100 00100000 00000000*
L0040800 01000000 01000000 00000000 00000000*
L0040832 00000000 01000000 10100000 00000000*
L0040864 00000000 00000000 10100000 00000000*
L0040864 00000000 00000000 10000000 00000000*
L0040896 000000 000000 000000 000000*
L0040920 000000 000000 000000 000000*
L0040944 000000 000001 000000 000000*
@ -1472,10 +1472,10 @@ L0041072 00000000 00000000 00000000 01000000*
L0041104 00000000 00000000 00000000 00000000*
L0041136 00000000 00000000 00000000 00000000*
L0041168 00000000 00000000 00000000 00000000*
L0041200 00001000 00000000 10100000 01000000*
L0041200 00001000 00000000 10000000 01000000*
L0041232 00000000 00000000 00000000 00000000*
L0041264 00000000 00000000 00000000 00000000*
L0041296 00000000 00000000 00000000 00000000*
L0041296 00000000 00000000 00100000 00000000*
L0041328 010000 000000 000000 000000*
L0041352 000000 000000 000000 000000*
L0041376 000000 000000 000000 000000*
@ -1545,13 +1545,13 @@ L0043176 000000 000000 000000 000000*
L0043200 00000000 00000000 00000000 00000000*
L0043232 00000000 00000000 00000000 00000000*
L0043264 00000000 00000000 00000000 00000000*
L0043296 00000000 10000000 00000000 00000000*
L0043296 00000000 00000000 00000000 00000000*
L0043328 00000000 00000000 00000000 00000000*
L0043360 00000000 00000000 00000000 00000000*
L0043392 00000000 00000000 00000000 00000000*
L0043424 00000000 00000000 00000000 00000000*
L0043456 00000000 00000000 00000000 00000000*
L0043488 000000 000000 000000 000000*
L0043488 000000 100000 000000 000000*
L0043512 000000 000000 000000 000000*
L0043536 000000 000000 000000 000000*
L0043560 000000 000000 000000 000000*
@ -1573,7 +1573,7 @@ L0043992 000000 000000 000000 000000*
L0044016 000000 000000 000000 000000*
L0044040 000000 000000 000000 000000*
L0044064 00000000 00000000 00000000 00000000*
L0044096 00000000 00000000 00000000 00000000*
L0044096 00000000 10000000 00000000 00000000*
L0044128 00000000 00000000 00000000 00000000*
L0044160 00000000 00000000 00000000 00000000*
L0044192 00000000 00000000 00000000 00000000*
@ -1585,7 +1585,7 @@ L0044352 000000 000000 000000 000000*
L0044376 000000 000000 000000 000000*
L0044400 000000 000000 000000 000000*
L0044424 000000 000000 000000 000000*
L0044448 000000 100000 000000 000000*
L0044448 000000 000000 000000 000000*
L0044472 000000 000000 000000 000000*
L0044496 00000000 00000000 00000000 00000000*
L0044528 00000000 00000000 00000000 00000000*
@ -1662,5 +1662,5 @@ L0046560 000100 000000 000000 000000*
L0046584 000000 000000 000000 000000*
L0046608 000000 000000 000000 000000*
L0046632 000000 000000 000000 000000*
C9783*
1911
C97C7*
1922