Previous 199869 Revisions Next

r31315 Friday 18th July, 2014 at 20:42:50 UTC by hap
correct lcdc screen layout
[src/mess/drivers]cc40.c

trunk/src/mess/drivers/cc40.c
r31314r31315
4545 
4646
4747  TODO:
48  - x
48  - HD44100 is not accessed by the CPU, is it connected to the HD44780?
49    Probably responsible for the LCD indicators, how?
4950
5051***************************************************************************/
5152
r31314r31315
7475   UINT8 m_banks;
7576   UINT8 m_clock_control;
7677   UINT8 m_key_select;
78   
79   void update_lcd_indicator(UINT8 y, UINT8 x, int state);
7780
7881   DECLARE_READ8_MEMBER(bus_control_r);
7982   DECLARE_WRITE8_MEMBER(bus_control_w);
r31314r31315
105108   palette.set_pen_color(1, rgb_t(92, 83, 88));
106109}
107110
111void cc40_state::update_lcd_indicator(UINT8 y, UINT8 x, int state)
112{
113   ;
114}
108115
116static HD44780_PIXEL_UPDATE(cc40_pixel_update)
117{
118   if (line == 1 && pos == 15)
119   {
120      // the last char is used to control lcd indicators
121      cc40_state *driver_state = device.machine().driver_data<cc40_state>();
122      driver_state->update_lcd_indicator(y, x, state);
123   }
124   else if (line < 2 && pos < 16)
125   {
126      // internal: 2*16, external: 1*31 + indicators
127      bitmap.pix16(y, line*16*6 + pos*6 + x) = state;
128   }
129}
130
131
132
109133/***************************************************************************
110134
111135  I/O, Memory Maps
r31314r31315
372396   MCFG_SCREEN_ADD("screen", LCD)
373397   MCFG_SCREEN_REFRESH_RATE(60)
374398   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
375   MCFG_SCREEN_SIZE(6*16, 9*2)
376   MCFG_SCREEN_VISIBLE_AREA(0, 6*16-1, 0, 9*2-1)
399   MCFG_SCREEN_SIZE(6*31, 9*1)
400   MCFG_SCREEN_VISIBLE_AREA(0, 6*31-1, 0, 9*1-1)
377401   MCFG_DEFAULT_LAYOUT(layout_lcd)
378402   MCFG_SCREEN_UPDATE_DEVICE("hd44780", hd44780_device, screen_update)
379403   MCFG_SCREEN_PALETTE("palette")
r31314r31315
383407
384408   MCFG_HD44780_ADD("hd44780")
385409   MCFG_HD44780_LCD_SIZE(2, 16) // internal: 2*16, external: 1*31 + indicators
410   MCFG_HD44780_PIXEL_UPDATE_CB(cc40_pixel_update)
386411
387412   /* sound hardware */
388413   MCFG_SPEAKER_STANDARD_MONO("mono")

Previous 199869 Revisions Next


© 1997-2024 The MAME Team