new NOT WORKING (plug and play systems) (#6156)

* new NOT WORKING
----
4 Player System - 10 in 1  [Sean Riddle, David Haywood]

boots, several of the games are fully playable without sound, several have significant issues, helps provide evidence tho.

* new NOT WORKING
----
Excite Bowling (Japan) [Sean Riddle, Peter Wilhelmsen]

* a few sunplus bits (nw)

* get y-flip out of the way (nw)

* sunplus stuff (nw)

* new NOT WORKING
---
Exciting Stadium DX (Japan) [Sean Ruddle, Peter Wilhelmsen, ShouTime]

* note updates (nw)

* exciting -> excite (nw)

* sunplus (nw)

* sunplus improved logging (nw)

* (nw)

* notes based on other sunplus types (nw)

* notes (nw)

* (nw)

* naming imrpovements (nw)

* naming improvments (nw)
This commit is contained in:
David Haywood 2020-01-11 16:48:23 +00:00 committed by ajrhacker
parent 0c783d89f1
commit e9d61d68cd
10 changed files with 613 additions and 223 deletions

View File

@ -102,13 +102,55 @@ inline void unsp_device::execute_fxxx_001_group(uint16_t op)
if (d)
{
logerror("%s ds:[%04x],%d\n", bitops[bitop], imm16, offset);
unimplemented_opcode(op);
switch (bitop)
{
case 0x0: // tstb
logerror("tstb ds:[%04x],%d\n", imm16, offset);
unimplemented_opcode(op);
break;
case 0x1: // setb
logerror("setb ds:[%04x],%d\n", imm16, offset);
unimplemented_opcode(op);
break;
case 0x2: // clrb
logerror("clrb ds:[%04x],%d\n", imm16, offset);
unimplemented_opcode(op);
break;
case 0x3: // invb
logerror("invb ds:[%04x],%d\n", imm16, offset);
unimplemented_opcode(op);
break;
}
}
else
{
logerror("%s [%04x],%d\n", bitops[bitop], imm16, offset);
unimplemented_opcode(op);
switch (bitop)
{
case 0x0: // tstb
logerror("tstb [%04x],%d\n", imm16, offset);
unimplemented_opcode(op);
break;
case 0x1: // setb (bkrankp uses this)
{
uint16_t temp = read16(imm16);
temp |= (1 << offset);
write16(imm16, temp);
break;
}
case 0x2: // clrb
logerror("clrb [%04x],%d\n", imm16, offset);
unimplemented_opcode(op);
break;
case 0x3: // invb
logerror("invb [%04x],%d\n", imm16, offset);
unimplemented_opcode(op);
break;
}
}
return;

View File

@ -234,6 +234,8 @@ void spg2xx_video_device::draw_bitmap(const rectangle& cliprect, uint32_t scanli
palette = space.read_word(palette_map + realline / 2);
if (scanline & 1)
palette >>= 8;
else
palette &= 0x00ff;
//const int linewidth = 320 / 2;
int sourcebase = tile | (palette << 16); // this is correct for Texas Hold'em - TODO: get from a register?
@ -318,6 +320,8 @@ void spg2xx_video_device::draw_page(const rectangle &cliprect, uint32_t scanline
palette = (ctrl & PAGE_WALLPAPER_MASK) ? space.read_word(palette_map) : space.read_word(palette_map + tile_address / 2);
if (x0 & 1)
palette >>= 8;
else
palette &= 0x00ff;
uint32_t tileattr = attr;
uint32_t tilectrl = ctrl;

View File

@ -85,6 +85,17 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::system_dma_params_channel1_w)
write_dma_params(1, offset, data);
}
READ16_MEMBER(sunplus_gcm394_base_device::system_dma_params_channel2_r)
{
return read_dma_params(2, offset);
}
WRITE16_MEMBER(sunplus_gcm394_base_device::system_dma_params_channel2_w)
{
write_dma_params(2, offset, data);
}
READ16_MEMBER(sunplus_gcm394_base_device::system_dma_status_r)
@ -174,8 +185,15 @@ void sunplus_gcm394_base_device::trigger_systemm_dma(address_space &space, int c
WRITE16_MEMBER(sunplus_gcm394_base_device::system_dma_trigger_w)
{
if (data & 0x01) trigger_systemm_dma(space, 0, data);
if (data & 0x02) trigger_systemm_dma(space, 1, data);
// trigger is value based, not bit based, how many channels are there?
if (data == 1) trigger_systemm_dma(space, 0, data);
else if (data == 2) trigger_systemm_dma(space, 1, data);
else if (data == 3) trigger_systemm_dma(space, 2, data);
else
{
fatalerror("unknown DMA trigger type\n");
}
}
READ16_MEMBER(sunplus_gcm394_base_device::system_dma_memtype_r)
@ -186,10 +204,40 @@ READ16_MEMBER(sunplus_gcm394_base_device::system_dma_memtype_r)
WRITE16_MEMBER(sunplus_gcm394_base_device::system_dma_memtype_w)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::system_dma_memtype_w %04x\n", machine().describe_context(), data);
static char const* const types[16] =
{
"Unused / USB",
"DAC CHA",
"UART TX",
"UART RX",
"SD/MMC",
"NAND Flash",
"Serial Interface",
"DAC CHB",
"ADC Audo Sample Full",
"SPI TX",
"SPI RX",
"RESERVED (c)",
"RESERVED (d)",
"RESERVED (e)",
"RESERVED (f)"
};
m_system_dma_memtype = data;
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::system_dma_memtype_w %04x (CH3: %s | CH2: %s | CH1: %s | CH0: %s )\n", machine().describe_context(), data,
types[((m_system_dma_memtype>>12)&0xf)],
types[((m_system_dma_memtype>>8)&0xf)],
types[((m_system_dma_memtype>>4)&0xf)],
types[((m_system_dma_memtype)&0xf)]);
}
READ16_MEMBER(sunplus_gcm394_base_device::system_7a3a_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::system_7a3a_r\n", machine().describe_context());
return machine().rand();
}
// **************************************** 78xx region with some handling *************************************************
@ -212,9 +260,6 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7819_w) { LOGMASKED(LOG_GCM39
// **************************************** 78xx region stubs *************************************************
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7868_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7868_r\n", machine().describe_context()); return machine().rand(); }
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7869_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7869_r\n", machine().describe_context()); return machine().rand(); }
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_782d_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_782d_r\n", machine().describe_context()); return m_782d; }
WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_782d_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_782d_w %04x\n", machine().describe_context(), data); m_782d = data; }
@ -288,6 +333,8 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7835_w) { LOGMASKED(LOG_GCM39
// IO here?
// Port A
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7860_porta_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7860_porta_r\n", machine().describe_context());
@ -300,59 +347,123 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7860_porta_w)
m_porta_out(data);
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7861_r)
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7861_porta_buffer_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7861_r\n", machine().describe_context());
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7861_porta_buffer_r\n", machine().describe_context());
return 0x0000;// 0xffff;// m_7861;
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7862_r)
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7862_porta_direction_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7862_r\n", machine().describe_context());
return 0x0000;// m_7862;
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7862_porta_direction_r\n", machine().describe_context());
return m_7862_porta_direction;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7862_w)
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7862_porta_direction_w)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7862_w %04x\n", machine().describe_context(), data);
m_7862 = data;
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7862_porta_direction_w %04x\n", machine().describe_context(), data);
m_7862_porta_direction = data;
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7863_r)
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7863_porta_attribute_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7863_r\n", machine().describe_context());
return 0x0000; //0xffff;// m_7863;
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7863_porta_attribute_r\n", machine().describe_context());
return m_7863_porta_attribute;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7863_w)
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7863_porta_attribute_w)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7863_w %04x\n", machine().describe_context(), data);
m_7863 = data;
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7863_porta_attribute_w %04x\n", machine().describe_context(), data);
m_7863_porta_attribute = data;
}
// similar read/write pattern to above, 2nd group?
// Port B
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7870_portb_r)
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7868_portb_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7870_portb_r\n", machine().describe_context());
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7868_portb_r\n", machine().describe_context());
return m_portb_in();
}
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7870_portb_w)
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_7869_portb_buffer_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7870_portb_w %04x\n", machine().describe_context(), data);
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7869_portb_buffer_r\n", machine().describe_context());
return machine().rand();
}
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_7868_portb_w)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_7868_portb_w %04x\n", machine().describe_context(), data);
//m_portb_out(data);
}
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_786a_portb_direction_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_786a_portb_direction_r\n", machine().describe_context());
return m_786a_portb_direction;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_786a_portb_direction_w)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_786a_portb_direction_w %04x\n", machine().describe_context(), data);
m_786a_portb_direction = data;
}
READ16_MEMBER(sunplus_gcm394_base_device::ioarea_786b_portb_attribute_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_786b_portb_attribute_r\n", machine().describe_context());
return m_786b_portb_attribute;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::ioarea_786b_portb_attribute_w)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioarea_786b_portb_attribute_w %04x\n", machine().describe_context(), data);
m_786b_portb_attribute = data;
}
// Port C
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());
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);
m_7870 = data;
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7871_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7871_r\n", machine().describe_context()); return 0xffff;// m_7871;
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());
return 0xffff;// m_7871;
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7872_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7872_r\n", machine().describe_context()); return 0xffff;// m_7872;
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());
return m_7872_portc_direction;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7872_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7872_w %04x\n", machine().describe_context(), data); m_7872 = data; }
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7873_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7873_r\n", machine().describe_context()); return 0xffff;// m_7873;
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);
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());
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);
m_7873_portc_attribute = data;
}
WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7873_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7873_w %04x\n", machine().describe_context(), data); m_7873 = data; }
@ -368,7 +479,7 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_78a0_w) { LOGMASKED(LOG_GCM39
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_78a0_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_78a0_r\n", machine().describe_context());
return machine().rand();
return 0x0000;// machine().rand();
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_78a1_r)
@ -398,7 +509,11 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_78b2_w) { LOGMASKED(LOG_GCM39
WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_78b8_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_78b8_w %04x\n", machine().describe_context(), data); m_78b8 = data; }
WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_78f0_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_78f0_w %04x\n", machine().describe_context(), data); m_78f0 = data; }
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_78d0_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_78d0_r\n", machine().describe_context()); return machine().rand(); }
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_78d0_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_78d0_r\n", machine().describe_context());
return machine().rand();
}
// **************************************** 79xx region stubs *************************************************
@ -415,8 +530,18 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7935_w)
//checkirq6();
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7944_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7944_r\n", machine().describe_context()); return machine().rand(); }
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7945_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7945_r\n", machine().describe_context()); return machine().rand(); }
// these are related to the accelerometer values on jak_g500 (8-bit signed) and also the SPI reads for bkrankp
READ16_MEMBER(sunplus_gcm394_base_device::spi_7944_rxdata_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::spi_7944_rxdata_r\n", machine().describe_context());
return machine().rand();
}
READ16_MEMBER(sunplus_gcm394_base_device::spi_7945_misc_control_reg_r)
{
LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::spi_7945_misc_control_reg_r\n", machine().describe_context());
return machine().rand();// &0x0007;
}
READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7936_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7936_r\n", machine().describe_context()); return 0x0000; }
@ -470,21 +595,23 @@ void sunplus_gcm394_base_device::base_internal_map(address_map &map)
map(0x007010, 0x007015).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap0_regs_r), FUNC(gcm394_base_video_device::tmap0_regs_w));
map(0x007016, 0x00701b).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap1_regs_r), FUNC(gcm394_base_video_device::tmap1_regs_w));
map(0x00701c, 0x00701c).w(m_spg_video, FUNC(gcm394_base_video_device::video_701c_w));
// tilebase LSBs
map(0x007020, 0x007020).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap0_tilebase_lsb_r), FUNC(gcm394_base_video_device::tmap0_tilebase_lsb_w)); // tilebase, written with other tmap0 regs
map(0x007021, 0x007021).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap1_tilebase_lsb_r), FUNC(gcm394_base_video_device::tmap1_tilebase_lsb_w)); // tilebase, written with other tmap1 regs
map(0x007020, 0x007020).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap0_tilebase_lsb_r), FUNC(gcm394_base_video_device::tmap0_tilebase_lsb_w)); // tilebase, written with other tmap0 regs
map(0x007021, 0x007021).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap1_tilebase_lsb_r), FUNC(gcm394_base_video_device::tmap1_tilebase_lsb_w)); // tilebase, written with other tmap1 regs
map(0x007022, 0x007022).rw(m_spg_video, FUNC(gcm394_base_video_device::sprite_7022_gfxbase_lsb_r), FUNC(gcm394_base_video_device::sprite_7022_gfxbase_lsb_w)); // sprite tilebase written as 7022, 702d and 7042 group
map(0x007023, 0x007023).rw(m_spg_video, FUNC(gcm394_base_video_device::unk_vid1_gfxbase_lsb_r), FUNC(gcm394_base_video_device::unk_vid1_gfxbase_lsb_w)); // written with other unknown_video_device1 regs (roz layer or line layer?)
map(0x007024, 0x007024).rw(m_spg_video, FUNC(gcm394_base_video_device::unk_vid2_gfxbase_lsb_r), FUNC(gcm394_base_video_device::unk_vid2_gfxbase_lsb_w)); // written with other unknown_video_device2 regs (roz layer or line layer?)
map(0x007023, 0x007023).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap2_tilebase_lsb_r), FUNC(gcm394_base_video_device::tmap2_tilebase_lsb_w)); // written with other tmap2 regs (roz layer or line layer?)
map(0x007024, 0x007024).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap3_tilebase_lsb_r), FUNC(gcm394_base_video_device::tmap3_tilebase_lsb_w)); // written with other tmap3 regs (roz layer or line layer?)
map(0x00702a, 0x00702a).w(m_spg_video, FUNC(gcm394_base_video_device::video_702a_w)); // blend level control
// tilebase MSBs
map(0x00702b, 0x00702b).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap0_tilebase_msb_r), FUNC(gcm394_base_video_device::tmap0_tilebase_msb_w)); // written with other tmap0 regs
map(0x00702c, 0x00702c).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap1_tilebase_msb_r), FUNC(gcm394_base_video_device::tmap1_tilebase_msb_w)); // written with other tmap1 regs
map(0x00702b, 0x00702b).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap0_tilebase_msb_r), FUNC(gcm394_base_video_device::tmap0_tilebase_msb_w)); // written with other tmap0 regs
map(0x00702c, 0x00702c).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap1_tilebase_msb_r), FUNC(gcm394_base_video_device::tmap1_tilebase_msb_w)); // written with other tmap1 regs
map(0x00702d, 0x00702d).rw(m_spg_video, FUNC(gcm394_base_video_device::sprite_702d_gfxbase_msb_r), FUNC(gcm394_base_video_device::sprite_702d_gfxbase_msb_w)); // sprites, written as 7022, 702d and 7042 group
map(0x00702e, 0x00702e).rw(m_spg_video, FUNC(gcm394_base_video_device::unk_vid1_gfxbase_msb_r), FUNC(gcm394_base_video_device::unk_vid1_gfxbase_msb_w)); // written with other unknown_video_device1 regs (roz layer or line layer?)
map(0x00702f, 0x00702f).rw(m_spg_video, FUNC(gcm394_base_video_device::unk_vid2_gfxbase_msb_r), FUNC(gcm394_base_video_device::unk_vid2_gfxbase_msb_w)); // written with other unknown_video_device2 regs (roz layer or line layer?)
map(0x00702e, 0x00702e).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap2_tilebase_msb_r), FUNC(gcm394_base_video_device::tmap2_tilebase_msb_w)); // written with other tmap2 regs (roz layer or line layer?)
map(0x00702f, 0x00702f).rw(m_spg_video, FUNC(gcm394_base_video_device::tmap3_tilebase_msb_r), FUNC(gcm394_base_video_device::tmap3_tilebase_msb_w)); // written with other tmap3 regs (roz layer or line layer?)
map(0x007030, 0x007030).rw(m_spg_video, FUNC(gcm394_base_video_device::video_7030_brightness_r), FUNC(gcm394_base_video_device::video_7030_brightness_w));
map(0x007038, 0x007038).r(m_spg_video, FUNC(gcm394_base_video_device::video_curline_r));
@ -504,7 +631,7 @@ void sunplus_gcm394_base_device::base_internal_map(address_map &map)
map(0x007072, 0x007072).rw(m_spg_video, FUNC(gcm394_base_video_device::video_dma_size_busy_r), FUNC(gcm394_base_video_device::video_dma_size_trigger_w)); //
// these don't exist on older SPG
map(0x00707c, 0x00707c).r(m_spg_video, FUNC(gcm394_base_video_device::video_707c_r)); // wrlshunt polls this waiting for 0x8000, is this some kind of manual port based data upload?
map(0x00707c, 0x00707c).r(m_spg_video, FUNC(gcm394_base_video_device::video_707c_r)); // wrlshunt polls this waiting for 0x8000, is this some kind of manual port-based data upload?
map(0x00707e, 0x00707e).w(m_spg_video, FUNC(gcm394_base_video_device::video_dma_unk_w)); // written around same time as DMA, seems to select alt sprite bank
map(0x00707f, 0x00707f).rw(m_spg_video, FUNC(gcm394_base_video_device::video_707f_r), FUNC(gcm394_base_video_device::video_707f_w));
@ -524,8 +651,8 @@ void sunplus_gcm394_base_device::base_internal_map(address_map &map)
// 73xx-77xx = video ram
// ######################################################################################################################################################################################
map(0x007100, 0x0071ff).ram().share("unkram1"); // maybe a line table? (assuming DMA isn't writing to wrong place)
map(0x007200, 0x0072ff).ram().share("unkram2"); // ^^
map(0x007100, 0x0071ff).ram().share("rowscroll"); // based on jak_s500
map(0x007200, 0x0072ff).ram().share("rowzoom"); // ^^
map(0x007300, 0x0073ff).rw(m_spg_video, FUNC(gcm394_base_video_device::palette_r), FUNC(gcm394_base_video_device::palette_w));
@ -581,40 +708,36 @@ void sunplus_gcm394_base_device::base_internal_map(address_map &map)
// ######################################################################################################################################################################################
map(0x007860, 0x007860).rw(FUNC(sunplus_gcm394_base_device::ioarea_7860_porta_r), FUNC(sunplus_gcm394_base_device::ioarea_7860_porta_w)); // 7860 I/O PortA Data Register
map(0x007861, 0x007861).r(FUNC(sunplus_gcm394_base_device::unkarea_7861_r)); // 7861 I/O PortA Buffer Register
map(0x007862, 0x007862).rw(FUNC(sunplus_gcm394_base_device::unkarea_7862_r), FUNC(sunplus_gcm394_base_device::unkarea_7862_w)); // 7862 I/O PortA Direction Register
map(0x007863, 0x007863).rw(FUNC(sunplus_gcm394_base_device::unkarea_7863_r), FUNC(sunplus_gcm394_base_device::unkarea_7863_w)); // 7863 I/O PortA Attribute Register
map(0x007861, 0x007861).r(FUNC(sunplus_gcm394_base_device::ioarea_7861_porta_buffer_r)); // 7861 I/O PortA Buffer Register
map(0x007862, 0x007862).rw(FUNC(sunplus_gcm394_base_device::ioarea_7862_porta_direction_r), FUNC(sunplus_gcm394_base_device::ioarea_7862_porta_direction_w)); // 7862 I/O PortA Direction Register
map(0x007863, 0x007863).rw(FUNC(sunplus_gcm394_base_device::ioarea_7863_porta_attribute_r), FUNC(sunplus_gcm394_base_device::ioarea_7863_porta_attribute_w)); // 7863 I/O PortA Attribute Register
map(0x007868, 0x007868).r(FUNC(sunplus_gcm394_base_device::unkarea_7868_r)); // on startup // 7868 I/O PortB Data Register
map(0x007869, 0x007869).r(FUNC(sunplus_gcm394_base_device::unkarea_7869_r)); // 7869 I/O PortB Buffer Register // jak_s500
// 786a I/O PortB Direction Register
// 786b I/O PortB Attribute Register
// 786a I/O PortB Direction Register
map(0x007868, 0x007868).rw(FUNC(sunplus_gcm394_base_device::ioarea_7868_portb_r), FUNC(sunplus_gcm394_base_device::ioarea_7868_portb_w)); // on startup // 7868 I/O PortB Data Register
map(0x007869, 0x007869).r(FUNC(sunplus_gcm394_base_device::ioarea_7869_portb_buffer_r)); // 7869 I/O PortB Buffer Register // jak_s500
map(0x00786a, 0x00786a).rw(FUNC(sunplus_gcm394_base_device::ioarea_786a_portb_direction_r), FUNC(sunplus_gcm394_base_device::ioarea_786a_portb_direction_w)); // 786a I/O PortB Direction Register
map(0x00786b, 0x00786b).rw(FUNC(sunplus_gcm394_base_device::ioarea_786b_portb_attribute_r), FUNC(sunplus_gcm394_base_device::ioarea_786b_portb_attribute_w)); // 786b I/O PortB Attribute Register
// 786c I/O PortB Latch / Wakeup
map(0x007870, 0x007870).rw(FUNC(sunplus_gcm394_base_device::ioarea_7870_portb_r) ,FUNC(sunplus_gcm394_base_device::ioarea_7870_portb_w)); // 7870 I/O PortC Data Register
map(0x007871, 0x007871).r(FUNC(sunplus_gcm394_base_device::unkarea_7871_r)); // 7871 I/O PortC Buffer Register
map(0x007872, 0x007872).rw(FUNC(sunplus_gcm394_base_device::unkarea_7872_r), FUNC(sunplus_gcm394_base_device::unkarea_7872_w)); // 7872 I/O PortC Direction Register
map(0x007873, 0x007873).rw(FUNC(sunplus_gcm394_base_device::unkarea_7873_r), FUNC(sunplus_gcm394_base_device::unkarea_7873_w)); // 7873 I/O PortC Attribute Register
// 7874 (data 0x1249)
// 787c (data 0x1249)
// 787e (data 0x1249)
map(0x007870, 0x007870).rw(FUNC(sunplus_gcm394_base_device::ioarea_7870_portc_r) ,FUNC(sunplus_gcm394_base_device::ioarea_7870_portc_w)); // 7870 I/O PortC Data Register
map(0x007871, 0x007871).r(FUNC(sunplus_gcm394_base_device::ioarea_7871_portc_buffer_r)); // 7871 I/O PortC Buffer Register
map(0x007872, 0x007872).rw(FUNC(sunplus_gcm394_base_device::ioarea_7872_portc_direction_r), FUNC(sunplus_gcm394_base_device::ioarea_7872_portc_direction_w)); // 7872 I/O PortC Direction Register
map(0x007873, 0x007873).rw(FUNC(sunplus_gcm394_base_device::ioarea_7873_portc_attribute_r), FUNC(sunplus_gcm394_base_device::ioarea_7873_portc_attribute_w)); // 7873 I/O PortC Attribute Register
// 7874 (data 0x1249) (bkrankp data 0x36db)
// 787c (data 0x1249) (bkrankp data 0x36db)
// 787e (data 0x1249) (bkrankp data 0x36db)
// 7878 I/O PortD Data Register
// 7879 I/O PortD Buffer Register
// 787a I/O PortD Direction Register
// 787b I/O PortD Attribute Register
// ######################################################################################################################################################################################
// 788x - more IO?
// ######################################################################################################################################################################################
// 7880
map(0x007882, 0x007882).rw(FUNC(sunplus_gcm394_base_device::unkarea_7882_r), FUNC(sunplus_gcm394_base_device::unkarea_7882_w));
map(0x007883, 0x007883).rw(FUNC(sunplus_gcm394_base_device::unkarea_7883_r), FUNC(sunplus_gcm394_base_device::unkarea_7883_w));
// 0x7888 (data 0x1249)
// 0x7888 (data 0x1249) (bkrankp data 0x36db), written with 7874 / 787c / 787e above
// ######################################################################################################################################################################################
// 78ax - interrupt controller?
@ -659,8 +782,12 @@ void sunplus_gcm394_base_device::base_internal_map(address_map &map)
map(0x007935, 0x007935).rw(FUNC(sunplus_gcm394_base_device::unkarea_7935_r), FUNC(sunplus_gcm394_base_device::unkarea_7935_w));
map(0x007936, 0x007936).rw(FUNC(sunplus_gcm394_base_device::unkarea_7936_r), FUNC(sunplus_gcm394_base_device::unkarea_7936_w));
map(0x007944, 0x007944).r(FUNC(sunplus_gcm394_base_device::unkarea_7945_r)); // jak_s500
map(0x007945, 0x007945).r(FUNC(sunplus_gcm394_base_device::unkarea_7945_r)); // jak_s500
//7940 P_SPI_Ctrl - SPI Control Register
//7941 P_SPI_TXStatus - SPI Transmit Status Register
//7942 P_SPI_TXData - SPI Transmit FIFO Register
//7943 P_SPI_RXStatus - SPI Receive Status Register
map(0x007944, 0x007944).r(FUNC(sunplus_gcm394_base_device::spi_7944_rxdata_r)); // 7944 P_SPI_RXData - SPI Receive FIFO Register (jak_s500 accelerometer) (also the SPI ROM DMA input port for bkrankp?)
map(0x007945, 0x007945).r(FUNC(sunplus_gcm394_base_device::spi_7945_misc_control_reg_r)); // 7945 P_SPI_Misc - SPI Misc Control Register (jak_s500 accelerometer)
// possible adc?
map(0x007960, 0x007960).w(FUNC(sunplus_gcm394_base_device::unkarea_7960_w));
@ -670,9 +797,13 @@ void sunplus_gcm394_base_device::base_internal_map(address_map &map)
// 7axx region = system (including dma)
// ######################################################################################################################################################################################
map(0x007a3a, 0x007a3a).r(FUNC(sunplus_gcm394_base_device::system_7a3a_r));
map(0x007a3a, 0x007a3a).r(FUNC(sunplus_gcm394_base_device::system_7a3a_r)); // ?
map(0x007a80, 0x007a86).rw(FUNC(sunplus_gcm394_base_device::system_dma_params_channel0_r), FUNC(sunplus_gcm394_base_device::system_dma_params_channel0_w));
map(0x007a88, 0x007a8e).rw(FUNC(sunplus_gcm394_base_device::system_dma_params_channel1_r), FUNC(sunplus_gcm394_base_device::system_dma_params_channel1_w)); // jak_tsm writes here
map(0x007a90, 0x007a96).rw(FUNC(sunplus_gcm394_base_device::system_dma_params_channel2_r), FUNC(sunplus_gcm394_base_device::system_dma_params_channel2_w)); // bkrankp writes here (is this on all types or just SPI?)
//map(0x007a98, 0x007a9e).rw(FUNC(sunplus_gcm394_base_device::system_dma_params_channel3_r), FUNC(sunplus_gcm394_base_device::system_dma_params_channel3_w)); // not seen, but probably
map(0x007abe, 0x007abe).rw(FUNC(sunplus_gcm394_base_device::system_dma_memtype_r), FUNC(sunplus_gcm394_base_device::system_dma_memtype_w)); // 7abe - written with DMA stuff (source type for each channel so that device handles timings properly?)
map(0x007abf, 0x007abf).rw(FUNC(sunplus_gcm394_base_device::system_dma_status_r), FUNC(sunplus_gcm394_base_device::system_dma_trigger_w));
@ -1062,6 +1193,7 @@ void sunplus_gcm394_base_device::device_start()
m_porta_in.resolve_safe(0);
m_portb_in.resolve_safe(0);
m_portc_in.resolve_safe(0);
m_porta_out.resolve();
@ -1087,12 +1219,16 @@ void sunplus_gcm394_base_device::device_start()
save_item(NAME(m_7835));
save_item(NAME(m_7860));
save_item(NAME(m_7861));
save_item(NAME(m_7862));
save_item(NAME(m_7863));
save_item(NAME(m_7862_porta_direction));
save_item(NAME(m_7863_porta_attribute));
save_item(NAME(m_786a_portb_direction));
save_item(NAME(m_786b_portb_attribute));
save_item(NAME(m_7870));
save_item(NAME(m_7871));
save_item(NAME(m_7872));
save_item(NAME(m_7873));
//save_item(NAME(m_7871));
save_item(NAME(m_7872_portc_direction));
save_item(NAME(m_7873_portc_attribute));
save_item(NAME(m_7882));
save_item(NAME(m_7883));
save_item(NAME(m_78a0));
@ -1120,7 +1256,7 @@ void sunplus_gcm394_base_device::device_reset()
{
unsp_20_device::device_reset();
for (int j = 0; j < 2; j++)
for (int j = 0; j < 3; j++)
{
for (int i = 0; i < 7; i++)
{
@ -1154,15 +1290,18 @@ void sunplus_gcm394_base_device::device_reset()
m_7861 = 0x0000;
m_7862 = 0x0000;
m_7863 = 0x0000;
m_7862_porta_direction = 0x0000;
m_7863_porta_attribute = 0x0000;
m_786a_portb_direction = 0x0000;
m_786b_portb_attribute = 0x0000;
m_7870 = 0x0000;
m_7871 = 0x0000;
//m_7871 = 0x0000;
m_7872 = 0x0000;
m_7873 = 0x0000;
m_7872_portc_direction = 0x0000;
m_7873_portc_attribute = 0x0000;
m_7882 = 0x0000;
m_7883 = 0x0000;

View File

@ -36,6 +36,7 @@ public:
m_internalrom(*this, "internal"),
m_porta_in(*this),
m_portb_in(*this),
m_portc_in(*this),
m_porta_out(*this),
m_nand_read_cb(*this),
m_csbase(0x20000),
@ -51,6 +52,7 @@ public:
auto porta_in() { return m_porta_in.bind(); }
auto portb_in() { return m_portb_in.bind(); }
auto portc_in() { return m_portc_in.bind(); }
auto porta_out() { return m_porta_out.bind(); }
@ -92,10 +94,11 @@ protected:
devcb_read16 m_porta_in;
devcb_read16 m_portb_in;
devcb_read16 m_portc_in;
devcb_write16 m_porta_out;
uint16_t m_dma_params[7][2];
uint16_t m_dma_params[7][3];
// unk 78xx
uint16_t m_7803;
@ -120,15 +123,18 @@ protected:
uint16_t m_7861;
uint16_t m_7862;
uint16_t m_7863;
uint16_t m_7862_porta_direction;
uint16_t m_7863_porta_attribute;
uint16_t m_786a_portb_direction;
uint16_t m_786b_portb_attribute;
uint16_t m_7870;
uint16_t m_7871;
//uint16_t m_7871;
uint16_t m_7872;
uint16_t m_7873;
uint16_t m_7872_portc_direction;
uint16_t m_7873_portc_attribute;
uint16_t m_7882;
uint16_t m_7883;
@ -189,6 +195,8 @@ private:
DECLARE_WRITE16_MEMBER(system_dma_params_channel0_w);
DECLARE_READ16_MEMBER(system_dma_params_channel1_r);
DECLARE_WRITE16_MEMBER(system_dma_params_channel1_w);
DECLARE_READ16_MEMBER(system_dma_params_channel2_r);
DECLARE_WRITE16_MEMBER(system_dma_params_channel2_w);
DECLARE_READ16_MEMBER(system_dma_status_r);
DECLARE_WRITE16_MEMBER(system_dma_trigger_w);
DECLARE_READ16_MEMBER(system_dma_memtype_r);
@ -217,31 +225,38 @@ private:
DECLARE_WRITE16_MEMBER(unkarea_7835_w);
DECLARE_READ16_MEMBER(unkarea_7868_r);
DECLARE_READ16_MEMBER(unkarea_7869_r);
// Port A
DECLARE_READ16_MEMBER(ioarea_7860_porta_r);
DECLARE_WRITE16_MEMBER(ioarea_7860_porta_w);
DECLARE_READ16_MEMBER(ioarea_7861_porta_buffer_r);
DECLARE_READ16_MEMBER(ioarea_7862_porta_direction_r);
DECLARE_WRITE16_MEMBER(ioarea_7862_porta_direction_w);
DECLARE_READ16_MEMBER(ioarea_7863_porta_attribute_r);
DECLARE_WRITE16_MEMBER(ioarea_7863_porta_attribute_w);
// Port B
DECLARE_READ16_MEMBER(ioarea_7868_portb_r);
DECLARE_WRITE16_MEMBER(ioarea_7868_portb_w);
DECLARE_READ16_MEMBER(ioarea_7869_portb_buffer_r);
DECLARE_READ16_MEMBER(ioarea_786a_portb_direction_r);
DECLARE_WRITE16_MEMBER(ioarea_786a_portb_direction_w);
DECLARE_READ16_MEMBER(ioarea_786b_portb_attribute_r);
DECLARE_WRITE16_MEMBER(ioarea_786b_portb_attribute_w);
DECLARE_READ16_MEMBER(unkarea_782d_r);
DECLARE_WRITE16_MEMBER(unkarea_782d_w);
DECLARE_READ16_MEMBER(ioarea_7860_porta_r);
DECLARE_WRITE16_MEMBER(ioarea_7860_porta_w);
DECLARE_READ16_MEMBER(unkarea_7861_r);
DECLARE_READ16_MEMBER(unkarea_7862_r);
DECLARE_WRITE16_MEMBER(unkarea_7862_w);
DECLARE_READ16_MEMBER(unkarea_7863_r);
DECLARE_WRITE16_MEMBER(unkarea_7863_w);
DECLARE_READ16_MEMBER(ioarea_7870_portc_r);
DECLARE_WRITE16_MEMBER(ioarea_7870_portc_w);
DECLARE_READ16_MEMBER(ioarea_7870_portb_r);
DECLARE_WRITE16_MEMBER(ioarea_7870_portb_w);
DECLARE_READ16_MEMBER(ioarea_7871_portc_buffer_r);
DECLARE_READ16_MEMBER(unkarea_7871_r);
DECLARE_READ16_MEMBER(unkarea_7872_r);
DECLARE_WRITE16_MEMBER(unkarea_7872_w);
DECLARE_READ16_MEMBER(unkarea_7873_r);
DECLARE_WRITE16_MEMBER(unkarea_7873_w);
DECLARE_READ16_MEMBER(ioarea_7872_portc_direction_r);
DECLARE_WRITE16_MEMBER(ioarea_7872_portc_direction_w);
DECLARE_READ16_MEMBER(ioarea_7873_portc_attribute_r);
DECLARE_WRITE16_MEMBER(ioarea_7873_portc_attribute_w);
DECLARE_READ16_MEMBER(unkarea_7882_r);
DECLARE_WRITE16_MEMBER(unkarea_7882_w);
@ -280,8 +295,8 @@ private:
DECLARE_READ16_MEMBER(unkarea_7936_r);
DECLARE_WRITE16_MEMBER(unkarea_7936_w);
DECLARE_READ16_MEMBER(unkarea_7944_r);
DECLARE_READ16_MEMBER(unkarea_7945_r);
DECLARE_READ16_MEMBER(spi_7944_rxdata_r);
DECLARE_READ16_MEMBER(spi_7945_misc_control_reg_r);
DECLARE_WRITE16_MEMBER(unkarea_7960_w);
DECLARE_READ16_MEMBER(unkarea_7961_r);
@ -291,10 +306,7 @@ private:
DECLARE_WRITE_LINE_MEMBER(videoirq_w);
DECLARE_WRITE_LINE_MEMBER(audioirq_w);
DECLARE_READ16_MEMBER(system_7a3a_r)
{
return machine().rand();
}
DECLARE_READ16_MEMBER(system_7a3a_r);
void checkirq6();

View File

@ -33,6 +33,8 @@ gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig
m_palette(*this, "palette"),
m_gfxdecode(*this, "gfxdecode"),
m_space_read_cb(*this),
m_rowscroll(*this, "^rowscroll"),
m_rowzoom(*this, "^rowzoom"),
m_global_y_mask(0x1ff),
m_pal_displaybank_high(0),
m_alt_tile_addressing(0)
@ -256,10 +258,10 @@ void gcm394_base_video_device::device_start()
save_item(NAME(m_7088));
save_item(NAME(m_sprite_7022_gfxbase_lsb));
save_item(NAME(m_sprite_702d_gfxbase_msb));
save_item(NAME(m_unk_vid1_gfxbase_lsb));
save_item(NAME(m_unk_vid1_gfxbase_msb));
save_item(NAME(m_unk_vid2_gfxbase_lsb));
save_item(NAME(m_unk_vid2_gfxbase_msb));
save_item(NAME(m_page2_addr_lsb));
save_item(NAME(m_page2_addr_msb));
save_item(NAME(m_page3_addr_lsb));
save_item(NAME(m_page3_addr_msb));
save_item(NAME(m_video_irq_status));
save_item(NAME(m_spriteram));
save_item(NAME(m_spriteextra));
@ -328,10 +330,10 @@ void gcm394_base_video_device::device_reset()
m_sprite_7022_gfxbase_lsb = 0;
m_sprite_702d_gfxbase_msb = 0;
m_unk_vid1_gfxbase_lsb = 0;
m_unk_vid1_gfxbase_msb = 0;
m_unk_vid2_gfxbase_lsb = 0;
m_unk_vid2_gfxbase_msb = 0;
m_page2_addr_lsb = 0;
m_page2_addr_msb = 0;
m_page3_addr_lsb = 0;
m_page3_addr_msb = 0;
}
@ -407,6 +409,7 @@ void gcm394_base_video_device::draw(const rectangle &cliprect, uint32_t line, ui
else if (nc_bpp < 8)
{
// 6bpp
// current_palette_offset |= 0x0800;
}
else
@ -471,33 +474,44 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca
return;
}
if (ctrl_reg & 0x01) // bitmap mode jak_car2 uses this ingame
if (ctrl_reg & 0x01) // bitmap mode jak_car2 and jak_s500 use for the ingame race sections, also have a bitmap test in test mode
{
popmessage("bitmap mode %08x\n", bitmap_addr);
if (ctrl_reg & 0x10)
popmessage("bitmap mode %08x with rowscroll\n", bitmap_addr);
else
popmessage("bitmap mode %08x\n", bitmap_addr);
// note, in interlace modes it appears every other line is unused? (480 entry table, but with blank values)
// and furthermore the rowscroll and rowzoom tables only have 240 entries, not enough for every line
// the end of the rowscroll table (entries 240-255) contain something else, maybe garbage data as it's offscreen, maybe not
uint32_t linebase = space.read_word(tilemap + scanline); // every other word is unused, but there are only enough entries for 240 lines then, sometimes to do with interlace mode?
uint16_t palette = space.read_word(palette_map + (scanline / 2));
if (scanline & 1)
palette >>= 8;
else
palette &= 0xff;
//if (linebase != 0)
// printf("scanline %d linebase %04x palette %04x\n", scanline, linebase, palette);
if (!linebase)
return;
linebase |= ((palette >> 8) << 16);
linebase = linebase | (palette << 16);
int gfxbase = bitmap_addr + linebase;
// this logic works for jak_s500 and the test modes to get the correct base, doesn't seem to work for jak_car2 ingame, maybe data is copied to wrong place?
int gfxbase = (bitmap_addr&0x7ffffff) + (linebase&0x7ffffff);
for (int i = 0; i < 160; i++) // will have to be 320 for jak_car2 ingame
for (int i = 0; i < 160; i++) // will have to be 320 for jak_car2 ingame, jak_s500 lines are wider than screen, and zoomed
{
uint16_t pix = m_space_read_cb((gfxbase++)&0xffffff);
uint16_t pix = m_space_read_cb((gfxbase++)&0x7ffffff);
int xx;
int y_index = scanline * m_screen->width();
uint16_t pal;
if ((scanline >= 0) && (scanline < 480))
{
xx = (i * 2);
xx = i * 2;
pal = (pix & 0xff) | 0x100;
if (xx >= 0 && xx <= cliprect.max_x)
@ -777,8 +791,8 @@ uint32_t gcm394_base_video_device::screen_update(screen_device &screen, bitmap_r
{
draw_page(cliprect, scanline, i, (m_page0_addr_lsb | (m_page0_addr_msb<<16)), m_tmap0_regs, m_tmap0_scroll);
draw_page(cliprect, scanline, i, (m_page1_addr_lsb | (m_page1_addr_msb<<16)), m_tmap1_regs, m_tmap1_scroll);
draw_page(cliprect, scanline, i, (m_unk_vid1_gfxbase_lsb | (m_unk_vid1_gfxbase_msb<<16)), m_tmap2_regs, m_tmap2_scroll);
draw_page(cliprect, scanline, i, (m_unk_vid2_gfxbase_lsb | (m_unk_vid2_gfxbase_msb<<16)), m_tmap3_regs, m_tmap3_scroll);
draw_page(cliprect, scanline, i, (m_page2_addr_lsb | (m_page2_addr_msb<<16)), m_tmap2_regs, m_tmap2_scroll);
draw_page(cliprect, scanline, i, (m_page3_addr_lsb | (m_page3_addr_msb<<16)), m_tmap3_regs, m_tmap3_scroll);
}
draw_sprites(cliprect, scanline, i);
@ -1001,29 +1015,29 @@ WRITE16_MEMBER(gcm394_base_video_device::tmap2_regs_w)
}
}
READ16_MEMBER(gcm394_base_video_device::unk_vid1_gfxbase_lsb_r)
READ16_MEMBER(gcm394_base_video_device::tmap2_tilebase_lsb_r)
{
return m_unk_vid1_gfxbase_lsb;
return m_page2_addr_lsb;
}
WRITE16_MEMBER(gcm394_base_video_device::unk_vid1_gfxbase_lsb_w)
WRITE16_MEMBER(gcm394_base_video_device::tmap2_tilebase_lsb_w)
{
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid1_gfxbase_lsb_w %04x\n", machine().describe_context(), data);
m_unk_vid1_gfxbase_lsb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid1 tilegfxbase is now %04x%04x)\n", m_unk_vid1_gfxbase_msb, m_unk_vid1_gfxbase_lsb);
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::tmap2_tilebase_lsb_w %04x\n", machine().describe_context(), data);
m_page2_addr_lsb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid1 tilegfxbase is now %04x%04x)\n", m_page2_addr_msb, m_page2_addr_lsb);
}
READ16_MEMBER(gcm394_base_video_device::unk_vid1_gfxbase_msb_r)
READ16_MEMBER(gcm394_base_video_device::tmap2_tilebase_msb_r)
{
return m_unk_vid1_gfxbase_msb;
return m_page2_addr_msb;
}
WRITE16_MEMBER(gcm394_base_video_device::unk_vid1_gfxbase_msb_w)
WRITE16_MEMBER(gcm394_base_video_device::tmap2_tilebase_msb_w)
{
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid1_gfxbase_msb_w %04x\n", machine().describe_context(), data);
m_unk_vid1_gfxbase_msb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid1 tilegfxbase is now %04x%04x)\n", m_unk_vid1_gfxbase_msb, m_unk_vid1_gfxbase_lsb);
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::tmap2_tilebase_msb_w %04x\n", machine().describe_context(), data);
m_page2_addr_msb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid1 tilegfxbase is now %04x%04x)\n", m_page2_addr_msb, m_page2_addr_lsb);
}
// **************************************** unknown video device 2 (another tilemap? roz? lines? zooming sprite layer?) *************************************************
@ -1053,30 +1067,30 @@ WRITE16_MEMBER(gcm394_base_video_device::tmap3_regs_w)
}
}
READ16_MEMBER(gcm394_base_video_device::unk_vid2_gfxbase_lsb_r)
READ16_MEMBER(gcm394_base_video_device::tmap3_tilebase_lsb_r)
{
return m_unk_vid2_gfxbase_lsb;
return m_page3_addr_lsb;
}
WRITE16_MEMBER(gcm394_base_video_device::unk_vid2_gfxbase_lsb_w)
WRITE16_MEMBER(gcm394_base_video_device::tmap3_tilebase_lsb_w)
{
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid2_gfxbase_lsb_w %04x\n", machine().describe_context(), data);
m_unk_vid2_gfxbase_lsb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid2 tilegfxbase is now %04x%04x)\n", m_unk_vid2_gfxbase_msb, m_unk_vid2_gfxbase_lsb);
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::tmap3_tilebase_lsb_w %04x\n", machine().describe_context(), data);
m_page3_addr_lsb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid2 tilegfxbase is now %04x%04x)\n", m_page3_addr_msb, m_page3_addr_lsb);
}
READ16_MEMBER(gcm394_base_video_device::unk_vid2_gfxbase_msb_r)
READ16_MEMBER(gcm394_base_video_device::tmap3_tilebase_msb_r)
{
return m_unk_vid2_gfxbase_msb;
return m_page3_addr_msb;
}
WRITE16_MEMBER(gcm394_base_video_device::unk_vid2_gfxbase_msb_w)
WRITE16_MEMBER(gcm394_base_video_device::tmap3_tilebase_msb_w)
{
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid2_gfxbase_msb_w %04x\n", machine().describe_context(), data);
m_unk_vid2_gfxbase_msb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid2 tilegfxbase is now %04x%04x)\n", m_unk_vid2_gfxbase_msb, m_unk_vid2_gfxbase_lsb);
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::tmap3_tilebase_msb_w %04x\n", machine().describe_context(), data);
m_page3_addr_msb = data;
LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid2 tilegfxbase is now %04x%04x)\n", m_page3_addr_msb, m_page3_addr_lsb);
}
// **************************************** sprite control registers *************************************************
@ -1398,6 +1412,11 @@ READ16_MEMBER(gcm394_base_video_device::palette_r)
}
}
WRITE16_MEMBER(gcm394_base_video_device::video_701c_w)
{
LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_701c_w %04x\n", machine().describe_context(), data);
}
void gcm394_base_video_device::check_video_irq()
{

View File

@ -49,17 +49,17 @@ public:
DECLARE_READ16_MEMBER(tmap2_regs_r);
DECLARE_WRITE16_MEMBER(tmap2_regs_w);
DECLARE_READ16_MEMBER(unk_vid1_gfxbase_lsb_r);
DECLARE_READ16_MEMBER(unk_vid1_gfxbase_msb_r);
DECLARE_WRITE16_MEMBER(unk_vid1_gfxbase_lsb_w);
DECLARE_WRITE16_MEMBER(unk_vid1_gfxbase_msb_w);
DECLARE_READ16_MEMBER(tmap2_tilebase_lsb_r);
DECLARE_READ16_MEMBER(tmap2_tilebase_msb_r);
DECLARE_WRITE16_MEMBER(tmap2_tilebase_lsb_w);
DECLARE_WRITE16_MEMBER(tmap2_tilebase_msb_w);
DECLARE_READ16_MEMBER(tmap3_regs_r);
DECLARE_WRITE16_MEMBER(tmap3_regs_w);
DECLARE_READ16_MEMBER(unk_vid2_gfxbase_lsb_r);
DECLARE_READ16_MEMBER(unk_vid2_gfxbase_msb_r);
DECLARE_WRITE16_MEMBER(unk_vid2_gfxbase_lsb_w);
DECLARE_WRITE16_MEMBER(unk_vid2_gfxbase_msb_w);
DECLARE_READ16_MEMBER(tmap3_tilebase_lsb_r);
DECLARE_READ16_MEMBER(tmap3_tilebase_msb_r);
DECLARE_WRITE16_MEMBER(tmap3_tilebase_lsb_w);
DECLARE_WRITE16_MEMBER(tmap3_tilebase_msb_w);
DECLARE_READ16_MEMBER(sprite_7022_gfxbase_lsb_r);
DECLARE_READ16_MEMBER(sprite_702d_gfxbase_msb_r);
@ -114,6 +114,7 @@ public:
DECLARE_READ16_MEMBER(spriteram_r);
DECLARE_READ16_MEMBER(video_7051_r);
DECLARE_WRITE16_MEMBER(video_701c_w);
auto write_video_irq_callback() { return m_video_irq_cb.bind(); };
@ -230,10 +231,10 @@ protected:
uint16_t m_sprite_7022_gfxbase_lsb;
uint16_t m_sprite_702d_gfxbase_msb;
uint16_t m_unk_vid1_gfxbase_lsb;
uint16_t m_unk_vid1_gfxbase_msb;
uint16_t m_unk_vid2_gfxbase_lsb;
uint16_t m_unk_vid2_gfxbase_msb;
uint16_t m_page2_addr_lsb;
uint16_t m_page2_addr_msb;
uint16_t m_page3_addr_lsb;
uint16_t m_page3_addr_msb;
void unk_vid_regs_w(int which, int offset, uint16_t data);
@ -246,6 +247,9 @@ protected:
required_device<palette_device> m_palette;
required_device<gfxdecode_device> m_gfxdecode;
devcb_read16 m_space_read_cb;
required_shared_ptr<uint16_t> m_rowscroll;
required_shared_ptr<uint16_t> m_rowzoom;
int m_maxgfxelement;
void decodegfx(const char* tag);

View File

@ -141,8 +141,7 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_screen(*this, "screen"),
m_io_p1(*this, "P1"),
m_io_p2(*this, "P2"),
m_io(*this, "IN%u", 0U),
m_romregion(*this, "maincpu"),
m_memory(*this, "memory")
{
@ -174,8 +173,7 @@ protected:
required_device<screen_device> m_screen;
required_ioport m_io_p1;
required_ioport m_io_p2;
required_ioport_array<3> m_io;
optional_region_ptr<uint16_t> m_romregion;
@ -183,6 +181,7 @@ protected:
virtual DECLARE_READ16_MEMBER(porta_r);
virtual DECLARE_READ16_MEMBER(portb_r);
virtual DECLARE_READ16_MEMBER(portc_r);
virtual DECLARE_WRITE16_MEMBER(porta_w);
virtual DECLARE_READ16_MEMBER(read_external_space);
@ -382,6 +381,7 @@ protected:
virtual void machine_reset() override;
virtual DECLARE_READ16_MEMBER(porta_r) override;
virtual DECLARE_READ16_MEMBER(portb_r) override;
private:
};
@ -428,11 +428,19 @@ void wrlshunt_game_state::machine_reset()
READ16_MEMBER(jak_s500_game_state::porta_r)
{
uint16_t data = m_io_p1->read();
logerror("Port A Read: %04x\n", data);
uint16_t data = m_io[0]->read();
logerror("%s: Port A Read: %04x\n", machine().describe_context(), data);
return data;
}
READ16_MEMBER(jak_s500_game_state::portb_r)
{
uint16_t data = m_io[1]->read();
logerror("%s: Port B Read: %04x\n", machine().describe_context(), data);
return data;
}
void jak_s500_game_state::machine_reset()
{
cs_callback(0x00, 0x00, 0x00, 0x00, 0x00);
@ -503,18 +511,25 @@ WRITE16_MEMBER(gcm394_game_state::write_external_space)
READ16_MEMBER(gcm394_game_state::porta_r)
{
uint16_t data = m_io_p1->read();
uint16_t data = m_io[0]->read();
logerror("Port A Read: %04x\n", data);
return data;
}
READ16_MEMBER(gcm394_game_state::portb_r)
{
uint16_t data = m_io_p2->read();
uint16_t data = m_io[1]->read();
logerror("Port B Read: %04x\n", data);
return data;
}
READ16_MEMBER(gcm394_game_state::portc_r)
{
uint16_t data = m_io[2]->read();
logerror("Port C Read: %04x\n", data);
return data;
}
WRITE16_MEMBER(gcm394_game_state::porta_w)
{
logerror("%s: Port A:WRITE %04x\n", machine().describe_context(), data);
@ -529,6 +544,7 @@ void gcm394_game_state::base(machine_config &config)
GCM394(config, m_maincpu, 96000000/2, m_screen);
m_maincpu->porta_in().set(FUNC(gcm394_game_state::porta_r));
m_maincpu->portb_in().set(FUNC(gcm394_game_state::portb_r));
m_maincpu->portc_in().set(FUNC(gcm394_game_state::portc_r));
m_maincpu->porta_out().set(FUNC(gcm394_game_state::porta_w));
m_maincpu->space_read_callback().set(FUNC(gcm394_game_state::read_external_space));
m_maincpu->space_write_callback().set(FUNC(gcm394_game_state::write_external_space));
@ -564,7 +580,7 @@ void wrlshunt_game_state::wrlshunt(machine_config &config)
READ16_MEMBER(wrlshunt_game_state::porta_r)
{
uint16_t data = m_io_p1->read();
uint16_t data = m_io[0]->read();
logerror("%s: Port A Read: %04x\n", machine().describe_context(), data);
return data;
}
@ -585,6 +601,7 @@ void generalplus_gpac800_game_state::generalplus_gpac800(machine_config &config)
GPAC800(config, m_maincpu, 96000000/2, m_screen);
m_maincpu->porta_in().set(FUNC(generalplus_gpac800_game_state::porta_r));
m_maincpu->portb_in().set(FUNC(generalplus_gpac800_game_state::portb_r));
m_maincpu->portc_in().set(FUNC(generalplus_gpac800_game_state::portc_r));
m_maincpu->porta_out().set(FUNC(generalplus_gpac800_game_state::porta_w));
m_maincpu->space_read_callback().set(FUNC(generalplus_gpac800_game_state::read_external_space));
m_maincpu->space_write_callback().set(FUNC(generalplus_gpac800_game_state::write_external_space));
@ -694,6 +711,7 @@ void generalplus_gpspispi_game_state::generalplus_gpspispi(machine_config &confi
GP_SPISPI(config, m_maincpu, 96000000/2, m_screen);
m_maincpu->porta_in().set(FUNC(generalplus_gpspispi_game_state::porta_r));
m_maincpu->portb_in().set(FUNC(generalplus_gpspispi_game_state::portb_r));
m_maincpu->portc_in().set(FUNC(generalplus_gpspispi_game_state::portc_r));
m_maincpu->porta_out().set(FUNC(generalplus_gpspispi_game_state::porta_w));
m_maincpu->space_read_callback().set(FUNC(generalplus_gpspispi_game_state::read_external_space));
m_maincpu->space_write_callback().set(FUNC(generalplus_gpspispi_game_state::write_external_space));
@ -738,12 +756,13 @@ void generalplus_gpspispi_bkrankp_game_state::generalplus_gpspispi_bkrankp(machi
}
static INPUT_PORTS_START( gcm394 )
PORT_START("P1")
PORT_START("P2")
PORT_START("IN0")
PORT_START("IN1")
PORT_START("IN2")
INPUT_PORTS_END
static INPUT_PORTS_START( smartfp )
PORT_START("P1")
PORT_START("IN0")
// entirely non-standard mat based controller (0-11 are where your feet are placed normally, row of selection places to step above those)
// no sensible default mapping unless forced
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_Q) PORT_NAME("0")
@ -764,8 +783,11 @@ static INPUT_PORTS_START( smartfp )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_D) PORT_NAME("Triangle / Yellow")
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_F) PORT_NAME("Star / Blue")
PORT_START("P2")
PORT_DIPNAME( 0x0001, 0x0001, "P2" )
PORT_START("IN1")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
PORT_DIPNAME( 0x0001, 0x0001, "IN2" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
@ -814,13 +836,14 @@ static INPUT_PORTS_START( smartfp )
INPUT_PORTS_END
static INPUT_PORTS_START( wrlshunt )
PORT_START("P1")
PORT_START("P2")
PORT_START("IN0")
PORT_START("IN1")
PORT_START("IN2")
INPUT_PORTS_END
static INPUT_PORTS_START( jak_car2 )
PORT_START("P1")
PORT_DIPNAME( 0x0001, 0x0001, "P1" )
PORT_START("IN0")
PORT_DIPNAME( 0x0001, 0x0001, "IN0" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
@ -855,8 +878,11 @@ static INPUT_PORTS_START( jak_car2 )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("P2")
PORT_DIPNAME( 0x0001, 0x0001, "P2" )
PORT_START("IN1")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
PORT_DIPNAME( 0x0001, 0x0001, "IN2" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
@ -907,8 +933,8 @@ static INPUT_PORTS_START( jak_car2 )
INPUT_PORTS_END
static INPUT_PORTS_START( jak_gtg )
PORT_START("P1")
PORT_DIPNAME( 0x0001, 0x0001, "P1" )
PORT_START("IN0")
PORT_DIPNAME( 0x0001, 0x0001, "IN0" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
@ -949,8 +975,11 @@ static INPUT_PORTS_START( jak_gtg )
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_START("P2")
PORT_DIPNAME( 0x0001, 0x0001, "P2" )
PORT_START("IN1")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
PORT_DIPNAME( 0x0001, 0x0001, "IN2" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
@ -1002,8 +1031,8 @@ INPUT_PORTS_END
static INPUT_PORTS_START( jak_s500 )
PORT_START("P1")
PORT_DIPNAME( 0x0001, 0x0001, "P1" )
PORT_START("IN0")
PORT_DIPNAME( 0x0001, 0x0001, "IN0" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
@ -1042,8 +1071,11 @@ static INPUT_PORTS_START( jak_s500 )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_START("P2")
PORT_DIPNAME( 0x0001, 0x0001, "P2" )
PORT_START("IN1")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
PORT_DIPNAME( 0x0001, 0x0001, "IN2" )
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )

View File

@ -20,6 +20,16 @@ The G65816 code on these is VERY ugly and difficult to follow, many redundant st
One of the vectors points to 0x6000, there is nothing mapped there, could it be a small internal ROM or some debug trap for development?
---
4 Player System notes:
Mountain Bike Rally uses scrolling / split (helps confirm the same row skip logic seen in other games when using split)
Turn and Whack (cards) game runs far too quickly (might show us where timer config is)
The Power Game game also appears to run far too quickly
Territory Pursuit uses y-flipped sprites
*/
#include "emu.h"
@ -43,7 +53,8 @@ public:
m_mainram(*this, "mainram"),
m_spriteram(*this, "spriteram"),
m_palram(*this, "palram"),
m_palette(*this, "palette")
m_palette(*this, "palette"),
m_in(*this, "IN%u", 0U)
{ }
void trkfldch(machine_config &config);
@ -63,6 +74,7 @@ private:
required_shared_ptr<uint8_t> m_spriteram;
required_shared_ptr<uint8_t> m_palram;
required_device<palette_device> m_palette;
required_ioport_array<4> m_in;
void draw_sprites(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect, int pri);
void render_text_tile_layer(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect, uint16_t base);
@ -280,14 +292,26 @@ void trkfldch_state::draw_sprites(screen_device& screen, bitmap_ind16& bitmap, c
{
int priority = (m_spriteram[i + 4] & 0x20)>>5;
// list is NOT drawn but instead z sorted, see shadows in trkfldch
// list is NOT drawn in order, but instead z sorted, see shadows in trkfldch
if (priority != pri)
continue;
// logerror("entry %02x %02x %02x %02x %02x\n", m_spriteram[i + 0], m_spriteram[i + 1], m_spriteram[i + 2], m_spriteram[i + 3], m_spriteram[i + 4]);
int tilegfxbase = (m_modebank[0x05] * 0x800);
// --pp tt-y yyyy yyyy tttt tttt yyyy yyyy --zf -t-x
/* m_spriteram[i + 0] --pp tt-y
m_spriteram[i + 1] yyyy yyyy
m_spriteram[i + 2] tttt tttt
m_spriteram[i + 3] xxxx xxxx
m_spriteram[i + 4] --zfF-t-x
p = palette bits
t = tile bites
y = y pos bits
x = x pos bits
z = priority
fF = x/y flip
*/
int y = m_spriteram[i + 1];
int x = m_spriteram[i + 3];
@ -300,6 +324,7 @@ void trkfldch_state::draw_sprites(screen_device& screen, bitmap_ind16& bitmap, c
int pal = 0;
int flipx = m_spriteram[i + 4] & 0x10;
int flipy = m_spriteram[i + 4] & 0x08;
if (tilehigh)
tile += 0x100;
@ -337,7 +362,7 @@ void trkfldch_state::draw_sprites(screen_device& screen, bitmap_ind16& bitmap, c
}
gfx->transpen(bitmap, cliprect, tile + tilegfxbase, pal, flipx, 0, x, y, 0);
gfx->transpen(bitmap, cliprect, tile + tilegfxbase, pal, flipx, flipy, x, y, 0);
}
}
@ -511,6 +536,18 @@ WRITE8_MEMBER(trkfldch_state::tmap1_scroll_window_w)
READ8_MEMBER(trkfldch_state::dmaregs_r)
{
uint8_t ret = m_dmaregs[offset];
switch (offset)
{
case 0x05: // abl4play polls this expecting it to be 0 to continue (probably becomes after DMA is complete, or can show the status in realtime?)
ret = 0x00;
break;
case 0x06: // abl4play polls this expecting it to be 0 to continue (probably becomes after DMA is complete, or can show the status in realtime?)
ret = 0x00;
break;
}
logerror("%s: dmaregs_r %04x (returning %02x)\n", machine().describe_context(), offset, ret);
return ret;
}
@ -728,7 +765,7 @@ void trkfldch_state::trkfldch_map(address_map &map)
map(0x007870, 0x0078ff).rw(FUNC(trkfldch_state::unkregs_r), FUNC(trkfldch_state::unkregs_w));
map(0x008000, 0x3fffff).rom().region("maincpu", 0x000000); // good for code mapped at 008000 and 050000 at least
map(0x008000, 0x7fffff).rom().region("maincpu", 0x000000); // good for code mapped at 008000 and 050000 at least
}
void trkfldch_state::vectors_map(address_map &map)
@ -863,6 +900,9 @@ static INPUT_PORTS_START( trkfldch )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
PORT_START("IN3")
INPUT_PORTS_END
static INPUT_PORTS_START( my1stddr )
@ -905,6 +945,51 @@ static INPUT_PORTS_START( my1stddr )
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
PORT_START("IN3")
INPUT_PORTS_END
static INPUT_PORTS_START( abl4play )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Select")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@ -1092,17 +1177,19 @@ READ8_MEMBER(trkfldch_state::unkregs_r)
{
case 0x00: // read in irq (inputs?)
ret = ioport("IN0")->read();
logerror("%s: unkregs_r %04x (returning %02x)\n", machine().describe_context(), offset, ret);
ret = m_in[0]->read();
logerror("%s: unkregs_r %04x (returning %02x) (Player 1 inputs)\n", machine().describe_context(), offset, ret);
break;
case 0x01:
ret = ioport("IN1")->read();
logerror("%s: unkregs_r %04x (returning %02x)\n", machine().describe_context(), offset, ret);
break;
// 0x02
case 0x03:
logerror("%s: unkregs_r %04x (returning %02x)\n", machine().describe_context(), offset, ret);
ret = m_in[1]->read();
logerror("%s: unkregs_r %04x (returning %02x) (Player 2 inputs)\n", machine().describe_context(), offset, ret);
break;
case 0x04:
@ -1118,9 +1205,20 @@ READ8_MEMBER(trkfldch_state::unkregs_r)
break;
case 0x07:
logerror("%s: unkregs_r %04x (returning %02x)\n", machine().describe_context(), offset, ret);
ret = m_in[2]->read();
logerror("%s: unkregs_r %04x (returning %02x) (Player 3 inputs)\n", machine().describe_context(), offset, ret);
break;
// 0x08
// 0x09
// 0x0a
case 0x0b:
ret = m_in[3]->read();
logerror("%s: unkregs_r %04x (returning %02x) (Player 4 inputs)\n", machine().describe_context(), offset, ret);
break;
case 0x0f:
logerror("%s: unkregs_r %04x (returning %02x)\n", machine().describe_context(), offset, ret);
break;
@ -1328,16 +1426,22 @@ void trkfldch_state::trkfldch(machine_config &config)
}
ROM_START( trkfldch )
ROM_REGION( 0x400000, "maincpu", 0 )
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "trackandfield.bin", 0x000000, 0x400000, CRC(f4f1959d) SHA1(344dbfe8df1897adf77da6e5ca0435c4d47d6842) )
ROM_END
ROM_START( my1stddr )
ROM_REGION( 0x400000, "maincpu", 0 )
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "myfirstddr.bin", 0x000000, 0x400000, CRC(2ef57bfc) SHA1(9feea5adb9de8fe17e915f3a037e8ddd70e58ae7) )
ROM_END
ROM_START( abl4play )
ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "abl4play.bin", 0x000000, 0x800000, CRC(5d57fb70) SHA1(34cdf80dc8cb08e5cd98c724268e4c5f483780d7) )
ROM_END
CONS( 2007, trkfldch, 0, 0, trkfldch, trkfldch,trkfldch_state, empty_init, "Konami", "Track & Field Challenge", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
CONS( 2006, my1stddr, 0, 0, trkfldch, my1stddr,trkfldch_state, empty_init, "Konami", "My First Dance Dance Revolution (US)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Japan version has different songs
CONS( 200?, abl4play, 0, 0, trkfldch, abl4play,trkfldch_state, empty_init, "Advance Bright Ltd", "4 Player System - 10 in 1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )

View File

@ -38,7 +38,7 @@
2007 Tokyo Friend park? perfect! mezase! grand slam!/EPOCH/Japan - - - - - - -
2006 1 Let's TV Play series "Kamen Rider Kabuto" /EPOCH/Japan - - - - - - -
2 Let's TV Play series "Bo-kenger" /EPOCH/Japan - - - - - - -
3 Challenge Ai-chan! Exciting Ping-pong /TAKARATOMY/Japan - - - - - - -
3 Challenge Ai-chan! Exciting Ping-pong /TAKARATOMY/Japan - - - - - - dumped
4 Sasuke & Sportsman Tournament /BANDAI/Japan - - - - - - -
5 Hyper resque, I am a resque team /BANDAI/Japan - - - - - - -
6 Let's TV Play series "Ultraman" /BANDAI/Japan - - - - - - -
@ -69,7 +69,7 @@
17 Toinohgi Onmyo-daisenki /BANDAI/Japan - - - - - - -
2004 1 Accessory cartridge for Super TV computer "Double mouse party"/EPOCH/Japan - - - - - - -
2 Printer for TV computer /EPOCH/Japan - - - - - - -
3 Virtual punching battle of "One Piece" /BANDAI/Japan - - - - - - -
3 Virtual punching battle of "One Piece" /BANDAI/Japan - - - - - - dumped
4 Accessory cartridge for Super TV computer "Doraemon"/EPOCH/Japan - - - - - - -
5 Accessory cartridge for Super TV computer "Hamutaro"/EPOCH/Japan - - - - - - -
6 Super TV computer /EPOCH/Japan - - - - - - -
@ -88,7 +88,7 @@
19 Play TV Madden Football /RADICA/USA 74021 x8 48 4M none SSD 98 PL7351-181 dumped
20 Play TV SSX Snowboarder (and Snowboarder white?) /RADICA/USA 74023 none dumped
21 Disney Princess "Kira-Kira magical lesson" /TOMY/Japan - - - - - - -
22 Mermaid Melody "pichi-pichi Pitch" e-pitch microcomputer pure starter set /TAKARA/Japan - - - - - - -
22 Mermaid Melody "pichi-pichi Pitch" e-pitch microcomputer pure starter set /TAKARA/Japan - - - - - - dumped (same as e-kara Japan)
23 Hello Kitty TV computer /EPOCH/Japan - - - - - - -
24 Gan-Gan Revoultion /TAKARA/Japan - - - - - - -
2003 1 Tokyo Friend Park II /EPOCH/Japan - - - - - - -
@ -100,7 +100,7 @@
7 Croquette! Win a medal! /EPOCH/Japan - - - - - - -
8 Taiko Popira /TAKARA/Japan - - - - - - dumped
9 Together Minimoni, Dancing' Stage! plus /EPOCH/Japan - - - - - - -
10 Evio /TOMY/Japan - - - - - - -
10 Evio /TOMY/Japan - - - - - - dumped (some carts not dumped tho)
11 Together Minimoni,Jumping Party! /EPOCH/Japan - - - - - - -
12 Hamutaro TV computer /EPOCH/Japan - - - - - - -
13 Jara-Ja Land /TAKARA/Japan - - - - - - - (is this the home release of Jala Jaland /atlus/Japan above?)
@ -111,9 +111,9 @@
18 Cartridge for Slot machine TV "King of wild animal" /TAKARA/Japan - - - - - - -
19 ChyoroQ "Burning up Racer /TAKARA/Japan - - - - - - -
20 Super shot! Exciting golf /EPOCH/Japan - - - - - - -
21 PichiPichi Pitchi /TAKARA/Japan - - - - - - -
21 PichiPichi Pitchi /TAKARA/Japan - - - - - - dumped (same as e-kara Japan)
22 Dual Station /TAKARA/Japan - - - - - - -
23 Gei-Geki GoGo! Shooting /TAKARA/Japan - - - - - - -
23 Gei-Geki GoGo! Shooting /TAKARA/Japan - - - - - - dumped
24 Let's fish a big one. Exciting fishing! /EPOCH/Japan - - - - - - -
25 Champion Pinball /TOMY/Japan - - - - - - -
26 Excite Fishing DX EF2J x8 48 4M 24C08 SSD 98 PL7351-181 dumped
@ -121,18 +121,18 @@
2 Wildest computer robot "Daigander" (Korean version) /TAKARA/Korea - - - - - - -
3 Hamutaro's circus /EPOCH/Japan - - - - - - -
4 Doraemon Wakuwaku Kuukihou /EPOCH/Japan - x8 - - - - dumped
5 Strike! Exciting bowling /EPOCH/Japan - - - - - - -
6 e-kara /Hasbro/Spain - - - - - - -
5 Strike! Exciting bowling /EPOCH/Japan - - - - - - dumped
6 e-kara /Hasbro/Spain - - - - - - dumped (has 3 Spanish songs)
7 Starter set for e-kara H.S," Morning sisters" /TAKARA/Japan - - - - - - -
8 e-kara H.S.(headphones set) /TAKARA/Japan - - - - - - -
9 Accessory cartridge for Slot machine TV," Aladdin TV" /TAKARA/Japan - - - - - - -
10 Accessory cartridge for Slot machine TV "Businessman Kintaro/TAKARA/Japan - - - - - - -
9 Accessory cartridge for Slot machine TV," Aladdin TV" /TAKARA/Japan - - - - - - dumped (cart)
10 Accessory cartridge for Slot machine TV "Businessman Kintaro/TAKARA/Japan - - - - - - dumped (cart)
11 Poko-poko Hammers /TAKARA/Japan - - - - - - -
12 e-kara N Angel blue special set /TAKARA/Japan - - - - - - -
13 Together Minimoni,Dancing Stage! /EPOCH/Japan - - - - - - -
14 King of shooting /TOMY/Japan - - - - - - -
15 Knock them out! Exciting boxing /EPOCH/Japan - - - - - - -
16 Popira2 /TAKARA/Japan - - - - - - -
15 Knock them out! Exciting boxing /EPOCH/Japan - - - - - - dumped
16 Popira2 /TAKARA/Japan - - - - - - dumped
17 Zuba-Zuba Blade /TAKARA/Japan - - - - - - -
18 Starter set for e-kara N "Morning sisters" /TAKARA/Japan - - - - - - -
19 e-kara /Hasbro/England - - - - - - dumped? (if same as one of the 'US' sets?)
@ -142,12 +142,12 @@
23 PLAY TV Boxing /RADICA/Japan 72039 x8 48 2M none SSD 98 PA7351-107 dumped
24 PLAY TV Baseball 2 /RADICA/USA 72042 x8 48 2M none SSD 98 PL7351-181 dumped
25 Barbie Dance Party /RADICA/USA,EU - x8 none - - - dumped
26 Compete! Exciting stadium DX /EPOCH/Japan - - - - - - -
26 Compete! Exciting stadium DX /EPOCH/Japan - - - - - - dumped
27 e-kara N /EPOCH/Japan - - - - - - -
28 Who's the ace? Excite Tennis /EPOCH/Japan - - - - - - -
29 Wildest computer robot, "Daigander" /TAKARA/Japan - - - - - - -
30 Cartridge for Slot machine TV "King of wild animal Jr." /TAKARA/Japan - - - - - - -
31 Gachinko Contest! Slot machine TV /DCT/Japan - - - - - - -
30 Cartridge for Slot machine TV "King of wild animal Jr." /TAKARA/Japan - - - - - - dumped? (cart)
31 Gachinko Contest! Slot machine TV /DCT/Japan - - - - - - dumped
32 Beyblade Ultimate shooter /TAKARA/Japan - - - - - - -
2001 1 Ping-pong(Chinese version) /Tenpon/China - - - - - - -
2 TV hockey /TOMY/Japan - - - - - - -
@ -169,7 +169,7 @@
18 Let's construct the town! /TAKARA/Japan - - - - - - -
19 Let's fish black bass! Exciting Fishing /EPOCH/Japan - - - - - - -
20 Baseball Korean version /SONOKONG/Korea - - - - - - -
21 Ping-pong Korean version /SONOKONG/Korea - - - - - - -
21 Ping-pong Korean version /SONOKONG/Korea - - - - - - dumped ('Reeal Ping Pong')
22 e-kara Hello Kitty /TAKARA/Japan - - - - - - -
23 Special box "Morning sisters" /TAKARA/Japan - - - - - - -
24 Gan-Gan Adventure /TAKARA/Japan - - - - - - -
@ -546,6 +546,22 @@ static INPUT_PORTS_START( xavix_i2c )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( epo_bowl )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_MODIFY("IN1")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( ttv_lotr )
PORT_INCLUDE(xavix)
@ -1788,6 +1804,16 @@ ROM_START( epo_efdx )
ROM_LOAD("excitefishing.bin", 0x000000, 0x400000, CRC(9c85b261) SHA1(6a363faed2ec89c5176e46554a98ca1e20132579) )
ROM_END
ROM_START( epo_bowl )
ROM_REGION(0x200000, "bios", ROMREGION_ERASE00)
ROM_LOAD("bowling.bin", 0x000000, 0x200000, CRC(d34f8d9e) SHA1(ebe3792172dc43904b9226beb27f1da89d2388cc) )
ROM_END
ROM_START( epo_esdx )
ROM_REGION(0x400000, "bios", ROMREGION_ERASE00)
ROM_LOAD("baseballdx.bin", 0x000000, 0x400000, CRC(fe2e832e) SHA1(e6343f5e5f52316538d918d0d67c15764aa40f65) )
ROM_END
ROM_START( epo_epp )
ROM_REGION(0x100000, "bios", ROMREGION_ERASE00)
ROM_LOAD("excitepingpong.bin", 0x000000, 0x100000, CRC(1fdb9cbd) SHA1(8ed0c1f6d2708ab6e79f0b9553e587c6446e8338) )
@ -2010,6 +2036,8 @@ CONS( 2002, rad_bdp, 0, 0, xavix, rad_bdp, xavix_state,
CONS( 2002, rad_socr, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Radica / Epoch / SSD Company LTD", "Play TV Soccer", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 2002, epo_esdx, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Excite Stadium DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 2000, epo_epp, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Excite Ping Pong (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 2000, epo_eppk, epo_epp, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD / Sonokong", "Real Ping Pong (Korea)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
@ -2113,6 +2141,9 @@ ROM_START( ban_onep )
ROM_END
CONS( 2002, epo_ebox, 0, 0, xavix2000_nv, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Excite Boxing (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // doesn't use XaviX2000 extra opcodes, but had that type of CPU
// die not confirmed, but uses extra opcodes. (hangs on title screen due to combination of freq_timer_done nested interrupts tripping, and waiting on bits in input ports to change
CONS( 2002, epo_bowl, 0, 0, xavix2000_i2c_24c02, epo_bowl, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Bowling (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
CONS( 2004, epo_sdb, 0, 0, xavix2000_nv_sdb, epo_sdb, xavix_2000_nv_sdb_state, init_xavix, "Epoch / SSD Company LTD", "Super Dash Ball (Japan)", MACHINE_IMPERFECT_SOUND )
CONS( 2005, ttv_sw, 0, 0, xavix2000_i2c_24c02, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )

View File

@ -39135,6 +39135,7 @@ trivrus // 2009 AGT. Trivia R Us
@source:trkfldch.cpp
trkfldch // (c) 2007 Konami
my1stddr // (c) 2006 Konami
abl4play
@source:trs80.cpp
ht108064 // Hradstechnika Szvetkezet HT-1080Z/64
@ -40991,6 +40992,8 @@ rad_snowp //
rad_madf //
rad_fb //
rad_socr //
epo_bowl //
epo_esdx //
epo_epp //
epo_eppk //
epo_epp3 //