Updates for v2.1 hardware. Will now create branches for v2.2 and v2.1 hardware
This commit is contained in:
@@ -90,10 +90,16 @@ set_location_assignment PIN_81 -to Z80_DATA[7]
|
||||
|
||||
# Graphics extension address and control.
|
||||
# =======================================
|
||||
set_location_assignment PIN_5 -to VADDR[13]
|
||||
set_location_assignment PIN_2 -to VADDR[12]
|
||||
set_location_assignment PIN_1 -to VADDR[11]
|
||||
set_location_assignment PIN_143 -to VMEM_CSn
|
||||
#set_location_assignment PIN_5 -to VADDR[13]
|
||||
#set_location_assignment PIN_2 -to VADDR[12]
|
||||
#set_location_assignment PIN_1 -to VADDR[11]
|
||||
#set_location_assignment PIN_143 -to VMEM_CSn
|
||||
#set_location_assignment PIN_142 -to VIORQn
|
||||
set_location_assignment PIN_5 -to OUTDATA[3]
|
||||
set_location_assignment PIN_2 -to OUTDATA[2]
|
||||
set_location_assignment PIN_1 -to OUTDATA[1]
|
||||
set_location_assignment PIN_143 -to OUTDATA[0]
|
||||
set_location_assignment PIN_142 -to INCLK
|
||||
|
||||
# RAM control
|
||||
# ===========
|
||||
@@ -124,17 +130,19 @@ set_location_assignment PIN_39 -to Z80_MEM[0]
|
||||
set_location_assignment PIN_36 -to CFG_MZ80A
|
||||
set_location_assignment PIN_35 -to CFG_MZ700
|
||||
# Spare connected pins to be assigned if needed.
|
||||
#set_location_assignment PIN_30 -to TBA[0]
|
||||
#set_location_assignment PIN_29 -to TBA[1]
|
||||
#set_location_assignment PIN_28 -to TBA[2]
|
||||
#set_location_assignment PIN_27 -to TBA[3]
|
||||
#set_location_assignment PIN_26 -to TBA[4]
|
||||
#set_location_assignment PIN_25 -to TBA[5]
|
||||
#set_location_assignment PIN_23 -to TBA[6]
|
||||
#set_location_assignment PIN_22 -to TBA[7]
|
||||
#set_location_assignment PIN_21 -to TBA[8]
|
||||
#set_location_assignment PIN_37 -to TBA[9]
|
||||
#set_location_assignment PIN_34 -to TBA[10]
|
||||
#set_location_assignment PIN_36 -to TBA[0]
|
||||
#set_location_assignment PIN_25 -to TBA[1]
|
||||
#set_location_assignment PIN_30 -to TBA[2]
|
||||
#set_location_assignment PIN_29 -to TBA[3]
|
||||
#set_location_assignment PIN_28 -to TBA[4]
|
||||
#set_location_assignment PIN_27 -to TBA[5]
|
||||
#set_location_assignment PIN_26 -to TBA[6]
|
||||
#set_location_assignment PIN_25 -to TBA[7]
|
||||
#set_location_assignment PIN_23 -to TBA[8]
|
||||
#set_location_assignment PIN_22 -to TBA[9]
|
||||
#set_location_assignment PIN_21 -to TBA[10]
|
||||
#set_location_assignment PIN_34 -to TBA[11]
|
||||
#set_location_assignment PIN_37 -to TBA[12]
|
||||
|
||||
# Z80 Control signals.
|
||||
# ====================
|
||||
|
||||
@@ -44,6 +44,9 @@ create_clock -name {SYSCLK} -period 500.000 -waveform { 0.000 250.000 } [get_por
|
||||
# For K64F
|
||||
create_clock -name {CTLCLK} -period 50.000 -waveform { 0.000 25.000 } [ get_ports { CTLCLK }]
|
||||
|
||||
# For the video module interconnect clock.
|
||||
create_clock -name {INCLK} -period 62.500 -waveform { 0.000 31.250 } [ get_ports { INCLK }]
|
||||
|
||||
# For basic board with oscillator.
|
||||
#create_clock -name {CTLCLK} -period 20.000 -waveform { 0.000 10.000 } [ get_ports { CTLCLK }]
|
||||
#create_clock -name {cpld512:cpldl512Toplevel|CTLCLKi} -period 280.000 -waveform { 0.000 140.000 } [ get_keepers {cpld512:cpldl512Toplevel|CTLCLKi} ]
|
||||
@@ -127,10 +130,14 @@ set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {RAM
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {SVCREQn}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {SYSREQn}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {SYS_BUSACKn}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VADDR[11]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VADDR[12]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VADDR[13]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VMEM_CSn}]
|
||||
#set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VADDR[11]}]
|
||||
#set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VADDR[12]}]
|
||||
#set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VADDR[13]}]
|
||||
#set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {VMEM_CSn}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {OUTDATA[0]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {OUTDATA[1]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {OUTDATA[2]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {OUTDATA[3]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {Z80_BUSRQn}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {Z80_DATA[0]}]
|
||||
set_output_delay -add_delay -clock [get_clocks {SYSCLK}] 5.000 [get_ports {Z80_DATA[1]}]
|
||||
@@ -208,6 +215,10 @@ set_false_path -from {cpld512:cpldl512Toplevel|MEM_MODE_LATCH[2]} -to {cpld512:c
|
||||
set_false_path -from {cpld512:cpldl512Toplevel|MEM_MODE_LATCH[1]} -to {cpld512:cpldl512Toplevel|CTLCLK_Q}
|
||||
set_false_path -from {cpld512:cpldl512Toplevel|MEM_MODE_LATCH[0]} -to {cpld512:cpldl512Toplevel|CTLCLK_Q}
|
||||
|
||||
# For the video module interconnect clock.
|
||||
set_false_path -from [get_clocks {CTLCLK}] -to [get_clocks {INCLK}]
|
||||
set_false_path -from [get_clocks {SYSCLK}] -to [get_clocks {INCLK}]
|
||||
|
||||
|
||||
#**************************************************************
|
||||
# Set Multicycle Path
|
||||
|
||||
@@ -61,7 +61,6 @@ entity cpld512 is
|
||||
Z80_HI_ADDR : out std_logic_vector(18 downto 15);
|
||||
Z80_ADDR : inout std_logic_vector(15 downto 0);
|
||||
Z80_DATA : inout std_logic_vector( 7 downto 0);
|
||||
VADDR : out std_logic_vector(13 downto 11);
|
||||
|
||||
-- Z80 Control signals.
|
||||
Z80_BUSRQn : out std_logic;
|
||||
@@ -101,7 +100,11 @@ entity cpld512 is
|
||||
RAM_WEn : out std_logic;
|
||||
|
||||
-- Graphics Board I/O and Memory Select.
|
||||
VMEM_CSn : out std_logic;
|
||||
-- VMEM_CSn : out std_logic;
|
||||
-- VADDR : out std_logic_vector(13 downto 11);
|
||||
-- VIORQn : out std_logic;
|
||||
INCLK : in std_logic;
|
||||
OUTDATA : out std_logic_vector(3 downto 0);
|
||||
|
||||
-- Clocks, system and K64F generated.
|
||||
SYSCLK : in std_logic;
|
||||
@@ -156,12 +159,19 @@ architecture rtl of cpld512 is
|
||||
signal CTLCLK_Q : std_logic;
|
||||
--
|
||||
signal DISABLE_BUSn : std_logic;
|
||||
signal SYS_BUSACKni : std_logic := '0';
|
||||
|
||||
-- CPU Frequency select logic based on Flip Flops and gates.
|
||||
signal SCK_CTLSELn : std_logic;
|
||||
signal Z80_CLKi : std_logic;
|
||||
signal CTLCLKi : std_logic;
|
||||
|
||||
-- Video module signals.
|
||||
--
|
||||
signal VM_MEM_CSn : std_logic;
|
||||
signal VM_IORQn : std_logic;
|
||||
signal OUTBUF : std_logic_vector(11 downto 0);
|
||||
|
||||
-- Z80 Wait Insert generator when I/O ports in region > 0XE0 are accessed to give the K64F time to proces them.
|
||||
--
|
||||
--signal REQ_WAITn : std_logic;
|
||||
@@ -601,6 +611,53 @@ begin
|
||||
end if;
|
||||
end process;
|
||||
|
||||
-- A Video Module signal serializer. Signals required by the Video Module but not accessible physically (without hardware hacks) are captured and serialised as a set of 4 x 4 blocks, clocked by the video module,
|
||||
-- Reset synchronises the Video Module CPLD with the tranZPUter CPLD and the signals are sent during valid mainboard accesses.
|
||||
--
|
||||
SIGNALSERIALIZER: process(INCLK, Z80_RESETn)
|
||||
variable XMIT_CYCLE : integer range 0 to 3;
|
||||
begin
|
||||
if Z80_RESETn = '0' then
|
||||
XMIT_CYCLE := 0;
|
||||
|
||||
elsif (INCLK='1' and INCLK'event) then
|
||||
|
||||
-- Tight loop, sending current signal status on each clock. There are 16 signals to send and 4 data lines, so we need 4 cycles per data set.
|
||||
case XMIT_CYCLE is
|
||||
when 0 =>
|
||||
-- If we are accessing the mainboard then send across a valid signal set else mark it as invalid.
|
||||
--
|
||||
if SYSCLK_Q = '0' then
|
||||
OUTDATA(3 downto 0) <= Z80_ADDR(3 downto 0);
|
||||
OUTBUF <= VM_IORQn & VM_MEM_CSn & Z80_ADDR(13 downto 4);
|
||||
else
|
||||
OUTDATA(3 downto 0) <= (others => '0');
|
||||
OUTBUF <= (others => '0');
|
||||
end if;
|
||||
XMIT_CYCLE := 1;
|
||||
|
||||
when 1 =>
|
||||
OUTDATA(3 downto 0) <= OUTBUF(3 downto 0);
|
||||
XMIT_CYCLE := 2;
|
||||
|
||||
when 2 =>
|
||||
OUTDATA(3 downto 0) <= OUTBUF(7 downto 4);
|
||||
XMIT_CYCLE := 3;
|
||||
|
||||
when 3 =>
|
||||
-- Double check, if we started with a valid mainboard cycle but the clock switched, or we started with an invalid mainboard
|
||||
-- cycle and the clock switched to mainboard, then invalidate this cycle, otherwise send the final signals as captured at the
|
||||
-- start of the cycle.
|
||||
if SYSCLK_Q = '0' and OUTBUF(11 downto 10) /= "00" then
|
||||
OUTDATA(3 downto 0) <= OUTBUF(11 downto 8);
|
||||
else
|
||||
OUTDATA(3 downto 0) <= (others => '0');
|
||||
end if;
|
||||
XMIT_CYCLE := 0;
|
||||
end case;
|
||||
end if;
|
||||
end process;
|
||||
|
||||
|
||||
-- Memory decoding, taken directly from the definitions coded into the flashcfg tool in v1.1. The CPLD adds greater flexibility and mapping down to the byte level where needed.
|
||||
--
|
||||
@@ -635,8 +692,24 @@ begin
|
||||
-- 29 - All memory and IO are on the tranZPUter board, 64K block 5 selected.
|
||||
-- 30 - All memory and IO are on the tranZPUter board, 64K block 6 selected.
|
||||
-- 31 - All memory and IO are on the tranZPUter board, 64K block 7 selected.
|
||||
MEMORYMGMT: process(Z80_ADDR, Z80_WRn, Z80_RDn, Z80_IORQn, Z80_MREQn, Z80_M1n, MEM_MODE_LATCH)
|
||||
MEMORYMGMT: process(Z80_ADDR, Z80_WRn, Z80_RDn, Z80_IORQn, Z80_MREQn, Z80_M1n, MEM_MODE_LATCH, SYS_BUSACKni)
|
||||
begin
|
||||
-- Video module, the address range C000:FFFF can be made available via the VMEM_CSn signal, memory mode dependent.
|
||||
-- Basic open window is the VRAM, D000:D7FF, ARAM D800:DFFF and memory mapped registers E000:E7FF
|
||||
if (Z80_ADDR(15 downto 12) = "1101" or Z80_ADDR(15 downto 11) = "11100") and Z80_MREQn = '0' and (Z80_RDn = '0' or Z80_WRn = '0') and SYS_BUSACKni = '1' then
|
||||
VM_MEM_CSn <= '0';
|
||||
else
|
||||
VM_MEM_CSn <= '1';
|
||||
end if;
|
||||
|
||||
-- For the video card, additional address lines are needed to address the banked video memory. The CPLD is acting as a buffer for these lines.
|
||||
-- VADDR <= Z80_ADDR(13 downto 11) when SYS_BUSACKni = '1'
|
||||
-- else (others => 'Z');
|
||||
if Z80_IORQn = '0' and (Z80_RDn = '0' or Z80_WRn = '0') then
|
||||
VM_IORQn <= '0';
|
||||
else
|
||||
VM_IORQn <= '1';
|
||||
end if;
|
||||
|
||||
-- Memory action according to the set memory mode. Not synchronous as we need to detect and act on address or signals long before a rising edge.
|
||||
--
|
||||
@@ -651,6 +724,7 @@ begin
|
||||
RAM_WEni <= '1';
|
||||
RAM_OEni <= '1';
|
||||
|
||||
|
||||
-- Whenever running in RAM ensure the mainboard is disabled to prevent decoder propagation delay glitches.
|
||||
when "00001" =>
|
||||
RAM_CSni <= '0';
|
||||
@@ -1062,10 +1136,11 @@ begin
|
||||
else 'Z';
|
||||
|
||||
-- Bus control logic.
|
||||
SYS_BUSACKn <= '1' when Z80_BUSACKn = '0' and MB_BUSRQn = '0'
|
||||
SYS_BUSACKni<= '1' when Z80_BUSACKn = '0' and MB_BUSRQn = '0'
|
||||
else
|
||||
'0' when DISABLE_BUSn = '0' or (KEY_SUBSTITUTE = '1' and Z80_MREQn = '0') or (Z80_BUSACKn = '0' and CTL_BUSACKn = '0')
|
||||
else '1';
|
||||
SYS_BUSACKn <= SYS_BUSACKni;
|
||||
Z80_BUSRQn <= '0' when SYS_BUSRQn = '0' or CTL_BUSRQn = '0' or MB_BUSRQn = '0'
|
||||
else '1';
|
||||
|
||||
@@ -1144,12 +1219,6 @@ begin
|
||||
RAM_WEn <= RAM_WEni when Z80_MREQn = '0'
|
||||
else '1';
|
||||
|
||||
-- For the video card, additional address lines are needed to address the banked video memory. The CPLD is acting as a buffer for these lines.
|
||||
VADDR <= Z80_ADDR(13 downto 11) when Z80_BUSACKn = '1'
|
||||
else (others => 'Z');
|
||||
VMEM_CSn <= '0' when unsigned(Z80_ADDR(15 downto 0)) >= X"E000" and unsigned(Z80_ADDR(15 downto 0)) <= X"FFFF" and Z80_MREQn = '0' and Z80_RFSHn = '1'
|
||||
else '1';
|
||||
|
||||
-- Mainboard WAIT State Generator S-R latch 4.
|
||||
-- NB: V2.1 design doesnt need the wait state generator as the mapping is done in hardware.
|
||||
--
|
||||
|
||||
@@ -39,7 +39,6 @@ entity tranZPUterSW is
|
||||
Z80_HI_ADDR : out std_logic_vector(18 downto 15);
|
||||
Z80_ADDR : inout std_logic_vector(15 downto 0);
|
||||
Z80_DATA : inout std_logic_vector(7 downto 0);
|
||||
VADDR : out std_logic_vector(13 downto 11);
|
||||
|
||||
-- Z80 Control signals.
|
||||
Z80_BUSRQn : out std_logic;
|
||||
@@ -79,7 +78,11 @@ entity tranZPUterSW is
|
||||
RAM_WEn : out std_logic;
|
||||
|
||||
-- Graphics Board I/O and Memory Select.
|
||||
VMEM_CSn : out std_logic;
|
||||
-- VMEM_CSn : out std_logic;
|
||||
-- VADDR : out std_logic_vector(13 downto 11);
|
||||
-- VIORQn : out std_logic;
|
||||
INCLK : in std_logic;
|
||||
OUTDATA : out std_logic_vector(3 downto 0);
|
||||
|
||||
-- Clocks, system and K64F generated.
|
||||
SYSCLK : in std_logic;
|
||||
@@ -114,7 +117,6 @@ begin
|
||||
Z80_HI_ADDR => Z80_HI_ADDR,
|
||||
Z80_ADDR => Z80_ADDR,
|
||||
Z80_DATA => Z80_DATA,
|
||||
VADDR => VADDR,
|
||||
|
||||
-- Z80 Control signals.
|
||||
Z80_BUSRQn => Z80_BUSRQn,
|
||||
@@ -154,7 +156,11 @@ begin
|
||||
RAM_WEn => RAM_WEn,
|
||||
|
||||
-- Graphics Board I/O and Memory Select.
|
||||
VMEM_CSn => VMEM_CSn,
|
||||
-- VMEM_CSn => VMEM_CSn,
|
||||
-- VADDR => VADDR,
|
||||
-- VIORQn => VIORQn,
|
||||
INCLK => INCLK,
|
||||
OUTDATA => OUTDATA,
|
||||
|
||||
-- Clocks, system and K64F generated.
|
||||
SYSCLK => SYSCLK,
|
||||
|
||||
@@ -314,29 +314,30 @@ TZSVC_FTYPE_BAS: EQU 2 ; File
|
||||
TZSVC_FTYPE_ALL: EQU 10 ; Handle any filetype.
|
||||
TZSVC_FTYPE_ALLFMT: EQU 11 ; Special case for directory listings, all files but truncated and formatted.
|
||||
|
||||
TZSVC_CMD_READDIR: EQU 01H ; Service command to open a directory and return the first block of entries.
|
||||
TZSVC_CMD_NEXTDIR: EQU 02H ; Service command to return the next block of an open directory.
|
||||
TZSVC_CMD_READFILE: EQU 03H ; Service command to open a file and return the first block.
|
||||
TZSVC_CMD_NEXTREADFILE: EQU 04H ; Service command to return the next block of an open file.
|
||||
TZSVC_CMD_WRITEFILE: EQU 05H ; Service command to create a file and save the first block.
|
||||
TZSVC_CMD_NEXTWRITEFILE:EQU 06H ; Service command to write the next block to the open file.
|
||||
TZSVC_CMD_CLOSE: EQU 07H ; Service command to close any open file or directory.
|
||||
TZSVC_CMD_LOADFILE: EQU 08H ; Service command to load a file directly into tranZPUter memory.
|
||||
TZSVC_CMD_SAVEFILE: EQU 09H ; Service command to save a file directly from tranZPUter memory.
|
||||
TZSVC_CMD_ERASEFILE: EQU 0aH ; Service command to erase a file on the SD card.
|
||||
TZSVC_CMD_CHANGEDIR: EQU 0bH ; Service command to change the active directory on the SD card.
|
||||
TZSVC_CMD_LOAD40BIOS: EQU 20H ; Service command requesting that the 40 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIOS: EQU 21H ; Service command requesting that the 80 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS40:EQU 22H ; Service command requesting that the MZ700 1Z-013A 40 column BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS80:EQU 23H ; Service command requesting that the MZ700 1Z-013A 80 column patched BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIPL: EQU 24H ; Service command requesting the MZ-80B IPL is loaded.
|
||||
TZSVC_CMD_LOADBDOS: EQU 30H ; Service command to reload CPM BDOS+CCP.
|
||||
TZSVC_CMD_ADDSDDRIVE: EQU 31H ; Service command to attach a CPM disk to a drive number.
|
||||
TZSVC_CMD_READSDDRIVE: EQU 32H ; Service command to read an attached SD file as a CPM disk drive.
|
||||
TZSVC_CMD_WRITESDDRIVE: EQU 33H ; Service command to write to a CPM disk drive which is an attached SD file.
|
||||
TZSVC_CMD_READDIR EQU 01H ; Service command to open a directory and return the first block of entries.
|
||||
TZSVC_CMD_NEXTDIR EQU 02H ; Service command to return the next block of an open directory.
|
||||
TZSVC_CMD_READFILE EQU 03H ; Service command to open a file and return the first block.
|
||||
TZSVC_CMD_NEXTREADFILE EQU 04H ; Service command to return the next block of an open file.
|
||||
TZSVC_CMD_WRITEFILE EQU 05H ; Service command to create a file and save the first block.
|
||||
TZSVC_CMD_NEXTWRITEFILE EQU 06H ; Service command to write the next block to the open file.
|
||||
TZSVC_CMD_CLOSE EQU 07H ; Service command to close any open file or directory.
|
||||
TZSVC_CMD_LOADFILE EQU 08H ; Service command to load a file directly into tranZPUter memory.
|
||||
TZSVC_CMD_SAVEFILE EQU 09H ; Service command to save a file directly from tranZPUter memory.
|
||||
TZSVC_CMD_ERASEFILE EQU 0aH ; Service command to erase a file on the SD card.
|
||||
TZSVC_CMD_CHANGEDIR EQU 0bH ; Service command to change the active directory on the SD card.
|
||||
TZSVC_CMD_LOAD40BIOS EQU 20H ; Service command requesting that the 40 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIOS EQU 21H ; Service command requesting that the 80 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS40 EQU 22H ; Service command requesting that the MZ700 1Z-013A 40 column BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS80 EQU 23H ; Service command requesting that the MZ700 1Z-013A 80 column patched BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIPL EQU 24H ; Service command requesting the MZ-80B IPL is loaded.
|
||||
TZSVC_CMD_LOADBDOS EQU 30H ; Service command to reload CPM BDOS+CCP.
|
||||
TZSVC_CMD_ADDSDDRIVE EQU 31H ; Service command to attach a CPM disk to a drive number.
|
||||
TZSVC_CMD_READSDDRIVE EQU 32H ; Service command to read an attached SD file as a CPM disk drive.
|
||||
TZSVC_CMD_WRITESDDRIVE EQU 33H ; Service command to write to a CPM disk drive which is an attached SD file.
|
||||
TZSVC_CMD_CPU_BASEFREQ EQU 40H ; Service command to switch to the mainboard frequency.
|
||||
TZSVC_CMD_CPU_ALTFREQ EQU 41H ; Service command to switch to the alternate frequency provided by the K64F.
|
||||
TZSVC_CMD_CPU_CHGFREQ EQU 42H ; Service command to set the alternate frequency in hertz.
|
||||
TZSVC_STATUS_OK: EQU 000H ; Flag to indicate the K64F processing completed successfully.
|
||||
TZSVC_STATUS_REQUEST: EQU 0FEH ; Flag to indicate the Z80 has made a request to the K64F.
|
||||
TZSVC_STATUS_PROCESSING:EQU 0FFH ; Flag to indicate the K64F is processing a command.
|
||||
TZSVC_CMD_EXIT EQU 07FH ; Service command to terminate TZFS and restart the machine in original mode.
|
||||
TZSVC_STATUS_OK EQU 000H ; Flag to indicate the K64F processing completed successfully.
|
||||
TZSVC_STATUS_REQUEST EQU 0FEH ; Flag to indicate the Z80 has made a request to the K64F.
|
||||
TZSVC_STATUS_PROCESSING EQU 0FFH ; Flag to indicate the K64F is processing a command.
|
||||
|
||||
@@ -394,32 +394,33 @@ TZSVC_FILENAME: DS virtual TZSVCFILESZ ; Filen
|
||||
TZSVCWILDC: DS virtual TZSVCWILDSZ ; Directory wildcard for file pattern matching.
|
||||
TZSVCSECTOR: DS virtual TZSVCSECSIZE ; Service command sector - to store directory entries, file sector read or writes.
|
||||
|
||||
TZSVC_CMD_READDIR: EQU 01H ; Service command to open a directory and return the first block of entries.
|
||||
TZSVC_CMD_NEXTDIR: EQU 02H ; Service command to return the next block of an open directory.
|
||||
TZSVC_CMD_READFILE: EQU 03H ; Service command to open a file and return the first block.
|
||||
TZSVC_CMD_NEXTREADFILE: EQU 04H ; Service command to return the next block of an open file.
|
||||
TZSVC_CMD_WRITEFILE: EQU 05H ; Service command to create a file and save the first block.
|
||||
TZSVC_CMD_NEXTWRITEFILE:EQU 06H ; Service command to write the next block to the open file.
|
||||
TZSVC_CMD_CLOSE: EQU 07H ; Service command to close any open file or directory.
|
||||
TZSVC_CMD_LOADFILE: EQU 08H ; Service command to load a file directly into tranZPUter memory.
|
||||
TZSVC_CMD_SAVEFILE: EQU 09H ; Service command to save a file directly from tranZPUter memory.
|
||||
TZSVC_CMD_ERASEFILE: EQU 0aH ; Service command to erase a file on the SD card.
|
||||
TZSVC_CMD_CHANGEDIR: EQU 0bH ; Service command to change the active directory on the SD card.
|
||||
TZSVC_CMD_LOAD40BIOS: EQU 20H ; Service command requesting that the 40 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIOS: EQU 21H ; Service command requesting that the 80 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS40:EQU 22H ; Service command requesting that the MZ700 1Z-013A 40 column BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS80:EQU 23H ; Service command requesting that the MZ700 1Z-013A 80 column patched BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIPL: EQU 24H ; Service command requesting the MZ-80B IPL is loaded.
|
||||
TZSVC_CMD_LOADBDOS: EQU 30H ; Service command to reload CPM BDOS+CCP.
|
||||
TZSVC_CMD_ADDSDDRIVE: EQU 31H ; Service command to attach a CPM disk to a drive number.
|
||||
TZSVC_CMD_READSDDRIVE: EQU 32H ; Service command to read an attached SD file as a CPM disk drive.
|
||||
TZSVC_CMD_WRITESDDRIVE: EQU 33H ; Service command to write to a CPM disk drive which is an attached SD file.
|
||||
TZSVC_CMD_READDIR EQU 01H ; Service command to open a directory and return the first block of entries.
|
||||
TZSVC_CMD_NEXTDIR EQU 02H ; Service command to return the next block of an open directory.
|
||||
TZSVC_CMD_READFILE EQU 03H ; Service command to open a file and return the first block.
|
||||
TZSVC_CMD_NEXTREADFILE EQU 04H ; Service command to return the next block of an open file.
|
||||
TZSVC_CMD_WRITEFILE EQU 05H ; Service command to create a file and save the first block.
|
||||
TZSVC_CMD_NEXTWRITEFILE EQU 06H ; Service command to write the next block to the open file.
|
||||
TZSVC_CMD_CLOSE EQU 07H ; Service command to close any open file or directory.
|
||||
TZSVC_CMD_LOADFILE EQU 08H ; Service command to load a file directly into tranZPUter memory.
|
||||
TZSVC_CMD_SAVEFILE EQU 09H ; Service command to save a file directly from tranZPUter memory.
|
||||
TZSVC_CMD_ERASEFILE EQU 0aH ; Service command to erase a file on the SD card.
|
||||
TZSVC_CMD_CHANGEDIR EQU 0bH ; Service command to change the active directory on the SD card.
|
||||
TZSVC_CMD_LOAD40BIOS EQU 20H ; Service command requesting that the 40 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIOS EQU 21H ; Service command requesting that the 80 column version of the SA1510 BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS40 EQU 22H ; Service command requesting that the MZ700 1Z-013A 40 column BIOS is loaded.
|
||||
TZSVC_CMD_LOAD700BIOS80 EQU 23H ; Service command requesting that the MZ700 1Z-013A 80 column patched BIOS is loaded.
|
||||
TZSVC_CMD_LOAD80BIPL EQU 24H ; Service command requesting the MZ-80B IPL is loaded.
|
||||
TZSVC_CMD_LOADBDOS EQU 30H ; Service command to reload CPM BDOS+CCP.
|
||||
TZSVC_CMD_ADDSDDRIVE EQU 31H ; Service command to attach a CPM disk to a drive number.
|
||||
TZSVC_CMD_READSDDRIVE EQU 32H ; Service command to read an attached SD file as a CPM disk drive.
|
||||
TZSVC_CMD_WRITESDDRIVE EQU 33H ; Service command to write to a CPM disk drive which is an attached SD file.
|
||||
TZSVC_CMD_CPU_BASEFREQ EQU 40H ; Service command to switch to the mainboard frequency.
|
||||
TZSVC_CMD_CPU_ALTFREQ EQU 41H ; Service command to switch to the alternate frequency provided by the K64F.
|
||||
TZSVC_CMD_CPU_CHGFREQ EQU 42H ; Service command to set the alternate frequency in hertz.
|
||||
TZSVC_STATUS_OK: EQU 000H ; Flag to indicate the K64F processing completed successfully.
|
||||
TZSVC_STATUS_REQUEST: EQU 0FEH ; Flag to indicate the Z80 has made a request to the K64F.
|
||||
TZSVC_STATUS_PROCESSING:EQU 0FFH ; Flag to indicate the K64F is processing a command.
|
||||
TZSVC_CMD_EXIT EQU 07FH ; Service command to terminate TZFS and restart the machine in original mode.
|
||||
TZSVC_STATUS_OK EQU 000H ; Flag to indicate the K64F processing completed successfully.
|
||||
TZSVC_STATUS_REQUEST EQU 0FEH ; Flag to indicate the Z80 has made a request to the K64F.
|
||||
TZSVC_STATUS_PROCESSING EQU 0FFH ; Flag to indicate the K64F is processing a command.
|
||||
|
||||
|
||||
; Quickdisk work area
|
||||
|
||||
@@ -227,6 +227,9 @@ CMDTABLE: DB 000H | 000H | 000H | 001H ; Bit 2
|
||||
DB 000H | 000H | 000H | 002H
|
||||
DB "EC" ; Erase file.
|
||||
DW ERASESD
|
||||
DB 000H | 000H | 000H | 002H
|
||||
DB "EX" ; Exit out of TZFS to original Monitor.
|
||||
DW EXITTZFS
|
||||
DB 000H | 000H | 000H | 004H
|
||||
DB "FREQ" ; Set or change the CPU frequency.
|
||||
DW SETFREQ
|
||||
@@ -594,6 +597,17 @@ BADNUMERR: LD DE,MSGBADNUM
|
||||
BADNUM2: CALL ?PRINTMSG
|
||||
RET
|
||||
|
||||
; Exit out of TZFS - This entails clearing the DRAM as it wont have been refreshed, switching memory mode and then branching to the monitor start entry point.
|
||||
; This is all done by the I/O processor as we need to be in memory mode 0 where all tranZPUter memory is paged out.
|
||||
;
|
||||
EXITTZFS: LD A,TZSVC_CMD_EXIT ; Request the I/O processor restarts the host in original mode.
|
||||
CALL SVC_CMD
|
||||
OR A
|
||||
JP Z,MONIT
|
||||
LD DE,MSGFAILEXIT ; Print message if the I/O processor cant process the command.
|
||||
CALL ?PRINTMSG
|
||||
RET ; Return status to caller, 0 = success.
|
||||
|
||||
;
|
||||
; Memory correction
|
||||
; command 'M'
|
||||
|
||||
@@ -355,6 +355,7 @@ HELPSCR: ; "--------- 40 column width -------------"
|
||||
DB "CPM - Load CPM.", 00DH
|
||||
DB "DXXXX[YYYY] - dump mem XXXX to YYYY.", 00DH
|
||||
DB "EC[fn]- erase file, fn=No or Filename", 00DH
|
||||
DB "EX - Exit TZFS, reset as original.", 00DH
|
||||
DB "F[x] - boot fd drive x.", 00DH
|
||||
DB "FREQ[n]-set CPU to nKHz, 0 for default.", 00DH
|
||||
DB "H - this help screen.", 00DH
|
||||
@@ -413,6 +414,7 @@ MSGSD2TERR: DB "Copy from SD to Tape Failed",
|
||||
MSGT2SDOK: DB "Success, Tape to SD done.", 00DH, 000H
|
||||
MSGSD2TOK: DB "Success, SD to Tape done.", 00DH, 000H
|
||||
MSGFAILBIOS:DB "Failed to load alternate BIOS!", 00DH, 000H
|
||||
MSGFAILEXIT:DB "TZFS exit failed, I/O proc error!", 00DH, 000H
|
||||
MSGFREQERR: DB "Error, failed to change frequency!", 00DH, 000H
|
||||
MSGBADNUM: DB "Error, bad number supplied!", 00DH, 000H
|
||||
;
|
||||
|
||||
Binary file not shown.
@@ -32,7 +32,7 @@ ROOTDIR=../../tranZPUter
|
||||
TOOLDIR=${ROOTDIR}/software/tools
|
||||
JARDIR=${ROOTDIR}/software/tools
|
||||
ASM=glass-0.5.jar
|
||||
BUILDROMLIST="MZ80AFI monitor_SA1510 monitor_80c_SA1510 monitor_1Z-013A monitor_80c_1Z-013A monitor_1Z-013A-KM monitor_80c_1Z-013A-KM MZ80B_IPL"
|
||||
BUILDROMLIST="MZ80AFI monitor_SA1510 monitor_80c_SA1510 monitor_1Z-013A monitor_80c_1Z-013A monitor_1Z-013A-KM monitor_80c_1Z-013A-KM MZ80B_IPL"
|
||||
#BUILDMZFLIST="hi-ramcheck sharpmz-test"
|
||||
BUILDMZFLIST="BASIC sharpmz-test"
|
||||
ASMDIR=${ROOTDIR}/software/asm
|
||||
|
||||
Reference in New Issue
Block a user