Previous 15994 Revisions Next

r15173 Monday 14th May, 2012 at 19:16:49 UTC by Miodrag Milanović
New driver added : HUMAX HDCI-2000 [Lukasz Markowski]
[src/emu/machine]intelfsh.c intelfsh.h
[src/mess]mess.lst mess.mak
[src/mess/drivers]cxhumax.c*
[src/mess/includes]cxhumax.h*

src/emu/machine/intelfsh.c
r15172r15173
9292const device_type INTEL_E28F008SA = &device_creator<intel_e28f008sa_device>;
9393const device_type INTEL_TE28F160 = &device_creator<intel_te28f160_device>;
9494const device_type SHARP_UNK128MBIT = &device_creator<sharp_unk128mbit_device>;
95const device_type INTEL_28F320J3D = &device_creator<intel_28f320j3d_device>;
9596
9697static ADDRESS_MAP_START( memory_map8_512Kb, AS_PROGRAM, 8, intelfsh_device )
9798   AM_RANGE(0x00000, 0x00ffff) AM_RAM
r15172r15173
122123   AM_RANGE(0x00000, 0x0fffff) AM_RAM
123124ADDRESS_MAP_END
124125
126static ADDRESS_MAP_START( memory_map16_32Mb, AS_PROGRAM, 16, intelfsh_device )
127   AM_RANGE(0x00000, 0x1fffff) AM_RAM
128ADDRESS_MAP_END
129
125130static ADDRESS_MAP_START( memory_map16_64Mb, AS_PROGRAM, 16, intelfsh_device )
126131   AM_RANGE(0x00000, 0x3fffff) AM_RAM
127132ADDRESS_MAP_END
r15172r15173
187192      m_device_id = 0xd5;
188193      map = ADDRESS_MAP_NAME( memory_map8_8Mb );
189194      break;
195   case FLASH_INTEL_28F320J3D:
196      m_bits = 16;
197      m_size = 0x400000;
198      m_maker_id = MFG_INTEL;
199      m_device_id = 0x16;
200      m_sector_is_4k = true;
201      map = ADDRESS_MAP_NAME( memory_map16_32Mb );
202      break;
190203   case FLASH_SHARP_LH28F400:
191204   case FLASH_INTEL_E28F400:
192205      m_bits = 16;
r15172r15173
315328sharp_unk128mbit_device::sharp_unk128mbit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
316329   : intelfsh16_device(mconfig, SHARP_UNK128MBIT, "Sharp Unknown 128Mbit Flash", tag, owner, clock, FLASH_SHARP_UNK128MBIT) { }
317330
331intel_28f320j3d_device::intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
332   : intelfsh16_device(mconfig, INTEL_28F320J3D, "Intel 28F320J3D Flash", tag, owner, clock, FLASH_INTEL_28F320J3D) { }
318333
319334//-------------------------------------------------
320335//  device_start - device-specific startup
r15172r15173
454469      data = m_status;
455470      break;
456471   case FM_READAMDID3:
457      if (m_maker_id == 0x04 && m_device_id == 0x35)
472      if (m_maker_id == MFG_FUJITSU && m_device_id == 0x35)
458473      {
459474         //used in Fujitsu 29DL16X 8bits mode
460475         switch (address)
r15172r15173
475490      }
476491      break;
477492   case FM_READID:
478      switch (address)
493      if (m_maker_id == MFG_INTEL && m_device_id == 0x16)
479494      {
480      case 0:   // maker ID
481         data = m_maker_id;
482         break;
483      case 1:   // chip ID
484         data = m_device_id;
485         break;
486      case 2:   // block lock config
487         data = 0; // we don't support this yet
488         break;
489      case 3: // master lock config
490         if (m_flash_master_lock)
495         switch (address)
491496         {
492            data = 1;
497            case 0:   data = m_maker_id; break;
498            case 2: data = m_device_id; break;
499            case 4: data = 0; break;
493500         }
494         else
501      }
502      else
503      {
504         switch (address)
495505         {
496            data = 0;
506         case 0:   // maker ID
507            data = m_maker_id;
508            break;
509         case 1:   // chip ID
510            data = m_device_id;
511            break;
512         case 2:   // block lock config
513            data = 0; // we don't support this yet
514            break;
515         case 3: // master lock config
516            if (m_flash_master_lock)
517            {
518               data = 1;
519            }
520            else
521            {
522               data = 0;
523            }
524            break;
497525         }
498         break;
499526      }
500527      break;
501528   case FM_ERASEAMD4:
src/emu/machine/intelfsh.h
r15172r15173
5555#define MCFG_SHARP_UNK128MBIT_ADD(_tag) \
5656   MCFG_DEVICE_ADD(_tag, SHARP_UNK128MBIT, 0)
5757
58#define MCFG_INTEL_28F320J3D_ADD(_tag) \
59   MCFG_DEVICE_ADD(_tag, INTEL_28F320J3D, 0)
5860
59
6061//**************************************************************************
6162//  TYPE DEFINITIONS
6263//**************************************************************************
r15172r15173
9091      FLASH_SHARP_LH28F400 = 0x1000,
9192      FLASH_INTEL_E28F400,
9293      FLASH_INTEL_TE28F160,
93      FLASH_SHARP_UNK128MBIT
94      FLASH_SHARP_UNK128MBIT,
95      FLASH_INTEL_28F320J3D
9496   };
9597
9698protected:
r15172r15173
122124   UINT8               m_device_id;
123125   UINT8               m_maker_id;
124126   bool               m_sector_is_4k;
125   UINT8               m_page_size;
127   UINT8                m_page_size;
126128
127129   // internal state
128130   UINT8               m_status;
r15172r15173
266268   sharp_unk128mbit_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
267269};
268270
271class intel_28f320j3d_device : public intelfsh16_device
272{
273public:
274   intel_28f320j3d_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
275};
269276
270277
271278// device type definition
r15172r15173
285292extern const device_type INTEL_E28F008SA;
286293extern const device_type INTEL_TE28F160;
287294extern const device_type SHARP_UNK128MBIT;
295extern const device_type INTEL_28F320J3D;
288296
289
290297#endif
src/mess/includes/cxhumax.h
r0r15173
1#ifndef CXHUMAX_H_
2#define CXHUMAX_H_
3
4#include "cpu/arm7/arm7.h"
5#include "cpu/arm7/arm7core.h"
6#include "machine/intelfsh.h"
7#include "machine/i2cmem.h"
8#include "machine/terminal.h"
9
10#define MAX_CX_TIMERS   16
11
12typedef struct
13{
14   UINT32 value;
15   UINT32 limit;
16   UINT32 mode;
17   UINT32 timebase;
18   emu_timer *timer;
19} cx_timer_t;
20
21typedef struct
22{
23   cx_timer_t timer[MAX_CX_TIMERS];
24   UINT32 timer_irq;
25} cx_timer_regs_t;
26
27class cxhumax_state : public driver_device
28{
29public:
30   cxhumax_state(const machine_config &mconfig, device_type type, const char *tag)
31      : driver_device(mconfig, type, tag),
32      m_maincpu(*this, "maincpu"),
33      m_flash(*this, "flash"),
34      m_ram(*this, "ram"),
35      m_terminal(*this, TERMINAL_TAG) { }
36
37   required_device<cpu_device> m_maincpu;
38   required_device<intel_28f320j3d_device> m_flash;
39   required_shared_ptr<UINT32> m_ram;
40   required_device<generic_terminal_device> m_terminal;
41
42   DECLARE_WRITE32_MEMBER ( flash_w );
43   DECLARE_READ32_MEMBER ( flash_r );
44   
45   DECLARE_WRITE32_MEMBER ( cx_hsx_w );
46   DECLARE_READ32_MEMBER ( cx_hsx_r );
47
48   DECLARE_WRITE32_MEMBER ( cx_romdescr_w );
49   DECLARE_READ32_MEMBER ( cx_romdescr_r );
50   DECLARE_WRITE32_MEMBER ( cx_isaromdescr_w );
51   DECLARE_READ32_MEMBER ( cx_isaromdescr_r );
52   DECLARE_WRITE32_MEMBER ( cx_isadescr_w );
53   DECLARE_READ32_MEMBER ( cx_isadescr_r );
54   DECLARE_WRITE32_MEMBER ( cx_rommap_w );
55   DECLARE_READ32_MEMBER ( cx_rommap_r );
56   DECLARE_WRITE32_MEMBER ( cx_rommode_w );
57   DECLARE_READ32_MEMBER ( cx_rommode_r );
58   DECLARE_WRITE32_MEMBER ( cx_xoemask_w );
59   DECLARE_READ32_MEMBER ( cx_xoemask_r );
60   DECLARE_WRITE32_MEMBER ( cx_pci_w );
61   DECLARE_READ32_MEMBER ( cx_pci_r );
62   DECLARE_WRITE32_MEMBER ( cx_extdesc_w );
63   DECLARE_READ32_MEMBER ( cx_extdesc_r );
64
65   DECLARE_WRITE32_MEMBER ( cx_remap_w );
66   DECLARE_WRITE32_MEMBER ( cx_scratch_w );
67   DECLARE_READ32_MEMBER ( cx_scratch_r );
68
69   DECLARE_WRITE32_MEMBER ( cx_timers_w );
70   DECLARE_READ32_MEMBER ( cx_timers_r );
71
72   DECLARE_WRITE32_MEMBER ( cx_uart2_w );
73   DECLARE_READ32_MEMBER ( cx_uart2_r );
74
75   DECLARE_WRITE32_MEMBER ( cx_pll_w );
76   DECLARE_READ32_MEMBER ( cx_pll_r );
77   DECLARE_WRITE32_MEMBER ( cx_clkdiv_w );
78   DECLARE_READ32_MEMBER ( cx_clkdiv_r );
79   DECLARE_WRITE32_MEMBER ( cx_pllprescale_w );
80   DECLARE_READ32_MEMBER ( cx_pllprescale_r );
81
82   DECLARE_WRITE32_MEMBER ( cx_chipcontrol_w );
83   DECLARE_READ32_MEMBER ( cx_chipcontrol_r );
84
85   DECLARE_WRITE32_MEMBER ( cx_intctrl_w );
86   DECLARE_READ32_MEMBER ( cx_intctrl_r );
87
88   DECLARE_WRITE32_MEMBER ( cx_ss_w );
89   DECLARE_READ32_MEMBER ( cx_ss_r );
90   
91   DECLARE_WRITE32_MEMBER ( cx_i2c0_w );
92   DECLARE_READ32_MEMBER ( cx_i2c0_r );
93   DECLARE_WRITE32_MEMBER ( cx_i2c1_w );
94   DECLARE_READ32_MEMBER ( cx_i2c1_r );
95   DECLARE_WRITE32_MEMBER ( cx_i2c2_w );
96   DECLARE_READ32_MEMBER ( cx_i2c2_r );
97   
98   DECLARE_WRITE32_MEMBER ( cx_mc_cfg_w );
99   DECLARE_READ32_MEMBER ( cx_mc_cfg_r );
100   
101   DECLARE_WRITE32_MEMBER ( cx_drm0_w );
102   DECLARE_READ32_MEMBER ( cx_drm0_r );
103   DECLARE_WRITE32_MEMBER ( cx_drm1_w );
104   DECLARE_READ32_MEMBER ( cx_drm1_r );
105   
106   DECLARE_WRITE32_MEMBER ( cx_hdmi_w );
107   DECLARE_READ32_MEMBER ( cx_hdmi_r );
108   
109   DECLARE_WRITE32_MEMBER ( cx_gxa_w );
110   DECLARE_READ32_MEMBER ( cx_gxa_r );
111
112   DECLARE_READ32_MEMBER ( dummy_flash_r );
113   
114   UINT32 m_romdescr_reg;
115   UINT32 m_isaromdescr_regs[0x0C/4];
116   UINT32 m_isadescr_regs[0x10/4];
117   UINT32 m_rommode_reg;
118   UINT32 m_xoemask_reg;
119   UINT32 m_pci_regs[0x08/4];
120   UINT32 m_extdesc_regs[0x80/4];
121
122   UINT32 m_scratch_reg;
123   cx_timer_regs_t m_timer_regs;
124
125   UINT32 m_uart2_regs[0x30/4];
126
127   UINT32 m_pll_regs[0x14/4];
128   UINT32 m_clkdiv_regs[0x18/4];
129   UINT32 m_pllprescale_reg;
130
131   UINT32 m_intctrl_regs[0x38/4];
132   
133   UINT32 m_ss_regs[0x18/4];
134   UINT8 m_ss_tx_fifo[8];            // 8 entries (size hardcoded to 8 bits per entry - TODO)
135
136   UINT32 m_i2c0_regs[0x20/4];
137   UINT32 m_i2c1_regs[0x20/4];
138   device_t *m_i2cmem;
139   UINT32 m_i2c2_regs[0x20/4];
140
141   UINT32 m_mccfg_regs[0x0C/4];
142
143   UINT32 m_chipcontrol_regs[0x74/4];
144   
145   UINT32 m_drm0_regs[0xfc/4];
146   UINT32 m_drm1_regs[0xfc/4];
147   
148   UINT32 m_hdmi_regs[0x400/4];
149   
150   UINT32 m_gxa_cmd_regs[0x130/4];
151};
152
153#define INTDEST         0   // Interrupt destination (1=IRQ, 0=FIQ)
154#define INTENABLE      1   // Enables the interrupt generation
155#define INTIRQ         2   // Normal interrupt
156#define INTFIQ         3   // Fast interrupt
157#define INTSTATCLR      4   // Read: interrupt status, Write: clear pending interrupt
158#define INTSTATSET      5   // Read: interrupt status, Write: sets a pending interrupt
159#define INTGROUP1      0
160#define INTGROUP2      1
161
162#define INTREG(group, index)   (((group) << 3) | (index))
163
164#define GXA_CMD_RW_REGISTER            0x00
165#define GXA_CMD_QMARK               0x02
166#define GXA_CMD_PALETTE_FETCH         0x03
167#define GXA_CMD_VFILTER_COEFF_FETCH      0x04
168#define GXA_CMD_HFILTER_COEFF_FETCH      0x05
169#define GXA_CMD_BLT_21               0x21
170#define GXA_CMD_BLT_23               0x23
171#define GXA_CMD_BLT_25               0x25
172#define GXA_CMD_BLT_27               0x27
173#define GXA_CMD_BLT_2B               0x2b
174#define GXA_CMD_BLT_2F               0x2f
175#define GXA_CMD_LINE_30               0x30
176#define GXA_CMD_LINE_32               0x32
177#define GXA_CMD_BLT_31               0x31
178#define GXA_CMD_BLT                  0x33
179#define GXA_CMD_LINE_34               0x34
180#define GXA_CMD_LINE_36               0x36
181#define GXA_CMD_BLT_35               0x35
182#define GXA_CMD_BLT_37               0x37
183#define GXA_CMD_LINE_3A               0x3a
184#define GXA_CMD_BLT_3B               0x3b
185#define GXA_CMD_LINE_3E               0x3e
186#define GXA_CMD_BLT_3F               0x3f
187#define GXA_CMD_SBLT_ABLEND            0x71
188#define GXA_CMD_SBLT_ROP            0x7b
189
190#define GXA_CMD_REG                  0x07
191
192#define GXA_CFG2_REG               0x3f
193#define IRQ_STAT_QMARK               21
194#define IRQ_EN_QMARK               17
195
196#define INT_UART2_BIT               (1<<1)
197#define INT_TIMER_BIT               (1<<7)
198#define INT_PWM_BIT                  (1 << 14)
199#define INT_PIO103_BIT               (1 << 15)
200
201#define PCI_CFG_ADDR_REG            0
202#define PCI_CFG_DATA_REG            1
203
204#define TIMER_VALUE                  0
205#define TIMER_LIMIT                  1
206#define TIMER_MODE                  2
207#define TIMER_TIMEBASE               3
208
209#define UART_FIFO_REG               0
210#define UART_IRQE_REG               1
211#define UART_IRQE_TIDE_BIT            (1<<6)
212#define UART_BRDL_REG               0
213#define UART_BRDU_REG               1
214#define UART_FIFC_REG               2
215#define UART_FRMC_REG               3
216#define UART_FRMC_BDS_BIT            (1<<7)
217#define UART_STAT_REG               5
218#define UART_STAT_TSR_BIT            (1<<5)
219#define UART_STAT_TID_BIT            (1<<6)
220
221#define SREG_MPG_0_INTFRAC_REG         0
222#define SREG_MPG_1_INTFRAC_REG         1
223#define SREG_ARM_INTFRAC_REG         2
224#define SREG_MEM_INTFRAC_REG         3
225#define SREG_USB_INTFRAC_REG         4
226
227#define SREG_DIV_0_REG               0
228#define SREG_DIV_1_REG               1
229#define SREG_DIV_2_REG               2
230#define SREG_DIV_3_REG               3
231#define SREG_DIV_4_REG               4
232#define SREG_DIV_5_REG               5
233
234#define PIN_CONFIG_0_REG            0   // Pin Configuration 0 Register
235#define SREG_MODE_REG               3   // SREG Mode Register
236#define PIN_ALT_FUNC_REG            4   // Alternate Pin Function Select Register
237#define PLL_LOCK_STAT_0_REG            9   // Resource Lock Register
238#define PLL_IO_CTL_REG               20   // IO Control Register
239#define SREG_TEST_REG               28   // Test Register
240
241#define I2C_MODE_REG               0
242#define I2C_CTRL_REG               1
243#define I2C_STAT_REG               2
244#define I2C_RDATA_REG               3
245
246#define I2C_WACK_BIT               (1<<1)
247#define I2C_INT_BIT                  (1<<0)
248
249#define SS_CNTL_REG                  0
250#define SS_FIFC_REG                  1
251#define SS_BAUD_REG                  2
252#define SS_FIFO_REG                  4
253#define SS_STAT_REG                  5
254
255#define MC_CFG0                     0
256#define MC_CFG1                   1
257#define MC_CFG2                   2
258
259#define DRM_ACTIVE_X_REG            1
260#define DRM_ACTIVE_Y_REG            2
261#define DRM_BCKGND_REG               3
262#define DRM_OSD_PTR_REG               32
263
264#endif /* CXHUMAX_H_ */
src/mess/mess.lst
r15172r15173
21152115cortex
21162116test410
21172117test420
2118hxhdci2k
src/mess/drivers/cxhumax.c
r0r15173
1/***************************************************************************
2   HUMAX HDCI-2000 ( Conexant CX2417x )
3   
4   http://www.humaxdigital.com/global/products/product_stb_satellite_hdci2000.asp
5   
6   Running on Nucleus PLUS - ARM7TDMI ADS v. 1.14
7   some Conexant/Nucleus goodies may be found at http://code.google.com/p/cherices/
8   
9   runs up to frame 280 or so...
10   
11****************************************************************************/
12
13#include "emu.h"
14#include "includes/cxhumax.h"
15
16#define VERBOSE_LEVEL ( 0 )
17
18INLINE void ATTR_PRINTF(3,4) verboselog( running_machine &machine, int n_level, const char *s_fmt, ...)
19{
20   if (VERBOSE_LEVEL >= n_level)
21   {
22      va_list v;
23      char buf[32768];
24      va_start( v, s_fmt);
25      vsprintf( buf, s_fmt, v);
26      va_end( v);
27      logerror( "%s: %s", machine.describe_context( ), buf);
28   }
29}
30
31READ32_MEMBER ( cxhumax_state::cx_gxa_r )
32{
33   UINT32 res = m_gxa_cmd_regs[offset];
34   verboselog( machine(), 9, "(GXA) %08X -> %08X\n", 0xE0600000 + (offset << 2), res);
35/*   UINT8 gxa_command_number = (offset >> 9) & 0x7F;
36   verboselog( machine(), 9, "      Command: %08X\n", gxa_command_number);
37   switch (gxa_command_number) {
38      case GXA_CMD_RW_REGISTER:
39         switch(offset) {
40            case GXA_CFG2_REG:
41               break;
42            default:
43               verboselog( machine(), 9, "      Unimplemented register - TODO?\n");
44               break;
45         }
46         break;
47      default:
48         // do we need it?
49         verboselog( machine(), 9, "      Unimplemented read command - TODO?\n");
50         break;
51   }*/
52   return res;
53}
54
55WRITE32_MEMBER( cxhumax_state::cx_gxa_w )
56{
57   verboselog( machine(), 9, "(GXA) %08X <- %08X\n", 0xE0600000 + (offset << 2), data);
58   UINT8 gxa_command_number = (offset >> 9) & 0x7F;
59   verboselog( machine(), 9, "      Command: %08X\n", gxa_command_number);
60
61   /* Clear non persistent data */
62   m_gxa_cmd_regs[GXA_CMD_REG] &= 0xfffc0000;
63
64   if (gxa_command_number == GXA_CMD_RW_REGISTER) {
65      verboselog( machine(), 9, "      Register Number: %08X\n", offset & 0xff);
66   } else {
67      m_gxa_cmd_regs[GXA_CMD_REG] |= (offset << 2) & 0x3ffff;
68      verboselog( machine(), 9, "      Source Bitmap Selector: %08X\n", (offset >> 6) & 0x7);
69      verboselog( machine(), 9, "      Destination Bitmap Selector: %08X\n", (offset >> 3) & 0x7);
70      verboselog( machine(), 9, "      Parameter Count: %08X\n", offset & 0x7);
71   }
72   switch (gxa_command_number) {
73      case GXA_CMD_RW_REGISTER:
74         switch(offset) {
75            case GXA_CFG2_REG:
76               // clear IRQ_STAT bits if requested
77               m_gxa_cmd_regs[GXA_CFG2_REG] = (m_gxa_cmd_regs[GXA_CFG2_REG]&(0xfff00000 & ~(data&0x00300000))) | (data & 0x000fffff);
78               break;
79            default:
80               verboselog( machine(), 9, "      Unimplemented register - TODO?\n");
81               COMBINE_DATA(&m_gxa_cmd_regs[offset]);
82               break;
83         }
84         break;
85      case GXA_CMD_QMARK:
86         verboselog( machine(), 9, "      QMARK - TODO?\n");
87
88         /* Set value and copy of WAIT4_VERTICAL bit written by QMARK */
89         m_gxa_cmd_regs[GXA_CMD_REG] = (m_gxa_cmd_regs[GXA_CMD_REG] & 0x3ffff) | (data<<24) | ((data&0x10)?1<<23:0);
90
91         /* QMARK command has completed */
92         m_gxa_cmd_regs[GXA_CFG2_REG] |= (1<<IRQ_STAT_QMARK);           
93
94         // Interrupt
95         if (m_gxa_cmd_regs[GXA_CFG2_REG] & (1<<IRQ_EN_QMARK)) {
96            m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] |= 1<<18;
97            m_intctrl_regs[INTREG(INTGROUP2, INTSTATCLR)] |= 1<<18;
98            m_intctrl_regs[INTREG(INTGROUP2, INTSTATSET)] |= 1<<18;
99            verboselog( machine(), 9, "      QMARK INT - TODO?\n");
100         }
101
102         if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)])
103            || (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]))
104               device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
105
106         break;
107      default:
108         verboselog( machine(), 9, "      Unimplemented command - TODO?\n");
109         break;
110   }
111}
112
113WRITE32_MEMBER ( cxhumax_state::flash_w )
114{
115   offset *= 2;
116   if(ACCESSING_BITS_0_15)
117      m_flash->write(offset, data);
118   if(ACCESSING_BITS_16_31)
119       m_flash->write(offset+1, data >> 16);
120   verboselog( machine(), 9, "(FLASH) %08X <- %08X\n", 0xF0000000 + (offset << 2), data);
121}
122
123READ32_MEMBER ( cxhumax_state::flash_r )
124{
125   UINT32 res = 0;
126   offset *= 2;
127   if(ACCESSING_BITS_0_15)
128      res |= m_flash->read(offset);
129   if(ACCESSING_BITS_16_31)
130      res |= m_flash->read(offset+1) << 16;
131   //if(m_flash->m_flash_mode!=FM_NORMAL) verboselog( machine(), 9, "(FLASH) %08X -> %08X\n", 0xF0000000 + (offset << 2), res);
132   return res;
133}
134
135READ32_MEMBER ( cxhumax_state::dummy_flash_r )
136{
137   return 0xFFFFFFFF;
138}
139
140WRITE32_MEMBER ( cxhumax_state::cx_remap_w )
141{
142   if(!(data&1)) {
143      verboselog( machine(), 9, "(REMAP) %08X -> %08X\n", 0xE0400014 + (offset << 2), data);
144      memset(m_ram, 0, 0x400000); // workaround :P
145   }
146}
147
148READ32_MEMBER( cxhumax_state::cx_scratch_r )
149{
150   UINT32 data = m_scratch_reg;
151   verboselog( machine(), 9, "(SCRATCH) %08X -> %08X\n", 0xE0400024 + (offset << 2), data);
152   
153   if((cpu_get_pc(m_maincpu)==0xF0003BB8) || (cpu_get_pc(m_maincpu)==0x01003724) || (cpu_get_pc(m_maincpu)==0x00005d8c)) { // HDCI-2000
154      //we're in disabled debug_printf
155      unsigned char* buf = (unsigned char *)alloca(200);
156      unsigned char temp;
157      address_space *program = m_maincpu->memory().space(AS_PROGRAM);
158
159      memset(buf,0,200);
160     
161      int i = 0;
162      while ((temp=program->read_byte(cpu_get_reg(m_maincpu, ARM7_R0)+i))) {
163         buf[i++]=temp;
164         //m_terminal->write(space, 0, temp);
165      }
166      mame_printf_debug("%s", buf);
167      verboselog( machine(), 9, "(DEBUG) %s", buf);
168   }
169   return data;
170}
171
172WRITE32_MEMBER( cxhumax_state::cx_scratch_w )
173{
174   verboselog( machine(), 9, "(SCRATCH) %08X <- %08X\n", 0xE0400024 + (offset << 2), data);
175   COMBINE_DATA(&m_scratch_reg);
176}
177
178READ32_MEMBER( cxhumax_state::cx_hsx_r )
179{
180   UINT32 data = 0; // dummy
181   verboselog( machine(), 9, "(HSX) %08X -> %08X\n", 0xE0000000 + (offset << 2), data);
182   return data;
183}
184
185WRITE32_MEMBER( cxhumax_state::cx_hsx_w )
186{
187   verboselog( machine(), 9, "(HSX) %08X <- %08X\n", 0xE0000000 + (offset << 2), data);
188}
189
190READ32_MEMBER( cxhumax_state::cx_romdescr_r )
191{
192   UINT32 data = m_romdescr_reg;
193   verboselog( machine(), 9, "(ROMDESC0) %08X -> %08X\n", 0xE0010000 + (offset << 2), data);
194   return data;
195}
196
197WRITE32_MEMBER( cxhumax_state::cx_romdescr_w )
198{
199   verboselog( machine(), 9, "(ROMDESC0) %08X <- %08X\n", 0xE0010000 + (offset << 2), data);
200   COMBINE_DATA(&m_romdescr_reg);
201}
202
203READ32_MEMBER( cxhumax_state::cx_isaromdescr_r )
204{
205   UINT32 data = m_isaromdescr_regs[offset];
206   verboselog( machine(), 9, "(ISAROMDESC%d) %08X -> %08X\n", offset+1, 0xE0010004 + (offset << 2), data);
207   return data;
208}
209
210WRITE32_MEMBER( cxhumax_state::cx_isaromdescr_w )
211{
212   verboselog( machine(), 9, "(ISAROMDESC%d) %08X <- %08X\n", offset+1, 0xE0010004 + (offset << 2), data);
213   COMBINE_DATA(&m_isaromdescr_regs[offset]);
214}
215
216READ32_MEMBER( cxhumax_state::cx_isadescr_r )
217{
218   UINT32 data = m_isaromdescr_regs[offset];
219   verboselog( machine(), 9, "(ISA_DESC%d) %08X -> %08X\n", offset+4, 0xE0010010 + (offset << 2), data);
220   return data;
221}
222
223WRITE32_MEMBER( cxhumax_state::cx_isadescr_w )
224{
225   verboselog( machine(), 9, "(ISA_DESC%d) %08X <- %08X\n", offset+4, 0xE0010010 + (offset << 2), data);
226   COMBINE_DATA(&m_isaromdescr_regs[offset]);
227}
228
229READ32_MEMBER( cxhumax_state::cx_rommap_r )
230{
231   UINT32 data = 0;
232   verboselog( machine(), 9, "(ROM%d_MAP) %08X -> %08X\n", offset, 0xE0010020 + (offset << 2), data);
233   return data;
234}
235
236WRITE32_MEMBER( cxhumax_state::cx_rommap_w )
237{
238   verboselog( machine(), 9, "(ROM%d_MAP) %08X <- %08X\n", offset, 0xE0010020 + (offset << 2), data);
239}
240
241READ32_MEMBER( cxhumax_state::cx_rommode_r )
242{
243   UINT32 data = m_rommode_reg;
244   verboselog( machine(), 9, "(ROMMODE) %08X -> %08X\n", 0xE0010034 + (offset << 2), data);
245   return data;
246}
247
248WRITE32_MEMBER( cxhumax_state::cx_rommode_w )
249{
250   verboselog( machine(), 9, "(ROMMODE) %08X <- %08X\n", 0xE0010034 + (offset << 2), data);
251   COMBINE_DATA(&m_rommode_reg);
252}
253
254READ32_MEMBER( cxhumax_state::cx_xoemask_r )
255{
256   UINT32 data = m_xoemask_reg;
257   verboselog( machine(), 9, "(XOEMASK) %08X -> %08X\n", 0xE0010034 + (offset << 2), data);
258   return data;
259}
260
261WRITE32_MEMBER( cxhumax_state::cx_xoemask_w )
262{
263   verboselog( machine(), 9, "(XOEMASK) %08X <- %08X\n", 0xE0010034 + (offset << 2), data);
264   COMBINE_DATA(&m_xoemask_reg);
265}
266
267READ32_MEMBER( cxhumax_state::cx_pci_r )
268{
269   UINT32 data = 0;
270   switch (offset) {
271      case PCI_CFG_ADDR_REG:
272         data = m_pci_regs[offset]; break;
273      case PCI_CFG_DATA_REG:
274         {
275            switch (m_pci_regs[PCI_CFG_ADDR_REG]) {
276               case 0: data = (0x4170<<16) /*Device ID*/ | 0x14f1 /* Vendor ID */; break;
277               case 8: data = (0x060000 << 8) /* Class Code */ | 0x1f /* Revision ID */; break;
278            }
279         } break;
280   }
281   verboselog( machine(), 9, "(PCI) %08X -> %08X\n", 0xE0010040 + (offset << 2), data);
282   return data;
283}
284
285WRITE32_MEMBER( cxhumax_state::cx_pci_w )
286{
287   verboselog( machine(), 9, "(PCI) %08X <- %08X\n", 0xE0010040 + (offset << 2), data);
288   COMBINE_DATA(&m_pci_regs[offset]);
289}
290
291READ32_MEMBER( cxhumax_state::cx_extdesc_r )
292{
293   UINT32 data = m_extdesc_regs[offset];
294   verboselog( machine(), 9, "(EXTDESC) %08X -> %08X\n", 0xE0010080 + (offset << 2), data);
295   return data;
296}
297
298WRITE32_MEMBER( cxhumax_state::cx_extdesc_w )
299{
300   verboselog( machine(), 9, "(EXTDESC) %08X <- %08X\n", 0xE0010080 + (offset << 2), data);
301   COMBINE_DATA(&m_extdesc_regs[offset]);
302}
303
304static TIMER_CALLBACK( timer_tick )
305{
306   cxhumax_state *state = machine.driver_data<cxhumax_state>();
307   state->m_timer_regs.timer[param].value++;
308   if(state->m_timer_regs.timer[param].value==state->m_timer_regs.timer[param].limit) {
309      /* Reset counter when reaching limit and RESET_CNTR bit is cleared */
310      if(!(state->m_timer_regs.timer[param].mode & 2))
311         state->m_timer_regs.timer[param].value=0;
312
313      /* Indicate interrupt request if EN_INT bit is set */
314      if (state->m_timer_regs.timer[param].mode & 8) {
315         //printf( "IRQ on Timer %d\n", param );
316         verboselog( machine, 9, "(TIMER%d) Interrupt\n", param);
317         state->m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] |= INT_TIMER_BIT;     /* Timer interrupt */
318         state->m_intctrl_regs[INTREG(INTGROUP2, INTSTATCLR)] |= INT_TIMER_BIT; /* Timer interrupt */
319         state->m_intctrl_regs[INTREG(INTGROUP2, INTSTATSET)] |= INT_TIMER_BIT; /* Timer interrupt */
320
321         state->m_timer_regs.timer_irq |= 1<<param; /* Indicate which timer interrupted */
322
323         /* Interrupt if Timer interrupt is not masked in ITC_INTENABLE_REG */
324         if (state->m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)] & INT_TIMER_BIT)
325            device_set_input_line(machine.device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
326      }
327   }
328   attotime period = attotime::from_hz(XTAL_54MHz)*state->m_timer_regs.timer[param].timebase;
329   state->m_timer_regs.timer[param].timer->adjust(period,param);
330}
331
332READ32_MEMBER( cxhumax_state::cx_timers_r )
333{
334   UINT32 data = 0;
335   UINT8 index = offset>>2;
336   if(index==16) {
337      data = m_timer_regs.timer_irq;
338      //m_timer_regs.timer_irq=0;
339      verboselog( machine(), 9, "(TIMERIRQ) %08X -> %08X\n", 0xE0430000 + (offset << 2), data);
340   }
341   else {
342      switch (offset&3) {
343         case TIMER_VALUE:
344            data = m_timer_regs.timer[index].value; break;
345         case TIMER_LIMIT:
346            data = m_timer_regs.timer[index].limit; break;
347         case TIMER_MODE:
348            data = m_timer_regs.timer[index].mode; break;
349         case TIMER_TIMEBASE:
350            data = m_timer_regs.timer[index].timebase; break;
351      }
352      verboselog( machine(), 9, "(TIMER%d) %08X -> %08X\n", offset>>2, 0xE0430000 + (offset << 2), data);
353   }
354   return data;
355}
356
357WRITE32_MEMBER( cxhumax_state::cx_timers_w )
358{
359   UINT8 index = offset>>2;
360   if(index==16) {
361      verboselog( machine(), 9, "(TIMERIRQ) %08X <- %08X\n", 0xE0430000 + (offset << 2), data);
362      COMBINE_DATA(&m_timer_regs.timer_irq);
363   }
364   else {
365      verboselog( machine(), 9, "(TIMER%d) %08X <- %08X\n", index, 0xE0430000 + (offset << 2), data);
366      switch(offset&3) {
367         case TIMER_VALUE:
368            COMBINE_DATA(&m_timer_regs.timer[index].value); break;
369         case TIMER_LIMIT:
370            COMBINE_DATA(&m_timer_regs.timer[index].limit); break;
371         case TIMER_MODE:
372            COMBINE_DATA(&m_timer_regs.timer[index].mode);
373            if(data&1) {
374               attotime period = attotime::from_hz(XTAL_54MHz)*m_timer_regs.timer[index].timebase;
375               m_timer_regs.timer[index].timer->adjust(period,index);
376            } else {
377               m_timer_regs.timer[index].timer->adjust(attotime::never,index);
378            } break;
379         case TIMER_TIMEBASE:
380            COMBINE_DATA(&m_timer_regs.timer[index].timebase); break;
381      }
382      /* A timer will hold an interrupt active until any one of that timer’s registers is written. */
383      if(m_timer_regs.timer_irq & (1<<index)) {
384         m_timer_regs.timer_irq &= ~(1<<index);
385      }
386   }
387}
388
389READ32_MEMBER( cxhumax_state::cx_uart2_r )
390{
391   UINT32 data;
392   switch (offset) {
393      case UART_STAT_REG:
394         /* Transmitter Idle */
395         data = UART_STAT_TID_BIT | UART_STAT_TSR_BIT; break;
396      default:
397         data = m_uart2_regs[offset]; break;
398   }
399   verboselog( machine(), 9, "(UART2) %08X -> %08X\n", 0xE0411000 + (offset << 2), data);
400   return data;
401}
402
403WRITE32_MEMBER( cxhumax_state::cx_uart2_w )
404{
405   verboselog( machine(), 9, "(UART2) %08X <- %08X\n", 0xE0411000 + (offset << 2), data);
406   switch (offset) {
407      case UART_FIFO_REG:
408         if(!(m_uart2_regs[UART_FRMC_REG]&UART_FRMC_BDS_BIT)) {
409            /* Sending byte... add logging */
410            m_terminal->write(space, 0, data);
411           
412            /* Transmitter Idle Interrupt Enable */
413            if(m_uart2_regs[UART_IRQE_REG]&UART_IRQE_TIDE_BIT) {
414               /* Signal pending INT */
415               m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] |= INT_UART2_BIT;
416               m_intctrl_regs[INTREG(INTGROUP1, INTSTATCLR)] |= INT_UART2_BIT;
417               m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] |= INT_UART2_BIT;
418               
419               /* If INT is enabled at INT Ctrl raise it */
420               if(m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]&INT_UART2_BIT) {
421                  device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
422               }
423            }
424         }
425      default:
426         COMBINE_DATA(&m_uart2_regs[offset]); break;
427   }
428}
429
430READ32_MEMBER( cxhumax_state::cx_pll_r )
431{
432   UINT32 data = m_pll_regs[offset];
433   verboselog( machine(), 9, "(PLL) %08X -> %08X\n", 0xE0440000 + (offset << 2), data);
434   return data;
435}
436
437WRITE32_MEMBER( cxhumax_state::cx_pll_w )
438{
439   verboselog( machine(), 9, "(PLL) %08X <- %08X\n", 0xE0440000 + (offset << 2), data);
440   COMBINE_DATA(&m_pll_regs[offset]);
441}
442
443READ32_MEMBER( cxhumax_state::cx_pllprescale_r )
444{
445   UINT32 data = m_pllprescale_reg;
446   verboselog( machine(), 9, "(PLLPRESCALE) %08X -> %08X\n", 0xE0440094 + (offset << 2), data);
447   return data;
448}
449
450WRITE32_MEMBER( cxhumax_state::cx_pllprescale_w )
451{
452   verboselog( machine(), 9, "(PLLPRESCALE) %08X <- %08X\n", 0xE0440094 + (offset << 2), data);
453   COMBINE_DATA(&m_pllprescale_reg);
454}
455
456READ32_MEMBER( cxhumax_state::cx_clkdiv_r )
457{
458   UINT32 data = m_clkdiv_regs[offset];
459   verboselog( machine(), 9, "(CLKDIV) %08X -> %08X\n", 0xE0440020 + (offset << 2), data);
460   return data;
461}
462
463WRITE32_MEMBER( cxhumax_state::cx_clkdiv_w )
464{
465   verboselog( machine(), 9, "(CLKDIV) %08X <- %08X\n", 0xE0440020 + (offset << 2), data);
466   COMBINE_DATA(&m_clkdiv_regs[offset]);
467}
468
469READ32_MEMBER( cxhumax_state::cx_chipcontrol_r )
470{
471   UINT32 data = m_chipcontrol_regs[offset];
472   verboselog( machine(), 9, "(CHIPCONTROL) %08X -> %08X\n", 0xE0440100 + (offset << 2), data);
473   return data;
474}
475
476WRITE32_MEMBER( cxhumax_state::cx_chipcontrol_w )
477{
478   verboselog( machine(), 9, "(CHIPCONTROL) %08X <- %08X\n", 0xE0440100 + (offset << 2), data);
479   COMBINE_DATA(&m_chipcontrol_regs[offset]);
480}
481
482READ32_MEMBER( cxhumax_state::cx_intctrl_r )
483{
484   UINT32 data = m_intctrl_regs[offset];
485   verboselog( machine(), 9, "(INTCTRL) %08X -> %08X\n", 0xE0450000 + (offset << 2), data);
486   return data;
487}
488
489WRITE32_MEMBER( cxhumax_state::cx_intctrl_w )
490{
491   verboselog( machine(), 9, "(INTCTRL) %08X <- %08X\n", 0xE0450000 + (offset << 2), data);
492   switch (offset >> 3) { // Decode the group
493      case 0: // Group 1
494         switch(offset & 7) {
495            case INTSTATCLR:   // ITC_INTSTATCLR_REG Group 1
496               /*
497                  Bits 15 (PWM), 14 (PIO103) of Group 1 are the logical OR of their lower level interrupt
498                  status bits down within the interrupting module and are not registered.
499                 
500                  The source registers must be cleared to clear these interrupt bits.
501               */
502               data &= ~(INT_PWM_BIT|INT_PIO103_BIT);
503               
504               m_intctrl_regs[INTREG(INTGROUP1, INTSTATCLR)] &= ~data;
505               m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] &= ~data;
506               m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] &= ~data;
507               break;
508            default:
509               COMBINE_DATA(&m_intctrl_regs[offset]);
510               break;
511         }
512         break;
513      case 1: // Group 2
514         switch(offset & 7) {
515            case INTSTATCLR:   // ITC_INTSTATCLR_REG Group 2
516               /*
517                  The timer interrupt service routine must write to one of the timer
518                  registers before clearing the corresponding Interrupt Controller ISR timer
519                  interrupt bit.
520                 
521                  Bit 7 (Timers) of Group 2 is the logical OR of its lower level interrupt
522                  status bits down within the interrupting module and are not registered.
523                 
524                  The source registers must be cleared to clear these interrupt bits.
525               */
526               if(m_timer_regs.timer_irq) data &= ~INT_TIMER_BIT;
527               
528               m_intctrl_regs[INTREG(INTGROUP2, INTSTATCLR)] &= ~data;
529               m_intctrl_regs[INTREG(INTGROUP2, INTSTATSET)] &= ~data;
530               m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] &= ~data;
531               break;
532            default:
533               COMBINE_DATA(&m_intctrl_regs[offset]);
534               break;
535         }
536         break;
537      default:
538         break;
539   }
540   
541   if(m_i2c1_regs[I2C_STAT_REG]&I2C_INT_BIT)
542   {
543      m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] |= 1<<7;
544      m_intctrl_regs[INTREG(INTGROUP1, INTSTATCLR)] |= 1<<7;
545      m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] |= 1<<7;
546   }
547
548   /* check if */
549   if((m_intctrl_regs[INTREG(INTGROUP2, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP2, INTENABLE)])
550      || (m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] & m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)]))
551      device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
552   else
553      device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, CLEAR_LINE);
554   
555}
556
557READ32_MEMBER( cxhumax_state::cx_ss_r )
558{
559   UINT32 data = 0;
560   switch(offset) {
561      case SS_FIFC_REG:
562         data = m_ss_regs[offset] & 0xFFF0;
563         break;
564      default:
565         data = m_ss_regs[offset];
566         break;
567   }
568   verboselog( machine(), 9, "(SS) %08X -> %08X\n", 0xE0490000 + (offset << 2), data);
569   return data;
570}
571
572WRITE32_MEMBER( cxhumax_state::cx_ss_w )
573{
574   verboselog( machine(), 9, "(SS) %08X <- %08X\n", 0xE0490000 + (offset << 2), data);
575   switch(offset) {
576      case SS_CNTL_REG:
577         if (data&1) {
578            // "Send" pending data
579            UINT8 tfd = (m_ss_regs[SS_STAT_REG]>>4) & 0xF;
580            if ((tfd>1) && (m_ss_tx_fifo[0] == 0) && (m_ss_tx_fifo[1] != 0xFF)) {
581               // ASCII
582               printf("%s\n", &m_ss_tx_fifo[1]);
583            } else {
584               // UNKNOWN
585               for (int i=0; i<tfd; i++) {
586                  printf("%02X ", m_ss_tx_fifo[i]);
587               }
588               printf("\n");
589            }
590            // Clear TX FIFO
591            memset(m_ss_tx_fifo,0,sizeof(m_ss_tx_fifo));
592            m_ss_regs[SS_STAT_REG] &= 0xFF0F;
593         }
594         COMBINE_DATA(&m_ss_regs[offset]);
595         break;
596      case SS_FIFO_REG:
597         {
598            // Push data into TX FIFO (if it's not full) and adjust transmit FIFO depth
599            UINT8 tfd = (m_ss_regs[SS_STAT_REG]>>4) & 0xF;
600            if (tfd<8) {
601               m_ss_tx_fifo[tfd++] = data;
602               m_ss_regs[SS_STAT_REG] = (m_ss_regs[SS_STAT_REG] & 0xFF0F) | (tfd<<4);
603            }
604         }
605         break;
606      case SS_STAT_REG:
607         // read-only
608         break;
609      default:
610         COMBINE_DATA(&m_ss_regs[offset]);
611         break;
612   };
613}
614
615READ32_MEMBER( cxhumax_state::cx_i2c0_r )
616{
617   UINT32 data = m_i2c0_regs[offset];
618   verboselog( machine(), 9, "(I2C0) %08X -> %08X\n", 0xE04E0000 + (offset << 2), data);
619   return data;
620}
621
622WRITE32_MEMBER( cxhumax_state::cx_i2c0_w )
623{
624   verboselog( machine(), 9, "(I2C0) %08X <- %08X\n", 0xE04E0000 + (offset << 2), data);
625   COMBINE_DATA(&m_i2c0_regs[offset]);
626}
627
628static UINT8 i2cmem_read_byte( device_t *machine, int last)
629{
630   UINT8 data = 0;
631   int i;
632   i2cmem_sda_write(machine, 1);
633   for (i = 0; i < 8; i++)
634   {
635      i2cmem_scl_write(machine, 1);
636      data = (data << 1) + (i2cmem_sda_read( machine ) ? 1 : 0);
637      i2cmem_scl_write(machine, 0);
638   }
639   i2cmem_sda_write(machine, last);
640   i2cmem_scl_write(machine, 1);
641   i2cmem_scl_write(machine, 0);
642   return data;
643}
644
645static void i2cmem_write_byte( device_t *machine, UINT8 data)
646{
647   int i;
648   for (i = 0; i < 8; i++)
649   {
650      i2cmem_sda_write(machine, (data & 0x80) ? 1 : 0);
651      data = data << 1;
652      i2cmem_scl_write(machine, 1);
653      i2cmem_scl_write(machine, 0);
654   }
655   i2cmem_sda_write(machine, 1); // ack bit
656   i2cmem_scl_write(machine, 1);
657   i2cmem_scl_write(machine, 0);
658}
659
660static void i2cmem_start( device_t *machine )
661{
662   i2cmem_sda_write(machine, 1);
663   i2cmem_scl_write(machine, 1);
664   i2cmem_sda_write(machine, 0);
665   i2cmem_scl_write(machine, 0);
666}
667
668static void i2cmem_stop( device_t *machine )
669{
670   i2cmem_sda_write(machine, 0);
671   i2cmem_scl_write(machine, 1);
672   i2cmem_sda_write(machine, 1);
673   i2cmem_scl_write(machine, 0);
674}
675
676READ32_MEMBER( cxhumax_state::cx_i2c1_r )
677{
678   UINT32 data=0;
679   switch(offset) {
680      case I2C_STAT_REG:
681         data |= i2cmem_sda_read(machine().device("eeprom"))<<3;
682         // fall
683      default:
684         data |= m_i2c1_regs[offset]; break;
685   }
686   verboselog( machine(), 9, "(I2C1) %08X -> %08X\n", 0xE04E1000 + (offset << 2), data);
687   return data;
688}
689
690WRITE32_MEMBER( cxhumax_state::cx_i2c1_w )
691{
692   verboselog( machine(), 9, "(I2C1) %08X <- %08X\n", 0xE04E1000 + (offset << 2), data);
693   switch(offset) {
694      case I2C_CTRL_REG:
695         if(data&0x10) {// START
696            i2cmem_start(machine().device("eeprom"));
697         }
698         if((data&0x4) || ((data&3)==3)) // I2C READ
699         {
700            m_i2c1_regs[I2C_RDATA_REG] = 0;
701            if(data&0x10) i2cmem_write_byte(machine().device("eeprom"),(data>>24)&0xFF);
702            if(m_i2c1_regs[I2C_MODE_REG]&(1<<5)) // BYTE_ORDER
703            {
704               for(int i=0; i<(data&3); i++) {
705                  m_i2c1_regs[I2C_RDATA_REG] |= i2cmem_read_byte(machine().device("eeprom"),0) << (i*8);
706               }
707               m_i2c1_regs[I2C_RDATA_REG] |= i2cmem_read_byte(machine().device("eeprom"),(data&0x20)?1:0) << ((data&3)*8);
708            }
709            else
710            {
711               for(int i=0; i<(data&3); i++) {
712                  m_i2c1_regs[I2C_RDATA_REG] |= i2cmem_read_byte(machine().device("eeprom"),0);
713                  m_i2c1_regs[I2C_RDATA_REG] <<= 8;
714               }
715               m_i2c1_regs[I2C_RDATA_REG] |= i2cmem_read_byte(machine().device("eeprom"),(data&0x20)?1:0);
716            }
717         }
718         else
719         {
720            for(int i=0; i<=(data&3); i++) {
721               i2cmem_write_byte(machine().device("eeprom"),(data>>(24-(i*8))&0xFF));
722            }
723         }
724         if(data&0x20) {// STOP
725            i2cmem_stop(machine().device("eeprom"));
726         }
727         
728         /* The interrupt status bit is set at the end of an I2C read or write operation. */
729         m_i2c1_regs[I2C_STAT_REG] |= I2C_INT_BIT;
730         m_i2c1_regs[I2C_STAT_REG] |= I2C_WACK_BIT;
731         
732         m_intctrl_regs[INTREG(INTGROUP1, INTIRQ)] |= 1<<7;
733         m_intctrl_regs[INTREG(INTGROUP1, INTSTATCLR)] |= 1<<7;
734         m_intctrl_regs[INTREG(INTGROUP1, INTSTATSET)] |= 1<<7;
735         if (m_intctrl_regs[INTREG(INTGROUP1, INTENABLE)] & (1<<7)) {
736               verboselog( machine(), 9, "(I2C1) Int\n" );
737               device_set_input_line(machine().device("maincpu"), ARM7_IRQ_LINE, ASSERT_LINE);
738         }
739         break;
740      case I2C_STAT_REG:
741         /* The interrupt status bit may be cleared by writing (anything) to the status register, which also clears the acknowledge status. */
742         data&=~(I2C_WACK_BIT|I2C_INT_BIT);
743         // fall
744      default:
745         COMBINE_DATA(&m_i2c1_regs[offset]);
746   }
747}
748
749READ32_MEMBER( cxhumax_state::cx_i2c2_r )
750{
751   UINT32 data = m_i2c2_regs[offset];
752   verboselog( machine(), 9, "(I2C2) %08X -> %08X\n", 0xE04E2000 + (offset << 2), data);
753   return data;
754}
755
756WRITE32_MEMBER( cxhumax_state::cx_i2c2_w )
757{
758   verboselog( machine(), 9, "(I2C2) %08X <- %08X\n", 0xE04E2000 + (offset << 2), data);
759   COMBINE_DATA(&m_i2c2_regs[offset]);
760}
761
762READ32_MEMBER( cxhumax_state::cx_mc_cfg_r )
763{
764   UINT32 data = m_mccfg_regs[offset];
765   verboselog( machine(), 9, "(MC_CFG) %08X -> %08X\n", 0xE0500300 + (offset << 2), data);
766   return data;
767}
768
769WRITE32_MEMBER( cxhumax_state::cx_mc_cfg_w )
770{
771   verboselog( machine(), 9, "(MC_CFG) %08X <- %08X\n", 0xE0500300 + (offset << 2), data);
772   COMBINE_DATA(&m_mccfg_regs[offset]);
773}
774
775READ32_MEMBER( cxhumax_state::cx_drm0_r )
776{
777   UINT32 data = m_drm0_regs[offset];
778   verboselog( machine(), 9, "(DRM0) %08X -> %08X\n", 0xE0560000 + (offset << 2), data);
779   switch(offset) {
780      case 0x14/4: // DRM_STATUS_REG
781         data |= 1<<21;
782         data |= 1<<20;
783   }
784   return data;
785}
786
787WRITE32_MEMBER( cxhumax_state::cx_drm0_w )
788{
789   verboselog( machine(), 9, "(DRM0) %08X <- %08X\n", 0xE0560000 + (offset << 2), data);
790   COMBINE_DATA(&m_drm0_regs[offset]);
791}
792
793READ32_MEMBER( cxhumax_state::cx_drm1_r )
794{
795   UINT32 data = m_drm1_regs[offset];
796   verboselog( machine(), 9, "(DRM1) %08X -> %08X\n", 0xE0570000 + (offset << 2), data);
797   return data;
798}
799
800WRITE32_MEMBER( cxhumax_state::cx_drm1_w )
801{
802   verboselog( machine(), 9, "(DRM1) %08X <- %08X\n", 0xE0570000 + (offset << 2), data);
803   COMBINE_DATA(&m_drm1_regs[offset]);
804}
805
806READ32_MEMBER( cxhumax_state::cx_hdmi_r )
807{
808   UINT32 data = m_hdmi_regs[offset];
809   verboselog( machine(), 9, "(HDMI) %08X -> %08X\n", 0xE05D0800 + (offset << 2), data);
810   return data;
811}
812
813WRITE32_MEMBER( cxhumax_state::cx_hdmi_w )
814{
815   verboselog( machine(), 9, "(HDMI) %08X <- %08X\n", 0xE05D0800 + (offset << 2), data);
816   switch(offset) {
817      case 0x40/4: // HDMI_CONFIG_REG
818         if(data&8) m_hdmi_regs[0xc0/4] |= 0x80;
819   }
820   COMBINE_DATA(&m_hdmi_regs[offset]);
821}
822
823static VIDEO_START( cxhumax )
824{
825}
826
827/* copy from emu/rendersw.c */
828/*------------------------------------------------------------------------
829    ycc_to_rgb - convert YCC to RGB; the YCC pixel
830    contains Y in the LSB, Cb << 8, and Cr << 16
831    This actually a YCbCr conversion,
832    details my be found in chapter 6.4 ff of
833    http://softwarecommunity.intel.com/isn/downloads/softwareproducts/pdfs/346495.pdf
834    The document also contains the constants below as floats.
835--------------------------------------------------------------------------*/
836
837INLINE UINT8 clamp16_shift8(UINT32 x)
838{
839   return (((INT32) x < 0) ? 0 : (x > 65535 ? 255: x >> 8));
840}
841
842INLINE UINT32 ycc_to_rgb(UINT32 ycc)
843{
844   /* original equations:
845
846        C = Y - 16
847        D = Cb - 128
848        E = Cr - 128
849
850        R = clip(( 298 * C           + 409 * E + 128) >> 8)
851        G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
852        B = clip(( 298 * C + 516 * D           + 128) >> 8)
853
854        R = clip(( 298 * (Y - 16)                    + 409 * (Cr - 128) + 128) >> 8)
855        G = clip(( 298 * (Y - 16) - 100 * (Cb - 128) - 208 * (Cr - 128) + 128) >> 8)
856        B = clip(( 298 * (Y - 16) + 516 * (Cb - 128)                    + 128) >> 8)
857
858        R = clip(( 298 * Y - 298 * 16                        + 409 * Cr - 409 * 128 + 128) >> 8)
859        G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8)
860        B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128                        + 128) >> 8)
861
862        R = clip(( 298 * Y - 298 * 16                        + 409 * Cr - 409 * 128 + 128) >> 8)
863        G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8)
864        B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128                        + 128) >> 8)
865
866        Now combine constants:
867
868        R = clip(( 298 * Y            + 409 * Cr - 56992) >> 8)
869        G = clip(( 298 * Y - 100 * Cb - 208 * Cr + 34784) >> 8)
870        B = clip(( 298 * Y + 516 * Cb            - 70688) >> 8)
871
872        Define common = 298 * y - 56992. This will save one addition
873
874        R = clip(( common            + 409 * Cr -     0) >> 8)
875        G = clip(( common - 100 * Cb - 208 * Cr + 91776) >> 8)
876        B = clip(( common + 516 * Cb            - 13696) >> 8)
877
878    */
879    UINT8 y = ycc;
880    UINT8 cb = ycc >> 8;
881    UINT8 cr = ycc >> 16;
882   UINT32 r, g, b, common;
883
884   common = 298 * y - 56992;
885   r = (common +            409 * cr);
886   g = (common - 100 * cb - 208 * cr + 91776);
887   b = (common + 516 * cb - 13696);
888
889   /* Now clamp and shift back */
890   return MAKE_RGB(clamp16_shift8(r), clamp16_shift8(g), clamp16_shift8(b));
891}
892
893static SCREEN_UPDATE_RGB32( cxhumax )
894{   
895   int i, j;
896
897   cxhumax_state *state = screen.machine().driver_data<cxhumax_state>();
898
899   UINT32 osd_pointer = state->m_drm1_regs[DRM_OSD_PTR_REG];
900
901   if(osd_pointer)
902   {
903      UINT32 *ram = state->m_ram;
904      UINT32 *osd_header = &ram[osd_pointer/4];
905      UINT8  *vbuf = (UINT8*)(&ram[osd_header[3]/4]);
906      UINT32 *palette = &ram[osd_header[7]/4];
907
908      UINT32 x_disp_start_and_width = osd_header[1];
909      UINT32 xdisp_width = (x_disp_start_and_width >> 16) & 0x1fff;
910      UINT32 xdisp_start = x_disp_start_and_width & 0xfff;
911
912      UINT32 image_height_and_width = osd_header[2];
913      UINT32 yimg_height = (image_height_and_width >> 16) & 0x7ff;
914      UINT32 ximg_width = image_height_and_width & 0x7ff;
915
916      UINT32 y_position_and_region_alpha = osd_header[5];
917      UINT32 ydisp_last = (y_position_and_region_alpha >> 12) & 0x7ff;
918      UINT32 ydisp_start = y_position_and_region_alpha & 0x7ff;
919
920   /*   UINT32 first_x = state->m_drm0_regs[DRM_ACTIVE_X_REG] & 0xffff;
921      UINT32 last_x = (state->m_drm0_regs[DRM_ACTIVE_X_REG] >> 16) & 0xffff;
922
923      UINT32 first_y = state->m_drm0_regs[DRM_ACTIVE_Y_REG] & 0xfff;
924      UINT32 last_y = (state->m_drm0_regs[DRM_ACTIVE_Y_REG] >> 16) & 0xfff;*/
925
926      for (j=ydisp_start; j <= ydisp_last; j++)
927      {
928         UINT32 *bmp = &bitmap.pix32(j);   
929     
930         for (i=xdisp_start; i <= (xdisp_start + xdisp_width); i++)
931         {
932            if ((i <= (xdisp_start + ximg_width)) && (j <= (ydisp_start + yimg_height))) {
933               bmp[i] = palette[vbuf[i+((j-ydisp_start)*ximg_width)]];
934            } else {
935               bmp[i] = ycc_to_rgb(state->m_drm1_regs[DRM_BCKGND_REG]);
936            }
937         }
938      }
939   }
940   return 0;
941}
942
943static ADDRESS_MAP_START(cxhumax_map, AS_PROGRAM, 32, cxhumax_state)
944   AM_RANGE(0x00000000, 0x03ffffff) AM_RAM   AM_SHARE("ram") AM_MIRROR(0x40000000)         // 64?MB RAM
945   AM_RANGE(0xe0000000, 0xe000ffff) AM_READWRITE(cx_hsx_r, cx_hsx_w)                  // HSX
946   AM_RANGE(0xe0010000, 0xe0010003) AM_READWRITE(cx_romdescr_r, cx_romdescr_w)            // ROM Descriptor
947   AM_RANGE(0xe0010004, 0xe001000f) AM_READWRITE(cx_isaromdescr_r, cx_isaromdescr_w)      // ISA/ROM Descriptors
948   AM_RANGE(0xe0010010, 0xe001001f) AM_READWRITE(cx_isadescr_r, cx_isadescr_w)            // ISA Descriptors
949   AM_RANGE(0xe0010020, 0xe001002f) AM_READWRITE(cx_rommap_r, cx_rommap_w)               // ROM Mapping
950   AM_RANGE(0xe0010030, 0xe0010033) AM_READWRITE(cx_rommode_r, cx_rommode_w)            // ISA Mode
951   AM_RANGE(0xe0010034, 0xe0010037) AM_READWRITE(cx_xoemask_r, cx_xoemask_w)            // XOE Mask
952   AM_RANGE(0xe0010040, 0xe0010047) AM_READWRITE(cx_pci_r, cx_pci_w)                  // PCI
953   AM_RANGE(0xe0010080, 0xe00100ff) AM_READWRITE(cx_extdesc_r, cx_extdesc_w)            // Extended Control
954   AM_RANGE(0xe0400014, 0xe0400017) AM_WRITE(cx_remap_w)                           // RST_REMAP_REG
955   AM_RANGE(0xe0400024, 0xe0400027) AM_READWRITE(cx_scratch_r, cx_scratch_w)            // RST_SCRATCH_REG - System Scratch Register
956   AM_RANGE(0xe0430000, 0xe0430103) AM_READWRITE(cx_timers_r, cx_timers_w)               // Timers
957   AM_RANGE(0xe0411000, 0xe0411033) AM_READWRITE(cx_uart2_r, cx_uart2_w)               // UART2
958   AM_RANGE(0xe0440000, 0xe0440013) AM_READWRITE(cx_pll_r, cx_pll_w)                  // PLL Registers
959   AM_RANGE(0xe0440020, 0xe0440037) AM_READWRITE(cx_clkdiv_r, cx_clkdiv_w)               // Clock Divider Registers
960   AM_RANGE(0xe0440094, 0xe0440097) AM_READWRITE(cx_pllprescale_r, cx_pllprescale_w)      // PLL Prescale
961   AM_RANGE(0xe0440100, 0xe0440173) AM_READWRITE(cx_chipcontrol_r, cx_chipcontrol_w)      // Chip Control Registers
962   AM_RANGE(0xe0450000, 0xe0450037) AM_READWRITE(cx_intctrl_r, cx_intctrl_w)            // Interrupt Controller Registers
963   AM_RANGE(0xe0490000, 0xe0490017) AM_READWRITE(cx_ss_r, cx_ss_w)                     // Synchronous Serial Port
964   AM_RANGE(0xe04e0000, 0xe04e001f) AM_READWRITE(cx_i2c0_r, cx_i2c0_w)                  // I2C0
965   AM_RANGE(0xe04e1000, 0xe04e101f) AM_READWRITE(cx_i2c1_r, cx_i2c1_w)                  // I2C1
966   AM_RANGE(0xe04e2000, 0xe04e201f) AM_READWRITE(cx_i2c2_r, cx_i2c2_w)                  // I2C2
967   AM_RANGE(0xe0500300, 0xe050030b) AM_READWRITE(cx_mc_cfg_r, cx_mc_cfg_w)               // Memory Controller configuration
968   AM_RANGE(0xe0560000, 0xe05600fb) AM_READWRITE(cx_drm0_r, cx_drm0_w)                  // DRM0
969   AM_RANGE(0xe0570000, 0xe05700fb) AM_READWRITE(cx_drm1_r, cx_drm1_w)                  // DRM1
970   AM_RANGE(0xe05d0800, 0xe05d0bff) AM_READWRITE(cx_hdmi_r, cx_hdmi_w)                  // HDMI
971   AM_RANGE(0xe0600000, 0xe063ffff) AM_READWRITE(cx_gxa_r, cx_gxa_w)                  // GXA
972   AM_RANGE(0xe4017000, 0xe40173ff) AM_RAM                                       // HSX - BSP - 1K Video Shared Dual Port RAM (shared with MVP)
973   AM_RANGE(0xe4080000, 0xe4083fff) AM_RAM                                       // HSX - TSP 0 - 16K Private Instructions/Data and Host-Shared Data
974   AM_RANGE(0xf0000000, 0xf03fffff) AM_READWRITE(flash_r, flash_w)   AM_MIRROR(0xf8000000)   // 4MB FLASH (INTEL 28F320J3D)
975   AM_RANGE(0xf4000000, 0xf43fffff) AM_READ(dummy_flash_r)                           // do we need it?
976ADDRESS_MAP_END
977
978static INPUT_PORTS_START( cxhumax )
979INPUT_PORTS_END
980
981static MACHINE_START( cxhumax )
982{
983   cxhumax_state *state = machine.driver_data<cxhumax_state>();
984   state->m_i2cmem = machine.device("eeprom");
985   int index = 0;
986   for(index = 0; index < MAX_CX_TIMERS; index++)
987   {
988      state->m_timer_regs.timer[index].timer = machine.scheduler().timer_alloc(FUNC(timer_tick));
989      state->m_timer_regs.timer[index].timer->adjust(attotime::never, index);
990   }
991}
992
993static MACHINE_RESET( cxhumax )
994{
995   cxhumax_state *state = machine.driver_data<cxhumax_state>();
996
997   state->m_i2c0_regs[0x08/4] = 0x08; // SDA high
998   state->m_i2c2_regs[0x08/4] = 0x08; // SDA high
999
1000   UINT8* FLASH = machine.root_device().memregion("flash")->base();
1001   memcpy(state->m_ram,FLASH,0x400000);
1002
1003   state->m_chipcontrol_regs[PIN_CONFIG_0_REG] =
1004      1 << 0  | /* Short Reset: 0=200ms delay ; 1=1ms delay */
1005      1 << 1  | /* Software config bit. OK */
1006      1 << 4  | /* SDRAM memory controller data width. 0=16bit 1=32bit */
1007      1 << 11 | /* I/O Addr bus width 11=23 bit 10=22bit 01=21bit 00=20bit / PCImode: 0=held in reset 1=normal reset OK? */
1008      0 << 16 | /* 0=PCI mode 1=Standard I/O mode */
1009      1 << 23 | /* 0=PCI device 1=PCI host bridge OK */
1010      1 << 26 | /* 0=SC1 used for NDS 1=SC1 not used for NDS */
1011      1 << 27 | /* 0=8bit ROM 1=16bit ROM */
1012      1 << 28 | /* 0=SC0 used for NDS 1=SC0 not used for NDS */
1013      0 << 29 | /* 0=using SC2 1=not using SC2 */
1014      0 << 30 | /* 0=using SC1 (TDA8004) 1=not using SC1 */
1015      1 << 31;  /* 0=Ext clk for boot 1=Int PLL for boot OK */
1016   state->m_chipcontrol_regs[SREG_MODE_REG] = 0x0000020F;
1017   
1018   memset(state->m_isaromdescr_regs,0,sizeof(state->m_isaromdescr_regs));
1019   memset(state->m_isadescr_regs,0,sizeof(state->m_isadescr_regs));
1020   state->m_rommode_reg=0;
1021   state->m_xoemask_reg=0;
1022   memset(state->m_extdesc_regs,0,sizeof(state->m_extdesc_regs));
1023
1024   state->m_pll_regs[SREG_MPG_0_INTFRAC_REG] = (0x1A << 25) /* integer */ | 0x5D1764 /* fraction */;
1025   state->m_pll_regs[SREG_MPG_1_INTFRAC_REG] = (0x1A << 25) /* integer */ | 0x5D1764 /* fraction */;
1026   state->m_pll_regs[SREG_ARM_INTFRAC_REG] = (0x28 << 25) /* integer */ | 0xCEDE62 /* fraction */;
1027   state->m_pll_regs[SREG_MEM_INTFRAC_REG] = (0x13 << 25) /* integer */ | 0xC9B26D /* fraction */;
1028   state->m_pll_regs[SREG_USB_INTFRAC_REG] = (0x08 << 25) /* integer */ | 0x52BF5B /* fraction */;
1029
1030   state->m_clkdiv_regs[SREG_DIV_0_REG] = (2<<0)|(1<<6)|(2<<8)|(2<<14)|(10<<16)|(1<<22)|(10<<24)|(1<<30);
1031   state->m_clkdiv_regs[SREG_DIV_1_REG] = (5<<0)|(0<<6)|(12<<8)|(0<<14)|(4<<16)|(1<<22)|(5<<24)|(1<<30);
1032   state->m_clkdiv_regs[SREG_DIV_2_REG] = (22<<0)|(0<<6)|(12<<8)|(1<<14)|(4<<16)|(3<<22); //|(5<<24)|(1<<30);???
1033   state->m_clkdiv_regs[SREG_DIV_3_REG] = (5<<0)|(0<<6)|(5<<8)|(0<<14)|(5<<16)|(0<<22)|(5<<24)|(0<<30);
1034   state->m_clkdiv_regs[SREG_DIV_4_REG] = (8<<0)|(0<<6)|(5<<8)|(0<<14)|(5<<16)|(0<<22)|(5<<24)|(0<<30);
1035   state->m_clkdiv_regs[SREG_DIV_5_REG] = (8<<0)|(0<<6)|(5<<8)|(0<<14)|(5<<16)|(0<<22);
1036
1037   state->m_pllprescale_reg=0xFFF;
1038
1039   state->m_mccfg_regs[MC_CFG0] = ((state->m_chipcontrol_regs[PIN_CONFIG_0_REG]>>4)&1)<<16;
1040   state->m_mccfg_regs[MC_CFG1] = 0;
1041   state->m_mccfg_regs[MC_CFG2] = (7<<8)|(7<<0);
1042
1043   // UART2
1044   state->m_uart2_regs[UART_FIFC_REG] = 0x30;
1045   
1046   // Clear SS TX FIFO
1047   memset(state->m_ss_tx_fifo,0,sizeof(state->m_ss_tx_fifo));
1048   state->m_ss_regs[SS_BAUD_REG] = 1; // Default SS clock = 13,5MHz
1049
1050   memset(state->m_intctrl_regs,0,sizeof(state->m_intctrl_regs));
1051   
1052   memset(state->m_hdmi_regs,0,sizeof(state->m_hdmi_regs));
1053
1054   memset(state->m_gxa_cmd_regs,0,sizeof(state->m_gxa_cmd_regs));
1055}
1056
1057static GENERIC_TERMINAL_INTERFACE( terminal_intf )
1058{
1059   DEVCB_NULL
1060};
1061
1062static const i2cmem_interface i2cmem_interface =
1063{
1064       I2CMEM_SLAVE_ADDRESS, 0, 0x2000
1065};
1066
1067static MACHINE_CONFIG_START( cxhumax, cxhumax_state )
1068   MCFG_CPU_ADD("maincpu", ARM920T, 180000000) // CX24175 (RevC up?)
1069   MCFG_CPU_PROGRAM_MAP(cxhumax_map)
1070
1071   MCFG_MACHINE_RESET(cxhumax)
1072   MCFG_MACHINE_START(cxhumax)
1073
1074   MCFG_INTEL_28F320J3D_ADD("flash")
1075   MCFG_I2CMEM_ADD("eeprom",i2cmem_interface)
1076
1077   /* video hardware */
1078    MCFG_SCREEN_ADD("screen", RASTER)
1079    MCFG_SCREEN_REFRESH_RATE(50)
1080    MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
1081    MCFG_SCREEN_SIZE(1920, 1080)
1082    MCFG_SCREEN_VISIBLE_AREA(0, 1920-1, 0, 1080-1)
1083    MCFG_SCREEN_UPDATE_STATIC(cxhumax)
1084
1085    MCFG_PALETTE_LENGTH(2)
1086    MCFG_PALETTE_INIT(black_and_white)
1087
1088   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, terminal_intf)
1089   
1090   MCFG_VIDEO_START(cxhumax)
1091MACHINE_CONFIG_END
1092
1093ROM_START( hxhdci2k )
1094   ROM_REGION( 0x400000, "flash", 0 )
1095   ROM_SYSTEM_BIOS( 0, "FW10005", "HDCI REV 1.0 RHDXSCI 1.00.05" ) /* 19 AUG 2008 */
1096   ROM_LOAD16_WORD_SWAP( "28f320j3d.bin", 0x000000, 0x400000, BAD_DUMP CRC(63d98942) SHA1(c5b8d701677a3edc25f203854f44953b19c9158d) )
1097
1098   ROM_REGION16_BE( 0x2000, "eeprom", 0 )
1099   ROM_LOAD( "24lc64.bin", 0x0000, 0x2000, NO_DUMP)
1100ROM_END
1101
1102/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT     COMPANY   FULLNAME       FLAGS */
1103SYST( 2008, hxhdci2k, 0,       0,   cxhumax,    cxhumax,     0,   "HUMAX",   "HUMAX HDCI-2000",      GAME_NOT_WORKING | GAME_NO_SOUND)
src/mess/mess.mak
r15172r15173
18921892   $(MESS_DRIVERS)/cp1.o      \
18931893   $(MESS_DRIVERS)/csc.o      \
18941894   $(MESS_DRIVERS)/cvicny.o   \
1895   $(MESS_DRIVERS)/cxhumax.o   \
18951896   $(MESS_DRIVERS)/czk80.o      \
18961897   $(MESS_DRIVERS)/d6800.o      \
18971898   $(MESS_DRIVERS)/d6809.o      \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team