Previous 199869 Revisions Next

r36620 Wednesday 25th March, 2015 at 02:19:11 UTC by Angelo Salese
Fixed ROM bank for the blitter, one bug left (layer clearance on ranking screen, which I suspect is something to do with the blitter drawing itself) (nw)
[src/build]flags_clang.mak
[src/mame/drivers]ttchamp.c

trunk/src/build/flags_clang.mak
r245131r245132
22   -Wno-cast-align \
33   -Wno-tautological-compare
44
5# caused by dynamic_array being generally awful
6CCOMFLAGS += -Wno-dynamic-class-memaccess
7
85# caused by obj/sdl64d/emu/cpu/tms57002/tms57002.inc
96CCOMFLAGS += -Wno-self-assign-field
107
trunk/src/mame/drivers/ttchamp.c
r245131r245132
9090
9191
9292   UINT16 m_port10;
93   UINT8 m_rombank;
9394
9495   DECLARE_DRIVER_INIT(ttchamp);
9596
r245131r245132
104105
105106
106107
107
108108   UINT16 m_mainram[0x10000 / 2];
109109
110110   int m_spritesinit;
r245131r245132
299299   {
300300   //   printf("%06x: spider_blitter_w %08x %04x %04x (init2) (width?)\n", space.device().safe_pc(), offset * 2, data, mem_mask);
301301      m_spriteswidth = offset & 0xff;
302      //printf("%08x\n",(offset*2) & 0xfff00);
302303     
303      m_spritesinit = 0;
304      m_spritesinit = 3;
304305   }
305306   else
306307   {
r245131r245132
314315      }
315316      else if ((offset >= 0x30000 / 2) && (offset < 0x40000 / 2))
316317      {
318         if(m_spritesinit != 3)
319         {
320            printf("blitter bus write but blitter unselected? %08x %04x\n",offset*2,data);
321            return;
322         }
323         
324         m_spritesinit = 0;
325
317326         // 0x30000-0x3ffff used, on Spider it's 0x20000-0x2ffff
318327         offset &= 0x7fff;
319328
320329         UINT8 *src = m_rom8;
321330
322         if (m_port10 & 2) // NO, wrong for the portraits
331         if (m_rombank)
323332            src += 0x100000;
324333
325334      //   printf("%06x: spider_blitter_w %08x %04x %04x (previous data width %d address %08x)\n", space.device().safe_pc(), offset * 2, data, mem_mask, m_spriteswidth, m_spritesaddr);
r245131r245132
371380   AM_RANGE(0x00000, 0xfffff) AM_READWRITE(ttchamp_mem_r, ttchamp_mem_w)
372381ADDRESS_MAP_END
373382
383/* Re-use same parameters as before (one-shot) */
374384READ16_MEMBER(ttchamp_state::port1e_r)
375385{
386   m_spritesinit = 3;
376387   return 0xff;
377388}
378389
r245131r245132
401412      printf("Check me, i/o 0x10 used with %02x\n",res);
402413}
403414
415/* selects upper bank for the blitter */
404416WRITE16_MEMBER(ttchamp_state::port20_w)
405417{
406418   printf("%06x: port20_w %04x %04x\n", space.device().safe_pc(), data, mem_mask);
407   // seems to somehow be tied to layer clear
408   // might also depend on layer selected with 0x10 tho? written after it
409   /*for (int i = 0; i < 0x8000; i++)
410   {
411   //   m_videoram0[i] = 0x0000;
412      m_videoram2[i] = 0x0000;
413   }*/
414
419   m_rombank = 1;
415420}
416421
422/* selects lower bank for the blitter */
417423WRITE16_MEMBER(ttchamp_state::port62_w)
418424{
419425   printf("%06x: port62_w %04x %04x\n", space.device().safe_pc(), data, mem_mask);
426   m_rombank = 0;
420427}
421428
422429static ADDRESS_MAP_START( ttchamp_io, AS_IO, 16, ttchamp_state )
423   AM_RANGE(0x0000, 0x0001) AM_WRITENOP // startup only
430   AM_RANGE(0x0000, 0x0001) AM_WRITENOP // startup only, nmi enable?
424431
425432   AM_RANGE(0x0002, 0x0003) AM_READ_PORT("SYSTEM")
426433   AM_RANGE(0x0004, 0x0005) AM_READ_PORT("P1_P2")


Previous 199869 Revisions Next


© 1997-2024 The MAME Team