Previous 199869 Revisions Next

r20642 Thursday 31st January, 2013 at 21:52:05 UTC by Wilbert Pol
(MESS) isa_cga.c: Reduced ioport tagmap lookups. (nw)
[src/mess/video]isa_cga.c isa_cga.h

trunk/src/mess/video/isa_cga.c
r20641r20642
143143
144144
145145/* Dipswitch for font selection */
146#define CGA_FONT        (ioport("cga_config")->read() & m_font_selection_mask)
146#define CGA_FONT        (m_cga_config->read() & m_font_selection_mask)
147147
148148/* Dipswitch for monitor selection */
149#define CGA_MONITOR     (ioport("cga_config")->read()&0x1C)
149#define CGA_MONITOR     (m_cga_config->read()&0x1C)
150150#define CGA_MONITOR_RGB         0x00    /* Colour RGB */
151151#define CGA_MONITOR_MONO        0x04    /* Greyscale RGB */
152152#define CGA_MONITOR_COMPOSITE   0x08    /* Colour composite */
r20641r20642
156156
157157/* Dipswitch for chipset selection */
158158/* TODO: Get rid of this; these should be handled by separate classes */
159#define CGA_CHIPSET     (ioport("cga_config")->read() & 0xE0)
159#define CGA_CHIPSET     (m_cga_config->read() & 0xE0)
160160#define CGA_CHIPSET_IBM         0x00    /* Original IBM CGA */
161161#define CGA_CHIPSET_PC1512      0x20    /* PC1512 CGA subset */
162162#define CGA_CHIPSET_PC200       0x40    /* PC200 in CGA mode */
r20641r20642
679679isa8_cga_device::isa8_cga_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
680680      device_t(mconfig, ISA8_CGA, "IBM Color/Graphics Monitor Adapter", tag, owner, clock),
681681      device_isa8_card_interface(mconfig, *this),
682      m_cga_config(*this, "cga_config"),
682683      m_vram_size( 0x4000 )
683684{
684685   m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x1800;
r20641r20642
690691isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock) :
691692      device_t(mconfig, type, name, tag, owner, clock),
692693      device_isa8_card_interface(mconfig, *this),
694      m_cga_config(*this, "cga_config"),
693695      m_vram_size( 0x4000 )
694696{
695697   m_chr_gen_offset[0] = m_chr_gen_offset[2] = 0x1800;
trunk/src/mess/video/isa_cga.h
r20641r20642
3434   virtual const rom_entry *device_rom_region() const;
3535
3636protected:
37   required_ioport m_cga_config;
38
3739   // device-level overrides
3840   virtual void device_start();
3941   virtual void device_reset();

Previous 199869 Revisions Next


© 1997-2024 The MAME Team