summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2021-09-26 22:23:35 -0400
committer arbee <rb6502@users.noreply.github.com>2021-09-26 22:23:35 -0400
commitb44dd68500faeffffb637c75b8b4a8b5bfd6418e (patch)
tree74d38f9263a5fccdab88fd0df1487bda8f41b7a2 /src/mame/video
parentec74c604f1732eeaa5144ec98c9630d59e1993de (diff)
Laser 128 updates: [R. Belmont, Tom Greene]
- Added all currently dumped ROM versions - Support both the original and later hardware versions - Support the built-in mouse interface New clones added as WORKING --------------------------- Laser 128 (original hardware) [R. Belmont, Tom Greene]
Diffstat (limited to 'src/mame/video')
-rw-r--r--src/mame/video/apple2.cpp60
-rw-r--r--src/mame/video/apple2.h1
2 files changed, 61 insertions, 0 deletions
diff --git a/src/mame/video/apple2.cpp b/src/mame/video/apple2.cpp
index 91babf1809a..683002f8bb9 100644
--- a/src/mame/video/apple2.cpp
+++ b/src/mame/video/apple2.cpp
@@ -786,6 +786,66 @@ void a2_video_device::text_update(screen_device &screen, bitmap_ind16 &bitmap, c
}
}
+void a2_video_device::text_update_inverse(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow)
+{
+ uint8_t const *const aux_page = m_aux_ptr ? m_aux_ptr : m_ram_ptr;
+
+ uint32_t const start_address = m_page2 ? 0x800 : 0x400;
+
+ beginrow = (std::max)(beginrow, cliprect.top() - (cliprect.top() % 8));
+ endrow = (std::min)(endrow, cliprect.bottom() - (cliprect.bottom() % 8) + 7);
+
+ const int startrow = (beginrow / 8) * 8;
+ const int stoprow = ((endrow / 8) + 1) * 8;
+ const int startcol = (cliprect.left() / 14);
+ const int stopcol = ((cliprect.right() / 14) + 1);
+
+ //printf("TXT: row %d startcol %d stopcol %d left %d right %d\n", beginrow, startcol, stopcol, cliprect.left(), cliprect.right());
+
+ int fg = 0;
+ int bg = 0;
+ switch (m_sysconfig & 0x03)
+ {
+ case 0: case 4: bg = WHITE; break;
+ case 1: bg = WHITE; break;
+ case 2: bg = GREEN; break;
+ case 3: bg = ORANGE; break;
+ }
+
+ for (int row = startrow; row < stoprow; row += 8)
+ {
+ if (m_80col)
+ {
+ for (int col = startcol; col < stopcol; col++)
+ {
+ /* calculate address */
+ uint32_t const address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col));
+
+ plot_text_character(bitmap, col * 14, row, 1, aux_page[address],
+ fg, bg);
+ plot_text_character(bitmap, col * 14 + 7, row, 1, m_ram_ptr[address],
+ fg, bg);
+ }
+ }
+ else
+ {
+ for (int col = startcol; col < stopcol; col++)
+ {
+ /* calculate address */
+ uint32_t const address = start_address + ((((row/8) & 0x07) << 7) | (((row/8) & 0x18) * 5 + col));
+ if (((m_sysconfig & 7) == 4) && (m_dhires))
+ {
+ u8 tmp = aux_page[address];
+ fg = tmp>>4;
+ bg = tmp & 0xf;
+ }
+
+ plot_text_character(bitmap, col * 14, row, 2, m_ram_ptr[address], fg, bg);
+ }
+ }
+ }
+}
+
void a2_video_device::text_update_orig(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow)
{
int row, col;
diff --git a/src/mame/video/apple2.h b/src/mame/video/apple2.h
index f03fd6a596a..70af5a1d986 100644
--- a/src/mame/video/apple2.h
+++ b/src/mame/video/apple2.h
@@ -51,6 +51,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(an2_w);
void text_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow);
+ void text_update_inverse(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow);
void text_update_ultr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow);
void text_update_orig(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow);
void text_update_spectrum(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int beginrow, int endrow);