diff options
author | Angelo Salese <salese_corp_ltd@email.it> | 2015-03-24 23:57:37 +0100 |
---|---|---|
committer | Angelo Salese <salese_corp_ltd@email.it> | 2015-03-24 23:57:37 +0100 |
commit | a22a633e23de825b804d3782effe38ea037f566f (patch) | |
tree | 9c634cf109ecf9a86e5e2b6671f5b1b4defe7279 | |
parent | 971e1cdd86385b2030bf4b85068674e37398cf5f (diff) |
Global layer clearance is at 0x10 bits 4-5 (nw)
-rw-r--r-- | src/mame/drivers/ttchamp.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 9e97e878c6f..1566f15d97b 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -205,7 +205,7 @@ UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 } } - +#if 0 for (int i = 0; i < 0x8000; i++) { // how are layers cleared? @@ -215,7 +215,8 @@ UINT32 ttchamp_state::screen_update_ttchamp(screen_device &screen, bitmap_ind16 // m_videoram1[i] = 0x0000; // m_videoram2[i] = 0x0000; } - +#endif + return 0; } @@ -381,7 +382,21 @@ READ16_MEMBER(ttchamp_state::ttchamp_blit_start_r) WRITE16_MEMBER(ttchamp_state::port10_w) { + UINT8 res; COMBINE_DATA(&m_port10); + + res = m_port10 & 0xf0; + /* Assume that both bits clears layers. */ + if(res == 0x30) + { + for (int i = 0; i < 0x8000; i++) + { + m_videoram0[i] = 0x0000; + m_videoram2[i] = 0x0000; + } + } + else if(res != 0) + printf("Check me, i/o 0x10 used with %02x\n",res); } WRITE16_MEMBER(ttchamp_state::port20_w) @@ -389,11 +404,11 @@ WRITE16_MEMBER(ttchamp_state::port20_w) printf("%06x: port20_w %04x %04x\n", space.device().safe_pc(), data, mem_mask); // seems to somehow be tied to layer clear // might also depend on layer selected with 0x10 tho? written after it - for (int i = 0; i < 0x8000; i++) + /*for (int i = 0; i < 0x8000; i++) { // m_videoram0[i] = 0x0000; m_videoram2[i] = 0x0000; - } + }*/ } |