11// license:BSD-3-Clause
2- // copyright-holders:R. Belmont, AJR
2+ // copyright-holders:R. Belmont, AJR, Adam Billyard
33/* **************************************************************************
44
55 Tektronix 440x "AI Workstations"
1717 * AM9513 timer (source of timer IRQ)
1818 * NCR5385 SCSI controller
1919
20+ * 8255 Centronics printer interface
21+ * X2210 NVRAM
22+
2023 Video is a 640x480 1bpp window on a 1024x1024 VRAM area; smooth panning around that area
2124 is possible as is flat-out changing the scanout address.
2225
23- IRQ levels:
26+ IRQ levels: (see Figure 2.1-8)
2427 7 = Debug (NMI)
2528 6 = VBL
2629 5 = UART
2730 4 = Spare (exp slots)
2831 3 = SCSI
29- 2 = DMA
30- 1 = Timer
32+ 2 = DMA (ethernet)
33+ 1 = Timer (and Printer)
3134 0 = Unused
3235
3336 MMU info:
34- Map control register (location unk ): bit 15 = VM enable, bits 10-8 = process ID
37+ Map control register (location 0x780000 ): bit 5 = Wenable, bit 4 = VMenable, bits3-0 process ID
3538
3639 Map entries:
3740 bit 15 = dirty
6467#include " screen.h"
6568#include " speaker.h"
6669
70+ #include " tek4404.lh"
71+
72+ #define LOG_MMU (1U << 1 )
73+ #define LOG_FPU (1U << 2 )
74+ #define LOG_SCSI (1U << 3 )
75+ #define LOG_IRQ (1U << 4 )
76+
77+ #define VERBOSE (LOG_GENERAL )
6778#include " logmacro.h"
6879
80+ // tek4404 MSU uses a 6502 that is slow to ACK
81+ unsigned constexpr TEK4404_ACK_DELAY = 30'000 ;
82+
83+ // mapcntl bits
84+ constexpr int MAP_VM_ENABLE = 4 ;
85+ constexpr int MAP_SYS_WR_ENABLE = 5 ;
86+ // mapcntrl result bits
87+ constexpr int MAP_BLOCK_ACCESS = 6 ;
88+ constexpr int MAP_CPU_WR = 7 ;
89+
90+ #define OFF8_TO_OFF16 (A ) ((A)>>1 )
91+ #define OFF16_TO_OFF8 (A ) ((A)<<1 )
92+
93+ // constexpr offs_t MAXRAM = 0x200000; // +1MB
94+ constexpr offs_t MAXRAM = 0x400000 ; // +3MB
6995namespace {
7096
7197class tek440x_state : public driver_device
@@ -84,7 +110,7 @@ class tek440x_state : public driver_device
84110 m_prom (*this , " maincpu" ),
85111 m_mainram (*this , " mainram" ),
86112 m_vram (*this , " vram" ),
87- m_map (*this , " map" , 0x1000 , ENDIANNESS_BIG ),
113+ m_map (*this , " map" , 0x1000 , ENDIANNESS_BIG ), // 2k 16-bit entries
88114 m_map_view (*this , " map" ),
89115 m_boot (false ),
90116 m_map_control (0 ),
@@ -321,7 +347,7 @@ void tek440x_state::logical_map(address_map &map)
321347
322348void tek440x_state::physical_map (address_map &map)
323349{
324- map (0x000000 , 0x1fffff ).ram ().share (" mainram" );
350+ map (0x000000 , MAXRAM - 1 ).ram ().share (" mainram" ); // +1MB RAM option ;
325351 map (0x600000 , 0x61ffff ).ram ().share (" vram" );
326352
327353 // 700000-71ffff spare 0
0 commit comments