trunk/src/mame/drivers/4enlinea.c
| r29394 | r29395 | |
| 229 | 229 | * Video Hardware * |
| 230 | 230 | ***********************************/ |
| 231 | 231 | |
| 232 | // TODO: this is actually UM487F |
| 232 | 233 | class isa8_cga_4enlinea_device : public isa8_cga_device |
| 233 | 234 | { |
| 234 | 235 | public: |
| 235 | 236 | // construction/destruction |
| 236 | 237 | isa8_cga_4enlinea_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 237 | 238 | |
| 239 | DECLARE_READ8_MEMBER( _4enlinea_io_read ); |
| 238 | 240 | virtual void device_start(); |
| 239 | 241 | virtual const rom_entry *device_rom_region() const; |
| 240 | 242 | }; |
| r29394 | r29395 | |
| 252 | 254 | } |
| 253 | 255 | |
| 254 | 256 | |
| 257 | READ8_MEMBER( isa8_cga_4enlinea_device::_4enlinea_io_read ) |
| 258 | { |
| 259 | UINT8 data; |
| 255 | 260 | |
| 261 | switch (offset) |
| 262 | { |
| 263 | case 0xa: |
| 264 | data = isa8_cga_device::io_read(space, offset); |
| 265 | data|= (data & 8) << 4; |
| 266 | break; |
| 267 | |
| 268 | default: |
| 269 | data = isa8_cga_device::io_read(space, offset); |
| 270 | break; |
| 271 | } |
| 272 | return data; |
| 273 | } |
| 274 | |
| 275 | |
| 256 | 276 | void isa8_cga_4enlinea_device::device_start() |
| 257 | 277 | { |
| 258 | 278 | if (m_palette != NULL && !m_palette->started()) |
| r29394 | r29395 | |
| 263 | 283 | m_vram.resize(m_vram_size); |
| 264 | 284 | |
| 265 | 285 | m_update_row = NULL; |
| 266 | | m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_cga_device::io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) ); |
| 286 | m_isa->install_device(0x3d0, 0x3df, 0, 0, read8_delegate( FUNC(isa8_cga_4enlinea_device::_4enlinea_io_read), this ), write8_delegate( FUNC(isa8_cga_device::io_write), this ) ); |
| 267 | 287 | m_isa->install_bank(0x8000, 0xbfff, 0, 0, "bank1", m_vram); |
| 268 | 288 | |
| 269 | 289 | /* Initialise the cga palette */ |