Previous 15994 Revisions Next

r15423 Thursday 7th June, 2012 at 19:54:04 UTC by Curt Coder
[WANGPC] TIG WIP. (nw)
[src/emu/drivers]xtal.h
[src/mess/drivers]wangpc.c
[src/mess/machine]wangpc_tig.c wangpc_tig.h
[src/mess/video]upd7220.c

src/emu/drivers/xtal.h
r15422r15423
190190   XTAL_49_152MHz     = 49152000,      /* Used on some Namco PCBs, Baraduke h/w, System 21, Super System 22  */
191191   XTAL_50MHz        = 50000000,      /* Williams/Midway T/W/V-unit system */
192192   XTAL_52MHz        = 52000000,      /* Cojag */
193   XTAL_52_832MHz      = 52832000,    /* Wang PC TIG video controller */
193194   XTAL_53_693175MHz   = 53693175,      /* PSX-based h/w, Sony ZN1-2-based */
194195   XTAL_54MHz        = 54000000,      /* Taito JC */
195196   XTAL_57_2727MHz    = 57272727,      /* Psikyo SH2 with /2 divider */
src/mess/machine/wangpc_tig.c
r15422r15423
3838#define DMA_DREQ3         BIT(m_option, 3)
3939#define DMA_ID            BIT(m_option, 4)
4040
41#define ATTR_ALT_FONT      BIT(data, 8)
42#define ATTR_UNDERSCORE      BIT(data, 9)
43#define ATTR_BLINK         BIT(data, 10)
44#define ATTR_REVERSE      BIT(data, 11)
45#define ATTR_BLANK         BIT(data, 12)
46#define ATTR_BOLD         BIT(data, 13)
47#define ATTR_SUBSCRIPT      BIT(data, 14)
48#define ATTR_SUPERSCRIPT   BIT(data, 15)
4149
4250
51
4352//**************************************************************************
4453//  DEVICE DEFINITIONS
4554//**************************************************************************
r15422r15423
4857
4958
5059//-------------------------------------------------
60//  ROM( wangpc_tig )
61//-------------------------------------------------
62
63ROM_START( wangpc_tig )
64   ROM_REGION( 0x100, "plds", 0 )
65   ROM_LOAD( "377-3072.l26", 0x000, 0x100, NO_DUMP ) // PAL10L8
66   ROM_LOAD( "377-3073.l16", 0x000, 0x100, NO_DUMP ) // PAL10L8
67ROM_END
68
69
70//-------------------------------------------------
71//  rom_region - device-specific ROM region
72//-------------------------------------------------
73
74const rom_entry *wangpc_tig_device::device_rom_region() const
75{
76   return ROM_NAME( wangpc_tig );
77}
78
79
80//-------------------------------------------------
5181//  UPD7220_INTERFACE( hgdc0_intf )
5282//-------------------------------------------------
5383
5484static ADDRESS_MAP_START( upd7220_0_map, AS_0, 8, wangpc_tig_device )
85   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
5586   AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_RAM // frame buffer
5687   AM_RANGE(0x4000, 0x7fff) AM_RAM // font memory
5788ADDRESS_MAP_END
r15422r15423
76107//-------------------------------------------------
77108
78109static ADDRESS_MAP_START( upd7220_1_map, AS_0, 8, wangpc_tig_device )
110   ADDRESS_MAP_GLOBAL_MASK(0xffff)
79111   AM_RANGE(0x0000, 0xffff) AM_RAM // graphics memory
80112ADDRESS_MAP_END
81113
r15422r15423
106138   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
107139   MCFG_SCREEN_REFRESH_RATE(60)
108140
109   MCFG_PALETTE_LENGTH(2)
110   MCFG_PALETTE_INIT(monochrome_green)
141   MCFG_PALETTE_LENGTH(3)
111142
112   MCFG_UPD7220_ADD(UPD7720_0_TAG, 4000000, hgdc0_intf, upd7220_0_map)
113   MCFG_UPD7220_ADD(UPD7720_1_TAG, 4000000, hgdc1_intf, upd7220_1_map)
143   MCFG_UPD7220_ADD(UPD7720_0_TAG, XTAL_52_832MHz/10, hgdc0_intf, upd7220_0_map)
144   MCFG_UPD7220_ADD(UPD7720_1_TAG, XTAL_52_832MHz/16, hgdc1_intf, upd7220_1_map)
114145MACHINE_CONFIG_END
115146
116147
r15422r15423
149180
150181void wangpc_tig_device::device_start()
151182{
183   // initialize palette
184   palette_set_color_rgb(machine(), 0, 0, 0, 0);
185   palette_set_color_rgb(machine(), 1, 0, 0x80, 0);
186   palette_set_color_rgb(machine(), 2, 0, 0xff, 0);
187
188   // state saving
189   save_item(NAME(m_option));
190   save_item(NAME(m_attr));
191   save_item(NAME(m_underline));
152192}
153193
154194
r15422r15423
198238         break;
199239
200240      case 0xfe/2:
201         data = 0xff00 | DMA_ID ? OPTION_ID_1 : OPTION_ID_0;
241         data = 0xff00 | (DMA_ID ? OPTION_ID_1 : OPTION_ID_0);
202242         break;
203243      }
204244   }
src/mess/machine/wangpc_tig.h
r15422r15423
3333   wangpc_tig_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3434
3535   // optional information overrides
36   virtual const rom_entry *device_rom_region() const;
3637   virtual machine_config_constructor device_mconfig_additions() const;
3738   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
3839
r15422r15423
5455   required_device<upd7220_device> m_hgdc0;
5556   required_device<upd7220_device> m_hgdc1;
5657
58   UINT8 m_option;
5759   UINT8 m_attr[16];
58   UINT8 m_option;
5960   UINT8 m_underline;
6061};
6162
src/mess/video/upd7220.c
r15422r15423
757757   // find screen
758758   m_screen = machine().device<screen_device>(m_screen_tag);
759759
760   if (m_screen == NULL)
761   {
762      m_screen = owner()->subdevice<screen_device>(m_screen_tag);
763   }
764
765   assert(m_screen);
766
760767   // register for state saving
761768   save_item(NAME(m_ra));
762769   save_item(NAME(m_sr));
src/mess/drivers/wangpc.c
r15422r15423
11471147   SLOT_INTERFACE("lvc", WANGPC_LVC) // low-resolution video controller
11481148   SLOT_INTERFACE("mvc", WANGPC_MVC) // medium-resolution video controller
11491149   SLOT_INTERFACE("rtc", WANGPC_RTC) // remote telecommunications controller
1150   //SLOT_INTERFACE("tig", WANGPC_TIG) // text/image/graphics controller
1150   SLOT_INTERFACE("tig", WANGPC_TIG) // text/image/graphics controller
11511151   SLOT_INTERFACE("wdc", WANGPC_WDC) // Winchester disk controller
11521152   //SLOT_INTERFACE("mcc", WANGPC_MCC) // multiport communications controller
11531153   //SLOT_INTERFACE("emb", WANGPC_EMB) // extended memory board

Previous 15994 Revisions Next


© 1998-2018 The MESS Team