diff options
Diffstat (limited to 'src/mame/drivers/qx10.cpp')
-rw-r--r-- | src/mame/drivers/qx10.cpp | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp index 91ba7edad9c..46ffbc91272 100644 --- a/src/mame/drivers/qx10.cpp +++ b/src/mame/drivers/qx10.cpp @@ -112,6 +112,7 @@ private: DECLARE_WRITE_LINE_MEMBER( qx10_upd765_interrupt ); void fdd_motor_w(uint8_t data); uint8_t qx10_30_r(); + void zoom_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( tc_w ); uint8_t mc146818_r(offs_t offset); void mc146818_w(offs_t offset, uint8_t data); @@ -180,13 +181,13 @@ private: uint8_t m_cmosram[0x800]; uint8_t m_color_mode; + uint8_t m_zoom; }; UPD7220_DISPLAY_PIXELS_MEMBER( qx10_state::hgdc_display_pixels ) { rgb_t const *const palette = m_palette->palette()->entry_list_raw(); int gfx[3]; - if(m_color_mode) { gfx[0] = m_video_ram[((address) + 0x00000) >> 1]; @@ -206,8 +207,13 @@ UPD7220_DISPLAY_PIXELS_MEMBER( qx10_state::hgdc_display_pixels ) pen = ((gfx[0] >> xi) & 1) ? 1 : 0; pen|= ((gfx[1] >> xi) & 1) ? 2 : 0; pen|= ((gfx[2] >> xi) & 1) ? 4 : 0; - - bitmap.pix(y, x + xi) = palette[pen]; + for (int z = 0; z <= m_zoom; ++z) + { + int xval = ((x+xi)*(m_zoom+1))+z; + if (xval >= bitmap.cliprect().width() * 2) + continue; + bitmap.pix(y, xval) = palette[pen]; + } } } @@ -237,8 +243,8 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( qx10_state::hgdc_draw_text ) for (int xi = 0; xi < 8; xi++) { - int res_x = x * 8 + xi; - int res_y = y + yi; + int res_x = ((x * 8) + xi) * (m_zoom + 1); + int res_y = y + (yi * (m_zoom + 1)); if(!m_screen->visible_area().contains(res_x, res_y)) continue; @@ -249,8 +255,14 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( qx10_state::hgdc_draw_text ) else pen = ((tile_data >> xi) & 1) ? color : 0; - if(pen) - bitmap.pix(res_y, res_x) = palette[pen]; + for (int zx = 0; zx <= m_zoom; ++zx) + { + for (int zy = 0; zy <= m_zoom; ++zy) + { + if(pen) + bitmap.pix(res_y+zy, res_x+zx) = palette[pen]; + } + } } } } @@ -345,6 +357,11 @@ void qx10_state::cmos_sel_w(uint8_t data) update_memory_mapping(); } +void qx10_state::zoom_w(uint8_t data) +{ + m_zoom = data & 0x0f; +} + /*********************************************************** Quickload @@ -596,7 +613,7 @@ void qx10_state::qx10_io(address_map &map) map(0x30, 0x33).rw(FUNC(qx10_state::qx10_30_r), FUNC(qx10_state::fdd_motor_w)); map(0x34, 0x35).m(m_fdc, FUNC(upd765a_device::map)); map(0x38, 0x39).rw(m_hgdc, FUNC(upd7220_device::read), FUNC(upd7220_device::write)); -// map(0x3a, 0x3a) GDC zoom + map(0x3a, 0x3a).w(FUNC(qx10_state::zoom_w)); // map(0x3b, 0x3b) GDC light pen req map(0x3c, 0x3d).rw(FUNC(qx10_state::mc146818_r), FUNC(qx10_state::mc146818_w)); map(0x40, 0x4f).rw(m_dma_1, FUNC(am9517a_device::read), FUNC(am9517a_device::write)); @@ -666,6 +683,8 @@ void qx10_state::machine_reset() m_spkr_enable = 0; m_pit1_out0 = 1; + m_zoom = 0; + m_memprom = 0; m_memcmos = 0; m_membank = 0; |