summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Eric Anderson <ejona86@gmail.com>2023-04-28 11:35:24 -0700
committer GitHub <noreply@github.com>2023-04-29 04:35:24 +1000
commit8dfec677eecdc0cf8feba468596d52f75780402f (patch)
tree82b5f806979baa2da7469871d4d19c6969135d68
parent881c35bb9d0583bd9089bbbb53cdaace88f9748f (diff)
vectorgraphic/sbcvideo.cpp: Fix color accuracy and addressing bugs. (#11146)
-rw-r--r--src/mame/vectorgraphic/sbcvideo.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mame/vectorgraphic/sbcvideo.cpp b/src/mame/vectorgraphic/sbcvideo.cpp
index eb9a7918f66..5c0cc227450 100644
--- a/src/mame/vectorgraphic/sbcvideo.cpp
+++ b/src/mame/vectorgraphic/sbcvideo.cpp
@@ -32,10 +32,11 @@ void vector_sbc_video_device::res320_mapping_ram_w(offs_t offset, uint8_t data)
static inline rgb_t raw_4bit_to_rgb(uint8_t enc, bool color)
{
if (color) {
+ // 7200-0001 page 83. Ordering: IBGR
+ enc = (enc & 0xa) | (BIT(enc, 0) << 2) | BIT(enc, 2);
return rgb_t(cga_palette[enc][0], cga_palette[enc][1], cga_palette[enc][2]);
} else {
- // 7200-0001 page 209 C1. Flip R and G
- enc = (enc & 0xc) | (BIT(enc, 0, 1) << 1) | BIT(enc, 1, 1);
+ // 7200-0001 page 209 C11
uint8_t px = enc | (enc << 4);
return rgb_t(0, px, 0);
}
@@ -58,7 +59,7 @@ MC6845_UPDATE_ROW(vector_sbc_video_device::update_row)
uint32_t addr = BIT(ma, 0, 10); // U82 U100
uint8_t jumper_c = (m_io_sbc_video_conf->read() >> 1) & 0x7;
if (graph)
- addr |= (ra | (BIT(ma, 11, 2) << 4)) << 10; // U81
+ addr |= (ra | (BIT(ma, 11, 3) << 4)) << 10; // U81
else
addr |= (BIT(ma, 10, 4) | (jumper_c << 4)) << 10; // U99
addr <<= 1;
@@ -165,14 +166,14 @@ INPUT_PORTS_START( sbc_video )
PORT_CONFSETTING(0x001, DEF_STR(Yes))
PORT_CONFNAME(0x00e, 0x002, "Alpha Graphic Memory Block")
- PORT_CONFSETTING(0x000, "0x00000-0x07FFFF")
- PORT_CONFSETTING(0x002, "0x08000-0x0FFFFF")
- PORT_CONFSETTING(0x004, "0x10000-0x17FFFF")
- PORT_CONFSETTING(0x006, "0x18000-0x1FFFFF")
- PORT_CONFSETTING(0x008, "0x20000-0x27FFFF")
- PORT_CONFSETTING(0x00a, "0x28000-0x2FFFFF")
- PORT_CONFSETTING(0x00c, "0x30000-0x37FFFF")
- PORT_CONFSETTING(0x00e, "0x38000-0x3FFFFF")
+ PORT_CONFSETTING(0x000, "0x00000-0x07FFF")
+ PORT_CONFSETTING(0x002, "0x08000-0x0FFFF")
+ PORT_CONFSETTING(0x004, "0x10000-0x17FFF")
+ PORT_CONFSETTING(0x006, "0x18000-0x1FFFF")
+ PORT_CONFSETTING(0x008, "0x20000-0x27FFF")
+ PORT_CONFSETTING(0x00a, "0x28000-0x2FFFF")
+ PORT_CONFSETTING(0x00c, "0x30000-0x37FFF")
+ PORT_CONFSETTING(0x00e, "0x38000-0x3FFFF")
INPUT_PORTS_END
ioport_constructor vector_sbc_video_device::device_input_ports() const