Previous 199869 Revisions Next

r33964 Friday 19th December, 2014 at 18:11:28 UTC by Jonathan Gevaryahu
tms5110.c: implement output and read bit commands. [Lord Nightmare]
[src/emu/sound]tms5110.c tms5110.h
[src/mame/drivers]gundealr.c segahang.c segaorun.c segas16a.c segas16b.c segas18.c segaxbd.c segaybd.c
[src/mame/includes]segaorun.h segas16b.h segas18.h
[src/mame/video]segahang.c segaic16.c segaic16.h segaorun.c segas16a.c segas16b.c segas18.c segaxbd.c segaybd.c tc0480scp.c
[src/osd/windows]windows.mak

trunk/src/emu/sound/tms5110.c
r242475r242476
7979
8080/* States for CTL */
8181
82#define CTL_STATE_INPUT         (0)
83#define CTL_STATE_OUTPUT        (1)
84#define CTL_STATE_NEXT_OUTPUT   (2)
82// ctl bus is input to tms51xx
83#define CTL_STATE_INPUT               (0)
84// ctl bus is outputting a test talk command on CTL1(bit 0)
85#define CTL_STATE_TTALK_OUTPUT        (1)
86// ctl bus is switching direction, next will be above
87#define CTL_STATE_NEXT_TTALK_OUTPUT   (2)
88// ctl bus is outputting a read nybble 'output' command on CTL1,2,4,8 (bits 0-3)
89#define CTL_STATE_OUTPUT              (3)
90// ctl bus is switching direction, next will be above
91#define CTL_STATE_NEXT_OUTPUT         (4)
8592
93
94
8695/* Pull in the ROM tables */
8796#include "tms5110r.inc"
8897
r242475r242476
125134
126135void tms5110_device::new_int_write_addr(UINT8 addr)
127136{
128   new_int_write(1, 0, 1, addr);
129   new_int_write(0, 0, 1, addr);
130   new_int_write(1, 0, 0, addr);
131   new_int_write(0, 0, 0, addr);
137   new_int_write(1, 0, 1, addr); // romclk 1, m0 0, m1 1, addr bus nybble = xxxx
138   new_int_write(0, 0, 1, addr); // romclk 0, m0 0, m1 1, addr bus nybble = xxxx
139   new_int_write(1, 0, 0, addr); // romclk 1, m0 0, m1 0, addr bus nybble = xxxx
140   new_int_write(0, 0, 0, addr); // romclk 0, m0 0, m1 0, addr bus nybble = xxxx
132141}
133142
134143UINT8 tms5110_device::new_int_read()
135144{
136   new_int_write(1, 1, 0, 0);
137   new_int_write(0, 1, 0, 0);
138   new_int_write(1, 0, 0, 0);
139   new_int_write(0, 0, 0, 0);
145   new_int_write(1, 1, 0, 0); // romclk 1, m0 1, m1 0, addr bus nybble = 0/open bus
146   new_int_write(0, 1, 0, 0); // romclk 0, m0 1, m1 0, addr bus nybble = 0/open bus
147   new_int_write(1, 0, 0, 0); // romclk 1, m0 0, m1 0, addr bus nybble = 0/open bus
148   new_int_write(0, 0, 0, 0); // romclk 0, m0 0, m1 0, addr bus nybble = 0/open bus
140149   if (!m_data_cb.isnull())
141150      return m_data_cb();
142151   return 0;
r242475r242476
179188   save_item(NAME(m_address));
180189   save_item(NAME(m_schedule_dummy_read));
181190   save_item(NAME(m_addr_bit));
191   save_item(NAME(m_CTL_buffer));
182192
183193   save_item(NAME(m_x));
184194
r242475r242476
587597         case CTL_STATE_INPUT:
588598            /* continue */
589599            break;
600         case CTL_STATE_NEXT_TTALK_OUTPUT:
601            m_state = CTL_STATE_TTALK_OUTPUT;
602            return;
603         case CTL_STATE_TTALK_OUTPUT:
604            m_state = CTL_STATE_INPUT;
605            return;
590606         case CTL_STATE_NEXT_OUTPUT:
591607            m_state = CTL_STATE_OUTPUT;
592608            return;
r242475r242476
607623         {
608624            switch (m_CTL_pins & 0xe) /*CTL1 - don't care*/
609625            {
610            case TMS5110_CMD_SPEAK:
626            case TMS5110_CMD_RESET:
611627               perform_dummy_read();
612               m_speaking_now = 1;
628               reset();
629               break;
613630
614               //should FIFO be cleared now ?????
631            case TMS5110_CMD_LOAD_ADDRESS:
632               m_next_is_address = TRUE;
615633               break;
616634
617            case TMS5110_CMD_RESET:
635            case TMS5110_CMD_OUTPUT:
636               m_state = CTL_STATE_NEXT_OUTPUT;
637               break;
638
639            case TMS5110_CMD_SPKSLOW:
618640               perform_dummy_read();
619               reset();
641               m_speaking_now = 1;
642               //should FIFO be cleared now ????? there is no fifo! the fifo is a lie!
620643               break;
621644
622645            case TMS5110_CMD_READ_BIT:
r242475r242476
625648               else
626649               {
627650                  request_bits(1);
628                  m_CTL_pins = (m_CTL_pins & 0x0E) | extract_bits(1);
651                  //m_CTL_pins = (m_CTL_pins & 0x0E) | extract_bits(1);
652                  m_CTL_buffer <<= 1;
653                  m_CTL_buffer |= extract_bits(1);
654                  m_CTL_buffer &= 0xF;
629655               }
630656               break;
631657
632            case TMS5110_CMD_LOAD_ADDRESS:
633               m_next_is_address = TRUE;
658            case TMS5110_CMD_SPEAK:
659               perform_dummy_read();
660               m_speaking_now = 1;
661               //should FIFO be cleared now ????? there is no fifo! the fifo is a lie!
634662               break;
635663
636664            case TMS5110_CMD_READ_BRANCH:
r242475r242476
644672               break;
645673
646674            case TMS5110_CMD_TEST_TALK:
647               m_state = CTL_STATE_NEXT_OUTPUT;
675               m_state = CTL_STATE_NEXT_TTALK_OUTPUT;
648676               break;
649677
650678            default:
r242475r242476
917945   m_speaking_now = m_talk_status = 0;
918946   m_CTL_pins = 0;
919947      m_RNG = 0x1fff;
948   m_CTL_buffer = 0;
920949
921950   /* initialize the energy/pitch/k states */
922951   m_old_energy = m_new_energy = m_current_energy = m_target_energy = 0;
r242475r242476
935964   {
936965      /* legacy interface */
937966      m_schedule_dummy_read = TRUE;
938
939967   }
940968   else
941969   {
r242475r242476
9981026{
9991027   /* bring up to date first */
10001028   m_stream->update();
1001   if (m_state == CTL_STATE_OUTPUT)
1029   if (m_state == CTL_STATE_TTALK_OUTPUT)
10021030   {
10031031      //if (DEBUG_5110) logerror("Status read (status=%2d)\n", m_talk_status);
10041032      return (m_talk_status << 0); /*CTL1 = still talking ? */
10051033   }
1034   else if (m_state == CTL_STATE_OUTPUT)
1035   {
1036      //if (DEBUG_5110) logerror("Status read (status=%2d)\n", m_talk_status);
1037      return (m_CTL_buffer);
1038   }
10061039   else
10071040   {
10081041      //if (DEBUG_5110) logerror("Status read (not in output mode)\n");
trunk/src/emu/sound/tms5110.h
r242475r242476
115115   UINT8  m_next_is_address;
116116   UINT8  m_schedule_dummy_read;
117117   UINT8  m_addr_bit;
118   /* read byte */
119   UINT8  m_CTL_buffer;
118120
119121   /* callbacks */
120122   devcb_write_line   m_m0_cb;      // the M0 line
trunk/src/mame/drivers/gundealr.c
r242475r242476
495495
496496static MACHINE_CONFIG_DERIVED( yamyam, gundealr )
497497
498   MCFG_TIMER_DRIVER_ADD_PERIODIC("mcusim", gundealr_state, yamyam_mcu_sim, attotime::from_hz(6000000/60))   /* 6mhz confirmed */
498   MCFG_TIMER_DRIVER_ADD_PERIODIC("mcusim", gundealr_state, yamyam_mcu_sim, attotime::from_hz(8000000/60))
499499MACHINE_CONFIG_END
500500
501501
trunk/src/mame/drivers/segahang.c
r242475r242476
5959   //
6060
6161   // bit 7: screen flip
62   m_segaic16vid->tilemap_set_flip(0, data & 0x80);
62   m_segaic16vid->segaic16_tilemap_set_flip(0, data & 0x80);
6363   m_sprites->set_flip(data & 0x80);
6464
6565   // bit 6: shadow/highlight control
6666   m_shadow = ~data & 0x40;
6767
6868   // bit 4: enable display
69   m_segaic16vid->set_display_enable(data & 0x10);
69   m_segaic16vid->segaic16_set_display_enable(data & 0x10);
7070
7171   // bits 2 & 3: control the lamps
7272   set_led_status(machine(), 1, data & 0x08);
r242475r242476
102102   m_soundcpu->set_input_line(INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
103103
104104   // bits 1 & 2: tilemap origin
105   m_segaic16vid->tilemap_set_colscroll(0, ~data & 0x04);
106   m_segaic16vid->tilemap_set_rowscroll(0, ~data & 0x02);
105   m_segaic16vid->segaic16_tilemap_set_colscroll(0, ~data & 0x04);
106   m_segaic16vid->segaic16_tilemap_set_rowscroll(0, ~data & 0x02);
107107
108108   // bit 0: sound mute
109109   machine().sound().system_enable(data & 0x01);
r242475r242476
350350void segahang_state::machine_reset()
351351{
352352   // reset misc components
353   m_segaic16vid->tilemap_reset(*m_screen);
353   m_segaic16vid->segaic16_tilemap_reset(*m_screen);
354354
355355   // queue up a timer to either boost interleave or disable the MCU
356356   synchronize(TID_INIT_I8751);
r242475r242476
413413   ADDRESS_MAP_UNMAP_HIGH
414414   AM_RANGE(0x000000, 0x03ffff) AM_ROM
415415   AM_RANGE(0x20c000, 0x20ffff) AM_RAM AM_SHARE("workram")
416   AM_RANGE(0x400000, 0x403fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, tileram_r, tileram_w) AM_SHARE("tileram")
417   AM_RANGE(0x410000, 0x410fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, textram_r, textram_w) AM_SHARE("textram")
416   AM_RANGE(0x400000, 0x403fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_tileram_0_r, segaic16_tileram_0_w) AM_SHARE("textram")
417   AM_RANGE(0x410000, 0x410fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_textram_0_r, segaic16_textram_0_w) AM_SHARE("tileram")
418418   AM_RANGE(0x600000, 0x6007ff) AM_RAM AM_SHARE("sprites")
419419   AM_RANGE(0xa00000, 0xa00fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
420420   AM_RANGE(0xc00000, 0xc3ffff) AM_ROM AM_REGION("subcpu", 0)
r242475r242476
427427   ADDRESS_MAP_UNMAP_HIGH
428428   AM_RANGE(0x000000, 0x03ffff) AM_ROM
429429   AM_RANGE(0x040000, 0x043fff) AM_RAM AM_SHARE("workram")
430   AM_RANGE(0x100000, 0x107fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, tileram_r, tileram_w) AM_SHARE("tileram")
431   AM_RANGE(0x108000, 0x108fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, textram_r, textram_w) AM_SHARE("textram")
430   AM_RANGE(0x100000, 0x107fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_tileram_0_r, segaic16_tileram_0_w) AM_SHARE("textram")
431   AM_RANGE(0x108000, 0x108fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_textram_0_r, segaic16_textram_0_w) AM_SHARE("tileram")
432432   AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
433433   AM_RANGE(0x124000, 0x127fff) AM_RAM AM_SHARE("subram")
434434   AM_RANGE(0x130000, 0x130fff) AM_RAM AM_SHARE("sprites")
r242475r242476
17461746DRIVER_INIT_MEMBER(segahang_state,generic)
17471747{
17481748   // point globals to allocated memory regions
1749   m_segaic16vid->segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr());
1750   m_segaic16vid->segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr());
17491751   m_segaic16road->segaic16_roadram_0 = reinterpret_cast<UINT16 *>(memshare("roadram")->ptr());
17501752
17511753   // save states
trunk/src/mame/drivers/segaorun.c
r242475r242476
349349   //  D1: (CONT) - affects sprite hardware
350350   //  D0: Sound section reset (1= normal operation, 0= reset)
351351
352   m_segaic16vid->set_display_enable(data & 0x20);
352   m_segaic16vid->segaic16_set_display_enable(data & 0x20);
353353   m_adc_select = (data >> 2) & 7;
354354   m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
355355}
r242475r242476
459459         break;
460460
461461      case 1:
462         mapper.map_as_ram(0x00000, 0x10000, 0xfe0000, "tileram", write16_delegate(FUNC(segaorun_state::tileram_w), this));
463         mapper.map_as_ram(0x10000, 0x01000, 0xfef000, "textram", write16_delegate(FUNC(segaorun_state::textram_w), this));
462         mapper.map_as_ram(0x00000, 0x10000, 0xfe0000, "tileram", write16_delegate(FUNC(segaorun_state::sega_tileram_0_w), this));
463         mapper.map_as_ram(0x10000, 0x01000, 0xfef000, "textram", write16_delegate(FUNC(segaorun_state::sega_textram_0_w), this));
464464         break;
465465
466466      case 0:
r242475r242476
568568   // reset misc components
569569   if (m_custom_map != NULL)
570570      m_mapper->configure_explicit(m_custom_map);
571   m_segaic16vid->tilemap_reset(*m_screen);
571   m_segaic16vid->segaic16_tilemap_reset(*m_screen);
572572
573573   // hook the RESET line, which resets CPU #1
574574   m_maincpu->set_reset_callback(write_line_delegate(FUNC(segaorun_state::m68k_reset_callback),this));
r242475r242476
814814            //  D2: Start lamp
815815            //  other bits: ?
816816            m_adc_select = data >> 6 & 3;
817            m_segaic16vid->set_display_enable(data >> 5 & 1);
817            m_segaic16vid->segaic16_set_display_enable(data >> 5 & 1);
818818            output_set_value("Vibration_motor", data >> 3 & 1);
819819            output_set_value("Start_lamp", data >> 2 & 1);
820820         }
r242475r242476
23692369      m_nvram->set_base(m_workram, m_workram.bytes());
23702370
23712371   // point globals to allocated memory regions
2372   m_segaic16vid->segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr());
2373   m_segaic16vid->segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr());
23722374   m_segaic16road->segaic16_roadram_0 = reinterpret_cast<UINT16 *>(memshare("roadram")->ptr());
23732375
23742376   // save state
trunk/src/mame/drivers/segas16a.c
r242475r242476
187187   m_video_control = data;
188188
189189   // bit 7: screen flip
190   m_segaic16vid->tilemap_set_flip(0, data & 0x80);
190   m_segaic16vid->segaic16_tilemap_set_flip(0, data & 0x80);
191191   m_sprites->set_flip(data & 0x80);
192192
193193   // bit 6: set 8751 interrupt line
r242475r242476
195195      m_mcu->set_input_line(MCS51_INT1_LINE, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
196196
197197   // bit 4: enable display
198   m_segaic16vid->set_display_enable(data & 0x10);
198   m_segaic16vid->segaic16_set_display_enable(data & 0x10);
199199
200200   // bits 0 & 1: update coin counters
201201   coin_counter_w(machine(), 1, data & 0x02);
r242475r242476
224224   //       1= sound is enabled
225225   //
226226   m_soundcpu->set_input_line(INPUT_LINE_NMI, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
227   m_segaic16vid->tilemap_set_colscroll(0, ~data & 0x04);
228   m_segaic16vid->tilemap_set_rowscroll(0, ~data & 0x02);
227   m_segaic16vid->segaic16_tilemap_set_colscroll(0, ~data & 0x04);
228   m_segaic16vid->segaic16_tilemap_set_rowscroll(0, ~data & 0x02);
229229}
230230
231231
r242475r242476
455455
456456   // enable/disable the display
457457   if (data & 0x40)
458      m_segaic16vid->set_display_enable(1);
458      m_segaic16vid->segaic16_set_display_enable(1);
459459
460460   // apply an extra boost if the main CPU is just waking up
461461   if ((m_mcu_control ^ data) & 0x40)
r242475r242476
715715
716716   // X scroll values
717717   address_space &space = m_maincpu->space(AS_PROGRAM);
718   m_segaic16vid->textram_w(space, 0xff8/2, m_workram[0x0d14/2], 0xffff);
719   m_segaic16vid->textram_w(space, 0xffa/2, m_workram[0x0d18/2], 0xffff);
718   m_segaic16vid->segaic16_textram_0_w(space, 0xff8/2, m_workram[0x0d14/2], 0xffff);
719   m_segaic16vid->segaic16_textram_0_w(space, 0xffa/2, m_workram[0x0d18/2], 0xffff);
720720
721721   // page values
722   m_segaic16vid->textram_w(space, 0xe9e/2, m_workram[0x0d1c/2], 0xffff);
723   m_segaic16vid->textram_w(space, 0xe9c/2, m_workram[0x0d1e/2], 0xffff);
722   m_segaic16vid->segaic16_textram_0_w(space, 0xe9e/2, m_workram[0x0d1c/2], 0xffff);
723   m_segaic16vid->segaic16_textram_0_w(space, 0xe9c/2, m_workram[0x0d1e/2], 0xffff);
724724}
725725
726726
r242475r242476
952952static ADDRESS_MAP_START( system16a_map, AS_PROGRAM, 16, segas16a_state )
953953   ADDRESS_MAP_UNMAP_HIGH
954954   AM_RANGE(0x000000, 0x03ffff) AM_MIRROR(0x380000) AM_ROM
955   AM_RANGE(0x400000, 0x407fff) AM_MIRROR(0xb88000) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, tileram_r, tileram_w) AM_SHARE("tileram")
956   AM_RANGE(0x410000, 0x410fff) AM_MIRROR(0xb8f000) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, textram_r, textram_w) AM_SHARE("textram")
955   AM_RANGE(0x400000, 0x407fff) AM_MIRROR(0xb88000) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_tileram_0_r, segaic16_tileram_0_w) AM_SHARE("textram")
956   AM_RANGE(0x410000, 0x410fff) AM_MIRROR(0xb8f000) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_textram_0_r, segaic16_textram_0_w) AM_SHARE("tileram")
957957   AM_RANGE(0x440000, 0x4407ff) AM_MIRROR(0x3bf800) AM_RAM AM_SHARE("sprites")
958958   AM_RANGE(0x840000, 0x840fff) AM_MIRROR(0x3bf000) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
959959   AM_RANGE(0xc40000, 0xc43fff) AM_MIRROR(0x39c000) AM_READWRITE(misc_io_r, misc_io_w)
r242475r242476
34543454   m_custom_io_r = read16_delegate(FUNC(segas16a_state::standard_io_r), this);
34553455   m_custom_io_w = write16_delegate(FUNC(segas16a_state::standard_io_w), this);
34563456
3457   // point globals to allocated memory regions
3458   m_segaic16vid->segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr());
3459   m_segaic16vid->segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr());
3460
34573461   // save state
34583462   save_item(NAME(m_video_control));
34593463   save_item(NAME(m_mcu_control));
trunk/src/mame/drivers/segas16b.c
r242475r242476
912912         break;
913913
914914      case 5: // 64k of tileram + 4k of textram
915         mapper.map_as_ram(0x00000, 0x10000, 0xfe0000, "tileram", write16_delegate(FUNC(segas16b_state::tileram_w), this));
916         mapper.map_as_ram(0x10000, 0x01000, 0xfef000, "textram", write16_delegate(FUNC(segas16b_state::textram_w), this));
915         mapper.map_as_ram(0x00000, 0x10000, 0xfe0000, "tileram", write16_delegate(FUNC(segas16b_state::sega_tileram_0_w), this));
916         mapper.map_as_ram(0x10000, 0x01000, 0xfef000, "textram", write16_delegate(FUNC(segas16b_state::sega_textram_0_w), this));
917917         break;
918918
919919      case 4: // 2k of spriteram
r242475r242476
10031003WRITE16_MEMBER( segas16b_state::rom_5704_bank_w )
10041004{
10051005   if (ACCESSING_BITS_0_7)
1006      m_segaic16vid->tilemap_set_bank(0, offset & 1, data & 7);
1006      m_segaic16vid->segaic16_tilemap_set_bank(0, offset & 1, data & 7);
10071007}
10081008
10091009
r242475r242476
10511051
10521052      case 0x2000/2:
10531053         if (ACCESSING_BITS_0_7)
1054            m_segaic16vid->tilemap_set_bank(0, offset & 1, data & 7);
1054            m_segaic16vid->segaic16_tilemap_set_bank(0, offset & 1, data & 7);
10551055         break;
10561056   }
10571057}
r242475r242476
11241124         //  D1 : (Output to coin counter 2?)
11251125         //  D0 : Output to coin counter 1
11261126         //
1127         m_segaic16vid->tilemap_set_flip(0, data & 0x40);
1127         m_segaic16vid->segaic16_tilemap_set_flip(0, data & 0x40);
11281128         m_sprites->set_flip(data & 0x40);
11291129         if (!m_disable_screen_blanking)
1130            m_segaic16vid->set_display_enable(data & 0x20);
1130            m_segaic16vid->segaic16_set_display_enable(data & 0x20);
11311131         set_led_status(machine(), 1, data & 0x08);
11321132         set_led_status(machine(), 0, data & 0x04);
11331133         coin_counter_w(machine(), 1, data & 0x02);
r242475r242476
12881288   synchronize(TID_INIT_I8751);
12891289
12901290   // reset tilemap state
1291   m_segaic16vid->tilemap_reset(*m_screen);
1291   m_segaic16vid->segaic16_tilemap_reset(*m_screen);
12921292
12931293   // configure sprite banks
12941294   static const UINT8 default_banklist[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
r242475r242476
66256625   m_custom_io_r = read16_delegate(FUNC(segas16b_state::standard_io_r), this);
66266626   m_custom_io_w = write16_delegate(FUNC(segas16b_state::standard_io_w), this);
66276627
6628   // point globals to allocated memory regions
6629   m_segaic16vid->segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr());
6630   m_segaic16vid->segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr());
6631
66286632   // save state
66296633   save_item(NAME(m_atomicp_sound_count));
66306634   save_item(NAME(m_hwc_input_value));
r242475r242476
66506654   // configure special behaviors for the Korean boards
66516655   m_disable_screen_blanking = true;
66526656   m_atomicp_sound_divisor = 1;
6653   m_segaic16vid->m_display_enable = 1;
6657   m_segaic16vid->segaic16_display_enable = 1;
66546658
66556659   // allocate a sound timer
66566660   emu_timer *timer = timer_alloc(TID_ATOMICP_SOUND_IRQ);
r242475r242476
72177221   AM_RANGE(0x000000, 0x0fffff) AM_ROMBANK(ISGSM_MAIN_BANK) AM_REGION("bios", 0) // this area is ALWAYS read-only, even when the game is banked in
72187222   AM_RANGE(0x200000, 0x23ffff) AM_RAM // used during startup for decompression
72197223   AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(rom_5704_bank_w)
7220   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, tileram_r, tileram_w) AM_SHARE("tileram")
7221   AM_RANGE(0x410000, 0x410fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, textram_r, textram_w) AM_SHARE("textram")
7224   AM_RANGE(0x400000, 0x40ffff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_tileram_0_r, segaic16_tileram_0_w) AM_SHARE("textram")
7225   AM_RANGE(0x410000, 0x410fff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_textram_0_r, segaic16_textram_0_w) AM_SHARE("tileram")
72227226   AM_RANGE(0x440000, 0x4407ff) AM_RAM AM_SHARE("sprites")
72237227   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
72247228   AM_RANGE(0xc40000, 0xc43fff) AM_READWRITE(standard_io_r, standard_io_w)
r242475r242476
73547358
73557359void isgsm_state::machine_reset()
73567360{
7357   m_segaic16vid->tilemap_reset(*m_screen);
7361   m_segaic16vid->segaic16_tilemap_reset(*m_screen);
73587362
73597363   // configure sprite banks
73607364   for (int i = 0; i < 16; i++)
trunk/src/mame/drivers/segas18.c
r242475r242476
5757         break;
5858
5959      case 5:
60         mapper.map_as_ram(0x00000, 0x10000, 0xfe0000, "tileram", write16_delegate(FUNC(segas18_state::tileram_w), this));
61         mapper.map_as_ram(0x10000, 0x01000, 0xfef000, "textram", write16_delegate(FUNC(segas18_state::textram_w), this));
60         mapper.map_as_ram(0x00000, 0x10000, 0xfe0000, "tileram", write16_delegate(FUNC(segas18_state::sega_tileram_0_w), this));
61         mapper.map_as_ram(0x10000, 0x01000, 0xfef000, "textram", write16_delegate(FUNC(segas18_state::sega_textram_0_w), this));
6262         break;
6363
6464      case 4:
r242475r242476
141141   // configure the NVRAM to point to our workram
142142   m_nvram->set_base(m_workram, m_workram.bytes());
143143
144   // point globals to allocated memory regions
145   m_segaic16vid->segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr());
146   m_segaic16vid->segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr());
147
144148   // configure VDP
145149   m_vdp->set_use_cram(1);
146150   m_vdp->set_vdp_pal(FALSE);
r242475r242476
177181
178182void segas18_state::machine_reset()
179183{
180   m_segaic16vid->tilemap_reset(*m_screen);
184   m_segaic16vid->segaic16_tilemap_reset(*m_screen);
181185
182186   m_vdp->device_reset_old();
183187
r242475r242476
198202{
199203   // miscellaneous output
200204   set_grayscale(~data & 0x40);
201   m_segaic16vid->tilemap_set_flip(0, data & 0x20);
205   m_segaic16vid->segaic16_tilemap_set_flip(0, data & 0x20);
202206   m_sprites->set_flip(data & 0x20);
203207   // These are correct according to cgfm's docs, but mwalker and ddcrew both
204208   // enable the lockout and never turn it off
r242475r242476
280284   {
281285      for (int i = 0; i < 4; i++)
282286      {
283         m_segaic16vid->tilemap_set_bank(0, 0 + i, (data & 0xf) * 4 + i);
284         m_segaic16vid->tilemap_set_bank(0, 4 + i, ((data >> 4) & 0xf) * 4 + i);
287         m_segaic16vid->segaic16_tilemap_set_bank(0, 0 + i, (data & 0xf) * 4 + i);
288         m_segaic16vid->segaic16_tilemap_set_bank(0, 4 + i, ((data >> 4) & 0xf) * 4 + i);
285289      }
286290   }
287291}
r242475r242476
301305      int maxbanks = m_gfxdecode->gfx(0)->elements() / 1024;
302306      if (data >= maxbanks)
303307         data %= maxbanks;
304      m_segaic16vid->tilemap_set_bank(0, offset, data);
308      m_segaic16vid->segaic16_tilemap_set_bank(0, offset, data);
305309   }
306310
307311   // sprite banking
r242475r242476
331335      if (data & 0x80) data += 0x20;
332336      data &= 0x3f;
333337
334      m_segaic16vid->tilemap_set_bank(0, offset, data);
338      m_segaic16vid->segaic16_tilemap_set_bank(0, offset, data);
335339   }
336340
337341   // sprite banking
r242475r242476
12131217   MCFG_315_5296_IN_PORTF_CB(IOPORT("COINAGE"))
12141218   MCFG_315_5296_IN_PORTG_CB(IOPORT("DSW"))
12151219   MCFG_315_5296_OUT_PORTH_CB(WRITE8(segas18_state, rom_5874_bank_w))
1216   MCFG_315_5296_OUT_CNT1_CB(DEVWRITELINE("segaic16vid", segaic16_video_device, set_display_enable))
1220   MCFG_315_5296_OUT_CNT1_CB(DEVWRITELINE("segaic16vid", segaic16_video_device, segaic16_set_display_enable))
12171221   MCFG_315_5296_OUT_CNT2_CB(WRITELINE(segas18_state, set_vdp_enable))
12181222
12191223   MCFG_DEVICE_ADD("gen_vdp", SEGA315_5313, 0)
trunk/src/mame/drivers/segaxbd.c
r242475r242476
449449         if (((oldval ^ data) & 0x40) && !(data & 0x40))
450450            machine().watchdog_reset();
451451
452         m_segaic16vid->set_display_enable(data & 0x20);
452         m_segaic16vid->segaic16_set_display_enable(data & 0x20);
453453
454454         m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
455455         if (m_soundcpu2 != NULL)
r242475r242476
640640
641641void segaxbd_state::machine_reset()
642642{
643   m_segaic16vid->tilemap_reset(*m_screen);
643   m_segaic16vid->segaic16_tilemap_reset(*m_screen);
644644
645645   // hook the RESET line, which resets CPU #1
646646   m_maincpu->set_reset_callback(write_line_delegate(FUNC(segaxbd_state::m68k_reset_callback),this));
r242475r242476
876876   AM_RANGE(0x000000, 0x07ffff) AM_ROM
877877   AM_RANGE(0x080000, 0x083fff) AM_MIRROR(0x01c000) AM_RAM AM_SHARE("backup1")
878878   AM_RANGE(0x0a0000, 0x0a3fff) AM_MIRROR(0x01c000) AM_RAM AM_SHARE("backup2")
879   AM_RANGE(0x0c0000, 0x0cffff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, tileram_r, tileram_w) AM_SHARE("tileram")
880   AM_RANGE(0x0d0000, 0x0d0fff) AM_MIRROR(0x00f000) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, textram_r, textram_w) AM_SHARE("textram")
879   AM_RANGE(0x0c0000, 0x0cffff) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_tileram_0_r, segaic16_tileram_0_w) AM_SHARE("textram")
880   AM_RANGE(0x0d0000, 0x0d0fff) AM_MIRROR(0x00f000) AM_DEVREADWRITE("segaic16vid", segaic16_video_device, segaic16_textram_0_r, segaic16_textram_0_w) AM_SHARE("tileram")
881881   AM_RANGE(0x0e0000, 0x0e0007) AM_MIRROR(0x003ff8) AM_DEVREADWRITE("multiplier_main", sega_315_5248_multiplier_device, read, write)
882882   AM_RANGE(0x0e4000, 0x0e401f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("divider_main", sega_315_5249_divider_device, read, write)
883883   AM_RANGE(0x0e8000, 0x0e801f) AM_MIRROR(0x003fe0) AM_DEVREADWRITE("cmptimer_main", sega_315_5250_compare_timer_device, read, write)
r242475r242476
32093209   m_iochip_custom_io_w[0][3] = iowrite_delegate(FUNC(segaxbd_state::generic_iochip0_lamps_w), this);
32103210
32113211   // point globals to allocated memory regions
3212   m_segaic16vid->segaic16_tileram_0 = reinterpret_cast<UINT16 *>(memshare("tileram")->ptr());
3213   m_segaic16vid->segaic16_textram_0 = reinterpret_cast<UINT16 *>(memshare("textram")->ptr());
32123214   m_segaic16road->segaic16_roadram_0 = reinterpret_cast<UINT16 *>(memshare("roadram")->ptr());
32133215
32143216   // save state
trunk/src/mame/drivers/segaybd.c
r242475r242476
207207         //  D2 = YRES
208208         //  D1-D0 = ADC0-1
209209         //
210         m_segaic16vid->set_display_enable(data & 0x80);
210         m_segaic16vid->segaic16_set_display_enable(data & 0x80);
211211         if (((old ^ data) & 0x20) && !(data & 0x20))
212212            machine().watchdog_reset();
213213         m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
r242475r242476
741741   AM_RANGE(0x180000, 0x1807ff) AM_MIRROR(0x007800) AM_RAM AM_SHARE("rotateram")
742742   AM_RANGE(0x188000, 0x188fff) AM_MIRROR(0x007000) AM_RAM AM_SHARE("bsprites")
743743   AM_RANGE(0x190000, 0x193fff) AM_MIRROR(0x004000) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
744   AM_RANGE(0x198000, 0x19ffff) AM_DEVREAD("segaic16vid", segaic16_video_device, rotate_control_r)
744   AM_RANGE(0x198000, 0x19ffff) AM_DEVREAD("segaic16vid", segaic16_video_device, segaic16_rotate_control_0_r)
745745   AM_RANGE(0x1f0000, 0x1fffff) AM_RAM
746746ADDRESS_MAP_END
747747
r242475r242476
25292529   // allocate a scanline timer
25302530   m_scanline_timer = timer_alloc(TID_IRQ2_GEN);
25312531
2532   // point globals to allocated memory regions
2533   m_segaic16vid->segaic16_rotateram_0 = reinterpret_cast<UINT16 *>(memshare("rotateram")->ptr());
2534
25322535   // save state
25332536   save_item(NAME(m_pdrift_bank));
25342537   save_item(NAME(m_analog_data));
trunk/src/mame/includes/segaorun.h
r242475r242476
8080   UINT32 screen_update_outrun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8181   UINT32 screen_update_shangon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
8282
83   DECLARE_WRITE16_MEMBER( tileram_w ) { m_segaic16vid->tileram_w(space,offset,data,mem_mask); };
84   DECLARE_WRITE16_MEMBER( textram_w ) { m_segaic16vid->textram_w(space,offset,data,mem_mask); };
83   DECLARE_WRITE16_MEMBER( sega_tileram_0_w ) { m_segaic16vid->segaic16_tileram_0_w(space,offset,data,mem_mask); };
84   DECLARE_WRITE16_MEMBER( sega_textram_0_w ) { m_segaic16vid->segaic16_textram_0_w(space,offset,data,mem_mask); };
8585   DECLARE_READ16_MEMBER( sega_road_control_0_r ) { return m_segaic16road->segaic16_road_control_0_r(space,offset,mem_mask); };
8686   DECLARE_WRITE16_MEMBER( sega_road_control_0_w ) { m_segaic16road->segaic16_road_control_0_w(space,offset,data,mem_mask); };
8787
trunk/src/mame/includes/segas16b.h
r242475r242476
114114   // video updates
115115   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
116116
117   DECLARE_WRITE16_MEMBER( tileram_w ) { m_segaic16vid->tileram_w(space,offset,data,mem_mask); };
118   DECLARE_WRITE16_MEMBER( textram_w ) { m_segaic16vid->textram_w(space,offset,data,mem_mask); };
117   DECLARE_WRITE16_MEMBER( sega_tileram_0_w ) { m_segaic16vid->segaic16_tileram_0_w(space,offset,data,mem_mask); };
118   DECLARE_WRITE16_MEMBER( sega_textram_0_w ) { m_segaic16vid->segaic16_textram_0_w(space,offset,data,mem_mask); };
119119
120120protected:
121121   // internal types
trunk/src/mame/includes/segas18.h
r242475r242476
9191
9292   DECLARE_READ16_MEMBER( genesis_vdp_r ) { return m_vdp->vdp_r(space, offset, mem_mask); }
9393   DECLARE_WRITE16_MEMBER( genesis_vdp_w ) { m_vdp->vdp_w(space, offset, data, mem_mask); }
94   DECLARE_WRITE16_MEMBER( tileram_w ) { m_segaic16vid->tileram_w(space, offset, data, mem_mask); }
95   DECLARE_WRITE16_MEMBER( textram_w ) { m_segaic16vid->textram_w(space, offset, data, mem_mask); }
94   DECLARE_WRITE16_MEMBER( sega_tileram_0_w ) { m_segaic16vid->segaic16_tileram_0_w(space, offset, data, mem_mask); }
95   DECLARE_WRITE16_MEMBER( sega_textram_0_w ) { m_segaic16vid->segaic16_textram_0_w(space, offset, data, mem_mask); }
9696
9797   DECLARE_WRITE_LINE_MEMBER(set_grayscale);
9898   DECLARE_WRITE_LINE_MEMBER(set_vdp_enable);
trunk/src/mame/video/segahang.c
r242475r242476
1818void segahang_state::video_start()
1919{
2020   // initialize the tile/text layers
21   m_segaic16vid->tilemap_init( 0, SEGAIC16_TILEMAP_HANGON, 0x000, 0, 2);
21   m_segaic16vid->segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_HANGON, 0x000, 0, 2);
2222
2323   // initialize the road
2424   m_segaic16road->segaic16_road_init(machine(), 0, m_sharrier_video ? SEGAIC16_ROAD_SHARRIER : SEGAIC16_ROAD_HANGON, 0x038, 0x7c0, 0x7c0, 0);
r242475r242476
3232UINT32 segahang_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
3333{
3434   // if no drawing is happening, fill with black and get out
35   if (!m_segaic16vid->m_display_enable)
35   if (!m_segaic16vid->segaic16_display_enable)
3636   {
3737      bitmap.fill(m_palette->black_pen(), cliprect);
3838      return 0;
r242475r242476
4848   m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND);
4949
5050   // draw background
51   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
52   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
51   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
52   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
5353
5454   // draw foreground
55   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
56   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
55   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
56   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
5757
5858   // draw the high priority road
5959   m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_FOREGROUND);
r242475r242476
6161   // text layer
6262   // note that we inflate the priority of the text layer to prevent sprites
6363   // from drawing over the high scores
64   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x08);
65   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
64   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x08);
65   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
6666
6767   // mix in sprites
6868   bitmap_ind16 &sprites = m_sprites->bitmap();
trunk/src/mame/video/segaic16.c
r242475r242476
336336    and clipping capabilities, and advanced hot-spot positioning.  The
337337    mixer chip adds totally dynamic priorities, alpha-blending of the
338338    tilemaps, per-component color control, and some other funnies we
339    have not been able to decipher.
339    have not been able to decypher.
340340
341341  ST-V (also know as Titan or the Saturn console):
342342    The ultimate 2D system.  Even more advanced tilemaps, with 6-dof
343343    roz support, alpha up to the wazoo and other niceties, known as
344    the vdp2.  The sprite engine, vdp1, allows for any 4-point
345    stretching of the sprites, actually giving polygonal 3D
344    the vdp2.  Ths sprite engine, vdp1, allows for any 4-point
345    streching of the sprites, actually giving polygonal 3D
346346    capabilities.  Interestingly, the mixer capabilities took a hit,
347347    with no real per-sprite mixer priority, which could be considered
348348    annoying for a 2D system.  It still allowed some beauties like
r242475r242476
374374segaic16_video_device::segaic16_video_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
375375   : device_t(mconfig, SEGAIC16VID, "Sega 16-bit Video", tag, owner, clock, "segaic16_video", __FILE__),
376376      device_video_interface(mconfig, *this),
377      m_display_enable(0),
378      m_tileram(*this, ":tileram"),
379      m_textram(*this, ":textram"),
380      m_rotateram(*this, ":rotateram"),
381377      m_gfxdecode(*this)
382378{
383   memset(m_rotate, 0, sizeof(m_rotate));
384   memset(m_bg_tilemap, 0, sizeof(m_bg_tilemap));
385379}
386380
387381//-------------------------------------------------
r242475r242476
395389}
396390
397391
392void segaic16_video_device::device_config_complete()
393{
394}
395
398396void segaic16_video_device::device_start()
399397{
400   save_item(NAME(m_display_enable));
401398}
402399
403400void segaic16_video_device::device_reset()
r242475r242476
405402}
406403
407404
405
406
407
408
409
410
411
412
408413/*************************************
409414 *
410415 *  Misc functions
411416 *
412417 *************************************/
413418
414void segaic16_video_device::set_display_enable(int enable)
419void segaic16_video_device::segaic16_set_display_enable(int enable)
415420{
416421   enable = (enable != 0);
417   if (m_display_enable != enable)
422   if (segaic16_display_enable != enable)
418423   {
419424      m_screen->update_partial(m_screen->vpos());
420      m_display_enable = enable;
425      segaic16_display_enable = enable;
421426   }
422427}
423428
r242475r242476
430435 *
431436 *************************************/
432437
433void draw_virtual_tilemap(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 pages, UINT16 xscroll, UINT16 yscroll, UINT32 flags, UINT32 priority)
438void segaic16_draw_virtual_tilemap(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 pages, UINT16 xscroll, UINT16 yscroll, UINT32 flags, UINT32 priority)
434439{
435440   int leftmin = -1, leftmax = -1, rightmin = -1, rightmax = -1;
436441   int topmin = -1, topmax = -1, bottommin = -1, bottommax = -1;
r242475r242476
632637 *
633638 *******************************************************************************************/
634639
635TILE_GET_INFO_MEMBER( segaic16_video_device::tilemap_16a_tile_info )
640TILE_GET_INFO_MEMBER( segaic16_video_device::segaic16_tilemap_16a_tile_info )
636641{
637642   const struct tilemap_callback_info *info = (const struct tilemap_callback_info *)tilemap.user_data();
638643   UINT16 data = info->rambase[tile_index];
r242475r242476
644649}
645650
646651
647TILE_GET_INFO_MEMBER( segaic16_video_device::tilemap_16a_text_info )
652TILE_GET_INFO_MEMBER( segaic16_video_device::segaic16_tilemap_16a_text_info )
648653{
649654   const struct tilemap_callback_info *info = (const struct tilemap_callback_info *)tilemap.user_data();
650655   UINT16 data = info->rambase[tile_index];
r242475r242476
656661}
657662
658663
659void tilemap_16a_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority)
664void segaic16_tilemap_16a_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority)
660665{
661666   UINT16 *textram = info->textram;
662667
r242475r242476
707712            /* draw the chunk */
708713            effxscroll = (0xc8 - effxscroll + info->xoffs) & 0x3ff;
709714            effyscroll = effyscroll & 0x1ff;
710            draw_virtual_tilemap(screen, info, bitmap, rowcolclip, pages, effxscroll, effyscroll, flags, priority);
715            segaic16_draw_virtual_tilemap(screen, info, bitmap, rowcolclip, pages, effxscroll, effyscroll, flags, priority);
711716         }
712717      }
713718   }
r242475r242476
736741         /* draw the chunk */
737742         effxscroll = (0xc8 - effxscroll + info->xoffs) & 0x3ff;
738743         effyscroll = effyscroll & 0x1ff;
739         draw_virtual_tilemap(screen, info, bitmap, colclip, pages, effxscroll, effyscroll, flags, priority);
744         segaic16_draw_virtual_tilemap(screen, info, bitmap, colclip, pages, effxscroll, effyscroll, flags, priority);
740745      }
741746   }
742747   else if (info->rowscroll)
r242475r242476
765770         /* draw the chunk */
766771         effxscroll = (0xc8 - effxscroll + info->xoffs) & 0x3ff;
767772         effyscroll = effyscroll & 0x1ff;
768         draw_virtual_tilemap(screen, info, bitmap, rowclip, pages, effxscroll, effyscroll, flags, priority);
773         segaic16_draw_virtual_tilemap(screen, info, bitmap, rowclip, pages, effxscroll, effyscroll, flags, priority);
769774      }
770775   }
771776   else
r242475r242476
775780         xscroll += 17;
776781      xscroll = (0xc8 - xscroll + info->xoffs) & 0x3ff;
777782      yscroll = yscroll & 0x1ff;
778      draw_virtual_tilemap(screen, info, bitmap, cliprect, pages, xscroll, yscroll, flags, priority);
783      segaic16_draw_virtual_tilemap(screen, info, bitmap, cliprect, pages, xscroll, yscroll, flags, priority);
779784   }
780785}
781786
r242475r242476
844849 *
845850 *******************************************************************************************/
846851
847TILE_GET_INFO_MEMBER( segaic16_video_device::tilemap_16b_tile_info )
852TILE_GET_INFO_MEMBER( segaic16_video_device::segaic16_tilemap_16b_tile_info )
848853{
849854   const struct tilemap_callback_info *info = (const struct tilemap_callback_info *)tilemap.user_data();
850855   UINT16 data = info->rambase[tile_index];
r242475r242476
858863}
859864
860865
861TILE_GET_INFO_MEMBER( segaic16_video_device::tilemap_16b_text_info )
866TILE_GET_INFO_MEMBER( segaic16_video_device::segaic16_tilemap_16b_text_info )
862867{
863868   const struct tilemap_callback_info *info = (const struct tilemap_callback_info *)tilemap.user_data();
864869   UINT16 data = info->rambase[tile_index];
r242475r242476
871876}
872877
873878
874TILE_GET_INFO_MEMBER( segaic16_video_device::tilemap_16b_alt_tile_info )
879TILE_GET_INFO_MEMBER( segaic16_video_device::segaic16_tilemap_16b_alt_tile_info )
875880{
876881   const struct tilemap_callback_info *info = (const struct tilemap_callback_info *)tilemap.user_data();
877882   UINT16 data = info->rambase[tile_index];
r242475r242476
885890}
886891
887892
888TILE_GET_INFO_MEMBER( segaic16_video_device::tilemap_16b_alt_text_info )
893TILE_GET_INFO_MEMBER( segaic16_video_device::segaic16_tilemap_16b_alt_text_info )
889894{
890895   const struct tilemap_callback_info *info = (const struct tilemap_callback_info *)tilemap.user_data();
891896   UINT16 data = info->rambase[tile_index];
r242475r242476
898903}
899904
900905
901void tilemap_16b_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority)
906void segaic16_tilemap_16b_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority)
902907{
903908   UINT16 *textram = info->textram;
904909   UINT16 xscroll, yscroll, pages;
r242475r242476
950955            /* draw the chunk */
951956            effxscroll = (0xc0 - effxscroll + info->xoffs) & 0x3ff;
952957            effyscroll = effyscroll & 0x1ff;
953            draw_virtual_tilemap(screen, info, bitmap, rowcolclip, effpages, effxscroll, effyscroll, flags, priority);
958            segaic16_draw_virtual_tilemap(screen, info, bitmap, rowcolclip, effpages, effxscroll, effyscroll, flags, priority);
954959         }
955960      }
956961   }
r242475r242476
986991         /* draw the chunk */
987992         effxscroll = (0xc0 - effxscroll + info->xoffs) & 0x3ff;
988993         effyscroll = effyscroll & 0x1ff;
989         draw_virtual_tilemap(screen, info, bitmap, rowclip, effpages, effxscroll, effyscroll, flags, priority);
994         segaic16_draw_virtual_tilemap(screen, info, bitmap, rowclip, effpages, effxscroll, effyscroll, flags, priority);
990995      }
991996   }
992997}
993998
994999
995TIMER_CALLBACK_MEMBER( segaic16_video_device::tilemap_16b_latch_values )
1000TIMER_CALLBACK_MEMBER( segaic16_video_device::segaic16_tilemap_16b_latch_values )
9961001{
997   struct tilemap_info *info = &m_bg_tilemap[param];
1002   struct tilemap_info *info = &bg_tilemap[param];
9981003   UINT16 *textram = info->textram;
9991004   int i;
10001005
r242475r242476
10111016}
10121017
10131018
1014void tilemap_16b_reset(screen_device &screen, struct tilemap_info *info)
1019void segaic16_tilemap_16b_reset(screen_device &screen, struct tilemap_info *info)
10151020{
10161021   /* set a timer to latch values on scanline 261 */
10171022   info->latch_timer->adjust(screen.time_until_pos(261), info->index);
r242475r242476
10251030 *
10261031 *************************************/
10271032
1028void segaic16_video_device::tilemap_init(int which, int type, int colorbase, int xoffs, int numbanks)
1033void segaic16_video_device::segaic16_tilemap_init(running_machine &machine, int which, int type, int colorbase, int xoffs, int numbanks)
10291034{
1030   struct tilemap_info *info = &m_bg_tilemap[which];
1035   struct tilemap_info *info = &bg_tilemap[which];
10311036   tilemap_get_info_delegate get_text_info;
10321037   tilemap_get_info_delegate get_tile_info;
10331038   int pagenum;
r242475r242476
10461051   switch (which)
10471052   {
10481053      case 0:
1049         info->textram = m_textram;
1050         info->tileram = m_tileram;
1054         info->textram = segaic16_textram_0;
1055         info->tileram = segaic16_tileram_0;
10511056         break;
10521057
10531058      default:
1054         fatalerror("Invalid tilemap index specified in tilemap_init\n");
1059         fatalerror("Invalid tilemap index specified in segaic16_tilemap_init\n");
10551060   }
10561061
10571062   /* determine the parameters of the tilemaps */
10581063   switch (type)
10591064   {
10601065      case SEGAIC16_TILEMAP_HANGON:
1061         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16a_text_info),this);
1062         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16a_tile_info),this);
1066         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16a_text_info),this);
1067         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16a_tile_info),this);
10631068         info->numpages = 4;
1064         info->draw_layer = tilemap_16a_draw_layer;
1069         info->draw_layer = segaic16_tilemap_16a_draw_layer;
10651070         info->reset = NULL;
10661071         info->latch_timer = NULL;
10671072         break;
10681073
10691074      case SEGAIC16_TILEMAP_16A:
1070         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16a_text_info),this);
1071         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16a_tile_info),this);
1075         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16a_text_info),this);
1076         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16a_tile_info),this);
10721077         info->numpages = 8;
1073         info->draw_layer = tilemap_16a_draw_layer;
1078         info->draw_layer = segaic16_tilemap_16a_draw_layer;
10741079         info->reset = NULL;
10751080         info->latch_timer = NULL;
10761081         break;
10771082
10781083      case SEGAIC16_TILEMAP_16B:
1079         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16b_text_info),this);
1080         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16b_tile_info),this);
1084         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16b_text_info),this);
1085         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16b_tile_info),this);
10811086         info->numpages = 16;
1082         info->draw_layer = tilemap_16b_draw_layer;
1083         info->reset = tilemap_16b_reset;
1084         info->latch_timer = machine().scheduler().timer_alloc( timer_expired_delegate(FUNC(segaic16_video_device::tilemap_16b_latch_values),this) );
1087         info->draw_layer = segaic16_tilemap_16b_draw_layer;
1088         info->reset = segaic16_tilemap_16b_reset;
1089         info->latch_timer = machine.scheduler().timer_alloc( timer_expired_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16b_latch_values),this) );
10851090         break;
10861091
10871092      case SEGAIC16_TILEMAP_16B_ALT:
1088         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16b_alt_text_info),this);
1089         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16b_alt_tile_info),this);
1093         get_text_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16b_alt_text_info),this);
1094         get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16b_alt_tile_info),this);
10901095         info->numpages = 16;
1091         info->draw_layer = tilemap_16b_draw_layer;
1092         info->reset = tilemap_16b_reset;
1093         info->latch_timer = machine().scheduler().timer_alloc( timer_expired_delegate(FUNC(segaic16_video_device::tilemap_16b_latch_values),this) );
1096         info->draw_layer = segaic16_tilemap_16b_draw_layer;
1097         info->reset = segaic16_tilemap_16b_reset;
1098         info->latch_timer = machine.scheduler().timer_alloc( timer_expired_delegate(FUNC(segaic16_video_device::segaic16_tilemap_16b_latch_values),this) );
10941099         break;
10951100
10961101      default:
1097         fatalerror("Invalid tilemap type specified in tilemap_init\n");
1102         fatalerror("Invalid tilemap type specified in segaic16_tilemap_init\n");
10981103   }
10991104
11001105   /* create the tilemap for the text layer */
1101   info->textmap = &machine().tilemap().create(m_gfxdecode, get_text_info, TILEMAP_SCAN_ROWS,  8,8, 64,28);
1106   info->textmap = &machine.tilemap().create(m_gfxdecode, get_text_info, TILEMAP_SCAN_ROWS,  8,8, 64,28);
11021107
11031108   /* configure it */
11041109   info->textmap_info.rambase = info->textram;
r242475r242476
11141119   for (pagenum = 0; pagenum < info->numpages; pagenum++)
11151120   {
11161121      /* each page is 64x32 */
1117      info->tilemaps[pagenum] = &machine().tilemap().create(m_gfxdecode, get_tile_info, TILEMAP_SCAN_ROWS,  8,8, 64,32);
1122      info->tilemaps[pagenum] = &machine.tilemap().create(m_gfxdecode, get_tile_info, TILEMAP_SCAN_ROWS,  8,8, 64,32);
11181123
11191124      /* configure the tilemap */
11201125      info->tmap_info[pagenum].rambase = info->tileram + pagenum * 64*32;
r242475r242476
11261131      info->tilemaps[pagenum]->set_scrolldx(0, 22);
11271132      info->tilemaps[pagenum]->set_scrolldy(0, 38);
11281133   }
1129   
1130   save_item(NAME(info->flip), which);
1131   save_item(NAME(info->rowscroll), which);
1132   save_item(NAME(info->colscroll), which);
1133   save_item(NAME(info->bank), which);
1134   save_item(NAME(info->latched_xscroll), which);
1135   save_item(NAME(info->latched_yscroll), which);
1136   save_item(NAME(info->latched_pageselect), which);
11371134}
11381135
11391136
r242475r242476
11441141 *
11451142 *************************************/
11461143
1147void segaic16_video_device::tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark)
1144void segaic16_video_device::segaic16_tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark)
11481145{
1149   struct tilemap_info *info = &m_bg_tilemap[which];
1146   struct tilemap_info *info = &bg_tilemap[which];
11501147
11511148   /* text layer is a special common case */
11521149   if (map == SEGAIC16_TILEMAP_TEXT)
r242475r242476
11651162 *
11661163 *************************************/
11671164
1168void segaic16_video_device::tilemap_reset(screen_device &screen)
1165void segaic16_video_device::segaic16_tilemap_reset(screen_device &screen)
11691166{
1170   struct tilemap_info *info = &m_bg_tilemap[0];
1167   struct tilemap_info *info = &bg_tilemap[0];
11711168
11721169   if (info->reset)
11731170      (*info->reset)(screen, info);
r242475r242476
11811178 *
11821179 *************************************/
11831180
1184void segaic16_video_device::tilemap_set_bank(int which, int banknum, int offset)
1181void segaic16_video_device::segaic16_tilemap_set_bank(int which, int banknum, int offset)
11851182{
1186   struct tilemap_info *info = &m_bg_tilemap[which];
1183   struct tilemap_info *info = &bg_tilemap[which];
11871184
11881185   if (info->bank[banknum] != offset)
11891186   {
r242475r242476
12011198 *
12021199 *************************************/
12031200
1204void segaic16_video_device::tilemap_set_flip(int which, int flip)
1201void segaic16_video_device::segaic16_tilemap_set_flip(int which, int flip)
12051202{
1206   struct tilemap_info *info = &m_bg_tilemap[which];
1203   struct tilemap_info *info = &bg_tilemap[which];
12071204   int pagenum;
12081205
12091206   flip = (flip != 0);
r242475r242476
12251222 *
12261223 *************************************/
12271224
1228void segaic16_video_device::tilemap_set_rowscroll(int which, int enable)
1225void segaic16_video_device::segaic16_tilemap_set_rowscroll(int which, int enable)
12291226{
1230   struct tilemap_info *info = &m_bg_tilemap[which];
1227   struct tilemap_info *info = &bg_tilemap[which];
12311228
12321229   enable = (enable != 0);
12331230   if (info->rowscroll != enable)
r242475r242476
12451242 *
12461243 *************************************/
12471244
1248void segaic16_video_device::tilemap_set_colscroll(int which, int enable)
1245void segaic16_video_device::segaic16_tilemap_set_colscroll(int which, int enable)
12491246{
1250   struct tilemap_info *info = &m_bg_tilemap[which];
1247   struct tilemap_info *info = &bg_tilemap[which];
12511248
12521249   enable = (enable != 0);
12531250   if (info->colscroll != enable)
r242475r242476
12651262 *
12661263 *************************************/
12671264
1268READ16_MEMBER( segaic16_video_device::tileram_r )
1265READ16_MEMBER( segaic16_video_device::segaic16_tileram_0_r )
12691266{
1270   return m_tileram[offset];
1267   return segaic16_tileram_0[offset];
12711268}
12721269
12731270
1274WRITE16_MEMBER( segaic16_video_device::tileram_w )
1271WRITE16_MEMBER( segaic16_video_device::segaic16_tileram_0_w )
12751272{
1276   COMBINE_DATA(&m_tileram[offset]);
1277   m_bg_tilemap[0].tilemaps[offset / (64*32)]->mark_tile_dirty(offset % (64*32));
1273   COMBINE_DATA(&segaic16_tileram_0[offset]);
1274   bg_tilemap[0].tilemaps[offset / (64*32)]->mark_tile_dirty(offset % (64*32));
12781275}
12791276
12801277
1281READ16_MEMBER( segaic16_video_device::textram_r )
1278READ16_MEMBER( segaic16_video_device::segaic16_textram_0_r )
12821279{
1283   return m_textram[offset];
1280   return segaic16_textram_0[offset];
12841281}
12851282
12861283
1287WRITE16_MEMBER( segaic16_video_device::textram_w )
1284WRITE16_MEMBER( segaic16_video_device::segaic16_textram_0_w )
12881285{
12891286   /* certain ranges need immediate updates */
12901287   if (offset >= 0xe80/2)
12911288      m_screen->update_partial(m_screen->vpos());
12921289
1293   COMBINE_DATA(&m_textram[offset]);
1294   m_bg_tilemap[0].textmap->mark_tile_dirty(offset);
1290   COMBINE_DATA(&segaic16_textram_0[offset]);
1291   bg_tilemap[0].textmap->mark_tile_dirty(offset);
12951292}
12961293
12971294
r242475r242476
13061303 *
13071304 *************************************/
13081305
1309void segaic16_video_device::rotate_init(int which, int type, int colorbase)
1306void segaic16_video_device::segaic16_rotate_init(running_machine &machine, int which, int type, int colorbase)
13101307{
1311   struct rotate_info *info = &m_rotate[which];
1308   struct rotate_info *info = &segaic16_rotate[which];
13121309
13131310   /* reset the tilemap info */
13141311   memset(info, 0, sizeof(*info));
r242475r242476
13201317   switch (which)
13211318   {
13221319      case 0:
1323         info->rotateram = m_rotateram;
1320         info->rotateram = segaic16_rotateram_0;
13241321         break;
13251322
13261323      default:
1327         fatalerror("Invalid rotate index specified in rotate_init\n");
1324         fatalerror("Invalid rotate index specified in segaic16_rotate_init\n");
13281325   }
13291326
13301327   /* determine the parameters of the rotate */
r242475r242476
13351332         break;
13361333
13371334      default:
1338         fatalerror("Invalid rotate system specified in rotate_init\n");
1335         fatalerror("Invalid rotate system specified in segaic16_rotate_init\n");
13391336   }
13401337
13411338   /* allocate a buffer for swapping */
1342   info->buffer = auto_alloc_array(machine(), UINT16, info->ramsize/2);
1339   info->buffer = auto_alloc_array(machine, UINT16, info->ramsize/2);
13431340
1344   save_item(NAME(info->colorbase), which);
1345   save_pointer(NAME((UINT8 *) info->buffer), info->ramsize, which);
1341   state_save_register_item(machine, "segaic16_rot", NULL, which, info->colorbase);
1342   state_save_register_item_pointer(machine, "segaic16_rot", NULL, which, ((UINT8 *) info->buffer), info->ramsize);
13461343}
13471344
13481345
r242475r242476
13531350 *
13541351 *************************************/
13551352
1356void segaic16_video_device::rotate_draw(int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, bitmap_ind16 &srcbitmap)
1353void segaic16_video_device::segaic16_rotate_draw(int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, bitmap_ind16 &srcbitmap)
13571354{
1358   struct rotate_info *info = &m_rotate[which];
1355   struct rotate_info *info = &segaic16_rotate[which];
13591356   INT32 currx = (info->buffer[0x3f0] << 16) | info->buffer[0x3f1];
13601357   INT32 curry = (info->buffer[0x3f2] << 16) | info->buffer[0x3f3];
13611358   INT32 dyy = (info->buffer[0x3f4] << 16) | info->buffer[0x3f5];
r242475r242476
14161413 *
14171414 *************************************/
14181415
1419READ16_MEMBER( segaic16_video_device::rotate_control_r )
1416READ16_MEMBER( segaic16_video_device::segaic16_rotate_control_0_r )
14201417{
1421   struct rotate_info *info = &m_rotate[0];
1418   struct rotate_info *info = &segaic16_rotate[0];
14221419
14231420   if (info->buffer)
14241421   {
trunk/src/mame/video/segaic16.h
r242475r242476
9999   // static configuration
100100   static void static_set_gfxdecode_tag(device_t &device, const char *tag);
101101
102   UINT8 m_display_enable;
103   optional_shared_ptr<UINT16> m_tileram;
104   optional_shared_ptr<UINT16> m_textram;
105   optional_shared_ptr<UINT16> m_rotateram;
102   UINT8 segaic16_display_enable;
103   UINT16 *segaic16_tileram_0;
104   UINT16 *segaic16_textram_0;
105   UINT16 *segaic16_rotateram_0;
106106
107   void tilemap_set_colscroll(int which, int enable);
108   void tilemap_set_rowscroll(int which, int enable);
109   void tilemap_set_flip(int which, int flip);
110   void tilemap_set_bank(int which, int banknum, int offset);
111   void tilemap_reset(screen_device &screen);
112   void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark);
113//  void tilemap_16b_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority);
114//  void tilemap_16a_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority);
115//  void draw_virtual_tilemap(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 pages, UINT16 xscroll, UINT16 yscroll, UINT32 flags, UINT32 priority);
116//  void tilemap_16b_reset(screen_device &screen, struct tilemap_info *info);
107   void segaic16_tilemap_set_colscroll(int which, int enable);
108   void segaic16_tilemap_set_rowscroll(int which, int enable);
109   void segaic16_tilemap_set_flip(int which, int flip);
110   void segaic16_tilemap_set_bank(int which, int banknum, int offset);
111   void segaic16_tilemap_reset(screen_device &screen);
112   void segaic16_tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int map, int priority, int priority_mark);
113//  void segaic16_tilemap_16b_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority);
114//  void segaic16_tilemap_16a_draw_layer(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int flags, int priority);
115//  void segaic16_draw_virtual_tilemap(screen_device &screen, struct tilemap_info *info, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT16 pages, UINT16 xscroll, UINT16 yscroll, UINT32 flags, UINT32 priority);
116//  void segaic16_tilemap_16b_reset(screen_device &screen, struct tilemap_info *info);
117117
118   TIMER_CALLBACK_MEMBER( tilemap_16b_latch_values );
118   TIMER_CALLBACK_MEMBER( segaic16_tilemap_16b_latch_values );
119119
120   struct rotate_info m_rotate[SEGAIC16_MAX_ROTATE];
121   struct tilemap_info m_bg_tilemap[SEGAIC16_MAX_TILEMAPS];
120   struct rotate_info segaic16_rotate[SEGAIC16_MAX_ROTATE];
121   struct tilemap_info bg_tilemap[SEGAIC16_MAX_TILEMAPS];
122122
123   void set_display_enable(int enable);
124   void tilemap_init(int which, int type, int colorbase, int xoffs, int numbanks);
125   void rotate_init(int which, int type, int colorbase);
123   void segaic16_set_display_enable(int enable);
124   void segaic16_tilemap_init(running_machine &machine, int which, int type, int colorbase, int xoffs, int numbanks);
125   void segaic16_rotate_init(running_machine &machine, int which, int type, int colorbase);
126126
127   DECLARE_READ16_MEMBER( tileram_r );
128   DECLARE_READ16_MEMBER( textram_r );
129   DECLARE_WRITE16_MEMBER( tileram_w );
130   DECLARE_WRITE16_MEMBER( textram_w );
127   DECLARE_READ16_MEMBER( segaic16_tileram_0_r );
128   DECLARE_READ16_MEMBER( segaic16_textram_0_r );
129   DECLARE_WRITE16_MEMBER( segaic16_tileram_0_w );
130   DECLARE_WRITE16_MEMBER( segaic16_textram_0_w );
131131
132   void rotate_draw(int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, bitmap_ind16 &srcbitmap);
132   void segaic16_rotate_draw(int which, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, bitmap_ind16 &srcbitmap);
133133
134   DECLARE_READ16_MEMBER( rotate_control_r );
134   DECLARE_READ16_MEMBER( segaic16_rotate_control_0_r );
135135
136   TILE_GET_INFO_MEMBER( tilemap_16b_tile_info );
137   TILE_GET_INFO_MEMBER( tilemap_16b_text_info );
138   TILE_GET_INFO_MEMBER( tilemap_16b_alt_tile_info );
139   TILE_GET_INFO_MEMBER( tilemap_16b_alt_text_info );
136   TILE_GET_INFO_MEMBER( segaic16_tilemap_16b_tile_info );
137   TILE_GET_INFO_MEMBER( segaic16_tilemap_16b_text_info );
138   TILE_GET_INFO_MEMBER( segaic16_tilemap_16b_alt_tile_info );
139   TILE_GET_INFO_MEMBER( segaic16_tilemap_16b_alt_text_info );
140140
141   TILE_GET_INFO_MEMBER( tilemap_16a_tile_info );
142   TILE_GET_INFO_MEMBER( tilemap_16a_text_info );
141   TILE_GET_INFO_MEMBER( segaic16_tilemap_16a_tile_info );
142   TILE_GET_INFO_MEMBER( segaic16_tilemap_16a_text_info );
143143
144144protected:
145145   // device-level overrides
146   virtual void device_config_complete();
146147   virtual void device_start();
147148   virtual void device_reset();
148149
trunk/src/mame/video/segaorun.c
r242475r242476
2020   if (m_shangon_video)
2121   {
2222      // initialize the tile/text layers
23      m_segaic16vid->tilemap_init(0, SEGAIC16_TILEMAP_16B_ALT, 0x000, 0, 2);
23      m_segaic16vid->segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16B_ALT, 0x000, 0, 2);
2424
2525      // initialize the road
2626      m_segaic16road->segaic16_road_init(machine(), 0, SEGAIC16_ROAD_OUTRUN, 0x7f6, 0x7c0, 0x7c0, 0);
r242475r242476
2828   else
2929   {
3030      // initialize the tile/text layers
31      m_segaic16vid->tilemap_init(0, SEGAIC16_TILEMAP_16B, 0x000, 0, 2);
31      m_segaic16vid->segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16B, 0x000, 0, 2);
3232
3333      // initialize the road
3434      m_segaic16road->segaic16_road_init(machine(), 0, SEGAIC16_ROAD_OUTRUN, 0x400, 0x420, 0x780, 0);
r242475r242476
5353   m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND);
5454
5555   // draw background
56   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
57   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
56   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
57   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
5858
5959   // draw foreground
60   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
61   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
60   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
61   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
6262
6363   // draw the high priority road
6464   m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_FOREGROUND);
r242475r242476
6666   // text layer
6767   // note that we inflate the priority of the text layer to prevent sprites
6868   // from drawing over the high scores
69   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x08);
70   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
69   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x08);
70   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
7171
7272   // mix in sprites
7373   bitmap_ind16 &sprites = m_sprites->bitmap();
r242475r242476
106106UINT32 segaorun_state::screen_update_outrun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
107107{
108108   // if no drawing is happening, fill with black and get out
109   if (!m_segaic16vid->m_display_enable)
109   if (!m_segaic16vid->segaic16_display_enable)
110110   {
111111      bitmap.fill(m_palette->black_pen(), cliprect);
112112      return 0;
r242475r242476
122122   m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_BACKGROUND);
123123
124124   // draw background
125   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
126   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
125   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
126   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
127127
128128   // draw foreground
129   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
130   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
129   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
130   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
131131
132132   // draw the high priority road
133133   m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_FOREGROUND);
134134
135135   // text layer
136   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
137   m_segaic16vid->tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
136   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
137   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
138138
139139   // mix in sprites
140140   bitmap_ind16 &sprites = m_sprites->bitmap();
trunk/src/mame/video/segas16a.c
r242475r242476
1818void segas16a_state::video_start()
1919{
2020   // initialize the tile/text layers
21   m_segaic16vid->tilemap_init( 0, SEGAIC16_TILEMAP_16A, 0x000, 0, 1);
21   m_segaic16vid->segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16A, 0x000, 0, 1);
2222}
2323
2424
r242475r242476
2929UINT32 segas16a_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
3030{
3131   // if no drawing is happening, fill with black and get out
32   if (!m_segaic16vid->m_display_enable)
32   if (!m_segaic16vid->segaic16_display_enable)
3333   {
3434      bitmap.fill(m_palette->black_pen(), cliprect);
3535      return 0;
r242475r242476
4242   screen.priority().fill(0, cliprect);
4343
4444   // draw background opaquely first, not setting any priorities
45   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
46   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
45   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
46   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
4747
4848   // draw background again, just to set the priorities on non-transparent pixels
4949   bitmap_ind16 dummy_bitmap;
50   m_segaic16vid->tilemap_draw( screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
51   m_segaic16vid->tilemap_draw( screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
50   m_segaic16vid->segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
51   m_segaic16vid->segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
5252
5353   // draw foreground
54   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
55   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
54   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
55   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
5656
5757   // text layer
58   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
59   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
58   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
59   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
6060
6161   // mix in sprites
6262   bitmap_ind16 &sprites = m_sprites->bitmap();
trunk/src/mame/video/segas16b.c
r242475r242476
1818void segas16b_state::video_start()
1919{
2020   // initialize the tile/text layers
21   m_segaic16vid->tilemap_init( 0, m_tilemap_type, 0x000, 0, 2);
21   m_segaic16vid->segaic16_tilemap_init(machine(), 0, m_tilemap_type, 0x000, 0, 2);
2222}
2323
2424
r242475r242476
2929UINT32 segas16b_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
3030{
3131   // if no drawing is happening, fill with black and get out
32   if (!m_segaic16vid->m_display_enable)
32   if (!m_segaic16vid->segaic16_display_enable)
3333   {
3434      bitmap.fill(m_palette->black_pen(), cliprect);
3535      return 0;
r242475r242476
4242   screen.priority().fill(0, cliprect);
4343
4444   // draw background opaquely first, not setting any priorities
45   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
46   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
45   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
46   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
4747
4848   // draw background again, just to set the priorities on non-transparent pixels
4949   bitmap_ind16 dummy_bitmap;
50   m_segaic16vid->tilemap_draw( screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
51   m_segaic16vid->tilemap_draw( screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
50   m_segaic16vid->segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
51   m_segaic16vid->segaic16_tilemap_draw(screen, dummy_bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
5252
5353   // draw foreground
54   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
55   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
54   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
55   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
5656
5757   // text layer
58   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
59   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
58   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
59   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
6060
6161   // mix in sprites
6262   bitmap_ind16 &sprites = m_sprites->bitmap();
trunk/src/mame/video/segas18.c
r242475r242476
3434   m_vdp_mixing = 0;
3535
3636   // initialize the tile/text layers
37   m_segaic16vid->tilemap_init( 0, SEGAIC16_TILEMAP_16B, 0x000, 0, 8);
37   m_segaic16vid->segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16B, 0x000, 0, 8);
3838
3939   save_item(NAME(m_grayscale_enable));
4040   save_item(NAME(m_vdp_enable));
r242475r242476
187187#endif
188188
189189   // if no drawing is happening, fill with black and get out
190   if (!m_segaic16vid->m_display_enable)
190   if (!m_segaic16vid->segaic16_display_enable)
191191   {
192192      bitmap.fill(m_palette->black_pen(), cliprect);
193193      return 0;
r242475r242476
200200   screen.priority().fill(0, cliprect);
201201
202202   // draw background opaquely first, not setting any priorities
203   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
204   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
203   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0 | TILEMAP_DRAW_OPAQUE, 0x00);
204   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1 | TILEMAP_DRAW_OPAQUE, 0x00);
205205   if (m_vdp_enable && vdplayer == 0) draw_vdp(screen, bitmap, cliprect, vdppri);
206206
207207   // draw background again to draw non-transparent pixels over the VDP and set the priority
208   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
209   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
208   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
209   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
210210   if (m_vdp_enable && vdplayer == 1) draw_vdp(screen, bitmap, cliprect, vdppri);
211211
212212   // draw foreground
213   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
214   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
213   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
214   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
215215   if (m_vdp_enable && vdplayer == 2) draw_vdp(screen, bitmap, cliprect, vdppri);
216216
217217   // text layer
218   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
219   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
218   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
219   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
220220   if (m_vdp_enable && vdplayer == 3) draw_vdp(screen, bitmap, cliprect, vdppri);
221221
222222   // mix in sprites
trunk/src/mame/video/segaxbd.c
r242475r242476
1717void segaxbd_state::video_start()
1818{
1919   // initialize the tile/text layers
20   m_segaic16vid->tilemap_init( 0, SEGAIC16_TILEMAP_16B, 0x1c00, 0, 2);
20   m_segaic16vid->segaic16_tilemap_init(machine(), 0, SEGAIC16_TILEMAP_16B, 0x1c00, 0, 2);
2121
2222   // initialize the road
2323   m_segaic16road->segaic16_road_init(machine(), 0, SEGAIC16_ROAD_XBOARD, 0x1700, 0x1720, 0x1780, -166);
r242475r242476
3232UINT32 segaxbd_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
3333{
3434   // if no drawing is happening, fill with black and get out
35   if (!m_segaic16vid->m_display_enable)
35   if (!m_segaic16vid->segaic16_display_enable)
3636   {
3737      bitmap.fill(m_palette->black_pen(), cliprect);
3838      return 0;
r242475r242476
5050      m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_FOREGROUND);
5151
5252   // draw background
53   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
54   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
53   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 0, 0x01);
54   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_BACKGROUND, 1, 0x02);
5555
5656   // draw foreground
57   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
58   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
57   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 0, 0x02);
58   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_FOREGROUND, 1, 0x04);
5959
6060   // draw the high priority road
6161   if (m_road_priority == 1)
6262      m_segaic16road->segaic16_road_draw(0, bitmap, cliprect, SEGAIC16_ROAD_FOREGROUND);
6363
6464   // text layer
65   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
66   m_segaic16vid->tilemap_draw( screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
65   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 0, 0x04);
66   m_segaic16vid->segaic16_tilemap_draw(screen, bitmap, cliprect, 0, SEGAIC16_TILEMAP_TEXT, 1, 0x08);
6767
6868   // mix in sprites
6969   bitmap_ind16 &sprites = m_sprites->bitmap();
trunk/src/mame/video/segaybd.c
r242475r242476
1717void segaybd_state::video_start()
1818{
1919   // initialize the rotation layer
20   m_segaic16vid->rotate_init(0, SEGAIC16_ROTATE_YBOARD, 0x000);
21   m_ysprites->set_rotate_ptr(m_segaic16vid->m_rotate);
20   m_segaic16vid->segaic16_rotate_init(machine(), 0, SEGAIC16_ROTATE_YBOARD, 0x000);
21   m_ysprites->set_rotate_ptr(m_segaic16vid->segaic16_rotate);
2222}
2323
2424
r242475r242476
3030UINT32 segaybd_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
3131{
3232   // if no drawing is happening, fill with black and get out
33   if (!m_segaic16vid->m_display_enable)
33   if (!m_segaic16vid->segaic16_display_enable)
3434   {
3535      bitmap.fill(m_palette->black_pen(), cliprect);
3636      return 0;
r242475r242476
4343   m_bsprites->draw_async(cliprect);
4444
4545   // apply rotation
46   m_segaic16vid->rotate_draw(0, bitmap, cliprect, screen.priority(), m_ysprites->bitmap());
46   m_segaic16vid->segaic16_rotate_draw(0, bitmap, cliprect, screen.priority(), m_ysprites->bitmap());
4747
4848   // mix in 16B sprites
4949   bitmap_ind16 &sprites = m_bsprites->bitmap();
trunk/src/mame/video/tc0480scp.c
r242475r242476
10351035   if (!flip)  reg = -reg;
10361036   m_bgscrolly[1] = reg;
10371037
1038   reg = m_ctrl[6] + 16;
1038   reg = m_ctrl[6];
10391039   if (!flip)  reg = -reg;
10401040   m_bgscrolly[2] = reg;
10411041
1042   reg = m_ctrl[7] + 16;
1042   reg = m_ctrl[7];
10431043   if (!flip)  reg = -reg;
10441044   m_bgscrolly[3] = reg;
10451045
trunk/src/osd/windows/windows.mak
r242475r242476
415415   $(OSDOBJ)/modules/debugger/qt/debugqtmainwindow.o \
416416   $(OSDOBJ)/modules/debugger/qt/debugqtmemorywindow.o \
417417   $(OSDOBJ)/modules/debugger/qt/debugqtbreakpointswindow.o \
418   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.o \
419418   $(OSDOBJ)/modules/debugger/qt/debugqtview.moc.o \
420419   $(OSDOBJ)/modules/debugger/qt/debugqtwindow.moc.o \
421420   $(OSDOBJ)/modules/debugger/qt/debugqtlogwindow.moc.o \
422421   $(OSDOBJ)/modules/debugger/qt/debugqtdasmwindow.moc.o \
423422   $(OSDOBJ)/modules/debugger/qt/debugqtmainwindow.moc.o \
424423   $(OSDOBJ)/modules/debugger/qt/debugqtmemorywindow.moc.o \
425   $(OSDOBJ)/modules/debugger/qt/debugqtbreakpointswindow.moc.o \
426   $(OSDOBJ)/modules/debugger/qt/debugqtdeviceswindow.moc.o
424   $(OSDOBJ)/modules/debugger/qt/debugqtbreakpointswindow.moc.o
427425endif
428426
429427#-------------------------------------------------


Previous 199869 Revisions Next


© 1997-2024 The MAME Team