Previous 199869 Revisions Next

r40071 Thursday 30th July, 2015 at 10:10:41 UTC by Dirk Best
nascom avc: use standard 3-bit rgb palette
[src/emu/bus/nasbus]avc.c avc.h

trunk/src/emu/bus/nasbus/avc.c
r248582r248583
2525   MCFG_SCREEN_RAW_PARAMS(16250000, 1024, 0, 768, 320, 0, 256)
2626   MCFG_SCREEN_UPDATE_DEVICE("mc6845", mc6845_device, screen_update)
2727
28   MCFG_PALETTE_ADD_3BIT_RGB("palette")
29
2830   MCFG_MC6845_ADD("mc6845", MC6845, "screen", XTAL_16MHz / 8)
2931   MCFG_MC6845_SHOW_BORDER_AREA(false)
3032   MCFG_MC6845_CHAR_WIDTH(6)
r248582r248583
3638   return MACHINE_CONFIG_NAME( nascom_avc );
3739}
3840
39const rgb_t nascom_avc_device::m_palette[] =
40{
41   rgb_t::black,
42   rgb_t(0xff, 0x00, 0x00),
43   rgb_t(0x00, 0xff, 0x00),
44   rgb_t(0xff, 0xff, 0x00),
45   rgb_t(0x00, 0x00, 0xff),
46   rgb_t(0xff, 0x00, 0xff),
47   rgb_t(0x00, 0xff, 0xff),
48   rgb_t::white,
49};
5041
51
5242//**************************************************************************
5343//  LIVE DEVICE
5444//**************************************************************************
r248582r248583
6151   device_t(mconfig, NASCOM_AVC, "Nascom Advanced Video Card", tag, owner, clock, "nascom_avc", __FILE__),
6252   device_nasbus_card_interface(mconfig, *this),
6353   m_crtc(*this, "mc6845"),
54   m_palette(*this, "palette"),
6455   m_control(0x80)
6556{
6657}
r248582r248583
130121      }
131122
132123      // plot the pixel
133      bitmap.pix32(y, x) = m_palette[(b << 2) | (g << 1) | (r << 0)];
124      bitmap.pix32(y, x) = m_palette->pen_color((b << 2) | (g << 1) | (r << 0));
134125   }
135126}
136127
trunk/src/emu/bus/nasbus/avc.h
r248582r248583
4141
4242private:
4343   required_device<mc6845_device> m_crtc;
44   required_device<palette_device> m_palette;
4445
4546   std::vector<UINT8> m_r_ram;
4647   std::vector<UINT8> m_g_ram;
4748   std::vector<UINT8> m_b_ram;
4849
4950   UINT8 m_control;
50
51   static const rgb_t m_palette[];
5251};
5352
5453// device type definition


Previous 199869 Revisions Next


© 1997-2024 The MAME Team