Previous 199869 Revisions Next

r23923 Tuesday 25th June, 2013 at 06:25:13 UTC by Fabio Priuli
Modernized TC0280GRD/TC0430GRW and TC0360PRI devices [Osso]

and we are still looking into the disappeared gfx for some taito_f2 games...
[src/mame/drivers]slapshot.c taito_f2.c
[src/mame/video]slapshot.c taito_f2.c taitoic.c taitoic.h

trunk/src/mame/video/slapshot.c
r23922r23923
503503   layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
504504   layer[4] = 4;   /* text layer always over bg layers */
505505
506   tilepri[0] = tc0360pri_r(m_tc0360pri, space, 4) & 0x0f;     /* bg0 */
507   tilepri[1] = tc0360pri_r(m_tc0360pri, space, 4) >> 4;       /* bg1 */
508   tilepri[2] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f;     /* bg2 */
509   tilepri[3] = tc0360pri_r(m_tc0360pri, space, 5) >> 4;       /* bg3 */
506   tilepri[0] = m_tc0360pri->read(space, 4) & 0x0f;     /* bg0 */
507   tilepri[1] = m_tc0360pri->read(space, 4) >> 4;       /* bg1 */
508   tilepri[2] = m_tc0360pri->read(space, 5) & 0x0f;     /* bg2 */
509   tilepri[3] = m_tc0360pri->read(space, 5) >> 4;       /* bg3 */
510510
511511/* we actually assume text layer is on top of everything anyway, but FWIW... */
512   tilepri[layer[4]] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f;    /* fg (text layer) */
512   tilepri[layer[4]] = m_tc0360pri->read(space, 7) & 0x0f;    /* fg (text layer) */
513513
514   spritepri[0] = tc0360pri_r(m_tc0360pri, space, 6) & 0x0f;
515   spritepri[1] = tc0360pri_r(m_tc0360pri, space, 6) >> 4;
516   spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f;
517   spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4;
514   spritepri[0] = m_tc0360pri->read(space, 6) & 0x0f;
515   spritepri[1] = m_tc0360pri->read(space, 6) >> 4;
516   spritepri[2] = m_tc0360pri->read(space, 7) & 0x0f;
517   spritepri[3] = m_tc0360pri->read(space, 7) >> 4;
518518
519519   machine().priority_bitmap.fill(0, cliprect);
520520   bitmap.fill(0, cliprect);
trunk/src/mame/video/taitoic.c
r23922r23923
23792379/*                                                                         */
23802380/***************************************************************************/
23812381
2382struct tc0280grd_state
2383{
2384   UINT16 *       ram;
2382#define TC0280GRD_RAM_SIZE 0x2000
23852383
2386   tilemap_t      *tilemap;
2384const device_type TC0280GRD = &device_creator<tc0280grd_device>;
23872385
2388   UINT16         ctrl[8];
2389   int            gfxnum, base_color;
2390};
2386tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2387   : device_t(mconfig, TC0280GRD, "Taito TC0280GRD & TC0430GRW", tag, owner, clock, "tc0280grd", __FILE__)
2388{
2389}
23912390
2392#define TC0280GRD_RAM_SIZE 0x2000
2391//-------------------------------------------------
2392//  device_config_complete - perform any
2393//  operations now that the configuration is
2394//  complete
2395//-------------------------------------------------
23932396
2394/*****************************************************************************
2395    INLINE FUNCTIONS
2396*****************************************************************************/
2397void tc0280grd_device::device_config_complete()
2398{
2399   // inherit a copy of the static data
2400   const tc0280grd_interface *intf = reinterpret_cast<const tc0280grd_interface *>(static_config());
2401   if (intf != NULL)
2402   *static_cast<tc0280grd_interface *>(this) = *intf;
2403   
2404   // or initialize to defaults if none provided
2405   else
2406   {
2407   }
2408}
23972409
2398INLINE tc0280grd_state *tc0280grd_get_safe_token( device_t *device )
2410//-------------------------------------------------
2411//  device_start - device-specific startup
2412//-------------------------------------------------
2413
2414void tc0280grd_device::device_start()
23992415{
2400   assert(device != NULL);
2401   assert((device->type() == TC0280GRD) || (device->type() == TC0430GRW));
2416   m_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0280grd_device::tc0280grd_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
2417   m_tilemap->set_transparent_pen(0);
24022418
2403   return (tc0280grd_state *)downcast<tc0280grd_device *>(device)->token();
2419   m_ram = auto_alloc_array(machine(), UINT16, TC0280GRD_RAM_SIZE / 2);
2420
2421   save_pointer(NAME(m_ram), TC0280GRD_RAM_SIZE / 2);
2422   save_item(NAME(m_ctrl));
24042423}
24052424
2406INLINE const tc0280grd_interface *tc0280grd_get_interface( device_t *device )
2425//-------------------------------------------------
2426//  device_reset - device-specific reset
2427//-------------------------------------------------
2428
2429void tc0280grd_device::device_reset()
24072430{
2408   assert(device != NULL);
2409   assert((device->type() == TC0280GRD) || (device->type() == TC0430GRW));
2410   return (const tc0280grd_interface *) device->static_config();
2431   int i;
2432
2433   for (i = 0; i < 8; i++)
2434      m_ctrl[i] = 0;
24112435}
24122436
24132437/*****************************************************************************
r23922r23923
24162440
24172441TILE_GET_INFO_MEMBER(tc0280grd_device::tc0280grd_get_tile_info)
24182442{
2419   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(this);
2420   int attr = tc0280grd->ram[tile_index];
2443   int attr = m_ram[tile_index];
24212444   SET_TILE_INFO_MEMBER(
2422         tc0280grd->gfxnum,
2445         m_gfxnum,
24232446         attr & 0x3fff,
2424         ((attr & 0xc000) >> 14) + tc0280grd->base_color,
2447         ((attr & 0xc000) >> 14) + m_base_color,
24252448         0);
24262449}
24272450
2428READ16_DEVICE_HANDLER( tc0280grd_word_r )
2451READ16_MEMBER( tc0280grd_device::tc0280grd_word_r )
24292452{
2430   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device);
2431   return tc0280grd->ram[offset];
2453   return m_ram[offset];
24322454}
24332455
2434WRITE16_DEVICE_HANDLER( tc0280grd_word_w )
2456WRITE16_MEMBER( tc0280grd_device::tc0280grd_word_w )
24352457{
2436   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device);
2437   COMBINE_DATA(&tc0280grd->ram[offset]);
2438   tc0280grd->tilemap->mark_tile_dirty(offset);
2458   COMBINE_DATA(&m_ram[offset]);
2459   m_tilemap->mark_tile_dirty(offset);
24392460}
24402461
2441WRITE16_DEVICE_HANDLER( tc0280grd_ctrl_word_w )
2462WRITE16_MEMBER( tc0280grd_device::tc0280grd_ctrl_word_w )
24422463{
2443   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device);
2444   COMBINE_DATA(&tc0280grd->ctrl[offset]);
2464   COMBINE_DATA(&m_ctrl[offset]);
24452465}
24462466
2447READ16_DEVICE_HANDLER( tc0430grw_word_r )
2467READ16_MEMBER( tc0280grd_device::tc0430grw_word_r )
24482468{
2449   return tc0280grd_word_r(device, space, offset, mem_mask);
2469   return tc0280grd_word_r(space, offset, mem_mask);
24502470}
24512471
2452WRITE16_DEVICE_HANDLER( tc0430grw_word_w )
2472WRITE16_MEMBER( tc0280grd_device::tc0430grw_word_w )
24532473{
2454   tc0280grd_word_w(device, space, offset, data, mem_mask);
2474   tc0280grd_word_w(space, offset, data, mem_mask);
24552475}
24562476
2457WRITE16_DEVICE_HANDLER( tc0430grw_ctrl_word_w )
2477WRITE16_MEMBER( tc0280grd_device::tc0430grw_ctrl_word_w )
24582478{
2459   tc0280grd_ctrl_word_w(device, space, offset, data, mem_mask);
2479   tc0280grd_ctrl_word_w(space, offset, data, mem_mask);
24602480}
24612481
2462void tc0280grd_tilemap_update( device_t *device, int base_color )
2482void tc0280grd_device::tc0280grd_tilemap_update( int base_color )
24632483{
2464   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device);
2465   if (tc0280grd->base_color != base_color)
2484   if (m_base_color != base_color)
24662485   {
2467      tc0280grd->base_color = base_color;
2468      tc0280grd->tilemap->mark_all_dirty();
2486      m_base_color = base_color;
2487      m_tilemap->mark_all_dirty();
24692488   }
24702489}
24712490
2472void tc0430grw_tilemap_update( device_t *device, int base_color )
2491void tc0280grd_device::tc0430grw_tilemap_update( int base_color )
24732492{
2474   tc0280grd_tilemap_update(device, base_color);
2493   tc0280grd_tilemap_update(base_color);
24752494}
24762495
2477static void zoom_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply )
2496void tc0280grd_device::zoom_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply )
24782497{
2479   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(device);
24802498   UINT32 startx, starty;
24812499   int incxx, incxy, incyx, incyy;
24822500
24832501   /* 24-bit signed */
2484   startx = ((tc0280grd->ctrl[0] & 0xff) << 16) + tc0280grd->ctrl[1];
2502   startx = ((m_ctrl[0] & 0xff) << 16) + m_ctrl[1];
24852503
24862504   if (startx & 0x800000)
24872505      startx -= 0x1000000;
24882506
2489   incxx = (INT16)tc0280grd->ctrl[2];
2507   incxx = (INT16)m_ctrl[2];
24902508   incxx *= xmultiply;
2491   incyx = (INT16)tc0280grd->ctrl[3];
2509   incyx = (INT16)m_ctrl[3];
24922510
24932511   /* 24-bit signed */
2494   starty = ((tc0280grd->ctrl[4] & 0xff) << 16) + tc0280grd->ctrl[5];
2512   starty = ((m_ctrl[4] & 0xff) << 16) + m_ctrl[5];
24952513
24962514   if (starty & 0x800000)
24972515      starty -= 0x1000000;
24982516
2499   incxy = (INT16)tc0280grd->ctrl[6];
2517   incxy = (INT16)m_ctrl[6];
25002518   incxy *= xmultiply;
2501   incyy = (INT16)tc0280grd->ctrl[7];
2519   incyy = (INT16)m_ctrl[7];
25022520
25032521   startx -= xoffset * incxx + yoffset * incyx;
25042522   starty -= xoffset * incxy + yoffset * incyy;
25052523
2506   tc0280grd->tilemap->draw_roz(bitmap, cliprect, startx << 4, starty << 4,
2524   m_tilemap->draw_roz(bitmap, cliprect, startx << 4, starty << 4,
25072525         incxx << 4, incxy << 4, incyx << 4, incyy << 4,
25082526         1,  /* copy with wraparound */
25092527         0, priority);
25102528}
25112529
2512void tc0280grd_zoom_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
2530void tc0280grd_device::tc0280grd_zoom_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
25132531{
2514   zoom_draw(device, bitmap, cliprect, xoffset, yoffset, priority, 2);
2532   zoom_draw(bitmap, cliprect, xoffset, yoffset, priority, 2);
25152533}
25162534
2517void tc0430grw_zoom_draw( device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
2535void tc0280grd_device::tc0430grw_zoom_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority )
25182536{
2519   zoom_draw(device, bitmap, cliprect, xoffset, yoffset, priority, 1);
2537   zoom_draw(bitmap, cliprect, xoffset, yoffset, priority, 1);
25202538}
25212539
2522const device_type TC0280GRD = &device_creator<tc0280grd_device>;
25232540
2524tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2525   : device_t(mconfig, TC0280GRD, "Taito TC0280GRD & TC0430GRW", tag, owner, clock, "tc0280grd", __FILE__)
2541/***************************************************************************/
2542/*                                                                         */
2543/*                              TC0360PRI                                  */
2544/*                                                                         */
2545/***************************************************************************/
2546
2547
2548
2549const device_type TC0360PRI = &device_creator<tc0360pri_device>;
2550
2551tc0360pri_device::tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2552   : device_t(mconfig, TC0360PRI, "Taito TC0360PRI", tag, owner, clock, "tc0360pri", __FILE__)
25262553{
2527   m_token = global_alloc_clear(tc0280grd_state);
25282554}
25292555
25302556//-------------------------------------------------
r23922r23923
25332559//  complete
25342560//-------------------------------------------------
25352561
2536void tc0280grd_device::device_config_complete()
2562void tc0360pri_device::device_config_complete()
25372563{
25382564}
25392565
r23922r23923
25412567//  device_start - device-specific startup
25422568//-------------------------------------------------
25432569
2544void tc0280grd_device::device_start()
2570void tc0360pri_device::device_start()
25452571{
2546   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(this);
2547   const tc0280grd_interface *intf = tc0280grd_get_interface(this);
2548
2549   tc0280grd->gfxnum = intf->gfxnum;
2550
2551   tc0280grd->tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(tc0280grd_device::tc0280grd_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
2552   tc0280grd->tilemap->set_transparent_pen(0);
2553
2554   tc0280grd->ram = auto_alloc_array(machine(), UINT16, TC0280GRD_RAM_SIZE / 2);
2555
2556   save_pointer(NAME(tc0280grd->ram), TC0280GRD_RAM_SIZE / 2);
2557   save_item(NAME(tc0280grd->ctrl));
2572   save_item(NAME(m_regs));
25582573}
25592574
25602575//-------------------------------------------------
25612576//  device_reset - device-specific reset
25622577//-------------------------------------------------
25632578
2564void tc0280grd_device::device_reset()
2579void tc0360pri_device::device_reset()
25652580{
2566   tc0280grd_state *tc0280grd = tc0280grd_get_safe_token(this);
2567   int i;
2581      int i;
25682582
2569   for (i = 0; i < 8; i++)
2570      tc0280grd->ctrl[i] = 0;
2583   for (i = 0; i < 16; i++)
2584      m_regs[i] = 0;
25712585}
25722586
25732587
2574/***************************************************************************/
2575/*                                                                         */
2576/*                              TC0360PRI                                  */
2577/*                                                                         */
2578/***************************************************************************/
2579
2580struct tc0360pri_state
2581{
2582   UINT8   regs[16];
2583};
2584
25852588/*****************************************************************************
2586    INLINE FUNCTIONS
2587*****************************************************************************/
2588
2589INLINE tc0360pri_state *tc0360pri_get_safe_token( device_t *device )
2590{
2591   assert(device != NULL);
2592   assert(device->type() == TC0360PRI);
2593
2594   return (tc0360pri_state *)downcast<tc0360pri_device *>(device)->token();
2595}
2596
2597/*****************************************************************************
25982589    DEVICE HANDLERS
25992590*****************************************************************************/
26002591
2601WRITE8_DEVICE_HANDLER( tc0360pri_w )
2592WRITE8_MEMBER( tc0360pri_device::write )
26022593{
2603   tc0360pri_state *tc0360pri = tc0360pri_get_safe_token(device);
2604   tc0360pri->regs[offset] = data;
2594   m_regs[offset] = data;
26052595
26062596if (offset >= 0x0a)
26072597   popmessage("write %02x to unused TC0360PRI reg %x", data, offset);
26082598#if 0
2609#define regs tc0360pri->regs
2599#define regs m_regs
26102600   popmessage("%02x %02x  %02x %02x  %02x %02x %02x %02x %02x %02x",
26112601      regs[0x00], regs[0x01], regs[0x02], regs[0x03],
26122602      regs[0x04], regs[0x05], regs[0x06], regs[0x07],
r23922r23923
26142604#endif
26152605}
26162606
2617READ8_DEVICE_HANDLER( tc0360pri_r )
2607READ8_MEMBER( tc0360pri_device::read )
26182608{
2619   tc0360pri_state *tc0360pri = tc0360pri_get_safe_token(device);
2620   return tc0360pri->regs[offset];
2609   return m_regs[offset];
26212610}
26222611
2623/*****************************************************************************
2624    DEVICE INTERFACE
2625*****************************************************************************/
26262612
2627static DEVICE_START( tc0360pri )
2628{
2629   tc0360pri_state *tc0360pri = tc0360pri_get_safe_token(device);
2630   device->save_item(NAME(tc0360pri->regs));
2631}
26322613
2633static DEVICE_RESET( tc0360pri )
2634{
2635   tc0360pri_state *tc0360pri = tc0360pri_get_safe_token(device);
2636   int i;
2637
2638   for (i = 0; i < 16; i++)
2639      tc0360pri->regs[i] = 0;
2640
2641}
2642
2643const device_type TC0360PRI = &device_creator<tc0360pri_device>;
2644
2645tc0360pri_device::tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
2646   : device_t(mconfig, TC0360PRI, "Taito TC0360PRI", tag, owner, clock, "tc0360pri", __FILE__)
2647{
2648   m_token = global_alloc_clear(tc0360pri_state);
2649}
2650
2651//-------------------------------------------------
2652//  device_config_complete - perform any
2653//  operations now that the configuration is
2654//  complete
2655//-------------------------------------------------
2656
2657void tc0360pri_device::device_config_complete()
2658{
2659}
2660
2661//-------------------------------------------------
2662//  device_start - device-specific startup
2663//-------------------------------------------------
2664
2665void tc0360pri_device::device_start()
2666{
2667   DEVICE_START_NAME( tc0360pri )(this);
2668}
2669
2670//-------------------------------------------------
2671//  device_reset - device-specific reset
2672//-------------------------------------------------
2673
2674void tc0360pri_device::device_reset()
2675{
2676   DEVICE_RESET_NAME( tc0360pri )(this);
2677}
2678
26792614/***************************************************************************/
26802615/*                                                                         */
26812616/*                              TC0480SCP                                  */
trunk/src/mame/video/taitoic.h
r23922r23923
6363
6464struct tc0280grd_interface
6565{
66   int                gfxnum;
66   int                m_gfxnum;
6767};
6868
6969
r23922r23923
101101};
102102
103103class pc080sn_device : public device_t,
104                              pc080sn_interface
104                  public pc080sn_interface
105105{
106106public:
107107   pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r23922r23923
154154extern const device_type PC080SN;
155155
156156class pc090oj_device : public device_t,
157                              public pc090oj_interface
157                  public pc090oj_interface
158158{
159159public:
160160   pc090oj_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r23922r23923
194194extern const device_type PC090OJ;
195195
196196class tc0080vco_device : public device_t,
197                                 public tc0080vco_interface
197                     public tc0080vco_interface
198198{
199199public:
200200   tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r23922r23923
257257extern const device_type TC0080VCO;
258258
259259class tc0100scn_device : public device_t,
260                                 public tc0100scn_interface
260                     public tc0100scn_interface
261261{
262262public:
263263   tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
r23922r23923
347347
348348extern const device_type TC0100SCN;
349349
350class tc0280grd_device : public device_t
350class tc0280grd_device : public device_t,
351                     public tc0280grd_interface
351352{
352353public:
353354   tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
354   ~tc0280grd_device() { global_free(m_token); }
355   ~tc0280grd_device() {}
356   
357   DECLARE_READ16_MEMBER( tc0280grd_word_r );
358   DECLARE_WRITE16_MEMBER( tc0280grd_word_w );
359   DECLARE_WRITE16_MEMBER( tc0280grd_ctrl_word_w );
360   void tc0280grd_tilemap_update(int base_color);
361   void tc0280grd_zoom_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
355362
356   // access to legacy token
357   void *token() const { assert(m_token != NULL); return m_token; }
363   DECLARE_READ16_MEMBER( tc0430grw_word_r );
364   DECLARE_WRITE16_MEMBER( tc0430grw_word_w );
365   DECLARE_WRITE16_MEMBER( tc0430grw_ctrl_word_w );
366   void tc0430grw_tilemap_update(int base_color);
367   void tc0430grw_zoom_draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
368
358369protected:
359370   // device-level overrides
360371   virtual void device_config_complete();
361372   virtual void device_start();
362373   virtual void device_reset();
374   
363375private:
364376   // internal state
365   void *m_token;
377   UINT16 *       m_ram;
366378
379   tilemap_t      *m_tilemap;
380
381   UINT16         m_ctrl[8];
382   int            m_base_color;
383
367384   TILE_GET_INFO_MEMBER(tc0280grd_get_tile_info);
385   void zoom_draw( bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority, int xmultiply );
368386};
369387
370388extern const device_type TC0280GRD;
371389
372390#define TC0430GRW TC0280GRD
391
373392class tc0360pri_device : public device_t
374393{
375394public:
376395   tc0360pri_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
377   ~tc0360pri_device() { global_free(m_token); }
396   ~tc0360pri_device() {}
378397
379   // access to legacy token
380   void *token() const { assert(m_token != NULL); return m_token; }
398   DECLARE_WRITE8_MEMBER( write );
399   DECLARE_READ8_MEMBER( read );
400   
381401protected:
382402   // device-level overrides
383403   virtual void device_config_complete();
384404   virtual void device_start();
385405   virtual void device_reset();
406
386407private:
387408   // internal state
388   void *m_token;
409   UINT8   m_regs[16];
389410};
390411
391412extern const device_type TC0360PRI;
r23922r23923
535556***************************************************************************/
536557
537558
538/** TC0280GRD & TC0430GRW **/
539DECLARE_READ16_DEVICE_HANDLER( tc0280grd_word_r );
540DECLARE_WRITE16_DEVICE_HANDLER( tc0280grd_word_w );
541DECLARE_WRITE16_DEVICE_HANDLER( tc0280grd_ctrl_word_w );
542void tc0280grd_tilemap_update(device_t *device, int base_color);
543void tc0280grd_zoom_draw(device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
544
545DECLARE_READ16_DEVICE_HANDLER( tc0430grw_word_r );
546DECLARE_WRITE16_DEVICE_HANDLER( tc0430grw_word_w );
547DECLARE_WRITE16_DEVICE_HANDLER( tc0430grw_ctrl_word_w );
548void tc0430grw_tilemap_update(device_t *device, int base_color);
549void tc0430grw_zoom_draw(device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect, int xoffset, int yoffset, UINT32 priority);
550
551
552/** TC0360PRI **/
553DECLARE_WRITE8_DEVICE_HANDLER( tc0360pri_w );
554DECLARE_READ8_DEVICE_HANDLER( tc0360pri_r );
555
556
557559/** TC0480SCP **/
558560/* When writing a driver, pass zero for the text and flip offsets initially:
559561   then tweak them once you have the 4 bg layer positions correct. Col_base
trunk/src/mame/video/taito_f2.c
r23922r23923
10251025   layer[0] = m_tc0100scn->bottomlayer();
10261026   layer[1] = layer[0] ^ 1;
10271027   layer[2] = 2;
1028   m_tilepri[layer[0]] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f;
1029   m_tilepri[layer[1]] = tc0360pri_r(m_tc0360pri, space, 5) >> 4;
1030   m_tilepri[layer[2]] = tc0360pri_r(m_tc0360pri, space, 4) >> 4;
1028   m_tilepri[layer[0]] = m_tc0360pri->read(space, 5) & 0x0f;
1029   m_tilepri[layer[1]] = m_tc0360pri->read(space, 5) >> 4;
1030   m_tilepri[layer[2]] = m_tc0360pri->read(space, 4) >> 4;
10311031
1032   m_spritepri[0] = tc0360pri_r(m_tc0360pri, space, 6) & 0x0f;
1033   m_spritepri[1] = tc0360pri_r(m_tc0360pri, space, 6) >> 4;
1034   m_spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f;
1035   m_spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4;
1032   m_spritepri[0] = m_tc0360pri->read(space, 6) & 0x0f;
1033   m_spritepri[1] = m_tc0360pri->read(space, 6) >> 4;
1034   m_spritepri[2] = m_tc0360pri->read(space, 7) & 0x0f;
1035   m_spritepri[3] = m_tc0360pri->read(space, 7) >> 4;
10361036
1037   m_spriteblendmode = tc0360pri_r(m_tc0360pri, space, 0) & 0xc0;
1037   m_spriteblendmode = m_tc0360pri->read(space, 0) & 0xc0;
10381038
10391039   machine().priority_bitmap.fill(0, cliprect);
10401040   bitmap.fill(0, cliprect);   /* wrong color? */
r23922r23923
10521052void taitof2_state::draw_roz_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 priority)
10531053{
10541054   if (m_tc0280grd != NULL)
1055      tc0280grd_zoom_draw(m_tc0280grd, bitmap, cliprect, m_pivot_xdisp, m_pivot_ydisp, priority);
1055      m_tc0280grd->tc0280grd_zoom_draw(bitmap, cliprect, m_pivot_xdisp, m_pivot_ydisp, priority);
10561056
10571057   if (m_tc0430grw != NULL)
1058      tc0430grw_zoom_draw(m_tc0430grw, bitmap, cliprect, m_pivot_xdisp, m_pivot_ydisp, priority);
1058      m_tc0430grw->tc0430grw_zoom_draw(bitmap, cliprect, m_pivot_xdisp, m_pivot_ydisp, priority);
10591059}
10601060
10611061UINT32 taitof2_state::screen_update_taitof2_pri_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
r23922r23923
10661066   int layer[3];
10671067   int drawn;
10681068   int i,j;
1069   int roz_base_color = (tc0360pri_r(m_tc0360pri, space, 1) & 0x3f) << 2;
1069   int roz_base_color = (m_tc0360pri->read(space, 1) & 0x3f) << 2;
10701070
10711071   taitof2_handle_sprite_buffering();
10721072
10731073   if (m_tc0280grd != NULL)
1074      tc0280grd_tilemap_update(m_tc0280grd, roz_base_color);
1074      m_tc0280grd->tc0280grd_tilemap_update(roz_base_color);
10751075
10761076   if (m_tc0430grw != NULL)
1077      tc0430grw_tilemap_update(m_tc0430grw, roz_base_color);
1077      m_tc0430grw->tc0430grw_tilemap_update(roz_base_color);
10781078
10791079   m_tc0100scn->tilemap_update();
10801080
1081   rozpri = (tc0360pri_r(m_tc0360pri, space, 1) & 0xc0) >> 6;
1082   rozpri = (tc0360pri_r(m_tc0360pri, space, 8 + rozpri / 2) >> 4 * (rozpri & 1)) & 0x0f;
1081   rozpri = (m_tc0360pri->read(space, 1) & 0xc0) >> 6;
1082   rozpri = (m_tc0360pri->read(space, 8 + rozpri / 2) >> 4 * (rozpri & 1)) & 0x0f;
10831083
10841084   layer[0] = m_tc0100scn->bottomlayer();
10851085   layer[1] = layer[0] ^ 1;
10861086   layer[2] = 2;
10871087
1088   tilepri[layer[0]] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f;
1089   tilepri[layer[1]] = tc0360pri_r(m_tc0360pri, space, 5) >> 4;
1090   tilepri[layer[2]] = tc0360pri_r(m_tc0360pri, space, 4) >> 4;
1088   tilepri[layer[0]] = m_tc0360pri->read(space, 5) & 0x0f;
1089   tilepri[layer[1]] = m_tc0360pri->read(space, 5) >> 4;
1090   tilepri[layer[2]] = m_tc0360pri->read(space, 4) >> 4;
10911091
1092   m_spritepri[0] = tc0360pri_r(m_tc0360pri, space, 6) & 0x0f;
1093   m_spritepri[1] = tc0360pri_r(m_tc0360pri, space, 6) >> 4;
1094   m_spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f;
1095   m_spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4;
1092   m_spritepri[0] = m_tc0360pri->read(space, 6) & 0x0f;
1093   m_spritepri[1] = m_tc0360pri->read(space, 6) >> 4;
1094   m_spritepri[2] = m_tc0360pri->read(space, 7) & 0x0f;
1095   m_spritepri[3] = m_tc0360pri->read(space, 7) >> 4;
10961096
1097   m_spriteblendmode = tc0360pri_r(m_tc0360pri, space, 0) & 0xc0;
1097   m_spriteblendmode = m_tc0360pri->read(space, 0) & 0xc0;
10981098
10991099   machine().priority_bitmap.fill(0, cliprect);
11001100   bitmap.fill(0, cliprect);   /* wrong color? */
r23922r23923
11431143   layer[0][0] = m_tc0100scn_1->bottomlayer();
11441144   layer[0][1] = layer[0][0] ^ 1;
11451145   layer[0][2] = 2;
1146   tilepri[0][layer[0][0]] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f;
1147   tilepri[0][layer[0][1]] = tc0360pri_r(m_tc0360pri, space, 5) >> 4;
1148   tilepri[0][layer[0][2]] = tc0360pri_r(m_tc0360pri, space, 4) >> 4;
1146   tilepri[0][layer[0][0]] = m_tc0360pri->read(space, 5) & 0x0f;
1147   tilepri[0][layer[0][1]] = m_tc0360pri->read(space, 5) >> 4;
1148   tilepri[0][layer[0][2]] = m_tc0360pri->read(space, 4) >> 4;
11491149
11501150   layer[1][0] = m_tc0100scn_2->bottomlayer();
11511151   layer[1][1] = layer[1][0] ^ 1;
11521152   layer[1][2] = 2;
1153   tilepri[1][layer[1][0]] = tc0360pri_r(m_tc0360pri, space, 9) & 0x0f;
1154   tilepri[1][layer[1][1]] = tc0360pri_r(m_tc0360pri, space, 9) >> 4;
1155   tilepri[1][layer[1][2]] = tc0360pri_r(m_tc0360pri, space, 8) >> 4;
1153   tilepri[1][layer[1][0]] = m_tc0360pri->read(space, 9) & 0x0f;
1154   tilepri[1][layer[1][1]] = m_tc0360pri->read(space, 9) >> 4;
1155   tilepri[1][layer[1][2]] = m_tc0360pri->read(space, 8) >> 4;
11561156
1157   spritepri[0] = tc0360pri_r(m_tc0360pri, space, 6) & 0x0f;
1158   spritepri[1] = tc0360pri_r(m_tc0360pri, space, 6) >> 4;
1159   spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f;
1160   spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4;
1157   spritepri[0] = m_tc0360pri->read(space, 6) & 0x0f;
1158   spritepri[1] = m_tc0360pri->read(space, 6) >> 4;
1159   spritepri[2] = m_tc0360pri->read(space, 7) & 0x0f;
1160   spritepri[3] = m_tc0360pri->read(space, 7) >> 4;
11611161
11621162   machine().priority_bitmap.fill(0, cliprect);
11631163   bitmap.fill(0, cliprect);   /* wrong color? */
r23922r23923
12871287   invlayer[layer[2]] = 2;
12881288   invlayer[layer[3]] = 3;
12891289
1290   m_tilepri[invlayer[0]] = tc0360pri_r(m_tc0360pri, space, 4) & 0x0f; /* bg0 */
1291   m_tilepri[invlayer[1]] = tc0360pri_r(m_tc0360pri, space, 4) >> 4;   /* bg1 */
1292   m_tilepri[invlayer[2]] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f; /* bg2 */
1293   m_tilepri[invlayer[3]] = tc0360pri_r(m_tc0360pri, space, 5) >> 4;   /* bg3 */
1294   m_tilepri[4] = tc0360pri_r(m_tc0360pri, space, 9) & 0x0f;           /* fg (text layer) */
1290   m_tilepri[invlayer[0]] = m_tc0360pri->read(space, 4) & 0x0f; /* bg0 */
1291   m_tilepri[invlayer[1]] = m_tc0360pri->read(space, 4) >> 4;   /* bg1 */
1292   m_tilepri[invlayer[2]] = m_tc0360pri->read(space, 5) & 0x0f; /* bg2 */
1293   m_tilepri[invlayer[3]] = m_tc0360pri->read(space, 5) >> 4;   /* bg3 */
1294   m_tilepri[4] = m_tc0360pri->read(space, 9) & 0x0f;           /* fg (text layer) */
12951295
1296   m_spritepri[0] = tc0360pri_r(m_tc0360pri, space, 6) & 0x0f;
1297   m_spritepri[1] = tc0360pri_r(m_tc0360pri, space, 6) >> 4;
1298   m_spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f;
1299   m_spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4;
1296   m_spritepri[0] = m_tc0360pri->read(space, 6) & 0x0f;
1297   m_spritepri[1] = m_tc0360pri->read(space, 6) >> 4;
1298   m_spritepri[2] = m_tc0360pri->read(space, 7) & 0x0f;
1299   m_spritepri[3] = m_tc0360pri->read(space, 7) >> 4;
13001300
1301   m_spriteblendmode = tc0360pri_r(m_tc0360pri, space, 0) & 0xc0;
1301   m_spriteblendmode = m_tc0360pri->read(space, 0) & 0xc0;
13021302
13031303   machine().priority_bitmap.fill(0, cliprect);
13041304   bitmap.fill(0, cliprect);
r23922r23923
13351335   layer[3] = (priority & 0x000f) >>  0;   /* tells us which is top */
13361336   layer[4] = 4;   /* text layer always over bg layers */
13371337
1338   tilepri[0] = tc0360pri_r(m_tc0360pri, space, 4) >> 4;      /* bg0 */
1339   tilepri[1] = tc0360pri_r(m_tc0360pri, space, 5) & 0x0f;    /* bg1 */
1340   tilepri[2] = tc0360pri_r(m_tc0360pri, space, 5) >> 4;      /* bg2 */
1341   tilepri[3] = tc0360pri_r(m_tc0360pri, space, 4) & 0x0f;    /* bg3 */
1338   tilepri[0] = m_tc0360pri->read(space, 4) >> 4;      /* bg0 */
1339   tilepri[1] = m_tc0360pri->read(space, 5) & 0x0f;    /* bg1 */
1340   tilepri[2] = m_tc0360pri->read(space, 5) >> 4;      /* bg2 */
1341   tilepri[3] = m_tc0360pri->read(space, 4) & 0x0f;    /* bg3 */
13421342
13431343/* we actually assume text layer is on top of everything anyway, but FWIW... */
1344   tilepri[layer[4]] = tc0360pri_r(m_tc0360pri, space, 7) >> 4;    /* fg (text layer) */
1344   tilepri[layer[4]] = m_tc0360pri->read(space, 7) >> 4;    /* fg (text layer) */
13451345
1346   spritepri[0] = tc0360pri_r(m_tc0360pri, space, 6) & 0x0f;
1347   spritepri[1] = tc0360pri_r(m_tc0360pri, space, 6) >> 4;
1348   spritepri[2] = tc0360pri_r(m_tc0360pri, space, 7) & 0x0f;
1349   spritepri[3] = tc0360pri_r(m_tc0360pri, space, 7) >> 4;
1346   spritepri[0] = m_tc0360pri->read(space, 6) & 0x0f;
1347   spritepri[1] = m_tc0360pri->read(space, 6) >> 4;
1348   spritepri[2] = m_tc0360pri->read(space, 7) & 0x0f;
1349   spritepri[3] = m_tc0360pri->read(space, 7) >> 4;
13501350
13511351   machine().priority_bitmap.fill(0, cliprect);
13521352   bitmap.fill(0, cliprect);
trunk/src/mame/drivers/slapshot.c
r23922r23923
291291   AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w)
292292   AM_RANGE(0x900000, 0x907fff) AM_READWRITE(color_ram_word_r, color_ram_word_w) AM_SHARE("color_ram") /* 8bpg palette */
293293   AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE8("mk48t08", timekeeper_device, read, write, 0xff00) /* nvram (only low bytes used) */
294   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)  /* priority chip */
294   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0xff00)  /* priority chip */
295295   AM_RANGE(0xc00000, 0xc0000f) AM_DEVREADWRITE("tc0640fio", tc0640fio_device, halfword_byteswap_r, halfword_byteswap_w)
296296   AM_RANGE(0xc00020, 0xc0002f) AM_READ(slapshot_service_input_r)  /* service mirror */
297297   AM_RANGE(0xd00000, 0xd00003) AM_READWRITE(slapshot_msb_sound_r, slapshot_msb_sound_w)
r23922r23923
306306   AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w)
307307   AM_RANGE(0x900000, 0x907fff) AM_READWRITE(color_ram_word_r, color_ram_word_w) AM_SHARE("color_ram") /* 8bpg palette */
308308   AM_RANGE(0xa00000, 0xa03fff) AM_DEVREADWRITE8("mk48t08", timekeeper_device, read, write, 0xff00) /* nvram (only low bytes used) */
309   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)  /* priority chip */
309   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0xff00)  /* priority chip */
310310   AM_RANGE(0xc00000, 0xc0000f) AM_DEVREADWRITE("tc0640fio", tc0640fio_device, halfword_byteswap_r, halfword_byteswap_w)
311311   AM_RANGE(0xc00020, 0xc0002f) AM_READ(slapshot_service_input_r)   /* service mirror */
312312   AM_RANGE(0xd00000, 0xd00003) AM_READWRITE(slapshot_msb_sound_r, slapshot_msb_sound_w)
trunk/src/mame/drivers/taito_f2.c
r23922r23923
710710   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
711711   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
712712   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
713   AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE_LEGACY("tc0280grd", tc0280grd_word_r, tc0280grd_word_w)    /* ROZ tilemap */
714   AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE_LEGACY("tc0280grd", tc0280grd_ctrl_word_w)
715   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
713   AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE("tc0280grd", tc0280grd_device, tc0280grd_word_r, tc0280grd_word_w)    /* ROZ tilemap */
714   AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE("tc0280grd", tc0280grd_device, tc0280grd_ctrl_word_w)
715   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
716716ADDRESS_MAP_END
717717
718718static ADDRESS_MAP_START( megab_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
723723   AM_RANGE(0x180000, 0x180fff) AM_READWRITE(cchip2_word_r, cchip2_word_w) AM_SHARE("cchip2_ram")
724724   AM_RANGE(0x200000, 0x20ffff) AM_RAM
725725   AM_RANGE(0x300000, 0x301fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
726   AM_RANGE(0x400000, 0x40001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
726   AM_RANGE(0x400000, 0x40001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
727727   AM_RANGE(0x600000, 0x60ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
728728   AM_RANGE(0x610000, 0x61ffff) AM_RAM   /* unused? */
729729   AM_RANGE(0x620000, 0x62000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
r23922r23923
742742   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, word_r, word_w)  /* tilemaps */
743743   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn_2", tc0100scn_device, ctrl_word_r, ctrl_word_w)
744744   AM_RANGE(0x600000, 0x60ffff) AM_RAM AM_SHARE("spriteram")
745   AM_RANGE(0x800000, 0x80001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
745   AM_RANGE(0x800000, 0x80001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0xff00)
746746ADDRESS_MAP_END
747747
748748static ADDRESS_MAP_START( cameltry_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
756756   AM_RANGE(0x800000, 0x813fff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
757757   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
758758   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
759   AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE_LEGACY("tc0280grd", tc0280grd_word_r, tc0280grd_word_w)    /* ROZ tilemap */
760   AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE_LEGACY("tc0280grd", tc0280grd_ctrl_word_w)
761   AM_RANGE(0xd00000, 0xd0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
759   AM_RANGE(0xa00000, 0xa01fff) AM_DEVREADWRITE("tc0280grd", tc0280grd_device, tc0280grd_word_r, tc0280grd_word_w)    /* ROZ tilemap */
760   AM_RANGE(0xa02000, 0xa0200f) AM_DEVWRITE("tc0280grd", tc0280grd_device, tc0280grd_ctrl_word_w)
761   AM_RANGE(0xd00000, 0xd0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
762762ADDRESS_MAP_END
763763
764764static ADDRESS_MAP_START( qtorimon_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
784784   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
785785   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
786786   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
787   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
787   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
788788ADDRESS_MAP_END
789789
790790static ADDRESS_MAP_START( quizhq_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
832832   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
833833   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
834834//  AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP   /* ?? */
835   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
835   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
836836ADDRESS_MAP_END
837837
838838static ADDRESS_MAP_START( growl_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
855855   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
856856   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
857857   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
858   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
858   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
859859ADDRESS_MAP_END
860860
861861static ADDRESS_MAP_START( mjnquest_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
883883   AM_RANGE(0x300000, 0x30000f) AM_WRITE(taitof2_spritebank_w) /* updated at $a6e, off irq5 */
884884   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_word_r, tc0480scp_word_w)     /* tilemaps */
885885   AM_RANGE(0x430000, 0x43002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w)
886   AM_RANGE(0x500000, 0x50001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* 500002 written like a watchdog?! */
886   AM_RANGE(0x500000, 0x50001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* 500002 written like a watchdog?! */
887887   AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
888888   AM_RANGE(0x700006, 0x700007) AM_WRITE(taitof2_4p_coin_word_w)
889889   AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSWA")
r23922r23923
909909   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
910910   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
911911   AM_RANGE(0xa20000, 0xa20001) AM_WRITE(koshien_spritebank_w)
912   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
912   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0xff00)
913913ADDRESS_MAP_END
914914
915915static ADDRESS_MAP_START( yuyugogo_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
939939   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
940940   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
941941   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
942   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* b00002 written like a watchdog?! */
942   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* b00002 written like a watchdog?! */
943943ADDRESS_MAP_END
944944
945945static ADDRESS_MAP_START( solfigtr_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
960960   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
961961   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
962962   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
963   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
963   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
964964ADDRESS_MAP_END
965965
966966static ADDRESS_MAP_START( qzquest_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
980980   AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
981981   AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
982982   AM_RANGE(0x300000, 0x30ffff) AM_RAM
983   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0430grw", tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
984   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE_LEGACY("tc0430grw", tc0430grw_ctrl_word_w)
983   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE("tc0430grw", tc0280grd_device, tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
984   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE("tc0430grw", tc0280grd_device, tc0430grw_ctrl_word_w)
985985//  AM_RANGE(0x500000, 0x500001) AM_WRITENOP   /* ??? */
986986   AM_RANGE(0x600000, 0x603fff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
987987   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
988988   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
989989   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
990990   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
991   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
991   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0xff00)
992992   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
993993ADDRESS_MAP_END
994994
r23922r23923
999999//  AM_RANGE(0x42000c, 0x42000f) AM_WRITENOP   /* zeroed */
10001000   AM_RANGE(0x500000, 0x50ffff) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_word_r, tc0480scp_word_w)     /* tilemaps */
10011001   AM_RANGE(0x530000, 0x53002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w)
1002   AM_RANGE(0x600000, 0x60001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)
1002   AM_RANGE(0x600000, 0x60001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)
10031003   AM_RANGE(0x700000, 0x703fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
10041004   AM_RANGE(0x800000, 0x80000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_wordswap_r, halfword_wordswap_w)
10051005   AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
r23922r23923
10461046   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_word_r, tc0480scp_word_w)     /* tilemaps */
10471047//    AM_RANGE(0x42000c, 0x42000f) AM_WRITENOP   /* zeroed */
10481048   AM_RANGE(0x430000, 0x43002f) AM_DEVREADWRITE_LEGACY("tc0480scp", tc0480scp_ctrl_word_r, tc0480scp_ctrl_word_w)
1049   AM_RANGE(0x500000, 0x50001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* uses 500002 like a watchdog !? */
1049   AM_RANGE(0x500000, 0x50001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* uses 500002 like a watchdog !? */
10501050   AM_RANGE(0x600000, 0x601fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
10511051   AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSWA")
10521052   AM_RANGE(0x700002, 0x700003) AM_READ_PORT("DSWB")
r23922r23923
10651065   AM_RANGE(0x400000, 0x400fff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
10661066   AM_RANGE(0x500000, 0x501fff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_word_w) AM_SHARE("paletteram")
10671067   AM_RANGE(0x600000, 0x60ffff) AM_RAM
1068   AM_RANGE(0x700000, 0x70001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
1068   AM_RANGE(0x700000, 0x70001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
10691069   AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("spriteram")
10701070   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
10711071   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
r23922r23923
10851085   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
10861086   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
10871087   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
1088   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
1088   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
10891089   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
10901090ADDRESS_MAP_END
10911091
r23922r23923
11021102   AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
11031103   AM_RANGE(0x920000, 0x92000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11041104   AM_RANGE(0xa00000, 0xa0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
1105   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
1105   AM_RANGE(0xb00000, 0xb0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
11061106ADDRESS_MAP_END
11071107
11081108static ADDRESS_MAP_START( qcrayon2_map, AS_PROGRAM, 16, taitof2_state )
r23922r23923
11141114   AM_RANGE(0x520000, 0x52000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11151115   AM_RANGE(0x600000, 0x67ffff) AM_ROM AM_REGION("extra", 0)   /* extra data rom */
11161116   AM_RANGE(0x700000, 0x70000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
1117   AM_RANGE(0x900000, 0x90001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0x00ff)  /* ?? */
1117   AM_RANGE(0x900000, 0x90001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0x00ff)  /* ?? */
11181118   AM_RANGE(0xa00000, 0xa00001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
11191119   AM_RANGE(0xa00002, 0xa00003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
11201120   AM_RANGE(0xb00000, 0xb017ff) AM_WRITE(taitof2_sprite_extension_w) AM_SHARE("sprite_ext")
r23922r23923
11251125   AM_RANGE(0x200000, 0x200001) AM_DEVWRITE8("tc0140syt", tc0140syt_device, tc0140syt_port_w, 0xff00)
11261126   AM_RANGE(0x200002, 0x200003) AM_DEVREADWRITE8("tc0140syt", tc0140syt_device, tc0140syt_comm_r, tc0140syt_comm_w, 0xff00)
11271127   AM_RANGE(0x300000, 0x30ffff) AM_RAM
1128   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0430grw", tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
1129   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE_LEGACY("tc0430grw", tc0430grw_ctrl_word_w)
1128   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE("tc0430grw", tc0280grd_device, tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
1129   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE("tc0430grw", tc0280grd_device, tc0430grw_ctrl_word_w)
11301130   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
11311131   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
11321132   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11331133   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
1134   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
1134   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0xff00)
11351135   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
11361136   AM_RANGE(0xb00018, 0xb00019) AM_READ_PORT("PADDLE1")
11371137   AM_RANGE(0xb0001a, 0xb0001b) AM_READ_PORT("PADDLE2")
r23922r23923
11421142   AM_RANGE(0x000000, 0x0fffff) AM_ROM
11431143   AM_RANGE(0x200000, 0x200003) AM_READNOP AM_WRITE(driveout_sound_command_w)
11441144   AM_RANGE(0x300000, 0x30ffff) AM_RAM
1145   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE_LEGACY("tc0430grw", tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
1146   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE_LEGACY("tc0430grw", tc0430grw_ctrl_word_w)
1145   AM_RANGE(0x400000, 0x401fff) AM_DEVREADWRITE("tc0430grw", tc0280grd_device, tc0430grw_word_r, tc0430grw_word_w)    /* ROZ tilemap */
1146   AM_RANGE(0x402000, 0x40200f) AM_DEVWRITE("tc0430grw", tc0280grd_device, tc0430grw_ctrl_word_w)
11471147   AM_RANGE(0x700000, 0x701fff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_word_w) AM_SHARE("paletteram")
11481148   AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w)    /* tilemaps */
11491149   AM_RANGE(0x820000, 0x82000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
11501150   AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_SHARE("spriteram")
1151   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8_LEGACY("tc0360pri", tc0360pri_w, 0xff00)
1151   AM_RANGE(0xa00000, 0xa0001f) AM_DEVWRITE8("tc0360pri", tc0360pri_device, write, 0xff00)
11521152   AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("tc0510nio", tc0510nio_device, halfword_r, halfword_w)
11531153   AM_RANGE(0xb00018, 0xb00019) AM_READ_PORT("PADDLE1")
11541154   AM_RANGE(0xb0001a, 0xb0001b) AM_READ_PORT("PADDLE2")
r23922r23923
31023102   MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri_roz)
31033103
31043104   MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
3105   MCFG_TC0430GRW_ADD("tc0280grd", taitof2_tc0280grd_intf)
3105   MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
31063106   MCFG_TC0360PRI_ADD("tc0360pri")
31073107MACHINE_CONFIG_END
31083108
r23922r23923
31553155   MCFG_SCREEN_UPDATE_DRIVER(taitof2_state, screen_update_taitof2_pri_roz)
31563156
31573157   MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
3158   MCFG_TC0430GRW_ADD("tc0280grd", taitof2_tc0280grd_intf)
3158   MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
31593159   MCFG_TC0360PRI_ADD("tc0360pri")
31603160MACHINE_CONFIG_END
31613161
r23922r23923
36043604   MCFG_VIDEO_START_OVERRIDE(taitof2_state,taitof2_dondokod)
36053605
36063606   MCFG_TC0100SCN_ADD("tc0100scn", dondokod_tc0100scn_intf)
3607   MCFG_TC0430GRW_ADD("tc0280grd", taitof2_tc0280grd_intf)
3607   MCFG_TC0280GRD_ADD("tc0280grd", taitof2_tc0280grd_intf)
36083608   MCFG_TC0360PRI_ADD("tc0360pri")
36093609
36103610   /* sound hardware */

Previous 199869 Revisions Next


© 1997-2024 The MAME Team