diff options
author | 2015-06-04 20:55:45 +0300 | |
---|---|---|
committer | 2015-06-04 20:56:56 +0300 | |
commit | b47963e5a208e96aa872824a8a98b5c93d8583e3 (patch) | |
tree | ec0858b6614cd4963bf449fd9979cd77d5637f6d /src | |
parent | 1c92d1000fbb37b0a22838cebd673a5f00068a68 (diff) |
pentagon.c: get to work all raster effects (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/mess/drivers/pentagon.c | 20 | ||||
-rw-r--r-- | src/mess/includes/spectrum.h | 2 | ||||
-rw-r--r-- | src/mess/video/spectrum.c | 7 |
3 files changed, 26 insertions, 3 deletions
diff --git a/src/mess/drivers/pentagon.c b/src/mess/drivers/pentagon.c index 874335ccd49..61265e75ab4 100644 --- a/src/mess/drivers/pentagon.c +++ b/src/mess/drivers/pentagon.c @@ -29,6 +29,8 @@ public: DECLARE_DIRECT_UPDATE_MEMBER(pentagon_direct); DECLARE_WRITE8_MEMBER(pentagon_port_7ffd_w); + DECLARE_WRITE8_MEMBER(pentagon_scr_w); + DECLARE_WRITE8_MEMBER(pentagon_scr2_w); DECLARE_MACHINE_RESET(pentagon); INTERRUPT_GEN_MEMBER(pentagon_interrupt); TIMER_CALLBACK_MEMBER(irq_on); @@ -132,6 +134,21 @@ WRITE8_MEMBER(pentagon_state::pentagon_port_7ffd_w) pentagon_update_memory(); } +WRITE8_MEMBER(pentagon_state::pentagon_scr_w) +{ + spectrum_UpdateScreenBitmap(); + + *((UINT8*)m_bank2->base() + offset) = data; +} + +WRITE8_MEMBER(pentagon_state::pentagon_scr2_w) +{ + if ((m_port_7ffd_data & 0x0f) == 0x0f || (m_port_7ffd_data & 0x0f) == 5) + spectrum_UpdateScreenBitmap(); + + *((UINT8*)m_bank4->base() + offset) = data; +} + void pentagon_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { switch (id) @@ -184,6 +201,9 @@ MACHINE_RESET_MEMBER(pentagon_state,pentagon) space.install_read_bank(0x0000, 0x3fff, "bank1"); space.unmap_write(0x0000, 0x3fff); + space.install_write_handler(0x4000, 0x5aff, write8_delegate(FUNC(pentagon_state::pentagon_scr_w), this)); + space.install_write_handler(0xc000, 0xdaff, write8_delegate(FUNC(pentagon_state::pentagon_scr2_w), this)); + if (m_beta->started()) { if (strcmp(machine().system().name, "pent1024")==0) diff --git a/src/mess/includes/spectrum.h b/src/mess/includes/spectrum.h index d5dbae057b8..5795c1e3cc0 100644 --- a/src/mess/includes/spectrum.h +++ b/src/mess/includes/spectrum.h @@ -238,7 +238,7 @@ protected: optional_ioport m_io_plus4; void spectrum_UpdateBorderBitmap(); - void spectrum_UpdateScreenBitmap(); + void spectrum_UpdateScreenBitmap(bool eof = false); inline unsigned char get_display_color(unsigned char color, int invert); inline void spectrum_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); void ts2068_hires_scanline(bitmap_ind16 &bitmap, int y, int borderlines); diff --git a/src/mess/video/spectrum.c b/src/mess/video/spectrum.c index 9eaed423e6f..c663aa5b865 100644 --- a/src/mess/video/spectrum.c +++ b/src/mess/video/spectrum.c @@ -71,7 +71,7 @@ void spectrum_state::screen_eof_spectrum(screen_device &screen, bool state) if (state) { spectrum_UpdateBorderBitmap(); - spectrum_UpdateScreenBitmap(); + spectrum_UpdateScreenBitmap(true); m_frame_number++; @@ -198,7 +198,7 @@ PALETTE_INIT_MEMBER(spectrum_state,spectrum) palette.set_pen_colors(0, spectrum_palette, ARRAY_LENGTH(spectrum_palette)); } -void spectrum_state::spectrum_UpdateScreenBitmap() +void spectrum_state::spectrum_UpdateScreenBitmap(bool eof) { unsigned int x = machine().first_screen()->hpos(); unsigned int y = machine().first_screen()->vpos(); @@ -206,6 +206,9 @@ void spectrum_state::spectrum_UpdateScreenBitmap() int height = m_screen_bitmap.height(); + if ((m_previous_screen_x == x) && (m_previous_screen_y == y) && !eof) + return; + if (m_screen_bitmap.valid()) { //printf("update screen from %d,%d to %d,%d\n", m_previous_screen_x, m_previous_screen_y, x, y); |