some notes for getting tkmag220 (gpl16250) to show something (nw) (#6737)

This commit is contained in:
David Haywood 2020-05-25 02:34:33 +01:00 committed by GitHub
parent e3fa7ad47e
commit 612950065e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 11 deletions

View File

@ -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;
}

View File

@ -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; }

View File

@ -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;

View File

@ -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;
};

View File

@ -440,12 +440,20 @@ void tkmag220_game_state::machine_reset()
m_maincpu->set_paldisplaybank_high_hack(0);
m_maincpu->set_pal_sprites_hack(0x000);
m_maincpu->set_pal_back_hack(0x000);
m_maincpu->set_alt_tile_addressing_hack(1);
}
// the JAKKS ones of these seem to be known as 'Generalplus GPAC500' hardware?
CONS(2009, smartfp, 0, 0, base, smartfp, gcm394_game_state, empty_init, "Fisher-Price", "Fun 2 Learn Smart Fit Park (UK)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
CONS(2009, smartfps, smartfp, 0, base, smartfp, gcm394_game_state, empty_init, "Fisher-Price", "Fun 2 Learn Smart Fit Park (Spain)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND)
// This is a port of the 'Family Sport' games to GPL16250 type hardware, but it doesn't seem to use any unSP 2.0 instructions.
// The menu style is close to 'm505neo' but the game selection is closer to 'dnv200fs' (but without the Sports titles removed, and with a few other extras not found on that unit)
// do "go A1595" then "r1 = 0" in debugger to show menu, controls not yet working (which might be why it drops to test mode by default) will need banking hookup later.
// This could be useful for figuring out how the sound registers have been remapped when compared to spg2xx
CONS(200?, tkmag220, 0, 0, tkmag220, tkmag220, tkmag220_game_state, empty_init, "TaiKee", "Mini Arcade Games Console (Family Sport 220-in-1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS )
// die on this one is 'GCM420'