summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author David Haywood <28625134+DavidHaywood@users.noreply.github.com>2020-05-25 02:34:33 +0100
committer GitHub <noreply@github.com>2020-05-24 21:34:33 -0400
commit612950065e8764670730622b9adc7527c8ddc9a6 (patch)
tree2bb52aa785a8e59cef2c2f7ebe4816a995a41fd3 /src/devices/machine
parente3fa7ad47e112fe2887ee2b39775d4b63fd75a72 (diff)
some notes for getting tkmag220 (gpl16250) to show something (nw) (#6737)
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/generalplus_gpl16250soc.cpp16
-rw-r--r--src/devices/machine/generalplus_gpl16250soc.h1
-rw-r--r--src/devices/machine/generalplus_gpl16250soc_video.cpp9
-rw-r--r--src/devices/machine/generalplus_gpl16250soc_video.h2
4 files changed, 17 insertions, 11 deletions
diff --git a/src/devices/machine/generalplus_gpl16250soc.cpp b/src/devices/machine/generalplus_gpl16250soc.cpp
index a58e838f27d..1f5860ceae6 100644
--- a/src/devices/machine/generalplus_gpl16250soc.cpp
+++ b/src/devices/machine/generalplus_gpl16250soc.cpp
@@ -19,7 +19,7 @@
#define LOG_GCM394 (1U << 2)
#define LOG_GCM394_UNMAPPED (1U << 1)
-#define VERBOSE (LOG_GCM394 | LOG_GCM394_UNMAPPED | LOG_GCM394_SYSDMA)
+#define VERBOSE (LOG_GCM394 | LOG_GCM394_IO | LOG_GCM394_UNMAPPED | LOG_GCM394_SYSDMA)
#include "logmacro.h"
@@ -462,43 +462,43 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_786b_portb_attribute_w)
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7870_portc_r)
{
- LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7870_portc_r\n", machine().describe_context());
+ LOGMASKED(LOG_GCM394_IO, "%s:sunplus_gcm394_base_device::ioarea_7870_portc_r\n", machine().describe_context());
return m_portc_in();
}
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7870_portc_w)
{
- LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7870_portc_w %04x\n", machine().describe_context(), data);
+ LOGMASKED(LOG_GCM394_IO, "%s:sunplus_gcm394_base_device::ioarea_7870_portc_w %04x\n", machine().describe_context(), data);
m_7870 = data;
}
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7871_portc_buffer_r)
{
- LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7871_portc_buffer_r\n", machine().describe_context());
+ LOGMASKED(LOG_GCM394_IO, "%s:sunplus_gcm394_base_device::ioarea_7871_portc_buffer_r\n", machine().describe_context());
return 0xffff;// m_7871;
}
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7872_portc_direction_r)
{
- LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7872_portc_direction_r\n", machine().describe_context());
+ LOGMASKED(LOG_GCM394_IO, "%s:sunplus_gcm394_base_device::ioarea_7872_portc_direction_r\n", machine().describe_context());
return m_7872_portc_direction;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7872_portc_direction_w)
{
- LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7872_portc_direction_w %04x\n", machine().describe_context(), data);
+ LOGMASKED(LOG_GCM394_IO, "%s:sunplus_gcm394_base_device::ioarea_7872_portc_direction_w %04x\n", machine().describe_context(), data);
m_7872_portc_direction = data;
}
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7873_portc_attribute_r)
{
- LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7873_portc_attribute_r\n", machine().describe_context());
+ LOGMASKED(LOG_GCM394_IO, "%s:sunplus_gcm394_base_device::ioarea_7873_portc_attribute_r\n", machine().describe_context());
return m_7873_portc_attribute;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7873_portc_attribute_w)
{
- LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7873_portc_attribute_w %04x\n", machine().describe_context(), data);
+ LOGMASKED(LOG_GCM394_IO, "%s:sunplus_gcm394_base_device::ioarea_7873_portc_attribute_w %04x\n", machine().describe_context(), data);
m_7873_portc_attribute = data;
}
diff --git a/src/devices/machine/generalplus_gpl16250soc.h b/src/devices/machine/generalplus_gpl16250soc.h
index 65d2cefe627..14ff23e7d68 100644
--- a/src/devices/machine/generalplus_gpl16250soc.h
+++ b/src/devices/machine/generalplus_gpl16250soc.h
@@ -76,6 +76,7 @@ public:
void set_paldisplaybank_high_hack(int pal_displaybank_high) { m_spg_video->set_paldisplaybank_high(pal_displaybank_high); }
void set_alt_tile_addressing_hack(int alt_tile_addressing) { m_spg_video->set_alt_tile_addressing(alt_tile_addressing); }
void set_pal_sprites_hack(int pal_sprites) { m_spg_video->set_pal_sprites(pal_sprites); }
+ void set_pal_back_hack(int pal_back) { m_spg_video->set_pal_back(pal_back); }
void set_romtype(int romtype) { m_romtype = romtype; }
diff --git a/src/devices/machine/generalplus_gpl16250soc_video.cpp b/src/devices/machine/generalplus_gpl16250soc_video.cpp
index bd0d46524d2..df8cf363e17 100644
--- a/src/devices/machine/generalplus_gpl16250soc_video.cpp
+++ b/src/devices/machine/generalplus_gpl16250soc_video.cpp
@@ -131,6 +131,7 @@ gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig
m_rowzoom(*this, "^rowzoom"),
m_pal_displaybank_high(0),
m_pal_sprites(0x500),
+ m_pal_back(0x100),
m_alt_tile_addressing(0)
{
}
@@ -747,7 +748,7 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca
//palette_offset |= 0x0900;
- palette_offset |= 0x0100;
+ palette_offset |= m_pal_back;
const uint8_t bpp = tileattr & 0x0003;
@@ -1414,8 +1415,10 @@ READ16_MEMBER(gcm394_base_video_device::video_703a_palettebank_r)
WRITE16_MEMBER(gcm394_base_video_device::video_703a_palettebank_w)
{
- // I don't think bit 1 is a bank select, it might be a 'mode select' for how the palette operates.
- // neither lazertag or tkmag220 set it, and they only use 2 banks (0 and 8)
+ // I don't think bit 0 (0x01) is a bank select, it might be a 'mode select' for how the palette operates.
+ // neither lazertag or tkmag220 set it
+ // lazertag uses 2 banks (0 and 8)
+ // tkmag220 only uses 1 bank (0)
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_703a_palettebank_w %04x\n", machine().describe_context(), data);
m_703a_palettebank = data;
diff --git a/src/devices/machine/generalplus_gpl16250soc_video.h b/src/devices/machine/generalplus_gpl16250soc_video.h
index 26103217c8b..5a4e73116a5 100644
--- a/src/devices/machine/generalplus_gpl16250soc_video.h
+++ b/src/devices/machine/generalplus_gpl16250soc_video.h
@@ -33,6 +33,7 @@ public:
void set_paldisplaybank_high(int pal_displaybank_high) { m_pal_displaybank_high = pal_displaybank_high; }
void set_alt_tile_addressing(int alt_tile_addressing) { m_alt_tile_addressing = alt_tile_addressing; }
void set_pal_sprites(int pal_sprites) { m_pal_sprites = pal_sprites; }
+ void set_pal_back(int pal_back) { m_pal_back = pal_back; }
DECLARE_READ16_MEMBER(tmap0_regs_r);
DECLARE_WRITE16_MEMBER(tmap0_regs_w);
@@ -271,6 +272,7 @@ protected:
int m_pal_displaybank_high;
int m_pal_sprites;
+ int m_pal_back;
int m_alt_tile_addressing;
};