Previous 15994 Revisions Next

r9852 Thursday 30th December, 2010 at 18:28:59 UTC by Tim Schuerewegen
[HP49G+] Fixed problem with LCD.
[src/emu/machine]s3c2400.h s3c2410.h s3c2440.h s3c24xx.c
[src/mess/drivers]gizmondo.c hp49gp.c

src/emu/machine/s3c2400.h
r9851r9852
6969   write16_device_func data_w;
7070};
7171
72typedef struct _s3c2400_interface_lcd s3c2400_interface_lcd;
73struct _s3c2400_interface_lcd
74{
75   int flags;
76};
77
7278typedef struct _s3c2400_interface s3c2400_interface;
7379struct _s3c2400_interface
7480{
r9851r9852
7682   s3c2400_interface_i2c i2c;
7783   s3c2400_interface_adc adc;
7884   s3c2400_interface_i2s i2s;
85   s3c2400_interface_lcd lcd;
7986};
8087
8188/*******************************************************************************
r9851r9852
93100    MACROS & CONSTANTS
94101*******************************************************************************/
95102
103/* Interface */
104
105#define S3C24XX_INTERFACE_LCD_REVERSE 1
106
96107/* Memory Controller */
97108
98109#define S3C24XX_BASE_MEMCON 0x14000000
src/emu/machine/s3c2410.h
r9851r9852
8181   write8_device_func data_w;
8282};
8383
84typedef struct _s3c2410_interface_lcd s3c2410_interface_lcd;
85struct _s3c2410_interface_lcd
86{
87   int flags;
88};
89
8490typedef struct _s3c2410_interface s3c2410_interface;
8591struct _s3c2410_interface
8692{
r9851r9852
8995   s3c2410_interface_adc adc;
9096   s3c2410_interface_i2s i2s;
9197   s3c2410_interface_nand nand;
98   s3c2410_interface_lcd lcd;
9299};
93100
94101/*******************************************************************************
r9851r9852
112119    MACROS & CONSTANTS
113120*******************************************************************************/
114121
122/* Interface */
123
124#define S3C24XX_INTERFACE_LCD_REVERSE 1
125
115126/* Memory Controller */
116127
117128#define S3C24XX_BASE_MEMCON 0x48000000
src/emu/machine/s3c2440.h
r9851r9852
7878   write8_device_func data_w;
7979};
8080
81typedef struct _s3c2440_interface_lcd s3c2440_interface_lcd;
82struct _s3c2440_interface_lcd
83{
84   int flags;
85};
86
8187typedef struct _s3c2440_interface s3c2440_interface;
8288struct _s3c2440_interface
8389{
r9851r9852
8692   s3c2440_interface_adc adc;
8793   s3c2440_interface_i2s i2s;
8894   s3c2440_interface_nand nand;
95   s3c2440_interface_lcd lcd;
8996};
9097
9198/*******************************************************************************
r9851r9852
108115    MACROS & CONSTANTS
109116*******************************************************************************/
110117
118/* Interface */
119
120#define S3C24XX_INTERFACE_LCD_REVERSE 1
121
111122/* Memory Controller */
112123
113124#define S3C24XX_BASE_MEMCON 0x48000000
src/emu/machine/s3c24xx.c
r9851r9852
351351         vram += 2;
352352      }
353353   }
354   return (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | (data[3] << 0);
354   if (s3c24xx->iface->lcd.flags & S3C24XX_INTERFACE_LCD_REVERSE)
355   {
356      return (data[3] << 24) | (data[2] << 16) | (data[1] << 8) | (data[0] << 0);
357   }
358   else
359   {
360      return (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | (data[3] << 0);
361   }
355362}
356363
357364static UINT32 s3c24xx_lcd_dma_read_bits( running_device *device, int count)
r9851r9852
416423      UINT32 data = s3c24xx_lcd_dma_read( device);
417424      for (int j = 0; j < 32; j++)
418425      {
419         *scanline++ = s3c24xx_get_color_stn_01( device, (data >> 31) & 0x01);
420         data = data << 1;
426         if (s3c24xx->iface->lcd.flags & S3C24XX_INTERFACE_LCD_REVERSE)
427         {
428            *scanline++ = s3c24xx_get_color_stn_01( device, data & 0x01);
429            data = data >> 1;
430         }
431         else
432         {
433            *scanline++ = s3c24xx_get_color_stn_01( device, (data >> 31) & 0x01);
434            data = data << 1;
435         }
421436         s3c24xx->lcd.hpos++;
422437         if (s3c24xx->lcd.hpos >= s3c24xx->lcd.hpos_min + (s3c24xx->lcd.pagewidth_max << 4))
423438         {
src/mess/drivers/gizmondo.c
r9851r9852
177177   // ADC (data read)
178178   { NULL },
179179   // I2S (data write)
180   { NULL }
180   { NULL },
181   // NAND (command write, address write, data read, data write)
182   { NULL, NULL, NULL, NULL },
183   // LCD (flags)
184   { 0 }
181185};
182186 
183187static MACHINE_CONFIG_START( gizmondo, gizmondo_state )
src/mess/drivers/hp49gp.c
r9851r9852
281281   // I2S (data write)
282282   { NULL },
283283   // NAND (command write, address write, data read, data write)
284   { NULL, NULL, NULL, NULL }
284   { NULL, NULL, NULL, NULL },
285   // LCD (flags)
286   { S3C24XX_INTERFACE_LCD_REVERSE }
285287};
286288 
287289static MACHINE_CONFIG_START( hp49gp, hp49gp_state )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team