Previous 199869 Revisions Next

r19386 Friday 7th December, 2012 at 15:51:39 UTC by Curt Coder
(MESS) prof80: Cleanup. (nw)
[src/mess/drivers]prof80.c
[src/mess/machine]ecb_grip.c ecb_grip.h ecbbus.c ecbbus.h

trunk/src/mess/machine/ecbbus.c
r19385r19386
261261{
262262   m_out_nmi_func(state);
263263}
264
265
266//-------------------------------------------------
267//  screen_update -
268//-------------------------------------------------
269
270UINT32 ecbbus_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
271{
272   bool value = false;
273
274   for (int i = 0; i < MAX_ECBBUS_SLOTS; i++)
275   {
276      if (m_ecbbus_device[i] != NULL)
277      {
278         if (m_ecbbus_device[i]->ecbbus_screen_update(screen, bitmap, cliprect))
279         {
280            value = true;
281         }
282      }
283   }
284
285   return value;
286}
trunk/src/mess/machine/ecbbus.h
r19385r19386
113113   DECLARE_WRITE_LINE_MEMBER( int_w );
114114   DECLARE_WRITE_LINE_MEMBER( nmi_w );
115115
116   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
117
118116protected:
119117   // device-level overrides
120118   virtual void device_start();
r19385r19386
154152   virtual void ecbbus_mem_w(offs_t offset, UINT8 data) { };
155153   virtual UINT8 ecbbus_io_r(offs_t offset) { return 0; };
156154   virtual void ecbbus_io_w(offs_t offset, UINT8 data) { };
157   virtual UINT32 ecbbus_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return false; }
158155
159156public:
160157   ecbbus_device  *m_ecb;
trunk/src/mess/machine/ecb_grip.c
r19385r19386
224224
225225void grip_device::crtc_update_row(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
226226{
227   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
228227   int column, bit;
229228
230229   for (column = 0; column < x_count; column++)
r19385r19386
237236         int x = (column * 8) + bit;
238237         int color = m_flash ? 0 : BIT(data, bit);
239238
240         bitmap.pix32(y, x) = palette[color];
239         bitmap.pix32(y, x) = RGB_MONOCHROME_WHITE[color];
241240      }
242241   }
243242}
r19385r19386
285284
286285static const mc6845_interface crtc_intf =
287286{
288   ":" SCREEN_TAG,
287   SCREEN_TAG,
289288   8,
290289   NULL,
291290   grip_update_row,
r19385r19386
533532    MCFG_CPU_PROGRAM_MAP(grip_mem)
534533    MCFG_CPU_IO_MAP(grip_io)
535534
535    // video hardware
536    MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
537    MCFG_SCREEN_REFRESH_RATE(50)
538    MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
539    MCFG_SCREEN_UPDATE_DEVICE(MC6845_TAG, mc6845_device, screen_update)
540    MCFG_SCREEN_SIZE(640, 480)
541    MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
542
536543   // sound hardware
537544   MCFG_SPEAKER_STANDARD_MONO("mono")
538545   MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
r19385r19386
662669   m_sti(*this, Z80STI_TAG),
663670   m_crtc(*this, MC6845_TAG),
664671   m_centronics(*this, CENTRONICS_TAG),
665   m_speaker(*this, SPEAKER_TAG)
672   m_speaker(*this, SPEAKER_TAG),
673   m_video_ram(*this, "video_ram")
666674{
667675}
668676
r19385r19386
675683   m_ecb = machine().device<ecbbus_device>(ECBBUS_TAG);
676684
677685   // allocate video RAM
678   m_video_ram = auto_alloc_array(machine(), UINT8, VIDEORAM_SIZE);
686   m_video_ram.allocate(VIDEORAM_SIZE);
679687
680688   // setup GRIP memory banking
681689   membank("videoram")->configure_entries(0, 2, m_video_ram, 0x8000);
r19385r19386
690698   save_item(NAME(m_vol1));
691699   save_item(NAME(m_keydata));
692700   save_item(NAME(m_kbf));
693   save_pointer(NAME(m_video_ram), VIDEORAM_SIZE);
694701   save_item(NAME(m_lps));
695702   save_item(NAME(m_page));
696703   save_item(NAME(m_flash));
r19385r19386
933940      }
934941   }
935942}
936
937
938//-------------------------------------------------
939//  ecbbus_screen_update - screen update
940//-------------------------------------------------
941
942UINT32 grip_device::ecbbus_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
943{
944   m_crtc->screen_update(screen, bitmap, cliprect);
945
946   return false;
947}
trunk/src/mess/machine/ecb_grip.h
r19385r19386
7373   // device_ecbbus_card_interface overrides
7474   virtual UINT8 ecbbus_io_r(offs_t offset);
7575   virtual void ecbbus_io_w(offs_t offset, UINT8 data);
76   virtual UINT32 ecbbus_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7776
7877private:
7978   required_device<i8255_device> m_ppi;
r19385r19386
9392   int m_kbf;            // keyboard buffer full
9493
9594   // video state
96   UINT8 *m_video_ram;      // video RAM
95   optional_shared_ptr<UINT8> m_video_ram;      // video RAM
9796   int m_lps;            // light pen sense
9897   int m_page;            // video page
9998   int m_flash;         // flash
trunk/src/mess/drivers/prof80.c
r19385r19386
605605    MCFG_CPU_PROGRAM_MAP(prof80_mem)
606606    MCFG_CPU_IO_MAP(prof80_io)
607607
608    // video hardware
609    MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
610    MCFG_SCREEN_REFRESH_RATE(50)
611    MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
612    MCFG_SCREEN_UPDATE_DEVICE(ECBBUS_TAG, ecbbus_device, screen_update)
613    MCFG_SCREEN_SIZE(640, 480)
614    MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
615    MCFG_PALETTE_LENGTH(2)
616    MCFG_PALETTE_INIT(black_and_white)
617
618608   // devices
619609   MCFG_UPD1990A_ADD(UPD1990A_TAG, XTAL_32_768kHz, rtc_intf)
620610   MCFG_UPD765A_ADD(UPD765_TAG, false, true)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team