Previous 15994 Revisions Next

r13785 Friday 30th December, 2011 at 15:36:30 UTC by Miodrag Milanović
Reverting back Tim original changes, overseen this (no whatsnew)
[src/mame/drivers]ghosteo.c

src/mame/drivers/ghosteo.c
r13784r13785
8181      : driver_device(mconfig, type, tag) { }
8282
8383   UINT32 *m_system_memory;
84   UINT32 *m_steppingstone;
8584   int m_security_count;
8685   UINT32 m_bballoon_port[20];
8786   struct nand_t m_nand;
r13784r13785
11111024-ch external interrupts Controller (Wake-up source 16-ch)
112111*/
113112
113// GPIO
114
114115static const UINT8 security_data[] = { 0x01, 0xC4, 0xFF, 0x22 };
115116
116
117117static UINT32 s3c2410_gpio_port_r( device_t *device, int port, UINT32 mask)
118118{
119119   ghosteo_state *state = device->machine().driver_data<ghosteo_state>();
r13784r13785
135135   return data;
136136}
137137
138static void s3c2410_gpio_port_w( device_t *device, int port, UINT32 data, UINT32 mask)
138static void s3c2410_gpio_port_w( device_t *device, int port, UINT32 mask, UINT32 data)
139139{
140140   ghosteo_state *state = device->machine().driver_data<ghosteo_state>();
141141   UINT32 old_value = state->m_bballoon_port[port];
r13784r13785
165165   }
166166}
167167
168// CORE
169
170/*
171
172OM[1:0] = 00b : Enable NAND flash controller auto boot mode
173
174NAND flash memory page size should be 512Bytes.
175
176NCON : NAND flash memory address step selection
1770 : 3 Step addressing
1781 : 4 Step addressing
179
180*/
181
182static int s3c2410_core_pin_r( device_t *device, int pin)
183{
184   int data = 0;
185   switch (pin)
186   {
187      case S3C2410_CORE_PIN_NCON : data = 1; break;
188      case S3C2410_CORE_PIN_OM0  : data = 0; break;
189      case S3C2410_CORE_PIN_OM1  : data = 0; break;
190   }
191   return data;
192}
193
194// NAND
195
168196static WRITE8_DEVICE_HANDLER( s3c2410_nand_command_w )
169197{
170198   ghosteo_state *state = device->machine().driver_data<ghosteo_state>();
r13784r13785
276304   logerror( "s3c2410_nand_data_w %02X\n", data);
277305}
278306
307// I2C
308
279309static WRITE_LINE_DEVICE_HANDLER( s3c2410_i2c_scl_w )
280310{
281311   device_t *i2cmem = device->machine().device( "i2cmem");
r13784r13785
316346}
317347
318348static ADDRESS_MAP_START( bballoon_map, AS_PROGRAM, 32 )
319   AM_RANGE(0x00000000, 0x00000fff) AM_RAM AM_BASE_MEMBER(ghosteo_state, m_steppingstone) AM_MIRROR(0x40000000)
320349   AM_RANGE(0x10000000, 0x10000003) AM_READ_PORT("10000000")
321350   AM_RANGE(0x10100000, 0x10100003) AM_READ_PORT("10100000")
322351   AM_RANGE(0x10200000, 0x10200003) AM_READ_PORT("10200000")
r13784r13785
382411   PORT_BIT( 0xFFFFFF50, IP_ACTIVE_LOW, IPT_UNUSED )
383412INPUT_PORTS_END
384413
385/*
386static NAND_INTERFACE( bballoon_nand_intf )
387{
388    DEVCB_DEVICE_LINE("s3c2410", s3c2410_pin_frnb_w)
389};
390*/
391
392414static const s3c2410_interface bballoon_s3c2410_intf =
393415{
394416   // CORE (pin read / pin write)
395   { NULL, NULL },
417   { s3c2410_core_pin_r, NULL },
396418   // GPIO (port read / port write)
397419   { s3c2410_gpio_port_r, s3c2410_gpio_port_w },
398420   // I2C (scl write / sda read / sda write)
r13784r13785
401423   { NULL },
402424   // I2S (data write)
403425   { NULL },
404   // NAND (command write, address write, data read, data write)
405   { s3c2410_nand_command_w, s3c2410_nand_address_w, s3c2410_nand_data_r, s3c2410_nand_data_w },
406   // LCD (flags)
407   { 0 }   
426   // NAND (command write / address write / data read / data write)
427   { s3c2410_nand_command_w, s3c2410_nand_address_w, s3c2410_nand_data_r, s3c2410_nand_data_w }
408428};
409429
410430static const i2cmem_interface i2cmem_interface =
r13784r13785
553573
554574static DRIVER_INIT( bballoon )
555575{
556   ghosteo_state *state = machine.driver_data<ghosteo_state>();
557   memcpy( state->m_steppingstone, machine.region( "user1")->base(), 4 * 1024);
558576}
559577
560578GAME( 2003, bballoon, 0, bballoon, bballoon, bballoon, ROT0, "Eolith", "BnB Arcade", GAME_NO_SOUND )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team