trunk/src/mame/drivers/ggconnie.c
| r29421 | r29422 | |
| 180 | 180 | "maincpu" |
| 181 | 181 | }; |
| 182 | 182 | |
| 183 | | static const huc6202_interface sgx_huc6202_config = |
| 184 | | { |
| 185 | | DEVCB_DEVICE_MEMBER16( "huc6270_0", huc6270_device, next_pixel ), |
| 186 | | DEVCB_DEVICE_MEMBER16( "huc6270_0", huc6270_device, time_until_next_event ), |
| 187 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_0", huc6270_device, vsync_changed ), |
| 188 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_0", huc6270_device, hsync_changed ), |
| 189 | | DEVCB_DEVICE_MEMBER( "huc6270_0", huc6270_device, read ), |
| 190 | | DEVCB_DEVICE_MEMBER( "huc6270_0", huc6270_device, write ), |
| 191 | | DEVCB_DEVICE_MEMBER16( "huc6270_1", huc6270_device, next_pixel ), |
| 192 | | DEVCB_DEVICE_MEMBER16( "huc6270_1", huc6270_device, time_until_next_event ), |
| 193 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_1", huc6270_device, vsync_changed ), |
| 194 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_1", huc6270_device, hsync_changed ), |
| 195 | | DEVCB_DEVICE_MEMBER( "huc6270_1", huc6270_device, read ), |
| 196 | | DEVCB_DEVICE_MEMBER( "huc6270_1", huc6270_device, write ), |
| 197 | | }; |
| 198 | | |
| 199 | | |
| 200 | 183 | static MACHINE_CONFIG_START( ggconnie, ggconnie_state ) |
| 201 | 184 | /* basic machine hardware */ |
| 202 | 185 | MCFG_CPU_ADD("maincpu", H6280, PCE_MAIN_CLOCK/3) |
| r29421 | r29422 | |
| 220 | 203 | MCFG_DEVICE_ADD( "huc6270_1", HUC6270, 0 ) |
| 221 | 204 | MCFG_HUC6270_VRAM_SIZE(0x10000) |
| 222 | 205 | MCFG_HUC6270_IRQ_CHANGED_CB(WRITELINE(pce_common_state, pce_irq_changed)) |
| 223 | | MCFG_HUC6202_ADD( "huc6202", sgx_huc6202_config ) |
| 206 | MCFG_DEVICE_ADD( "huc6202", HUC6202, 0 ) |
| 207 | MCFG_HUC6202_NEXT_PIXEL_0_CB(DEVREAD16("huc6270_0", huc6270_device, next_pixel)) |
| 208 | MCFG_HUC6202_TIME_TIL_NEXT_EVENT_0_CB(DEVREAD16("huc6270_0", huc6270_device, time_until_next_event)) |
| 209 | MCFG_HUC6202_VSYNC_CHANGED_0_CB(DEVWRITELINE("huc6270_0", huc6270_device, vsync_changed)) |
| 210 | MCFG_HUC6202_HSYNC_CHANGED_0_CB(DEVWRITELINE("huc6270_0", huc6270_device, hsync_changed)) |
| 211 | MCFG_HUC6202_READ_0_CB(DEVREAD8("huc6270_0", huc6270_device, read)) |
| 212 | MCFG_HUC6202_WRITE_0_CB(DEVWRITE8("huc6270_0", huc6270_device, write)) |
| 213 | MCFG_HUC6202_NEXT_PIXEL_1_CB(DEVREAD16("huc6270_1", huc6270_device, next_pixel)) |
| 214 | MCFG_HUC6202_TIME_TIL_NEXT_EVENT_1_CB(DEVREAD16("huc6270_1", huc6270_device, time_until_next_event)) |
| 215 | MCFG_HUC6202_VSYNC_CHANGED_1_CB(DEVWRITELINE("huc6270_1", huc6270_device, vsync_changed)) |
| 216 | MCFG_HUC6202_HSYNC_CHANGED_1_CB(DEVWRITELINE("huc6270_1", huc6270_device, hsync_changed)) |
| 217 | MCFG_HUC6202_READ_1_CB(DEVREAD8("huc6270_1", huc6270_device, read)) |
| 218 | MCFG_HUC6202_WRITE_1_CB(DEVWRITE8("huc6270_1", huc6270_device, write)) |
| 224 | 219 | |
| 225 | 220 | MCFG_DEVICE_ADD("rtc", MSM6242, XTAL_32_768kHz) |
| 226 | 221 | |
trunk/src/emu/video/huc6202.c
| r29421 | r29422 | |
| 12 | 12 | const device_type HUC6202 = &device_creator<huc6202_device>; |
| 13 | 13 | |
| 14 | 14 | |
| 15 | | void huc6202_device::device_config_complete() |
| 16 | | { |
| 17 | | const huc6202_interface *intf = reinterpret_cast<const huc6202_interface *>(static_config()); |
| 18 | | |
| 19 | | if ( intf != NULL ) |
| 20 | | { |
| 21 | | *static_cast<huc6202_interface *>(this) = *intf; |
| 22 | | } |
| 23 | | else |
| 24 | | { |
| 25 | | memset(&m_next_pixel_0, 0, sizeof(m_next_pixel_0)); |
| 26 | | memset(&m_get_time_til_next_event_0, 0, sizeof(m_get_time_til_next_event_0)); |
| 27 | | memset(&m_hsync_changed_0, 0, sizeof(m_hsync_changed_0)); |
| 28 | | memset(&m_vsync_changed_0, 0, sizeof(m_vsync_changed_0)); |
| 29 | | memset(&m_read_0, 0, sizeof(m_read_0)); |
| 30 | | memset(&m_write_0, 0, sizeof(m_write_0)); |
| 31 | | memset(&m_next_pixel_1, 0, sizeof(m_next_pixel_1)); |
| 32 | | memset(&m_get_time_til_next_event_1, 0, sizeof(m_get_time_til_next_event_1)); |
| 33 | | memset(&m_hsync_changed_1, 0, sizeof(m_hsync_changed_1)); |
| 34 | | memset(&m_vsync_changed_1, 0, sizeof(m_vsync_changed_1)); |
| 35 | | memset(&m_read_1, 0, sizeof(m_read_1)); |
| 36 | | memset(&m_write_1, 0, sizeof(m_write_1)); |
| 37 | | } |
| 38 | | } |
| 39 | | |
| 40 | | |
| 41 | 15 | huc6202_device::huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 42 | | : device_t(mconfig, HUC6202, "HuC6202 VPC", tag, owner, clock, "huc6202", __FILE__) |
| 16 | : device_t(mconfig, HUC6202, "HuC6202 VPC", tag, owner, clock, "huc6202", __FILE__), |
| 17 | m_next_pixel_0_cb(*this), |
| 18 | m_time_til_next_event_0_cb(*this), |
| 19 | m_vsync_changed_0_cb(*this), |
| 20 | m_hsync_changed_0_cb(*this), |
| 21 | m_read_0_cb(*this), |
| 22 | m_write_0_cb(*this), |
| 23 | m_next_pixel_1_cb(*this), |
| 24 | m_time_til_next_event_1_cb(*this), |
| 25 | m_vsync_changed_1_cb(*this), |
| 26 | m_hsync_changed_1_cb(*this), |
| 27 | m_read_1_cb(*this), |
| 28 | m_write_1_cb(*this) |
| 43 | 29 | { |
| 44 | 30 | } |
| 45 | 31 | |
| r29421 | r29422 | |
| 48 | 34 | { |
| 49 | 35 | UINT16 data = huc6270_device::HUC6270_BACKGROUND; |
| 50 | 36 | |
| 51 | | UINT16 data_0 = m_next_pixel_0( 0, 0xffff ); |
| 52 | | UINT16 data_1 = m_next_pixel_1( 0, 0xffff ); |
| 37 | UINT16 data_0 = m_next_pixel_0_cb( 0, 0xffff ); |
| 38 | UINT16 data_1 = m_next_pixel_1_cb( 0, 0xffff ); |
| 53 | 39 | |
| 54 | 40 | if ( data_0 == huc6270_device::HUC6270_SPRITE && data_1 == huc6270_device::HUC6270_SPRITE ) |
| 55 | 41 | { |
| r29421 | r29422 | |
| 164 | 150 | |
| 165 | 151 | READ16_MEMBER( huc6202_device::time_until_next_event ) |
| 166 | 152 | { |
| 167 | | UINT16 next_event_clocks_0 = m_get_time_til_next_event_0( 0, 0xffff ); |
| 168 | | UINT16 next_event_clocks_1 = m_get_time_til_next_event_1( 0, 0xffff ); |
| 153 | UINT16 next_event_clocks_0 = m_time_til_next_event_0_cb( 0, 0xffff ); |
| 154 | UINT16 next_event_clocks_1 = m_time_til_next_event_1_cb( 0, 0xffff ); |
| 169 | 155 | |
| 170 | 156 | return MIN( next_event_clocks_0, next_event_clocks_1 ); |
| 171 | 157 | } |
| r29421 | r29422 | |
| 173 | 159 | |
| 174 | 160 | WRITE_LINE_MEMBER( huc6202_device::vsync_changed ) |
| 175 | 161 | { |
| 176 | | m_vsync_changed_0( state ); |
| 177 | | m_vsync_changed_1( state ); |
| 162 | m_vsync_changed_0_cb( state ); |
| 163 | m_vsync_changed_1_cb( state ); |
| 178 | 164 | } |
| 179 | 165 | |
| 180 | 166 | |
| 181 | 167 | WRITE_LINE_MEMBER( huc6202_device::hsync_changed ) |
| 182 | 168 | { |
| 183 | | m_hsync_changed_0( state ); |
| 184 | | m_hsync_changed_1( state ); |
| 169 | m_hsync_changed_0_cb( state ); |
| 170 | m_hsync_changed_1_cb( state ); |
| 185 | 171 | } |
| 186 | 172 | |
| 187 | 173 | |
| r29421 | r29422 | |
| 283 | 269 | { |
| 284 | 270 | if ( m_io_device ) |
| 285 | 271 | { |
| 286 | | return m_read_1( offset ); |
| 272 | return m_read_1_cb( offset ); |
| 287 | 273 | } |
| 288 | 274 | else |
| 289 | 275 | { |
| 290 | | return m_read_0( offset ); |
| 276 | return m_read_0_cb( offset ); |
| 291 | 277 | } |
| 292 | 278 | } |
| 293 | 279 | |
| r29421 | r29422 | |
| 296 | 282 | { |
| 297 | 283 | if ( m_io_device ) |
| 298 | 284 | { |
| 299 | | m_write_1( offset, data ); |
| 285 | m_write_1_cb( offset, data ); |
| 300 | 286 | } |
| 301 | 287 | else |
| 302 | 288 | { |
| 303 | | m_write_0( offset, data ); |
| 289 | m_write_0_cb( offset, data ); |
| 304 | 290 | } |
| 305 | 291 | } |
| 306 | 292 | |
| r29421 | r29422 | |
| 308 | 294 | void huc6202_device::device_start() |
| 309 | 295 | { |
| 310 | 296 | /* Resolve callbacks */ |
| 311 | | m_next_pixel_0.resolve( device_0_next_pixel, *this ); |
| 312 | | m_get_time_til_next_event_0.resolve( get_time_til_next_event_0, *this ); |
| 313 | | m_hsync_changed_0.resolve( hsync_0_changed, *this ); |
| 314 | | m_vsync_changed_0.resolve( vsync_0_changed, *this ); |
| 315 | | m_read_0.resolve( read_0, *this ); |
| 316 | | m_write_0.resolve( write_0, *this ); |
| 297 | m_next_pixel_0_cb.resolve(); |
| 298 | m_time_til_next_event_0_cb.resolve(); |
| 299 | m_hsync_changed_0_cb.resolve(); |
| 300 | m_vsync_changed_0_cb.resolve(); |
| 301 | m_read_0_cb.resolve(); |
| 302 | m_write_0_cb.resolve(); |
| 317 | 303 | |
| 318 | | m_next_pixel_1.resolve( device_1_next_pixel, *this ); |
| 319 | | m_get_time_til_next_event_1.resolve( get_time_til_next_event_1, *this ); |
| 320 | | m_hsync_changed_1.resolve( hsync_1_changed, *this ); |
| 321 | | m_vsync_changed_1.resolve( vsync_1_changed, *this ); |
| 322 | | m_read_1.resolve( read_1, *this ); |
| 323 | | m_write_1.resolve( write_1, *this ); |
| 304 | m_next_pixel_1_cb.resolve(); |
| 305 | m_time_til_next_event_1_cb.resolve(); |
| 306 | m_hsync_changed_1_cb.resolve(); |
| 307 | m_vsync_changed_1_cb.resolve(); |
| 308 | m_read_1_cb.resolve(); |
| 309 | m_write_1_cb.resolve(); |
| 324 | 310 | |
| 325 | 311 | /* We want all our callbacks to be resolved */ |
| 326 | | assert( ! m_next_pixel_0.isnull() ); |
| 327 | | assert( ! m_get_time_til_next_event_0.isnull() ); |
| 328 | | assert( ! m_hsync_changed_0.isnull() ); |
| 329 | | assert( ! m_vsync_changed_0.isnull() ); |
| 330 | | assert( ! m_read_0.isnull() ); |
| 331 | | assert( ! m_write_0.isnull() ); |
| 332 | | assert( ! m_next_pixel_1.isnull() ); |
| 333 | | assert( ! m_get_time_til_next_event_1.isnull() ); |
| 334 | | assert( ! m_hsync_changed_1.isnull() ); |
| 335 | | assert( ! m_vsync_changed_1.isnull() ); |
| 336 | | assert( ! m_read_1.isnull() ); |
| 337 | | assert( ! m_write_1.isnull() ); |
| 312 | assert( ! m_next_pixel_0_cb.isnull() ); |
| 313 | assert( ! m_time_til_next_event_0_cb.isnull() ); |
| 314 | assert( ! m_hsync_changed_0_cb.isnull() ); |
| 315 | assert( ! m_vsync_changed_0_cb.isnull() ); |
| 316 | assert( ! m_read_0_cb.isnull() ); |
| 317 | assert( ! m_write_0_cb.isnull() ); |
| 318 | assert( ! m_next_pixel_1_cb.isnull() ); |
| 319 | assert( ! m_time_til_next_event_1_cb.isnull() ); |
| 320 | assert( ! m_hsync_changed_1_cb.isnull() ); |
| 321 | assert( ! m_vsync_changed_1_cb.isnull() ); |
| 322 | assert( ! m_read_1_cb.isnull() ); |
| 323 | assert( ! m_write_1_cb.isnull() ); |
| 338 | 324 | |
| 339 | 325 | /* Register save items */ |
| 340 | 326 | save_item(NAME(m_prio[0].prio_type)); |
trunk/src/emu/video/huc6202.h
| r29421 | r29422 | |
| 10 | 10 | #include "emu.h" |
| 11 | 11 | |
| 12 | 12 | |
| 13 | | #define MCFG_HUC6202_ADD( _tag, _intrf ) \ |
| 14 | | MCFG_DEVICE_ADD( _tag, HUC6202, 0 ) \ |
| 15 | | MCFG_DEVICE_CONFIG( _intrf ) |
| 13 | #define MCFG_HUC6202_NEXT_PIXEL_0_CB(_devcb) \ |
| 14 | devcb = &huc6202_device::set_next_pixel_0_callback(*device, DEVCB2_##_devcb); |
| 16 | 15 | |
| 16 | #define MCFG_HUC6202_TIME_TIL_NEXT_EVENT_0_CB(_devcb) \ |
| 17 | devcb = &huc6202_device::set_time_til_next_event_0_callback(*device, DEVCB2_##_devcb); |
| 17 | 18 | |
| 18 | | struct huc6202_interface |
| 19 | | { |
| 20 | | /* First gfx input device */ |
| 21 | | devcb_read16 device_0_next_pixel; |
| 19 | #define MCFG_HUC6202_VSYNC_CHANGED_0_CB(_devcb) \ |
| 20 | devcb = &huc6202_device::set_vsync_changed_0_callback(*device, DEVCB2_##_devcb); |
| 22 | 21 | |
| 23 | | /* TODO: Choose proper types */ |
| 24 | | /* Callback function to get time until next event */ |
| 25 | | devcb_read16 get_time_til_next_event_0; |
| 22 | #define MCFG_HUC6202_HSYNC_CHANGED_0_CB(_devcb) \ |
| 23 | devcb = &huc6202_device::set_hsync_changed_0_callback(*device, DEVCB2_##_devcb); |
| 26 | 24 | |
| 27 | | devcb_write_line vsync_0_changed; |
| 28 | | devcb_write_line hsync_0_changed; |
| 29 | | devcb_read8 read_0; |
| 30 | | devcb_write8 write_0; |
| 25 | #define MCFG_HUC6202_READ_0_CB(_devcb) \ |
| 26 | devcb = &huc6202_device::set_read_0_callback(*device, DEVCB2_##_devcb); |
| 31 | 27 | |
| 28 | #define MCFG_HUC6202_WRITE_0_CB(_devcb) \ |
| 29 | devcb = &huc6202_device::set_write_0_callback(*device, DEVCB2_##_devcb); |
| 32 | 30 | |
| 33 | | /* Second gfx input device */ |
| 34 | | devcb_read16 device_1_next_pixel; |
| 31 | #define MCFG_HUC6202_NEXT_PIXEL_1_CB(_devcb) \ |
| 32 | devcb = &huc6202_device::set_next_pixel_1_callback(*device, DEVCB2_##_devcb); |
| 35 | 33 | |
| 36 | | /* TODO: Choose proper types */ |
| 37 | | /* Callback function to get time until next event */ |
| 38 | | devcb_read16 get_time_til_next_event_1; |
| 34 | #define MCFG_HUC6202_TIME_TIL_NEXT_EVENT_1_CB(_devcb) \ |
| 35 | devcb = &huc6202_device::set_time_til_next_event_1_callback(*device, DEVCB2_##_devcb); |
| 39 | 36 | |
| 40 | | devcb_write_line vsync_1_changed; |
| 41 | | devcb_write_line hsync_1_changed; |
| 42 | | devcb_read8 read_1; |
| 43 | | devcb_write8 write_1; |
| 44 | | }; |
| 37 | #define MCFG_HUC6202_VSYNC_CHANGED_1_CB(_devcb) \ |
| 38 | devcb = &huc6202_device::set_vsync_changed_1_callback(*device, DEVCB2_##_devcb); |
| 45 | 39 | |
| 40 | #define MCFG_HUC6202_HSYNC_CHANGED_1_CB(_devcb) \ |
| 41 | devcb = &huc6202_device::set_hsync_changed_1_callback(*device, DEVCB2_##_devcb); |
| 46 | 42 | |
| 47 | | class huc6202_device : public device_t, |
| 48 | | public huc6202_interface |
| 43 | #define MCFG_HUC6202_READ_1_CB(_devcb) \ |
| 44 | devcb = &huc6202_device::set_read_1_callback(*device, DEVCB2_##_devcb); |
| 45 | |
| 46 | #define MCFG_HUC6202_WRITE_1_CB(_devcb) \ |
| 47 | devcb = &huc6202_device::set_write_1_callback(*device, DEVCB2_##_devcb); |
| 48 | |
| 49 | |
| 50 | class huc6202_device : public device_t |
| 49 | 51 | { |
| 50 | 52 | public: |
| 51 | 53 | // construction/destruction |
| 52 | 54 | huc6202_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 55 | |
| 56 | template<class _Object> static devcb2_base &set_next_pixel_0_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_next_pixel_0_cb.set_callback(object); } |
| 57 | template<class _Object> static devcb2_base &set_time_til_next_event_0_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_time_til_next_event_0_cb.set_callback(object); } |
| 58 | template<class _Object> static devcb2_base &set_vsync_changed_0_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_vsync_changed_0_cb.set_callback(object); } |
| 59 | template<class _Object> static devcb2_base &set_hsync_changed_0_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_hsync_changed_0_cb.set_callback(object); } |
| 60 | template<class _Object> static devcb2_base &set_read_0_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_read_0_cb.set_callback(object); } |
| 61 | template<class _Object> static devcb2_base &set_write_0_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_write_0_cb.set_callback(object); } |
| 62 | template<class _Object> static devcb2_base &set_next_pixel_1_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_next_pixel_1_cb.set_callback(object); } |
| 63 | template<class _Object> static devcb2_base &set_time_til_next_event_1_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_time_til_next_event_1_cb.set_callback(object); } |
| 64 | template<class _Object> static devcb2_base &set_vsync_changed_1_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_vsync_changed_1_cb.set_callback(object); } |
| 65 | template<class _Object> static devcb2_base &set_hsync_changed_1_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_hsync_changed_1_cb.set_callback(object); } |
| 66 | template<class _Object> static devcb2_base &set_read_1_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_read_1_cb.set_callback(object); } |
| 67 | template<class _Object> static devcb2_base &set_write_1_callback(device_t &device, _Object object) { return downcast<huc6202_device &>(device).m_write_1_cb.set_callback(object); } |
| 68 | |
| 53 | 69 | DECLARE_READ8_MEMBER( read ); |
| 54 | 70 | DECLARE_WRITE8_MEMBER( write ); |
| 55 | 71 | DECLARE_READ8_MEMBER( io_read ); |
| r29421 | r29422 | |
| 61 | 77 | |
| 62 | 78 | protected: |
| 63 | 79 | // device-level overrides |
| 64 | | virtual void device_config_complete(); |
| 65 | 80 | virtual void device_start(); |
| 66 | 81 | virtual void device_reset(); |
| 67 | 82 | |
| 68 | 83 | private: |
| 69 | 84 | /* callbacks */ |
| 70 | | devcb_resolved_read16 m_next_pixel_0; |
| 71 | | devcb_resolved_read16 m_get_time_til_next_event_0; |
| 72 | | devcb_resolved_write_line m_hsync_changed_0; |
| 73 | | devcb_resolved_write_line m_vsync_changed_0; |
| 74 | | devcb_resolved_read8 m_read_0; |
| 75 | | devcb_resolved_write8 m_write_0; |
| 76 | | devcb_resolved_read16 m_next_pixel_1; |
| 77 | | devcb_resolved_read16 m_get_time_til_next_event_1; |
| 78 | | devcb_resolved_write_line m_hsync_changed_1; |
| 79 | | devcb_resolved_write_line m_vsync_changed_1; |
| 80 | | devcb_resolved_read8 m_read_1; |
| 81 | | devcb_resolved_write8 m_write_1; |
| 85 | /* First gfx input device */ |
| 86 | devcb2_read16 m_next_pixel_0_cb; |
| 82 | 87 | |
| 88 | /* TODO: Choose proper types */ |
| 89 | /* Callback function to get time until next event */ |
| 90 | devcb2_read16 m_time_til_next_event_0_cb; |
| 91 | |
| 92 | devcb2_write_line m_vsync_changed_0_cb; |
| 93 | devcb2_write_line m_hsync_changed_0_cb; |
| 94 | devcb2_read8 m_read_0_cb; |
| 95 | devcb2_write8 m_write_0_cb; |
| 96 | |
| 97 | |
| 98 | /* Second gfx input device */ |
| 99 | devcb2_read16 m_next_pixel_1_cb; |
| 100 | |
| 101 | /* TODO: Choose proper types */ |
| 102 | /* Callback function to get time until next event */ |
| 103 | devcb2_read16 m_time_til_next_event_1_cb; |
| 104 | |
| 105 | devcb2_write_line m_vsync_changed_1_cb; |
| 106 | devcb2_write_line m_hsync_changed_1_cb; |
| 107 | devcb2_read8 m_read_1_cb; |
| 108 | devcb2_write8 m_write_1_cb; |
| 109 | |
| 83 | 110 | struct { |
| 84 | 111 | UINT8 prio_type; |
| 85 | 112 | UINT8 dev0_enabled; |
trunk/src/mess/drivers/pce.c
| r29421 | r29422 | |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | |
| 305 | | static const huc6202_interface sgx_huc6202_config = |
| 306 | | { |
| 307 | | DEVCB_DEVICE_MEMBER16( "huc6270_0", huc6270_device, next_pixel ), |
| 308 | | DEVCB_DEVICE_MEMBER16( "huc6270_0", huc6270_device, time_until_next_event ), |
| 309 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_0", huc6270_device, vsync_changed ), |
| 310 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_0", huc6270_device, hsync_changed ), |
| 311 | | DEVCB_DEVICE_MEMBER( "huc6270_0", huc6270_device, read ), |
| 312 | | DEVCB_DEVICE_MEMBER( "huc6270_0", huc6270_device, write ), |
| 313 | | DEVCB_DEVICE_MEMBER16( "huc6270_1", huc6270_device, next_pixel ), |
| 314 | | DEVCB_DEVICE_MEMBER16( "huc6270_1", huc6270_device, time_until_next_event ), |
| 315 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_1", huc6270_device, vsync_changed ), |
| 316 | | DEVCB_DEVICE_LINE_MEMBER( "huc6270_1", huc6270_device, hsync_changed ), |
| 317 | | DEVCB_DEVICE_MEMBER( "huc6270_1", huc6270_device, read ), |
| 318 | | DEVCB_DEVICE_MEMBER( "huc6270_1", huc6270_device, write ), |
| 319 | | }; |
| 320 | | |
| 321 | | |
| 322 | 305 | static SLOT_INTERFACE_START(pce_cart) |
| 323 | 306 | SLOT_INTERFACE_INTERNAL("rom", PCE_ROM_STD) |
| 324 | 307 | SLOT_INTERFACE_INTERNAL("cdsys3u", PCE_ROM_CDSYS3) |
| r29421 | r29422 | |
| 403 | 386 | MCFG_DEVICE_ADD( "huc6270_1", HUC6270, 0 ) |
| 404 | 387 | MCFG_HUC6270_VRAM_SIZE(0x10000) |
| 405 | 388 | MCFG_HUC6270_IRQ_CHANGED_CB(WRITELINE(pce_state, pce_irq_changed)) |
| 406 | | MCFG_HUC6202_ADD( "huc6202", sgx_huc6202_config ) |
| 389 | MCFG_DEVICE_ADD( "huc6202", HUC6202, 0 ) |
| 390 | MCFG_HUC6202_NEXT_PIXEL_0_CB(DEVREAD16("huc6270_0", huc6270_device, next_pixel)) |
| 391 | MCFG_HUC6202_TIME_TIL_NEXT_EVENT_0_CB(DEVREAD16("huc6270_0", huc6270_device, time_until_next_event)) |
| 392 | MCFG_HUC6202_VSYNC_CHANGED_0_CB(DEVWRITELINE("huc6270_0", huc6270_device, vsync_changed)) |
| 393 | MCFG_HUC6202_HSYNC_CHANGED_0_CB(DEVWRITELINE("huc6270_0", huc6270_device, hsync_changed)) |
| 394 | MCFG_HUC6202_READ_0_CB(DEVREAD8("huc6270_0", huc6270_device, read)) |
| 395 | MCFG_HUC6202_WRITE_0_CB(DEVWRITE8("huc6270_0", huc6270_device, write)) |
| 396 | MCFG_HUC6202_NEXT_PIXEL_1_CB(DEVREAD16("huc6270_1", huc6270_device, next_pixel)) |
| 397 | MCFG_HUC6202_TIME_TIL_NEXT_EVENT_1_CB(DEVREAD16("huc6270_1", huc6270_device, time_until_next_event)) |
| 398 | MCFG_HUC6202_VSYNC_CHANGED_1_CB(DEVWRITELINE("huc6270_1", huc6270_device, vsync_changed)) |
| 399 | MCFG_HUC6202_HSYNC_CHANGED_1_CB(DEVWRITELINE("huc6270_1", huc6270_device, hsync_changed)) |
| 400 | MCFG_HUC6202_READ_1_CB(DEVREAD8("huc6270_1", huc6270_device, read)) |
| 401 | MCFG_HUC6202_WRITE_1_CB(DEVWRITE8("huc6270_1", huc6270_device, write)) |
| 407 | 402 | |
| 408 | 403 | MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") |
| 409 | 404 | MCFG_SOUND_ADD(C6280_TAG, C6280, MAIN_CLOCK/6) |