summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2019-06-25 11:32:28 +0200
committer Dirk Best <mail@dirk-best.de>2019-06-25 11:32:41 +0200
commitfe72c93511ac8feebb511f9831b982bcca84cb0e (patch)
treeeb30a24bfd7360445678b245b240ead568f1e429
parent424a18928d1391623f22b24d5fbe7e0cf1a938a3 (diff)
qvt103: Basic screen rendering
-rw-r--r--src/mame/drivers/qvt103.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/mame/drivers/qvt103.cpp b/src/mame/drivers/qvt103.cpp
index 1afcb0ed483..4aafbef74ca 100644
--- a/src/mame/drivers/qvt103.cpp
+++ b/src/mame/drivers/qvt103.cpp
@@ -23,6 +23,7 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_p_chargen(*this, "chargen")
+ , m_vram(*this, "vram")
{ }
void qvt103(machine_config &config);
@@ -35,20 +36,40 @@ private:
required_device<z80_device> m_maincpu;
required_region_ptr<u8> m_p_chargen;
+ required_shared_ptr<u8> m_vram;
};
u32 qvt103_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
+ for (int col = 0; col < 25; col++)
+ {
+ for (int row = 0; row < 80; row++)
+ {
+ uint8_t code = m_vram[col * 80 + row] & 0x7f;
+
+ for (int y = 0; y < 12; y++)
+ {
+ uint16_t gfx = m_p_chargen[code << 4 | y];
+
+ for (int x = 0; x < 8; x++)
+ bitmap.pix32(col*12 + y, row*8 + (7 - x)) = BIT(gfx, x) ? rgb_t::white() : rgb_t::black();
+ }
+ }
+ }
+
return 0;
}
void qvt103_state::mem_map(address_map &map)
{
+ map.unmap_value_high();
map(0x0000, 0x5fff).rom().region("maincpu", 0);
map(0x6000, 0x6001).rw("kbdmcu", FUNC(i8741a_device::upi41_master_r), FUNC(i8741a_device::upi41_master_w));
+// map(0x6000, 0x6001).lr8("test", [this]() -> u8 { return machine().rand(); }); // uncomment to pass kbd test
map(0x8000, 0x87ff).ram().share("nvram");
map(0xa000, 0xa03f).rw("vpac", FUNC(crt9007_device::read), FUNC(crt9007_device::write));
- map(0xc000, 0xffff).ram(); // not entirely contiguous?
+ map(0xc000, 0xdfff).ram(); // not entirely contiguous?
+ map(0xe000, 0xffff).ram().share("vram");
}
void qvt103_state::io_map(address_map &map)