Previous 15994 Revisions Next

r12951 Wednesday 28th September, 2011 at 10:48:12 UTC by Robbbert
SITCOM - replaced video display with intelligent LED digits. Fixed a typo in the device driver.
[src/mess/drivers]sitcom.c
[src/mess/layout]sitcom.lay
[src/mess/video]dl1416.h

src/mess/video/dl1416.h
r12950r12951
5252   MCFG_DEVICE_CONFIG_DATA32(dl1416_interface, type, _type) \
5353   MCFG_DEVICE_CONFIG_DATAPTR(dl1416_interface, update, _update)
5454
55#define MCFG_DL1416B_ADD(_tag, _update_) \
55#define MCFG_DL1416B_ADD(_tag, _update) \
5656   MCFG_DL1416_ADD(_tag, DL1416B, _update)
5757
5858#define MCFG_DL1416T_ADD(_tag, _update) \
src/mess/layout/sitcom.lay
r12950r12951
44 
55   <element name="a_led">
66      <disk>
7         <color red="0.0" green="0.5" blue="0.0" />
7         <color red="0.0" green="0.75" blue="0.0" />
88      </disk>
99   </element>
1010 
11   <element name="a_digit" defstate="0">
12      <led16seg>
13         <color red="1.0" green="0.0" blue="0.0" />
14      </led16seg>
15   </element>
16 
1117   <element name="background">
1218      <rect>
1319         <bounds left="0" top="0" right="1" bottom="1" />
r12950r12951
1622   </element>
1723 
1824   <view name="Default Layout">
25      <!-- Black background -->
1926      <bezel element="background">
20         <bounds left="0" top="0" right="10" bottom="13" />
21      </bezel> -->
27         <bounds left="34" top="60" right="341" bottom="130" />
28      </bezel>
2229      <bezel name="sod_led" element="a_led">
23         <bounds left="4" right="8" top="5" bottom="9" />
30         <bounds left="46" right="56" top="90" bottom="100" />
2431      </bezel>
25      <screen index="0">
26         <bounds x="10" y="3" width="64" height="9" />
27      </screen>
32 
33      <!-- DL1414 left -->
34      <bezel name="digit3" element="a_digit">
35         <bounds left="65" top="70" right="90" bottom="120" />
36      </bezel>
37      <bezel name="digit2" element="a_digit">
38         <bounds left="99" top="70" right="124" bottom="120" />
39      </bezel>
40      <bezel name="digit1" element="a_digit">
41         <bounds left="133" top="70" right="158" bottom="120" />
42      </bezel>
43      <bezel name="digit0" element="a_digit">
44         <bounds left="167" top="70" right="192" bottom="120" />
45      </bezel>
46 
47      <!-- DL1414 right -->
48      <bezel name="digit7" element="a_digit">
49         <bounds left="204" top="70" right="229" bottom="120" />
50      </bezel>
51      <bezel name="digit6" element="a_digit">
52         <bounds left="238" top="70" right="263" bottom="120" />
53      </bezel>
54      <bezel name="digit5" element="a_digit">
55         <bounds left="272" top="70" right="297" bottom="120" />
56      </bezel>
57      <bezel name="digit4" element="a_digit">
58         <bounds left="306" top="70" right="331" bottom="120" />
59      </bezel>
60 
2861   </view>
2962 
30</mamelayout>
No newline at end of file
63</mamelayout>
src/mess/drivers/sitcom.c
r12950r12951
88    http://www.sbprojects.com/sitcom/sitcom.htm
99
1010    The display consists of a LED connected to SOD, and a pair of
11    DL1414 intelligent alphanumeric displays (not emulated).
11    DL1414 intelligent alphanumeric displays.
1212
13    The DL1414 has its own character generator rom, and control logic
14    to display 4 characters (choice of 64) on a tiny LED readout.
15
16    The DL1414 is a slightly simplified version of the DL2416.
17
18    To replace the displays, we use a small video screen of 1x8 chars.
19
2013    The idea of this device is that you write a 8085 program with an
2114    assembler on your PC. You then compile it, and then send it to
2215    the SITCOM via a serial cable. The program then (hopefully) runs
r12950r12951
3831
3932#include "emu.h"
4033#include "cpu/i8085/i8085.h"
34#include "video/dl1416.h"
4135#include "sitcom.lh"
4236
43#define VIDEO_START_MEMBER(name) void name::video_start()
44#define SCREEN_UPDATE_MEMBER(name) bool name::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
37#define MACHINE_RESET_MEMBER(name) void name::machine_reset()
4538
4639
4740class sitcom_state : public driver_device
r12950r12951
4942public:
5043   sitcom_state(const machine_config &mconfig, device_type type, const char *tag)
5144      : driver_device(mconfig, type, tag),
52   m_maincpu(*this, "maincpu")
45   m_maincpu(*this, "maincpu"),
46   m_ds0(*this, "ds0"),
47   m_ds1(*this, "ds1")
5348   { }
5449
5550   required_device<cpu_device> m_maincpu;
51   required_device<device_t> m_ds0;
52   required_device<device_t> m_ds1;
5653   DECLARE_WRITE_LINE_MEMBER(sod_led);
5754   DECLARE_READ_LINE_MEMBER(sid_line);
5855   UINT8 *m_p_chargen;
5956   UINT8 *m_p_videoram;
60   virtual void video_start();
61   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
57   virtual void machine_reset();
6258};
6359
6460static ADDRESS_MAP_START( sitcom_mem, AS_PROGRAM, 8, sitcom_state )
r12950r12951
7167   ADDRESS_MAP_UNMAP_HIGH
7268   ADDRESS_MAP_GLOBAL_MASK(0xff)
7369   // AM_RANGE(0x00, 0x1f) 8255 for expansion only
74   AM_RANGE(0xc0, 0xc3) AM_RAM AM_REGION("maincpu", 0x7004) //left display
75   AM_RANGE(0xe0, 0xe3) AM_RAM AM_REGION("maincpu", 0x7000) //right display
70   AM_RANGE(0xc0, 0xc3) AM_DEVWRITE_LEGACY("ds0", dl1416_data_w) //left display
71   AM_RANGE(0xe0, 0xe3) AM_DEVWRITE_LEGACY("ds1", dl1416_data_w) //right display
7672ADDRESS_MAP_END
7773
7874/* Input ports */
7975static INPUT_PORTS_START( sitcom )
8076INPUT_PORTS_END
8177
82VIDEO_START_MEMBER( sitcom_state )
78MACHINE_RESET_MEMBER( sitcom_state )
8379{
84   m_p_chargen = machine().region("chargen")->base();
85   m_p_videoram = machine().region("maincpu")->base()+0x7000;
80   dl1416_ce_w(m_ds0, 0); // enable
81   dl1416_wr_w(m_ds0, 0);
82   dl1416_cu_w(m_ds0, 1); // no cursor
83   dl1416_ce_w(m_ds1, 0);
84   dl1416_wr_w(m_ds1, 0);
85   dl1416_cu_w(m_ds1, 1);
8686}
8787
88SCREEN_UPDATE_MEMBER( sitcom_state )
88void sitcom_update_ds0(device_t *device, UINT8 offset, int data)
8989{
90   UINT8 ra,chr,gfx,x;
90   output_set_digit_value(offset, data);
91}
9192
92   for (ra = 0; ra < 9; ra++)
93   {
94      UINT16 *p = BITMAP_ADDR16(&bitmap, ra, 0);
95
96      for (x = 0; x < 8; x++)
97      {
98         chr = m_p_videoram[7-x];
99
100         if ((chr < 32) || (chr > 95))
101            gfx = 0;
102         else
103            gfx = m_p_chargen[(chr<<4) | ra ];
104
105         *p++ = BIT(gfx, 7);
106         *p++ = BIT(gfx, 6);
107         *p++ = BIT(gfx, 5);
108         *p++ = BIT(gfx, 4);
109         *p++ = BIT(gfx, 3);
110         *p++ = BIT(gfx, 2);
111         *p++ = BIT(gfx, 1);
112         *p++ = BIT(gfx, 0);
113      }
114   }
115   return 0;
93void sitcom_update_ds1(device_t *device, UINT8 offset, int data)
94{
95   output_set_digit_value(4 + offset, data);
11696}
11797
98
11899// SID line used as serial input from a pc
119100READ_LINE_MEMBER( sitcom_state::sid_line )
120101{
r12950r12951
142123   MCFG_CPU_CONFIG(sitcom_cpu_config)
143124
144125   /* video hardware */
145   MCFG_SCREEN_ADD("screen", RASTER)
146   MCFG_SCREEN_REFRESH_RATE(60)
147   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
148   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
149   MCFG_SCREEN_SIZE(64, 9)
150   MCFG_SCREEN_VISIBLE_AREA(0, 63, 0, 8)
151   MCFG_PALETTE_LENGTH(2)
126   MCFG_DL1416B_ADD("ds0", sitcom_update_ds0)
127   MCFG_DL1416B_ADD("ds1", sitcom_update_ds1)
152128   MCFG_DEFAULT_LAYOUT(layout_sitcom)
153129MACHINE_CONFIG_END
154130
r12950r12951
156132ROM_START( sitcom )
157133   ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF )
158134   ROM_LOAD( "boot8085.bin", 0x0000, 0x06b8, CRC(1b5e3310) SHA1(3323b65f0c10b7ab6bb75ec824e6d5fb643693a8))
159
160   // dummy chargen to replace DL1414 displays
161   ROM_REGION( 0x2000, "chargen", 0 )
162   ROM_LOAD( "c10_char.bin", 0x0000, 0x2000, CRC(cb530b6f) SHA1(95590bbb433db9c4317f535723b29516b9b9fcbf))
163135ROM_END
164136
165137/* Driver */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team