trunk/src/mess/includes/gamecom.h
| r241893 | r241894 | |
| 211 | 211 | { |
| 212 | 212 | public: |
| 213 | 213 | gamecom_state(const machine_config &mconfig, device_type type, const char *tag) |
| 214 | | : driver_device(mconfig, type, tag), |
| 215 | | m_maincpu(*this, "maincpu"), |
| 216 | | m_dac(*this, "dac"), |
| 217 | | m_cart1(*this, "cartslot1"), |
| 218 | | m_cart2(*this, "cartslot2"), |
| 219 | | m_p_nvram(*this,"nvram"), |
| 220 | | m_p_videoram(*this,"videoram"), |
| 221 | | m_bank1(*this, "bank1"), |
| 222 | | m_bank2(*this, "bank2"), |
| 223 | | m_bank3(*this, "bank3"), |
| 224 | | m_bank4(*this, "bank4"), |
| 225 | | m_region_maincpu(*this, "maincpu"), |
| 226 | | m_region_kernel(*this, "kernel"), |
| 227 | | m_io_in0(*this, "IN0"), |
| 228 | | m_io_in1(*this, "IN1"), |
| 229 | | m_io_in2(*this, "IN2"), |
| 230 | | m_io_grid(*this, "GRID") |
| 214 | : driver_device(mconfig, type, tag) |
| 215 | , m_p_videoram(*this,"videoram") |
| 216 | , m_p_nvram(*this,"nvram") |
| 217 | , m_maincpu(*this, "maincpu") |
| 218 | , m_dac(*this, "dac") |
| 219 | , m_cart1(*this, "cartslot1") |
| 220 | , m_cart2(*this, "cartslot2") |
| 221 | , m_bank1(*this, "bank1") |
| 222 | , m_bank2(*this, "bank2") |
| 223 | , m_bank3(*this, "bank3") |
| 224 | , m_bank4(*this, "bank4") |
| 225 | , m_region_maincpu(*this, "maincpu") |
| 226 | , m_region_kernel(*this, "kernel") |
| 227 | , m_io_in0(*this, "IN0") |
| 228 | , m_io_in1(*this, "IN1") |
| 229 | , m_io_in2(*this, "IN2") |
| 230 | , m_io_grid(*this, "GRID") |
| 231 | 231 | { } |
| 232 | 232 | |
| 233 | | required_device<cpu_device> m_maincpu; |
| 234 | | required_device<dac_device> m_dac; |
| 235 | | required_device<generic_slot_device> m_cart1; |
| 236 | | required_device<generic_slot_device> m_cart2; |
| 237 | 233 | DECLARE_READ8_MEMBER( gamecom_internal_r ); |
| 238 | 234 | DECLARE_READ8_MEMBER( gamecom_pio_r ); |
| 239 | 235 | DECLARE_WRITE8_MEMBER( gamecom_internal_w ); |
| 240 | 236 | DECLARE_WRITE8_MEMBER( gamecom_pio_w ); |
| 241 | | required_shared_ptr<UINT8> m_p_nvram; |
| 237 | DECLARE_DRIVER_INIT(gamecom); |
| 238 | DECLARE_PALETTE_INIT(gamecom); |
| 239 | INTERRUPT_GEN_MEMBER(gamecom_interrupt); |
| 240 | TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback); |
| 241 | TIMER_CALLBACK_MEMBER(gamecom_scanline); |
| 242 | DECLARE_WRITE8_MEMBER( gamecom_handle_dma ); |
| 243 | DECLARE_WRITE8_MEMBER( gamecom_update_timers ); |
| 244 | DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 ); |
| 245 | DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 ); |
| 246 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 247 | private: |
| 242 | 248 | UINT8 *m_p_ram; |
| 243 | | required_shared_ptr<UINT8> m_p_videoram; |
| 244 | 249 | UINT8 *m_cart_ptr; |
| 250 | UINT8 m_lcdc_reg; |
| 251 | UINT8 m_lch_reg; |
| 252 | UINT8 m_lcv_reg; |
| 253 | UINT16 m_scanline; |
| 254 | UINT16 m_base_address; |
| 245 | 255 | memory_region *m_cart1_rom; |
| 246 | 256 | memory_region *m_cart2_rom; |
| 247 | 257 | emu_timer *m_clock_timer; |
| r241893 | r241894 | |
| 249 | 259 | GAMECOM_DMA m_dma; |
| 250 | 260 | GAMECOM_TIMER m_timer[2]; |
| 251 | 261 | gamecom_sound_t m_sound; |
| 252 | | int m_scanline; |
| 253 | | unsigned int m_base_address; |
| 254 | 262 | bitmap_ind16 m_bitmap; |
| 255 | 263 | void gamecom_set_mmu(UINT8 mmu, UINT8 data); |
| 256 | 264 | void handle_stylus_press(int column); |
| 257 | | UINT8 m_lcdc_reg; |
| 258 | | UINT8 m_lch_reg; |
| 259 | | UINT8 m_lcv_reg; |
| 260 | 265 | void recompute_lcd_params(); |
| 261 | 266 | void handle_input_press(UINT16 mux_data); |
| 262 | | |
| 263 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 264 | | DECLARE_DRIVER_INIT(gamecom); |
| 267 | int common_load(device_image_interface &image, generic_slot_device *slot); |
| 265 | 268 | virtual void machine_reset(); |
| 266 | 269 | virtual void video_start(); |
| 267 | | DECLARE_PALETTE_INIT(gamecom); |
| 268 | | INTERRUPT_GEN_MEMBER(gamecom_interrupt); |
| 269 | | TIMER_CALLBACK_MEMBER(gamecom_clock_timer_callback); |
| 270 | | TIMER_CALLBACK_MEMBER(gamecom_scanline); |
| 271 | | DECLARE_WRITE8_MEMBER( gamecom_handle_dma ); |
| 272 | | DECLARE_WRITE8_MEMBER( gamecom_update_timers ); |
| 273 | | int common_load(device_image_interface &image, generic_slot_device *slot); |
| 274 | | DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart1 ); |
| 275 | | DECLARE_DEVICE_IMAGE_LOAD_MEMBER( gamecom_cart2 ); |
| 276 | | |
| 277 | | protected: |
| 270 | required_shared_ptr<UINT8> m_p_videoram; |
| 271 | required_shared_ptr<UINT8> m_p_nvram; |
| 272 | required_device<cpu_device> m_maincpu; |
| 273 | required_device<dac_device> m_dac; |
| 274 | required_device<generic_slot_device> m_cart1; |
| 275 | required_device<generic_slot_device> m_cart2; |
| 278 | 276 | required_memory_bank m_bank1; |
| 279 | 277 | required_memory_bank m_bank2; |
| 280 | 278 | required_memory_bank m_bank3; |