src/mess/video/abc1600.c
| r12945 | r12946 | |
| 2 | 2 | |
| 3 | 3 | TODO: |
| 4 | 4 | |
| 5 | | - FRAME POL |
| 6 | 5 | - landscape/portrait mode |
| 7 | | - position image based on vsync/hsync |
| 8 | 6 | |
| 9 | 7 | */ |
| 10 | 8 | |
| r12945 | r12946 | |
| 36 | 34 | #define REPLACE BIT(m_flag, 7) |
| 37 | 35 | |
| 38 | 36 | |
| 37 | // image position |
| 38 | #define HFP 96 |
| 39 | #define VFP 23 |
| 40 | |
| 41 | |
| 39 | 42 | // IOWR0 registers |
| 40 | 43 | enum |
| 41 | 44 | { |
| r12945 | r12946 | |
| 949 | 952 | |
| 950 | 953 | void abc1600_state::crtc_update_row(device_t *device, bitmap_t *bitmap, const rectangle *cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param) |
| 951 | 954 | { |
| 952 | | int x = 0; |
| 955 | if (y > 0x3ff) return; |
| 956 | |
| 957 | int x = HFP; |
| 953 | 958 | |
| 954 | 959 | for (int column = 0; column < x_count; column += 2) |
| 955 | 960 | { |
| r12945 | r12946 | |
| 964 | 969 | { |
| 965 | 970 | int color = (BIT(data, 15) ^ PIX_POL) & !BLANK; |
| 966 | 971 | |
| 967 | | *BITMAP_ADDR16(bitmap, y, x++) = color; |
| 972 | *BITMAP_ADDR16(bitmap, y + VFP, x++) = color; |
| 968 | 973 | |
| 969 | 974 | data <<= 1; |
| 970 | 975 | } |
| r12945 | r12946 | |
| 1050 | 1055 | |
| 1051 | 1056 | bool abc1600_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect) |
| 1052 | 1057 | { |
| 1058 | // HACK expand visible area to workaround MC6845 |
| 1059 | screen.set_visible_area(0, 958, 0, 1067); |
| 1060 | |
| 1053 | 1061 | if (m_endisp) |
| 1054 | 1062 | { |
| 1063 | bitmap_fill(&bitmap, &cliprect, FRAME_POL); |
| 1055 | 1064 | m_crtc->update(&bitmap, &cliprect); |
| 1056 | 1065 | } |
| 1057 | 1066 | else |